Accuracy is Not All You Need

Abhinav Dutta, Sanjeev Krishnan, Nipun Kwatra, Ramachandran Ramjee

TL;DR

When we compress Large Language Models (LLMs) via quantization or pruning, we usually celebrate if the benchmark accuracy stays the same. This paper reveals a startling "flip" phenomenon: even when aggregate accuracy is preserved, compressed models often change their answers on 10-15% of questions, swapping correct answers for incorrect ones and vice versa. To truly evaluate if a compressed model is a faithful replacement for the original, we must look beyond accuracy and use distance metrics like % flips and KL-Divergence.

What Problem Does This Paper Address?

Deploying LLMs is expensive and slow, leading the industry to rely heavily on compression techniques like quantization (e.g., 4-bit weights) and pruning. Currently, the "gold standard" for validating these techniques is checking if the compressed model maintains accuracy on benchmarks like MMLU or GSM8k.

The authors argue that this is a dangerous oversimplification. Accuracy is an aggregate "capability" metric; it tells you how well a model performs, but not how it performs. If a baseline model and a compressed model both get 70% accuracy, we assume they are equivalent. However, if they are getting different questions right, the compressed model is no longer a drop-in replacement. This divergence can lead to unpredictable behavior in production, especially in generative tasks where "correctness" isn't as easily measured as a multiple-choice question.

Methods and Datasets

The researchers conducted a massive study across various dimensions, testing models like Llama 2, Llama 3, Yi, and Qwen2 against compression techniques including Quantization (Bitsandbytes, GPTQ, AWQ, SmoothQuant), Layer Dropping, and WANDA pruning.

To capture the true impact of compression, they introduced new evaluation metrics:

  • % Flips: The percentage of questions where the answer changed (Correct $\rightarrow$ Incorrect or Incorrect $\rightarrow$ Correct) between the baseline and compressed model.
  • Top Margin: The difference in probability between the model's top choice and its second-best choice.
  • KL-Divergence: A measure of how much the probability distribution of the compressed model's outputs differs from the baseline.

These metrics were evaluated across a comprehensive suite of standard benchmarks, including Multiple Choice (MMLU, ARC), Language Modeling (LAMBADA), Reasoning (GSM8k), and Generative/Dialogue tasks (MT-Bench evaluated by GPT-4).

Key Insights and Ideas

  • The "Flip" Phenomenon: In many cases, a compressed model’s accuracy might drop by less than 1%, but its "flip" rate is over 10%. This means the model is fundamentally changing its internal logic, even if the final score looks stable.
Comparison of Accuracy Change vs. %Flips
  • Flips are Noise, Not Learning: By adding simple Gaussian noise to model weights, the authors could replicate the flip phenomenon. This suggests that flips aren't the model "learning" something new; they are just stochastic errors caused by the approximations inherent in compression.
  • The "Top Margin" Trigger: Flips are most likely to occur when the model has low confidence (a small "Top Margin"). Quantization noise is enough to swap the first and second choices when they are already close in probability.
  • Generative Tasks are the True Test: While MCQ accuracy might hide flips, generative tasks (like those in MT-Bench) expose them. High-flip models were found to "ramble," fail to follow instructions, and make more factual errors in free-form text, even if their MMLU scores were high.
  • Model Size as a Buffer: Larger models (like Llama-70B) exhibit significantly fewer flips than smaller models (7B) when subjected to the same compression. Larger models appear more robust to the "noise" introduced by quantization.

Key Results

  • Distance Correlation: There is a near-perfect Spearman correlation (0.98) between KL-Divergence and % flips, suggesting both are excellent proxies for measuring model divergence.
Correlation between KL-Divergence and %Flips
  • Quantization Impact: Most 4-bit quantization schemes (AWQ, GPTQ, BnB) showed flip rates between 8% and 13.6% on MMLU, despite negligible accuracy changes.
  • MT-Bench Degradation: For Llama2-70B, quantization degraded the MT-Bench score by up to 5%, with the degradation being more pronounced in complex, multi-turn conversations (Turn-2).
  • Pruning vs. Flips: In WANDA pruning and layer dropping, the flip rate increases almost linearly with the amount of compression, even in the "safe" early stages where accuracy remains flat.

Limitations and Future Work

The authors acknowledge that if a model is only ever used for a task identical to the benchmark (e.g., a specific MCQ classifier), accuracy might still be a sufficient metric. Furthermore, while GPT-4 was used as a judge, qualitative assessments of "rambling" or "mistakes" in generative text remain somewhat subjective.

Ultimately, the paper suggests that future compression research should optimize for distance metrics (minimizing flips and KL-Divergence) rather than just maximizing benchmark accuracy. This shift in evaluation could lead to "perceptually" better compressed models that behave much more faithfully to their high-precision counterparts.

Summary updated

BibTeX
@inproceedings{dutta2024accuracy,
  author = {Abhinav Dutta and Sanjeev Krishnan and Nipun Kwatra and Ramachandran Ramjee},
  title = {{Accuracy is Not All You Need}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=QVG7j29Sta},
}
Figure