NeurIPS 2024poster6 citations

Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformers

Yibo Jiang, Goutham Rajendran, Pradeep Kumar Ravikumar, Bryon Aragam

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.

TransformerAssociative MemoryLarge Language ModelsInterpretabilityFact retrieval
BibTeX
@inproceedings{
jiang2024do,
title={Do {LLM}s dream of elephants (when told not to)? Latent concept association and associative memory in transformers},
author={Yibo Jiang and Goutham Rajendran and Pradeep Kumar Ravikumar and Bryon Aragam},
booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
year={2024},
url={https://openreview.net/forum?id=WJ04ZX8txM}
}
Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformers · NeurIPS 2024