acceptodds
Published as a conference paper at NeurIPS 2026

Large Language Models Develop Belief State Geometry In-Context

Daniel Balcells, Andrew Jun Lee, Chirag Rastogi, Paul Riechers, Adam Shai, Xavier Poncini

Abstract

Large language models (LLMs) trained on next-token prediction exhibit remarkable in-context learning (ICL) abilities, yet the representations that support ICL remain poorly understood. We consider such representations in a controlled setting: prompting LLMs with data emitted from hidden Markov models (HMMs) and probing for the corresponding belief state – the posterior distribution over the HMM's hidden states given the observed token history. Across six open-source LLMs prompted with data from 40 HMMs selected for non-trivial belief structure, we find that belief states are linearly decodable from residual stream activations, with peak probe -values ranging from 0.83 to 0.99 across HMM and LLM combinations, typically occurring at early-to-middle layers. To establish functional relevance, we intervene directly on the probe-identified subspace via patching and steering, resulting in downstream prediction quality on the order of the untampered model, while controls degrade substantially. Together, these results provide representation-level evidence that ICL in pre-trained LLMs approximates optimal Bayesian prediction over a context-inferred HMM. More broadly, our findings extend prior results linking input-distribution structure to activation geometry: from toy networks trained explicitly on HMM data to production-scale transformers trained on natural language.

Keywords:
Sydney

Reviews

Among:
Shape:
123456this paper, Top 24%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.67 over 3 reviews, above 76% of the others.
Reviewer_tRkhOpenReview ↗
Rating
5
Clarity
3
Confidence
3
Originality
3
Quality
3
Significance
3
Read review
Summary

This paper extends Shai et al's results on belief-state geometry in transformers to the case of in-context learning (ICL) in LLMs. Similar to Shai et al's results, for ICL in LLMs, belief-state geometry is found to be linearly decodable from LLMs prompted with data generated from hidden markov models. The paper further conducts causal interventions, verifying the belief-state subspace to be causally relevant.

Strengths and weaknesses

The primary strength of this paper is in extending the settings of Shai et al's results to production-level LLM settings, which I find valuable. The ablations and causal interventions verifying the nature of the findings also helps make a lot of this believable. The writing flow is good, clearly defining and explaining the notions of belief-state geometry and setup, with clear subtitles put in bold such that research questions and takeaways can be easily parsed. As regards significance and originality, in light of the field's recent focus on LLM-based intepretability, the extension to the ICL setting of LLMs is in my opinion reasonable and useful for the community.

Questions

I find the paper reasonable, and do not have any questions.

Limitations

yes

Paper formatting concerns

none

Reviewer_jmi3OpenReview ↗
Rating
4
Clarity
3
Confidence
3
Originality
2
Quality
3
Significance
2
Read review
Summary

This paper evaluates LLMs’ belief state in in-context learning when prompted with data emitted from HMMs by probing their representations. The authors evaluate whether the belief states for 40 different HMMs can be linearly decodable from the residual stream activations of 6 LLMs. They empirically find that indeed belief states can be extracted rather reliably from early-to-middle layers. The paper then makes two further claims. First, that these representations are specific to the particular HMM, shown through cross-parametrization probe transfer. Second, that they encode more than the next-token distribution in the cases where the emission matrix is non-invertible. The authors then intervene on the probe-identified subspace via patching and steering, writing target belief states into the residual stream and checking whether the next-token distribution moves toward what the injected belief implies. They find that it does, while random-direction controls do not. From this, the authors conclude that in-context prediction of HMM data approximates Bayesian inference over a context-inferred process.

Strengths and weaknesses

Strengths

  • The empirical work is clean and well-executed. Although the application domain is limited (4 belief geometry families), it allows for neat ground truth evaluations and is grounded in previous literature.

  • The theory as well as the findings are well-presented. The idea that belief-state can be recovered in-context is highly relevant for various aspects of probabilistic inference with LMs.

Weaknesses

  • The main concern with this paper is that it seems incremental to me, with limited novelty and originality compared to prior work. Namely, Shai et al (2024) already show that the belief geometry is linearly decodable from the residual stream for the same types of problems (for a non-ICL setting) and that the belief state encodes information beyond next-token prediction. The fact that these seem to be approximately retrieved from intermediate transformer representations with a linear probe is not very surprising. Beyond, as acknowledged by the authors, the ICL extension has also been explored by recent work (Sarfati et al. 2026), leaving the contribution thin and not very significant, to my understanding.

  • The claims of causality used in the experiments of §6 seem overstated to me. Namely, when target beliefs are injected, but the results are only compared as KLD on the next-token space, this makes the causal claim a bit weak, especially when the emission matrix is non-invertible (Wing and Strata; many distinct beliefs map to the same next-token distribution).

  • I suspect the reported RSQ may be an artefact of the evaluation. The probe seems to be trained and tested on a random split of token positions from the same sequence (§5). But these processes are deliberately “slow-mixing” (L. 104), so nearby positions are highly correlated and a random split may place near-identical points in both train and test. Would an evaluation on held-out sequences look similar?

  • I think the broader ML community would, given the general framing, enjoy some broader perspective or a brief discussion on how much the paper’s claims may reach beyond the constructed HMM tasks.

