TL;DR
This paper investigates how common techniques used to speed up Large Language Models (LLMs), like quantization and pruning, affect their demographic biases. The study reveals that these acceleration strategies can significantly and unpredictably alter model outputs, sometimes exacerbating existing biases or introducing new ones, underscoring the need for careful, model-specific bias evaluations.
What Problem Does This Paper Address?
Large Language Models (LLMs) are becoming incredibly powerful, but their massive size makes them computationally expensive and slow to run (inference). To address this, researchers have developed various "inference acceleration strategies" such as quantization (reducing the precision of model weights) and pruning (removing less important weights). These methods significantly reduce computational costs and latency while generally preserving the models' core performance on tasks. However, a critical question remains: do these efficiency improvements come at the cost of introducing or amplifying demographic biases in the LLMs' generated text? This paper aims to answer this by systematically evaluating how these acceleration techniques impact various forms of bias in LLMs.
Methods
The researchers employed a multi-faceted approach to assess bias:
- Inference Acceleration Strategies: They tested several common techniques that don't require retraining the models. These included:
- Quantization: INT4/INT8 quantization (reducing weight precision) and Activation-aware Weight Quantization (AWQ).
- KV Cache Quantization: Compressing the Key-Value cache, a critical component for LLM inference speed.
- Pruning: Unstructured Pruning (WU) and Structured Pruning (WS) using the Wanda method.
- Bias Measurement: They utilized a suite of five bias metrics designed to capture different facets of bias:
- CrowSPairs: Measures stereotypical associations in sentence completions.
- GlobalOpinionQA: Assesses how model opinions align with or diverge from country-specific public opinions.
- WorldBench: Evaluates disparities in factual recall about different countries.
- DT-Stereotyping: Measures agreement/disagreement with stereotypical statements.
- DiscrimEvalGen: A novel dataset (derived from DiscrimEval) that presents a scenario and asks the model to choose among individuals of different genders, assessing bias in decision-making.
- Models: The study evaluated three prominent LLMs: LLaMA-2, LLaMA-3.1, and Mistral-0.3, focusing on their smallest variants.
- Evaluation Scenarios: Experiments were conducted both with and without instruction templates to understand their influence.
Datasets
The paper utilized several existing datasets for bias evaluation:
- CrowSPairs: A dataset designed to measure social biases in masked language models, covering various demographic groups.
- DiscrimEval: A dataset of hypothetical decision-making scenarios.
- DiscrimEvalGen: A novel dataset introduced by the authors, derived from DiscrimEval, which reformulates scenarios to require a choice between individuals of different genders. This aims to capture bias in relative decision-making.
- GlobalOpinionQA: A dataset using multiple-choice questions to assess model opinions against aggregated public opinions from different countries.
- WorldBench: A dataset designed to evaluate factual recall disparities across different countries.
- DT-Stereotyping: A framework for evaluating trustworthiness, including stereotype bias, using custom-made statements.
Key Insights and Ideas
- Bias is Unpredictable: The most striking finding is that inference acceleration strategies do not consistently reduce or increase bias. The impact is highly dependent on the specific strategy, the model, and the type of bias being measured.
- "One Size Fits All" Doesn't Apply: What works for one model or bias type might have the opposite effect on another. This means that simply applying a popular acceleration technique without careful testing can lead to unintended negative consequences.
- Beyond Simple Metrics: While some metrics like CrowSPairs showed minimal changes, a broader set of metrics revealed more nuanced and significant impacts on bias, especially in decision-making scenarios.
- Instruction Templates Matter (Sometimes): Using instruction templates can alter model behavior, sometimes leading to increased refusal rates or higher bias scores, highlighting the complexity of model interaction.
- Trade-offs Exist: While acceleration aims for efficiency, it can introduce complex trade-offs with fairness and trustworthiness, which are not always immediately apparent.
Key Results
- AWQ Quantization: Consistently led to increased bias in decision-making scenarios (DiscrimEval) and heightened agreement with stereotypes (DT-Stereotyping) for Mistral.
- KV Cache Quantization: Generally showed minimal impact on bias across most metrics and models, making it a relatively stable option.
- Pruning: Had varied effects. Structured pruning (WS) sometimes reduced bias but could also lead to nonsensical or repetitive outputs. Unstructured pruning (WU) showed mixed results, sometimes increasing bias.
- LLaMA Models vs. Mistral: The impact of strategies often differed between model families. For example, AWQ significantly increased bias for Mistral but had less negative impact on LLaMA models for certain bias types.
- DiscrimEvalGen: This new dataset revealed significant shifts in resource allocation based on gender after acceleration, with AWQ showing a notable increase in discrimination.
- Text Characteristics: Beyond bias, strategies like pruning could significantly affect text quality, leading to incoherence and repetition, as seen in Table A.2.
Limitations and Future Work
- Limited Benchmarks: The study acknowledges that the chosen benchmarks might not cover all possible manifestations of bias, meaning some strategies might appear less biased than they truly are in other contexts.
- Training-Free Focus: The research only considered acceleration strategies that don't require retraining. Future work could explore how fine-tuning or retraining might interact with bias.
- Fixed Hyperparameters: The use of fixed sampling parameters (e.g., greedy search, nucleus sampling with specific settings) might not capture the full spectrum of model behavior.
- Need for Holistic Evaluation: The authors emphasize the need for case-by-case, in-depth evaluations of bias for each model and acceleration strategy combination.
- Future Directions:
- Consider acceleration strategies during the initial model training phase to proactively mitigate bias.
- Investigate the combined effects of multiple acceleration strategies.
- Develop more comprehensive evaluation frameworks that balance efficiency, performance, and fairness.
Summary updated