Entropy-Memorization Law: Evaluating Memorization Difficulty of Data in LLMs

Yizhan Huang, Zhe Yang, Meifang Chen, Huang Nianchen, Jianping Zhang +1 more
7/8/2025
cs.CLcs.AI

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Large Language Models (LLMs) are known to memorize portions of their training data, sometimes reproducing content verbatim when prompted appropriately. In this work, we investigate a fundamental yet under-explored question in the domain of memorization: How to characterize memorization difficulty of training data in LLMs? Through empirical experiments on OLMo, a family of open models, we present the Entropy-Memorization Law. It suggests that data entropy is linearly correlated with memorization score. Moreover, in a case study of memorizing highly randomized strings, or "gibberish", we observe that such sequences, despite their apparent randomness, exhibit unexpectedly low empirical entropy compared to the broader training corpus. Adopting the same strategy to discover Entropy-Memorization Law, we derive a simple yet effective approach to distinguish training and testing data, enabling Dataset Inference (DI).

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{huang2025entropymemorization,
  title  = {Entropy-Memorization Law: Evaluating Memorization Difficulty of Data in LLMs},
  author = {Yizhan Huang and Zhe Yang and Meifang Chen and Huang Nianchen and Jianping Zhang and Michael R. Lyu},
  year   = {2025},
  eprint = {2507.06056},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.06056v3}
}

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

Discussion