The Gap to Capacity: Coding and Shaping

Splitting the Gap Into Two Pieces

The 7-10 dB gap between an uncoded QAM constellation and the Shannon limit at bandwidth-limited rates turns out to have a rather clean decomposition. Part of the gap is a coding deficit: the constellation has too few points packed too loosely, and a code that places the transmitted vector farther from its nearest neighbors recovers that portion β€” this is what most of Book CM will concern. Another part is a shaping deficit: a uniform distribution over a square QAM boundary is Gaussian-mismatched, and a non-uniform input or a spherical boundary recovers this portion β€” up to an ultimate limit of Ο€e/6β‰ˆ1.53\pi e / 6 \approx 1.53 dB.

Now here is the key idea: these two gaps are essentially decoupled. A coded modulation scheme can recover coding gain without any shaping, and shaping can be layered on top of an otherwise uniform-input code without interfering with it. This is the shaping-coding decomposition, and it is what makes probabilistic shaping such a clean add-on to modern LDPC/BICM systems.

,

Definition:

CM Capacity of a Uniform Input Constellation

Let XβŠ‚RN\mathcal{X} \subset \mathbb{R}^N be a finite signal-space constellation of MM points and let PXP_X be the uniform distribution on X\mathcal{X}. Define the CM capacity of X\mathcal{X} at SNR SNR\text{SNR} as

CCM(X,SNR)β€…β€Š=β€…β€ŠI(X;Y)β€…β€Š=β€…β€Šlog⁑2Mβˆ’E ⁣[log⁑2βˆ‘x^∈Xexp⁑(βˆ’βˆ₯x^βˆ’Xβˆ’Wβˆ₯2/N0+βˆ₯Wβˆ₯2/N0)],C_{\rm CM}(\mathcal{X}, \text{SNR}) \;=\; I(X; Y) \;=\; \log_2 M - \mathbb{E}\!\left[\log_2 \sum_{\hat x \in \mathcal{X}} \exp(-\|\hat x - X - W\|^2/N_0 + \|W\|^2/N_0)\right],

where W∼N(0,N02IN)W \sim \mathcal{N}(\mathbf{0}, \tfrac{N_0}{2} \mathbf{I}_N) and Y=X+WY = X + W. This is the mutual information between the uniformly distributed transmitted symbol and its AWGN output, evaluated at the given SNR.

As SNRβ†’βˆž\text{SNR} \to \infty, CCMβ†’log⁑2MC_{\rm CM} \to \log_2 M; as SNRβ†’0\text{SNR} \to 0, CCMβ†’0C_{\rm CM} \to 0. At moderate SNR, the CM capacity is bounded above by the Shannon capacity log⁑2(1+SNR)\log_2(1 + \text{SNR}), and the gap between them measures the shaping loss of the constellation at that SNR.

,

Theorem: The Ultimate Shaping Gain: Ο€e/6β‰ˆ1.53\pi e / 6 \approx 1.53 dB

Consider signaling on the real AWGN channel at spectral efficiency Ξ·\eta bits per 2D dimension. For any finite constellation XβŠ‚RN\mathcal{X} \subset \mathbb{R}^N inscribed in an NN-dimensional cube (or any rectangular box) and any finite constellation Xβ€²\mathcal{X}' inscribed in a ball (or any sphere-like region), the ratio of the minimum average energies needed to carry the same number of points satisfies

limβ‘Ξ·β†’βˆžEs(cube)Es(ball)β€…β€Š=β€…β€ŠΟ€e6β€…β€Šβ‰ˆβ€…β€Š1.5329,\lim_{\eta \to \infty} \frac{E_s(\text{cube})}{E_s(\text{ball})} \;=\; \frac{\pi e}{6} \;\approx\; 1.5329,

or about 1.531.53 dB in decibels. This is the ultimate shaping gain: the asymptotic gap between the energy efficiency of a cubic (product) constellation and a sphere-bounded constellation.

A Gaussian input distribution is the unique maximizer of the mutual information on an AWGN channel under a second-moment constraint. A uniform distribution over a cube is close to i.i.d. uniform on each dimension and carries the same energy per point, but its per-point "volume" is larger than the corresponding ball of the same number of points. The ratio of average energies at equal cardinality, in the limit of many dimensions, is the classic Ο€e/6\pi e / 6 β€” the factor by which a uniform-in-a-cube distribution is beaten by a Gaussian.

,

Shannon Capacity vs. Uniform MM-QAM CM Capacity

