Cross-Attention Message-Passing Transformers for Code-Agnostic Decoding in 6G Networks

Seong-Joon Park, Heeyoul Kwak, Sang-Hyo Kim, Yongjune Kim, Jong-Seon NoarXiv 2025 · DOI

Abstract

As 6G networks evolve, the demand for universal, efficient, and high-performance error-correction decoders grows. Traditional neural decoders often suffer from code-specificity and high computational overhead. This paper presents CrossMPT, a Transformer-based foundation model for channel decoding. By utilizing a masked cross-attention mechanism that leverages the code's parity-check matrix, CrossMPT mimics classical message-passing algorithms while maintaining the representational power of Transformers. Experimental results demonstrate that CrossMPT achieves state-of-the-art accuracy across various code types (LDPC, Polar, BCH) with significantly reduced memory and computational requirements compared to existing neural decoders.

Introduction

The transition to 6G communication systems introduces a diverse array of scenarios, from ultra-reliable low-latency communications (URLLC) to massive machine-type communications (mMTC). These scenarios utilize a variety of error-correcting codes (ECCs) like LDPC and Polar codes, each with different lengths and rates. Conventional decoders are typically hardware-specialized for specific codes. While neural decoders offer a promising alternative, most are code-specific and do not generalize well. Previous universal attempts, such as the Error Correction Code Transformer (ECCT), rely on dense self-attention, leading to prohibitive memory and computational costs for long codes.

Methods

CrossMPT introduces a sparse, code-aware architecture designed for efficiency and generalization. The core innovation lies in three areas:

1. Masked Cross-Attention

Instead of standard self-attention, CrossMPT separates input into magnitude (reliability of received bits) and syndrome (parity check results) representations. It employs two cross-attention blocks where the code's Parity-Check Matrix (PCM) serves as an attention mask. This ensures the model only processes connections defined by the code's Tanner graph, effectively implementing a learnable version of classical Message Passing (MP).

Comparison of mask matrix construction between ECCT and CrossMPT based on the parity-check matrix H.

2. Code-Agnostic Architecture (FCrossMPT)

To achieve true universality, the authors replaced position-specific embeddings with code-invariant embeddings. By using shared embeddings across all bit positions, a single model can decode codes of varying lengths and rates without retraining.

3. Ensemble Decoding (CrossED)

For challenging short codes, an ensemble of parallel CrossMPT blocks is used. Each block operates on a different cyclic shift of the PCM, providing diverse perspectives to improve error correction performance.

The CrossMPT block architecture, illustrating the magnitude and syndrome update paths through masked cross-attention.

Results

CrossMPT was evaluated on a wide variety of standard channel codes, including BCH, Polar, and LDPC. Key findings include:

  • Superior Accuracy: CrossMPT outperformed both traditional Belief Propagation (BP) and ECCT across all tested codes.
  • Efficiency Gains: The model achieved up to an 82% reduction in memory usage for long LDPC codes compared to ECCT, alongside lower inference latency and FLOPs.
  • Zero-Shot Generalization: The FCrossMPT variant demonstrated zero-shot generalization, successfully decoding unseen codes with performance near that of specialized models.
  • Ensemble Power: The CrossED ensemble significantly reduced the Bit Error Rate (BER) for BCH codes by over two orders of magnitude.

Conclusion

CrossMPT represents a significant step toward universal neural decoders for 6G. By integrating the mathematical constraints of ECCs directly into the Transformer architecture via sparse masking, it achieves a superior balance of performance and efficiency. Future work will focus on scaling to extreme code lengths and optimizing the architecture for specialized 6G hardware implementations.

Summary updated

BibTeX
@misc{park2025cross,
  author = {Seong-Joon Park and Heeyoul Kwak and Sang-Hyo Kim and Yongjune Kim and Jong-Seon No},
  title = {{Cross-Attention Message-Passing Transformers for Code-Agnostic Decoding in 6G Networks}},
  year = {2025},
  eprint = {2507.01038},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.01038},
}
Figure