---
title: Code-Weight Sphere Decoding (WSD)
url: https://www.emergentmind.com/topics/code-weight-sphere-decoding-wsd
type: topic
---

# Code-Weight Sphere Decoding (WSD)

Searching arXiv for the specified WSD papers to ground the article in the original preprints.
Code-Weight Sphere Decoding (WSD) is a two-stage near-maximum-likelihood decoding framework for binary linear block codes in the short-blocklength regime, introduced for ultra-reliable low-latency communications (URLLC) and formulated as applicable to any linear block code [2508.19631]. In its baseline form, a low-complexity decoder first generates an initial estimate and a cyclic redundancy check; if that check fails, a second stage performs an iterative localized search over candidates generated from pre-computed low-weight codewords, refining the estimate within a code-defined sphere rather than over the entire codebook [2508.19631]. A subsequent extension, multipoint code-weight sphere decoding (MP-WSD), generalizes the second stage to multiple parallel refinement trajectories, again emphasizing near-ML reliability with low average complexity and low decoding latency for short packets [2602.08501].

## 1. Formal setting and decoding objective

WSD is formulated for an \((n,k)\) binary linear block code \(\mathcal{C}\subset\mathbb{F}_2^n\) transmitted over a BPSK-modulated AWGN channel [2508.19631]. A message \(\mathbf m\in\mathbb F_2^k\), possibly CRC-precoded, is mapped by a generator matrix \(\mathbf G\) to a codeword
\[
\mathbf c = \mathbf m\,\mathbf G,\qquad \mathbf c\in\mathcal C,
\]
and BPSK modulation uses
\[
s_i = 1-2\,c_i,\quad i=1,\dots,n.
\]
The received vector is
\[
\mathbf y = \mathbf s + \mathbf n,\quad
\mathbf n\sim\mathcal{N}(\mathbf0,\sigma^2\mathbf I_n).
\]
The same system model is restated in the later MP-WSD work using notation \((N,K)\), optional CRC augmentation \(K_c\), BPSK mapping \(x(c)=1_N-2c\), and AWGN variance \(\sigma^2=N_0/2\) [2602.08501].

The relevant distance measures are the Hamming distance \(d_H(\mathbf c,\mathbf c')\), Hamming weight \(w_H(\mathbf c)=d_H(\mathbf c,\mathbf0)\), and Euclidean distance \(\|\mathbf y-x(\mathbf c)\|^2\) [2508.19631]. The maximum-likelihood decoder is defined as
\[
\hat{\mathbf c}_{\rm ML}
=\arg\min_{\mathbf c\in\mathcal C}\;\|\mathbf y - (1-2\mathbf c)\|^2,
\]
which supplies the reference performance target for WSD [2508.19631]. The central design problem is therefore to approximate ML performance in the finite blocklength regime without incurring exhaustive-search complexity.

## 2. Two-stage decoding framework

The baseline architecture embeds WSD in a generic two-stage decoder [2508.19631]. In Stage I, a low-complexity decoder such as belief-propagation or successive-cancellation-list produces an initial estimate \(\hat{\mathbf c}^{(-1)}\), after which the CRC bits, if used, are checked. If the CRC passes, decoding halts and outputs \(\hat{\mathbf c}^{(-1)}\). If the CRC fails, the decoded information bits are re-encoded to form \(\hat{\mathbf c}^{(0)}\), and its path metric is computed as
\[
M^{(0)} \;=\;\|\mathbf y - (1-2\,\hat{\mathbf c}^{(0)})\|^2.
\]
Stage II then invokes WSD to refine \(\hat{\mathbf c}^{(0)}\) [2508.19631].

The MP-WSD paper preserves this two-stage structure while changing the first-stage output interface and the second-stage refinement strategy [2602.08501]. Its Stage 1 is described as a low-complexity list decoder plus CRC, with examples including SCL or OSD. If CRC-aided decoding succeeds, termination is immediate. Otherwise, the decoder collects the top \(L_{\rm init}\) candidates
\[
\mathcal L_{\rm init} = \{ \hat c_1^{(0)},\ldots,\hat c_{L_{\rm init}}^{(0)} \}
\]
for subsequent refinement [2602.08501].

This two-stage organization is central to the claimed URLLC suitability. The first stage handles the typical case with low latency, whereas the second stage is activated only on CRC failure or, in the MP-WSD formulation without CRC, according to the activation rule encoded in \(P_{\rm act}\) [2508.19631; 2602.08501].

## 3. Code-weight sphere construction

WSD does not search the full codebook. Instead, it restricts the search to a Hamming sphere around the current estimate, constructed from low-weight codewords [2508.19631]. For an estimate \(\hat{\mathbf c}\) and radius \(R\), the code-weight sphere is defined as
\[
\mathcal S(\hat{\mathbf c},R)
= \bigl\{\mathbf c\in\mathcal C:
d_H(\mathbf c,\hat{\mathbf c})\le R
\;\text{and}\;
w_H(\mathbf c)\le W_{\max}
\bigr\}.
\]
Here \(W_{\max}\) is a design parameter, often chosen as \(d_{\min},d_2,\dots\) [2508.19631].

A key linear-code property enables translation of low-weight structures around the zero codeword to any center. If
\[
\mathcal C_\ell(\mathbf0)=\{\mathbf v\in\mathcal C: w_H(\mathbf v)=d_\ell\},
\]
then
\[
\mathcal C_\ell(\hat{\mathbf c})
= \{\hat{\mathbf c}+\mathbf v: \mathbf v\in\mathcal C_\ell(\mathbf0)\}.
\]
Accordingly,
\[
\mathcal S_r(\hat{\mathbf c})
= \bigcup_{\ell: d_\ell\le r}
\bigl\{\hat{\mathbf c}+\mathbf v:\mathbf v\in\mathcal C_\ell(\mathbf0)\bigr\}.
\]
In practice, one precomputes and stores the sets \(\mathcal C_\ell(\mathbf0)\) for all \(\ell\) up to \(R\) [2508.19631].

The MP-WSD formulation presents the same idea via the code-weight spectrum [2602.08501]. Let \(0=d_0<d_1<\cdots<d_L\) be the distinct nonzero weights in the code’s weight enumerator \(A(z)=\sum_{w=0}^N A_w z^w\). The \(\ell\)th Hamming shell around \(c\) is
\[
C_{d_\ell}(c) = \{c'\in\mathcal C : d_H(c,c')=d_\ell\},
\]
and the code-weight sphere of index \(r\) around \(c\) is
\[
S_r(c) = \bigcup_{\ell=0}^r C_{d_\ell}(c).
\]
Because \(\mathcal C\) is linear,
\[
S_r(c) = c\oplus S_r(0),
\]
so only \(S_r(0)\) must be precomputed [2602.08501]. The paper explicitly contrasts this with classical sphere decoding: classical sphere decoding constrains \(\|y-x(c)\|\le R\), whereas WSD constrains the Hamming-weight index of the perturbation [2602.08501].

The precomputation stage enumerates
\[
S_r(0) = \{ p\in\mathcal C : w_H(p)\in\{d_0,\ldots,d_r\} \},
\]
with the paper stating that, in principle, the code’s weight enumerator \(A_w\) can guide which weights to include, while in practice all codewords up to weight \(d_r\) are found via brute-force or algebraic methods [2602.08501].

## 4. Iterative refinement and multipoint extension

After Stage I delivers \(\hat{\mathbf c}^{(0)}\), baseline WSD proceeds in rounds \(i=1,2,\dots,J\) by searching \(\mathcal S(\hat{\mathbf c}^{(i-1)},R)\) for the candidate with the best path metric [2508.19631]. With
\[
\Lambda(\mathbf c)
= \|\mathbf y - s(\mathbf c)\|^2,\quad
s(\mathbf c) = 1-2\,\mathbf c,
\]
each round initializes
\[
M^{(i)}\gets M^{(i-1)},\qquad
\hat{\mathbf c}^{(i)}\gets \hat{\mathbf c}^{(i-1)},
\]
then evaluates all candidates \(\mathbf c=\hat{\mathbf c}^{(i-1)}+\mathbf v\) formed from precomputed low-weight codewords satisfying \(d_\ell\le R\). If \(\Lambda(\mathbf c)<M^{(i)}\), the metric and estimate are updated. The stopping criteria are explicit: terminate if the metric fails to improve, \(M^{(i)}\ge M^{(i-1)}\), or if the CRC on \(\hat{\mathbf c}^{(i)}\) passes; otherwise continue up to \(J\) rounds [2508.19631].

The paper states that this iterative refinement ensures monotonic metric improvement [2508.19631]. A plausible implication is that the search behaves like a local descent over code-constrained perturbations, but the formulation remains strictly code-centric because each move is itself a valid codeword perturbation.

MP-WSD modifies the second stage by launching \(L_{\rm init}\) independent trajectories in parallel [2602.08501]. For a current center \(\hat c_k^{(i-1)}\), the local neighborhood is
\[
N_r(\hat c^{(i-1)}_k) = \{ \hat c_k^{(i-1)} \oplus p : p\in S_r(0) \}.
\]
At each iteration, path \(k\) selects
\[
p^* = \arg\max_{p\in S_r(0)} G_k(p),
\]
where the gain metric is
\[
G_k(p) = \langle y,\,x(\hat c_k^{(i-1)})-x(\hat c_k^{(i-1)}\oplus p)\rangle
= \sum_{j\in\mathrm{supp}(p)} (-2\,y_j\,\hat x_{k,j}^{(i-1)}).
\]
The center is updated as
\[
\hat c_k^{(i)} = \hat c_k^{(i-1)} \oplus p^*
\]
if it strictly reduces Euclidean distance; otherwise path \(k\) is deactivated [2602.08501].

The MP-WSD pseudocode introduces a filter-size \(m\). Instead of evaluating all patterns identically at the final selection step, each active path first filters the top-\(m\) patterns by largest \(G_k(p)\), then selects the best \(p^*\) from that subset [2602.08501]. The process repeats for at most \(J\) iterations in parallel, and the final output is the center with the smallest Euclidean distance among all paths [2602.08501].

## 5. Complexity, latency, and implementation properties

For baseline WSD, let \(|\mathcal S_r(\mathbf0)|\) denote the number of candidates within radius \(R\) around the zero codeword, equivalently the sum of \(|\mathcal C_\ell(\mathbf0)|\) for \(d_\ell\le R\) [2508.19631]. Each WSD round evaluates \(|\mathcal S_r(\mathbf0)|\) Euclidean-distance metrics, each costing \(O(n)\) flops, plus a small overhead to pick the minimum. If the CRC failure probability of the Stage I decoder is \(P_{\rm e,crc}\), then WSD is invoked on average in a fraction \(P_{\rm e,crc}\) of frames. The resulting complexity expressions are
\[
O\bigl(P_{\rm e,crc}\times J \times n\times|\mathcal S_r(\mathbf0)|\bigr)
\]
for the worst case when WSD always runs all \(J\) rounds, and
\[
C_{\rm total}
= C_{\rm init}
+ P_{\rm e,crc}\times O\bigl(J\,(n+1)\,|\mathcal S_r(\mathbf0)|\bigr)
\]
for the average total cost including the initial decoder cost \(C_{\rm init}\) [2508.19631]. The paper further states that as SNR grows, \(P_{\rm e,crc}\to0\) and the WSD overhead vanishes, whereas at low SNR the initial CRC fails frequently and WSD engages more often [2508.19631].

The MP-WSD work normalizes complexity in “ED-units,” where one Euclidean-distance evaluation \(\|y-x\|^2\) for length \(N\) costs \(\approx 3N\) FLOPs [2602.08501]. It gives
\[
C_{ML}=2^K
\]
ED-units for brute-force ML and
\[
C_{SCL}\approx (4/3)\,L\,\log_2 N
\]
for SCL with list size \(L\) [2602.08501]. For a single WSD trajectory,
\[
C_{wsd} \approx J \cdot \left[ m\left(1+\frac{1}{3N}\right) + |S_r(0)|\cdot\frac{\bar w + \log_2 m}{3N} \right],
\]
where \(m=|M_k|\) is the filter threshold and \(\bar w\) is the average weight in \(S_r(0)\) [2602.08501]. The total MP-WSD cost is
\[
C_{mp\text{-}wsd} = C_{init} + P_{act}\cdot L_{\rm init}\cdot C_{wsd},
\]
with \(P_{act}=\Pr\{\text{CRC failure}\}\), or \(P_{act}=1\) if no CRC is used [2602.08501]. The paper adds that at high SNR, \(P_{act}\to0\), so average cost tends to \(C_{init}\), and that worst-case cost is bounded by \(L_{\rm init}\cdot J\cdot |S_r(0)|\) ED-units [2602.08501].

The implementation discussion in the original WSD letter emphasizes latency, hardware complexity, and parameter trade-offs [2508.19631]. Most frames, especially at high SNR, terminate after Stage I and a simple CRC check. Only rare error frames trigger the heavier WSD rounds. Precomputed low-weight codewords \(\{\mathcal C_\ell(\mathbf0)\}\) can be stored in fast on-chip memory, and the metric computations are described as regular vector-scalar multiply-adds that map well to parallel hardware [2508.19631].

The parallel extension makes this hardware orientation more explicit [2602.08501]. It identifies inter-path parallelism across the \(L_{\rm init}\) independent trajectories and intra-path parallelism for computing \(G_k(p)\) and the Euclidean distances for the \(m\) candidates. The critical-path latency is stated to scale as \(J\) shallow hops, each requiring one filter-plus-search step and remaining independent of \(L_{\rm init}\), which the paper uses to justify deterministic and low latency for URLLC [2602.08501].

## 6. Reported performance and near-ML behavior

The original WSD letter reports extensive simulations on low-rate short codes with \(n\in\{64,128,256\}\) and \(k\in\{16,32\}\) [2508.19631]. The reported findings include the following:

| Reported setting | Reported result |
|---|---|
| Modest radii \(R\in\{2,3\}\) | WSD can approach ML performance within \(0.2\) dB in BLER at \(10^{-5}\) |
| Appended to a strong list decoder such as SCL with \(L=32\) | WSD reduces the gap to ML from \(\sim0.6\) dB down to \(\sim0.1\) dB |
| Against RCU and meta-converse bounds | WSD achieves near-optimal operation in the short-block regime |
| “Always-on” mode | Demonstrates the full potential gain of up to \(1.2\) dB for deep-polar codes |

These results are presented as evidence that the two-stage decoder offers an excellent trade-off between decoding reliability and complexity and as establishing it as a promising solution for next-generation URLLC systems [2508.19631].

The MP-WSD paper adds code-specific results for short-blocklength, low-rate codes [2602.08501]. For CA-polar \((256,16)\) with 11-bit CRC, SCL\((L=16)\)+MP-WSD\((r=2,3)\) is reported to close the gap to MLD by \(\approx 0.5\) dB and to match SCL\((L=32)\) [2602.08501]. For CA-DP \((128,16)\), SCL-BPC\((L=16)\)+MP-WSD\((r=1)\) is reported to outperform SCL-BPC\((L=32)\) by \(\sim 1.2\) dB at \(\mathrm{BLER}=10^{-3}\) [2602.08501]. For RM\((128,29)\), OSD\((k=2)\)+MP-WSD approaches the reliability of OSD\((k=4)\) at a fraction of the complexity [2602.08501]. The same paper states that, across these cases, the average normalized complexity versus SNR curves show that MP-WSD overhead vanishes as SNR increases, while BLER remains within \(\lesssim 0.1\) dB of the true ML decoder [2602.08501].

The precomputed search-set sizes in the MP-WSD paper illustrate how quickly \(|S_r(0)|\) can vary by code family and radius index [2602.08501]:

| Code \((N,K)\) | \(r\) values | \(|S_r(0)|\) |
|---|---|---|
| CA-polar \((256,16)\) | \(r=1,2,3,4\) | \(2, 11, 538, 6472\) |
| CA-DP \((128,16)\) | \(r=1,2,3\) | \(611, 14491, 51060\) |
| RM \((128,29)\) | \(r=1\) | \(10688\) |

These cardinalities are directly relevant to both offline storage and online search cost. A plausible implication is that the practical operating point of WSD or MP-WSD depends strongly on the low-weight spectrum of the chosen code.

## 7. Relation to classical sphere decoding and scope of applicability

The term “sphere” in WSD is potentially misleading if interpreted through the lens of classical Euclidean sphere decoding. The MP-WSD formulation addresses this directly: classical sphere decoding constrains \(\|y-x(c)\|\le R\), whereas WSD constrains the Hamming-weight index of the perturbation [2602.08501]. The search remains localized in Euclidean space because candidate refinement is driven by Euclidean-distance improvement, and the effective Euclidean radius is tightened whenever a better candidate is found [2602.08501]. However, the defining object is the code-weight sphere \(S_r(c)\), not a conventional Euclidean ball.

Another possible misconception is that WSD is code-family-specific. Both papers characterize the framework as applicable to any linear block code [2508.19631; 2602.08501]. That generality derives from the linear-code identity \(S_r(c)=c\oplus S_r(0)\) and from the use of precomputed low-weight codewords rather than code-family-specific recursive structure [2602.08501]. At the same time, the concrete computational burden depends on the availability and size of low-weight codeword sets, so universality at the framework level does not imply uniform practical cost across all code families. This suggests that WSD is best understood as a code-agnostic decoding paradigm whose efficiency is shaped by the weight spectrum and by system-level choices such as CRC usage, radius selection, maximum iteration count, and, in MP-WSD, the number of initial trajectories and filter size.

Within that scope, the literature represented by the two cited preprints positions WSD as a near-ML decoder for finite-blocklength URLLC: a lightweight first-stage decoder handles the common case, and a structured second-stage search over precomputed low-weight perturbations recovers much of the ML gain when the initial decision is unreliable [2508.19631; 2602.08501].

Source: https://www.emergentmind.com/topics/code-weight-sphere-decoding-wsd