Distributional Surgery for Language Model Activations
Not on the map. Why?
Abstract (arXiv)
Language models, while capable of generating remarkably coherent and seemingly accurate text, can occasionally produce undesirable content, including harmful or toxic outputs. In this paper, we present a new two-stage approach to detect and mitigate undesirable content generations by rectifying activations. First, we train an ensemble of layerwise classifiers to detect undesirable content using activations by minimizing a smooth surrogate of the risk-aware score. Then, for detected undesirable contents, we propose layerwise distributional steering policies that transform the attention heads. These policies are computed through principled semidefinite programming, which aims to minimally perturb the attention distribution while probabilistically guaranteeing the effectiveness of the editions. Empirical evaluations across multiple language models and datasets show that our method outperforms baselines in reducing the generation of undesirable output.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 31 of its 49 references that are in the map. First posted on arXiv 27 Jan 2025.
Builds on
31 of 49 references.
References · 31
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
- 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,919
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
- 2022Locating and Editing Factual Associations in GPTcited by 2,609
- 2020Don't Stop Pretraining: Adapt Language Models to Domains and Taskscited by 1,548
- 2016Understanding intermediate layers using linear classifier probescited by 1,279
19 more
- 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,259
- 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,235
- 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
- 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 793
- 2022Discovering Latent Knowledge in Language Models Without Supervisioncited by 733
- 2023The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasetscited by 673
- 2021DExperts: Decoding-Time Controlled Text Generation with Experts and Anti-Expertscited by 434
- 2024OLMoE: Open Mixture-of-Experts Language Modelscited by 291
- 2020Supervised Contrastive Learning for Pre-trained Language Model Fine-tuningcited by 275
- 2023Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language Modelscited by 237
- 2022Relative representations enable zero-shot latent space communicationcited by 175
- 2023The Troubling Emergence of Hallucination in Large Language Models -- An Extensive Definition, Quantification, and Prescriptive Remediationscited by 130
- 2022Pretrained Language Models for Text Generation: A Surveycited by 121
- 2024LoFiT: Localized Fine-tuning on LLM Representationscited by 56
- 2024Representation Surgery: Theory and Practice of Affine Steeringcited by 47
- 2022Unified Detoxifying and Debiasing in Language Generation via Inference-time Adaptive Optimizationcited by 32
- 2021sigmoidF1: A Smooth F1 Score Surrogate Loss for Multilabel Classificationcited by 23
- 2023Goodtriever: Adaptive Toxicity Mitigation with Retrieval-augmented Modelscited by 23
- 2024Non-Linear Inference Time Intervention: Improving LLM Truthfulnesscited by 9
Built on by
Citing papers per year: 2025: 2.
2 papers.