Papers › The Mosaic Memory of Large Language Models

The Mosaic Memory of Large Language Models

24 May 2024arXiv:2405.15523archive 2025-07-28

Igor Shilov, Matthieu Meeus, Yves-Alexandre de Montjoye

As Large Language Models (LLMs) become widely adopted, understanding how they learn from, and memorize, training data becomes crucial. Memorization in LLMs is widely assumed to only occur as a result of sequences being repeated in the training data. Instead, we show that LLMs memorize by assembling information from similar sequences, a phenomena we call mosaic memory. We show major LLMs to exhibit mosaic memory, with fuzzy duplicates contributing to memorization as much as 0.8 of an exact duplicate and even heavily modified sequences contributing substantially to memorization. Despite models display reasoning capabilities, we somewhat surprisingly show memorization to be predominantly syntactic rather than semantic. We finally show fuzzy duplicates to be ubiquitous in real-world data, untouched by deduplication techniques. Taken together, our results challenge widely held beliefs and show memorization to be a more complex, mosaic process, with real-world implications for privacy, confidentiality, model utility and evaluation.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2405.15523")

Code

Syntology Ran 16 of 16 code samples harvested from 1 repository linked to this paper; 0 have no recorded run. Of those that ran: 16 ran with no contract checked.

By repository: official repository: 16 samples from 1 repository, 16 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

computationalprivacy/mosaic_memory officialmentioned in paperpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested; 16 ran; 0 honoured the contract we drafted; 0 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

16ran

Licence: 0 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from computationalprivacy/mosaic_memory. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

build_single_position_candidates_mlm computationalprivacy/mosaic_memory/src/gen_variations.py official repository ran Apache-2.0 (permissive) · 0030a57004494e5e · report
build_single_position_candidates_mlm_random computationalprivacy/mosaic_memory/src/gen_variations.py official repository ran Apache-2.0 (permissive) · fd6ab7a22bf3287e · report
bytes_to_ints computationalprivacy/mosaic_memory/slimpajama/py_src/near_duplicates/utils.py official repository ran Apache-2.0 (permissive) · 9ded4bc578262637 · report
check_retokenization computationalprivacy/mosaic_memory/src/gen_canaries.py official repository ran Apache-2.0 (permissive) · 051e235bda615dc8 · report
compute_perplexity computationalprivacy/mosaic_memory/src/utils.py official repository ran Apache-2.0 (permissive) · 8b00eb35104e3d2f · report
get_MIA_data computationalprivacy/mosaic_memory/src/fine_tune_model.py official repository ran Apache-2.0 (permissive) · 39a96108f827f885 · report
hamming_distance computationalprivacy/mosaic_memory/slimpajama/py_src/near_duplicates/utils.py official repository ran fingerprinted Apache-2.0 (permissive) · 9dc75d54d914e3fd · report
is_duplicate computationalprivacy/mosaic_memory/src/gen_canaries.py official repository ran Apache-2.0 (permissive) · 65518064cf879393 · report
jaccard_similarity computationalprivacy/mosaic_memory/src/gen_canaries.py official repository ran fingerprinted Apache-2.0 (permissive) · 60ab76511145062d · report
load_counts computationalprivacy/mosaic_memory/slimpajama/py_src/near_duplicates/build_targets.py official repository ran Apache-2.0 (permissive) · fa5bfde010bf115b · report
load_dataset computationalprivacy/mosaic_memory/slimpajama/py_src/near_duplicates/utils.py official repository ran Apache-2.0 (permissive) · 444514d9ca58e878 · report
min_k_prob computationalprivacy/mosaic_memory/src/utils.py official repository ran Apache-2.0 (permissive) · 1e9127a989fc5037 · report
ratio_auc computationalprivacy/mosaic_memory/src/utils.py official repository ran fingerprinted Apache-2.0 (permissive) · 74de87daccfde91d · report
sample_injection_indices computationalprivacy/mosaic_memory/src/gen_variations.py official repository ran Apache-2.0 (permissive) · 396d4d04c2e85f49 · report
split_into_chunks computationalprivacy/mosaic_memory/src/fine_tune_model.py official repository ran Apache-2.0 (permissive) · a838ebb710694579 · report
tpr_at_fpr computationalprivacy/mosaic_memory/src/compute_mia_auc.py official repository ran fingerprinted Apache-2.0 (permissive) · 606cbe1b12e20b57 · report

Tasks

Inference AttackMembership Inference AttackMemorization

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections