Module 9. Rate–distortion and the Information Bottleneck: managing information loss
How to read this module. Sections 9.1–9.8 form the main route. We begin with classical rate–distortion theory, then move to the Information Bottleneck, its variational form, VAEs, and practical compression and quantization. Section 9.9 is a mathematical extension on I–MMSE and Gaussian noising; it can be saved for a second pass. Section 9.10 contains the exercises.
9.1. Why a model may need to forget
Module 6 can leave us with a correct but incomplete intuition: preserving more information is always better. For lossless compression, that is exactly the contract—the decoder must recover the source object perfectly.
Most ML systems solve a different problem.
An image of a handwritten digit contains the digit class, the writer's identity, stroke width, position on the canvas, background texture, and sensor noise. A digit classifier can discard some of these differences. A writer-identification system cannot. Exact reconstruction needs still more detail.
The same information may be:
- useful signal for one task;
- nuisance variation for another;
- an indispensable part of the source for a third.
The word “irrelevant” therefore has no meaning without a task.
JPEG may discard fine high-frequency detail to produce a smaller file. A neural codec may spend more bits on a face than on a smooth background. A classifier encoder may suppress illumination while preserving shape. An LLM quantizer may round many weights aggressively as long as the predictive distribution changes little.
All of these systems face the same question:
What is the minimum amount of information that must be retained to keep performance acceptable under a chosen criterion?
A bottleneck is not an instruction to forget as much as possible. It is a contract: what may be lost, at what cost, and for which task.
This module connects four constructions:
- rate–distortion theory asks how many bits are needed at a permitted level of loss;
- the Information Bottleneck (IB) derives the cost of forgetting from a variable we want to predict;
- the Variational Information Bottleneck (VIB) and VAE replace inaccessible information quantities with trainable variational objectives;
- learned compression and quantization show when an abstract “rate” becomes an actual number of bits and when it remains a useful surrogate.

The recurring pair of concepts is:
- rate—how much information passes through the representation;
- distortion—what quality is sacrificed to reduce that rate.
Unless stated otherwise, classical rate–distortion formulas use bits. Variational ML objectives are usually implemented with natural logarithms and measured in nats. We will state the logarithm base whenever it changes a numerical coefficient.
9.2. Rate–distortion theory: how much information must be retained
From two extreme codes to an entire curve
Let
with Hamming distortion
Two solutions are immediate.
Exact coding. Perfect recovery asymptotically requires
Zero rate. Send nothing and always reconstruct . The rate is zero and the average distortion is
An entire family of compromises lies between these points. If we allow average distortion , the optimal asymptotic rate is already
Rate–distortion theory describes this boundary: how much information is unavoidably required at each permitted reconstruction quality.
Formal setup
Let a source produce , and let the decoder construct a reproduction in a reproduction alphabet . A distortion function
assigns a cost to replacing by .
Common choices include:
- Hamming distortion: ;
- squared error: ;
- negative log-likelihood under a reconstruction model;
- KL divergence between the outputs of the original and compressed models;
- a perceptual distance in feature space;
- degradation on a downstream task.
For a discrete memoryless source, the rate–distortion function is
The conditional distribution is called a test channel. It need not be a physical communication channel or a finished coding algorithm. It specifies the desired joint law of source symbols and reproductions: which substitutions are allowed and how often they occur.
Why mutual information becomes a bit rate
At first sight, the definition contains neither files nor codewords—only mutual information. Its operational meaning appears over long blocks.
Under the standard assumptions, Shannon's theorem states that:
- every rate above is asymptotically achievable at average distortion no larger than ;
- every rate below is asymptotically insufficient.
The encoder does not have to describe each source symbol independently. It codes a long typical block and exploits the repeated statistical structure of the source. Once optimized over the test channel, mutual information becomes the minimum number of bits per source symbol.
This is the same intellectual move as in lossless source coding: local probabilities become the global geometry of long sequences.
The geometry of the trade-off
The function is non-increasing and convex. Allowing more distortion cannot raise the minimum required rate. Convexity says that time-sharing between two coding regimes performs no worse than the corresponding average trade-off.
Zero rate is reached at
because a decoder that receives no message can only emit a fixed reproduction.
The statement requires assumptions. It holds for a finite discrete source when zero distortion requires exact reproduction. For a continuous source with squared error, one generally has
because an exact real number requires unbounded precision.
In practice, one often optimizes the Lagrangian
At a differentiable operating point,
Thus is a local exchange rate: how much additional rate we are willing to pay for a reduction in distortion. The same geometry will reappear in IB, VAEs, and learned compression.
Two benchmark sources
For , , under Hamming distortion,
For a Gaussian source
under squared error, using base-2 logarithms,
In this particular model, halving the MSE costs another bit per real-valued source symbol.

