Pruning Away Overconfidence: Contrastive Activation Scores for Calibrated LLM Sparsity

When engineers compress a large language model by deleting half its weights, they choose which weights to keep with a simple rule. The most common rule multiplies each weight's size by how strongly its input channel fires on a small sample of text. That rule protects the channels that fire hardest. Separate work on calibration, meaning how well a model's stated confidence matches how often it is right, points to a problem with this. Confidently wrong predictions tend to come with unusually large internal activations. So the standard pruning rule may be protecting some of the machinery behind overconfidence.

This note proposes a small change to the rule. Measure activation strength separately on examples the model gets right and on examples it gets confidently wrong. Then keep weights whose channels carry the first kind of signal, and let weights whose channels light up mainly on the second kind be pruned first. The score needs forward passes only, costs about the same as the standard rule, and adds one tuning knob. The claim to test is that, at equal sparsity and equal accuracy, the resulting sparse model is better at separating its right answers from its wrong ones. That separation is something a post-hoc temperature correction cannot supply.

Core Claim

The reference point is Wanda (A Simple and Effective Pruning Approach for Large Language Models). Wanda scores weight $W_{ij}$ by $|W_{ij}|\cdot\|X_j\|_2$, where $\|X_j\|_2$ is the norm of input channel $j$ over calibration text. It then prunes the lowest scores within each output row. This works for accuracy: on LLaMA-65B at 50% sparsity it keeps 66.67% mean zero-shot accuracy, against 66.97% dense and 62.74% for magnitude pruning.

The motivating evidence comes from calibration work on vision models. Feature Clipping for Uncertainty Calibration finds that high-calibration-error samples have larger, heavier-tailed penultimate features. Clipping those features at test time cuts ResNet-50 CIFAR-100 expected calibration error from 17.52% to 3.98%, which beats temperature scaling at 5.72%. Mitigating Neural Network Overconfidence with Logit Normalization traces overconfidence to growing logit norms. Wanda's statistic cannot see this distinction, because it pools correct and confidently wrong inputs into a single norm.

We split a small labeled calibration set into two groups. The first, $C$, holds examples the dense model answers correctly. The second, $E$, holds examples it answers wrongly with confidence above a threshold. The score is

$$S_{ij} = |W_{ij}|\cdot\|X_j\|_2\cdot\left(\frac{\bar a_j^{C}}{\bar a_j^{E}}\right)^{\beta},$$

where $\bar a_j^{C}$ and $\bar a_j^{E}$ are the per-token root-mean-square activations of channel $j$ on the two groups, and $\beta\ge 0$ controls how strongly the contrast is weighted. Setting $\beta=0$ recovers Wanda exactly. The ratio is dimensionless and computed per channel, so the "massive" outlier channels that every input uses keep a ratio near one and stay protected. Channels are penalized only when they are selectively louder on confident errors. Pruning then proceeds per output row, as in Wanda. The new question is whether the choice of which weights to delete, and not only how many, is a lever on calibration.

Relation to Prior Work

The closest work is Calibration-Preserving Pruning: Compression as a Reliability Contract. It blends Wanda or SparseGPT scores with squared gradients of a conformal nonconformity score. On DBpedia-14 at 50% sparsity it shrinks 90%-coverage prediction sets from 10.1 to 8.6 labels. It is limited to fixed-label classification heads, it requires per-example gradients (over 8x the offline cost of Wanda in its threshold-aware form), and it does not ask where overconfidence lives inside the network.

Our proposal differs in three ways. It uses no gradients, only two activation passes. It targets confidence discrimination on multiple-choice reasoning benchmarks, not conformal set size on classifiers. And it tests a specific mechanism: selectively loud channels.

Two papers motivate the gap. When Quantization Affects Confidence of Large Language Models? shows that 4-bit GPTQ roughly adds 10% calibration error on HellaSwag for LLaMA-7B, while confidence on errors stays near 0.95. It studies quantization only and proposes no fix. Self-calibration for Language Model Quantization and Pruning shows that pruning is very sensitive to the calibration data distribution. We read that as a sign that data composition, here the right-versus-wrong split, can change which weights survive. Its use of "calibration" means collecting activation statistics, not uncertainty.

Two papers constrain the design. Rethinking Pruning Large Language Models shows that fitting small calibration sets too aggressively overfits them. This warns that a labeled $E$ set of a few hundred examples could be memorized. We therefore require transfer to held-out benchmarks. The Surprising Effectiveness of Deleting Weights in LLM Reasoning and Adaptation shows that deleting under 0.05% of MLP gate weights can match full fine-tuning. That is evidence that targeted deletion can change behavior, and it supplies our secondary low-sparsity experiment.

Research Program

The first step is diagnostic and needs no new method. For Llama 3.1 8B, Mistral 7B, and Qwen2.5-1.5B, we compute per-channel $C$-versus-$E$ activation ratios in every linear layer, using labeled MMLU development and validation questions. We then ask whether a heavy tail of channels exists that are louder on confident errors. Feature Clipping reports this in penultimate layers of vision models; no reported result found on Lacuna for the equivalent in transformer LLMs.

If the ratio distribution is flat, the contrastive score has no signal, and the project reports that negative result instead of a method.

If the tail exists, we build the score above. The number of $E$ examples (from 128 to 1,024) is a studied variable, and $\beta$ and layer placement (all layers versus the last third) are tuned on a disjoint validation split. We follow CPP's disjoint protocol throughout, with separate splits for mask selection, hyperparameter choice, temperature fitting, and testing.

