II · THE IDEA · ARTIFICIAL INTELLIGENCE
Activation Compression via Quantized Training
▶ Listen · narrated
Most of the data moved in a training step is activation tensors. Shrinking those values to a few bits changes what fits on a device and how costly each step becomes.
At a glance
- What it is
- Training so activations can be held as low-bit integers
- Main gain
- Less memory bandwidth for forward and backward passes
- Not only weights
- Activation traffic often dwarfs parameter traffic in training
- Key idea
- Quantisation present in training, not only at deploy time
- Design lever
- How precision is parametrised across layers and tensors
Think of a busy kitchen pass. The recipes on the shelf are the weights: they matter, but they sit still. The plates flying between stations are the activations: every dish produces them, they pile up, and they have to be carried back when something needs reworking. Training is full of those plates.
Activation compression via quantised training means teaching the kitchen to work with smaller plates from the start — fewer distinct sizes and labels — so each trip carries less. You do not only shrink the recipe book after service; you practise service with the small plates so the cooks stop relying on fine distinctions the small plates cannot show. In the model, that means forcing intermediate values through low-bit integers while training, with a scale that maps real ranges onto those integers, so the weights learn under the same limited alphabet they will use later.
The gain is less memory traffic and a smaller working pile between the forward pass and the backward pass. The risk is obvious: if the plates are too coarse, or the mapping onto them is clumsy, quality drops. That is why the research insists on training with the constraint present, and on a careful scheme for scales and mixed precision, not only on picking a small number of bits.
Activation quantisation for training inserts a quantise–dequantise pair on intermediate tensors in the forward pass. A typical uniform scheme maps a real value x through a scale s (and optionally a zero-point z) into an integer grid of a chosen bit width, then dequantises back to a real value used by the next operator: x̂ = s · (clamp(round(x/s − z), qmin, qmax) + z), or an equivalent affine form. Master weights and accumulators may remain in FP16/FP32; the compressed representation is what must be materialised for storage and bandwidth between layers and between forward and backward.
Gradients through the non-differentiable round and clamp are approximated (straight-through estimator or related surrogates) so that parameter updates continue. Because the forward path already carries quantisation noise, the optimiser adapts weights to that noise rather than relying on post-training quantisation alone, which often fails when activation distributions were never constrained.
Mixed-precision work emphasises parametrisation: learned or calibrated scales, per-tensor versus finer granularities, and heterogeneous bit assignments across layers. A uniform low bit width is not always trainable; keeping sensitive layers wider while aggressively quantising others is part of the method. For convolutional inference stacks, quantisation is treated as an end-to-end systems choice interacting with operator fusion and integer datapaths, not only as a tensor codec.
Limitations: range misfit wastes levels; batch-norm and some residual paths can be brittle; backward activations and gradients may need different policies than forward activations; and reported gains are hardware-specific. Correctness is measured by task metric under the deployed numeric path, not by bit width alone.
Look closer
Weights are not the whole bill
Inference discussions often centre on compressed weights. Training is different. Each layer writes activation tensors that must be kept for the backward pass, then read again when gradients are formed. Those tensors are large, short-lived, and repeatedly moved. Quantising activations therefore attacks the traffic that fills device memory and saturates interconnects during a step, not only the static size of the parameter file.
Fake quantisation in the forward path
A common pattern keeps master values in higher precision while inserting quantise-and-dequantise operations in the forward computation. The network then sees the rounding and clipping noise that low-bit integers will impose, and gradients flow through an approximate path so the underlying parameters can still be updated. The model is not merely compressed after the fact; it is trained under the same discrete constraint it will face later.
Parametrisation is the real design choice
Simply declaring fewer bits is incomplete. Scales, zero-points, which tensors stay wide, and how mixed precision is assigned across layers decide whether the discrete representation remains trainable. Work on mixed-precision networks stresses that a careful parametrisation of those choices matters as much as the bit width itself: a poor encoding of scale or a blunt uniform policy can erase the benefit low-bit activations were meant to provide.
The story
When people first meet model compression they usually meet weight quantisation: store each parameter in fewer bits, shrink the file, speed up multiply-accumulate units that prefer integer arithmetic. That story is real, and it is incomplete. In training, and often in high-throughput inference, the dominant moving parts are activations — the intermediate tensors produced layer by layer. They must be written out, retained for back-propagation, and read back when gradients are computed. Their volume scales with batch size, sequence or spatial dimensions, and depth. Compressing only the weights leaves most of that traffic untouched.
Activation compression via quantised training attacks that traffic directly. Instead of waiting until a full-precision network has finished training and then attempting to round its activations, the training procedure itself exposes the network to low-bit integer activations. In practice this often means inserting quantisation and dequantisation into the forward pass so that each activation tensor is forced through a small discrete set of levels — typically integer codes with a scale, and sometimes a zero-point — before the next layer sees it. The rest of the stack may still accumulate in wider precision; the point is that what must be stored and moved can be the narrow integer form.
Why train with that noise rather than bolt it on afterwards? Networks trained entirely in wide floating point learn to rely on fine gradations in intermediate values. A sudden post-hoc quantisation of those values can destroy accuracy because the weights never adapted to the clipped, rounded signals. By making the forward path already discrete during training, the optimiser adjusts weights under the same constraint the deployed system will impose. Gradients with respect to the discrete step are commonly approximated (a straight-through style treatment), so parameter updates remain possible even though the forward values are integer-valued after scaling.
The literature on efficient inference for deep convolutional networks treats quantisation as a system choice that must be validated end to end, not only as a storage trick. Parallel work on mixed-precision networks argues that the decisive ingredient is often the parametrisation: how scales are represented, which layers keep higher precision, and how the discrete codes are tied to continuous parameters the optimiser can move. A uniform bit-width policy across every tensor is rarely optimal; some layers tolerate aggressive activation quantisation, others do not. Getting that assignment right is part of the method, not an afterthought.
The payoff is concrete. Lower-bit activations shrink the working set that must stay on-device between forward and backward passes, reduce bandwidth pressure on memory hierarchies, and can unlock larger batches or deeper models on the same hardware. The same machinery that trains under quantised activations also prepares the model for integer-friendly inference, so the compression is not a one-sided training hack. It is a joint decision about how the network represents intermediate state for its entire life cycle.
None of this removes the need for care. Clipping ranges must track activation distributions; poor range estimation wastes the few bits available. Some operators and some network families are more brittle under activation quantisation than others. The whitepaper tradition is explicit that efficient inference is an engineering stack — numerics, scheduling, and model structure — rather than a single switch. Quantised training of activations is one of the more consequential switches in that stack, because it changes the volume of data the hardware must move on every step.
Why it mattered then
As convolutional networks grew deeper and training batches grew larger, the memory footprint of intermediate activations became a binding constraint on what could be trained on a given accelerator. Weight compression alone did not solve the working-set problem during the backward pass. Methods that quantised activations as part of training offered a path to cut that working set without waiting for a separate post-training compression stage that often failed to recover accuracy. At the same time, hardware paths for low-bit integer arithmetic were becoming practical for inference, so training under the same numeric regime aligned research models with deployable numerics rather than leaving a gap between the two.
Why it matters now
Training and serving large models remains limited by memory capacity and memory bandwidth as much as by peak arithmetic throughput. Activation tensors still dominate traffic in many training configurations, and mixed-precision recipes are now standard rather than exotic. The older lesson — that activations must be quantised in a way the optimiser can live with, and that parametrisation of scales and bit assignments matters — still governs how far low-bit training can be pushed. Anyone deciding where to spend bits on a modern stack is replaying the same trade-offs those papers framed: which tensors stay wide, how discrete levels are calibrated, and whether the forward path the model trains under matches the path it will run under.
The surprising detail
The counter-intuitive claim in the mixed-precision line of work is that bit width is not the whole story. Two networks with the same nominal activation bit width can behave very differently depending on how quantisation is parametrised — how scales enter the computation, which parameters are free, and how mixed assignments are chosen. The “good parametrisation” is presented as what you actually need, not merely fewer bits. That reframes activation compression from a blunt precision dial into a design problem about encoding.
What is disputed
The two source papers frame quantisation for efficient inference and mixed-precision parametrisation; they do not prescribe a single bit width or a universal layer policy. How far activations can be reduced remains model- and hardware-dependent, and claims about exact bandwidth savings should be measured on the target stack rather than assumed from bit width alone.
Remember this
Activations move more data than weights in training; quantise them during training, with a careful parametrisation, or the precision cut will not stick.
Test yourself
A team compresses only the stored weights of a finished network to low-bit integers and leaves activations in wide floating point for training and for the backward pass. Which cost does this miss, and what change in procedure would address it?
It misses the memory capacity and bandwidth cost of activation tensors that must be written, retained for back-propagation, and reread when gradients are formed — often the bulk of traffic in a training step. Addressing it means training with activations quantised in the forward path (quantise–dequantise with a usable gradient approximation) so the model adapts to low-bit intermediate state and those tensors can be stored and moved as narrow integers, with scales and bit assignments parametrised carefully rather than applied as a uniform afterthought.
Go deeper
- [1806.08342] Quantizing deep convolutional networks for efficient inference: A whitepaper · arxiv.org
- [1905.11452] Mixed Precision DNNs: All you need is a good parametrization · arxiv.org
Image: Original diagram, The Daily Triptych. Licence: Original work. Source.