The solid line is Shannon capacity; the dashed line is the CM capacity of uniform MM-QAM. At low SNR the two coincide; at high SNR the CM capacity saturates at log⁑2M\log_2 M. The vertical gap at a fixed rate is the shaping loss; the horizontal gap at a fixed SNR below saturation is the "modulation" loss that a better code alone cannot recover.

Parameters

Definition:

Coding and Shaping Gains of a Scheme

Fix a target spectral efficiency Ξ·\eta and an AWGN channel. Write the total SNR gap from uncoded QAM to Shannon capacity as

Ξ³total(Ξ·)β€…β€Š=β€…β€ŠΞ³codingβ€…β€Š+β€…β€ŠΞ³shapingβ€…β€Š+β€…β€ŠΞ³finiteβˆ’block[dB].\gamma_{\rm total}(\eta) \;=\; \gamma_{\rm coding} \;+\; \gamma_{\rm shaping} \;+\; \gamma_{\rm finite-block} \quad [\text{dB}].

The three terms are:

  1. Coding gain Ξ³coding\gamma_{\rm coding}. The difference between the operating SNR of uncoded QAM at the target error probability and the SNR where uniform-input CM capacity equals Ξ·\eta. It is the portion of the gap recoverable without shaping.
  2. Shaping gain Ξ³shaping\gamma_{\rm shaping}. The difference between the SNR where uniform-input CM capacity equals Ξ·\eta and the SNR where Gaussian-input capacity equals Ξ·\eta. Bounded by Ο€e/6β‰ˆ1.53\pi e/6 \approx 1.53 dB as Ξ·β†’βˆž\eta \to \infty.
  3. Finite-blocklength / implementation gap. The residual loss at any finite codeword length and decoding complexity. Typically 0.3-1.0 dB for modern LDPC/polar codes at useful block lengths.

Decomposition of the Capacity Gap at Rate Ξ·\eta

A horizontal bar labels the total SNR gap from uncoded QAM to Shannon capacity at the chosen Ξ·\eta, split into coding gain (large), shaping gain (bounded by 1.53 dB), and the implementation residual. Increase the coding gain slider to see the uncoded-to-CM-capacity gap shrink; increase the shaping gain slider to see the CM-to-Gaussian gap shrink.

Parameters
4
6
1

Example: Accounting for the 7 dB Gap at Ξ·=4\eta = 4

Uncoded 16-QAM at Ξ·=4\eta = 4 bits/2D requires about 13.413.4 dB of Eb/N0E_b/N_0 for Pb=10βˆ’5P_b = 10^{-5}, while the Shannon limit at the same Ξ·\eta is 5.745.74 dB. The total gap is β‰ˆ7.7\approx 7.7 dB. Allocate this gap into coding gain, shaping gain, and finite-blocklength loss for a realistic modern system (say, a rate-1/21/2 LDPC code on 256-QAM with probabilistic amplitude shaping).

Why Shaping Gain Is So Small at Moderate Ξ·\eta

The 1.531.53 dB ultimate shaping gain is asymptotic in Ξ·\eta; at finite Ξ·\eta it is smaller. For Ξ·=2\eta = 2 (uncoded QPSK), shaping gain is essentially zero, because QPSK has no room to be shaped β€” each point is already at the constellation boundary. For Ξ·=4\eta = 4 (16-QAM or denser), shaping gain is about 0.20.2 dB; for Ξ·=6\eta = 6, about 0.60.6 dB; only as the constellation grows large and the inscribed sphere approaches the Gaussian-typicality ball does the gain approach 1.531.53 dB. This is why probabilistic shaping became compelling only with modern high-order QAM (256-QAM and beyond).

πŸ”§Engineering Note

Probabilistic Shaping in Modern Standards

Probabilistic amplitude shaping (PAS), due to BΓΆcherer, Steiner, and Schulte, is the modern practical realization of the shaping gain. Instead of uniformly distributing QAM symbols, a distribution matcher produces QAM points according to a Maxwell-Boltzmann density before the LDPC encoder, which then systematically encodes and leaves the amplitude distribution approximately unchanged. DVB-S2X, optical coherent systems (ITU-T G.709), and some 3GPP study items have adopted or considered PAS variants. The engineering point is that shaping composes cleanly with binary coding on top of BICM β€” see Chapter 19 for the full treatment.

Practical Constraints
  • β€’

    PAS operates on the amplitude bits of a QAM signal, leaving the sign bits uniform

  • β€’

    Shaping blocklength must be chosen jointly with the binary code rate to match a target rate

  • β€’

    Adaptive shaping requires a feedback path to convey the chosen distribution; in 5G NR this is not yet standardized

