通过梯度上升实现可解释人格控制与提示工程的桥梁
Bridging Mechanistic Interpretability and Prompt Engineering with Gradient Ascent for Interpretable Persona Control
AI总结:
本文提出RESGA和SAEGA方法,利用梯度上升优化随机初始化提示,以实现与识别的人格方向更一致的表示,有效控制LLM中的人格行为。
摘要:
在大型语言模型(LLM)中控制涌现行为人格(如阿谀奉承、幻觉)对AI安全至关重要,但仍是持续挑战。现有解决方案面临两难:手动提示工程直观但难以扩展和精确,而自动优化方法有效但作为'黑箱'缺乏对模型内部的可解释连接。本文提出一种新的框架,将梯度上升适应到LLM中,实现定向提示发现。具体而言,我们提出两种方法,RESGA和SAEGA,均优化随机初始化提示以实现与识别的人格方向更好的对齐表示。我们引入流畅的梯度上升来控制发现的人格引导提示的流畅性。我们展示了RESGA和SAEGA在Llama 3.1、Qwen 2.5和Gemma 3上引导三种不同人格(阿谀奉承、幻觉和短视奖励)的有效性。关键的是,在阿谀奉承上,我们自动发现的提示实现了显著改进(49.90%相比79.24%)。通过将提示发现建立在机械有意义的特征上,我们的方法提供了一种新的可控和可解释行为修改范式。
英文摘要:
Controlling emergent behavioral personas (e.g., sycophancy, hallucination) in Large Language Models (LLMs) is critical for AI safety, yet remains a persistent challenge. Existing solutions face a dilemma: manual prompt engineering is intuitive but unscalable and imprecise, while automatic optimization methods are effective but operate as "black boxes" with no interpretable connection to model internals. We propose a novel framework that adapts gradient ascent to LLMs, enabling targeted prompt discovery. In specific, we propose two methods, RESGA and SAEGA, that both optimize randomly initialized prompts to achieve better aligned representation with an identified persona direction. We introduce fluent gradient ascent to control the fluency of discovered persona steering prompts. We demonstrate RESGA and SAEGA's effectiveness across Llama 3.1, Qwen 2.5, and Gemma 3 for steering three different personas, sycophancy, hallucination, and myopic reward. Crucially, on sycophancy, our automatically discovered prompts achieve significant improvement (49.90% compared with 79.24%). By grounding prompt discovery in mechanistically meaningful features, our method offers a new paradigm for controllable and interpretable behavior modification. We release our scripts for RESGA and SAEGA in this github repo: https://github.com/HarshSaini10/RESGA_SAEGA.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。