cs.CLSep 26, 2026

TRAP: Understanding and Mitigating Privacy Memorization in Language Models

Authors: Muhammed Ustaomeroglu, Ziyue Xu, Hanshen Xiao, Peter Cnudde, Guannan Qu, Holger R. Roth

Organizations: Carnegie Mellon University · NVIDIA · Purdue University

Abstract

Fine-tuning a language model on sensitive records can leave it able to reproduce them. We ask when this memorization arises and how to prevent it without knowing in advance which spans are sensitive. Our starting point is that most memorization scores and attacks share one statistical core: whether the model assigns a token more probability than some reference would. Taking as the reference a model trained on the complementary half of the same corpus gives the Target Reference Advantage (TRA), a per-token signal that separates what a model fit to a particular record from what it learned across records, and is cheap and differentiable. We then study what drives memorization during fine-tuning: it keeps growing well past the validation minimum, is larger on small datasets and at higher learning rates, and higher when the underlying task is harder. Early stopping removes much of it, but because it is chosen by aggregate validation loss it helps least for rare, hard-to-predict spans embedded in otherwise learnable text, which is exactly what sensitive information tends to be. We therefore introduce TRAP, a one-sided penalty on tokenwise TRA that acts only where the target model pulls ahead of its reference. On student essays with annotated personal information and clinical cases with patient identifiers, TRAP brings memorization near the level of an untrained model at little utility cost, where generic regularizers barely move and differential privacy gives up most of what fine-tuning bought.

Figures & tables

Appendix figures & tables52 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Mitigating Memorization In Language Models

    Oct 3, 2024Mansi Sakarvadia, Aswathy Ajith, Arham Khan +6Memorization in Language ModelsLLM Fine-Tuning

  2. Decomposing Memorization Reduction in Privacy-Preserving Fine-Tuning of SLMs for CSIRTs

    Jun 26, 2026Cristhian Kapelinski, Diego KreutzPrivacy-Preserving Language ModelsMemorization in Language Models

  3. Memorization Is Not Extraction: Tight Differential-Privacy Bounds and Audit Blind Spots

    Aug 27, 2026Xujun Che, Depeng Xu, Shuhan YuanPrivacy Leakage in Language ModelsMemorization in Language Models