Questions
  • Could the authors justify/propose a way to circumvent the issue of “causality” in the non-invertible case, as described above?

  • I am more generally a bit confused by the usage of the term “geometry”; is there a measure of similarity between the predicted and recovered geometrical structure, or is the correspondence established through the linear-probe RSQ and the visual comparison of the belief state plots?

  • How does this work interact with Sarfati et al. 2026, which claim that actually belief representations are curved manifolds for which a single global linear probe is inadequate?

  • Could the authors elaborate on the implications of this work in the context of belief states in general-purpose multi-turn prompting? I.e., what are the claims’ reach beyond constructed HMM tasks?

Limitations

see above

Paper formatting concerns

no

Final justification

My initial score was a "borderline reject" driven by the main concern of novelty relative to Shai et al. and Sarfati et al. Additionally, I had some evaluation concerns regarding an overstated causal claim, as well as some evaluation artefacts in the reported RSQ due to the train/test splits used. Still, the paper is written very clearly, and the experimental work is generally well-executed. During the rebuttal, the authors addressed many of my concerns by running held-out evaluations and experiments regarding the causal claim, as well as the clarifying distinction from Sarfati et al. I still have some reservations about the significance/novelty of the work, given that the paper seems to apply the hypothesis and probing methodology of Shai et al. to the behavioral setting established by Dai et al. The extension to pre-trained LLMs in-context, is not particularly surprising or interesting to me.

Reviewer_oJosOpenReview ↗
Rating
5
Clarity
3
Confidence
3
Originality
3
Quality
3
Significance
3
Read review
Summary

The paper studies whether pre-trained LLMs represent HMM belief states in-context. The authors test on different pretrained LLMs with sequences generated by controlled HMMs, compute the ground-truth posterior over hidden states, and see whether this belief state is linearly decodable from model activations. They further test functional relevance using intervention techniques on the probe-identified subspace. The main finding is that belief states are linearly decodable across pretrained models and HMMs, and that interventions can shift next-token predictions toward the distribution implied by an injected state.

Strengths and weaknesses

Strengths:

  1. I find the problem interesting because it asks whether pretained ICL involves tracking some latent state.
  2. I like that the paper test on a synthetic, controllable setting. The synthetic HMM setting makes the ground truth distribution computable, and some controlled analysis such as the shuffled/random belief controls, cross-parametrization experiments, reduced order HMM comparisons, and next-token-probability are helpful for making control claim more convincing.

Concerns:

  1. On belief state versus next-token probability. The paper has a good analysis showing activations can contain more belief information than next-token probabilities alone. What confised me is that the intervention result is still evaluated through next-token KL, so the causal effect could still be mainly through next-token prediction directions, rather than the full belief-state geometry.

  2. On short effective context depth. If the model’s prediction is only as accurate as a Bayesian predictor using about 3–5 recent tokens, then the claim about long-history Bayesian filtering sounds less supported to me. The probe may recover the true belief state because, in these regimes, belief is just highly correlated with short suffixes, or because the activation contains richer information than the model behavior actually uses.

Questions

Following my concerns, my questions for the authors are:

Q1: Can the intervention effect be separated from simply manipulating the next-token-probability subspace, rather than the fuller belief-state subspace? Do the intervention results qualitatively hold for at least one additional model, or is there a reason to expect Llama-3.2-3B to be representative?

2: How should readers interpret the short effective context depth in Figure 10 together with the high belief-state probe results?

Limitations

Yes

Paper formatting concerns

N/A

Final justification
  • The authors' response addressed my main concern about whether the intervention was only acting through next-token prediction directions. In their new experiment, the authors steer a belief component that does not change the current next-token distribution, and show that this component can still be written into later-layer activations. They also replicate the original interventions across all six models and 40 HMMs.
  • The tuned-lens experiment also helps with my question about the short effective context depth. It suggests that intermediate activations contain useful belief-related information that is not fully reflected in the model’s final output. However, it does not directly show that this information comes from using a long context, so that point remains open to me.
  • a remaining limitation is that the new experiment shows that the model represents belief information beyond the current next token distribution, but does not establish if this additional information affects later predictions. The evidence is also limited to synthetic HMM sequences, so how broadly the result extends remains open.

Overall, I think the rebuttal clarifies my questions, and the paper remains technically strong. I recommend accept.

Comments on the paper

1 comment
Meta-review

The paper studies ICL representation through a controlled setting where the model is fed input from a hidden Markov model, and is then probed for whether it has developed a belief state. Indeed, models are shown to encode the belief state in a linearly-decodable manner, complementing prior findings in the non-ICL setting where models explicitly trained on HMM data similarly learn such belief state representations.

All reviewers appreciate that this is a nice, synthetic, controlled setting to study LLM representations, in particular for ICL. It is also a neat extension of the prior study of HMMs and belief states.

There are a few concerns brought up initially, ordered from highest to lowest below:

  • The (a) novelty and (b) significance/impact of the paper (beyond the HMM task) seems very incremental given that the idea of HMMs exists in prior literature, and so is its extension to ICL. Please see jmi3's review. Curious to hear the authors thoughts on this.
  • Some of the experiments, in particular on the causal effects, does not seem to have convinced the reviewers (oJos, jmi3).
  • Both oJos and jmi3 raises a few other questions about the experiments that are worth addressing, such as the one about the effective context depth and the one about the RSQ.

Post-rebuttal, the authors have clarified most concerns. They've established the novelty in the result, especially in light of Shai et al., and added new experiments to clarify the causal effect of next-token prediction vs the belief-state geometry.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.