Representation Surgery: Theory and Practice of Affine Steering
Shashwat Singh, Shauli Ravfogel, Jonathan Herzig, Roee Aharoni, Ryan Cotterell, Ponnurangam Kumaraguru
Abstract
Language models often exhibit undesirable behavior, e.g., generating toxic or gender-biased text. In the case of neural language models, an encoding of the undesirable behavior is often present in the model's representations. Thus, one natural (and common) approach to prevent the model from exhibiting undesirable behavior is to steer the model's representations in a manner that reduces the probability of it generating undesirable text. This paper investigates the formal and empirical properties of steering functions, i.e., transformation of the neural language model's representations that alter its behavior. First, we derive two optimal, in the least-squares sense, affine steering functions under different constraints. Our theory provides justification for existing approaches and offers a novel, improved steering approach. Second, we offer a series of experiments that demonstrate the empirical effectiveness of the methods in mitigating bias and reducing toxic generation. https://github.com/shauliravfogel/affine-steering * Equal contribution 1 IIIT Hyderabad 2 Bar-Ilan University. Work done during an internship at Google Research.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 94a7050d-b5a6-40a7-a03b-35012602daafCited by top-tier papers19
- Angular Steering: Behavior Control via Rotation in Activation SpaceMinh Hieu Vu, Tan M. NguyenNeurIPS 2025 · 53 citations
- ODESteer: A Unified ODE-Based Steering Framework for LLM AlignmentHongjue Zhao, Haosen Sun, Jiangtao Kong, Xiaochang Li et al.ICLR 2026 · 16 citations
- Emergence of Linear Truth Encodings in Language ModelsShauli Ravfogel, Gilad Yehudai, Tal Linzen, Joan Bruna et al.NeurIPS 2025 · 12 citations
- Mitigating Hallucination in VideoLLMs via Temporal-Aware Activation EngineeringJianfeng Cai, Jiale Hong, Zongmeng Zhang, Wengang Zhou et al.NeurIPS 2025 · 7 citations
- From Directions to Regions: Decomposing Activations in Language Models via Local GeometryOr Shafran, Shaked Ronen, Omri Fahn, Shauli Ravfogel et al.ICML 2026 · 7 citations
Builds on10
- Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations
- Inference-Time Intervention: Eliciting Truthful Answers from a Language ModelKenneth Li, Oam Patel, Fernanda B. Viégas, Hanspeter Pfister et al.NeurIPS 2023 · 1,549 citations
- LEACE: Perfect linear concept erasure in closed formNora Belrose, David Schneider-Joseph, Shauli Ravfogel, Ryan Cotterell et al.NeurIPS 2023 · 305 citations
- Fair and Optimal Classification via Post-ProcessingRuicheng Xian, Lang Yin, Han ZhaoICML 2023 · 57 citations
- Transformer Feed-Forward Layers Are Key-Value MemoriesMor Geva, Roei Schuster, Jonathan Berant, Omer LevyEMNLP 2021 · 33 citations
Related papers
- Unsupervised Concept Vector Extraction for Bias Control in LLMsHannah Cyberey, Yangfeng Ji, David EvansEMNLP 2025 · 4 citations
- Multi-Attribute Steering of Language Models via Targeted InterventionDuy Nguyen, Archiki Prasad, Elias Stengel-Eskin, Mohit BansalACL 2025 · 30 citations
- IF-Guide: Influence Function-Guided Detoxification of LLMsZachary Coalson, Juhan Bae, Nicholas Carlini, Sanghyun HongNeurIPS 2025 · 9 citations
- Improving Instruction-Following in Language Models through Activation SteeringAlessandro Stolfo, Vidhisha Balachandran, Safoora Yousefi, Eric Horvitz et al.ICLR 2025
- LinEAS: End-to-end Learning of Activation Steering with a Distributional LossPau Rodríguez, Michal Klein, Eleonora Gualdoni, Valentino Maiorca et al.NeurIPS 2025 · 15 citations
