Transformer Copilot: Learning from The Mistake Log in LLM Fine-tuning

Jiaru Zou, Yikun Ban, Zihao Li, Yunzhe Qi, Ruizhong Qiu +2 more
5/22/2025
30 citations
cs.CLcs.AIcs.LG
transformer-attention

Official code: jiaruzouu/TransformerCopilot (21 stars, Python, MIT, last commit 2025-11-14).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

MIT

[NeurIPS 2025 Spotlight] Transformer Copilot: Learning from The Mistake Log in LLM Fine-tuning

214Python, ShellMay 22, 20251 years agoMIT

Similar Papers

Cite this paper

@article{zou2025transformer,
  title  = {Transformer Copilot: Learning from The Mistake Log in LLM Fine-tuning},
  author = {Jiaru Zou and Yikun Ban and Zihao Li and Yunzhe Qi and Ruizhong Qiu and Ling Yang and Jingrui He},
  year   = {2025},
  eprint = {2505.16270},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.16270v2},
  journal = {NEURIPS 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.16270.svg)](https://codeofpaper.com/paper/2505.16270)

Discussion