How Much Independence Does Dither Need?

Many modern lossy compressors add random noise, called dither, to the signal before rounding it to a grid. The encoder and decoder share the same noise and subtract it back out. This trick makes the rounding error behave like clean, signal-independent noise. It is also what lets a codec produce reconstructions that look like real data rather than blurry averages. Recent work shows that codecs with shared dither reach the theoretical limits of the three-way tradeoff between bitrate, error, and realism, while codecs without shared randomness fall short (Optimal Neural Compressors for the Rate-Distortion-Perception Tradeoff). Every such construction assumes the dither is fully random: independent, uniform noise in every coordinate. Nobody has asked which statistical property of that noise actually does the work.

We propose to answer that question with tools from derandomization, the part of complexity theory that asks how weak a random source can be while still fooling a given class of tests. Our hypothesis is that the three quantities a codec cares about need three different amounts of independence. Expected error and bitrate need only that each coordinate's dither be uniform on its own. Concentration of the error needs pairwise independence. Realism against a discriminator needs $k$-wise independence, with $k$ set by the complexity of that discriminator. If this holds, a single short seed can stand in for all the dither without loss. The proof would come from the structure of the tests rather than from trusting a software random-number generator. It would also yield exact, checkable seed lengths for codecs that need them.

Core Claim

Consider subtractive dithered quantization on a lattice made of blocks, as in the $E_8$ lattice codes of Optimal Neural Compressors for the Rate-Distortion-Perception Tradeoff. For a fixed source $X$, the reconstruction error in block $i$ is a function of that block's dither $U_i$ alone. Two consequences follow.

First, expected squared error is a sum of per-block terms, and the per-block entropy-coding rate depends only on the pair $(X_i, U_i)$. Both are therefore unchanged when the dither is merely uniform in each block. That remains true even if every block reuses the same dither vector.

Second, the reconstruction's error vector inherits the independence of the dither across blocks. So any realism test that depends on at most $k$ blocks is fooled exactly by $k$-wise independent dither.

The second consequence is where the derandomization literature supplies the method. Tests that look at all blocks at once are only fooled approximately. A linear discriminator applied to the reconstruction is a halfspace, and Bounded Independence Fools Halfspaces shows that $k = O(\log^2(1/\epsilon)/\epsilon^2)$-wise independence fools every halfspace to error $\epsilon$. Its product-distribution extension (Fooling functions of halfspaces under product distributions) handles the non-binary, bounded coordinates that dither actually has. The resulting seed length is $O(k \log n)$ bits for $n$ blocks.

This separates the proposal from the closest work in three ways. Optimal Neural Compressors for the Rate-Distortion-Perception Tradeoff reduces the precision of the dither by quantizing it with nested lattices, at 1.58 bits per dimension. We reduce its independence and leave its marginal alone, so the two ideas are orthogonal and combinable. The Rate-Distortion-Perception Trade-off: The Role of Private Randomness proves that, asymptotically, encoder randomness is useless and per-symbol realism needs no common randomness at all. Yet at finite block length, private-dither codecs are measurably worse than shared-dither ones. Bounded-independence dither interpolates between those two regimes, from zero shared bits to full sharing, and measures where the finite-length gap closes.

Research Program

The theoretical part has three steps. First, we will prove the "marginals suffice" statement for expected distortion and per-block rate. We will then prove a variance bound showing that pairwise independence is enough for the error to concentrate at its mean. Second, we will state the exact fooling result for realism tests that read at most $k$ blocks. Third, we will adapt the halfspace fooling bound to realism statistics that are linear functionals of the reconstruction. This gives an explicit seed length as a function of the target discriminator advantage $\epsilon$.

The quantity we track throughout is the discriminator advantage. Let $D$ be a test that outputs 0 or 1, let $\hat X_{\text{full}}$ be the reconstruction under fully independent dither, and let $\hat X_{k}$ be the reconstruction under $k$-wise independent dither. The advantage is

$$\mathrm{Adv}_D(k) = \left|\Pr[D(\hat X_{\text{full}})=1] - \Pr[D(\hat X_{k})=1]\right|.$$

The theory predicts that $\mathrm{Adv}_D(k) = 0$ whenever $D$ reads at most $k$ blocks, and that it is at most $\epsilon$ for linear $D$ once $k$ exceeds the halfspace bound.

The constructive part builds explicit dither families that share the source's per-block uniform marginal. The first family uses $k$-wise independent generators from random degree-$(k-1)$ polynomials over a prime field. We map each field element to a point in the lattice's cell, which is uniform up to a controllable rounding error. The second family uses small-bias spaces, the generators behind Better Pseudorandom Generators from Milder Pseudorandom Restrictions. Each family is dropped into the shared-dither lattice codec and into a learned image codec, with seed length as the independent variable.

We will also build deliberately adversarial dither. These are families that are exactly $k$-wise independent but perfectly correlated at order $k+1$. With them we can test whether realism failures appear precisely at the predicted order. The most extreme case is a single dither vector reused across all blocks. It is uniform in every block but fully dependent across blocks. The theory predicts it matches full dither in expected MSE and in rate, and fails realism badly. That clean, falsifiable prediction is the centerpiece of the program.

