Estimating near-verbatim extraction risk in language models with decoding-constrained beam search

A. Feder Cooper, Mark A. Lemley, Christopher De Sa, Lea Duesterwald, Allison Casasola +4 more
3/26/2026
cs.CLcs.LG

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Recent work shows that standard greedy-decoding extraction methods for quantifying memorization in LLMs miss how extraction risk varies across sequences. Probabilistic extraction -- computing the probability of generating a target suffix given a prefix under a decoding scheme -- addresses this, but is tractable only for verbatim memorization, missing near-verbatim instances that pose similar privacy and copyright risks. Quantifying near-verbatim extraction risk is expensive: the set of near-verbatim suffixes is combinatorially large, and reliable Monte Carlo (MC) estimation can require ~100,000 samples per sequence. To mitigate this cost, we introduce decoding-constrained beam search, which yields deterministic lower bounds on near-verbatim extraction risk at a cost comparable to ~20 MC samples per sequence. Across experiments, our approach surfaces information invisible to verbatim methods: many more extractable sequences, substantially larger per-sequence extraction mass, and patterns in how near-verbatim extraction risk manifests across model sizes and types of text.

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. 1 weaker match is 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{cooper2026estimating,
  title  = {Estimating near-verbatim extraction risk in language models with decoding-constrained beam search},
  author = {A. Feder Cooper and Mark A. Lemley and Christopher De Sa and Lea Duesterwald and Allison Casasola and Jamie Hayes and Katherine Lee and Daniel E. Ho and Percy Liang},
  year   = {2026},
  eprint = {2603.24917},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.24917v1}
}

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

Discussion