Research
A Code-Agnostic Graph Neural Network Decoder from the Detection Error Model
Overview Research area: Quantum error correction (QEC) and machine-learning decoders — specifically graph neural networks (GNNs) for decoding stabiliser codes, benchmarked against correlated minimum-w

- arXiv
- 2610.01683
- Published
- 2026-10-01
- Authors
- Federico Alberto Astolfi, Guido Pupillo
AI summary
Overview
Research area: Quantum error correction (QEC) and machine-learning decoders — specifically graph neural networks (GNNs) for decoding stabiliser codes, benchmarked against correlated minimum-weight perfect matching (MWPM) and belief propagation with ordered-statistics decoding (BP+OSD).
Technical level: Advanced. The paper assumes familiarity with stabiliser/CSS codes, detection error models, and neural message passing, though its central idea — that the noise model itself can be the decoder's only input — is stated plainly enough for a motivated non-specialist.
Scope (one sentence): The paper introduces POLYMECHANON, a GNN decoder that takes only the detection error model (DEM) of a code and noise model as input, and benchmarks it on the rotated surface code and high-rate LaCross qLDPC codes, including timing, post-selection, and cross-code generalisation tests.
What This Paper Is About
Most quantum decoders are built for one code family: MWPM for graph-like codes such as the surface code, BP+OSD for qLDPC codes, and lattice- or Tanner-graph-specific neural networks for others. The authors ask whether a single, fixed architecture can decode any stabiliser code by reading only the information an optimal decoder actually needs — the syndrome, the fault structure, and the prior probability of each fault — all of which are contained in the DEM produced by stim. Their goal is a decoder that changes only when the DEM changes, with no redesign for new codes or noise models.
Key Contributions
- A DEM-only decoder. The DEM is represented as a tripartite graph with detector (D), error-mechanism (EM), and logical-observable (L) nodes; edges encode the matrices H and L, and EM nodes carry the logit of their prior probability. Nothing in the architecture refers to a lattice, translation symmetry, stabiliser weight, or number of logical qubits.
- Code-agnostic but competitive performance. The same architecture reaches or exceeds the strongest classical baselines on two structurally different code families and two noise models: correlated MWPM on the rotated surface code and BP+OSD on LaCross qLDPC codes.
- Noise-independent decoding cost. Unlike BP+OSD, whose cost grows with the physical error rate, the decoder's cost does not depend on it — the authors frame this fixed computational graph as a candidate building block for real-time decoding on neutral-atom processors.
- Confidence-based post-selection and a shared multi-code model. The probabilistic output enables post-selection, and a single model trained on fifteen codes of different families is tested for transfer to codes seen and unseen during training.
Main Findings
- Surface code vs correlated MWPM: Under both phenomenological noise (distances d ∈ {3, 5, 7, 9}) and circuit-level noise (d ∈ {3, 5, 7}), the GNN decoder outperforms correlated MWPM, with up to 25% fewer logical failures, on identical shots and with r = d syndrome rounds.
- qLDPC vs BP+OSD: On LaCross k = 2 codes under phenomenological noise, spanning [[34,4,3]] to [[130,4,6]], the decoder matches BP+OSD on the smaller codes and surpasses it on the larger ones, reaching up to 16% fewer logical failures on [[130,4,6]]. The advantage grows with code size, starting from parity on [[34,4,3]].
- Timing: Decoding time does not depend on the physical error rate, whereas BP+OSD's grows with it. On [[130,4,6]] the effective cost per shot is of the order of a few milliseconds on a single GPU, against a few tens of milliseconds for BP+OSD on a single CPU core.
- Cross-code generalisation: One model trained across fifteen codes outperforms uncorrelated MWPM on the graph-like codes seen during training and stays within 10% of BP+OSD on the others. It tends to fail to generalise to unseen codes, particularly larger ones; neither adding more codes nor more parameters removed this limit in the authors' tests, and they note the limit is set by graph size rather than code family. They explicitly describe generalisation across graphs as an open question.
- Post-selection: Confidence-based post-selection lowers the logical error rate by more than an order of magnitude on the surface code while keeping more than 90% of the shots.
- Reported thresholds (context, from the authors' simulations): Surface code under phenomenological noise ≈ 0.041 under MWPM (consistent with the classic ≈ 0.029 independent-bit-flip value given the difference in noise convention); LaCross k = 2 ≈ 0.037 under BP+OSD, from the crossing of LER curves for d ∈ {3, 4, 5}; surface code under circuit-level noise ≈ 0.0075.
- Graph growth: The number of error-mechanism nodes and edges grows rapidly with code size and dominates the decoder's cost. For circuit-level surface code at [[81,1,9]] the DEM has 800 detectors, 14,259 error mechanisms, 1 logical observable, 46,582 edges, 15,060 nodes, and 71% of mechanisms trigger more than two detectors (hyperedges). For LaCross [[130,4,6]]: 882 detectors, 3,078 error mechanisms, 4 logical observables, 9,783 edges, 3,964 nodes, 61% hyperedges.
- Not reported: The specific GPU and CPU models used for the timing comparison, and absolute wall-clock training costs, are not reported in the provided content.
Methodology in Plain English
Each run of a quantum error-correcting experiment can be compiled by stim into a detection error model: a list of detectors (parity checks between consecutive stabiliser measurements), a list of error mechanisms with prior probabilities, and a list of logical observables. The authors turn this into a three-layer graph — detectors on one side, error mechanisms in the middle, logical observables on the other — with edges wherever a fault flips a detector or a logical observable. Every node gets a nine-dimensional feature vector computed by one fixed recipe from the DEM alone: syndrome bits, prior-probability logits, neighbour counts normalised by 4, spatial coordinates normalised to the detector bounding box, temporal role, and a few graph-derived averages. There is no code-specific engineering; some normalisations are chosen on the surface code but act as generic connectivity and parity data elsewhere.
The network embeds each node with a subtype-specific linear map (six subtypes: first-, middle- and last-round detectors; measurement- and data-error mechanisms; logical observables), then runs T iterations of residual message passing with a GRU update, applies FiLM conditioning, and reads out a logical-error probability per L node. Capacity is set by the hidden dimension F and the iteration count T, the only per-code choices. A separate model is trained per code and distance on a stream of newly sampled shots spanning the whole sub-threshold noise range, using learning rates between 5×10⁻⁵ and 5×10⁻⁴ depending on the model, with F ranging from 64 (d = 3 phenomenological) to 200 (d = 9) and T from 6 to 14.
Why This Matters
The work reframes the noise model as part of the decoder's input rather than part of its design. Since only the DEM changes, new codes and noise models can be decoded without redesigning the decoder — a step toward a single decoding stack for heterogeneous quantum hardware. The noise-independent cost and millisecond-scale per-shot times on high-rate codes are directly relevant to the real-time decoding requirement of fault-tolerant machines.
Real-world applications (as framed by the paper):
- Fault-tolerant quantum computing with the rotated surface code, the standard architecture for high-threshold, short-range-connectivity hardware.
- High-rate qLDPC codes such as LaCross on platforms with long-range connectivity, where qubit overhead is the binding constraint.
- Real-time decoding on neutral-atom processors, which the authors name as the motivating target for the fixed computational graph and noise-independent latency.
- Experimental QEC validation, where the probabilistic output allows confidence-based post-selection that removes faulty shots while retaining more than 90% of them.
Industry relevance: Decoder latency and code-agnosticism are practical deployment concerns for hardware vendors; the authors' affiliations include QPerfect SAS, and the baselines compared against (PyMatching, BP+OSD, stim) are standard tooling in the field. The result that a GNN on the DEM can undercut BP+OSD in cost on a single GPU is relevant to anyone budgeting classical control hardware for a quantum processor.
Future Directions
- Cross-code generalisation. A single model trained on fifteen codes transfers within 10% of BP+OSD to unseen codes of comparable size but degrades on larger graphs. Understanding and removing this size limit is left open, and the authors note that neither more training codes nor more parameters helped in their tests.
- Real-time deployment. The fixed computational graph and noise-independent cost make the decoder a candidate for real-time operation; an actual hardware implementation or latency budget for a live control loop is not demonstrated here.
- Wider code and noise coverage. Beyond the two families and two noise models tested, the claim that any code admitting a DEM can be decoded is stated as in-principle; code-capacity noise and experimental data are not among the regimes benchmarked.
- Post-selection at scale. The more-than-order-of-magnitude LER reduction with more than 90% of shots retained is shown on the surface code; how this trade-off behaves on high-rate qLDPC codes and in circuit-level noise is not established in the provided content.
Target Audience
Researchers and engineers working on quantum error correction and fault-tolerant architectures — particularly those building or benchmarking decoders for qLDPC codes, evaluating neural decoders against MWPM and BP+OSD, or designing classical control hardware for real-time decoding. It is also useful for readers interested in graph neural networks applied to structured probabilistic inference, since the DEM construction is a clean example of encoding a problem's structure directly into a graph rather than into an architecture.
Authors’ abstract
We present POLYMECHANON, a graph neural network (GNN) decoder for quantum error correction whose only input is the detection error model (DEM) of a quantum code under a given noise model. We represent the DEM as a tripartite graph of detectors, error mechanisms and logical observables, where every input feature is computed by using the quantum code as data rather than design choice. In this way, the same architecture decodes in principle any stabiliser code, under any noise model that can be expressed as a detection error model, once trained on the DEM. We test this approach along four directions. Firstly, on the rotated surface code the decoder outperforms correlated MWPM under both phenomenological and circuit-level noise, with up to $25\%$ fewer logical failures. Secondly, on a family of high-rate qLDPC codes it matches BP+OSD on the smaller codes and surpasses it on the larger ones, with up to $16\%$ fewer logical failures on $[\![130,4,6]\!]$. Thirdly, its decoding time does not depend on the physical error rate, whereas that of BP+OSD grows with it: on $[\![130,4,6]\!]$ its effective cost per shot is of the order of a few ms on a single GPU against a few tens of milliseconds for BP+OSD on a single CPU core, and its fixed computational graph makes it a candidate for real-time decoding on neutral-atom processors. Finally, a single model trained across codes of different families outperforms uncorrelated MWPM on the graph-like codes seen during training and stays within $10\%$ of BP+OSD on the others, while it tends to fail to generalize to unseen codes, particularly larger ones. Its probabilistic output enables confidence-based post-selection, lowering the logical error rate by more than an order of magnitude on the surface code while keeping more than $90\%$ of the shots. Since only the DEM changes, new codes and noise models can be decoded without redesigning the decoder.