A Heuristic Algorithm for Rate-Profiling of Polarization Adjusted Convolutional (PAC) codes

In this paper, we propose a heuristic algorithm for rate-profile construction of Arikan's Polarization Assisted Convolutional (PAC) codes. This method can be used for any blocklength, rate and convolutional precoding polynomial. The proposed algorithm tries to create a rate-profile for which the corresponding PAC code is, in a sense, locally optimized for having maximum possible minimum distance.Simulation results show that PAC codes constructed with the proposed algorithm perform better in terms of frame erasure rate (FER) compared to the PAC codes constructed with rate profiling designs in existing literature for various list lengths. Further, by using a (64, 32) PAC code as an example, it is shown that the choice of convolutional precoding polynomial can have a significant impact on FER performance. Finally, we demonstrate that for a target FER of $\mathbf{10^{-5}}$, (128, 72) PAC codes constructed with our proposed algorithm is just 0.35 dB away from the information theoretic limit at this blocklength.


I. INTRODUCTION
Polar codes introduced by Arikan [1] are the first provably capacity achieving codes for the class of binary input memoryless symmetric (BMS) channels with low encoding and decoding complexity of order O(N log 2 N ) for a code of blocklength N . Polar code is based on a phenomenon of channel polarization where a communication channel is transformed into polarized sub-channels: either completely noisy or noiseless. Information bits are transmitted over a set of noiseless sub-channels, while fixed or frozen bits are sent over the noisy ones. Polar codes are already being used in 5G New radio (NR) [2] for encoding and decoding of control information.
Polar codes achieve channel capacity asymptotically as the blocklength N of the code approaches infinity. However, for short blocklengths, the performance of polar codes is not good enough. Figure 1 shows the performance of polar code and its variants for a blocklength N = 128 and rate R = 0.5 for a binary input additive white gaussian noise (BI-AWGN) channel. Figure 1 also shows the BI-AWGN dispersion bound which is the minimum probability of error * (N, R) that can be achieved on a BI-AWGN channel by using a code of blocklength N and rate R under maximum likelihood (ML) decoding. It can be observed clearly that there is a big gap between polar code with successive cancellation decoding (SCD) and the dispersion bound. This poor performance can be partly attributed to poor distance properties of polar codes and also the sub-optimality of SCD as compared to ML decoding [3]. Since Arikan's ground breaking work, there have been a lot of efforts to enhance the performance of polar code for short blocklengths, a survey of which can be found in [4]. Specifically, CRC-Aided Polar codes under succesive cancellation list (SCL) decoding [3] improve the performance quite a lot. Figure 1 shows the FER performance of a (128, 72) polar code combined with a (72, 64) cyclic code which acts as CRC under SCL decoding with a list size L = 32. This approach has been adopted to 5G NR standard and has remained the state of the art ever since.
In the Shannon Lecture at the International Symposium on Information Theory (ISIT) 2019, Arikan presented polarization adjusted convolutional (PAC) codes, which are a significant improvement over the state-of-the-art polar codes [5]. Under sequential decoding, at a target FER of 10 −5 , the FER performance of PAC codes is just 0.25 dB away from the BI-AWGN dispersion bound approximation. Further, it was observed in [6] and [7] that nearly same FER performance can as well be obtained by list decoding as shown in Figure  1.

