---
title: 'BP-OSD: Hybrid Decoding for LDPC & Quantum Codes'
url: https://www.emergentmind.com/topics/belief-propagation-ordered-statistics-decoding-bp-osd
type: topic
---

# BP-OSD: Hybrid Decoding for LDPC & Quantum Codes

Belief Propagation-Ordered Statistics Decoding (BP-OSD), also written BP+OSD, is a hybrid decoding architecture in which belief propagation (BP) supplies soft reliability information and ordered statistics decoding (OSD) uses that information as a post-processing stage to construct a syndrome-consistent candidate when BP alone is insufficient. In the literature provided here, BP-OSD appears in several closely related roles: as a classical two-stage cascade decoder for short and medium-length LDPC codes [0710.5230], as a high-performance baseline for quantum low-density parity-check (QLDPC) decoding [2312.10950], as a “gold standard” reference pipeline for QLDPC codes [2605.25777], and as a general reliability-based reprocessing strategy that can be adapted to quaternary Pauli statistics, circuit-level decoding graphs, and low-latency implementations [2305.03321].

## 1. Definition and core decoding structure

BP-OSD is a two-stage decoder. First, BP or a BP-like iterative message-passing algorithm is run on a Tanner graph or related decoding graph to produce posterior reliabilities. Second, if the iterative stage fails to produce an acceptable output, OSD uses the BP-derived reliability ordering to search among likely syndrome-consistent error patterns [0710.5230].

In the classical LDPC formulation, the decoder runs BP or enhanced min-sum iteratively, forms tentative hard decisions after each iteration, and stops immediately if all parity checks are satisfied. If decoding still fails after the maximum number of iterations \(I_m\), OSD is invoked once as a reprocessing step [0710.5230]. The same “BP first, OSD only if needed” structure is also stated for several quantum-code settings: BP-OSD is described as a post-processing method applied “when BP fails to converge” for degenerate QLDPC decoding [2312.10950], and the same failure-triggered invocation appears in the fully parallelized BP comparison paper [2507.00254].

The BP stage provides the soft information on which OSD relies. In one QLDPC formulation, decoding is performed on a Tanner graph \(=(V_c\cup V_v,E)\), with variable-node initialization
\[
\mu_i=\log\frac{1-p}{p},
\]
normalized min-sum updates
\[
m^{(t+1)}_{c \to v}=\alpha \!\!\left(\prod_{v' \in N(c)\setminus v} \mathrm{sign}\big(m^{(t)}_{v' \to c}\big)\right) \min_{v' \in N(c)\setminus v} \!\!\left| m^{(t)}_{v' \to c} \right|,
\]
\[
m^{(t+1)}_{v \to c}=\mu_i+\sum_{c' \in N(v)\setminus c} m^{(t)}_{c' \to v},
\]
and posterior log-likelihood ratio
\[
m^{(t)}_i=\mu_i+\sum_{c \in N(v_i)} m^{(t)}_{c \to v_i},
\]
followed by hard decision and termination when the syndrome is satisfied or the iteration limit is reached [2605.14170]. In that paper, BP-OSD is explicitly framed as an externally applied enhancement to such BP outputs: after BP, an ordered-statistics stage post-processes the result to search among likely error patterns [2605.14170].

A recurrent theme across the corpus is that BP-OSD is not merely “BP plus a final algebraic cleanup.” OSD uses the BP reliabilities to choose an ordered basis, identify unreliable variables, and enumerate a restricted candidate family rather than searching the entire syndrome coset [0710.5230, 2605.25777]. This suggests that the effectiveness of BP-OSD depends at least as much on the quality of the reliability ordering as on the candidate enumeration rule.

## 2. Reliability ordering and ordered-statistics reprocessing

