cs.LGFeb 21, 2026

A Prior-Aware Metric for Efficiently Distinguishing Memorization from Generalization in Large Language Models

Authors: Trishita Tiwari, Ari Trachtenberg, G. Edward Suh

Organizations: Cornell University · Boston University · NVIDIA, Cornell University

Abstract

Training data leakage from Large Language Models (LLMs) raises serious concerns related to privacy, security, and copyright compliance. A central challenge in assessing this risk is distinguishing prefix-specific memorization of training data from the generation of statistically common sequences. Existing approaches to measuring memorization often conflate these phenomena, labeling outputs as memorized even when they arise from generalization over common patterns. Counterfactual memorization and other related metrics \citep{zhang2023counterfactual, wang2025generalization, lesci2024causal} provide principled solutions, however, their reliance on retraining multiple baseline models or parsing through the training data makes them computationally impractical at scale. This work introduces Prior-Aware memorization, a theoretically grounded, lightweight and training-free criterion for identifying prefix-specific memorization in LLMs. The key idea is to evaluate whether a candidate suffix is strongly associated with its specific training prefix or whether it appears with high probability across many IID sampled sequences from the training data distribution due to statistical commonality. We correlate our metric with counterfactual memorization, and also evaluate it on the training corpora of two pre-trained models, LLaMA and OPT. Our results show that between 55% and 90% of sequences previously labeled as memorized fail our criterion and are consistent with statistical commonality

Figures & tables

Appendix figures & tables3 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. LLMs Can Leak Training Data But Do They Want To? A Propensity-Aware Evaluation of Memorization in LLMs

    Jun 4, 2026Gianluca Barmina, Peter Schneider-Kamp, Lukas Galke PoechData LeakageMemorization in Language Models

  2. Understanding the Interplay between Memorization and Learning in Large Language Models

    Jul 20, 2025Bishwamittra Ghosh, Soumi Das, Qinyuan Wu +4Memorization in Language ModelsLLM Training

  3. A Comparative Analysis of LLM Memorization at Statistical and Internal Levels: Cross-Model Commonalities and Model-Specific Signatures

    Mar 23, 2026Bowen Chen, Namgi Han, Yusuke MiyaoMemorization in Language Models