Manuscript Offprint
arXiv:2611.06874Learning to Decode Linear Codes with Generalized Belief Propagation Network
Samira Malek, Pennsylvania State University, Graduate Student Member, IEEE
Abstract—Error correcting codes are a fundamental component of communication systems, enabling reliable data transmission over noisy channels. Recently, neural decoders have demonstrated notable performance gains over classical iterative algorithms. In this paper, we propose a Generalized Belief Propagation Network (GBPNet) that preserves symmetry conditions while enhancing its learning capability. The resulting architecture implicitly gives rise to fully connected transformations via the generalized variable-node updates across iterations, alongside learned element-wise scaling operation that enhance decoding performance, while retaining the Tanner graph structure. In addition, we introduce two effective training strategies—progressive training and high-SNR training—that significantly improve decoding accuracy. Experimental results on various linear codes show that the proposed GBPNet consistently outperforms conventional BP and state-of-the-art neural decoding.
I. INTRODUCTION
Error correcting codes play a fundamental role in reliable communication over noisy channels. Recently, deep learning-based decoders have shown promising performance, sometimes surpassing traditional decoding algorithms. Early approaches formulated decoding as a classification problem, where each codeword corresponds to a distinct class. However, because the number of codewords grows exponentially with the code length, the resulting classification task becomes computationally intractable for long codes. Consequently, such methods are generally limited to short codes [1], [2].
A syndrome-based deep learning framework was introduced in [3], enabling training with a single reference codeword while maintaining identical performance across all codewords. Building on this idea, subsequent works employed more expressive architectures, including Transformers [4], [5] and graph-attention networks [6]. However, these methods transform the received sequence into a syndrome-based representation and treat decoding primarily as an error-pattern prediction task, without explicitly exploiting the probabilistic dependencies and iterative message-passing structure of the Tanner graph.
Nachmani et al. [7] proposed a neural belief propagation (BP) decoder by unfolding BP iterations into a deep neural network. The method can be trained using only the all-zero codeword while explicitly exploiting the Tanner graph and iterative message-passing structure. Building on this framework, several BP-based neural decoders have been developed, including Hyper-Graph Network decoders [8], Tensor-Ring Neural BP decoders [9], and Adaptive Learned BP decoders [10], [11], which improve decoding performance through learnable message-update parameters.
Despite their success, existing BP-based neural decoders primarily rely on conventional BP. In contrast, GBPNet introduces generalized variable-node update rules that implicitly realize small fully connected blocks within the BP framework, together with learned scaling messages operation that enables richer message interactions across decoding iterations while preserving the Tanner graph structure. Furthermore, progressive training and high-SNR training strategies are developed to improve decoding performance. The symmetry condition is also proven to be preserved, enabling codeword-independent training. Experimental results on multiple linear codes demonstrate that GBPNet consistently outperforms conventional BP and state-of-the-art deep methods.
The remainder of this paper is organized as follows. After reviewing BP-based neural decoders in Section II, the generalized BP framework and the GBPNet architecture are presented in Section III. The symmetry condition of GBPNet is established in Section IV, showing that training on the all-zero codeword yields identical performance for all codewords. Experimental results and comparisons with state-of-the-art methods are provided in Section V. Finally, conclusions are drawn in Section VI.
A DNN form of BP was proposed in [7], which preserves the BP message-passing structure while introducing trainable weights into the variable-node updates. The variable-to-check message at iteration is
where denotes the set of check nodes connected to variable node , and for . The check-node update remains identical to conventional BP:
where is the set of variable nodes connected to check node . After iterations, the posterior LLR estimate is computed using Eq. (4). The parameters , and are
corresponding author: Samira Malek, Email: sxm6547@psu.edu, address: 201 Old Main, University Park, PA 16802.
learned during training, while setting them all to one recovers the classical BP algorithm.
III. GENERALIZED BELIEF PROPAGATION NETWORK
We generalize the belief propagation network [7] by replacing the one variable-layer in each decoding iteration with K cascaded variable sublayers, where . Let
denote the intermediate states across the variable-side transformation. For each edge , define
as the message produced by the k-th variable sublayer at iteration l. For l = 0, we have:
For notational consistency, we set
For , the first variable sublayer is given by
and for ,
We further incorporate a learnable scaling layer after the last variable sublayer. Let denote the vector obtained by stacking all messages together with the channel messages . Let denote the element-wise scaling vector at iteration l.
where denotes the Hadamard product. Denote by and the corresponding components of . These reweighted messages are aggregated at the variable nodes as
\begin{aligned}\hat{m}_{v^{(K-1)},v^{(K)},c}^{(l)}&=\tanh\left(\frac{1}{2}\Big(\tilde{m}_{v}^{\mathrm{ch}}\right.\\&\left.+\sum_{c^{\prime}\in C_{v}\backslash\{c\}}\tilde{m}_{v^{(K-1)},v^{(K)},c^{\prime}}^{(l)}\right)\right)\end{aligned} \tag{13}
Fig. 1. Tanner graph with variable nodes and check nodes .

