Understanding the Effect of Model Compression on Social Bias in Large Language Models

Gustavo Gonçalves, Emma Strubell

Introduction

As Large Language Models (LLMs) continue to scale in both parameter count and training duration, they increasingly mirror the complexities—and the flaws—of the datasets they consume. These models effectively "inhale" social biases present in web-scraped text, leading to representational harms related to gender, race, and religion. Previous research has established a troubling trend: as models become more performant and "smarter," their internal biases often become more entrenched.

While the field has developed specialized debiasing techniques and various compression methods to optimize models for deployment, the intersection of these two domains remains under-explored. This paper investigates whether model compression—specifically quantization and knowledge distillation—serves as an accidental amplifier of bias or if it can be leveraged as a tool for fairness by pruning away harmful associations.

Methodology

To understand the relationship between model size, performance, and bias, the study employed a controlled experimental framework focusing on two primary compression techniques:

  1. Dynamic Post-Training Quantization (PTQ): This process involves reducing the precision of model weights and activations from 32-bit floating point (fp32) to 8-bit integers (int8), significantly reducing memory footprint.
  2. Knowledge Distillation: This technique involves training a smaller "student" model (e.g., DistilBERT) to replicate the output distributions and behavior of a larger, more complex "teacher" model.

These techniques were applied across a diverse set of architectures, including BERT, RoBERTa, and the Pythia family (ranging from 70M to 6.9B parameters). To ensure a robust evaluation of bias, the authors utilized Bias Bench, a meta-benchmark aggregating three critical datasets:

  • CrowS-Pairs: Evaluates preferences for stereotypical versus anti-stereotypical sentences.
  • StereoSet (SS): Measures stereotypical bias across multiple categories while monitoring a "Language Model (LM) Score" to ensure linguistic utility is maintained.
  • SEAT (Sentence Encoder Association Test): Analyzes the distance between sentence embeddings to identify biased associations, such as those between gender and specific career paths.

For the Pythia models, the researchers analyzed checkpoints throughout the pretraining process on "The Pile" to observe how bias evolves alongside model maturity.

Analysis of Compression as a Regularizer

The study reveals a strong positive correlation between a model's language modeling proficiency and its social bias. As models improve at predicting the next token, they simultaneously become more adept at reflecting the biases inherent in their training data.

Surprisingly, the research suggests that compression methods can act as a form of regularization. By forcing the model to operate with fewer parameters or lower precision, quantization and distillation appear to "forget" or prune away some of the more nuanced stereotypical associations. In many instances, these compression techniques actually outperformed specialized debiasing algorithms like Counterfactual Data Augmentation (CDA) or Dropout-based methods.

Key Results and Findings

The Impact of Quantization and Distillation

Experimental results demonstrated that compression significantly mitigates representational harm:

  • Quantization Gains: Applying int8 quantization to RoBERTa Base reduced its Gender bias score on the CrowS-Pairs benchmark from 60.15 to 53.64 (where 50.0 represents an ideal, unbiased state).
  • Distillation Efficacy: Distilled models frequently achieved the lowest overall bias scores. DistilBERT, for instance, consistently outperformed its larger teacher models in the RACE and RELIGION categories across both CrowS-Pairs and StereoSet.
  • Efficiency Trade-offs: Dynamic PTQ emerged as a superior method for balancing fairness and utility. It significantly reduced bias while preserving the LM Score more effectively than distillation.

Scaling and the "Sweet Spot"

Analysis of the Pythia family confirmed that both LM performance and bias scores increase monotonically with model size and training steps. However, the authors identified a potential "sweet spot" for quantized models: the optimal trade-off between high performance and low bias often occurred early in the pretraining process, specifically around the 20% completion mark.

Discussion and Limitations

While the findings suggest that compression is a promising avenue for developing fairer models, the authors highlight several critical limitations:

  • Geographic and Cultural Scope: The benchmarks used are primarily Western-centric and may not accurately reflect social biases in other cultural or linguistic contexts.
  • Identity Representation: The current datasets rely on a binary definition of gender, failing to account for the full spectrum of gender identity.
  • Architectural Scope: This study focused on quantization and distillation; the effects of other techniques like pruning or Mixture-of-Experts (MoE) remain unknown.

In conclusion, model compression is not merely a tool for hardware optimization; it is a functional regularizer that can reduce the social biases inherent in LLMs. However, the authors caution that compressed models are not yet "safe by default" and require exhaustive safety profiling before production use.

Summary updated

BibTeX
@inproceedings{goncalves2023understanding,
  author = {Gustavo Gonçalves and Emma Strubell},
  title = {{Understanding the Effect of Model Compression on Social Bias in Large Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.161},
}
Figure