微调LLM中用于跨语言迁移的中间层表示对齐
Middle-Layer Representation Alignment for Cross-Lingual Transfer in Fine-Tuned LLMs
AI总结:
针对LLM跨语言迁移受限于性能差距和数据稀缺的问题,提出基于中间层表示对齐的微调方法,实验证明其在多任务中显著提升跨语言迁移效果,且模块可合并无需全面重训。
摘要:
尽管大语言模型通过微调在特定任务应用中展现出卓越能力,但将这些益处扩展至多种语言对于广泛的可及性至关重要。然而,跨语言迁移的有效性受限于LLM在不同语言间的性能差距以及许多语言微调数据的稀缺。通过对1000多个语言对的LLM内部表示进行分析,我们发现中间层展现出最强的跨语言对齐潜力。基于这一发现,我们提出了一种集成到特定任务训练中的中间层对齐目标。我们在槽位填充、机器翻译和结构化文本生成上的实验表明,跨语言迁移得到持续提升,尤其是对低资源语言。该方法对对齐语言的选择具有鲁棒性,并能泛化至对齐期间未见的语言。此外,我们证明单独训练的对齐模块可以与现有的特定任务模块合并,在无需全面重新训练的情况下提升跨语言能力。代码已公开(https://github.com/dannigt/mid-align)。
英文摘要:
While large language models demonstrate remarkable capabilities at task-specific applications through fine-tuning, extending these benefits across diverse languages is essential for broad accessibility. However, effective cross-lingual transfer is hindered by LLM performance gaps across languages and the scarcity of fine-tuning data in many languages. Through analysis of LLM internal representations from over 1,000+ language pairs, we discover that middle layers exhibit the strongest potential for cross-lingual alignment. Building on this finding, we propose a middle-layer alignment objective integrated into task-specific training. Our experiments on slot filling, machine translation, and structured text generation show consistent improvements in cross-lingual transfer, especially to lower-resource languages. The method is robust to the choice of alignment languages and generalizes to languages unseen during alignment. Furthermore, we show that separately trained alignment modules can be merged with existing task-specific modules, improving cross-lingual capabilities without full re-training. Our code is publicly available (https://github.com/dannigt/mid-align).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。