SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Hee-Youl Kwak
University of Ulsan ghy1228@gmail.com
Dae-Young Yun
Seoul National University bigbowl204@snu.ac.kr
Yongjune Kim*
POSTECH yongjune@postech.ac.kr
Sang-Hyo Kim*
Sungkyunkwan Universityiamshkim@skku.edu
Jong-Seon No
Seoul National University jsno@snu.ac.kr
Low-density parity-check (LDPC) codes have been successfully commercialized in communication systems due to their strong error correction capabilities and simple decoding process. However, the error-floor phenomenon of LDPC codes, in which the error rate stops decreasing rapidly at a certain level, presents challenges for achieving extremely low error rates and deploying LDPC codes in scenarios demanding ultra-high reliability. In this work, we propose training methods for neural min-sum (NMS) decoders to eliminate the error-floor effect. First, by leveraging the boosting learning technique of ensemble networks, we divide the decoding network into two neural decoders and train the post decoder to be specialized for uncorrected words that the first decoder fails to correct. Secondly, to address the vanishing gradient issue in training, we introduce a block-wise training schedule that locally trains a block of weights while retraining the preceding block. Lastly, we show that assigning different weights to unsatisfied check nodes effectively lowers the error-floor with a minimal number of weights. By applying these training methods to standard LDPC codes, we achieve the best error-floor performance compared to other decoding methods. The proposed NMS decoder, optimized solely through novel training methods without additional modules, can be integrated into existing LDPC decoders without incurring extra hardware costs. The source code is available at https://github.com/ghy1228/LDPC_Error_Floor.
The field of learning-based decoding for error-correcting codes began with research on training neural networks to produce the information vector when given a distorted codeword [1, 2, 3, 4]. These works assume an arbitrary neural network with no prior knowledge of decoding algorithms, and accordingly, face the challenge of learning a decoding algorithm. In contrast, model-based neural decoders are designed by mapping a well-known graph-based iterative decoding algorithm, such as belief propagation (BP) and min-sum (MS) decoding algorithms, to a neural network and then training its weights [5]. Compared to the arbitrary network approaches or the error correction transformer [6], model-based neural decoders offer the advantages of guaranteeing the performance of existing iterative algorithms and using hardware architectures [7] that are already well optimized for iterative decoding algorithms.
LDPC codes have been incorporated into WiMAX and 5G communication systems [8, 9], owing to their strong error-correcting capabilities and low decoding complexity [10, 11]. However, more advanced LDPC coding technology needs to be developed for diverse communication environments lying in the scope of future 6G systems. In particular, for environments that require extremely low frame error rate (FER) such as the next generation ultra-reliable and low-latency communications (xURLLC) [12], it is crucial to mitigate the error-floor in the decoding of LDPC codes. The error-floor phenomenon refers to an abnormal phenomenon where the FER does not decrease as rapidly as in the waterfall region [11, 13]. The error-floor phenomenon also should be addressed for systems demanding very high reliability, such as solid-state drive (SSD) storage [14], DNA storage [15], and cryptosystems [16]. However, enhancing other features of LDPC codes often inadvertently reinforces the error-floor phenomenon as a side effect. For instance, the error-floor tends to be intensified when optimizing LDPC codes for superior waterfall performance or decoding by low complexity decoders such as quantized MS decoders [17]. Therefore, research focused on alleviating the error-floor, especially when decoding LDPC codes optimized for performance with low decoding complexity, has become significant. Such advancements will broaden the applications of LDPC codes.
With this need in mind, we focus on how to train a low-complexity neural MS (NMS) decoder to prevent the error-floor in well designed LDPC codes. The main contributions of the paper are threefold as follows.
Boosting learning using uncorrected words: We first leverage the boosting learning technique [18, 19] that employs a sequential training approach for multiple classifiers, wherein subsequent classifiers concentrate on the data samples that preceding classifiers incorrectly classify. Inspired by this method, we divide the neural decoder into two cascaded neural decoders and train the first decoder to be focused on the waterfall performance, while training the second decoder to be specialized in handling the uncorrected words that are not corrected by the first decoder due to the error-floor phenomenon. Uncorrected words in the error-floor region mostly contain small-error patterns related to trapping sets or absorbing sets [11], which can be effectively corrected by weighting decoding messages. As a result, a significant performance improvement in the error-floor region is achieved by boosting learning.
Block-wise training schedule with retraining: To mitigate the error-floor, iterative decoding typically requires a large number of decoding iterations, often exceeding 50 [17, 20, 21, 22]. However, NMS decoders encompassing many iterations can undergo the vanishing gradient problem in training [23]. To address this problem, we propose a new training schedule inspired by block-wise training methods [24, 25]. The proposed block-wise training schedule divides the entire decoding iterations into sub-blocks and trains these sub-blocks in a sequential manner. Additionally, rather than fixing the weights trained from previous blocks, we retrain them to escape from local minima. As a result, the proposed schedule enables to train numerous weights for all 50 iterations successfully while outperforming both the multi-loss method [5] and the iter-by-iter schedule [26].
Weight sharing technique with dynamic weight allocation: The weight sharing technique is a way to reduce the number of trainable weights by grouping specific weights to share a common value. The waterfall performance does not severely degrade even if we bundle all weights for each iteration [27, 26]. However, our observations indicate that this does not hold true in the error-floor region, implying that a higher degree of weight diversity is necessary to correct error patterns causing the error-floor. To obtain sufficient diversity with a minimal number of weights, we dynamically assign different weights to unsatisfied check nodes (UCNs) and satisfied check nodes (SCNs) in the decoding process. By utilizing only two weight values for SCNs and UCNs each iteration, we achieve the performance of the NMS decoder using different weights for every edge. This method reduces the number of weights to be trained to only  $2.6\%$  of the original number of weights.
We employ these training methods on a range of representative LDPC codes adopted for standards such as WiMAX [8], IEEE 802.11n [28], and 5G new radio [9]. The FER point at the onset of the error-floor diminishes by over two orders of magnitude for all codes compared to conventional weighted MS (WMS) decoding [29]. Compared to existing NMS decoding approaches [27, 26], our proposed scheme exhibits a notably enhanced capability to suppress the error-floor. This scheme also achieves a similar performance as the state-of-the-art post-processing method in [22], with only a third of the iterations.
Table 1: Comparison between model-based neural decoders
Reference	Codes	Target region	Decoders	Training sample	Training schedule	Weight sharing
This work	Standard LDPC	Waterfall, Error-floor	MS	Uncorrected words	Block-wise with retraining	Spatial with UCN weights
[5]	BCH	Waterfall	BP, MS	Received words	One-shot	Temporal
[27]	Standard LDPC	Waterfall	BP, MS	Received words	Iter-by-Iter	Spatial
[30]	Short LDPC	Waterfall	BP	Absorbing set	One-shot	Temporal
[31]	Regular LDPC	Waterfall, Error-floor	FAID	Received words	One-shot	Temporal
[32]	Short LDPC	Waterfall, Error-floor	FAID	Trapping set	One-shot	Temporal
[33]	Standard LDPC	Waterfall	Layered	Received words	Iter-by-Iter	UCN weights
1.2 Related works
We compare the proposed training scheme with the existing schemes for NMS decoders in Table 1. First, all works except [31, 32] aim to improve the waterfall performance. Although the scope of the works in [31, 32] includes the error-floor performance, they assumed specific conditions of binary symmetric channels (BSC) and FAID, while we deal with the more general situation of additive white Gaussian noise (AWGN) channels and MS decoding. Regarding the training sample selection, the training samples can be received words randomly taken from the AWGN channel [5, 27, 31, 33], or codewords with erroneous trapping sets (or absorbing sets) [30, 32]. However, to use the method in [30, 32], trapping sets should be enumerated, which is only applicable to short LDPC codes and not feasible for medium to large length standard LDPC codes. In contrast, the proposed boosting method, which generates training samples through decoding with linear complexity, can be applied even to codes of several thousand lengths.
For scheduling of training, it is common to train all weights at once (One-shot training) [5] and some works sequentially train the weights corresponding to a single iteration locally [27, 33], while we train a block of iterations with retraining. In terms of the weight sharing techniques, we confirm that the proposed sharing technique using UCN weights is superior to the spatial or temporal sharing technique used in [5, 27, 30, 31, 32]. Meanwhile, a method of assigning different weights to UCNs has been introduced in [33], but they applied the same UCN weight to all CNs belonging to a proto CN when at least one CN is unsatisfied, whereas we pinpoint specific UCNs and apply weights individually.
There have been studies adding hypernetworks to the Vanilla NMS decoder [34, 35, 36] or using a transformer architecture [6] to improve the waterfall performance at the expense of increased training and decoding costs. While the proposed training techniques are broadly applicable to these augmented neural decoders, this work primarily aims to improve the error-floor performance of the Vanilla NMS decoder under practical conditions.
2.1 LDPC codes
In this paper, we consider quasi-cyclic (QC) LDPC codes, which have been adopted in various applications due to their implementation advantages [13, 37]. The Tanner graph of a QC-LDPC code, consisting of  $n = Nz$  VNs and  $m = Mz$  CNs, can be obtained by lifting the protograph, composed of  $M$  proto CNs and  $N$  proto VNs, with a lifting factor  $z$  [37, 38]. Let  $E$  be the total number of edges in the protograph. As a running example, we use the WiMAX QC-LDPC code of length  $n = 576$  and code-rate  $3/4$  with  $N = 24$ ,  $M = 6$ ,  $E = 88$ , and  $z = 24$  [8].
2.2 Neural min-sum decoding
For iteration  $\ell$ , let  $m_{c\to v}^{(\ell)}$  represent the message from CN  $c$  to VN  $v$  and let  $m_{v\to c}^{(\ell)}$  represent the message from VN  $v$  to CN  $c$ . The neighboring nodes of  $x$  are represented by  $\mathcal{N}(x)$ . The initial conditions are  $m_{v\to c}^{(0)} = m_v^{\mathrm{ch}}$ ,  $m_{c\to v}^{(0)} = 0$  for the channel LLR  $m_v^{\mathrm{ch}}$  of VN  $v$ . For  $\ell = 1,\dots ,\bar{\ell}$ , the
Figure 1: (a) The Tanner graph of an LDPC code and (b) the neural network corresponding to NMS decoding with a maximum iteration of  $\bar{\ell} = 2$ .
NMS decoding algorithm [5] updates the messages as follows
$$
m _ {v \rightarrow c} ^ {(\ell)} = \bar {w} _ {v} ^ {(\ell)} m _ {v} ^ {\mathrm {c h}} + \sum_ {c ^ {\prime} \in \mathcal {N} (v) \backslash c} m _ {c ^ {\prime} \rightarrow v} ^ {(\ell - 1)} \tag {1}
$$
$$
m _ {c \rightarrow v} ^ {(\ell)} = w _ {c \rightarrow v} ^ {(\ell)} \left(\prod_ {v ^ {\prime} \in \mathcal {N} (c) \backslash v} \operatorname {s g n} \left(m _ {v ^ {\prime} \rightarrow c} ^ {(\ell)}\right)\right) \min  _ {v ^ {\prime} \in \mathcal {N} (c) \backslash v} | m _ {v ^ {\prime} \rightarrow c} ^ {(\ell)} |, \tag {2}
$$
where  $\overline{w}_v^{(\ell)}$  and  $w_{c\to v}^{(\ell)}$  are called the VN weight and CN weight, respectively. At the last iteration  $\bar{\ell}$ , output LLRs  $m_v^{\mathrm{o}}$  are computed as  $m_v^{\mathrm{o}} = m_v^{\mathrm{ch}} + \sum_{c'\in \mathcal{N}(v)}m_{c'\to v}^{(\ell)}$ .
By quantizing  $m_{v \to c}^{(\ell)}, m_{c \to v}^{(\ell)}$ , and  $m_v^{\mathrm{ch}}$ , the quantized NMS decoding algorithm is obtained. The quantized decoders are widely used in practical applications due to its low complexity and commonly employed in existing error-floor researches [17, 20, 21, 22]. Therefore, we use it to ensure a fair comparison. Specifically, we use 5-bit uniform quantization with a maximum magnitude of 7.5 and a step size of 0.5 for the quantized NMS decoder as in [20, 21, 22].
2.3 Training weights for the NMS decoder
If all the weights in (1) and (2) are set to 1, NMS decoding is equivalent to MS decoding [39], or if VN weights  $\overline{w}_v^{(\ell)}$  are 1 and CN weights  $w_{c\to v}^{(\ell)}$  have the same value, the decoder operates as the WMS decoder [40]. The NMS decoder gains performance improvement over the WMS or MS decoder by greatly increasing the diversity of weights. However, the full diversity weights increase the training complexity and require a large amount of memory to store the weights. Therefore, previous studies used weight sharing techniques by assigning the same value to weights with the same attributes. First, since this paper deals with QC-LDPC codes, we use the protograph weight sharing technique [26] by default, assigning the same weight value to the VNs (or CNs) belonging to a proto VN (or CN). Then, the weights to be trained are represented by  $\{\overline{w}_{v_p}^{(\ell)},w_{c_p\to v_p}^{(\ell)}\}$  for a proto VN  $v_{p}$  and a proto CN  $c_{p}$ . The total number of weights is then  $(N + E)\overline{\ell}$ . If we employ spatial weight sharing in [27], only one VN weight and one CN weight remain for each iteration, and the weights are  $\{\overline{w}^{(\ell)},w^{(\ell)}\}_{\ell = 1}^{\overline{\ell}}$ , with a total number of  $2\overline{\ell}$ . On the other hand, by using temporal weight sharing [5] to eliminate differences between iterations, the weights are  $\{\overline{w}_{v_p},w_{c_p\to v_p}\}$ , and the number is  $(N + E)$ .
The neural network in Fig. 1(b) corresponds to NMS decoding of the Tanner graph in Fig. 1(a) with  $\overline{\ell} = 2$ . The input to this neural network is the channel LLR vector  $(m_1^{\mathrm{ch}},\dots,m_n^{\mathrm{ch}})$ , and the output is the output LLR vector  $(m_1^{\mathrm{o}},\dots,m_n^{\mathrm{o}})$ . For each iteration, two hidden layers are arranged, and each hidden layer has a number of nodes equal to the number of edges in the Tanner graph. In the odd hidden layers, the VN to CN message operation in (1) is performed, while in the even hidden layers, the CN to VN message operation in (2) is performed. The input layer is also connected to the odd hidden layers, which corresponds to the addition of the channel LLR in (1). The messages from the  $2\ell$ -th hidden layer to the  $(2\ell +1)$ -th hidden layer are weighted by  $w_{c\rightarrow v}^{(\ell)}$ , and the messages from the
input nodes to the  $(2\ell + 1)$ -th hidden layer are weighted by  $\overline{w}_v^{(\ell)}$ . As our goal is to reduce the FER in the error-floor region, we use the FER loss,  $\frac{1}{2}\left[1 - \operatorname{sgn}\left(\min_{1 \leq v \leq N} m_v^{\mathrm{o}}\right)\right]$  [32].
3 Proposed training method
Algorithm 1 Training method
Input:  $\bar{\ell} = \ell_{1} + \ell_{2},\mathcal{R}_{1},\mathcal{R}_{2}$
1: Base decoder training: Train the weights  $\mathbf{w}_B = \{\overline{w}^{(\ell)}, w^{(\ell)}\}_{\ell=1}^{6_1}$  with the received words sampled at  $\mathcal{R}_1$
2: Collecting the uncorrected words: Run the base decoder with the received words sampled at  $\mathcal{R}_2$  and collect the received words when the decoder fails
3: Post decoder training: Train the weights  $\mathbf{w}_P = \{\overline{w}^{(\ell)}, w^{(\ell)}, \hat{w}^{(\ell)}\}_{\ell=\ell_1+1}^{\overline{\ell}}$  with the uncorrected words and the block-wise training schedule.
Output: Trained weights  $\mathbf{w}_B, \mathbf{w}_P$
(b)
Figure 2: The proposed training method represented by (a) an algorithm and (b) a block diagram.
In this section, we introduce the proposed training methods through three subsections. The organized training algorithm is shown in Fig. 2.
3.1 Boosting learning using uncorrected words
For the boosting learning approach, we first divide the entire decoding process into two stages: the base decoding stage  $\{1,\dots ,\ell_1\}$  and the post decoding stage  $\{\ell_1 + 1,\dots ,\ell_1 + \ell_2 = \overline{\ell}\}$ . Training of base decoder follows the conventional training method: the received words sampled from  $\mathrm{E_b / N_0}$  region  $\mathcal{R}_1$  are used as training samples. Specifically, we set  $\ell_1 = 20$  and  $\mathcal{R}_1 = \{2.0,2.5,3.0,3.5,4.0\}$ , which corresponds the waterfall region of WMS decoding. We use the spatial sharing technique (i.e.,  $\mathbf{w}_B = \{\overline{w}^{(\ell)},w^{(\ell)}\}_{\ell = 1}^{\ell_1}$ ) since this achieves comparable performance to the full diversity weights in the waterfall region.
In Fig. 3(a), the base NMS decoder is compared with the MS decoder and the WMS decoder with a single weight of 0.75 for  $\overline{\ell} = 20$ . The WMS decoding performance has a severe error-floor even though its waterfall performance is better than the MS decoding performance. Compared to the MS and WMS decoders, the NMS decoder for  $\overline{\ell} = 20$  performs better over the training range  $\mathcal{R}_1$ . On the other hand, the NMS decoder performs worse than the MS decoder in the error-floor region (e.g., 4.5 dB), which is outside  $\mathcal{R}_1$ . To improve the performance in the error-floor region, a straightforward approach is extending the training range  $\mathcal{R}_1$  to include the error-floor region. However, the FER of the base decoder for received words from the error-floor region is very low, resulting in an almost negligible FER loss. Consequently, integrating the error-floor region into the training range does not impact the weight update process.
Before training the post decoder, we first collect uncorrected words that the trained base decoder fails to correct among the received words sampled from region  $\mathcal{R}_2$ . Then, the uncorrected words serve as training samples for the post decoder, which is distinct from the conventional training methods. The post decoder trains the weights  $\{\overline{w}_{v_p}^{(\ell)}, w_{c_p \to v_p}^{(\ell)}\}_{\ell = \ell_1 + 1}^{\overline{\ell}}$  with the aim of correcting the uncorrected words. After completing the training, the trained weights are used for the NMS decoding algorithm in (1)-(2). From the perspective of the NMS decoder, it performs continuous decoding up to iteration  $\overline{\ell}$  using the trained weights, but for the sake of discussion, we assume as if there are two cascaded decoders (base and post) in the perspective of training. Note that we employ the full diversity weights for the post decoder to confirm the best performance but we will introduce the shared weights  $\mathbf{w}_P$  (used in Fig. 2) in the next subsection. We also set  $l_2 = 10$ ,  $\overline{\ell} = 30$  for this experiment, and subsequently extend the maximum number of iterations in the following subsection.
To analyze the effectiveness of the proposed boosting learning, we compare the following three cases.
(b)
Figure 3: (a) Decoding performances of the MS, WMS, NMS decoders and (b) Error distributions after base and post decoding for Case 1 and Case 2.
Case 1 Uncorrected words sampled at  $4.5\mathrm{dB}$  in the error-floor region (i.e.,  $\mathcal{R}_2 = 4.5$ ).
Case 2 Uncorrected words sampled at  $3.5\mathrm{dB}$  in the waterfall region (i.e.,  $\mathcal{R}_2 = 3.5$ ).
Case 3 Received words sampled at  $4.5\mathrm{dB}$  without filtering.
Regarding Case 1 and Case 2, we collect a total of 60,000 uncorrected words, allocating 50,000 for training, 5,000 for validation, and remaining 5,000 for test. Training is conducted for 100 epochs. Fig. 3(b) shows the distribution of the number of errors after base decoding and post decoding for the test samples used in Case 1 and Case 2. For Case 1, the uncorrected words collected in the error-floor region mainly have a small number of errors since most of decoding errors are trapped in small trapping sets, so the distribution is concentrated on small numbers (see Case 1 after base decoding). For ease of use, we refer to codewords with fewer than 11 remaining errors as small-error words. The post decoder, which is mainly trained on these small-error words, corrects a significant number of small-error words (see Case 1 after post decoding). Out of the total 5,000 test samples,  $68.5\%$  of samples are corrected by the post decoder, resulting that the test FER for the test samples is 0.315. This means that, when decoding for received words of the AWGN channel, the resulting FER at  $\mathrm{E_b / N_0} = 4.5$  dB after post decoding is 0.315 times of the FER after base decoding as shown in Fig 3(a). In other words, the post decoder is successfully trained to correct small-error words inducing the error-floor.
On the other hand, Case 2, where the samples are collected from the waterfall region, has a distribution that is widespread across all areas (see Case 2 after base decoding). In addition, the distribution remains almost the same after post decoding (see Case 2 after post decoding), which means that the post decoder fails to reduce the FER sufficiently. For the test samples, the test FER at  $\mathrm{E_b / N_0} = 3.5$  dB after post decoding is 0.77 times of the FER after base decoding whose difference is not noticeable as shown in Fig 3(a). Comparing the results of the two cases, we conclude that composing mainly with small-error words facilitates the post decoder to learn to correct small-error words more effectively. As a result, Fig. 3(a) shows that Case 1 mitigates the error-floor more than Case 2. Meanwhile, for Case 3, where all received words are used as training samples without filtering, almost all of them are corrected during base decoding. Since the post stage training is mainly performed on codewords without errors, the loss function becomes almost 0. Then, the weights of the post decoder are unchanged from the initial value 1, and accordingly, the performance approaches the MS decoding performance, as shown in Fig. 3(a).
3.2 Block-wise training schedule
In the previous subsection, the number of iterations for the post decoder is set to  $\ell_2 = 10$ . To lower the error-floor further, a large number of iterations is required, so we set  $\ell_2 = 30$ ,  $\bar{\ell} = 50$ . However, deep neural decoders with a large iteration number are prone to suffer from the vanishing gradient problem. In order to tackle this issue, we propose a block-wise training schedule which is shown in Fig. 4(a). The proposed training schedule locally trains the weights corresponding to a block of  $\Delta_1$  iterations at each training stage. In the first stage, the weights belonging to the first block are trained,
Figure 4: (a): Block-wise training schedule and (b): Evolution of the test FER across iterations.
Figure 5: Illustration of the proposed weight sharing technique and comparison with other sharing techniques.