Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformers
Fuente:
arXiv
Saved in:
| Main Authors: | , , , |
|---|---|
| Format: | Preprint |
| Published: |
2024
|
| Subjects: | |
| Online Access: | |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1866916497747607552 |
|---|---|
| author | Jiang, Yibo Rajendran, Goutham Ravikumar, Pradeep Aragam, Bryon |
| author_facet | Jiang, Yibo Rajendran, Goutham Ravikumar, Pradeep Aragam, Bryon |
| contents | 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. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2406_18400 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformers Jiang, Yibo Rajendran, Goutham Ravikumar, Pradeep Aragam, Bryon Computation and Language Machine Learning 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. |
| title | Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformers |
| topic | Computation and Language Machine Learning |
| url | https://arxiv.org/abs/2406.18400 |