Exploring Memorization in Fine-tuned Language Models

Shenglai Zeng, Yaxin Li, Jie Ren, Yiding Liu, Han Xu +5 more
10/10/2023
cs.AIcs.CLcs.LG

Official code: GaotangLi/Beyond-Log-Likelihood (64 stars, Apache-2.0, last commit 2025-10-04). 1 more implementation below.

Abstract

Large language models (LLMs) have shown great capabilities in various tasks but also exhibited memorization of training data, raising tremendous privacy and copyright concerns. While prior works have studied memorization during pre-training, the exploration of memorization during fine-tuning is rather limited. Compared to pre-training, fine-tuning typically involves more sensitive data and diverse objectives, thus may bring distinct privacy risks and unique memorization behaviors. In this work, we conduct the first comprehensive analysis to explore language models' (LMs) memorization during fine-tuning across tasks. Our studies with open-sourced and our own fine-tuned LMs across various tasks indicate that memorization presents a strong disparity among different fine-tuning tasks. We provide an intuitive explanation of this task disparity via sparse coding theory and unveil a strong correlation between memorization and attention score distribution.

View on arXivView PDF

Code Implementations(2)

Apache-2.0

Beyond log-likelihood: exploring alternative objectives for supervised fine-tuning of language model post-training

640ANTLR, ShellSep 30, 20251 years agoApache-2.0
MIT

This is the code repository for ACL2024 paper: Exploring Memorization in Fine-tuned Language Models

30Shell, PythonJul 3, 20241 years agoMIT

Similar Papers

Cite this paper

@article{zeng2023exploring,
  title  = {Exploring Memorization in Fine-tuned Language Models},
  author = {Shenglai Zeng and Yaxin Li and Jie Ren and Yiding Liu and Han Xu and Pengfei He and Yue Xing and Shuaiqiang Wang and Jiliang Tang and Dawei Yin},
  year   = {2023},
  eprint = {2310.06714},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.06714v2}
}

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/2310.06714.svg)](https://codeofpaper.com/paper/2310.06714)

Discussion