The defining ingredient of OSD is reliability-based reprocessing. In the classical syndrome-decoding formulation for a binary \((N,K)\) LDPC code with parity-check matrix \(H\), OSD is invoked only after iterative decoding failure, the bits are permuted according to reliability, a least reliable basis (LRB) is constructed, Gaussian elimination is applied, and candidate error patterns are enumerated up to order \(p\) [0710.5230].

When BP operates in the LLR domain, the accumulated reliability of variable node \(i\) is
\[
r_i=\sum_{k=0}^{I_m}\alpha^{I_m-k}L_i^{(k)},
\]
with hard decision
\[
\hat{c}_i=
\begin{cases}
1 & \text{if } r_i>0,\\
0 & \text{if } r_i\leq 0.
\end{cases}
\]
For probability-domain BP, the generalized accumulated metric is
\[
q_i=
\begin{cases}
\sum_{k=0}^{k=I_m}\alpha^{I_m-k}P_i^{(k)}&\text{if } \hat{c}_i=1,\\
I_m+1-\sum_{k=0}^{I_m}\alpha^{I_m-k}P_i^{(k)}&\text{if } \hat{c}_i=0,
\end{cases}
\]
and for normalized or offset min-sum decoding the analogous metric is
\[
u_i=\sum_{k=0}^{I_m}\alpha^{I_m-k}U_i^{(k)}.
\]
These formulations generalize OSD beyond a single BP representation and were introduced precisely to let OSD exploit whatever soft outputs the iterative decoder provides [0710.5230].

After sorting by unreliability and performing Gaussian elimination, the classical syndrome-decoding relation is written as
\[
EH^{(2)}\hat{e}^{(2)}=E\hat{c}\Rightarrow[I \hspace{3pt} EH^{(2)}_{12}][\hat{e}^{(2)}_{11} \hspace{3pt} \hat{e}^{(2)}_{12}]' =E\hat{c}\Rightarrow\hat{e}^{(2)}_{11}=EH^{(2)}_{12}\hat{e}^{(2)}_{12}+E\hat{c},
\]
so that the error on the basis coordinates is inferred from a guessed information-set error pattern [0710.5230]. For order-\(p\) OSD, the naive candidate count is
\[
\sum_{i=0}^{p}\binom{K}{i}.
\]
Candidate selection can then use the discrepancy criterion
\[
D(y,\hat{e})=\min{\sum_{i:\hat{e}_i=1}|y_i|},
\]
or a two-stage screening method based on
\[
W_s=\sum_{i:\hat{e}_i=1}w_i,
\]
which was introduced to reduce the number of real additions without performance loss in the reported experiments [0710.5230].

In quantum-code adaptations, the same logic is retained but the reliability model is refined. One quaternary formulation represents a Pauli error as
\[
\tilde E = [\tilde E^X \mid \tilde E^Z] \in \{0,1\}^{2n},
\qquad
z = \tilde E \Lambda \tilde S^T,
\]
runs BP on the quaternary alphabet with belief vectors
\[
q_i=(q_i^I,q_i^X,q_i^Y,q_i^Z),
\]
and invokes OSD only if BP fails after \(T\) iterations [2305.03321]. The quaternary reliability statistics are
\[
\phi^X(i)=\max\{q_i^X+q_i^Y,\; q_i^I+q_i^Z\},
\qquad
\phi^Z(i)=\max\{q_i^Z+q_i^Y,\; q_i^I+q_i^X\},
\]
together with a hard reliability vector \(\ell\) in which \(\ell_i\) is the number of consecutive BP iterations for which the final hard decision at qubit \(i\) has stayed unchanged [2305.03321]. The ordering is then hierarchical:
\[
\tilde E_i^a \text{ is more reliable than } \tilde E_j^b
\]
if either
\[
\ell_i>\ell_j,
\]
or, when \(\ell_i=\ell_j\),
\[
\phi^a(i)\ge \phi^b(j), \qquad a,b\in\{X,Z\}.
\]
This preserves \(X/Z\) correlations during sorting and improves upon earlier approaches that separately treat \(X\)- and \(Z\)-components [2305.03321].

