大语言模型(LLM)常表现出不良行为,例如生成不实或有偏见的内容。研究表明,在现有对齐方法的基础上编辑其内部表征,可有效缓解这类问题。我们提出一种全新的推理时编辑方法——激活值谱编辑(spectral editing of activations, SEA),将输入表征投影到与正例(如实情内容)协方差最大、同时与负例(如幻觉内容)协方差最小的方向上。我们还通过特征函数将该方法扩展至非线性编辑场景。我们针对真实性与偏见相关基准开展了大量实验,涉及6种不同规模、不同模型家族的开源大语言模型。结果表明,SEA在效果、相似任务泛化能力以及计算与数据效率方面均表现更优。我们还证实,SEA编辑对模型其他能力的负面影响十分有限。
英文摘要:
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.
EvoEdit: Evolving Null-space Alignment for Robust and Efficient Knowledge Editing
Institute for Clarity in Documentation(文档清晰度研究所);Inria Paris-Rocquencourt(法国国家信息与自动化研究所巴黎-罗康库尔中心);Rajiv Gandhi University(拉吉夫·甘地大学);Tsinghua University(清华大学);Palmer Research Laboratories(帕默研究实验室)
VISPA: Pluralistic Alignment via Automatic Value Selection and Activation
University of Waterloo(滑铁卢大学);University of Melbourne(墨尔本大学);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);MBZUAI(马克斯·普朗克智能系统研究所);Macquarie University(麦考瑞大学)
Causal Path Alignment: Anchoring the Optimization Trajectory for Controllable In-Parameter Knowledge Editing
Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络安全学院)
EVA: Editing for Versatile Alignment against Jailbreaks
ShanghaiTech University(上海科技大学);Sun Yat-sen University(中山大学);State Key Laboratory of Blockchain and Data Security(区块链与数据安全国家重点实验室);Tsinghua University(清华大学)
Towards Understanding Safety Alignment: A Mechanistic Perspective from Safety Neurons
Department of Computer Science and Technology, BNRist(计算机科学与技术系,BNRist);Shenzhen International Graduate School(深圳国际研究生院);KIRC, Institute for Artificial Intelligence, Tsinghua University(人工智能研究院,清华大学)
Internal Value Alignment in Large Language Models through Controlled Value Vector Activation
University of Science and Technology of China(中国科学技术大学);State Key Laboratory of Cognitive Intelligence(认知智能国家重点实验室);Gaoling School of Artificial Intelligence(光明人工智能学院);Renmin University of China(中国人民大学);Beijing Key Laboratory of Research on Large Models and Intelligent Governance(北京大型模型与智能治理重点实验室);Engineering Research Center of Next-Generation Intelligent Search and Recommendation, MOE(下一代智能搜索与推荐工程技术研究中心);Tsinghua University(清华大学);Huawei Technologies Co. Ltd(华为技术有限公司)
TEVI: Text-Conditioned Editing of Visual Representations via Sparse Autoencoders for Improved Vision-Language Alignment
Max Planck Institute for Informatics, Saarland Informatics Campus, Saarbrücken, Germany(马克斯·普朗克研究所信息学院,萨尔兰信息学院,德国萨尔布吕肯);Department of Language Science and Technology, Saarland University, Saarbrücken, Germany(语言科学与技术系,萨尔兰大学,德国萨尔布吕肯)
Output Vector Editing for Memorization Mitigation in Large Language Models
Center for Information and Language Processing, LMU Munich(慕尼黑大学语言与信息处理中心);Department of Computer Science, University of Copenhagen(哥本哈根大学计算机科学系);Munich Center for Machine Learning(慕尼黑机器学习中心);Pioneer Centre for AI(人工智能先锋中心)
ODESteer: A Unified ODE-Based Steering Framework for LLM Alignment
University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Northwestern University(西北大学);William & Mary(威廉与玛丽学院);University of Washington(华盛顿大学);Stanford University(斯坦福大学)
DPN-LE: Dual Personality Neuron Localization and Editing for Large Language Models
Southeast University(东南大学);Shanghai Jiao Tong University(上海交通大学);East China Normal University(华东师范大学);Zhongguancun Academy(中关村学院);Zhejiang University of Technology(浙江工业大学);Kuaishou Technology(快手科技);Northeastern University(东北大学);Tsinghua University(清华大学);Nanjing University of Aeronautics and Astronautics(南京航空航天大学)
Beyond the Covariance Trap: Unlocking Generalization in Same-Subject Knowledge Editing for Large Language Models
Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络安全学院)
Activation-Guided Local Editing for Jailbreaking Attacks
Beihang University(北航);Hangzhou Innovation Institute(杭州创新研究院);HKUST(香港科技大学);South China University of Technology(华南理工大学);Nanyang Technological University(南洋理工大学);Kunming University of Science and Technology(昆明理工大学)
Aligning Language Models with Real-time Knowledge Editing
National Key Laboratory for Multimedia Information Processing, Peking University School of Computer Science, Peking University(国家多媒体信息处理重点实验室,北京大学计算机学院,北京大学)