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

指令微调如何实现长度控制:一项跨语言机制分析

How Instruction-Tuning Imparts Length Control: A Cross-Lingual Mechanistic Analysis

Università degli Studi di Milano, Department of Computer Science(米兰大学计算机科学系)

Elisabetta Rocchetti, Alfio Ferrara

AI总结:

该研究针对大语言模型长度控制难题,通过跨语言机制分析发现指令微调通过重构模型后层组件提升长度控制能力,且不同语言下组件贡献模式存在差异。

摘要:

遵循明确的长度约束(例如生成具有精确字数的文本)仍然是大语言模型(LLM)面临的重大挑战。本研究旨在探究基础模型与其指令微调版本在英文和意大利文长度受控文本生成任务上的差异。我们使用累积加权归因(Cumulative Weighted Attribution,一种源自直接对数似然归因(Direct Logit Attribution)的指标)分析了性能表现与内部组件的贡献。研究结果表明,指令微调显著提升了长度控制能力,这主要通过特化模型更深层的组件实现。具体而言,指令微调(IT)模型后层的注意力头表现出日益增强的正向贡献,在英文中尤为明显。在意大利语中,尽管注意力的贡献更为微弱,但末层的多层感知机(MLP)展现出更强的正向作用,表明存在一种补偿机制。这些结果表明,指令微调会重构后层以适配任务要求,而组件层面的策略可能会根据语言语境进行调整。

英文摘要:

Adhering to explicit length constraints, such as generating text with a precise word count, remains a significant challenge for Large Language Models (LLMs). This study aims at investigating the differences between foundation models and their instruction-tuned counterparts, on length-controlled text generation in English and Italian. We analyze both performance and internal component contributions using Cumulative Weighted Attribution, a metric derived from Direct Logit Attribution. Our findings reveal that instruction-tuning substantially improves length control, primarily by specializing components in deeper model layers. Specifically, attention heads in later layers of IT models show increasingly positive contributions, particularly in English. In Italian, while attention contributions are more attenuated, final-layer MLPs exhibit a stronger positive role, suggesting a compensatory mechanism. These results indicate that instruction-tuning reconfigures later layers for task adherence, with component-level strategies potentially adapting to linguistic context.

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

↑