A later approximate degenerate OSD formulation reuses the same integrated hard-plus-soft reliability rule with \(\eta_i\) as the length of the last run of identical hard decisions and the same \(\phi^X(i),\phi^Z(i)\), then uses that ranking to identify highly reliable subsets and shrink the active OSD problem [2412.21118]. This suggests that, across both classical and quantum variants, the “ordered statistics” component is better understood as a reliability-driven basis construction and restricted list search than as a single fixed algorithmic recipe.

## 3. Emergence as a major benchmark in quantum LDPC decoding

Within QLDPC decoding, BP-OSD is repeatedly positioned as a principal reference point. The guided-decimation paper states that various methods have been proposed to mitigate BP non-convergence, “such as BP with ordered statistics decoding (BP-OSD) and BP with stabilizer inactivation (BP-SI),” and uses BP-OSD as the primary benchmark for evaluating the proposed BPGD algorithm [2312.10950]. The multiple-bases paper likewise presents BP-OSD as one of the main high-performance baselines in the quantum LDPC decoding landscape, alongside BP-SI and BPGD [2605.14170].

Several papers characterize BP-OSD in stronger terms. “Best-First Ordered Statistics Decoding of Quantum LDPC Codes” states that “Belief Propagation (BP) followed by Ordered Statistics Decoding (OSD) has emerged as the gold standard for decoding quantum low-density parity-check (QLDPC) codes” [2605.25777]. “Accelerating BP-OSD Decoder for QLDPC Codes with Local Syndrome-Based Preprocessing” similarly describes BP-OSD as “the state-of-the-art decoder for QLDPC codes” while emphasizing its high decoding latency [2509.01892]. By contrast, the degeneracy-cutting paper treats BP+OSD as the main high-accuracy baseline but explicitly contrasts its \(O(n^3)\) cost with local \(O(n)\)-type post-processing alternatives [2510.08695].

The role BP-OSD plays in these works is specific. It is not used as the trivial baseline of “plain BP,” but as the benchmark for the regime in which BP’s known failure modes have already been addressed by a stronger post-processing mechanism [2507.00254]. This matters because the quantum decoding problem is not merely sparse-graph inference. The provided papers repeatedly attribute BP’s difficulties to short cycles, stabilizer commutativity constraints, and degeneracy, that is, the presence of multiple syndrome-compatible error patterns with the same logical effect [2312.10950, 2605.25777].

The same benchmark role extends to realistic noise models. In the density-matrix-propagation study, BP+OSD is one of the practical heuristic decoders compared against an exact maximum-likelihood benchmark under circuit-level noise, together with MWPM, Tesseract, and Planar decoders [2606.14455]. The low-latency evolutionary decoder likewise keeps the standard BP+OSD pipeline intact and optimizes the BP pre-decoder for the full combined objective, rather than discarding OSD altogether [2512.18273].

A plausible implication is that BP-OSD occupies a methodologically distinctive position: it is strong enough that outperforming it is treated as evidence of substantive progress, yet expensive enough that many recent papers are devoted to approximating its accuracy while avoiding its latency and cubic post-processing cost.

## 4. Quantum-specific adaptations and algorithmic variants

The quantum literature in the data block does not present BP-OSD as a single canonical implementation. Instead, it records a family of variants that modify the reliability model, the candidate search, the OSD invocation policy, or the effective problem size.

One line of work refines the reliability statistics. The quaternary OSD paper introduces OSD\(_4\), where the reliability order is built from the full BP output over \(\{I,X,Y,Z\}\) and the hard-decision history, rather than from two separate binary decoders for \(X\) and \(Z\) [2305.03321]. The approximate degenerate OSD paper extends this by defining highly reliable bits through both hard reliability and a soft threshold \(\theta\), identifying a highly reliable subset \(H\), and reducing the system before OSD through Highly Reliable Subset Reduction (HRSR) [2412.21118]. If \(v\) highly reliable bits are removed, the reduced system has only \(2n-v\) binary variables [2412.21118].

