DynamicSCFlip Decoding of Polar Codes
Abstract
This paper proposes a generalization of the recently introduced Successive Cancellation Flip (SCFlip) decoding of polar codes, characterized by a number of extra decoding attempts, where one or several positions are flipped from the standard Successive Cancellation (SC) decoding. To make such an approach effective, we first introduce the concept of higherorder bitflips, and propose a new metric to determine the bitflips that are more likely to correct the trajectory of the SC decoding. We then propose a generalized SCFlip decoding algorithm, referred to as DynamicSCFlip (DSCFlip), which dynamically builds a list of candidate bitflips, while guaranteeing that extra decoding attempts are performed by decreasing probability of success. Simulation results show that DSCFlip is an effective alternative to SCList decoding of polar codes, by providing very good error correcting performance, with an average computation complexity close to the one of the SC decoder.
ptptptptptptptptptptptptptptptptptptptptptptptptptptptptptptptptptptptptptptptpt
DynamicSCFlip Decoding of Polar Codes
L. Chandesris^{†}^{‡}, V. Savin^{†}, D. Declercq^{‡}
ludovic.chandesris@cea.fr, valentin.savin@cea.fr, declercq@ensea.fr
^{†}CEALETI / Minatec, Grenoble, France
^{‡}ETIS, ENSEA/UCP/CNRS, CergyPontoise, France
Index Terms
Polar Codes, successive cancellation decoding, order statistic decoding, SCFlip decoding
I Introduction
Polar codes are a recently discovered family of error correcting codes [1], known to achieve the capacity of any binaryinput memoryless outputsymmetric channel. Their construction relies on a specific recursive encoding procedure that synthesizes a set of virtual channels from instances of the transmission channel, where denotes the codelength. The recursive encoding procedure is reversed at the receiver end, by applying a Successive Cancellation (SC) decoder. The asymptotic effectiveness of the SC decoder derives from the fact that the synthesized channels tend to become either noiseless or completely noisy, as the codelength goes to infinity, phenomenon which is known as “channel polarization”. However, for short to moderate codelengths the incomplete polarization of the virtual channels may drastically penalize the error correction performance of the SC decoder. The main approaches proposed in the literature to address this issue rely on either modified kernels for the recursive encoding procedure, aimed at increasing the rate of polarization [2, 3], or enhanced versions of the SC decoder [4, 5, 6], aimed at increasing its ability to deal with incompletely polarized channels.
The SCList (SCL) decoder proposed in [4] significantly improves the error correction performance for short to moderate block lengths, and is also known to approach the MaximumLikelihood (ML) decoding performance at high Signal to Noise Ratio (SNR). Moreover, to advantageously exploit the potential of SCL decoding, especially when the size of the decoded list is large, the concatenation of an outer Cyclic Redundancy Check (CRC) code has also been proposed in [4], to help identifying the correct message within the decoded list. Concatenated CRCPolar codes under under SCL decoding is the best polarcoding system proposed so far, and has been shown to compete with other families of modern error correcting codes, such as Low Density Parity Check (LDPC) and Turbo codes. However, SCL decoder suffers from high storage and computational complexity, which grows linearly with the size of the list. Several improvements have been proposed to reduce its computational complexity, such as SCStack decoding (SCS) [6], but at a cost of an increasing storage complexity.
A different approach has been proposed with SCFlip (SCFlip) decoder, introduced in [7] for the BEC channel, and later generalized to concatenated CRCPolar codes over the BinaryInput Additive White Gaussian Noise (BIAWGN) channel in [5]. The concept of SCFLip decoding is related to the ordered statistics decoding proposed in [8], whose applicability to decoding short Polar and concatenated CRCPolar codes has been recently investigated in [9]. The principle is to allow a given number of new decoding attempts, in case that a failure of the initial SC decoding is detected by the CRC. Each new decoding attempt consists in flipping one single hard decision bit – starting with the least reliable one, according to the absolute value of the corresponding LogLikelihood Ratio (LLR) – of the initial SC decoding attempt, then decoding the subsequent positions by using the standard SC decoding. The above procedure is repeated until the CRC is verified or a predetermined maximum number of decoding attempts is reached. The SCFlip decoder provides a tunable tradeoff between decoding performance and decoding complexity, since each new decoding attempt is only performed if the previous one failed. In particular, the average computational complexity of the SCFlip decoder tends to the one of the SC decoder at medium to high SNR, while competing with the CRCaided SCL with list size , in terms of error correction performance [5].
In this work, we propose two improvements to the SCFlip decoding, based on refining and expanding some of the concepts we previously introduced in [10]. First, a new metric is proposed, aimed at determining the flipping positions that are more likely to correct the trajectory of the SCFlip decoding, i.e., those positions that, once flipped, are more likely to lead to a successful decoding attempt. The proposed metric takes into account the sequential aspect of the SC decoder, and is shown to yield an improved error correction performance and a reduced computational complexity, as compared to the conventional LLRbased metric from [5]. Secondly, we introduce a generalization of the SCFlip decoder by considering not only one single bitflip per new decoding attempt, but a number of nested bitflips. These two improvements are materialized in a Dynamic SCFlip decoder (DSCFlip), in which the flipping positions are chosen dynamically by taking into consideration all the previous attempts, so that the next attempt is guaranteed to be the one with the best probability of success according to the optimized metric. The DSCFlip decoder is shown to compete with the CRCaided SCL decoder with list size up to in terms of decoding performance, while having an average computational complexity similar to that of the standard SC decoding at medium to high SNR. Moreover, we derive lower bounds on the Word Error Rate (WER) performance of any SCFlip decoder with the number of bitflips per decoding attempt bounded by a maximum value , and show that the DSCFlip tightly approaches the WER lower bounds for .
The remainder of the paper is organized as follows. Section II provides a short background on polar codes and main SCbased decoding algorithms. Section III introduces the concept of bitflips of order , and defines the general structure of a SCFlip decoder relying on higherorder bitflips. Theoretical lower bounds on the WER performance of such a decoder are derived in Section IV. Section V presents the proposed bitflip metric, and investigates its efficiency in determining bitflips leading to successful decoding attempts. The proposed DSCFlip algorithm is finally described in Section VI, where MonteCarlo simulation results are also provided for performance evaluation and comparison with other state of the art decoding techniques.
Ii Preliminaries
Iia Polar Codes and Successive Cancellation Decoding
A Polar Code [1] is characterized by a threetuple , where is the codelength, is the number of information bits, and is a set indicating the positions of the information bits. Bits corresponding to positions are referred to as frozen bits and are fixed to predetermined values known at both the encoder and the decoder.
We denote by the data vector, of length , containing information bits at positions , and frozen bits at positions , which are assumed to be set to zero. The encoded vector, denoted by , is obtained by:
where is the generator matrix [1]. We further denote by the data received from the channel and used at the decoder input. denotes the decoder’s output, with being the hard decision estimate of the bit .
In SC decoding, each hard decision estimate depends on both and the previous estimates , and is computed according to the sign of the LLR:
(1) 
by using the hard decision function :
(2) 
where by convention with equal probability.
IiB List decoding of Polar Codes
Due to its sequential nature, early errors occurring during the SC decoding process cannot be reversed. To overcome this problem, SCL decoding [4] duplicates the SC decoding at each position in two parallel decoding threads, continuing in either possible direction. In order to avoid an exponentially growing complexity, the number of parallel decoding paths is limited to a chosen, usually small, parameter . The surviving decoding paths are determined according to a path metric, as discussed below. SCL decoder has a computational complexity growing as and a space (memory) complexity of [4]. It has also been shown to closely approach the ML decoding performance if the size of the list is large enough. Moreover, in [4] it has been observed that the SCL performance can be significantly improved, by concatenating an outer CRC code, to facilitate the identification of the correct decoding path among the list of candidates.
The SCL decoding computes a likelihood metric for each explored path, which can be alternatively expressed in the loglikelihood [4], or the loglikelihood ratio (LLR) [11] domain. In the LLR domain, the path metric is defined as follows:
Definition 1
For a path of length , the path metric is defined by:
(3) 
where
(4) 
is the loglikelihood ratio of bit given the channel output and the past trajectory of the path .
Note that the sum in Eq. (3) is taken over all , including both frozen and nonfrozen positions. However, for a frozen position the decoding path is not duplicated, thus , irrespective of the value.
Several practical simplifications, aimed at reducing the computational complexity and/or the latency of the SCL decoding, as well as hardware implementations have been also proposed in the literature [12, 13, 14]. An alternative to SCL decoding is the SCS decoding proposed in [6], aimed at reducing the computational complexity, at a cost of a small loss in the error correction performance. Instead of exploring parallel decoding paths of the same length, the SCS uses an ordered stack of depth , in which paths may have different lengths, and only the path with the largest path metric is extended. SCS decoding stops when the top path is of length . The advantage of this decoder is that it is able to limit the number of operations compared to SCL decoder, especially when SC decoder is already able to decode correctly. The worstcase complexity of the SCS decoder is , but simulations show that the actual computational complexity is much lower, especially in moderate to high SNR regime.
Iii Generalized SCFlip decoders
Let denote the serial concatenation of an outer CRC code and an inner polar code. Note that the subset contains positions, for the information bits and the CRC of bits.
The SCFlip decoder [5] consists of a standard SC decoding, possibly followed by a maximum number of new decoding attempts, until no errors are detected by the CRC check. Each new decoding consists of flipping one decision of the initial SC attempt, and decoding the subsequent positions by using the standard SC decoding. The position to be flipped is determined according to a given metric based on the LLRs obtained after the SC decoding.
In this paper, we propose a generalization of the SCFlip decoder, by allowing a more than a single bitflip for each decoding attempt. Therefore, we defined the notion of bitflip of order as follows.
Definition 2
A (bit)flip of order () is a set of indices , such that . The associated decoding attempt, denoted by SC, corresponds to the SC decoding with the hard decision function , defined in Eq. (2), replaced by , defined below:
(5) 
This decoding attempt outputs a vector , the estimation of the codeword . To simplify the notation, when no confusion is possible, will be simply denoted by .
Hence, in the Generalized SCFlip (described in Algorithm 1), the decoding attempt associated to a bitflip of order corresponds to a standard SC decision for each position, except for the the positions in , for which the decision is flipped. Note that if (bitflip of order ), the decoding attempt is exactly the same as the standard SC decoding.
The exhaustive exploration of all the bitflips of order would require a total number of decoding attempts, which is obviously too complex for a practical decoding solution. Therefore, we further equip the Generalized SCFlip decoder with a list of bitflips of order .
The Generalized SCFlip algorithm proceeds to at most decoding attempts, starting with the standard SC decoding and, followed by the decoding attempts SC(), with . The decoding process stops if:

