arXiv:2610.32807cs.ITOct 2026

Manuscript Offprint

arXiv:2610.32807

Beam Search for Error-Correcting Codes via Conditional Diffusion

Ziv Aharoni, Henry D. Pfister

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

We introduce a diffusion framework for neural decoding of error-correcting codes (ECCs). We interpret decoding as a conditional diffusion process that progressively predicts codeword bits while treating the physical channel observation as fixed side information. At each stage, a neural model estimates bitwise posteriors conditioned on the physical observation and the current noisy state of the codeword. We focus particularly on masked diffusion, for which the reverse process naturally induces a Maxwell beam search (MBS) procedure inspired by the Maxwell construction of Measson et al. Rather than committing to a single uncertain decision, the decoder maintains multiple candidate trajectories, removes parity-infeasible candidates, and ranks the remaining candidates using accumulated reverse-transition log-probabilities. We evaluate the framework across multiple code families on binary phase-shift keying (BPSK) over additive white Gaussian noise (AWGN). Experiments show competitive decoding performance across Polar, low-density parity-check (LDPC), and Bose–Chaudhuri–Hocquenghem (BCH) codes. The MBS decoder consistently improves upon the corresponding single-trajectory diffusion decoder and, in all evaluated settings, improves upon available neural decoding results.

1 INTRODUCTION

Reliable communication requires recovering transmitted information from noisy channel observations with low error and acceptable decoding latency. For a uniform prior over codewords, the optimal decision under frame-error loss is maximum-likelihood (ML) decoding. It is well-known that finding an ML codeword for a general linear code is NP-hard (Berlekamp et al., 1978). To avoid the cost of exact ML computation, practical decoders exploit the structure of specific code families. For low-density parity-check (LDPC) codes, belief propagation (BP) passes messages on a sparse factor graph and the min-sum approximation simplifies the message updates (Kschischang et al., 2001; Fossorier et al., 1999). This complexity reduction comes with tradeoffs: BP loses accuracy on graphs with cycles, and min-sum introduces additional approximation error (Yedidia et al., 2005; Fossorier et al., 1999). One way to mitigate the limitations of BP on graphs with cycles is to train a neural network to learn message updates from data. Indeed, on selected codes, learned decoders improve classical message-passing performance (Nachmani et al., 2016; Nachmani & Wolf, 2021; Park et al., 2025).

Despite the success of BP-based neural decoders for sparse graph codes, polar codes are commonly decoded using a successive cancellation (SC) decoder, which decides codeword bits sequentially (Arikan, 2009). An incorrect early decision cannot be revisited, which yields suboptimal performance. Successive-cancellation list (SCL) decoding (Tal & Vardy, 2015) addresses this limitation by branching at bit decisions, retaining multiple candidate paths, and selecting a codeword only after all bits have been processed using a metric that corresponds to their likelihood. This guessing mechanism turns the suboptimal SC decoder into a competitive decoder. For polar codes, SCL decoding outperforms neural decoding methods, particularly as the block length increases. Its main drawback

Code in https://github.com/zivaharoni/conditional-diffusion-ecc

Figure

Figure 1: Comparison of −ln⁡(BER)-\ln(\text{BER}) on Polar(64, 32) at 4 dB; higher is better. MBS uses beam size 64. Order-3 ordered-statistics decoding (OSD-3) approximates ML decoding. Details are given in Appendix D.4.

Figure

Figure 2: Conditional masking-diffusion decoding. The observation R remains fixed while an auxiliary process masks X; the decoder reverses masking to estimate X^\widehat{X}.

is the sequential dependence inherited from SC, which limits parallelism and can increase latency 1^{1}. The benefits of list decoding for SC decoding for polar codes thus lead to the central question of this paper: Can we devise a principled guessing mechanism that improves neural decoders by spending additional computation in parallel across candidates, rather than in additional sequential steps?

Diffusion-based decoders provide a natural starting point, having shown competitive error-correction performance through iterative denoising and score-based inference (Choukroun & Wolf, 2023; Helvits & Nachmani, 2026). We first model the decoder as a conditional diffusion process based on conservation laws developed for coding (Méasson, 2006) and extended to diffusion under model mismatch (Aharoni & Pfister, 2026). In our formulation, the physical-channel observation remains fixed as side information while a separate auxiliary process corrupts the codeword with a broad class of memoryless auxiliary noise processes. The decoder then follows the reverse of this auxiliary process to recover the codeword having the physical observation as a fixed condition, as illustrated in Figure 2. Formally, this process should generate a sample from the posterior distribution of transmitted codeword given the physical observation. In typical communication scenarios, the posterior is often sharply concentrated on a single codeword and thus approximates a point mass. In this regime, sampling from the posterior is approximately equivalent to selecting its argmax. For the purpose of developing a beam decoder, we choose masking noise as the auxiliary process, even though the conservation laws in (Méasson, 2006; Aharoni & Pfister, 2026) accommodate a broad class of memoryless auxiliary noise processes.

Having established the conditional diffusion framework, we then augment the masking-diffusion decoder with guessing, inspired by the Maxwell construction of Méasson et al. (2008). Specifically, at every reverse decision, the decoder branches on multiple bit assignments and scores each path using the log probabilities of the reverse transitions along that path. When the number of paths exceeds the beam size, the decoder prunes the least likely paths based on the accumulated reverse-transition log probabilities. Upon termination, the decoder selects the most likely codeword among the completed candidates in the beam.

Our experiments across several code families on BPSK-AWGN show that MBS improves on the corresponding single-trajectory conditional diffusion decoder and achieves the best decoding performance among the compared neural decoders in all evaluated scenarios. Figure 1 compares our methods with classical and neural decoders for Polar(64, 32) at 4 dB.

1^{1}List paths can be processed in parallel, but the bit decisions along each SC path depend on earlier decisions.

References (44)