The Mosaic Memory of Large Language Models

Igor Shilov, Matthieu Meeus, Yves-Alexandre de Montjoye
5/24/2024
17 citations
cs.CLcs.LG

No official code found. Best implementation: imperial-aisp/mosaic_memory (3 stars, Jupyter Notebook, Apache-2.0, last commit 2026-02-16).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

Apache-2.0
30Jupyter Notebook, RustMay 7, 20259 months agoApache-2.0

Similar Papers

Cite this paper

@article{shilov2024mosaic,
  title  = {The Mosaic Memory of Large Language Models},
  author = {Igor Shilov and Matthieu Meeus and Yves-Alexandre de Montjoye},
  year   = {2024},
  eprint = {2405.15523},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.15523v2}
}

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

Discussion