Linear codes exceeding the
Gilbert–Varshamov bound

Mert Saglam

DeepInfra

Binary linear codes

A binary linear code is a subspace C ⊆ 𝔽₂ⁿ.

Its minimum distance is the smallest Hamming weight of a nonzero codeword.

To have distance at least d, the code must avoid every nonzero vector of weight below d.

The Gilbert–Varshamov benchmark

Let B = {x ∈ 𝔽₂ⁿ : 0 < wt(x) < d} be the forbidden low-weight vectors, and write V = |B|.

|C| ≥ 2n / (V + 1)

The same bound is achievable by a linear code.

Main result

For every fixed ε > 0, when

log n ≪ d ≤ (1/2 − ε)n

there is a binary linear code with

 |C| ≥ cϵn · 2n / V 

for a constant cε > 0.

An Ω(n) improvement over Gilbert–Varshamov throughout this range.

Where this improves the picture

  • Jiang–Vardy (2004): larger nonlinear codes, with an Ω(log V) gain.
  • Gaborit–Zémor (2008): Ω(n) linear-code gain at rate 1/2, for special lengths.
  • Hao et al. (2022): Ω(√n) for general linear codes at fixed relative distance.
  • Yuan–Zhu (2026): another Ω(√n) proof, also for quantum codes.
  • Here: Ω(n) for all log n ≪ d ≤ (1/2 − ε)n.

Random parity checks give GV

Choose M ∈ 𝔽₂m×n uniformly and let

K = B ∩ ker M.

For each fixed x ∈ B,

Pr[Mx = 0] = 2−m.
Expected bad vectors
 E|K| = V · 2− m 

We can leave room for bad vectors

Instead choose m so that

τ = V · 2−m ≍ R,   R = ln(2n / V).

In our range, R = Θ(n), so the random kernel has expected size Θ(n) inside B.

We do not need K to be empty yet.

The key obstruction: odd circuits

A circuit is an inclusion-minimal linearly dependent set.

x1 + ··· + xℓ = 0

Every dependency splits into disjoint circuits.

If K contains no odd circuit, every dependency among vectors in K has even size.

One extra row removes every bad vector

Ka = 0   ⇒   1Ta = 0

So the all-ones row lies in the row space of the matrix whose columns are the vectors in K.

Choose v with vK = 1T.
Mv
⟶
H = [ M ; v ]

If Mx = 0 for a bad vector, then vx = 1. Thus Hx ≠ 0 for every x ∈ B.

The extended parity-check matrix has minimum distance at least d.

How likely is an odd circuit?

Let X₁, X₂, … be independent and uniform in B, and set

pℓ = Pr[X₁ + ··· + Xℓ = 0].
  • An ℓ-circuit gives ℓ! ordered zero-sum tuples, so |Circuitsℓ| ≤ Vℓpℓ/ℓ!.
  • A circuit has rank ℓ−1, hence Pr[S ⊆ ker M] = 2−m(ℓ−1).
E Z ≤ (V/τ) ∑odd ℓ ≥ 3 (τℓ/ℓ!) pℓ.

Poissonization turns the sum into a walk

Take a Poisson number Jτ of independent steps (Xi, 1) in 𝔽₂n+1.

The walk reaches en+1 exactly when the steps sum to zero in the first n coordinates and their number is odd.

eτ Pr[Wτ = en+1] = ∑odd ℓ ≥ 3 (τℓ/ℓ!) pℓ.

Fourier analysis cancels the linear term

Let μ be uniform on B and let μ̂(y) be its Fourier coefficient.

Pr[Wτ = en+1] = e−τ Ey sinh(τ μ̂(y)).

But Ey μ̂(y) = μ(0) = 0, because the ball is punctured.

Only the nonlinear remainder s(z) = sinh(z) − z contributes.

The Fourier input

For w = d−1 with log n ≪ w ≤ (1/2 − ε)n, sharp Hamming-ball bounds give

Third moment Ey|μ̂(y)|3 = O(1/(Vn3))
Large-coefficient tail Pr[|μ̂(y)| > 1/n] ≤ 2−n+o(n)

From the sharp moment and tail estimates of Kirshner and Samorodnitsky.

Small coefficients are cheap; large ones are rare

Small coefficients

Nonpositive coefficients contribute at most zero.

For 0 ≤ z ≤ 1,

s(z) ≤ (sinh 1 − 1)z3.

The third moment makes this contribution

O(e−τ/V).

Large positive coefficient

For z ≥ 1, s(z) ≤ ez/2.

Since τ < (1−ζ)R, the tail pays an exponential gap.

Pr[μ̂(y) > 1/τ] ≤ 2−n+o(n).

Finish the existence proof

E Z ≤ (Veτ/τ) Pr[Wτ = en+1] < 1.

So some choice of M contains no odd circuit in K.

Append the row v from the row-space argument.

This produces a distance-d linear code.

The resulting code size

Choose m so that (1−ζ)R/2 ≤ τ < (1−ζ)R.

|C| ≥ 2n−m−1 = (τ/2) · 2n/V.
|C| ≥ ((1−ζ)R/4) · 2n/V.

As ζ → 0, the leading constant is 1/4 in front of R times the GV scale.

A concrete relative distance

If d/n → 1/5, then R/n → ln 2 · (1 − H₂(1/5)).

|C| / (2n/V) ≥ (0.048… − o(1)) n.

The improvement over the Gilbert–Varshamov bound is linear in blocklength.

Thanks!