Fig. 2. Architecture of one GBPNet iteration for the Tanner graph in Fig. 1, comprising three cascaded variable sublayers with five fully connected blocks, followed by a learned element-wise scaling operation layer, message recombination, and a check-node update.
The check-layer is then computed as
Fig. 2 illustrates one iteration of GBPNet for the Tanner graph presented in Fig. 1. The variable-node update is expanded into three cascaded sublayers composed of five small fully connected blocks, followed by a learned message-scaling layer and message recombination before the check-node update. The number of trainable parameters for the scaling layer is (the number of edges in the Tanner graph), and for each variable sublayer, it is , where is the degree of the -th variable node. Therefore, each layer has learnable parameters.
IV. SYMMETERY CONDITION
For block codes, standard message-passing symmetry conditions ensure codeword independent decoding error probability, allowing training on noisy realizations of a single codeword without loss of generality. This section establishes that the proposed generalized decoder preserves these conditions.
At iteration l, the variable-side computation consists of K cascaded variable sublayers, followed by a scaling layer and a recombination layer. We represent this entire block by a single effective variable-node mapping
(15) where denotes the final message passed from variable node v to check node c at iteration l, while the effect of cascaded variable sublayers will be considered in Lemma 1. The check-node update is then given by
We next prove that satisfies the variable-node symmetry condition and that the check-node update satisfies the check-node symmetry condition. As shown in [8], [12], these two conditions are sufficient to ensure that the decoding error probability is independent of the transmitted codeword.
Lemma 1. The effective variable-node mapping is odd and satisfies the variable-node symmetry condition:
Proof. Let
denote the cascaded variable sublayers, let denote the scaling block, and let denote the recombination layer. Then the overall variable-side mapping can be written as
For the variable sublayers in (10), (11), and recombination layer (13), Since there is no bias term, replacing and all incoming messages by their negatives changes the argument of tanh by a factor of -1. Because tanh is odd, it follows that and are odd.
Next, the message scaling layer is given by
Because is a learned vector independent of ,
Therefore, the message scaling block is odd. Since the composition of odd mappings is odd, is odd. Hence,
which proves the variable-node symmetry condition.
Lemma 2. The check-node update is given by (16). Then the check-node symmetry condition holds:
for any .
Proof. Let
Then for any sign pattern ,
(23)
Since is an odd function, Eq. (24) follows, satisfying the check-node symmetry condition.
V. EXPERIMENTS
We evaluate GBPNet on BCH, Polar, LDPC, and MacKay codes, comparing its bit error rate (BER) performance with conventional BP and state-of-the-art neural decoders, as reported in Table I. The parity-check matrix of the codes were obtained from [13]. Training samples are generated by transmitting the all-zero codeword using BPSK modulation over an additive white Gaussian noise (AWGN) channel, justified by the message-passing symmetry of GBPNet. A total of training samples are used, while testing employs random codewords until at least 500 frame errors are observed at each SNR. The network is optimized using Adam with a learning rate of and a batch size of 200 using the cross-entropy multi-loss in [7].
We further investigate two complementary training strategies: high-SNR training and progressive training. For high-SNR training, samples are generated over 4–10 dB, while evaluation is performed over 1–8 dB or 1–6 dB, depending on the code. For progressive training, the network is initially trained with one decoding iteration. At each subsequent stage, a new iteration is randomly initialized, while previously trained iterations retain their learned weights. The entire network is then jointly trained for 200 epochs per stage until the target number of iterations is reached.
For all codes, the number of cascaded variable-node sublayers is fixed at . GBPNet uses at most five decoding iterations, with for BCH codes, for Polar and LDPC codes, and for the MacKay (96,48) code. For comparison, conventional BP and Hyp BP [8] use five iterations, while the best reported results are used for the state-of-the-art transformer-based decoders ECCT [5] and CrossMPT [4]. As shown in Fig. 3, GBPNet outperforms BP even with regular training, demonstrating the effectiveness of its architecture independently of the proposed training strategies. High-SNR and progressive training yield further BER improvements. Fig. 4 additionally demonstrates GBPNet's competitive decoding performance against recent methods on the MacKay (96,48) code. It also shows the effect of the number of cascaded variable-node sublayers, with GBPNet results for , where increasing progressively improves the BER which is true for other codes as well.
TABLE I QUANTITATIVE COMPARISON OF GBPNet at SNRs of 4, 5, and 6 dB. RESULTS ARE REPORTED AS (LARGER IS BETTER).
| Codes | Parameter | BP | Hyp BP [8] | ECCT [5] | CrossMPT [4] | GBPNet | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4 | 5 | 6 | 4 | 5 | 6 | 4 | 5 | 6 | 4 | 5 | 6 | 4 | 5 | 6 | ||
| BCH | (63,36) | 4.03 | 5.42 | 7.26 | 4.29 | 5.91 | 8.01 | 4.86 | 6.65 | 9.10 | 5.03 | 6.91 | 9.37 | 6.10 | 7.87 | 10.21 |
| (63,51) | 4.50 | 5.82 | 7.42 | 4.80 | 6.44 | 8.58 | 5.66 | 7.89 | 11.01 | 5.78 | 8.08 | 11.41 | 6.42 | 8.78 | 12.03 | |
| Polar | (64,32) | 4.26 | 5.38 | 6.50 | 4.59 | 6.10 | 7.69 | 6.99 | 9.44 | 12.32 | 7.50 | 9.97 | 13.31 | 8.24 | 10.42 | 13.85 |
| (64,48) | 4.74 | 5.94 | 7.42 | 4.92 | 6.44 | 8.39 | 6.36 | 8.46 | 11.09 | 6.51 | 8.70 | 11.31 | 7.43 | 9.36 | 11.94 | |
| (128,96) | 4.61 | 5.79 | 7.08 | 4.94 | 6.76 | 9.09 | 6.31 | 9.12 | 12.47 | 7.15 | 10.15 | 13.13 | 7.96 | 10.97 | 13.89 | |
| LDPC | (121,60) | 4.82 | 7.21 | 10.87 | 5.22 | 8.29 | 13.00 | 5.17 | 8.31 | 13.30 | 5.74 | 9.26 | 14.78 | 6.23 | 10.05 | 15.32 |
| (121,70) | 5.88 | 8.76 | 13.04 | 6.39 | 9.81 | 14.04 | 6.40 | 10.21 | 16.11 | 7.06 | 11.39 | 17.52 | 8.12 | 12.21 | 18.32 | |
| MacKay | (96,48) | 6.84 | 9.40 | 12.57 | 7.19 | 10.02 | 13.16 | 7.38 | 10.72 | 14.83 | 7.97 | 11.77 | 15.52 | 9.02 | 13.11 | 17.03 |