Another line of work modifies the search strategy itself. In the best-first OSD paper, BP outputs LLRs
\[
\Lambda_i=\log\frac{P(e_i=0)}{P(e_i=1)},
\]
OSD-0 builds a syndrome-consistent baseline \(E_{\text{base}}\), and the candidate space is written as
\[
\{e\in \mathbb{F}_2^N : H_{\text{dec}}e=s\}
=
E_{\text{base}} \oplus \ker(H_{\text{dec}}).
\]
Conventional OSD-\(w\) and OSD-CS are criticized for exploring a pre-selected subset of candidates rather than traversing them in true likelihood order [2605.25777]. Best-First OSD (BF-OSD) instead traverses the coset using a priority queue, with generator weights
\[
w_j=\sum_{i:\,(g_j)_i=1}\Lambda_i,
\]
and candidate-search complexity
\[
\mathcal{O}(Q(N+\log Q))
\]
for query budget \(Q\) [2605.25777].

A further modification concerns when OSD is invoked. The conventional cascade runs BP until convergence and calls OSD only if BP fails [2605.25777]. BF-OSD departs from that policy and invokes OSD after a fixed, small number of BP iterations, motivated by the full circuit-level noise regime in which BP is “particularly unreliable” [2605.25777]. The evolutionary BP+OSD paper makes an analogous low-latency design choice by restricting the pre-decoder to only
\[
\overline{\ell}=5
\]
BP iterations in the main experiments and optimizing trainable BP weights directly for the combined decoder objective [2512.18273].

A different family of variants keeps OSD but tries to reduce how often or how expensively it is needed. The local syndrome-based preprocessing paper adds a front-end stage that scans raw circuit-level syndromes for local patterns and injects detected likely trivial events as hints into BP-OSD by updating the channel probability vector [2509.01892]. The convergence-prediction paper proposes pre-routing in bivariate bicycle codes using the rule
\[
\text{if } \mathrm{defect\_count} \bmod w = 0,\ \text{BP is likely to converge;} \qquad \text{if } \mathrm{defect\_count} \bmod w \neq 0,\ \text{BP is likely to fail,}
\]
so that syndromes can be routed either to BP-only decoding or to BP+OSD post-processing [2604.07995].

Taken together, these variants show that “BP-OSD” denotes a decoding paradigm rather than a unique implementation. The common invariant is the use of BP-derived soft information to drive an ordered-statistics search over syndrome-consistent candidates; the major design freedom lies in how the reliabilities are constructed, how the candidate space is traversed, and when the OSD stage is triggered.

## 5. Performance regimes, empirical results, and known failure modes

The reported performance of BP-OSD is highly code- and noise-model dependent. In classical short and medium-length LDPC codes, the original reliability-based syndrome-decoding formulation showed that cascade connection of enhanced min-sum and OSD outperforms BP alone significantly, “in terms of either performance or complexity” [0710.5230]. For a \((504,252)\) LDPC example, order-0 groups achieve about \(0.5\) dB gain at FER \(=10^{-3}\) over BP with \(I_m=20\), while order-1 and order-2 provide larger gains [0710.5230].

In quantum-code studies under depolarizing noise, quaternary BP\(_4\)+OSD\(_4\)-2 reports thresholds of about \(17.52\%\) for toric codes, \(17.68\%\) for surface codes, \(17.72\%\) for XZZX codes, and \(15.42\%\) for hexagonal planar color codes [2305.03321]. The approximate degenerate OSD paper reports similar threshold values for MBP\(_4\)+OSD\(_4\)-2 and MBP\(_4\)+ADOSD\(_4\), with rotated toric \(17.52\%\), rotated surface \(17.67\%\), XZZX twisted \(17.72\%\), \((6.6.6)\) color \(15.18\%\) to \(15.41\%\), and \((4.8.8)\) color \(14.69\%\) to \(15.09\%\) [2412.21118].

