Neural networks are typically continuous and differentiable, but compression requires them to be discrete. To save space or bandwidth, we must eventually map high-precision latent representations to a finite set of integers—a process called quantization.
The fundamental problem is that the rounding function used in quantization is a "staircase" with a derivative of zero almost everywhere and undefined jumps at every step. This "zero-gradient" problem breaks backpropagation, making it impossible to optimize a compression model using standard gradient descent. Researchers have solved this by replacing discrete rounding with a continuous, stochastic proxy during training: Additive Uniform Noise.
The Gradient Problem and the Noise Solution
In a standard autoencoder, an encoder $f(x)$ produces a latent representation $y$. In a compression setting, we want to store $y$ as an integer $\hat{y} = \lfloor y \rceil$. During the backward pass, the gradient $\frac{\partial \hat{y}}{\partial y}$ is zero, meaning the encoder receives no feedback on how to adjust its weights to improve the reconstruction or reduce the bitrate.
As Johannes Ballé, Jona Ballé, and their colleagues demonstrated in End-to-end Optimized Image Compression, we can bypass this by adding uniform noise $\mathcal{U}(-1/2, 1/2)$ to the latent representation during training instead of rounding it.
The intuition is elegant: the error introduced by rounding a value to the nearest integer is roughly uniformly distributed between $-0.5$ and $0.5$. By adding noise of this same magnitude, the model "feels" the same kind of distortion it will experience during inference, but the operation remains fully differentiable. This stochastic relaxation allows the model to be optimized as a Variational Autoencoder (VAE), where the noise serves as a continuous proxy for the discrete bottleneck.
From Scalar to Vector Quantization
While simple additive noise works for scalar quantization (rounding individual numbers), more complex data structures require different noise strategies.
For example, Luis A. Lastras explored stochastic dithering in Lattice Representation Learning, showing that adding noise before quantization ensures the error distribution is independent of the signal, a property known as the "Crypto-Lemma." This makes the discrete channel mathematically equivalent to an analog channel with additive noise, facilitating unbiased gradient backpropagation.
In the realm of 3D rendering, Haishan Wang and Arno Solin applied this to Compressing 3D Gaussian Splatting. They used Noise-Substituted Vector Quantization (NSVQ) to prevent "gradient collapse"—a common failure in vector quantization where only a few codebook entries are ever updated. By adding random noise that matches the magnitude of the quantization error but points in a random direction, they maintained a healthy gradient flow throughout the training process.
Refining the Proxy with Annealing
A static noise proxy creates a "train-test mismatch": the model trains on noisy continuous values but runs on clean discrete ones. To bridge this gap, researchers have introduced schedules to transition from noise to rounding.
Matteo Spallanzani and Luca Benini proposed the Additive Noise Annealing (ANA) algorithm. They start training with high noise levels, making the quantization function behave like a smooth, differentiable curve. As training progresses, they gradually reduce the noise, "annealing" the function into the sharp staircase required for the final model. Similarly, Dong Liu introduced Stochastic Uniform Annealing (SUA) in On Uniform Scalar Quantization for Learned Image Compression, arguing that interpolating between noise and rounding provides a more robust baseline than static noise alone.
Applications Across Domains
The success of noise-based proxies has enabled end-to-end optimization in fields far beyond simple image storage:
- Video Compression: Guo Lu and Dong Xu used uniform noise to train DVC, the first framework to jointly optimize motion estimation and residual compression.
- Wireless Communication: In Distributed Deep Convolutional Compression for Massive MIMO CSI Feedback, Mahdi Boloursaz Mashhadi and Deniz Gunduz used noise injection to train autoencoders that compress channel state information, allowing base stations to operate more efficiently.
- Model Compression: Alexandre Défossez and the Meta AI team developed DiffQ, which uses "pseudo quantization noise" to let a model automatically learn the optimal bit-width for its own weights, balancing model size and accuracy.
By treating quantization error as a form of differentiable noise, these researchers have turned a non-differentiable obstacle into a signal, allowing the powerful machinery of gradient descent to master the discrete world of compression.