Saved in:
| Main Authors: | , , , , |
|---|---|
| Format: | Preprint |
| Published: |
2024
|
| Subjects: | |
| Online Access: | https://arxiv.org/abs/2405.15943 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1866909473942011904 |
|---|---|
| author | Shai, Adam S. Marzen, Sarah E. Teixeira, Lucas Oldenziel, Alexander Gietelink Riechers, Paul M. |
| author_facet | Shai, Adam S. Marzen, Sarah E. Teixeira, Lucas Oldenziel, Alexander Gietelink Riechers, Paul M. |
| contents | What computational structure are we building into large language models when we train them on next-token prediction? Here, we present evidence that this structure is given by the meta-dynamics of belief updating over hidden states of the data-generating process. Leveraging the theory of optimal prediction, we anticipate and then find that belief states are linearly represented in the residual stream of transformers, even in cases where the predicted belief state geometry has highly nontrivial fractal structure. We investigate cases where the belief state geometry is represented in the final residual stream or distributed across the residual streams of multiple layers, providing a framework to explain these observations. Furthermore we demonstrate that the inferred belief states contain information about the entire future, beyond the local next-token prediction that the transformers are explicitly trained on. Our work provides a general framework connecting the structure of training data to the geometric structure of activations inside transformers. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2405_15943 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | Transformers represent belief state geometry in their residual stream Shai, Adam S. Marzen, Sarah E. Teixeira, Lucas Oldenziel, Alexander Gietelink Riechers, Paul M. Machine Learning Computation and Language What computational structure are we building into large language models when we train them on next-token prediction? Here, we present evidence that this structure is given by the meta-dynamics of belief updating over hidden states of the data-generating process. Leveraging the theory of optimal prediction, we anticipate and then find that belief states are linearly represented in the residual stream of transformers, even in cases where the predicted belief state geometry has highly nontrivial fractal structure. We investigate cases where the belief state geometry is represented in the final residual stream or distributed across the residual streams of multiple layers, providing a framework to explain these observations. Furthermore we demonstrate that the inferred belief states contain information about the entire future, beyond the local next-token prediction that the transformers are explicitly trained on. Our work provides a general framework connecting the structure of training data to the geometric structure of activations inside transformers. |
| title | Transformers represent belief state geometry in their residual stream |
| topic | Machine Learning Computation and Language |
| url | https://arxiv.org/abs/2405.15943 |