Distortion is not supplied by nature
This is where an overly broad conclusion is tempting. The theory finds the optimal code for a specified distortion function. It does not decide which errors matter to a person or a downstream system.
MSE aligns conveniently with a Gaussian likelihood and PSNR, but it may penalize a small image shift heavily and reward an averaged, blurry reconstruction. A perceptual loss may preserve visual structure better, but it inherits the assumptions of the selected feature network. For a compressed LLM, a natural distortion may be an increase in NLL or a KL divergence between predictive distributions rather than weight MSE.
Visual compression introduces a third object as well: the perceptual plausibility of the reconstruction distribution. Low expected distortion and realistic-looking samples are not identical goals; imposing an additional perception constraint generally raises the achievable rate–distortion boundary.
This does not weaken the theory. It forces us to name what engineering discussions often hide inside the word “quality.”
9.3. Information Bottleneck: preserve what matters for
Classical rate–distortion theory asks the engineer to provide . In representation learning, however, it is often unclear in advance which differences between inputs should matter.
Consider two images of the same digit. Their pixels, handwriting style, and background may differ. If their conditional label distributions are nearly identical, a classifier benefits from treating them as similar. If the target variable is writer identity, the same differences become relevant.
The Information Bottleneck lets the prediction task define the cost of forgetting.
Let be a relevant variable and let a representation be constructed only from :
We want to:
- reduce , so the representation does not carry every detail of the input;
- preserve , so it retains predictive information about the target.
One constrained formulation is
Its Lagrangian form is
Under this convention, larger places more value on preserving information about . Other papers use inverse parameterizations, so the coefficient must be interpreted from the objective rather than from the letter itself.

Predictive distortion emerges from the task
The Markov chain implies
Conditional mutual information can be written as an expected KL divergence:
Therefore,
Define
Then
The final term does not depend on the encoder. IB is therefore a rate–distortion problem in which distortion measures damage to the prediction of , not a geometric distance between an input and its code.
This is one of the central results of the module:
Two inputs may share a code when merging them barely changes what can be predicted about the target.

If
then
and the representation preserves all target information available in the input. In that predictive sense, it is sufficient for . IB seeks not merely a sufficient representation, but one that is as compact as possible among sufficient representations.
The self-consistent solution
For finite alphabets, a stationary point of the classical IB problem satisfies
The form is familiar from Module 8. Base mass is exponentially tilted toward codes with low predictive distortion.
The equation is self-consistent because:
- depends on ;
- also depends on ;
- and is computed from both of them.
Iterations related to Blahut–Arimoto find a consistent soft clustering. In a large neural network, the true is unknown, the spaces are enormous, and mutual information is inaccessible directly. The next step is therefore variational.
9.4. Variational Information Bottleneck: making IB trainable
The classical objective contains three inconvenient objects:
- the unknown true ;
- the aggregate representation distribution ;
- high-dimensional mutual information terms that are hard to estimate.
VIB replaces each of them with a trainable probabilistic model.
Let the encoder define a stochastic representation
let a classifier define a variational decoder
and choose a simple prior , such as .
Relevance: the classifier supplies a lower bound
For any ,
Hence
Cross-entropy is not literally . Subtracting it from provides a trainable lower bound on relevance. The better the decoder approximates the true , the tighter the bound.
Rate: KL to a prior supplies an upper bound
Define the aggregate representation distribution
Then
Therefore,
The average KL pays two bills:
- information about the particular input that genuinely passes through ;
- mismatch between the aggregate code distribution and the chosen prior.
If , the second bill vanishes. With a simple fixed prior, it usually remains.
The trainable objective
A standard minimized VIB objective is
The first term pays for lost predictive information. The second charges for representation capacity.