At the same time, several papers document regimes in which BP-OSD is not dominant. The multiple-bases decoder paper reports that MBBP-LD improves upon BP-OSD across the bivariate bicycle codes \([[144,12,12]]\), \([[288,12,18]]\), and the B1 code \([[882,24,18 \le d \le 24]]\), with a \(3\)–\(24\%\) reduction in logical error rate relative to BP-OSD for \([[144,12,12]]\), up to \(49\%\) relative reduction for \([[288,12,18]]\), and gains exceeding \(91\%\) at \(p=0.04\) for the B1 code [2605.14170]. The fully parallelized BP-decoding paper claims that its speculative parallel strategy can achieve logical error rates comparable to or even better than BP-OSD on a variety of bivariate bicycle codes while offering lower latency over its parallelization [2507.00254]. The degeneracy-cutting paper reports that BP+DC approaches BP+OSD for surface codes and can outperform BP+OSD for BB codes in the reported simulations [2510.08695].

The strongest caveat arises in exact benchmarking against maximum likelihood. Under circuit-level noisy memory experiments, the density-matrix-propagation paper finds that BP+OSD is near-optimal for the repetition code, but for the triangular cellular automaton code it “deviates noticeably from ML at low physical error rates,” with the discrepancy appearing for distance 5, \(\mathcal{T}_2=[9,2,5]\), but not for distance 3, \(\mathcal{T}_1=[5,2,3]\) [2606.14455]. The paper attributes this qualitatively to temporal degeneracy, short loops, and the presence of hyperedges in the matching or Tanner graph [2606.14455].

This evidence constrains common generalizations about BP-OSD. It is not accurate to treat BP-OSD as uniformly near-optimal across all circuit-level decoding problems, nor is it accurate to treat it as obsolete. The data instead support a more technical statement: BP-OSD can be very strong in sparse-graph quantum decoding, especially under code-capacity and related models, but its ML gap can become significant when temporal correlations, degeneracy, and graph complexity become dominant [2606.14455].

## 6. Complexity, latency, and implementation tradeoffs

The central tradeoff surrounding BP-OSD is accuracy versus post-processing cost. Multiple papers state explicitly that the OSD stage introduces super-linear or cubic complexity. The multiple-bases paper contrasts its own BP-like latency with BP-OSD’s ordered-statistics stage, which scales as \(\mathcal{O}(n^3)\) in the worst case [2605.14170]. The guided-decimation paper states that order-0 BP-OSD has computational complexity \(O(n^3)\) [2312.10950]. The degeneracy-cutting paper likewise describes BP+OSD as having cubic complexity in the code size due to linear solving or Gaussian elimination [2510.08695].

The classical LDPC OSD paper gives a more granular breakdown. The OSD component has Gaussian elimination complexity on the order of \(O(N^3)\), phase-\(l\) candidate enumeration complexity on the order of \(O(N^{l+1})\) for \(1\le l\le p\), \(N\log_2 N\) real additions for sorting, and \(\beta\gamma\) real additions for discrepancy evaluation [0710.5230]. In the best-first QLDPC formulation, the costs are separated into BP cost \(\mathcal{O}(|E|)\) per iteration, OSD-0 sorting \(\mathcal{O}(N\log N)\), Gaussian elimination \(\mathcal{O}(r^2N)\), and candidate search complexity that depends on the variant: \(\mathcal{O}(2^wN)\) for OSD-\(w\), \(\mathcal{O}((k+\lambda^2)N)\) for OSD-CS, and \(\mathcal{O}(Q(N+\log Q))\) for BF-OSD [2605.25777].