Fig. 3. Decoding performance comparison for BCH(127, 64), demonstrating that GBPNet outperforms conventional BP even with regular training, highlighting the effectiveness of its architecture, while high-SNR and progressive training provide further improvements.

Fig. 4. BER comparison of different state-of-the-art decoding methods on the MacKay (96,48) code. The figure also shows the effect of using multiple variable-node sublayers, with GBPNet results for .
VI. CONCLUSION
We proposed GBPNet, a generalized neural BP decoder incorporating cascaded variable-node sublayers and a learned
scaling messages block. We further introduced high-SNR and progressive training strategies. Experiments across various codes demonstrate improved BER performance over existing BP-based decoders. As future work, we aim to employ neural architecture search to optimize the number of variable-node sublayers in each iteration and the total number of decoding iterations.
REFERENCES
[1] J.-L. Wu, Y.-H. Tseng, and Y.-M. Huang, "Neural network decoders for linear block codes," International Journal of Computational Engineering Science, vol. 3, no. 03, pp. 235–255, 2002. [2] T. Gruber, S. Cammerer, J. Hoydis, and S. Ten Brink, "On deep learning-based channel decoding," in 2017 51st annual conference on information sciences and systems (CISS). IEEE, 2017, pp. 1–6. [3] A. Bennatan, Y. Choukroun, and P. Kisilev, "Deep learning for decoding of linear codes-a syndrome-based approach," in 2018 IEEE International Symposium on Information Theory (ISIT). IEEE, 2018, pp. 1595–1599. [4] S. J. Park, H. Y. Kwak, S. H. Kim, Y. Kim, and J. S. No, "Crossmpt: Cross-attention message-passing transformer for error correcting codes," in 13th International Conference on Learning Representations, ICLR, 2025. [5] Y. Choukroun and L. Wolf, "Error correction code transformer," Advances in Neural Information Processing Systems, vol. 35, pp. 38 695–38 705, 2022. [6] L. Qian, Y. Lu, X. Wang, W. Chen, and B. Ai, "Learning to decode: Graph attention network-gated recurrent unit as channel decoder," IEEE Wireless Communications Letters, 2026. [7] E. Nachmani, E. Marciano, L. Lugosch, W. J. Gross, D. Burshtein, and Y. Be'ery, "Deep learning methods for improved decoding of linear codes," IEEE Journal of Selected Topics in Signal Processing, vol. 12, no. 1, pp. 119–131, 2018. [8] E. Nachmani and L. Wolf, "Hyper-graph-network decoders for block codes," Advances in Neural Information Processing Systems, vol. 32, 2019. [9] Y. Liang, C.-T. Lam, Q. Wu, B. K. Ng, and S. K. Im, "Low-complexity neural belief propagation decoding algorithm based on tensor ring decomposition," IEEE Transactions on Cognitive Communications and Networking, vol. 11, no. 3, pp. 1563–1575, 2025. [10] A. Tasdighi and M. Yousefi, "Adaptive learned belief propagation for decoding error-correcting codes," Entropy, vol. 27, no. 8, p. 795, 2025. [11] S. Malek, S. Salehkaleybar, and A. Amini, "Multi variable-layer neural networks for decoding linear codes," in 2020 Iran Workshop on Communication and Information Theory (IWCIT), 2020, pp. 1–6. [12] T. Richardson and R. Urbanke, Modern coding theory. Cambridge university press, 2008. [13] M. Helmling, S. Scholl, F. Gensheimer, T. Dietz, K. Kraft, O. Griebel, S. Ruzika, and N. Wehn, "Database of Channel Codes and ML Simulation Results," www.rptu.de/channel-codes, 2025.