For a diagonal Gaussian encoder,
with , the KL is analytic:
This is already a familiar ML loss. Large is expensive; an excessively narrow conditional distribution is expensive too, because it can transmit a great deal of information about a specific .
Sampling uses the reparameterization
The stochasticity is more than a differentiation trick. It makes probabilistic capacity definable and controllable; the particular rate is finite when the chosen KL is finite.
What VIB actually guarantees
The positive result is already substantial: an ordinary trainable loss now has an exact information-theoretic origin, with one term for prediction and one for representation cost.
The precise objects are:
- the classification term is a variational bound on relevance;
- the KL term is an upper bound on ;
- the rate gap depends on mismatch between and ;
- low rate is an inductive bias, not a universal certificate of generalization or robustness.
In experiments, it is therefore useful to log the terms separately: predictive NLL, average KL, the number of active dimensions, and held-out performance. A single scalar selects a trade-off, but it does not automatically explain where the model spent its information budget.
9.5. The VAE as a rate–distortion system
VIB preserves information about an external target . A VAE has no such target: the model must explain the observation itself through a latent variable .
The generative model is
and the encoder approximates the posterior:
For one observation,
As shown in Module 4,
Thus the ELBO is both a trainable lower bound on log-likelihood and an exact variational-inference objective.
Averaged over data, the negative ELBO becomes
It is worth pausing to read this formula in words:
A VAE pays for how hard the observation is to reconstruct from the latent and for how much information the latent consumes relative to the prior.
The decoder likelihood defines distortion
If
with fixed , then
Distortion is proportional to MSE. The coefficient matters: changing the assumed noise changes the exchange rate between reconstruction and rate even when the explicit remains one.
A Bernoulli decoder yields binary cross-entropy. A categorical decoder yields a multiclass NLL. Choosing a likelihood means choosing the geometry of errors, not merely selecting an output layer.
Rate contains information and prior mismatch
Let
Then
The VAE KL therefore pays for:
- information about the particular object ;
- mismatch between the aggregate code distribution and the prior used by the generative model.
The second term matters for generation and coding: the decoder must be able to obtain latents from the distribution declared as the prior.

VAE, -VAE, and IB: shared geometry, different problems
A -VAE minimizes
Larger penalizes use of the latent channel more strongly. Across well-optimized models, this usually shifts the operating point toward lower rate and higher distortion, although non-convex optimization does not guarantee perfect monotonicity across individual runs.
The conventions must not be mixed up:
- in , larger protects relevance more strongly;
- in , larger penalizes rate more strongly.
A standard VAE is best understood as a variational rate–distortion system for generative modeling and reconstruction. It is related to IB through the same bottleneck mathematics, but it is not literally supervised IB: there is no external , and the usefulness of the latent is defined by .
Posterior collapse
A sufficiently powerful decoder may model well while barely using :
This is posterior collapse. From the ELBO's perspective, the model has found a cheap solution: it stopped paying for the latent channel. From the perspective of a task that needs an informative latent, this is a failure.
Common ways to manage the regime include:
- KL warm-up;
free bits, or a small free capacity per dimension;- an explicit target capacity rather than immediate pressure toward zero;
- a less dominant decoder;
- a more expressive prior;
- monitoring active latent dimensions and achieved rate.
Disentanglement does not follow from one coefficient
A stronger rate penalty may encourage simpler and more factorized latents. The objective , however, does not force coordinates to align with the “true” factors of the data.
Without inductive assumptions about the data or architecture, or some weak supervision, unsupervised disentanglement is generally non-identifiable. A -VAE is a useful capacity-control mechanism, not an automatic extractor of semantically correct axes.
Optional: IWAE
IWAE uses samples:
Under standard conditions,
A tighter likelihood bound can improve density estimation, but it does not automatically yield a more interpretable or more useful representation. It also changes the encoder's gradient geometry, so “better bound” and “better latent” are different questions.
9.6. When rate becomes actual bits
In VIB and VAEs, “rate” has so far meant an information cost inside a probabilistic model. A file still requires a coder and a precise protocol—the same lesson as in Module 6.
Two cases are particularly instructive.
Learned lossy compression
A modern neural codec typically constructs:
- a continuous latent ;
- a quantized latent ;
- an entropy model ;
- a reconstruction .
A typical objective is
If is then used by a compatible arithmetic or ANS coder, the first term has a literal interpretation as an expected bit count, up to finite-length, rounding, and metadata overhead.
A codec with a hyperprior sends both main and side latents:
The hyperlatent adds its own bill but may improve prediction of enough to reduce the total rate. This is a useful example of how adding a variable can improve compression rather than worsen it.
During training, hard rounding is usually replaced by a differentiable approximation such as uniform noise, a straight-through gradient estimate, or another surrogate. Evaluation must return to the true quantizer and a physical bitstream.
ELBO as codelength: bits-back
The VAE connection to coding can also be literal. Consider one observation and a latent .
A naive code would pay
The encoder, however, knows . In a bits-back scheme, some random bits are used to draw ; after decoding, those bits can be recovered by encoding under again.
The net length for the selected is
With base-2 logarithms, averaging over gives exactly
The negative ELBO is therefore more than a convenient loss. Under a suitable bits-back implementation, it is the expected net codelength of the latent-variable model.
The practical protocol is more involved than the formula: it needs seed bits, a synchronized operation order, finite precision, and a stack-like coder such as ANS. Yet the mechanism explains why variational inference quality affects compression—a large variational gap means the code fails to recover as many bits as it could.
Quantizing LLM weights: the same discipline, not the same code
Let trained weights be replaced by . The phrase “4 bits per parameter” specifies only nominal precision. The actual size may also include:
- group scales;
- zero-points;
- codebooks and indices;
- outliers retained at higher precision;
- alignment, packing, and headers.
Distortion must also be defined. Possibilities include
or an increase in NLL or downstream error.
The same weight MSE in two parameter-space directions can have radically different functional effects. Quantization methods therefore search for better distortion surrogates:
- GPTQ uses approximate second-order information for sequential error compensation;
- AWQ uses activation statistics to identify important channels;
- SmoothQuant uses an equivalent rescaling to move part of the quantization difficulty between activations and weights.
These methods fit naturally into rate–distortion language: they allocate a limited budget non-uniformly where errors are most costly. They do not prove that a Shannon has been attained for a universal source of model weights.

