Summary
This work uses a new theoretical framework from Computational Mechanics to analyze representations in transformers. Using these tools, the authors can convert between a data-generating structure, such as one modeled with a Hidden Markov Model, and a geometric structure in a probability simplex that describes the beliefs over the states of the data-generating structure given finite observations. They then use linear readout analysis to see if the geometric structure can be linearly decoded from transformer representations and find that, indeed, they can. Thus, the authors discover that transformers represent more than just the structure of the data generating process; they also represent the current belief of the state of this process. The authors reason that this is ultimately advantageous for next-token prediction, because a model that can more accurately infer the current hidden state will be able to better predict future tokens, if not the immediately next one: “even if different belief states imply the same probability distribution over the next token, any distinction in probability distributions over the entire future may eventually, after further context, imply distinct distributions over the next token at some point in the future”.
Strengths
This is a well executed piece of research. The writing and ideas are clear; as someone without any background in computational mechanics, there are adequate examples and figures to walk through the ideas, explaining concepts such as the mixed state representation and belief state geometry.
Also appreciated are the high level intuitions, such as the discussion on prediction vs generation, which helps to anchor the goal of pursuing the belief simplex in transformers (e.g., “Computational Mechanics shows that prediction is substantially more complicated than generation. Informally, the reason for this is that even if one knows the underlying hidden generative structure, one must still perform computational work in order to infer which state the generative process is in given finite observations of data.”), and the discussion on why it might be useful for a model to discover these representations (e.g., “for a recurrent neural network to perform as well as possible on next token prediction, all information about the past necessary to predict the entire future as well as possible must be present in the latent state of the network.“).
While it might be easy to cast the results as obvious, they have the flavor of being obvious *in hindsight*; that transformers form these kinds of representations certainly makes a lot of sense, but the work still needs to be done to analyze that this is indeed the case, and the authors here do a great job proving it.
The experiments are simple, but completely adequate. The standout is figure 6, which includes a number of careful controls which show that: the belief-state geometry emerges throughout training; the regression task withstands held-out validation; and the regression mapping can be collapsed if the input-output pairings are shuffled, demonstrating that the geometry is not spurious.
I cannot be certain of this work’s originality as I’m not an expert in the field of interpretability, but I have not encountered any papers that do a similar analysis.
Weaknesses
One weakness might be that it will be difficult to demonstrate similar findings in more complex tasks, especially those for which we do not have ground truth data-generating models. This could limit the significance of the findings and the usefulness of the techniques, since they would only be applicable to toy domains. I do not think this needs to be addressed in this work necessarily, and the authors do point out as much towards the end of the paper.
While I do not think a full “related work” section is needed, a few more references to past work and similar types of analyses would have been appreciated to compare and contrast the findings and techniques, and to serve as a starting point for those who wish to dive deeper into the literature.
Questions
Can a network represent multiple belief simplexes (simplices?), and if so, how fluidly might it switch between them? If, up to the current token, the “correct” data structure is still ambiguous, would the transformer represent a meta-belief state over the possible structures?
How can one measure similarity to the ground truth more quantitatively?
How hard is this analysis to perform in higher data-structure dimensions?
How much does one need to worry about false positives?
How might the analysis go wrong, or be misleading?
How does matching of the ground truth belief state correlate with performance on the task?