one of the decoding attempt verifies the CRC

all bitflips from the list have been tested
The Generalized SCFlip decoder may recover the correct codeword, only if contains the unique bitflip of order that corrects the SC decoding trajectory (assuming that the initial SC decoding attempt failed). However, having the correct bitflip in does not guarantee successful decoding, since an earlier, erroneous decoding attempt might verify the CRC (undetected error), so that the decoding process stops and the following bitflips in are not tested. The probability this happens depends on both the probability of undetected error of the CRC and the position of the correct bitflip within .
In view of the previous discussion, the effectiveness of the Generalized SCFlip decoder depends directly on the way the list of tested bitflips is determined. It also appears that rather than a predetermined list, should actually depend on the current noise realization, so as to increase the probability of including the correct bitflip (i.e., correcting the SC decoding trajectory) in front positions. Moreover, the information gathered during the decoding process (e.g., LLR values computed during the initial SC decoding or the following decoding attempts) can also be used to determine those bitflips that are most likely to correct a given noise realization, and thus to dynamically update the list . To do so, the candidate bitflips have to be evaluated by a metric that estimates their likelihood to correct a given noise realization, which will be discussed in Section V.
Before discussing the optimization of such a metric and the method to dynamically generate the list of bitflips, in the next section we derive lower bounds on the WER performance of the Generalized SCFlip decoder using bitflips of order . These lower bounds will also serve as a reference for assessing the effectiveness of the proposed DSCFlip decoder in Section VI, and implicitly of the bitflip metric proposed in Section V.
Iv Word Error Rate Lower Bound for Generalized SCFlip Decoders
Iva Order of a noise realization
In the following, we shall use the expression noise realization to refer to the channel noise that corrupted the actually observed signal . We say that a noise realization is of order , if there exits a bitflip of order , such that the observed signal is corrected by the SC() decoding attempt (see Definition 2). The order of a noise realization can be efficiently computed by using the OracleAssisted SC (OASC) decoder proposed in [5]. OASC performs the same operations as the standard SC decoder, but instead of propagating the hard decision estimates of the previous decoded bits, and thus risking to propagate an erroneous decision, it is helped by an oracle to propagate the correct decisions. Hence, the oracleassisted LLR of the bit , denoted by , can be expressed as:
(6) 
and the hard decision estimate of is given by . Let and be the order (i.e. number of elements) of . Then the order of the noise realization is equal to , and the observed signal is successfully corrected by the SC() decoding.
IvB WER Lower Bound
Let SCFlip denote a Generalized SCFlip decoder (Algorithm 1) whose maximum bitflip order is equal to . Hence, using the notation from Section III, . Such a decoder successfully corrects a noise realization of order if and only if (i) the corresponding bitflip and (ii) no previous decoding attempt SC() satisfies the CRC check before SC(). We further denote by SCFlip the ideal SCFlip decoder that successfully corrects any noise realization of order less than or equal to . The ideal SCFlip decoder can be seen as an SCFlip decoder such that (i) contains all the bitflips of order less than or equal to , hence the list size is given by , and (ii) the CRC error detection is replaced by an ideal detector, which is satisfied only for the correct word.
The WER of any SCFlip is lowerbounded by the WER of the SCFlip decoder. The latter can be efficiently determined by running the OASC decoder to compute the order of the actual noise realization, then declaring a decoding failure if and only if . It is worth noticing that this lower bound, further referred to as the ideal WER of order (WER), is not necessarily achievable by the SCFlip decoder and the WER lower bound can even be better than the ML performance in some cases (an SCFlip decoder with would be able to correct any noise realization). However, for small values, the ideal WER can be closely approached by practical SCFlip decoders, provided that the CRC is reliable enough, as it will be shown in Sections VVI.
Figure 1 presents the lowerbounds of SCFlip decoders with for a CRCconcatenated polar code with parameters . For , WER corresponds to the WER of the SC decoder for a polar code of length , with information bits. Moreover, we also plot the performance of the SC decoder with , which is better than the SCFlip performance, due to the higher number of frozen bits. It can be seen that SCFlip decoders exhibit significant SNR gains compared to the SC decoder, from dB for the SCFlip1, to about dB for the SCFlip2 decoder, at WER .
IvC Impact of the codelength and codingrate on the ideal WER
This section investigates the ideal decoding performance of SCFlip decoders, for various codelengths and coding rates, and small values of . More precisely, we investigate the relation between for and , as function of the coding rate and codelength :
(7) 
The study is divided into two parts. (a) First, for a given codelength , we observe this function for different coding rates . Figure 2(a) plots , for , as a function of (assuming BIAWGN channel), for a codelength and coding rates . It can be observed that for a given value of , the depends only on and is practically independent of the coding rate . (b) Second, as shown in Fig. 2(b), a similar observation can be made if one considers a fixed coding rate , and variable codelength . Therefore, we conclude that essentially depends on , and thus Eq. (7) can be approximated to:
(8) 
Since , this analysis translates into the following interesting property: consider two polar codes and , with the same WER performance under SC decoding, at SNR and SNR, respectively. Then the noise realization orders and are expected to follow nearly the same probability distribution.
From a practical point of view, this analysis can also be used to determine different sets of code and decoder parameters that would be able to achieve a target WER performance (assuming a given SNR). Indeed, can be easily estimated, e.g., by using the density evolution technique [15, 16]. Hence, in order to achieve a target WER, for example of , the code parameters must be chosen such that for an SCFlip1 decoder, or such that for an SCFlip2 decoder. Of course, the SCFlip1 and SCFlip2 decoders under use should be able to closely approach the corresponding lower bounds, and . In the following section, we will show that these lower bounds can be indeed tightly approached by practical decoders.
V Optimized Metric for Generalized SCFlip Decoders
In order to build practical SCFlip decoders that closely approach the ideal performance of SCFlip, we first introduce an optimized bitflip metric, adapted to bitflips of any order , then we propose an efficient strategy to build the bitflips list . In this section we describe the proposed metric, while the construction of will be discussed in the next section.
Va Proposed Metric for Generalized SCFlip Decoder
The SCFlip decoder from [5] considers only bitflips of order , which are chosen according to the absolute value of the corresponding LLR. Thus, in case the initial SC decoding fails, the selected bitflips of order correspond to the positions with the lowest values. However, using the absolute value of the LLR as likelihood metric for a bitflip is suboptimal, since it does not take into account the sequential aspect of the SC decoder. Indeed, while a lower absolute value of the LLR indicates that the corresponding hard decision bit has a higher error probability, it does not provide any information about the probability of being the first error that occurred during the sequential decoding process. In other words, such a metric does not distinguish the very first error from the subsequent ones.
We propose a new metric, aimed at evaluating the likelihood of a bitflip , of order , to correct the trajectory of the SC decoding. By correcting the trajectory of the SC decoding, we mean that SC() successfully decodes all the bits with (recall that indices are assumed to be in increasing order). Note that this does not mean that the SC() decoding is successful, since there is no guarantee that it will successfully decode the subsequent bits, i.e., bits with . For instance, for corrects the trajectory of the SC decoding if and only if is the first erroneous position of the SC decoding attempt, but this does not guarantee that the SC() is successful.
For any , let be the bitflip of order determined by the first indices in . Let , denote respectively the LLR and the hard decision estimate computed by SC(), corresponding to bit . According to Definition 2, SC() and SC() are identical for positions , while for , SC() flips the hard decision estimate computed by SC(). Hence, for any , one has:
(9) 
(10) 
Let denote the probability of correcting the trajectory of SC. It follows that:
(11) 
where . By taking into account Eq. (10), the above recursion can be unfolded to the following expression:
(12) 
Note that the second product on the righthand side term of Eq. (12) is taken only over indexes , since for . Computing is an arduous task, since this probability is conditional on the fact that the previous bits have been correctly decoded by SC(). Instead, one can compute the probability , which is conditional on the previously decoded bits, irrespective of whether they have been correctly decoded or not, and is given by (this follows directly from the definition of and ):
(13) 
Hence, we propose to use as an approximation of , and we further introduce a parameter (see below) as a mean to compensate this approximation. In practice, the value of can be optimized by MonteCarlo simulation, as shown in Section VC. Using in Eq. (12), we obtain the following metric, denoted by , which will be used to approximate the probability of correcting the trajectory of SC:
Definition 3
The metric associated with a bitflip , of order , is defined by:
(14) 
Note that for a bit flip of order , the above metric can be written as:
(15) 
where are the LLR values computed by the initial SC decoding attempt. Moreover, the metric of the bitflip can be computed recursively, using the following equation:
(16) 
Indeed, by taking into account Eq. (9), it can be easily seen that the above recursion unfolds to the expression from Eq. (14).
Using the fact that , Eq. (14) can be rewritten:
(17) 
By taking the logarithm of this formula, and denoting , one gets the following equivalent metric in the logarithmic domain:
(18) 
On the basis of the above considerations, the list used within a generalized SCFlip decoder should be constituted of bitflips with the highest probabilitydomain metric , or equivalently with the lowest logarithmic domain metric , since they are the most likely to correct the trajectory of the SC decoding. For the sake of simplicity, the algorithms proposed in the next sections will be defined by using the metric , but it is worth mentioning that the logarithm domain metric is more suitable for practical implementations, due to its better numerical stability.
VB Impact of the parameter
In order to understand the impact of the parameter on the proposed metric, we start by considering two limiting cases, namely and .
For , using Eq. (17), it can be seen that , where is the number of positions in less than or equal to . Therefore, if and are two bitflips of order and , . In other words, bitflips are ordered by according to the index of their last flipped position.
For , we consider the equivalent logarithmicdomain metric defined in Eq. (18). It can be seen that , thus is the sum of reliabilities (i.e. absolute value of the LLR) of the flipped positions. In the particular case of bitflips of order , this metric is exactly the same as the one in [5].
In general, for , can be seen as a penalty added to , which takes into consideration the sequential aspect of the SC decoding, providing and intermediate and tunable solution between prioritizing bitflips according to either the index of their last flipped position or the sum of reliabilities of the flipped positions.
The value of the tradeoff parameter can be optimized by MonteCarlo simulation. It is expected that the optimal value decreases with the SNR. Indeed, considering Eq. (18) for a fixed value, and taking the limit as the SNR goes to infinity, the term tends to and becomes negligible compared to , and therefore the sequential characteristic of the decoder is no longer accounted for by the considered metric. Consequently, it is expected that the optimal value of will decrease with the SNR, so that to rebalance the contribution of the term to the value of the considered metric. This is confirmed by the MonteCarlo simulations presented in section VC.
Finally, it is worth underlining the strong similarity between the derived bitflip metric and the path metric used by the SCL decoder (Eq. (3)). However, unlike the SCL path metric, frozen bits do not contribute to our proposed bitflip metric.
VC Optimization of the parameter
This section investigates the optimization of the parameter, so that to increase the probability that the bitflip is ranked high by the metric , where is bitflip correcting the SC decoding trajectory, for the the current noise realization (see Section IVA).
Let denote the list of all the bitflips , of any order , ordered according to decreasing values of . Note that the bitflips ordering depends on both the value of and the current noise realization . We denote by the rank (position) of within the ordered list . Let , where is the order of . Using the recursion from Eq. (16), it follows that:
(19) 
and therefore:
(20) 
Finally, we define the optimal value, denote by , as:
(21) 
where denotes the expected value of the random variable , assuming that (i.e., SC fails to decode the current noise realization ).
We have determined the value by MonteCarlo simulation, for various code parameters and SNR values. For each pair and SNR value, we also determined the corresponding WER value, i.e., the WER of the SC decoder for a polar code with parameters , as explained in Section IVB. Precisely, we have considered parameters , while the SNR values have been chosen such that varies from to . Fig. 3(a) shows the scatter plot of as a function of WER, while Fig. 3(b) shows the scatter plot of as a function of WER.
Fig. 3(a) clearly indicates a correlation between and WER values. Hence, we propose to approximate the value, by using a quadratic model (in semilog scale):
(22) 
with the following coefficients providing the best fit to the simulation data:
It is worth noticing that the band of the scatter plot in Fig. 3(b) is very narrow, therefore approximating by should result in a negligible difference in terms of rank expectation. Fig. 3(b) also demonstrates the effectiveness of the proposed metric in ranking in top positions the bitflips .
Finally, we describe below an efficient algorithm to compute . For this, one needs to determine the number of bitflips , such that .
Let , where . To determine , we proceed as follows:

