arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.03324cs.CLcs.AI
收藏

通过单向编辑控制语言模型的聊天风格

Controlling Chat Style in Language Models via Single-Direction Editing

Department of Computer Science, Texas Tech University(计算机科学系,德克萨斯科技大学)

Zhenyu Xu, Victor S. Sheng

AI总结:

本文提出通过单向编辑实现语言模型风格控制,通过线性方向编码实现精准风格调整,提升安全性和效率。

摘要:

在大型语言模型(LLMs)中控制风格属性仍具挑战性,现有方法依赖于提示工程或训练后对齐。本文通过表示工程的视角探讨这一挑战,检验了假设:不同的风格属性——从情感语气到语言结构——被编码为模型激活空间中的线性方向。我们为这一假设提供了强有力的实证证据,涵盖了广泛风格范围,并基于此发现提出了一种轻量、无需训练的精确风格控制方法。我们的方法支持线性风格组合,通过消除不良行为增强安全性,并通过在十余种模型上的实验验证,实现了高风格一致性的同时,以最小的计算成本保持核心能力。

英文摘要:

Controlling stylistic attributes in large language models (LLMs) remains challenging, with existing approaches relying on either prompt engineering or post-training alignment. This paper investigates this challenge through the lens of representation engineering, testing the hypothesis that distinct stylistic attributes - from emotional tone to linguistic structure - are encoded as linear directions in the model's activation space. We provide strong empirical evidence for this hypothesis across a wide range of styles and, based on this finding, present a lightweight, training-free method for precise style control. Our approach supports linear style composition, enhances safety by ablating undesirable behaviors, and, as confirmed by experiments on over a dozen models, achieves high style adherence while preserving core capabilities at minimal computational cost.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