NeurIPS 2026Coming to NeurIPS in Sydney?Explore papers, orals & directions

Understanding the Mechanics and Dynamics of Memorisation in Large Language Models: A Case Study with Random Strings

Till Speicher, Aflah Mohammad Khan, Qinyuan Wu, Vedant Nanda, Soumi Das, Bishwamittra Ghosh, Krishna P. Gummadi, Evimaria TerziOpenReview 2024 · Submission to ICLR 2024 · Rejected

Abstract

Understanding whether and to what extent large language models (LLMs) have memorised training data has important implications for the privacy of its training data and the reliability of its generated output. In this work, we focus on the more foundational question of how LLMs memorise training data. To this end, we systematically train LLMs of different sizes to memorise random token strings of different lengths and different entropies (i.e., sampled from different alphabet distributions) and study their ability to recall the strings. We observe many striking memorisation dynamics including (i) memorisation in phases with the alphabet distributions in the random strings being learnt before their relative positions in the string are memorised and (ii) memorisation in parts at the granularity of individual tokens, but not necessarily in the order in which they appear in the string. Next, we investigate memorisation mechanics by checking to what extent different parts of a token’s prefix in the string are necessary and sufficient to recollect the token. We leverage our insights to explain the dynamics of memorising strings and we conclude by discussing the implications of our findings for quantifying memorisation.
BibTeX
@misc{speicher2024understanding,
  author = {Till Speicher and Aflah Mohammad Khan and Qinyuan Wu and Vedant Nanda and Soumi Das and Bishwamittra Ghosh and Krishna P. Gummadi and Evimaria Terzi},
  title = {{Understanding the Mechanics and Dynamics of Memorisation in Large Language Models: A Case Study with Random Strings}},
  year = {2024},
  url = {https://openreview.net/forum?id=ILStlRb1Sp},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2024},
}
Figure