9.7. Building an honest rate–distortion curve
One model at one value of or one bit-width is not a trade-off. It is a single point, and it may simply be poorly optimized.
A useful experiment constructs a series:
- fix the training and evaluation distributions;
- define rate precisely;
- define distortion precisely;
- sweep , , capacity, or bit-width;
- retain the non-dominated points—the empirical Pareto frontier;
- measure latency, memory, and hardware cost separately.
The same words refer to different objects in different problems:
| Setting | What plays the role of rate | What plays the role of distortion | Actual bits? |
|---|---|---|---|
| VIB | average encoder KL to a prior | predictive NLL | usually no; it is an upper bound and regularizer |
| VAE | average KL from to | possible through a full bits-back protocol | |
| learned codec | NLL of quantized latents under the entropy model | MSE, MS-SSIM, perceptual, or another chosen measure | yes, after entropy coding |
| quantized LLM | actual weight and metadata size | NLL increase, output KL, or task quality | yes for size; distortion remains an engineering choice |
Before publishing a polished curve, ask four questions:
- Is rate measured per pixel, object, parameter, token, or latent coordinate?
- Are metadata and entropy-model parameters included?
- Is distortion evaluated on held-out data, and does it match the user's task?
- Does an average hide a small number of catastrophic errors?
There is also an engineering boundary: a smaller file does not guarantee faster inference. Awkward unpacking, unsupported precision, or additional memory traffic may erase the gain. Information theory supplies one axis; the deployed system adds a computational axis.
Rate–distortion is not the name of one metric. It is a discipline for specifying the problem.
9.8. The information plane: an objective or a description of training dynamics?
The Information Bottleneck as a normative principle is precise: we choose a stochastic map and optimize an explicit objective.
A stronger claim says something different: an ordinary deep network trained with standard SGD and no IB regularizer supposedly follows a characteristic trajectory in the plane
Early work proposed two phases:
- fitting—information about labels increases;
- compression— falls while remains nearly stable.
It is an appealing story: the network first learns to predict and then forgets input detail. The debate around it proved more useful than the slogan because it forced a basic question: what exactly is plotted on the axes?
For a deterministic network , two regimes arise.
If is discrete, then
If the map is injective on the support,
so true mutual information need not decrease during training.
If is continuous and is deterministic, the joint law often lies on a lower-dimensional set, and mutual information in the standard continuous formulation may be infinite.
To obtain a finite, changing quantity, an analyst adds noise, quantization, or binning. But this defines the MI of a particular noisy or quantized model, not an abstract “information in the layer.”
Saxe and coauthors showed that the observed compression phase depends on activation functions and the estimator. Goldfeld and coauthors clarified that earlier binning estimates could track geometric clustering of same-class representations even when they did not estimate the literal true MI of a deterministic layer.

