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

Felipe Nuti, Tim Franzmeyer, João F. Henriques · DOI

Introduction: Peeking Under the Hood of Fine-Tuned LLMs

Fine-tuning is the critical process that transforms a raw, "base" Large Language Model (LLM) into a helpful, safe assistant. While we can measure a model's average performance on benchmarks, the internal mechanics of how fine-tuning influences specific, individual responses have remained largely opaque. Researchers from the University of Oxford have introduced TuCo (Tuning Contribution), a novel metric designed to quantify exactly how much a model's fine-tuning "kicks in" for any given prompt.

Methodology: Decomposing the Residual Stream

The core of the TuCo approach lies in the residual architecture of modern Transformers. In these models, each layer adds its output to a "residual stream." By comparing a fine-tuned model with its pre-trained base version, the authors mathematically decompose the output of each layer into two distinct parts:

  1. Pre-Training Component (PTC): The contribution that the original base model would have provided.
  2. Fine-Tuning Component (FTC): The additional "delta" or refinement introduced during the fine-tuning process.
The TuCo metric is derived by comparing the magnitudes of the fine-tuning and pre-training components across the model's layers.

TuCo is defined as the ratio of the magnitude of the accumulated FTC to the total accumulated output (PTC + FTC) at the final token. A high TuCo indicates a response heavily driven by fine-tuning (such as a polite refusal or a specific persona), while a low TuCo suggests the response is primarily driven by the pre-trained base.

Key Insights: Jailbreaks as "Fine-Tuning Attenuators"

The most striking discovery made using TuCo is the mechanism behind successful "jailbreak" attacks. The researchers found that adversarial prompts—such as those using "Many-Shot" techniques or low-resource languages like Swahili—succeed by effectively "muting" the fine-tuning component.

Examples of how different prompts activate or suppress the fine-tuning contribution (TuCo).

When a model is tricked into a harmful response, it isn't necessarily that its safety training is being "overpowered." Instead, the adversarial prompt causes the fine-tuning to fail to activate, forcing the LLM to revert to its less-guarded, pre-trained base. This explains why simple translation into languages like Swahili can bypass safety filters: the fine-tuning is simply less "active" in those linguistic spaces.

Experimental Results and Performance Scaling

The authors evaluated TuCo across several open-source model families, including Llama 2/3, Mistral, and Gemma, using datasets ranging from general knowledge (MMLU) to behavioral evaluations (MWE) and adversarial benchmarks (AdvBench).

Key findings include:

  • Predicting Attack Success: TuCo is a powerful predictor of jailbreak success. For Llama 13B, it achieved an AUC of 0.87 in predicting whether an attack would work, despite not being specifically designed as a detection tool.
  • The "Volume Knob" Effect: By manually scaling the magnitude of the FTC (a technique called FTCα-Scaling), researchers could "turn up" the effects of fine-tuning. Scaling the FTC by 25% (α = 1.25) improved MMLU scores by up to 2.69% and increased alignment with specific personas or religious beliefs by up to 24%.
  • Sanity Validation: TuCo was consistently higher for "chat-like" inputs (HH-RLHF) than for "web-like" inputs (OpenWebText), confirming that the metric accurately captures the influence of instruction tuning.

Limitations and Future Outlook

While TuCo offers unprecedented granularity, it currently requires access to the weights of both the base and fine-tuned models, limiting its use to open-source architectures. Additionally, the calculation requires two forward passes, doubling the inference cost for analysis.

However, the implications for model safety and alignment are significant. TuCo could eventually be integrated into real-time safety filters to detect when a model's fine-tuning is being suppressed, providing a robust defense against adversarial manipulation.

Summary updated

BibTeX
@inproceedings{nuti2025tuco,
  author = {Felipe Nuti and Tim Franzmeyer and João F. Henriques},
  title = {{TuCo: Measuring the Contribution of Fine-Tuning to Individual Responses of LLMs}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=yxoxw0IUTR},
}
Figure