A. Brief overview of PAC code
The coding scheme of a PAC code is shown in Figure 2. In Figure 2, the solid blocks refer to actual blocks used in the communication system. The dotted blocks refer to the information provided to these blocks. A PAC code can be denoted as P AC(N, K, A, w). Here, K is the number of information bits. N is the length of the codeword which is mostly a power of 2. A ⊆ {0, 1, ..., (N − 1)} is the set of information bit indices. w is a precoding vector of length p containing 0s and 1s. R = K/N is the rate of the code. Using the polar code terminology, F = A c is the set of frozen indices, where no information is transmitted. These indices are filled with zeros. 1) PAC Encoding scheme: The first step of encoding PAC codes is rate-profiling, a term coined by Arikan [5]. A rateprofiler maps the vector of information bits denoted by d = according to A. In other words, the K information bits in d are mapped to positions in v indicated by A. The rest (N −K) positions in v are filled with zeros. The selection of K indices out of N possible indices is called rate-profile construction. Two well known rate-profiling schemes are polar and Reed-Muller (RM) rate profiles.
After rate-profiling, the vector v is transformed into a vector u using a convolutional precoding polynomial w of length p. In other words, each bit in v is replaced by a linear combination of itself and p − 1 bits that precede it. This linear combination is decided by w.
The final step of encoding is to pass the precoded vector u through a Polar Transform P n to output encoded bit vector x = uP n = uP n . Here, P n is the n th Kronecker power of the basic Polar Transform P = 1 0 1 1 proposed by Arikan in [1].
In the absence of precoding, w = [1] and PAC code falls back to polar code.

B. Our Contributions
It was observed by Arikan in [5] that the performance of PAC code is more sensitive to the choice of rate-profiling scheme A as compared to the precoding polynomial w. Further, it was also observed in [6], that PAC codes perform better than polar codes owing to improved minimum distance properties.
In this paper, we present a heuristic algorithm for rateprofile construction of PAC code that can be used for any blocklength, rate and precoder constraints. The algorithm tries to construct a rate-profile A for which the corresponding (N, K, A, w) PAC code is, in a sense, locally optimized for having maximum possible minimum distance. To this end, we exploit the method of counting low weight codewords mentioned in [9] to find minimum distance and the number of codewords at that distance.
In order to validate our claims, we compare the PAC code constructed with the proposed algorithm with the PAC codes available in existing literature [10]. Simulation results show that PAC codes with the proposed rate-profile construction perform better in terms of frame erasure rate (FER) compared to the PAC codes with rate profiling designs in existing literature.
In this paper, vectors are denoted by boldface lowercase letters a. An element in a vector a at index i is denoted by a i . A set is denoted by caligraphic font A, its cardinality by |A| and its complement by A c . The subvector c A represents The rest of the paper is organized as follows. In Section II, we present our proposed heuristic algorithm. Section III discusses simulation results for some PAC codes constructed by using the proposed algorithm and compare it with schemes in existing literature. Finally, in Section IV, we conclude by mentioning some open problems.