The right conclusion is not that information planes are forbidden, but that claims have levels:
- normative IB is a precise optimization problem;
- VIB is a specific trainable variational realization;
- the information plane of a noisy network is meaningful after noise and the estimator are defined;
- a universal spontaneous IB trajectory for all deep networks is an empirical hypothesis, not a consequence of DPI.
This is a recurring habit of the course: define the random variables and distributions first, and interpret the picture second.
9.9. Mathematical extension: I–MMSE and Gaussian noising
This section is not required for VIB or VAEs. It gives another exact bridge between retained information and reconstruction quality.
Rate–distortion theory asks how much information is needed for a specified MSE. The I–MMSE identity asks a local inverse question:
How quickly does mutual information grow when the SNR of a Gaussian observation is increased slightly?
Consider
with .
Define
For mutual information measured in nats,
For bits, the right-hand side is additionally divided by .
For every finite ,
The statement is literal: the area under the optimal reconstruction-error curve equals the information accumulated through the Gaussian channel.
The Gaussian example closes the loop
Let
Then
and
Write the achieved reconstruction error as
Then
so
In bits, this is exactly the Gaussian rate–distortion function:
Two parts of the module meet in one formula: optimal estimation error along a Gaussian channel reproduces the rate–distortion boundary of a Gaussian source.

Why the infinite-SNR integral needs care
For discrete with finite entropy, one typically has
as .
For a non-degenerate absolutely continuous , mutual information usually grows without bound. Therefore, without an additional renormalization, one cannot write
For a standard Gaussian input, the integral diverges as even though differential entropy is finite. Once again, a discrete intuition cannot be moved to the continuous case without checking the reference measure.
Connection to diffusion models
The forward noising process in a DDPM is
After rescaling, this is a Gaussian channel with
For the true noised distribution, Tweedie's formula gives
The exact score determines the posterior mean, the MSE-optimal denoiser. Score learning can therefore be read as learning a family of optimal reconstructors across noise levels.
I–MMSE alone, however, does not determine:
- the weighting of every diffusion training objective;
- a perceptually optimal noise schedule;
- the number of sampling steps;
- an equivalence between diffusion, flow matching, and IB.
Variational Diffusion Models connect a continuous-time variational bound to SNR and establish important schedule-invariance properties. That is additional structure from a particular probabilistic model, not an automatic consequence of I–MMSE alone.
9.11. What to carry forward
Information loss is useful only relative to a task. Differences that are irrelevant to a classifier may be essential to a reconstructor or to another target variable.
Rate–distortion theory gives a fundamental limit only after the source and the cost of error have been specified:
The Information Bottleneck makes distortion predictive:
VIB turns inaccessible mutual information terms into a trainable objective, using a lower bound on relevance and an upper bound on rate.
A VAE is naturally read in rate–distortion coordinates:
This makes VAEs relatives of IB, not the same optimization problem. The VAE has no external ; its reconstruction likelihood defines what counts as useful information.
In an actual codec, rate must reach a bitstream. Latent NLL, a KL regularizer, nominal precision, and physical file size are related but distinct quantities.
An information plane is meaningful only after randomness and the estimator have been defined. Normative IB is a theorem and an objective; spontaneous IB dynamics in an ordinary network is an empirical hypothesis.
Finally, I–MMSE provides another reading of information: accumulated ability to reconstruct a signal optimally as SNR increases. For a Gaussian source, this connection returns exactly to the rate–distortion function and closes the module.
Primary sources
- C. E. Shannon, Coding Theorems for a Discrete Source With a Fidelity Criterion.
- N. Tishby, F. Pereira, W. Bialek, The Information Bottleneck Method.
- A. Alemi et al., Deep Variational Information Bottleneck.
- D. P. Kingma, M. Welling, Auto-Encoding Variational Bayes.
- Y. Burda, R. Grosse, R. Salakhutdinov, Importance Weighted Autoencoders.
- C. Burgess et al., Understanding Disentangling in -VAE; F. Locatello et al., Challenging Common Assumptions in the Unsupervised Learning of Disentangled Representations.
- J. Ballé et al., Variational Image Compression with a Scale Hyperprior; J. Townsend, T. Bird, D. Barber, Practical Lossless Compression with Latent Variables using Bits Back Coding.
- Y. Blau, T. Michaeli, Rethinking Lossy Compression: The Rate-Distortion-Perception Tradeoff.
- E. Frantar et al., GPTQ; J. Lin et al., AWQ; G. Xiao et al., SmoothQuant.
- A. Saxe et al., On the Information Bottleneck Theory of Deep Learning; Z. Goldfeld et al., Estimating Information Flow in Deep Neural Networks.
- D. Guo, S. Shamai, S. Verdú, Mutual Information and Minimum Mean-Square Error in Gaussian Channels.
- J. Ho, A. Jain, P. Abbeel, Denoising Diffusion Probabilistic Models; D. P. Kingma et al., Variational Diffusion Models.