The joint rate-distortion view enters through the objective. As in System-Aware Compression, which scores a codec at the output of the full pipeline rather than at the bitstream, we measure distortion and realism at the final reconstruction. Realism is scored by a downstream discriminator, so the "test class" in the derandomization sense is exactly the terminal consumer of the pipeline. This is the precise sense in which optimal hardness-to-randomness conversion applies. The necessary seed length is dictated by the complexity of the consumer, in the same way the seed lengths in Improved Pseudorandom Generators from Pseudorandom Multi-switching Lemmas are dictated by what constant-depth circuits cannot compute.

Baselines

The naive reference point is a deterministic encoder with no shared dither. The first variant has no decoder noise at all. The second is the private-dither codec (PD-LTC) of Optimal Neural Compressors for the Rate-Distortion-Perception Tradeoff, in which only the decoder adds noise. PD-LTC is the zero-shared-bit endpoint of our sweep. Beating it means reaching lower distortion at equal rate and realism while sharing only $O(k\log n)$ bits.

The strongest existing method is shared-dither lattice coding (SD-LTC) from the same paper. On 8-dimensional Gaussian sources it matches the theoretical lower bound, and its quantized-dither variant, QSD-LTC, stays near that level while sharing 1.58 bits per dimension. The file gives no reported MSE or realism values for these runs, only the qualitative match to the bound. We will therefore reproduce SD-LTC ourselves with the $E_8$ and $\Lambda_{16}$ lattices, and treat the analytic lower bound as the target.

For fairness, every dither family will use the same trained transform, lattice, entropy model, and evaluation sources. Only the dither generator changes. Discriminators will receive the same training budget across conditions. "Beating" SD-LTC is not the goal; SD-LTC is optimal. Success means matching its rate, distortion, and realism to within seed-to-seed noise, while sharing a seed that grows logarithmically with dimension rather than linearly.

A software generator baseline, ChaCha20 seeded with a 64-bit per-image seed, stands in for "heuristically perfect" randomness. It should be indistinguishable from true independence. The key ablation is the single-reused-dither family described above. It keeps the marginals exact and removes all cross-block independence, so it isolates independence as the ingredient that matters.

Why not just…?

Why not just seed a standard generator like ChaCha20 and move on? For practical codecs this is a genuine threat. We expect it to work, and we include it as a baseline that should match full dither. The proposal does not claim to beat it on quality. What ChaCha cannot provide is a characterization of which property is necessary, or a seed length with a proof attached. It also gives no warning about the realistic failure mode, which is seed reuse. Stateless decoders, broadcast to many receivers, and random-access decoding all tempt engineers to fix one seed across images or blocks. The reused-dither ablation shows exactly what breaks then (realism) and what does not (expected distortion and rate). If our $k$-wise families and ChaCha both match full dither, while reused dither fails only on realism, we have a clean account that ChaCha alone cannot give.

Why not just quantize the dither, as QSD-LTC does? Quantizing dither lowers the precision of shared randomness. Our proposal lowers the independence of shared randomness. These are different axes. We will test the combination, $k$-wise independent quantized dither, to check that the savings compose. If QSD-LTC's cost comes from randomness that must actually be communicated, a shared seed that is logarithmic in dimension removes that per-dimension charge. That claim is conditional on encoder and decoder sharing the seed, and we state it only under that assumption.

Why not rely on the result that per-symbol realism needs no common randomness? The Rate-Distortion-Perception Trade-off: The Role of Private Randomness proves this only as block length grows without limit. The finite-length lattice results in Optimal Neural Compressors for the Rate-Distortion-Perception Tradeoff show private-only codecs are strictly worse. Our sweep over seed length measures how many shared bits close that finite-length gap. If the gap closes at zero bits in our settings, the asymptotic theory wins and our constructions are unnecessary, which is a result we will report either way.

Proposed Experiments

The first testbed is synthetic Gaussian sources in 8 and 16 dimensions, following Optimal Neural Compressors for the Rate-Distortion-Perception Tradeoff, concatenated into blocks of up to a few thousand dimensions. Realism can be measured there in closed form, as the Wasserstein-2 distance between Gaussian source and reconstruction, the measure used in Rethinking Lossy Compression: The Rate-Distortion-Perception Tradeoff. The second testbed is MNIST and CelebA with a learned codec using shared dither.

The metrics are MSE, rate in bits per dimension, realism divergence, seed bits, and discriminator advantage. We will train three kinds of discriminator to separate full-dither reconstructions from each generator family's reconstructions: linear, shallow multilayer perceptron, and convolutional network.

Three decisive checks follow. First, the reused-dither ablation must match full dither in expected MSE and rate, within confidence intervals, while clearly failing realism. If its MSE or rate also degrades, the "marginals suffice" claim is wrong. Second, for the adversarial $k$-wise families, advantage must be near zero for discriminators restricted to $k$ blocks and must jump for those reading $k+1$ blocks. For linear discriminators, advantage should fall below $\epsilon$ at roughly the $k$ predicted by the halfspace bound. Third, we will plot convolutional-network advantage against $k$ for polynomial-based generators. This is the empirical question the theory cannot settle, and it tells us whether realistic neural critics behave like low-complexity tests. If the advantage stays flat and near zero at small $k$, a seed logarithmic in image size is enough for realistic codecs. If it keeps rising, neural critics exploit high-order structure, and full-strength generators are needed after all.