Manuscript Offprint

arXiv:2609.02959

The Geometry of Ignorance: LLMs Know When to Temper Bayesian Priors

Toni J. B. Liu, Jiajun Bao, Yizhou Liu, Gurbir Arora, Nicolas Boullé, Raphaël Sarfati, Christopher J. Earls

ABSTRACT

What does a language model predict when it has few clues? The answer lurks in its unembedding geometry: a single direction of the unembedding matrix encodes the unigram distribution of the training corpus, which serves as the Bayesian prior the model falls back on when uncertain. This structure — which we term the direction of ignorance — appears in all four model families examined (Llama, Qwen, Gemma, and Pythia), ranging from 0.4B to 405B parameters. Projecting the final prediction state onto this direction yields a per-token prior loading factor λ\lambda, which, empirically, declines steadily as the context becomes more informative. Formally, the same projection decomposes the prediction state into two orthogonal vectors that correspond exactly to the two factors of a tempered Bayesian update: a unigram prior raised to the exponent λ\lambda and a context-driven likelihood. This geometric-probabilistic interpretation calibrates λ\lambda, making it meaningfully comparable across model sizes and families, with larger models generally exhibiting lower prior reliance in the high-context limit. Finally, we show that the direction of ignorance is causally active: raising or lowering λ\lambda at the final prediction state steers the prediction toward or away from the unigram prior in KL divergence.

1 INTRODUCTION

A language model must always predict. Whether the input is a logical argument, an incoherent scribble, or demonstrations of a task (Brown et al., 2020; Xie et al., 2022), the model is required to predict next-token distribution over the vocabulary — some predictions easy, others hard (Su et al., 2024). For example, asking an LLM to name a point of interest in France provides less information — and thus narrows the set of plausible continuations less — than asking it to name one in Paris, as illustrated in Figure 1(b). This raises a basic question: what does a language model predict when the context offers little information?

A reasonable strategy is to fall back on a Bayesian prior — for example, to predict each token according to its raw frequency in the training corpus. While LLMs' bias toward the unigram prior is well documented (Chang & Bergen, 2022; Meister et al., 2023; Xie et al., 2022), the mechanisms that govern this behavior remain an open question (Stolfo et al., 2024). In this work, we show that LLMs implement and control the unigram prior in the simplest geometry possible: via a single direction in the output embedding space.

We call this direction the direction of ignorance, dprior∈Rdmodeld_{\text{prior}} \in \mathbb{R}^{d_{\text{model}}}, where dmodeld_{\text{model}} is the hidden dimension; Figure 1 (a) illustrates its geometry. Writing W∈R∣V∣×dmodelW \in \mathbb{R}^{|\mathcal{V}| \times d_{\text{model}}} for the unembedding matrix and punigramp_{\text{unigram}} for the empirical unigram distribution of the training corpus, multiplying dpriord_{\text{prior}} through WW recovers the prior:

softmax(Wdprior)≈punigram.(1)\text{softmax}(W d_{\text{prior}}) \approx p_{\text{unigram}}. \tag{1}

Because the prior lives along a single direction, any final prediction state yy — the vector that WW maps to next-token logits — can be split into a prior component and an orthogonal complement:

y=λdprior+ycontext,ycontext⊥dprior.(2)y = \lambda d_{\text{prior}} + y_{\text{context}}, \quad y_{\text{context}} \perp d_{\text{prior}}. \tag{2}

Figure

Figure 1: Overview of direction of ignorance. (a) Top-2 principal component visualization of the Llama-3.2-3B unembedding. Tokens are spatially graded when colored by frequency (cool→warm = rare→common). Punctuations such as comma and period are the most frequent, followed by articles. The black arrow marks the direction of prior dpriord_{prior} points in the steepest direction of increasing frequency (see Section 3.3). (b) Next-token prediction progressively aligns with dpriord_{prior} as context becomes vague. All prompts share the fixed format “[context], we can find the …” and differ only in the spatial qualifier, ordered from most informative to the least. For each prompt, youtputy_{output} is the last-token pre-softmax latent that is multiplied by the unembedding to produce the next-token logits. The prior loading factor λ\lambda in Equation 2 grows as the context becomes less informative and the model falls back on the prior. Labels show true values computed from Llama-3.2-3B; geometry is schematic (colored arrows not to scale).

The scalar λ\lambda is the prior loading factor, which we rigorously derive in Section 3: it measures how strongly the current prediction relies on dpriord_{prior}. As shown in Figure 1 (b), when context is informative, λ\lambda is small and yy points away from the prior direction. Conversely, as context becomes vague — such as with ambiguous prompts, shuffled tokens, or short context length — λ\lambda grows and the prediction yy rotates toward dpriord_{prior}. Section 3 shows that this decomposition induces a tempered Bayesian reading of the predictive distribution, in which λ\lambda is the exponent on the unigram prior. All of our findings are ultimately statements about this quantity, and our contributions are fourfold:

(1) Existence, uniqueness, and universality (Section 3). A single direction dpriord_{prior} in the embedding space reconstructs the unigram prior to low Kullback–Leibler (KL) divergence in every model family we examine: Llama, Qwen, Gemma, and Pythia. Recovering this direction requires only one linear least-squares fit on the unembedding, without a single forward pass through the model. The recovered dpriord_{prior} is unique by construction of the least-squares algorithm. We further show that dpriord_{prior} is absent at initialization and emerges only through training.

(2) Tempered Bayesian interpretation (Section 3). Decomposing the prediction along dpriord_{prior} factorizes the output as tempered Bayesian inference: the unigram prior raised to an exponent λ\lambda, times a context-driven likelihood. The prior loading factor λ\lambda softens the prior for 0<λ<10 < \lambda < 1, sharpens it for λ>1\lambda > 1, removes it at λ=0\lambda = 0, and inverts it for λ<0\lambda < 0. This geometric-probabilistic connection lets us meaningfully compare λ\lambda across model sizes and families.

(3) Context dynamics (Section 4). We show that λ\lambda declines only when coherent contextual information accumulates, and stays high when input tokens are shuffled or uninformative. In other words, prior loading factor tracks the information in the context, not its length or position.

(4) Causal intervention (Section 5). Intervening on λ\lambda by hand steers the output toward or away from ignorance, while magnitude-matched perturbations along random directions do not. Therefore, the direction dpriord_{prior} is causally active and not merely a statistical correlate.

Beyond these results, we observe a suggestive scaling trend (Section 6): λ\lambda at the high-context limit generally decreases with model hidden dimensionality across the families we test. We speculate on the origins of this trend, which invites further investigations.

References (59)