MaskCode: Mask Transformer for Feedback-Assisted Coding With Linear Block Codes

Jonggyu Jang, Hongjae Nam, Vishrant Tripathi, David J. Love, Hyun Jong YangarXiv 2026

TL;DR

MASKCODE is a novel Transformer-based inner feedback coding scheme that explicitly bakes the mathematical structure of an outer linear block code directly into its neural network architecture. By utilizing soft syndrome inputs and Tanner graph-derived attention masks, it eliminates the need for unstable end-to-end training while delivering up to a 1.5 dB SNR performance gain over state-of-the-art baselines.

What Problem Does This Paper Address?

In wireless communications, using a feedback loop (where the receiver sends information back to the transmitter) can exponentially reduce transmission errors. Modern high-performance systems often use a two-stage "concatenated" approach: an inner code manages the interactive feedback channel, while an outer code provides traditional open-loop error correction.

Recently, deep learning has revolutionized inner feedback codes, outperforming classical linear techniques. However, existing machine learning models suffer from a major blind spot: they are completely agnostic to the outer code's structure. They treat all bits as independent, wasting precious feedback resources on error patterns that the outer code could easily correct on its own.

Why not just train the inner and outer codes together end-to-end? Doing so requires unrolling the outer decoder's iterative algorithm (like Belief Propagation) during backpropagation. Because this algorithm relies on highly non-linear functions ($\tanh$ and $\text{arctanh}$), it triggers severe gradient explosion, making stable end-to-end training nearly impossible for deep networks.

Methods

To solve this lack of synergy without falling into the gradient explosion trap, the authors introduce MASKCODE. Instead of relying on end-to-end training to learn the outer code's constraints, MASKCODE embeds those algebraic constraints directly into the Transformer's architecture via two key mechanisms:

  1. Soft Syndrome-Based Input: The encoder calculates soft log-likelihood ratios (LLRs) from the initial feedback phase. It passes these through a soft parity-check operation to generate a "soft syndrome," explicitly flagging to the transmitter which parity constraints are likely being violated.
  2. Code-Aware Attention Mask: Standard Transformers allow every token (bit) to interact with every other token. MASKCODE replaces this with a sparse attention mask derived directly from the outer code's Tanner graph (its parity-check matrix $H$). It maps out both inter-node connectivity (variable nodes to check nodes) and intra-node connectivity (bits sharing a common check node), forcing the Transformer to only learn valid message-passing interactions.
Overall schematic diagram of the MASKCODE encoder and decoder architectures.

Additionally, at the very first transmission phase ($t=1$), MASKCODE enforces a sign-fixing constraint to preserve the BPSK mapping sign, ensuring that subsequent phases have a stable reference to compute meaningful soft syndromes.

Datasets

Because this research focuses on fundamental channel coding, the authors evaluate their method using synthetically generated data passed through simulated Additive White Gaussian Noise (AWGN) forward and feedback channels. They test MASKCODE against two classic outer linear block codes:

  • BCH(31,16) code
  • LDPC(49,24) code

Key Insights and Ideas

  • Architecture Beats Training: Hardcoding mathematical priors into the network architecture (via the attention mask) completely removes the need for end-to-end training. MASKCODE achieves its absolute best performance when trained with zero outer decoder iterations ($N_{BP} = 0$), bypassing gradient instability entirely.
  • Sparsity is an Advantage: Counterintuitively, MASKCODE performs even better on sparser codes. It achieved a 1.5 dB gain on the sparse LDPC code compared to a 1.0 dB gain on the denser BCH code. A sparser Tanner graph creates a more restrictive attention mask, forcing the Transformer to focus its representation power more efficiently.
  • Hardware Friendly: In practical deployments, feedback links have limited capacity. The authors showed that quantizing MASKCODE's feedback signal down to just 8 bits yields virtually identical performance to full 32-bit floating-point precision.

Key Results

MASKCODE was benchmarked against classical linear feedback codes (SKCode, CLCode) and prominent deep learning models (DeepCode, GBAF, AttentionCode, RobustCode).

  • Error Reduction: MASKCODE consistently achieved the lowest Bit Error Rate (BER) and Block Error Rate (BLER), demonstrating a continuous decay down to $10^{-9}$ where baseline models plateaued.
  • Gain: It delivered a 1.0 dB SNR gain for the BCH outer code and a 1.5 dB SNR gain for the LDPC outer code over the best-performing baselines.
  • Efficiency & Speed: Despite having a higher parameter count, MASKCODE achieved the lowest Multiply-Accumulate (MAC) count ($4.02 \times 10^5$) among Transformer methods and clocked a throughput of 175.44 codewords/second—making it nearly 10 times faster than AttentionCode.
Comparison of Transformer layer attention mechanisms: standard fully connected vs. MASKCODE's code-aware mask.

Limitations and Future Work

The primary limitation acknowledged in the paper is that the evaluations are restricted to relatively short block lengths (lengths of 31 and 49). As block lengths scale up to thousands of bits, the size of the attention matrix grows quadratically, which could introduce computational bottlenecks—though the inherent sparsity of the code-aware mask may help mitigate this.

Future research directions include extending this structure-aware Transformer design to non-linear codes, convolutional/Turbo codes, and evaluating performance under more volatile fading channel conditions.

Summary updated

BibTeX
@misc{jang2026maskcode,
  author = {Jonggyu Jang and Hongjae Nam and Vishrant Tripathi and David J. Love and Hyun Jong Yang},
  title = {{MaskCode: Mask Transformer for Feedback-Assisted Coding With Linear Block Codes}},
  year = {2026},
  eprint = {2609.00715},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.00715},
}
Figure