Pruning a network removes weights, and quantization stores the remaining weights with fewer bits. People usually report these savings separately. Doing so hides a cost. A sparse matrix must also record where its surviving weights sit, and at 3–4 bit precision that bookkeeping can cost as much as the weights themselves. Once that cost is counted, many "sparse plus quantized" models stop being cheaper than a plain dense model at slightly lower precision. We propose to ask the question in the units that matter, total bits per weight including position metadata. We also propose a training method that gives the sparse option its best chance. That method is a single noise-based stand-in for the combined "keep the 2 largest of every 4 weights, then round" operation, so gradients flow through pruning and rounding together.
The training idea comes from neural image compression. There, non-differentiable rounding is replaced during training by additive uniform noise of matching magnitude, and true rounding is restored at test time (End-to-end optimization of nonlinear transform codes for perceptual quality). NIPQ carried the same trick into quantization-aware training, where it removed the weight oscillation that plagues the straight-through estimator. The straight-through estimator is the common hack of pretending rounding has gradient one. We extend the noise stand-in from rounding to fine-grained pruning, and we evaluate the result against dense low-bit models trained the same way at equal total bits.
Core Claim
Unstructured sparsity needs 5–9 bits of index per surviving weight (Non-structured DNN Weight Pruning Considered Harmful). At 50% sparsity with 4-bit values, that comes to 4.5–6.5 bits per original weight, which is worse than storing the matrix densely at 4 bits. Hardware 2:4 sparsity requires exactly two nonzeros in every group of four, and the GPU's sparse matrix units can exploit this pattern directly. It needs only 2 bits of position per nonzero. A 2:4 model with $b$-bit values therefore costs $(b+2)/2$ bits per weight, so 2:4 at 4 bits costs the same 3 bits per weight as dense 3-bit. Our claim has two parts. First, the honest comparison for joint compression is 2:4 at $b$ bits against dense at $(b+2)/2$ bits, and almost no paper in our file reports it. Second, 2:4 can win this comparison only when pruning and quantization are trained jointly with a relaxation that never applies a hard mask during training.
Effective Interplay between Sparsity and Quantization motivates the second part. It shows that pruning and quantization errors compound by up to 13% beyond their sum, and that quantizing before pruning fails because coarse bins merge distinct weights and blind magnitude pruning to which weights matter. That study, however, used sequential post-training heuristics on unstructured sparsity. It does not count index bits, and it does not train the two operations together.
The Proxy
Take a group of $M=4$ weights $w_1,\dots,w_4$ with quantization step $s$. Let $\pi_i\in[0,1]$ be a soft keep-probability computed from $|w_i|$ by a temperature-$\tau$ relaxed top-2 within the group, normalized so that $\sum_i \pi_i = 2$. The deployment operator keeps the top two weights and rounds them. Suppose instead we imagine a random version that keeps weight $i$ with probability $\pi_i$ and adds rounding error of variance $s^2/12$. Our proxy matches the first two moments of that random operator:
$$\hat w_i = \pi_i w_i + \sqrt{\pi_i(1-\pi_i)\,w_i^2 + \pi_i\, s^2/12}\;\xi_i,\qquad \xi_i\sim\mathcal N(0,1).$$
The mean $\pi_i w_i$ captures the shrinkage that pruning causes. The first variance term is the uncertainty in whether the weight survives, and the second is rounding noise on survivors. Gradients reach every weight, the step size $s$, and the temperature through a continuous path, and no discrete mask is sampled. That should remove mask flickering by construction rather than damping it with a regularizer.
As $\tau\to0$, $\pi_i$ becomes the hard top-2 indicator. Kept weights then receive exactly NIPQ's rounding noise, and pruned weights get zero mean and zero variance, which is exactly the pruned value. The training operator therefore deforms continuously into the deployed one. The open question is whether the gap between train and test behavior stays small at the end of annealing, and that is what the experiments must settle.
Research Program
We will implement the proxy as a drop-in weight transform. It inherits NIPQ's learnable truncation boundaries, which also lets clipping absorb the outlier weights that JSQ found to inflate quantization ranges; JSQ handles them with simulated annealing instead. The bit budget is the controlled variable. For each budget of 4, 3, and 2.5 bits per weight we train two models with the same noise-proxy recipe and the same compute. One is a 2:4 model at $b$ bits trained with our proxy. The other is a dense model at $(b+2)/2$ bits trained with NIPQ.
We will also log three diagnostics. The first is mask flicker, measured by the Sparse Architecture Divergence metric of SR-STE. The second is how often the final top-2 selection disagrees with the top-2 of the continuous weights. The third is the gap in loss between the proxy forward pass and the hard forward pass across annealing. Finally, we will measure real storage in bytes and real latency on an Ampere GPU using 2:4 integer sparse kernels. These measurements matter because 2:4 Transformer pre-training shows that dense non-matrix layers erode end-to-end speedup.
Baselines
The naive reference point is the dense full-precision model. For ResNet-50 on ImageNet, SR-STE reports 77.3% top-1. The most important competitor is dense low-bit NIPQ at the matched bit budget, because it pays no metadata and no pruning error. NIPQ reports 71.52% top-1 for MobileNet-v2 at about 4 bits, compared with 70.46% for LSQ (NIPQ). We will rerun it at 3 and 2.5 bits with our own budget. Beating it means higher accuracy at equal measured bytes.
The strongest sparse competitor is the best existing 2:4 trainer followed by quantization-aware training. On ImageNet we use Bi-Mask, which reports 77.4% for ResNet-50 at 2:4, and SR-STE, which reports 77.0%. On BERT we use the 2:4 pre-training method of Accelerating Transformer Pre-training with 2:4 Sparsity, which reports a GLUE average of 79.6 against 79.8 dense. Each is followed by NIPQ fine-tuning to $b$ bits, using the same total epochs as our single joint run. We found no reported result on Lacuna for joint 2:4 sparsity with 4-bit weights on ImageNet or GLUE, so we must produce these numbers ourselves.
For language models trained post hoc, the reference is OBR, which reports a 1.4 perplexity increase for Llama2-7B at W4A4KV4 with 50% sparsity. We use it only as context, since our method trains the model. The key ablation keeps everything fixed but replaces our coupled proxy with two independent pieces: SR-STE for the mask and NIPQ noise on the values. This isolates whether coupling the pruning variance to the rounding variance is what matters.
Why not just…?
Why not just stack SR-STE and NIPQ at the same time? This is the real threat. If the decoupled ablation matches our proxy, the contribution shrinks to the iso-bit evaluation alone, and we will say so. Our reason to expect a gap is that SR-STE still applies a hard mask on every forward pass. The mask can therefore flicker while NIPQ's step size is adapting, and NIPQ's own evidence shows that hard-threshold surrogates can fail outright: DiffQ scored 0.04 on CoLA against 59.60 for NIPQ. The flicker logs and the 2.5-bit runs, where the regime is hardest, will settle the question.
Why not just quantize the dense model to fewer bits and skip sparsity? That may simply win, and finding this out is part of the point. Equal-bit dense NIPQ is our main baseline. A loss for 2:4 at a given budget would be a useful negative result, telling practitioners that at that budget the only benefit of 2:4 is speed. The latency measurements will report that benefit separately.
Why not just prune and quantize after training, for example with Wanda or SparseGPT followed by GPTQ, or with the exact 2:4 proximal operator? Sequential post-training pipelines compound error (Effective Interplay) and collapse at aggressive ratios (JSQ). The proximal 2:4 operator reaches C4 perplexity 26.44 on Llama-3.1 8B, compared with 43.30 for Wanda, but it handles sparsity only and takes hours per model. We will include it followed by GPTQ in the OPT-125M experiments as the post-training comparison.
Why not just use Gumbel top-k mask sampling? Gumbel top-k still samples a discrete mask at each step, so it reintroduces flicker as sampling noise. We will include it as a second ablation.
Proposed Experiments and Decisive Checks
We will run ResNet-50 and MobileNet-v2 on ImageNet-1K, BERT-base pre-training with GLUE fine-tuning (including CoLA), and OPT-125M on WikiText-2. For OPT-125M, the Interplay paper reports perplexity 32.51 for pruning-then-quantizing with HBFP6 at 50% sparsity, and 40.86 for the reverse order. Every result is plotted against measured bits per weight including metadata. Unstructured 50% sparsity with explicit index cost is included to confirm, on our own models, the overhead reported in Non-structured DNN Weight Pruning Considered Harmful.
There are three decisive checks. The first is whether joint 2:4 at 4 bits beats dense 3-bit NIPQ at the same 3 bits per weight on ImageNet and GLUE. The second is whether the coupled proxy beats the stacked SR-STE plus NIPQ ablation, with lower mask flicker, especially at 2.5 bits. The third is whether the gap between proxy loss and hard loss shrinks to near zero by the end of annealing. If the first check fails at every budget, we conclude that 2:4 should be chosen for speed and not for storage. If the second fails, the proxy is unnecessary and the iso-bit protocol is the contribution.
References
- End-to-end optimization of nonlinear transform codes for perceptual quality
- NIPQ: Noise proxy-based Integrated Pseudo-Quantization
- Non-structured DNN Weight Pruning Considered Harmful
- Effective Interplay between Sparsity and Quantization: From Theory to Practice
- Compressing Large Language Models by Joint Sparsification and Quantization
- Learning N: M Fine-grained Structured Sparse Neural Networks From Scratch
- Accelerating Transformer Pre-training with 2:4 Sparsity
- Bi-directional Masks for Efficient N: M Sparse Training
- Optimal Brain Restoration for Joint Quantization and Sparsification of LLMs
- A Proximal Operator for Inducing 2:4-Sparsity