Be like a Goldfish, Don't Memorize! Mitigating Memorization in Generative LLMs
Abhimanyu Hans, Yuxin Wen, Neel Jain, John Kirchenbauer, Hamid Kazemi,, Prajwal Singhania, Siddharth Singh, Gowthami Somepalli, Jonas Geiping,, Abhinav Bhatele, Tom Goldstein

TL;DR
This paper introduces the goldfish loss, a training modification for large language models that reduces memorization of training data by excluding random token subsets during training, thereby enhancing privacy without harming performance.
Contribution
It proposes a novel training objective, the goldfish loss, which effectively mitigates memorization in large language models while maintaining their utility.
Findings
Significant reduction in memorization of training data.
Minimal impact on downstream task performance.
Effective across billion-scale Llama-2 models.
Abstract
Large language models can memorize and repeat their training data, causing privacy and copyright risks. To mitigate memorization, we introduce a subtle modification to the next-token training objective that we call the goldfish loss. During training, randomly sampled subsets of tokens are excluded from the loss computation. These dropped tokens are not memorized by the model, which prevents verbatim reproduction of a complete chain of tokens from the training set. We run extensive experiments training billion-scale Llama-2 models, both pre-trained and trained from scratch, and demonstrate significant reductions in extractable memorization with little to no impact on downstream benchmarks.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
- 🤗ahans1/standard-loss-llama-1Bmodel· 6 dl6 dl
- 🤗ahans1/3-goldfish-loss-llama-1Bmodel· 4 dl4 dl
- 🤗ahans1/128-goldfish-loss-llama-1Bmodel· 5 dl5 dl
- 🤗ahans1/32-goldfish-loss-llama-1Bmodel· 7 dl7 dl
- 🤗ahans1/8-goldfish-loss-llama-1Bmodel· 4 dl4 dl
- 🤗goldfish-loss/4-goldfish-loss-llama-1Bmodel· 2 dl2 dl
- 🤗ahans1/control-llama-1Bmodel· 5 dl5 dl
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Wikis in Education and Collaboration · Topic Modeling