Beyond 50% unstructured sparsity, we test 2:4 semi-structured sparsity, where Wanda is known to lag SparseGPT. We also plug the ratio term into SparseGPT's selection step, to see whether the effect carries beyond one base score.

A secondary experiment asks whether contrastive deletion at very low sparsity, around 0.1% of weights, recalibrates a dense model. This is a cheap, training-free counterpart to the mask-learning approach of Bit-Mask Tuning.

Baselines

The naive reference point is the dense model, plus the same model pruned by magnitude, both evaluated with and without temperature scaling. The dense numbers set the calibration ceiling that compression is measured against. Magnitude pruning shows how much damage a context-free rule does.

The primary competitor is Wanda at the same sparsity. It uses the same model, the same total number of calibration tokens (the union $C\cup E$, so data volume is matched), and the same per-row comparison. It is the natural baseline because our method is Wanda plus one term. It is also the strongest cheap pruner, with the LLaMA-65B figure of 66.67% cited above. SparseGPT runs under the same protocol, as does a SparseGPT variant with our ratio term. For calibrated LLM pruning, no reported ECE result found on Lacuna for Wanda- or SparseGPT-pruned models, so we measure these ourselves.

The strongest existing calibration-aware pruner is CPP. The comparison runs on its own ground: Qwen2.5-1.5B on AG News, TREC, DBpedia-14, Banking77, and CLINC150 at 50% sparsity, with 90% coverage and CPP's four-way split. The target is CPP-SparseGPT's DBpedia-14 set size of 8.6 labels. Beating it means a smaller mean set size at equal coverage and equal-or-better accuracy. Matching it at about one-eighth the offline compute counts as a practical win, and we will report it as such.

Every method, including baselines, gets temperature scaling fitted on the same held-out split before calibration metrics are reported. This way, gains cannot come from a fixable global shift.

Three ablations isolate the key ingredient. The first uses a random split, replacing the $C$/$E$ labels with a random partition of equal sizes, to test whether the contrast carries information or merely adds noise that happens to regularize. The second calibrates Wanda on $C$ only, which tests whether the gain comes from contrast or simply from calibrating on correct examples. The third sets the $E$ group to all wrong answers regardless of confidence, which tests whether confident errors specifically matter.

A win over Wanda requires three things together: zero-shot accuracy within 0.5 points; lower post-temperature-scaling ECE and higher AUROC for correctness prediction on benchmarks outside the calibration source; and a gap that the random-split ablation does not reproduce.

Why not just…?

Why not just prune with Wanda and then apply temperature scaling? This is the cheapest fix and it will remove much of any average overconfidence. That is exactly why every method in our comparison gets it. A single temperature mostly rescales confidence across all inputs and cannot move confidently wrong examples below correct ones. Feature Clipping reports temperature scaling leaving 5.72% ECE where input-selective intervention reaches 3.98%. Our primary metrics are therefore post-scaling ECE and correctness AUROC. If Wanda plus temperature scaling matches our method on both, the idea fails, and the experiment is built to show that plainly.

Why not just clip activations at inference on the pruned model? This is the most serious alternative. Feature Clipping is simple and addresses the same mechanism. We run it as a baseline on Wanda-pruned models, with the clip threshold tuned on the same validation split. Two differences could matter. Clipping is a uniform threshold, while our score is channel-selective and learned from the $C$/$E$ contrast. And our change is baked into the weights, so it needs no inference hook and survives export to sparse kernels. If clipping on top of Wanda equals our method, we will report that the calibration benefit comes from damping large activations, not from choosing weights. We will then recommend clipping as the simpler option.

Why not just attach a calibration probe or fine-tune for calibration? Probes such as PROBECAL in Uncertainty Calibration for Tool-Using Language Agents reach very low ECE (0.690 to 0.035 on TabMWP). LoRA fine-tuning in Large Language Models Must Be Taught to Know What They Don't Know cuts open-ended ECE from about 30% to 10%. Both add training and extra parameters. The same work notes that post-hoc calibrators degrade when the underlying model changes, and pruning is such a change. We do not claim to beat a trained probe. The claim is narrower: when compression happens anyway, choosing masks well should give calibration for free. We report a probe trained on the pruned model as an upper reference, not as a competitor.

Proposed Experiments

The main experiment prunes Llama 3.1 8B, Mistral 7B, and LLaMA-7B at 50% unstructured and 2:4 sparsity. The calibration set is MMLU development and validation questions. Evaluation covers the MMLU test set, plus ARC-Easy, BoolQ, PIQA, HellaSwag, and OpenBookQA as held-out transfer tasks, and GPQA as a harder, shifted task. Metrics follow the quantization study: accuracy, ECE, adaptive calibration error, mean confidence on errors, and entropy. We add correctness AUROC and selective accuracy at 80% coverage, plus WikiText-2 perplexity to check general language modeling. HellaSwag on LLaMA-7B enables a direct comparison with the reported roughly 10% calibration-error increase under GPTQ.

The decisive check is transfer. Masks chosen with MMLU-derived $C$/$E$ statistics must improve calibration on commonsense benchmarks never seen during mask selection. If gains appear only on MMLU, the method is fitting its calibration set, which is the overfitting trap Shin et al. describe. It would then be discarded.

A second decisive check sweeps $\beta$ and traces the accuracy–calibration frontier. The idea stands only if some $\beta>0$ improves calibration at no measurable accuracy cost, beyond what the random-split ablation achieves.

The CPP head-to-head on the five classification datasets, and the 0.1% deletion experiment on dense models, complete the picture. The first tells us whether cheap activation contrast recovers most of what gradient-based saliency buys. The second tells us whether deleting a few confidence-carrying weights is useful on its own as a recalibration tool.