Spectral Editing of Activations for Large Language Model Alignment
Yifu Qiu, Zheng Zhao, Yftah Ziser, Anna Korhonen, Edoardo Maria Ponti, Shay B. Cohen
Abstract
Large language models (LLMs) often exhibit undesirable behaviours, such as generating untruthful or biased content. Editing their internal representations has been shown to be effective in mitigating such behaviours on top of the existing alignment methods. We propose a novel inference-time editing method, namely spectral editing of activations (SEA), to project the input representations into directions with maximal covariance with the positive demonstrations (e.g., truthful) while minimising covariance with the negative demonstrations (e.g., hallucinated). We also extend our method to non-linear editing using feature functions. We run extensive experiments on benchmarks concerning truthfulness and bias with six open-source LLMs of different sizes and model families. The results demonstrate the superiority of SEA in effectiveness, generalisation to similar tasks, as well as computation and data efficiency. We also show that SEA editing only has a limited negative impact on other model capabilities.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
19 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Knowledge Boundary of Large Language Models: A Survey cites DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language Models
- TruthfulQA: Measuring How Models Mimic Human Falsehoods cites Measuring Massive Multitask Language Understanding
- Beyond Next Token Probabilities: Learnable, Fast Detection of Hallucinations and Data Contamination on LLM Output Distributions cites Inference-Time Intervention: Eliciting Truthful Answers from a Language Model
- Inference-Time Intervention: Eliciting Truthful Answers from a Language Model cites LoRA: Low-Rank Adaptation of Large Language Models
- Inference-Time Intervention: Eliciting Truthful Answers from a Language Model cites Measuring Massive Multitask Language Understanding
- Inference-Time Intervention: Eliciting Truthful Answers from a Language Model cites TruthfulQA: Measuring How Models Mimic Human Falsehoods
- DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language Models cites TruthfulQA: Measuring How Models Mimic Human Falsehoods
- DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language Models cites Inference-Time Intervention: Eliciting Truthful Answers from a Language Model
- Angular Steering: Behavior Control via Rotation in Activation Space cites Measuring Massive Multitask Language Understanding
- Angular Steering: Behavior Control via Rotation in Activation Space cites TruthfulQA: Measuring How Models Mimic Human Falsehoods
- Angular Steering: Behavior Control via Rotation in Activation Space cites Inference-Time Intervention: Eliciting Truthful Answers from a Language Model
- Representation Bending for Large Language Model Safety cites LoRA: Low-Rank Adaptation of Large Language Models
- Representation Bending for Large Language Model Safety cites Measuring Massive Multitask Language Understanding
- Representation Bending for Large Language Model Safety cites TruthfulQA: Measuring How Models Mimic Human Falsehoods
Cited by top-tier papers19
- Angular Steering: Behavior Control via Rotation in Activation SpaceMinh Hieu Vu, Tan M. NguyenNeurIPS 2025 · 53 citations
- Knowledge Boundary of Large Language Models: A SurveyMoxin Li, Yong Zhao, Wenxuan Zhang, Shuaiyi Li et al.ACL 2025 · 33 citations
- Representation Bending for Large Language Model SafetyAshkan Yousefpour, Taeheon Kim, Ryan Sungmo Kwon, Seungbeen Lee et al.ACL 2025 · 19 citations
- Inference-time Alignment in Continuous SpaceYige Yuan, Teng Xiao, Yunfan Li, Bingbing Xu et al.NeurIPS 2025 · 9 citations
- Beyond Next Token Probabilities: Learnable, Fast Detection of Hallucinations and Data Contamination on LLM Output DistributionsGuy Bar-Shalom, Fabrizio Frasca, Derek Lim, Yoav Gelberg et al.AAAI 2026 · 7 citations
Builds on24
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
- TruthfulQA: Measuring How Models Mimic Human FalsehoodsStephanie Lin, Jacob Hilton, Owain EvansACL 2022 · 3,228 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
- DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language ModelsYung-Sung Chuang, Yujia Xie, Hongyin Luo, Yoon Kim et al.ICLR 2024 · 354 citations
Related papers
- HyperEdit: Mitigating Hallucinations of Large Language Models via Hyperbolic Representation EditingTongxu Lin, Junping Du, Zhe Xue, Meiyu Liang et al.KDD 2026
- TruthX: Alleviating Hallucinations by Editing Large Language Models in Truthful SpaceShaolei Zhang, Tian Yu, Yang FengACL 2024
- Differentially Private Steering for Large Language Model AlignmentAnmol Goel, Yaxi Hu, Iryna Gurevych, Amartya SanyalICLR 2025
- PaCE: Parsimonious Concept Engineering for Large Language ModelsJinqi Luo, Tianjiao Ding, Kwan Ho Ryan Chan, Darshan Thaker et al.NeurIPS 2024 · 20 citations
- Steering LVLMs via Sparse Autoencoder for Hallucination MitigationZhenglin Hua, Jinghan He, Zijun Yao, Tianxu Han et al.EMNLP Findings 2025
