Skip to main content
QUICK REVIEW

[Paper Review] Error Correction Code Transformer

Yoni Choukroun, Lior Wolf|arXiv (Cornell University)|Mar 27, 2022
Neural Networks and ApplicationsComputer Science19 citations
TL;DR

This paper proposes a novel Transformer-based neural decoder for linear error correction codes, leveraging high-dimensional embedding of channel outputs and a code-aware masked self-attention mechanism to model bit interactions via the parity-check matrix. It achieves state-of-the-art performance across diverse codes with significantly lower complexity than prior neural decoders, outperforming even advanced autoregressive BP methods while being trainable with minimal architecture depth.

ABSTRACT

Error correction code is a major part of the communication physical layer, ensuring the reliable transfer of data over noisy channels. Recently, neural decoders were shown to outperform classical decoding techniques. However, the existing neural approaches present strong overfitting due to the exponential training complexity, or a restrictive inductive bias due to reliance on Belief Propagation. Recently, Transformers have become methods of choice in many applications thanks to their ability to represent complex interactions between elements. In this work, we propose to extend for the first time the Transformer architecture to the soft decoding of linear codes at arbitrary block lengths. We encode each channel's output dimension to high dimension for better representation of the bits information to be processed separately. The element-wise processing allows the analysis of the channel output reliability, while the algebraic code and the interaction between the bits are inserted into the model via an adapted masked self-attention module. The proposed approach demonstrates the extreme power and flexibility of Transformers and outperforms existing state-of-the-art neural decoders by large margins at a fraction of their time complexity.

Motivation & Objective

  • To address the limitations of existing neural decoders, which suffer from high complexity or strong inductive bias due to reliance on belief propagation.
  • To enable model-free decoding of linear block codes using the flexible attention mechanism of Transformers without overfitting.
  • To incorporate algebraic code structure—specifically the parity-check matrix—into the attention mechanism via a novel masking scheme.
  • To reduce training and inference complexity while maintaining or improving decoding accuracy across diverse code families.
  • To demonstrate that a de novo-designed Transformer decoder can surpass existing neural BP-based approaches in performance and efficiency.

Proposed method

  • The input channel output is embedded into a high-dimensional space using a scaled, element-wise embedding that encodes both position and reliability of each bit.
  • A custom masked self-attention mechanism is introduced, where attention is restricted only to bit pairs connected by parity-check constraints, ensuring code structure is embedded directly into the attention pattern.
  • The masking is derived from the parity-check matrix H, so that only bits involved in the same check equation can attend to each other, enforcing domain-specific inductive bias.
  • The model uses a standard Transformer encoder architecture with feed-forward networks and residual connections, but with the attention mechanism adapted to sparse, code-specific connectivity.
  • The network is trained end-to-end on noisy versions of the zero codeword, leveraging symmetry to avoid overfitting to specific codewords.
  • The method enables efficient training and inference by exploiting the sparsity of the parity-check matrix, reducing computational complexity from O(n²) to as low as 35% of the full attention cost.

Experimental results

Research questions

  • RQ1Can a Transformer-based architecture be effectively adapted to the soft decoding of arbitrary linear block codes without relying on belief propagation?
  • RQ2How can the algebraic structure of linear codes be encoded into the attention mechanism of a Transformer to improve learning efficiency and performance?
  • RQ3Does a model-free, attention-based decoder outperform existing neural BP-based decoders in terms of both error rate and computational complexity?
  • RQ4To what extent does high-dimensional reliability embedding improve the model’s ability to detect and correct unreliable bits?
  • RQ5Can a shallow Transformer architecture achieve state-of-the-art performance across diverse code families, including BCH, LDPC, and polar codes?

Key findings

  • The proposed method outperforms the state-of-the-art autoregressive BP decoder [22] by a large margin across all tested codes, including BCH(63,36), LDPC(49,24), and Polar(64,32).
  • The model achieves a 76% reduction in training loss for BCH(63,36) and up to 69% for Polar(64,32) when using the proposed masking scheme, demonstrating faster convergence and reduced overfitting.
  • The self-attention map achieves over 80% sparsity on average, reducing the computational complexity to just 5–35% of the full O(n²) attention mechanism.
  • Even with a shallow architecture (N=6, d=64), the model achieves performance comparable to much deeper models, indicating high sample efficiency.
  • The reliability embedding enables the model to detect and correct corrupted bits early in the decoding process, as shown in attention map analysis on the Hamming(7,4) code.
  • The method is generalizable and effective across multiple code families, including short and long block lengths, without architectural re-tuning.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.