AI
New method detects near-verbatim memorization in AI language models with far less computation
Researchers propose decoding-constrained beam search to identify privacy and copyright risks from closely paraphrased training data in large language models.
Researchers have developed a more efficient technique for measuring how much training data language models can extract or reproduce—including passages that are close to, but not exactly matching, what was used to train them. This distinction matters because near-verbatim reproductions pose many of the same privacy and copyright risks as exact memorization.
The problem with current methods#
Most approaches for detecting memorization in large language models (LLMs) check for exact word-for-word reproduction, missing the broader spectrum of extractable content. While probabilistic extraction methods can measure the likelihood that a model generates specific sequences, they struggle with near-verbatim cases—passages that are slightly rephrased or altered. The challenge: there are combinatorially many possible near-verbatim variations, making reliable estimation through standard sampling prohibitively expensive. Traditional Monte Carlo approaches can require around 100,000 samples just to assess a single sequence.
A faster solution#
The researchers introduce decoding-constrained beam search, an algorithm that identifies lower bounds on near-verbatim extraction risk with dramatically reduced computational cost—approximately 20 samples per sequence compared to 100,000. The method produces deterministic estimates rather than probabilistic ones, offering a practical alternative for researchers and practitioners concerned about model privacy.
What the findings reveal#
Across various experiments, the technique uncovers patterns invisible to verbatim-only methods: substantially more sequences are extractable than traditional detection suggests, the amount of extractable content per sequence is much larger, and patterns in near-verbatim extraction risk vary predictably across different model sizes and text categories. These insights underscore that memorization risk in language models is more pervasive than commonly measured.

