HackerPapers

arXiv:2405.15943cs.LG

Transformers represent belief state geometry in their residual stream

Adam S. Shai, Sarah E. Marzen, Lucas Teixeira, Alexander Gietelink Oldenziel, Paul M. Riechers

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

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.

arXiv comments
Journal reference
DOI
Subjects
cs.LGMachine Learning cs.CLComputation and Language

On Hacker News

Linked by 1 identifiable commenter in 3 comments across 3 threads, from May 2025 to Jun 2025.

Comments linking this paper, per year.

Discussed in comments3 threads

  1. AI Isn't Magic, It's Maths 1 comment
    • LLMs are modelling the world, not just "predicting the next token". They are not akin to "stochastic parrots". Some examples here[1][2][3]. Anyone claiming otherwise at this point is not arguing in good faith. There are so many interesting things to say about LLMs, yet somehow…

      hackinthebochsView on HNParent context

    • >But LLMs are fundamentally, completely, incapable of X. It is not something that can be a result of their processes. This is the very point of contention. You don't get to just assume it. > it is because it is, at its root, a statistical engine generating plausible next tokens…

      hackinthebochsView on HNParent context

    • LLMs are modelling the world, not just "predicting the next token". They are certainly not akin to parrots. Some examples here[1][2][3]. Anyone claiming otherwise at this point is not arguing in good faith. [1] https://arxiv.org/abs/2405.15943 [2]…

      hackinthebochsView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.