Simplified Successive-Cancellation List Decoding of Polar Codes Seyyed Ali Hashemi, Carlo Condo, Warren J. Gross Department of Electrical and Computer Engineering McGill University, Montr´eal, Qu´ebec, Canada Email:
[email protected],
[email protected],
[email protected]
Abstract—The Successive-Cancellation List (SCL) decoding algorithm is one of the most promising approaches towards practical polar code decoding. It is able to provide a good trade-off between error-correction performance and complexity, tunable through the size of the list. In this paper, we show that in the conventional formulation of SCL, there are redundant calculations which do not need to be performed in the course of the algorithm. We simplify SCL by removing these redundant calculations and prove that the proposed simplified SCL and the conventional SCL algorithms are equivalent. The simplified SCL algorithm is valid for any code and can reduce the timecomplexity of SCL without affecting the space complexity.
I. I NTRODUCTION Polar codes are the first family of error-correction codes which can provably achieve the capacity of a memoryless channel when the code length N approaches infinity [1]. Successive-Cancellation (SC) is one of the most common polar code decoding algorithms with a complexity of O(N log2 N ) [1]. The SC decoding process can be represented as a binary tree search, and it requires 2N −2 time-steps to decode a codeword [2]. It was observed in [3], [4] that SC tree nodes whose leaves identify specific patterns of information and redundancy bits need not be traversed to find the candidate codeword. The main advantage of these binary tree pruning techniques is that they significantly reduce the time complexity of the conventional SC algorithm with minimal space complexity overhead. SC yields very good error correction performance for long polar codes, that however degrades significantly with medium and short code lengths. To overcome this issue, MaximumLikelihood (ML) decoding algorithms such as Sphere Decoding (SD) were applied to polar codes [5]. ML decoding is optimal, but the complexity of such algorithms is so high that their usage is only practical for very short polar codes. A list-based version of SD (List-SD) has been proposed by the authors in [6] offering a trade-off between complexity and error correction performance. However, the space complexity of List-SD still grows quickly with the code length. In order to reduce the gap between the error correction performance of SC and ML, the SC List (SCL) decoding algorithm was introduced in [7]. Polar codes decoded with SCL can compete with some commonly used Low-Density Parity-Check codes of equal block length and rate. Yet, SCL requires 3N − 2 time steps [8], and its space complexity grows with the list size. To decrease its time complexity, [9]
extends the aforementioned pruning techniques to SCL as well. However, they are based on code-specific heuristics that lose their validity when the code parameters change. In this paper, we introduce new, simplified formulations for the SCL tree pruning techniques, and we prove that they are exactly equivalent to the original SCL. They allow significant time complexity reduction without relying on approximations: thus, they are valid for any code and do not affect the error correction performance of the algorithm. The rest of the paper is organized as follows. Section II introduces polar codes and the SC and SCL decoding processes. Section III describes the new formulations and proves their correctness. Finally, conclusions are drawn in Section IV. II. P OLAR C ODES A polar code P(N, K) is a linear block code of length N = 2n and rate K/N constructed by concatenating two polar codes of length N/2. The recursive concatenation process can be represented by a modulo-2 matrix multiplication as x = uG⊗n ,
(1)
where u = {u0 , u1 , . . . , uN −1 } is the input vector, x = {x0 , x1 , . . . , xN −1 } is the coded vector, and the generator matrix G⊗n is the n-th Kronecker product of the polarizing matrix G = 11 01 . The input vector u is composed of N bits, K of which carry information and are assigned to the K most reliable bit channels. The remaining N − K bits of u are set to a predefined value (typically 0) known by the decoder. They are thus known as frozen bits, and their set is identified as F. Vector x is transmitted through the channel, and the decoder receives the Logarithmic Likelihood Ratio (LLR) vector y = {y0 , y1 , . . . , yN −1 }. A. Successive Cancellation and Successive Cancellation List decoding SC-based decoding can be represented as a binary tree search. An example is shown in Fig. 1 for P(16, 8), where nodes at stage s contain 2s bits. Messages are passed among nodes as shown in Fig. 2. The soft messages α, which contain the LLR values, are passed from parent to child, while the hard bit estimates β are instead
s=4
s+1
s=3
s
α αl
s=2
s−1
β
β l αr
βr
Fig. 2: Message passing in tree graph representation of SC decoding.
s=1 s=0 Fig. 1: Binary tree example for P(16, 8). White circles are Rate-0 nodes, gray circles are Rate-1 nodes, black rings are SPC nodes and gray rings are Rep nodes.
PM are allowed to survive. In the LLR-based formulation of SCL [8], the PM can be computed as PMil =
l
passed from child to parent. The left and right messages α and αr , each a vector of 2s−1 values, are calculated as 1 + eαi +αi+2s−1 l αi = ln , (2) eαi + eαi+2s−1 αir =αi+2s−1 + (1 − 2βil )αi , (3) while β, a vector of 2s bits, is computed as ( βil ⊕ βir , if i < 2s−1 βi = r otherwise, βi−2 s−1 ,
(4)
where ⊕ denotes the bitwise XOR. The interval i < 2s−1 discriminates between bits considered by the left and the right child. Due to the data dependencies, each node receives α first, then sends αl , receives β l , sends αr , receives β r , and finally sends β, in this order. A hardware-friendly version of Equation (2), proposed in [2], can be written as αil = sgn(αi )sgn(αi+2s−1 ) min(|αi |, |αi+2s−1 |).
(5)
In [3], [4] four different types of constituent codes are identified: their decoding can be carried out in a more efficient way than fully exploring the decoding tree. These codes are shown in Fig. 1 as differently coloured nodes. White circles are Rate-0 nodes, whose leaves are constituted of frozen bits only, while gray circles are Rate-1 nodes, where all leaves are information bits. All leaf nodes at s = 0 are either Rate-0 or Rate-1, being either single frozen bits or single information bits. Gray rings represent Repetition (Rep) nodes, where only the rightmost leaf is an information bit. Finally, black rings represent Single Parity Check (SPC) nodes, i.e. nodes whose leaves are all information bits, except for the leftmost one. Note that SPC and Rep nodes at s = 1 are equivalent. To improve the error correction performance of SC with codes of moderate lengths, the SCL decoding algorithm was proposed in [7]. Every time a bit must be estimated, both its possible values 0 and 1 are considered. Since a set of L codeword candidates is memorized at all times, every new bit estimate produces 2L new candidates, half of which must be discarded. To this purpose, a Path Metric (PM) is associated to each path and updated at every new estimate: it can be considered a cost function, and the L paths with the lowest
i X
ln 1 + e−(1−2ˆujl )αjl ,
(6)
j=0
where l is the path index and u ˆjl is the estimate of bit j at path l, calculated as ( 0, if j ∈ F or αjl ≥ 0, (7) u ˆjl = 1, otherwise. From Equation (6), we can also see that PM for a polar code with N = 2s can be computed as the sum of its two N = 2s−1 constituent codes. However, it must be noted that due to the sequential nature of SCL, to compute the path metric at bit i it is necessary to have traversed the whole decoding tree at the left of leaf node i. A hardware-friendly version of Equation (6), as proposed in [8], can be expressed as ( PMi−1l , if u ˆil = 21 (1 − sgn (αil )) , (8) PMil = PMi−1l + |αil |, otherwise, i
=
1X sgn(αjl )αjl − (1 − 2ˆ ujl )αjl , 2 j=0
(9)
Faster decoding for the aforementioned four types of nodes is possible in SCL as well and hardware-friendly path metric calculations have been proposed in [9], but they rely on heuristic approaches whose validity is not guaranteed when changing code parameters. III. S IMPLIFIED SCL D ECODING In order to reduce the time complexity of SCL decoding, we propose simplified path metric calculations for Rate-1, Rate-0 and Rep nodes valid for any polar code. They stem from the original SCL algorithm [8]. The simplified path metrics rely on the LLR values at the top of the tree identified by their respective node: thus, it is not necessary to traverse the tree to correctly compute them. For all three nodes, we prove that the proposed calculations are exactly equivalent to those proposed in [8]. We also propose a hardware-friendly version of the path metric calculation for Rate-1 nodes: we prove that it is equivalent to a version in which the decoding tree is traversed. For a more readable notation, we drop the path index l and we introduce ηi = 1 − 2βi .
A. Rate-1 Nodes The idea behind the simplification of Rate-1 nodes comes from the results presented in [6] for List-SD, that is able to decode polar codes in N time steps avoiding a complete tree search, while SCL requires 3N − 2 steps. Theorem 1. The path metric for a Rate-1 node of length 2s can be calculated as: PM2s −1 =
s 2X −1
ln 1 + e−ηi αi ,
where αi and ηi are relative to the top of the Rate-1 node tree. Proof. We prove Theorem 1 by induction. We first show that for P(2, 2), i.e. a Rate-1 polar code of length N = 2, the theorem is correct. For any polar code with N = 2 we have 1 + eα0 +α1 l , (11) α0 = ln eα0 + eα1 α0r =α1 + η0l α0 . (12)
= η1 .
(13)
Starting from (6) and then substituting (11) and (12), the path metric associated with P(2, 2) is l l r r PM1 = ln 1 + e−η0 α0 + ln 1 + e−η0 α0 ! α +α 1 1+e 0 eα0 +eα1
+ ln 1 + e−η1 (α1 +η0 η1 α0 ) α0 η0 η1 e + e α1 = ln 1 + 1 + eα0 +α1 + ln 1 + e−η1 α1 −η0 α0 ( −α −α ln (1 + e 0 ) + ln (1 + e 1 ) , when η0 η ( 1 η0 −α0 ) + ln (1 + eα1 ) , when ln (1 + e η ( 1 = η0 ln (1 + eα0 ) + ln (1 + e−α1 ) , when η ( 1 η0 α0 α1 when ln (1 + e ) + ln (1 + e ) , η1 −η0 α0 −η1 α1 = ln 1 + e + ln 1 + e ,
β1
x1
u2
β2
x2
u3
β3
x3
which is equal to (10), and thus proves the theorem for N = 2. Now suppose the theorem stands for a Rate-1 polar code of length 2s−1 . For P(2s , 2s ) we can calculate αil and αir with Equations (2) and (3) respectively. Since αil and αir are associated to two Rate-1 polar codes of length 2s−1 , for which we have supposed Theorem 1 stands, their respective path metrics can be calculated as PMl2s−1 −1
=
2s−1 X−1
l l ln 1 + e−ηi αi ,
(15)
r r ln 1 + e−ηi αi .
(16)
i=0
PMr2s−1 −1
=
2s−1 X−1
Recall that the path metric at a node is the summation of the path metrics calculated at the child nodes: we can consequently write
where η0l and η0r are obtained traversing the whole decoding tree, that in our case consists of stages s = 1 and s = 0. Therefore, Equation (12) can be re-written as
−η0 η1 ln
u1
i=0
η0l = η0 η1 ,
= ln 1 + e
x0
Fig. 3: Polar encoding
For a Rate-1 code with N=2, from (4) we can see that:
α0r = α1 + η0 η1 α0 .
β0
(10)
i=0
η0r
u0
PM2s −1 = PMl2s−1 −1 + PMr2s−1 −1 .
(17)
From Figure 3 we can clearly see the recursive construction of polar codes. For example, u0 and u1 are coded into a polar code with N = 2, constituted of β0 and β1 . At the same time, β0 and β2 are coded into another polar code with N = 2, constituted of x0 and x2 . Thus, we are allowed to pair bit i and bit i + 2s−1 at any node at stage s in the decoding tree, and consider them a polar code with N = 2. In our case, we pair bit i of (15) and (16), and identify 2s−1 Rate-1 polar codes of length two. Consequently, we can express (17) as the summation of 2s−1 instances of (14): 2s−1 X−1
ln 1 + e−ηi αi +ln 1 + e−ηi+2s−1 αi+2s−1
PM2s −1 = = =1 =1 =1 = −1 = −1 =1 = −1 = −1 (14)
i=0 s 2X −1
ln 1 + e−ηi αi ,
i=0
which is equal to (10). This means that if Theorem 1 is valid for N = 2s−1 , then it stands for 2s as well. Since we have proven it for N = 2, Theorem 1 is valid for all N . We now introduce an approximated path metric calculation that relies on the LLR values at the top of the tree, and we prove that when using the hardware-friendly Equation (5), it is equivalent to (8), that traverses the whole decoding tree. It reduces the necessary time-steps from 3N − 2 to N by only considering the values at the top of the tree.
Theorem 2. In the hardware-friendly formulation of SCL algorithm, the path metric for a Rate-1 node of length 2s can be calculated as: s
PM2s −1 =
2 −1 1 X sgn (αi ) αi − ηi αi , 2 i=0
(18)
where αi and ηi are relative to the top of the Rate-1 node tree. Proof. Let us first mention that Equation (18) is equivalent to ( PMi−1 , if ηi = sgn (αi ) , PMi = PMi−1 + |αi |, otherwise. which is an expression similar to that of (8). As with Theorem 1, we prove Theorem 2 by induction, starting from P(2, 2). According to (3) and (5), for every polar code with N = 2 we have α0l =sgn(α0 )sgn(α1 ) min(|α0 |, |α1 |),
(19)
α0r
(20)
=α1 +
η0l α0 .
theorem is proven for N = 2. Now suppose the theorem stands for a Rate-1 polar code of length N = 2s−1 . Since αil and αir are two Rate-1 polar codes of length 2s−1 , the theorem stands for them and the path metric can be calculated as
where α0l and α0r are obtained traversing the whole decoding tree, that in our case consists of stages s = 1 and s = 0. For a Rate-1 node with N = 2: sgn α0l = sgn (α0 ) sgn (α1 ) , sgn (α0r ) = sgn (α1 + η0 η1 α0 ) ( sgn(α1 ), if |α0 | ≤ |α1 |, = . η0 η1 sgn(α0 ), otherwise. From (9), substituting (19) and (20), the path metric associated with P(2, 2) would be computed as 1 PM1 = sgn α0l α0l − η0l α0l + sgn (α0r ) α0r − η0r α0r 2 1 = (sgn(α0 )sgn(α1 )sgn(α0 )sgn(α1 ) min(|α0 |, |α1 |) 2 − η0 η1 sgn(α0 )sgn(α1 ) min(|α0 |, |α1 |) + sgn(α1 + η0 η1 α0 )(α1 + η0 η1 α0 ) − η1 (α1 + η0 η1 α0 )) Now we break the problem into two cases: When |α0 | ≤ |α1 |, recalling that |α| = sgn(α)α, we have 1 PM1 = (|α0 | − η0 η1 sgn(α0 )sgn(α1 )|α0 | 2 + sgn(α1 )(α1 + η0 η1 α0 ) − η1 (α1 + η0 η1 α0 )) 1 = (sgn(α0 )α0 − η0 α0 + sgn(α1 )α1 − η1 α1 ) (21) 2 When |α0 | > |α1 |: 1 PM1 = (|α1 | − η0 η1 sgn(α0 )sgn(α1 )|α1 | 2 + η0 η1 sgn(α0 )(α1 + η0 η1 α0 ) − η1 (α1 + η0 η1 α0 )) 1 = (sgn(α0 )α0 − η0 α0 + sgn(α1 )α1 − η1 α1 ) (22) 2 Equations (21) and (22) are identical, and they are equal to Equation (18), but they have been derived from (9), so the
s−1
PMl2s−1 −1
2 −1 1 X = sgn αil αil − ηil αil , 2 i=0
(23)
s−1
PMr2s−1 −1 =
2 −1 1 X sgn (αir ) αir − ηir αir . 2 i=0
(24)
As with Theorem 1, we exploit the recursive construction of polar codes, that allows us to identify polar codes with N = 2 pairing bit i and bit i + 2s−1 in a node. Joining Equations (17) and (22)-(24) we get s
PM2s −1
2 −1 1 X sgn (αi ) αi − ηi αi . = 2 i=0
(25)
which is equal to (18). Theorem 2 is then valid for N = 2s if it stands for N = 2s−1 : since we have proven it for N = 2, it is valid for every N . B. Rate-0 Nodes The simplified formulation for Rate-0 nodes proposed in this section can be completed in at most log2 N time-steps, as opposed to the 3N − 2 required by SCL, since simplified Rate-0 nodes only need to add at most N numbers together. Theorem 3. The path metric for a Rate-0 node of length 2s can be calculated as: PM2s −1 =
s 2X −1
ln 1 + e−αi ,
(26)
i=0
where αi is the LLR value at the top of the Rate-0 node tree. Proof. Proof of Theorem 3 is very similar to that of Theorem 1. Since βi is initialized as 0 for frozen bits, in a Rate-0 code with N = 2 we have: η0l = η0r = 1, Therefore, Equation (12) can be re-written as α0r = α1 + α0 .
(27)
Starting from (6) and then substituting (3), the path metric associated with P(2, 0) is l l r r PM1 = ln 1 + e−η0 α0 + ln 1 + e−η0 α0 ! − ln
= ln 1 + e
1+eα0 +α1 eα0 +eα1
+ ln 1 + e−(α1 +α0 ) = ln 1 + e−α0 + ln 1 + e−α1 ,
(28)
which is equal to (26) and proves the theorem for N = 2. Supposing the theorem stands for a Rate-0 polar code with
N = 2s−1 , the path metrics of αil and αir which are two Rate0 polar codes of length 2s−1 can be calculated as PMl2s−1 −1
=
2s−1 X−1
ln 1 + e
−αli
,
(29)
node of length N = 2s−1 . Their path metrics are computed as PMl2s−1 −1
=
=
2s−1 X−1
ln 1 + e
−αri
.
(30)
PMr2s−1 −1
=
Identifying P(2, 0) by pairing bits as in Theorem 1, and using Equations (17) and (28)-(30), for a Rate-0 polar code of length 2s we get s 2X −1 s PM2 −1 = ln 1 + e−αi , i=0
which proves Theorem 3 is valid for N = 2s supposing it stands for N = 2s−1 . Having proven it for N = 2, Theorem 3 is valid for all N . C. Rep Nodes As for Rate-0 nodes, the simplified Rep node decoding can be completed in at most log2 N time steps instead of 3N − 2, since simplified Rep nodes only need to add at most N numbers together. Theorem 4. The path metric for a Rep node of length 2s can be calculated as: PM2s −1 =
ln 1 + e−η2s −1 αi ,
(31)
i=0
where αi is relative to the top of the Rep node tree and η2s −1 is relative to the information bit in the Rep node tree. Proof. Proof of Theorem 4 follows that of Theorem 1. For a Rep code we have: η0r = η1 = η0 , Therefore, Equation (12) can be re-written as α0r = α1 + α0 .
(32)
From (6) and (3), the path metric associated with P(2, 1) is l l r r PM1 = ln 1 + e−η0 α0 + ln 1 + e−η0 α0 ! − ln
2s−1 X−1
r ln 1 + e−η2s −1 αi .
(35)
Again by pairing bits, we can identify P(2, 1). Joining (17) and (33)-(35), for a Rep node of length N = 2s we obtain PM2s −1 =
s 2X −1
ln 1 + e−η2s −1 αi ,
i=0
which, as in the previous theorems, by induction proves Theorem 4 for all N . IV. C ONCLUSION In this paper, we have developed simplified tree pruning techniques for the SCL decoding algorithm for polar codes. Three different component codes have been identified and we proved that these simplifications do not change the course of SCL and that they are an exact reformulation of the conventional algorithm. As opposed as the approximations in [9], they are general and valid for any polar code. While in the conventional SCL algorithm these nodes can be decoded in 3N −2 time-steps, the simplified Rate-0 and Rep nodes can be decoded in at most log2 N , and simplified Rate-1 nodes can be decoded in N time-steps. Thus, the proposed technique significantly reduces the time complexity of SCL without introducing any approximation. For example, a P(2048, 1024) code optimized for Eb /N0 = 2 dB can be decoded in 6142 time-steps with the conventional SCL, while the simplified SCL only needs 1205 time-steps to decode the same code. R EFERENCES
η0l = η0 η1 = 1,
= ln 1 + e
(34)
i=0
i=0
s 2X −1
l ln 1 + e−αi ,
i=0
i=0
PMr2s−1 −1
2s−1 X−1
1+eα0 +α1 eα0 +eα1
+ ln 1 + e−η1 (α1 +α0 ) ( ln (1 + e−α0 ) + ln (1 + e−α1 ) , when η1 = 1 = ln (1 + eα0 ) + ln (1 + eα1 ) , when η1 = −1 −η1 α0 −η1 α1 = ln 1 + e + ln 1 + e . (33) which is equivalent to (31) and proves the theorem for N = 2. Assuming the theorem stands for a Rep polar code with N = 2s−1 , αil represents a Rate-0 node and αir represents a Rep
[1] E. Arıkan, “Channel polarization: A method for constructing capacityachieving codes for symmetric binary-input memoryless channels,” IEEE Trans. Inf. Theory, vol. 55, no. 7, pp. 3051–3073, July 2009. [2] C. Leroux, A. Raymond, G. Sarkis, and W. Gross, “A semi-parallel successive-cancellation decoder for polar codes,” IEEE Trans. Signal Process., vol. 61, no. 2, pp. 289–299, Jan 2013. [3] A. Alamdar-Yazdi and F. R. Kschischang, “A simplified successivecancellation decoder for polar codes,” IEEE Commun. Lett., vol. 15, no. 12, pp. 1378–1380, 2011. [4] G. Sarkis, P. Giard, A. Vardy, C. Thibeault, and W. Gross, “Fast polar decoders: Algorithm and implementation,” IEEE J. Sel. Areas Commun., vol. 32, no. 5, pp. 946–957, May 2014. [5] S. Kahraman and M. C ¸ elebi, “Code based efficient maximum-likelihood decoding of short polar codes,” in IEEE Int. Symp. on Inform. Theory, July 2012, pp. 1967–1971. [6] S. A. Hashemi, C. Condo, and W. J. Gross, “List sphere decoding of polar codes,” in Asilomar Conf. on Signals, Syst. and Comput., Nov 2015, To appear. [7] I. Tal and A. Vardy, “List decoding of polar codes,” IEEE Trans. Inf. Theory, vol. 61, no. 5, pp. 2213–2226, May 2015. [8] A. Balatsoukas-Stimming, M. Bastani Parizi, and A. Burg, “LLR-based successive cancellation list decoding of polar codes,” IEEE Trans. Signal Process., vol. 63, no. 19, pp. 5165–5179, Oct 2015. [9] G. Sarkis, P. Giard, A. Vardy, C. Thibeault, and W. J. Gross, “Fast list decoders for polar codes,” CoRR, vol. abs/1505.01466, 2015. [Online]. Available: http://arxiv.org/abs/1505.01466