Abstract

Large language models (LLMs) can expose memorized training sequences under prefix-based extraction: given a prefix from a training example, the model may assign high probability to the original continuation. In deployed systems, however, prefixes are rarely evaluated in isolation. They often appear together with instructions, retrieved documents, or other task-specific context, as in retrieval-augmented generation (RAG). This motivates examining whether contextual conditioning mitigates memorization or merely changes the set of memorized samples that become extractable. We investigate this issue through paired item-level measurements of probabilistic suffix extraction. For each prefix-suffix pair, we score the target suffix under an empty prompt and under retrieved contexts of varying relevance, across three open-weight instruction-tuned models. We find that context does not simply erase memorization. Instead, extractable memorization consists of a context-robust core and a context-sensitive boundary. Many samples that are extractable without context remain extractable under the retrieved context, especially as the prefix length increases. At the same time, context mainly affects marginal samples near the extraction threshold: it suppresses some exposures, but also enables new ones that are missed by prefix-only evaluation. These findings qualify the view that RAG reduces memorization risk. Context can lower aggregate extraction by suppressing boundary cases, yet robustly extractable samples persist, and context-enabled extractability remains security-relevant.

Keywords

Subject

Publication details

Journal
Not available
Open access
Green open access

Cite this article

APA 7

Satvaty, A., Sharafi, N., Qi, J., Verberne, S., & Turkmen, F. (2026). Is Memorization Context-Sensitive? Prefix-Based Extraction Beyond Isolated Prefixes. https://omanscience.com/en/articles/is-memorization-context-sensitive-prefix-based-extraction-beyond-isolated-prefixes

MLA 9

Satvaty, Ali, et al. "Is Memorization Context-Sensitive? Prefix-Based Extraction Beyond Isolated Prefixes." https://omanscience.com/en/articles/is-memorization-context-sensitive-prefix-based-extraction-beyond-isolated-prefixes.

Chicago (author–date)

Satvaty, Ali, Narjes Sharafi, Jirui Qi, Suzan Verberne, and Fatih Turkmen. 2026. "Is Memorization Context-Sensitive? Prefix-Based Extraction Beyond Isolated Prefixes." https://omanscience.com/en/articles/is-memorization-context-sensitive-prefix-based-extraction-beyond-isolated-prefixes.

Harvard

Satvaty, A., Sharafi, N., Qi, J., Verberne, S. and Turkmen, F. (2026) 'Is Memorization Context-Sensitive? Prefix-Based Extraction Beyond Isolated Prefixes', Available at: https://omanscience.com/en/articles/is-memorization-context-sensitive-prefix-based-extraction-beyond-isolated-prefixes.

Vancouver

Satvaty A, Sharafi N, Qi J, Verberne S, Turkmen F. Is Memorization Context-Sensitive? Prefix-Based Extraction Beyond Isolated Prefixes. https://omanscience.com/en/articles/is-memorization-context-sensitive-prefix-based-extraction-beyond-isolated-prefixes

IEEE

A. Satvaty, N. Sharafi, J. Qi, S. Verberne, and F. Turkmen, "Is Memorization Context-Sensitive? Prefix-Based Extraction Beyond Isolated Prefixes," https://omanscience.com/en/articles/is-memorization-context-sensitive-prefix-based-extraction-beyond-isolated-prefixes.