Early Detection and Reduction of Memorisation for Domain Adaptation and Instruction Tuning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Slack, Dean L., Moubayed, Noura Al
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917007989932032
author Slack, Dean L.
Moubayed, Noura Al
author_facet Slack, Dean L.
Moubayed, Noura Al
contents Although large language models excel across many tasks, they can memorise training data and thereby expose private or copyrighted text. Most defences target the pre-training stage, leaving memorisation during fine-tuning, especially for domain adaptation and instruction tuning, poorly understood. We fine-tune Pythia, Llama3, and Mistral models spanning 1.4B-70B parameters on common evaluation datasets and track verbatim memorisation throughout training. We find that memorisation increases dramatically in the first few epochs, often significantly before either validation perplexity or evaluation performance is optimised. We use a simple but effective n-gram memorisation score which reliably precedes verbatim memorisation; using it as an early-stopping criterion mitigates memorisation with minimal performance loss. Further, we introduce an n-gram-aware loss regulariser and show that it reduces memorisation across all model families tested by up to 40% while minimising evaluation performance trade-offs when compared to an existing memorisation mitigation strategy. These results yield practical, scalable insights into memorisation dynamics during language model fine-tuning.
format Preprint
id arxiv_https___arxiv_org_abs_2510_11372
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Early Detection and Reduction of Memorisation for Domain Adaptation and Instruction Tuning
Slack, Dean L.
Moubayed, Noura Al
Computation and Language
Artificial Intelligence
Although large language models excel across many tasks, they can memorise training data and thereby expose private or copyrighted text. Most defences target the pre-training stage, leaving memorisation during fine-tuning, especially for domain adaptation and instruction tuning, poorly understood. We fine-tune Pythia, Llama3, and Mistral models spanning 1.4B-70B parameters on common evaluation datasets and track verbatim memorisation throughout training. We find that memorisation increases dramatically in the first few epochs, often significantly before either validation perplexity or evaluation performance is optimised. We use a simple but effective n-gram memorisation score which reliably precedes verbatim memorisation; using it as an early-stopping criterion mitigates memorisation with minimal performance loss. Further, we introduce an n-gram-aware loss regulariser and show that it reduces memorisation across all model families tested by up to 40% while minimising evaluation performance trade-offs when compared to an existing memorisation mitigation strategy. These results yield practical, scalable insights into memorisation dynamics during language model fine-tuning.
title Early Detection and Reduction of Memorisation for Domain Adaptation and Instruction Tuning
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2510.11372