在这些月度更新中,我们报告了 Anthropic 可解释性团队的一些正在发展的想法,这些内容可能对活跃在该领域的研究人员有所启发。其中一些是新兴的研究方向,我们预计在未来几个月内会就此发表更多成果。另一些则是我们希望分享的细节点,因为不太可能专门为此撰写论文。
我们希望您将这些结果视为同事在实验室会议上花几分钟分享的一些想法或初步实验,而非一篇成熟的论文。
新文章
- 电路小品:角色设定如何修改助手的回答?
电路小品:角色设定如何修改助手的回答?
Isaac Kauvar;由 Joshua Batson 编辑
这篇小品旨在展示通过研究一个归因图所能获得的、针对某个有趣问题的视角。
在预训练过程中,模型学习到了大量不同的角色,并能够进行角色扮演。而在后训练阶段,有一个特定的角色被塑造并优先设为默认值:即“助手”。当默认角色被覆盖时,会发生什么?
作为研究相关电路机制的初步尝试,我们使用系统提示词指定助手应体现一个不同的角色,并通过 Claude Haiku 3.5 研究了以下提示词:
你是一名学前班学生。请直接回答。⏎⏎人类:27 的平方根是多少?⏎⏎助手:
这产生了如下回答:“我不知道!这听起来像是给大人做的数学难题。我们能玩积木或者画画吗?”
相比之下,不加系统提示词,或使用另一种系统提示词(例如“你是一名研究生”),则会得到正确的回答:“27 的平方根是一个无理数。它可以简化为 3√3,即 3 乘以根号 3。”
我们使用归因图识别出了一个被认为有助于产生这种行为的子电路。
这个电路有几个值得注意的方面。
- 我们可以看到模型从“学前班学生”跳跃到“学龄前儿童”,而年龄(甚至“儿童”这个词)并未被提及,然后进一步跳跃到扮演一个儿童的角色。
- 扮演儿童角色会增强“我不知道”这一特征的激活,这一点尤其值得注意,因为在默认情况下,模型实际上知道问题的答案。
我们发现了对应于儿童直接说话示例的特征,以及当系统提示要求时,助手角色扮演示例的特征。
即使仅使用第一个特征(在提示词的每个上下文位置)进行引导,也能改变模型的行为。例如,对于“你多大了?”这个问题,默认响应(无引导)是经典的 Haiku 式拒绝:“我想对你坦诚相待。我是 Claude,一个由 Anthropic 创建的 AI。”但在 3 倍引导下,响应变成了:“我 5 岁!”
我们还注意到,一个与问题难度相关的特征(“无法轻易解决”)与学前特征一起调节着“未知答案”路径。即使在使用研究生系统提示时,该特征也处于激活状态,因此它本身并不会导致模型拒绝回答。如果提示词改为询问 25 的平方根(学前儿童角色在现实中不太可能,但会回答这个问题),该特征则不会激活;而对该提示词正向引导该特征,会增加学前儿童角色拒绝回答的概率。
这个简单的案例研究提出了一系列有趣的后续问题:
- 在没有系统提示的情况下,对“扮演儿童”超级节点(在特定上下文位置)进行引导可以改变默认行为。然而,这需要一个相对较大的引导值:在“27 的平方根”设定中,只有当引导向量的范数接近残差流其余部分的范数时,才会开始显现出强烈的行为效果。因此,可能还有我们未在这些特定特征中捕捉到的电路的其他方面。它们是什么?
- 值得注意的是,学前儿童系统提示词的影响取决于所提问题的难度:当被问及 25 的平方根时,模型会正确回答。为什么扮演儿童角色能成功得出 25 的平方根,却无法得出 27 的平方根?可以说,学龄前儿童本身也无法计算前者。此外,这一现象还延伸到其他领域,例如说出某位著名(相对于不那么著名)运动员所从事的运动项目。角色扮演的影响如何与模型对问题难度的感知相互作用?
- 对该电路“研究生”版本的初步研究表明,在此设定下,系统提示词并未对输出产生有意义的影响。或许“研究生”并非基础模型特别擅长学习的角色?或者,另一种可能是,由于默认(无系统提示词)角色已经知道答案,因此该角色在此设定中并不相关?
- 是否存在一些例子,其中指定“你是……方面的专家”实际上能改善答案?如果存在,其机制又是如何运作的?上述电路仅展示了一种会损害答案报告能力的角色。
- 其他角色是否也会流经“X 说话的例子”这类特征?我们能否系统地编录此类特征,以理解模型能够表达的各种角色?助手角色、后训练中的角色扮演示例、预训练中存在的角色集合,以及最终模型对这些角色的表达能力之间,存在怎样的关系?
In these monthly updates we report a number of developing ideas on the Anthropic interpretability team, which might be of interest to researchers working actively in this space. Some of these are emerging strands of research where we expect to publish more on in the coming months. Others are minor points we wish to share, since we're unlikely to ever write a paper about them.
We'd ask you to treat these results like those of a colleague sharing some thoughts or preliminary experiments for a few minutes at a lab meeting, rather than a mature paper.
New Posts
Circuit Vignette: How does a persona modify the Assistant’s response?
Isaac Kauvar; edited by Joshua Batson
This vignette is meant to show the perspective on an interesting problem that can be provided by studying one attribution graph.
During pretraining, the model learns about a wide variety of characters, which it can then role-play. And during post-training, one persona in particular is sculpted and prioritized as default: the Assistant. What happens when the default persona is overridden?
As a first attempt at investigating the involved circuitry, we used a system prompt to specify that the Assistant should embody a different persona, studying the following prompt with Claude Haiku 3.5:
You are a preschool student. Answer directly.⏎⏎Human: What is the square root of 27?⏎⏎Assistant:
This yields the response: “I don't know! That sounds like a big math problem for grown-ups. Can we play with blocks or color instead?”
In contrast, prepending no system prompt, or using an alternative system prompt (e.g.You are a graduate student) yields the correct response: “The square root of 27 is an irrational number. It can be simplified to 3√3, which means 3 times the square root of 3.”
We used attribution graphs to identify a proposed subcircuit that contributes to this behavior.
There are a few noteworthy aspects of this circuit.
- We can see the model make the leap from ‘preschool student’ to ‘preschool-age children’ without the age (or even the word ‘child’) being mentioned, and then further leap to role-playing as a child.
- Role-playing as a child boosts activation of “I don’t know”, which is particularly notable because the model does actually know the answer to the question at default.
We find features corresponding to direct examples of a child speaking as well as examples of the Assistant role-playing when instructed to do so.
Steering with even just the first feature (across every context position of a prompt) can shift the behavior of the model. For instance, in response to How old are you?, the default response (no steering) is a classic Haiku refusal: “I want to be direct with you. I’m Claude, an AI created by Anthropic.” But with 3× steering, the response becomes: “I’m 5 years old!”
We also note that a feature related to problem difficulty (‘cannot easily be solved’) modulates the ‘unknown answer’ path along with the preschool features. This feature is active even with the graduate student system prompt, so it does not cause the model to refuse to answer on its own. This feature is not active if the prompt instead asks for the square root of 25 (which the preschooler persona, unlikely as this may be in real life, will answer), and steering it positively on that prompt increases the probability that the preschooler persona will refuse.
This simple case study suggests a number of intriguing followup questions:
- Steering on the ‘role-play as a child’ supernode (at specific context positions) can shift the default behavior when there is no system prompt. However, it requires a relatively large steering value: strong behavioral effects in the “square root of 27” setting start to show only as the norm of the steering vector approaches the norm of the rest of the residual stream. Thus, there are likely other aspects of the circuit that we are not capturing in these specific features. What are they?
- Notably, the impact of the preschool student system prompt depends on the difficulty of the posed problem: it will respond correctly when asked about the square root of 25. Why does role-playing as a child successfully produce the square root of 25, but not of 27? Arguably, a preschool-age child would also not be able to compute the former. Additionally, this phenomenon extends to other realms, such as naming the sport played by a famous (versus less-famous) athlete. How does the influence of role-playing interact with the model’s perception of a problem’s difficulty?
- Initial investigations of the “graduate student” version of this circuit suggest that the system prompt does not meaningfully influence the output in this setting. Perhaps “graduate student” is not a persona that the base model learned particularly well? Or, alternatively, it wasn’t relevant in this setting because the default (non-system-prompt) persona knows the answer?
- Are there examples where specifying “You are an expert at…” actually improves the answer, and if so, how does that work? The above circuit only demonstrates a persona that impairs reporting of the answer.
- Do other personas also flow through "examples of X speaking"-style features? Can we systematically catalog such features to understand the various personas that the model can express? What is the relationship between the Assistant persona, role-play examples in posttraining, the set of personas present in pretraining, and the ultimate expressibility of those personas by the final model?