memorization
Memorization is when an AI model literally remembers certain details of the training data and can later reproduce them.
In plain terms
A language model should theoretically learn patterns: how a sentence is built, what follows from what. Sometimes, however, it memorizes specific text segments verbatim, such as a poem, a paragraph of an article, a phone number, or a code snippet. This is called memorization.
It is like a student who memorizes the history exam instead of understanding it. If asked exactly the right question, they recite it flawlessly, but they also include things they should not, such as a textbook footnote or a classmate's scribbled name.
Memorization is not always a problem: it is good if the model knows the multiplication table, the text of the National Anthem, or a well-known fact precisely. It becomes an issue only when it returns personal data, trade secrets, or copyrighted text verbatim.
How it works
- During training, the model sees vast amounts of text and adjusts its internal numerical values (parameters) to better predict the next word.
- What it sees often, such as a quote or license text copied a thousand times, is easiest for it to memorize verbatim, so it becomes embedded in the parameters.
- Rare but distinctive data can also be memorized, such as a unique name, address, or identifier, especially in large models and over multiple training rounds.
- If someone later provides the beginning of the text or tries with a cleverly phrased request, the model can continue the original. This deliberate extraction is called training data extraction.
- Developers reduce the phenomenon by filtering out duplicates, cleaning the data, applying output filters and using training methods that add noise, but they cannot eliminate it completely.
An everyday example
Ask the chatbot to continue the first sentence of a well-known novel, and you might receive a longer passage almost verbatim from the original text, although modern services try to prevent this with filters. A similar thing happens when a coding agent suggests a program segment that, including comments, matches the code of a public project.
Who is affected
A common misconception
Limits and risks
- Do not enter personal or corporate data into a chatbot that you would not want to see again if the provider uses the conversations for training.
- The fact that a model cites something confidently does not mean it is accurate: it often fills in half-remembered text with fabricated parts.
- It is difficult to determine from the outside whether a specific text was part of the training data and whether the model memorized it.
- Once something is baked into a model, it is very difficult to delete it specifically later, often only possible through retraining.
Similar, but not the same
- overfitting – In overfitting, the model generally performs poorly on new data, whereas a model that otherwise generalizes well can still memorize certain details.
- hallucination – Hallucination is fabricated, untrue content, whereas memorization is the retrieval of real text present in the training data.
- AI memory – AI memory is an intentionally built-in feature that allows an assistant or agent to remember your past conversations, while memorization is an unintended side effect of training.
Related concepts
training data extraction, verbatim reproduction
overfitting, generalization, training data, differential privacy, machine unlearning
A brief history
It has long been known in machine learning that models can memorize training data, but with large language models this became a data protection issue in the late 2010s. Nicholas Carlini and colleagues demonstrated the phenomenon on smaller language models in 2018, then in a study published at the end of 2020 and released in 2021, they showed that verbatim training texts, including personal data, could be extracted from the GPT-2 model.
Where things stand
At the end of 2026, memorization is a well-known phenomenon, studied in every large model and a central topic in copyright lawsuits and data protection regulation. Defense methods have improved significantly, but there is no complete solution.
In the news
- FDA clears AI devices: Tempus ECG tool, kidney stone surgery robot, CapsoCam featureSep 28, 2026 · Health
Also known as
memorization · rote memorization · training data memorization · verbatim memorization · memorization · training data memorization · verbatim memorization · regurgitation
Sources
- Carlini et al.: Extracting Training Data from Large Language Models (arXiv, 2020)
- Carlini et al.: The Secret Sharer – Evaluating and Testing Unintended Memorization in Neural Networks (arXiv, 2018)
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.