arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.11215cs.LGcs.AIcs.CEcs.CLcs.NAmath.NA
收藏

大型语言模型的机制可解释性及其在金融服务行业的应用

Mechanistic interpretability of large language models with applications to the financial services industry

Discover Financial Services Inc.(Discover金融服务公司);Emerging Capabilities Research Group(新兴能力研究组)

Ashkan Golgoon, Khashayar Filom, Arjun Ravi Kannan

AI总结:

本文首创性地将机制可解释性应用于金融服务领域的大型语言模型,通过直接 logit 归因和激活修补等因果干预方法,定位了 GPT-2 Small 在识别 Fair Lending 违规任务中的关键注意力头,为合规监控提供了算法任务设计范例。

摘要:

大型语言模型,如 GPTs(Generative Pre-trained Transformers,生成式预训练 Transformer),在广泛的应用场景中展现出卓越的能力。然而,由于其内在的复杂性,这些模型在解释其内部决策过程方面提出了重大挑战。这种缺乏透明度的状况在金融机构采用它们时构成了关键挑战,因为在这些机构中,关于偏见、公平性和可靠性的担忧与问责至关重要。机制可解释性旨在对诸如 Transformer 等复杂 AI 模型进行逆向工程。在本文中,我们开创性地使用机制可解释性来揭示用于金融服务应用的大型语言模型的内部工作原理。我们提供了几个示例,说明如何设计算法任务以用于合规监控目的。具体而言,我们研究了 GPT-2 Small 在被提示识别潜在违反 Fair Lending 法律时的注意力模式。使用直接 logit 归因,我们研究了每一层及其对应的注意力头对残差流中 logit 差异的贡献。最后,我们设计了干净和损坏的提示,并使用激活修补作为一种因果干预方法,以进一步定位我们的任务完成组件。我们观察到,(正)头 10.2(第 10 层第 2 个头)、10.7 和 11.3,以及(负)头 9.6 和 10.6 在任务完成中发挥了重要作用。

英文摘要:

Large Language Models such as GPTs (Generative Pre-trained Transformers) exhibit remarkable capabilities across a broad spectrum of applications. Nevertheless, due to their intrinsic complexity, these models present substantial challenges in interpreting their internal decision-making processes. This lack of transparency poses critical challenges when it comes to their adaptation by financial institutions, where concerns and accountability regarding bias, fairness, and reliability are of paramount importance. Mechanistic interpretability aims at reverse engineering complex AI models such as transformers. In this paper, we are pioneering the use of mechanistic interpretability to shed some light on the inner workings of large language models for use in financial services applications. We offer several examples of how algorithmic tasks can be designed for compliance monitoring purposes. In particular, we investigate GPT-2 Small's attention pattern when prompted to identify potential violation of Fair Lending laws. Using direct logit attribution, we study the contributions of each layer and its corresponding attention heads to the logit difference in the residual stream. Finally, we design clean and corrupted prompts and use activation patching as a causal intervention method to localize our task completion components further. We observe that the (positive) heads $10.2$ (head $2$, layer $10$), $10.7$, and $11.3$, as well as the (negative) heads $9.6$ and $10.6$ play a significant role in the task completion.

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

↑