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

对因果路径的因果干预:映射GPT-2从句法到语义的推理过程

Causal Interventions on Causal Paths: Mapping GPT-2's Reasoning From Syntax to Semantics

University of Southern California(南加州大学)

Isabelle Lee, Joshua Lum, Ziyi Liu, Dani Yogatama

AI总结:

本研究针对大语言模型自然语言推理难以通过电路解析的问题,以GPT-2 small为对象开展因果句干预实验,发现因果句法定位在前2-3层、深层特定头关注语义关系,为表征LLM因果推理提供了初步依据。

摘要:

尽管可解释性研究已揭示基于transformer的大语言模型(LLM)所使用的部分内部算法,但自然语言推理因其高度的语境依赖性和歧义性,难以被简单归类。因此,为电路分析提出清晰且有研究价值的问题颇具挑战——这类分析依赖因果干预所需的、定义明确的域内和域外样本。虽然已有大量研究针对间接宾语识别(IOI)等特定任务的电路展开探索,但自然语言推理的内在复杂性使得通过电路解析它仍十分困难。本研究迈出了表征LLM中因果推理的初步步伐,通过分析“我打开了伞,因为开始下雨了”这类明确的因果句,借助GPT-2 small,利用精心设计的场景开展因果干预。研究结果显示,因果句法定位在模型的前2-3层,而较深层中的某些注意力头对因果句的无意义变体表现出更高的敏感度。这表明模型可能通过两种方式实现推理:(1)检测句法线索;(2)在最后几层中分离出关注语义关系的特定注意力头。

英文摘要:

While interpretability research has shed light on some internal algorithms utilized by transformer-based LLMs, reasoning in natural language, with its deep contextuality and ambiguity, defies easy categorization. As a result, formulating clear and motivating questions for circuit analysis that rely on well-defined in-domain and out-of-domain examples required for causal interventions is challenging. Although significant work has investigated circuits for specific tasks, such as indirect object identification (IOI), deciphering natural language reasoning through circuits remains difficult due to its inherent complexity. In this work, we take initial steps to characterize causal reasoning in LLMs by analyzing clear-cut cause-and-effect sentences like "I opened an umbrella because it started raining," where causal interventions may be possible through carefully crafted scenarios using GPT-2 small. Our findings indicate that causal syntax is localized within the first 2-3 layers, while certain heads in later layers exhibit heightened sensitivity to nonsensical variations of causal sentences. This suggests that models may infer reasoning by (1) detecting syntactic cues and (2) isolating distinct heads in the final layers that focus on semantic relationships.

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

↑