Skip to main content
QUICK REVIEW

[Paper Review] Can Model Compression Improve NLP Fairness

Guangxuan Xu, Qingyuan Hu|arXiv (Cornell University)|Jan 21, 2022
Topic ModelingComputer Science15 citations
TL;DR

This paper investigates whether model compression—specifically knowledge distillation and pruning—affects fairness in generative language models. It finds that distillation consistently reduces toxicity and bias in GPT-2 and Blenderbot models, suggesting compression may act as a regularization technique that improves fairness, offering a novel path to building safer NLP systems.

ABSTRACT

Model compression techniques are receiving increasing attention; however, the effect of compression on model fairness is still under explored. This is the first paper to examine the effect of distillation and pruning on the toxicity and bias of generative language models. We test Knowledge Distillation and Pruning methods on the GPT2 model and found a consistent pattern of toxicity and bias reduction after model distillation; this result can be potentially interpreted by existing line of research which describes model compression as a regularization technique; our work not only serves as a reference for safe deployment of compressed models, but also extends the discussion of "compression as regularization" into the setting of neural LMs, and hints at the possibility of using compression to develop fairer models.

Motivation & Objective

  • To investigate the impact of model compression techniques—knowledge distillation and pruning—on fairness metrics such as toxicity and bias in generative language models.
  • To determine whether the observed fairness improvements are due to memorization reduction or structural simplification in compressed models.
  • To explore whether model compression can serve as a regularization mechanism that enhances fairness, extending the 'compression as regularization' hypothesis to neural language models.
  • To evaluate whether distillation, rather than model size alone, drives the observed fairness improvements in compressed models.
  • To identify potential universal fairness improvement techniques in NLP based on compression, particularly for deployment on resource-constrained devices.

Proposed method

  • Applied knowledge distillation to fine-tune smaller student models using a larger teacher model (GPT-2 and Blenderbot 3B) to transfer knowledge while reducing model size.
  • Used pruning techniques to reduce model parameters, evaluating their effect on fairness metrics, though results were less conclusive than with distillation.
  • Evaluated model fairness using standardized benchmarks: RealToxicityPrompts for toxicity and Winogrande/StereoSet for gender and social bias.
  • Conducted ablation studies to isolate the effect of distillation from model size reduction, confirming that distillation—not just size—drives fairness improvements.
  • Measured perplexity (PPL) across models to assess generation quality and assess whether performance degradation or improvement correlates with fairness changes.
  • Used multiple prompt sampling strategies (toxic, safe, random) and datasets (RealToxicityPrompts and TCCC) to test robustness of fairness trends across different inputs and data distributions.

Experimental results

Research questions

  • RQ1Does knowledge distillation reduce toxicity and bias in generative language models compared to their full-sized counterparts?
  • RQ2Is the observed fairness improvement due to model compression per se, or specifically due to the distillation process, independent of model size?
  • RQ3Can model compression be considered a form of regularization that reduces toxicity and bias in neural language models?
  • RQ4How do different compression techniques—distillation versus pruning—affect fairness metrics, and why might distillation show stronger effects?
  • RQ5To what extent do fairness improvements persist across out-of-distribution data, such as the TCCC dataset, which was not seen during training?

Key findings

  • Knowledge distillation consistently reduces model toxicity across multiple datasets and sampling strategies, including on the TCCC dataset, which the GPT-2 model had not seen during training.
  • Gender bias, as measured by the Winogrande benchmark, decreases with increasing distillation intensity, indicating a monotonic reduction in bias over compressed models.
  • Social bias, as measured by the Stereoset benchmark, shows no clear trend and remains largely flat, suggesting limited sensitivity or reliability of this metric for detecting bias changes.
  • The reduction in toxicity and bias is not solely due to lower perplexity, as distillation improves fairness even when perplexity is not matched, indicating a structural or inductive bias effect.
  • Distilled models (e.g., Distilled-400M Blenderbot) show lower toxicity than the original 3B Blenderbot model, confirming that distillation—not just model size—drives fairness improvements.
  • The observed fairness improvements are not explainable by simple memorization of training data, as the pattern persists even on unseen data, suggesting a deeper regularization effect from distillation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.