First, we evaluate for all the bitflips of order , and add to those bitflips such that .

For , we evaluate for all the bitflips of order , such that , where denotes the bitflip determined by the first elements of . We add to the bitflips of order , such that .

The algorithm stops if, at the previous step, no bitflip of order is added to .
Clearly, is equal to the number of bitflips in , for .
Vi Dynamic SCFlip Decoder
Via DSCFlip and DSCFlip Decoders
In this section we introduce a generalized SCFlip decoding algorithm, characterized in that the bitflip list contains the bitflips with highest values, according to the current noise realization . In order to avoid the evaluation of for all possible bitflips , the proposed algorithm builds the list onthefly, concurrently with the initial SC decoding attempt, and then with each new decoding attempt SC.
The proposed algorithm, referred to as Dynamic SCFlip (DSCFlip), is described in Algorithm 2. The description is similar to the one in Algorithm 1, except of the functions and , used to initialize and update the list of bitflips and the list of corresponding metric values .
: this function evaluates for all the bitflips of order , , , and orders them according to decreasing value of . is initialized with the bitflips of order with highest metric values, and the ordered metric values are stored in . Note that the values computed at this step make use of the LLR values computed during the initial SC decoding attempt (see Eq. (15)).
: After each unsuccessful decoding attempt , and are updated, as described in Algorithm 3. Let , where is the order of . The function evaluates , for all the all the bitflips , where and . In case that , and are updated by inserting and into appropriate positions. Since , is necessarily inserted into a position . Note that the values computed at this step make use of the LLR values computed during the SC() decoding attempt (see Eq. (16)). We also note that the initialization of and can also result from the update procedure of Algorithm 3, by taking .
We now substantiate the ability of the DSCFlip decoder to explore the bitflips with highest metric values. We denote by