Do LLMs Dream of Elephants (when Told Not to)? Latent Concept Association and Associative Memory in Transformers
Abstract
Large Language Models (LLMs) have the capacity to store and recall facts. Through experimentation with open-source models, we observe that this ability to retrieve facts can be easily manipulated by changing contexts, even without altering their factual meanings. These findings highlight that LLMs might behave like an associative memory model where certain tokens in the contexts serve as clues to retrieving facts. We mathematically explore this property by studying how transformers, the building blocks of LLMs, can complete such memory tasks. We study a simple latent concept association problem with a one-layer transformer and we show theoretically and empirically that the transformer gathers information using self-attention and uses the value matrix for associative memory.
Cite
Text
Jiang et al. "Do LLMs Dream of Elephants (when Told Not to)? Latent Concept Association and Associative Memory in Transformers." Neural Information Processing Systems, 2024. doi:10.52202/079017-2163Markdown
[Jiang et al. "Do LLMs Dream of Elephants (when Told Not to)? Latent Concept Association and Associative Memory in Transformers." Neural Information Processing Systems, 2024.](https://mlanthology.org/neurips/2024/jiang2024neurips-llms/) doi:10.52202/079017-2163BibTeX
@inproceedings{jiang2024neurips-llms,
title = {{Do LLMs Dream of Elephants (when Told Not to)? Latent Concept Association and Associative Memory in Transformers}},
author = {Jiang, Yibo and Rajendran, Goutham and Ravikumar, Pradeep and Aragam, Bryon},
booktitle = {Neural Information Processing Systems},
year = {2024},
doi = {10.52202/079017-2163},
url = {https://mlanthology.org/neurips/2024/jiang2024neurips-llms/}
}