Transformer-Based Decoding in Concatenated Coding Schemes Under Synchronization Errors

Julian Streit, Franziska Weindel, Reinhard Heckel

Introduction

As the demand for long-term, high-density data storage grows, DNA has emerged as a promising medium. However, DNA storage presents a unique "synchronization" challenge. Unlike traditional electronic storage media that primarily suffer from bit-flips (substitutions), DNA data is prone to insertions and deletions (indels). These errors shift the sequence alignment, making it difficult to determine the original bit positions. To address this, engineers employ concatenated coding schemes: an inner code (such as a marker or convolutional code) provides synchronization, while an outer code (such as LDPC) corrects remaining errors.

Historically, the BCJR algorithm has been the gold standard for inner decoding. However, BCJR suffers from a "curse of dimensionality," where its computational complexity grows exponentially as it attempts to combine information from multiple noisy reads of the same DNA strand. This paper introduces BCJRFormer, a transformer-based decoder that breaks this exponential barrier, enabling efficient joint decoding of multiple reads with quadratic scaling.

Overcoming the Synchronization Challenge

The primary bottleneck in DNA data recovery is the alignment of multiple noisy copies. While having more reads of the same sequence should theoretically lower error rates, the traditional trellis-based BCJR algorithm becomes computationally infeasible beyond approximately four copies.

BCJRFormer replaces the trellis structure with a decoder-only transformer architecture. By treating multi-copy reconstruction as a sequence-to-sequence problem, the transformer naturally handles the alignment of multiple reads without requiring the massive state-space of traditional algorithms. The key innovation is a sliding window input representation that captures "drift"—the offset caused by indels—and local symbol probabilities. This allows the model to scale quadratically ($O(M^2)$) rather than exponentially ($O(\kappa^M)$) with the number of copies $M$.

Architectural Innovations

The research introduces two specialized transformer variants to handle different coding structures:

  1. BCJRFormer (Inner Decoder): Designed for marker codes, this model uses the sliding window approach to provide soft-output information to the outer decoder. It is capable of processing both binary and quaternary (A, C, G, T) symbol alphabets.
  2. ConvBCJRFormer: This extension is tailored for convolutional codes. It utilizes a novel cross-attention mechanism where attention weights are masked by the code's transposed generator matrix ($G^T$). This structural masking embeds the mathematical constraints and state-space of the convolutional code directly into the neural architecture, forcing the model to learn the specific code structure rather than just guessing patterns.

For the outer decoding stage, the authors adapt the Error Correcting Code Transformer (ECCT). Unlike traditional Belief Propagation (BP), which can struggle with cycles in the code graph, ECCT is modified to handle the "codeword-dependent" noise characteristic of the inner IDS (Insertion, Deletion, Substitution) channel.

Methodology and Training

The study utilizes dynamically generated synthetic datasets to ensure the models generalize across infinite bit-stream variations. The evaluation includes:

  • Outer Codes: (96, 48) and (204, 102) LDPC codes.
  • Inner Codes: Binary/quaternary marker codes and (2, 1, 2) convolutional codes.
  • Channel Model: A robust IDS channel simulator applying independent insertions, deletions, and substitutions.

A critical finding during training was the necessity of codeword-dependent training. In standard error correction, models can often be trained on an "all-zero" codeword. However, IDS channels are sensitive to specific bit patterns (e.g., alternating bits are harder to synchronize than uniform sequences). Training on pseudorandom sequences proved essential for the model to achieve robust synchronization performance.

Key Results

The experimental results demonstrate that transformer-based decoding is a viable and superior alternative to traditional methods in high-noise, multi-read scenarios:

  • Performance Parity: In single-sequence decoding, BCJRFormer achieves a bit error rate (BER) nearly identical to the optimal BCJR algorithm, proving that the transformer can learn the optimal decoding function.
  • Superior Scaling: BCJRFormer successfully decodes up to 10 noisy copies, a task that is computationally impossible for the joint BCJR algorithm. This allows for significantly higher data recovery rates from low-quality sequencing runs.
  • End-to-End Gains: The integrated pipeline (BCJRFormer + ECCT) outperforms the traditional combination (BCJR + BP) across most noise levels, particularly in low-probability regimes where traditional BP often fails.
  • Quaternary Support: The model maintains competitive performance when applied to quaternary symbols, making it directly applicable to the four-base alphabet of DNA.

Conclusion and Future Work

BCJRFormer represents a significant step toward practical, high-density DNA storage by solving the computational bottleneck of multi-read synchronization. While the current work relies on synthetic IDS models, it provides a foundation for future applications. The next phase of research will involve testing the methodology on real-world DNA sequencing traces, which often exhibit more complex, non-independent error patterns. Additionally, the authors aim to extend the structural masking concepts from ConvBCJRFormer to more general classes of linear codes, further broadening the applicability of transformer-based decoders in communication and storage systems.

Summary updated

BibTeX
@inproceedings{streit2025transformer,
  author = {Julian Streit and Franziska Weindel and Reinhard Heckel},
  title = {{Transformer-Based Decoding in Concatenated Coding Schemes Under Synchronization Errors}},
  booktitle = {ISIT},
  year = {2025},
}
Figure