TuCo: Measuring the Contribution of Fine-Tuning to Individual Responses of LLMs

Felipe Nuti, Tim Franzmeyer, João F. Henriques
2/14/2026

No official code found. Best implementation: FelipeNuti/tuning-contribution (5 stars, last commit 2025-07-02).

Abstract

Past work has studied the effects of fine-tuning on large language models'(LLMs) overall performance on certain tasks. However, a quantitative and systematic method for analyzing its effect on individual outputs is still lacking. Here, we propose a new method for measuring the contribution that fine-tuning makes to individual LLM responses, assuming access to the original pre-trained model. Our method tracks the model's intermediate hidden states, providing a more fine-grained insight into the effects of fine-tuning than a simple comparison of final outputs from pre-trained and fine-tuned models. We introduce and theoretically analyze an exact decomposition of any fine-tuned LLM into a pre-training component and a fine-tuning component. Empirically, we find that model behavior and performance can be steered by up- or down-scaling the fine-tuning component during the forward pass. Motivated by this finding and our theoretical analysis, we define the Tuning Contribution (TuCo) as the ratio of the magnitudes of the fine-tuning component to the pre-training component. We observe that three prominent adversarial attacks on LLMs circumvent safety measures in a way that reduces TuCo, and that TuCo is consistently lower on prompts where these attacks succeed compared to those where they do not. This suggests that attenuating the effect of fine-tuning on model outputs plays a role in the success of such attacks. In summary, TuCo enables the quantitative study of how fine-tuning influences model behavior and safety, and vice versa.

View on arXivView PDF

Code Implementations(1)

Official codebase for TuCo: Measuring the Contribution of Fine-Tuning to Individual Responses of LLMs (ICML 2025).

51Shell, PythonMay 19, 20251 years ago

Similar Papers

Cite this paper

@article{nuti2026tuco,
  title  = {TuCo: Measuring the Contribution of Fine-Tuning to Individual Responses of LLMs},
  author = {Felipe Nuti and Tim Franzmeyer and João F. Henriques},
  year   = {2026},
  eprint = {2506.23423},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2506.23423},
  journal = {ICML 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/2506.23423.svg)](https://codeofpaper.com/paper/2506.23423)

Discussion