Common Mistake: The shaping gap lives at the input distribution, not at the code

Mistake:

Assuming that a stronger binary code will close the last 1.531.53 dB to Shannon capacity.

Correction:

The binary code controls only the coding gain; it cannot change the input distribution of the QAM symbols it is mapped to. If the downstream QAM input is uniform, the maximum achievable mutual information is exactly the uniform-input CM capacity, which is (asymptotically) Ο€e/6\pi e / 6 dB below Shannon. Closing this gap requires explicitly shaping the symbol distribution β€” the code itself cannot do it.

Key Takeaway

Gap = coding gain + shaping gain + finite-blocklength residual. Coding gain is the biggest piece (5-8 dB) and is what most of coded-modulation theory targets; shaping gain is capped at Ο€e/6β‰ˆ1.53\pi e / 6 \approx 1.53 dB and is recovered by non-uniform input distributions; the finite-blocklength residual is the unavoidable cost of finite complexity. Design accordingly.

Shaping gain

The SNR advantage obtainable by using a non-uniform (Gaussian-like) distribution on the signal constellation instead of a uniform one, with ultimate asymptotic value Ο€e/6β‰ˆ1.53\pi e / 6 \approx 1.53 dB.

Related: Coding Gain, Capacity Gap, Probabilistic Shaping

CM capacity

The mutual information I(X;Y)I(X;Y) for a uniform distribution on a finite signal-space constellation X\mathcal{X} over the AWGN channel. It saturates at log⁑2∣X∣\log_2 |\mathcal{X}| at high SNR and equals Shannon capacity at low SNR; at intermediate SNR the gap to Shannon is the shaping loss.

Related: Shaping gain, Mutual Information

Coding Gain vs. Shaping Gain

AspectCoding GainShaping Gain
What is being changedThe set of transmitted code points (geometry)The probability distribution over the set
TargetIncrease minimum Euclidean distance (or distance spectrum)Match input distribution to Gaussian (maximize differential entropy at fixed EsE_s)
Typical magnitude5-8 dB recoverable in bandwidth-limited regimeBounded by Ο€e/6β‰ˆ1.53\pi e / 6 \approx 1.53 dB
Example techniqueUngerboeck TCM, LDPC + QAM, turbo + QAMProbabilistic amplitude shaping, Voronoi shaping, shell mapping
Dependence on Ξ·\etaApproximately constant across Ξ·\etaZero at low Ξ·\eta, approaches 1.53 dB as Ξ·β†’βˆž\eta \to \infty
Does it expand bandwidth?No (coded modulation keeps Ξ·\eta fixed)No

Quick Check

An engineer claims their new coding scheme closes the gap to Shannon capacity at Ξ·=10\eta = 10 bits/2D to 0 dB, using a standard 1024-QAM constellation with equal a-priori symbol probabilities. Is this plausible?

Yes, if the code is powerful enough.

No, because with a uniform-probability QAM input, the CM capacity is bounded strictly below Shannon by the shaping loss β€” up to β‰ˆ1.53\approx 1.53 dB at large Ξ·\eta.

Yes, because at Ξ·=10\eta = 10 bit/2D the shaping loss vanishes.

No, because uncoded 1024-QAM is intrinsically too far from capacity.

Historical Note: Forney-Trott-Chung and the Dichotomy of Coding vs. Shaping

1989-2000

The clean decomposition of the capacity gap into coding and shaping gains crystallized in a series of papers by Forney, Trott, Chung, and collaborators in the 1990s. The insight β€” originally hidden behind the lattice-coset framework of coset codes and Voronoi constellations β€” is that the two gains address independent features of the transmitted signal: coding shapes the set of points, shaping shapes their distribution. The Forney-Trott-Chung 2000 paper on sphere-bound-achieving coset codes gave the definitive statement, showing that multilevel coset codes with Voronoi shaping can in principle achieve capacity on the AWGN channel.

,

Why This Matters: Why 5G NR Does Not (Yet) Include Shaping, but 6G Might

In 5G NR Rel-15/16/17, the uplink and downlink use uniform QAM constellations with LDPC codes over BICM. The β‰ˆ1.5\approx 1.5 dB shaping gap is left on the table because the standardization, buffer management, and rate-matching complexity of probabilistic shaping did not fit the 5G timeline. For 6G (and for coherent optical links, where the business case is clearer), probabilistic shaping is actively under consideration, and pre-standard implementations in DVB-S2X already demonstrate the practical gain. The takeaway: the shaping-coding decomposition we present here is not just a theoretical curiosity β€” it maps onto a real engineering roadmap.