arXiv:2501.14371cs.CLcs.AI2025-01ICLR被引 14

无需训练,通过编辑模型内部空间实现高效风格化问答。

DRESSing Up LLM: Efficient Stylized Question-Answering via Style Subspace Editing

  • 在大模型表征空间中分离风格子空间并动态调整
  • 相比提示和微调,风格保持度提升显著且语义更稳定
  • 适合角色对话、虚拟人等需要灵活风格控制的场景

我们提出DRESS,一种通过表征编辑实现大语言模型风格化响应的新方法。现有方法如提示工程和微调在复杂风格适配上效果有限或计算成本过高,尤其在角色扮演或NPC生成任务中。DRESS利用大模型的过参数特性,在模型表征空间中解耦出与风格相关的子空间,进行表征编辑,从而最小化对原始语义的影响。通过自适应调整编辑强度,动态优化风格子空间中的引导向量,确保风格一致性与语义完整性。我们构建了两个风格化问答基准数据集以验证DRESS有效性,结果表明其显著优于提示法和ITI等基线方法。DRESS是一种轻量级、免训练的风格控制方案,适用于开发具有灵活风格表达能力的对话代理。代码与数据集已开源于https://github.com/ArthurLeoM/DRESS-LLM。

原文摘要 · Abstract (English)

We introduce DRESS, a novel approach for generating stylized large language model (LLM) responses through representation editing. Existing methods like prompting and fine-tuning are either insufficient for complex style adaptation or computationally expensive, particularly in tasks like NPC creation or character role-playing. Our approach leverages the over-parameterized nature of LLMs to disentangle a style-relevant subspace within the model's representation space to conduct representation editing, ensuring a minimal impact on the original semantics. By applying adaptive editing strengths, we dynamically adjust the steering vectors in the style subspace to maintain both stylistic fidelity and semantic integrity. We develop two stylized QA benchmark datasets to validate the effectiveness of DRESS, and the results demonstrate significant improvements compared to baseline methods such as prompting and ITI. In short, DRESS is a lightweight, train-free solution for enhancing LLMs with flexible and effective style control, making it particularly useful for developing stylized conversational agents. Codes and benchmark datasets are available at https://github.com/ArthurLeoM/DRESS-LLM.

风格化生成表征编辑零样本

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。