arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2402.14811cs.CLcs.LG
收藏

微调增强既有机制:以实体追踪为例的案例研究

Fine-Tuning Enhances Existing Mechanisms: A Case Study on Entity Tracking

Northeastern University(东北大学);MIT CSAIL(麻省理工学院计算机科学与人工智能实验室);Technion – IIT(以色列理工学院)

Nikhil Prakash, Tamar Rott Shaham, Tal Haklay, Yonatan Belinkov, David Bau

AI总结:

本文以实体追踪为案例,发现微调主要增强而非改变语言模型的既有内部机制,性能提升源于对增强位置信息处理能力的改善。

摘要:

在指令跟随、代码生成和数学等通用任务上进行微调已被证明能够提升语言模型在一系列任务上的表现。然而,关于此类微调如何影响这些模型内部计算的解释仍然不明确。我们研究微调如何影响语言模型中实现的内部机制。作为案例研究,我们探索实体追踪这一语言理解的关键方面,在数学任务上微调的模型在该能力上获得了显著性能提升。我们识别了实现实体追踪的机制,并表明:(i) 在原始模型及其微调版本中,主要由相同的电路实现实体追踪。事实上,原始模型的实体追踪电路在微调版本上的表现优于完整的原始模型。(ii) 所有模型的电路实现的功能大致相同:在原始模型及其微调版本中,实体追踪都是通过追踪正确实体的位置来完成的。(iii) 微调模型的性能提升主要归因于其处理增强位置信息能力的改善。为揭示这些发现,我们采用了:Patch Patching、DCM(自动检测负责特定语义的模型组件)以及CMAP(一种跨模型修补激活以揭示改进机制的新方法)。我们的发现表明,微调增强而非根本性地改变模型的机制性运作。

英文摘要:

Fine-tuning on generalized tasks such as instruction following, code generation, and mathematics has been shown to enhance language models' performance on a range of tasks. Nevertheless, explanations of how such fine-tuning influences the internal computations in these models remain elusive. We study how fine-tuning affects the internal mechanisms implemented in language models. As a case study, we explore the property of entity tracking, a crucial facet of language comprehension, where models fine-tuned on mathematics have substantial performance gains. We identify the mechanism that enables entity tracking and show that (i) in both the original model and its fine-tuned versions primarily the same circuit implements entity tracking. In fact, the entity tracking circuit of the original model on the fine-tuned versions performs better than the full original model. (ii) The circuits of all the models implement roughly the same functionality: Entity tracking is performed by tracking the position of the correct entity in both the original model and its fine-tuned versions. (iii) Performance boost in the fine-tuned models is primarily attributed to its improved ability to handle the augmented positional information. To uncover these findings, we employ: Patch Patching, DCM, which automatically detects model components responsible for specific semantics, and CMAP, a new approach for patching activations across models to reveal improved mechanisms. Our findings suggest that fine-tuning enhances, rather than fundamentally alters, the mechanistic operation of the model.

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

↑