Latency, however, is not determined by OSD alone. The local syndrome-preprocessing paper reports that a large portion of BP-OSD latency can originate from the iterative BP stage rather than the OSD stage, especially at low physical error rates on bivariate bicycle codes [2509.01892]. For the \([[144,12,12]]\) code at \(p=0.05\%\), the baseline averages were \(49.21\) BP iterations and \(13.94\) ms latency, while preprocessing reduced these to \(9.28\) iterations and \(1.52\) ms while maintaining the original logical error rate of BP-OSD [2509.01892]. This directly qualifies the widespread simplification that “OSD dominates runtime”: in the reported BB-code experiments, BP itself can dominate total latency in the low-noise regime [2509.01892].

The convergence-prediction paper makes the same system-level issue explicit. For the Gross code, BP-only decoding is about \(46\,\mu s\), while BP+OSD can be about \(108\,\mu s\) in code-capacity and roughly \(300\,\mu s\) under phenomenological noise, motivating methods that predict in advance when OSD is likely to be necessary [2604.07995]. At \(p=0.001\), about 65% of nontrivial syndromes have mod-3\(=0\) and essentially all of those converge under BP, so OSD can be skipped for them with no correctness loss in the reported experiments [2604.07995].

The current literature therefore treats BP-OSD as both a decoder and a systems problem. The decoder is attractive because OSD guarantees a syndrome-consistent candidate and often markedly improves BP. The systems challenge is that Gaussian elimination, candidate search, and long BP runs all contribute to latency. Recent work accordingly focuses less on replacing the BP-OSD paradigm outright than on restructuring it: improving the reliability statistics [2305.03321], reducing the effective system size [2412.21118], changing the traversal of the candidate space [2605.25777], accelerating BP with preprocessing [2509.01892], optimizing the BP pre-decoder for the full combined objective [2512.18273], or routing only selected syndromes to OSD [2604.07995].

## 7. Conceptual status and relations to neighboring decoders

BP-OSD sits in a broader family of “BP plus extra intelligence” decoders. The data repeatedly compare it to BP-SI, BPGD, speculative parallel BP post-processing, multi-basis BP list decoding, and local post-processors such as degeneracy cutting [2312.10950, 2507.00254, 2605.14170, 2510.08695]. In these comparisons, BP-OSD usually functions as the strong baseline rather than the minimal one.

Relative to BP-SI and BPGD, BP-OSD is typically described as stronger but more expensive. Guided decimation is reported to achieve performance on par with BP-OSD and BP-SI “without the need to solve systems of linear equations,” and with worst-case complexity \(O(Tn^2)\) rather than \(O(n^3)\) [2312.10950]. MBBP-LD is argued to surpass BP-OSD by exploiting structured redundant parity-check representations and parallel BP decoders instead of ordered-statistics post-processing [2605.14170]. Degeneracy cutting aims to preserve BP’s favorable local structure and linear scaling while approaching BP+OSD performance [2510.08695].

At a conceptual level, the best-first OSD paper offers a useful reframing: because multiple distinct error patterns can produce the same syndrome, OSD in the quantum setting is “inherently a list-decoding technique” [2605.25777]. That formulation clarifies why BP-OSD remains central despite its cost. It does not merely repair BP convergence failures; it converts BP’s local probabilistic information into a structured search over a degenerate syndrome coset. In quantum decoding, where exact physical error identification is neither necessary nor generally optimal, that list-decoding interpretation is particularly natural [2605.25777, 2606.14455].

A plausible implication is that the enduring importance of BP-OSD comes from this hybrid role. BP supplies scalable local inference on sparse graphical models; OSD supplies a reliability-ordered search over syndrome-consistent candidates when local inference alone is insufficient. The subsequent literature largely develops along two axes already visible in that decomposition: making the BP reliabilities more informative, and making the OSD search less costly.

Source: https://www.emergentmind.com/topics/belief-propagation-ordered-statistics-decoding-bp-osd