II. HEURISTIC ALGORITHM FOR RATE-PROFILE
CONSTRUCTION OF PAC CODES As already mentioned, the aim of rate-profile construction is to select K indices out of N possible indices. Further, we know that there is a RM score corresponding to each of the N indices. In addition to this, we note that, there are N bit-channels corresponding to each bit index i. There is a Bhattacharyya parameter W (i) N corresponding to each such bit-channel [1].
Our proposed algorithm is shown in Algorithm 1. The inputs to the algorithm are N , K, w, p and the design signalto-noise ratio (SNR) ρ d . In addition to these parameters, we provide a lower threshold value Z l and an upper threshold value Z u of Bhattacharyya parameter. Before the algorithm begins, we compute the Bhattacharyya parameters for the bit-channels at the given design SNR ρ d by using Com-puteZBitChannels function, the method of which is described in [11]. Now, the algorithm can divided into two main phases as described below.
In the first phase, the rate-profile construction algorithm sorts the RM scores of N indices in an ascending order. We call the RM score at the (N − K) th index of the sorted set as boundary RM score. Now, we can divide the set of N indices into three subsets. First, the set of indices with RM score less than the boundary RM score are allocated to the frozen set F or A c . Second, the set of indices with RM score greater than the boundary RM score are allocated to the set of information bit indices A. We call this set as the initial Algorithm 1: Proposed algorithm for rate-profile construction of PAC code rate profile and denote it by A init . Third, we have the set of indices whose RM score is equal to the boundary RM score. Among these indices, the ones whose Bhattacharyya parameter W (i) N is less than Z l are allocated to A init . The indices whose Bhattacharyya parameter W (i) N is greater than Z l but less than Z u are allocated to a new set Q. It is to be noted that |A init | ≤ K. The pseudocode for the first phase has been provided as subroutine DesignInitialRateProfile in Algorithm 1.
An obvious simplification happens for some PAC codes when the number of indices with RM score greater than the boundary RM score is equal to K. A typical example of this is the (128, 64) PAC code. In this case, |A init | = K and our rate-profile construction algorithm falls back to the famous RM rate-profile as described by Arikan in [5].
In the second phase, the rate-profile construction algorithm selects the remaining (K − |A init |) indices from available |Q| indices in order to create a (N, K) code. Here, the algorithm selects indices from Q such that the resulting (N, K, A, w) PAC code has maximum possible minimum distance. Searching for the best combination among possible |Q| C (K−|Ainit|) combinations is overwhelming in terms of computational resources. For example, let us consider a (64, 32) PAC code for design SNR 3 dB. Here, we have a boundary RM score of 3. |A init | = 22, |Q| = 20 and (K −|A init |) = (32−22) = 10. Thus, the second phase algorithm has to select 10 indices from available 20 indices, which can be done in 20 C 10 = 184756 ways. Similarly, for a (128, 72) PAC code, the search space is 35 C 8 = 23535820 which is obviously huge.
In order to reduce the search space, we make an important assumption as follows. Let AK denote the set of information bit indices for a code of rateK/N . Then AK ⊂ A (K+1) . In other words, if we select a bit index to carry information bit for a code of rateK/N , then we can select that bit index as well for a code of rate (K + 1)/N . Thus, in the second phase, our proposed algorithm runs for (K−|A init |) iterations. In each iteration, it selects one bit index from Q for which the corresponding (N, |A|, A, w) PAC code achieves minimum hamming distance property.
The second phase of the rate-profile construction algorithm is mentioned as the main routine in Algorithm 1. First, the main routine receives A init and Q from subroutine DesignIni-tialRateProfile. Then, the algorithm runs for (K − |A init |) iterations till |A| reaches the value of K, i.e. a code of rate K/N is achieved. In each iteration, two vectors h and c are initialized to all zero vector. h is required to store the first nonzero (NZ) minimum distance while c is required to store the number of codewords at this minimum distance. Now, each bit index of Q is selected and added to the current information bit index set A. For, the corresponding (N, |A|, A, w) PAC code, we run the method of counting low weight codewords mentioned in [9]. Function FindNZMinDistCodewords uses this method to calculate minimum hamming distance h i and number of codewords c i at distance h i . In order to select a bit index i opt to add to the set A, firstly, the set of bit indices H which have minimum hamming distance h min is selected. Then, among the bit indices in H, the set C of bit indices which have minimum number of codewords at hamming distance h min is selected. Among the indices in C, the index with the minimum value of Bhattacharyya parameter Z i is selected as i opt . i opt is added to A and its cardinality |A| is increased by 1. Also, i opt ia removed from Q and its cardinality |Q| is decreased by 1. The algorithm terminates when |A| = K.

