探测再编辑大语言模型的回复人格
Probing then Editing Response Personality of Large Language Models
AI总结:
该研究提出逐层探测框架,发现LLM主要在中上层模拟回复人格,进一步基于探测超平面提出逐层扰动的人格编辑方法,可在推理阶段改变回复人格,且对通用能力影响极小、训练成本低、推理延迟可接受。
摘要:
大语言模型(LLM)已展现出生成模拟一致人格特质回复的可观能力。尽管已有大量研究通过基于输出的评估分析人格表达,但人们对这类特质如何在LLM参数内部编码仍知之甚少。本文提出一种逐层探测框架,系统研究LLM在生成回复时模拟人格的层级能力。我们在PersonalityEdit基准上对11个开源LLM开展探测实验,发现LLM主要在中间层和上层模拟回复人格,其中指令微调模型的人格特质区分度略高。此外,通过将训练得到的探测超平面解释为每个人格类别的层级边界,我们提出一种逐层扰动方法,可在推理阶段编辑LLM表达的人格。结果表明,即便提示词明确指定了特定人格,我们的方法仍能成功改变LLM的回复人格。有趣的是,某些人格特质之间的转换难度差异很大,这与我们探测实验中的表征距离一致。最后,我们开展了全面的MMLU基准评估和时间开销分析,证明所提出的人格编辑方法仅会对通用能力造成极小下降,同时保持较低的训练成本和可接受的推理延迟。我们的代码已公开于https://github.com/universe-sky/probing-then-editing-personality。
英文摘要:
Large Language Models (LLMs) have demonstrated promising capabilities to generate responses that simulate consistent personality traits. Despite the major attempts to analyze personality expression through output-based evaluations, little is known about how such traits are internally encoded within LLM parameters. In this paper, we introduce a layer-wise probing framework to systematically investigate the layer-wise capability of LLMs in simulating personality for responding. We conduct probing experiments on 11 open-source LLMs over the PersonalityEdit benchmark and find that LLMs predominantly simulate personality for responding in their middle and upper layers, with instruction-tuned models demonstrating a slightly clearer separation of personality traits. Furthermore, by interpreting the trained probing hyperplane as a layer-wise boundary for each personality category, we propose a layer-wise perturbation method to edit the personality expressed by LLMs during inference. Our results show that even when the prompt explicitly specifies a particular personality, our method can still successfully alter the response personality of LLMs. Interestingly, the difficulty of converting between certain personality traits varies substantially, which aligns with the representational distances in our probing experiments. Finally, we conduct a comprehensive MMLU benchmark evaluation and time overhead analysis, demonstrating that our proposed personality editing method incurs only minimal degradation in general capabilities while maintaining low training costs and acceptable inference latency. Our code is publicly available at https://github.com/universe-sky/probing-then-editing-personality.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。