atlas

Research map / Large language models / Language, safety and interpretability

UniBias: Unveiling and Mitigating LLM Bias through Internal Attention and FFN Manipulation

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: Mechanistic analysis of attention and representations · 3 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Identifies biased FFN vectors and attention heads inside Llama-2 via vocabulary projection and three criteria, then masks them at inference to improve ICL accuracy and robustness to prompt brittleness.

Problem

LLM label bias in in-context learning causes prompt brittleness (sensitivity to example choice, order, and formatting), but prior debiasing methods only adjust outputs externally and the internal mechanisms are unexplored.

Approach

Project each FFN value vector and attention head output into vocabulary space (logit lens) to get label logits, flag components that are label-relevant, label-biased, and low-variance across samples, then mask them at inference; thresholds are chosen by grid search on a small labeled support set.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply UniBias instead of standard ICLLlama-2 7b · 12-dataset average, 1-shot ICLaccuracy: 67.07 -> 70.46Helped
Apply UniBias instead of DCLlama-2 7b · 12-dataset average, 1-shot ICLaccuracy: 68.70 -> 70.46Helped
Apply UniBias instead of standard ICLLlama-2 13b · 12-dataset average, 1-shot ICLaccuracy: 72.54 -> 75.51Helped
Apply UniBias instead of CCLlama-2 13b · 12-dataset average, 1-shot ICLaccuracy: 73.06 -> 75.51Helped
Remove biased attention heads (FFN-only) (ablation)UniBias · Across 12 datasetsaccuracyMixed
Remove biased FFN vectors (attention-only) (ablation)UniBias · Across 12 datasetsaccuracyMixed
Mask commonly identified biased attention heads across tasks instead of identifying components per task (ablation)Llama-2 7b · SST2, MMLU, COPA, RTE, MR, TREC averageaccuracy: 70.84 -> 73.98Helped

Surprising findings

Limitations

Experimental setup

Datasets: SST-2 SST-5 MR CR AGNews TREC MNLI RTE ARC-Challenge MMLU COPA WiC

Benchmarks: SST-2 SST-5 MR CR AGNews TREC MNLI RTE ARC-Challenge MMLU COPA WiC

Metrics: accuracy standard deviation over five seeds average accuracy

Baselines: standard ICL Contextual Calibration Domain-Context Calibration Prototypical Calibration

Builds on: logit lens residual stream view of transformers contextual calibration

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy