让大模型学会反思错误,通过纠错日志提升生成质量。
Transformer Copilot: Learning from The Mistake Log in LLM Fine-tuning
- 用错误日志记录模型学习过程中的反复失误。
- 纠错模型可使性能最高提升34.5%,计算开销极小。
- 适合需要高精度推理的下游任务应用。
大型语言模型通常通过特定领域数据进行监督微调。标准微调仅以最小化生成损失为目标优化参数,而本文进一步保留并利用模型自身的学习信号,类比人类通过反思错误来改进表现。我们引入‘错误日志’(Mistake Log)系统追踪模型在微调过程中的学习行为与重复错误。将原基于Transformer的模型视为‘飞行员’,设计一个‘副驾驶’模型,通过修正输出逻辑值来提升其推理表现。整体框架称为Transformer Copilot,包含:(i) 新型副驾驶模型设计,(ii) 副驾驶与飞行员同步学习错误日志的联合训练机制,(iii) 推理时融合副驾驶修正结果的融合推理范式。理论与实证分析表明,该框架在12个涵盖常识、算术与推荐任务的基准上,性能最高提升34.5%,对主模型计算开销极小,且具备良好可扩展性与迁移能力。代码已开源。
原文摘要 · Abstract (English)
Large language models are typically adapted to downstream tasks through supervised fine-tuning on domain-specific data. While standard fine-tuning focuses on minimizing generation loss to optimize model parameters, we take a deeper step by retaining and leveraging the model's own learning signals, analogous to how human learners reflect on past mistakes to improve future performance. We first introduce the concept of Mistake Log to systematically track the model's learning behavior and recurring errors throughout fine-tuning. Treating the original transformer-based model as the Pilot, we correspondingly design a Copilot model to refine the Pilot's inference performance via logits rectification. We name the overall Pilot-Copilot framework the Transformer Copilot, which introduces (i) a novel Copilot model design, (ii) a joint training paradigm where the Copilot continuously learns from the evolving Mistake Log alongside the Pilot, and (iii) a fused inference paradigm where the Copilot rectifies the Pilot's logits for enhanced generation. We provide both theoretical and empirical analyses on our new learning framework. Experiments on 12 benchmarks spanning commonsense, arithmetic, and recommendation tasks demonstrate that Transformer Copilot consistently improves performance by up to 34.5%, while introducing marginal computational overhead to Pilot models and exhibiting strong scalability and transferability. Our code is released at https://github.com/jiaruzouu/TransformerCopilot.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。