III. SIMULATION RESULTS AND DISCCUSSION
For simulation, we first consider a (64, 32) PAC code transmitted over a BI-AWGN channel for which the rate-profile A was constructed using the proposed method. The convolutional precoding polynomial used is w = [1, 1, 1, 1, 0, 0, 1] . The design SNR ρ d is 3 dB. The minimum hamming weight of this code is 8 and there are 8 codewords with this weight. Figure 3 shows the FER performance of polar code and PAC code variants in existing literature compared with that of the PAC code constructed using our proposed Algorithm 1. For each code, SCL decoder with list size L = 8 was used. We first observe that PAC code with rate-profile based on 3GPP 5G NR specification [2] only marginally improves the FER performance. The algorithm proposed in [10] performs much better than the current state-of-the-art 5G NR rate Specifically, at a target FER of 10 −5 , the performance of our code is around 0.3 dB better than that presented in [10]. Figure 4 shows (64, 32) PAC code variants transmitted over a BI-AWGN channel, but using a convolution precoding polynomial given by w = [1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1]. The design SNR ρ d is 3 dB. For each code, SCL decoder with list size L = 8 is used. In this case, PAC code constructed with our proposed Algorithm 1 marginally outperforms the PAC code constructed with algorithm in [10] for the range of SNR below 5 dB. PAC code constructed with both constructions performs nearly same at high SNRs beyond 5 dB. Figure 5 shows (64, 32) PAC code variants with same  parameters as those shown in Figure 4. However, we have used SCL decoder with list size L = 32. Further, we compare PAC code variants with the current state-of-the-art 8-bit CRC-Aided (64, 32) Polar code used in 3GPP 5G NR which contains 24 information bits and 8 CRC-bits. It can be observed that both the PAC code variants perform nearly same. Specifically, at a target FER of 10 −5 , the performance of our both the codes is around 0.6 dB better than the CRC-Aided Polar code. From the above mentioned results, it can be observed that PAC codes constructed with rate-profiling Algorithm 1 perform good for a wide range of list sizes. Further, it should be noted that, when using Algorithm 1, the choice of the convolutional precoding polynomial w can have a significant impact on the performance of the PAC code. Considering a target FER of 10 −5 , it can be noted that the PAC code constructed with Algorithm 1 for w = [1, 1, 1, 1, 0, 0, 1] performs around 0.2 dB better than the PAC code constructed with Algorithm 1 for w = [1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1]. Figure 6 shows the FER performance of (128, 72) PAC code transmitted over a BI-AWGN channel for which the rateprofile A was constructed using Algorithm 1. The convolutional precoding polynomial used is w = [1, 0, 1, 1, 0, 1, 1].
The design SNR ρ d is 3 dB. The minimum hamming weight of this code is 12 and there are 684 codewords with this weight. It can be easily observed that with increasing list length L of the SCL decoder, FER performance of the (128, 72) PAC code improves greatly. Specifically, at a target FER of 10 −5 , when decoded with a SCL decoder with list length L = 128, the FER performance of this PAC code is just 0.35 dB away from the BI-AWGN dispersion bound approximation. Figure 7 shows the comparison of FER performance of (256, 128) PAC code constructed using Algorithm 1 versus the PAC code constructed using the algorithm mentioned in [10]. The convolutional precoding polynomial used is w = [1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1]. The design SNR ρ d is 3 dB. It can be observed that our PAC code performs better than the one in [10] at all range of SNR. It is worth noting here that our PAC code construction decoded with a SCL decoder having list size L = 8 performs better than the one in [10] decoded with a SCL decoder having list size L = 32. Specifically, at a target FER of 10 −5 , it is at-least 0.2 dB better. Table I provides the rate-profiles that were obtained by Algorithm 1 and used to generate the simulation results just described.

IV. CONCLUSION AND FUTURE WORK
In this paper, we presented a heuristic algorithm for rateprofile construction of Arikan's PAC codes. We demonstrated that the PAC codes constructed by using the proposed algorithm perform better in terms of FER compared to the PAC codes constructed with rate-profile designs in existing literature. It was shown how the choice of the convolutional precoding polynomial can affect the performance of PAC code. Finally, it was shown how the PAC codes constructed with our proposed algorithm can approach the information theoretic limits.
There are many open problems to ponder over. First, we note that the proposed heuristic algorithm is kind of a greedy algorithm and may terminate at a locally optimal solution. Sometimes, this might lead to poor construction of PAC codes. Is it possible to create a rate-profile construction algorithm using machine learning or other search algorithms that will provide a better performance? Second, for a given code rate and blocklength, does there exist a convolutional precoding polynomial for which the FER at a given SNR is minimum?