Secure Systems Group
Menu×

Wiki Home

Fine-tuning

Definition

Fine-tuning continues training a model whose weights already encode broad capability, using a smaller dataset chosen for a particular task, domain, or behavior. It costs a small fraction of pretraining because the general representations are already there and only need adjusting. In vision it is the second half of transfer learning: take an ImageNet-pretrained backbone and fit it to a target task with far less task-specific data. For language models it is the whole post-pretraining pipeline, and the stages have their own names, instruction tuning, preference optimization (RLHF or DPO), and safety training, but each is a fine-tuning run.

Full fine-tuning updates every weight. Parameter-efficient fine-tuning updates a small subset of weights, or small modules added alongside frozen ones, and low-rank adaptation (LoRA) is the common instance (Hu et al., 2022). The distinction is not only about cost: it changes how much of the model an adaptation can move, and it changes what an adversary with fine-tuning access can reach.

Three consequences make fine-tuning recur in this course. A fine-tuning run is constrained only by its own objective and data, so a property installed by an earlier stage can degrade as a side effect, which is how a safety-aligned model loses its refusals under fine-tuning on data unrelated to safety (Qi et al., 2024). The fine-tuning set is usually the smallest and most sensitive data in the pipeline, so it is the data a memorization or extraction attack has the best odds against. And offering fine-tuning as a hosted service hands an outside party a weight-update capability, which is a stronger position than any prompt.

Papers that use this concept

Variants and traps

  • Fine-tuning and unlearning both edit a trained model, and both are gradient runs, but they answer different questions. Fine-tuning asks what the model should now do; unlearning asks what influence should now be absent, which is a claim about the model’s history and is harder to verify.
  • “Fine-tuning attack” covers two different capabilities. One is an adversary supplying harmful fine-tuning data on purpose; the other is a benign developer whose ordinary fine-tuning degrades safety by accident. A defense that stops the first need not address the second.
  • Parameter-efficient fine-tuning constrains where the update lands, which is often mistaken for constraining how much the behavior can move. A small number of updated parameters can still change a model’s refusals.

See also

References

  • Hu, E. J., et al. “LoRA: Low-Rank Adaptation of Large Language Models.” International Conference on Learning Representations (ICLR), 2022.