Geometric Instability of Hidden-State Trajectories Predicts Reasoning Failures in Large Language Models

Hoda Fakharzadehjahromy, Andreas Christian Bueff, Fredrik Heintz, Mattias Tiger, Qing Li, Jiaqi Li, Jiahui GengNeurIPS 2026

TL;DR

Large language models are world-class bluffers: they often generate crisp, confident step-by-step reasoning that lands on a completely wrong answer. This paper shows that while a model’s output probabilities might not betray its confusion, its internal "body language" does. By tracking the geometric smoothness of hidden states across layers in a single forward pass, we can catch reasoning failures even when the model is confidently wrong.

What Problem Does This Paper Address?

When an LLM solves a math or coding problem, how do we know if we can trust it without already knowing the answer? Looking at token probabilities (how "confident" the model sounds) turns out to be a trap—instruction-tuned models are trained to sound fluent, often assigning high probability to formulaic filler words right before making a fatal logic error. Asking the model to grade itself (P(True)) is barely better than flipping a coin, and sampling ten answers to check for agreement (Self-Consistency) multiplies your compute bill by ten.

While researchers have probed individual hidden layers to catch factual hallucinations, complex reasoning failures—where the model derails mid-thought—have lacked a lightweight, single-pass detector.

Methods

Think of a transformer not as a stack of static matrices, but as a dynamical system. As a token passes from layer $0$ to layer $L$, each residual update nudges its representation through high-dimensional space, tracing out a path—a trajectory. The authors hypothesize that coherent reasoning glides along a smooth, directed curve, whereas flawed reasoning wobbles, swerves, and oscillates as attention and MLP blocks pull the representation in conflicting directions.

Overview of the VANE framework

To read this computational body language, the authors introduce VANE, a framework built on five parameter-free geometric descriptors computed across layers during a single forward pass:

  1. Velocity: Step size from one layer to the next.
  2. Representational Jerk: Sudden shifts in displacement magnitude and direction (the discrete second-order difference).
  3. Frenet–Serret Curvature: How sharply the trajectory bends locally.
  4. Geodesic Deviation: How far the path bows out from a straight line connecting the first and last layers.
  5. Token Coherence: Whether successive generated tokens travel in a shared direction at a given layer.

For each layer, these metrics are summarized across tokens (using the mean, max, and max over the final 20 answer tokens) into a compact feature vector—just a few hundred numbers, regardless of how wide the model is. Finally, a lightweight Gradient Boosting classifier learns to map these geometric profiles to a correctness score.

Datasets

No new benchmarks were introduced. The authors evaluated VANE across five established reasoning datasets spanning three domains:

  • Mathematics: GSM8K and MATH-500
  • Code: HumanEval and CRUXEval
  • Verbal/Logical Reasoning: Big-Bench Hard (BBH)

Key Insights and Ideas

  • Turbulence happens across the whole flight, not at one gate: Rather than hiding in a single "truth layer," geometric instability separates correct (smooth) from incorrect (erratic) traces across nearly the entire depth of the network.
Figure 2: Composite VANE score across transformer depth (GSM8K). Each panel shows the mean composite score for correct (blue) and incorrect (red) samples as a function of relative depth (layer/L). The composite is the sum of five per-layer z-scored VANE metrics, each oriented so that higher values indicate greater geometric instability. Shaded regions denote ±2 standard errors. Incorrect samples consistently score higher across all six models, confirming that geometric turbulence is distributed across the full trajectory rather than confined to a single layer. The composite is unbounded since it sums five z-scores.
  • Confidence and geometry are nearly orthogonal: VANE’s scores barely correlate with token log-probability ($r = -0.26$). In fact, when you abstain from answering based on low token confidence, accuracy actually gets worse on five out of six models because log-probability rewards repetitive,confident-sounding boilerplate.
  • Instruction tuning creates the signal: Comparing base models to their instruction-tuned twins reveals a fascinating origin story: this geometric gap isn't a byproduct of model size (a 1.5B instruct model shows a clearer signal than an 8B base model). Instead, instruction tuning actively sculpts internal dynamics so that valid reasoning follows smoother trajectories.
  • Pinpointing the exact mistake: Geometric "jerk" isn't just a global alarm bell; at the token level, spikes in jerk concentrate right at the exact token where an arithmetic error occurs.

Key Results

Tested across six open-weight model families (1.5B to 72B parameters, including Llama-3, Qwen2.5/3, Gemma-3, and Ministral):

  • Consistent wins: VANE achieves 70.7% to 96.6% AUROC, beating token log-probability on all 30 out of 30 model–benchmark pairs by an average of +25 percentage points (and up to +50 points). It even matches or beats an "oracle" single-layer probe (which cheats by peeking at test labels to pick the best layer) in 23 of 30 settings.
  • Beats multi-pass sampling in one pass: VANE outperforms INSIDE (which requires 10 sampled generations per query) on every model.
  • Cross-task & quantized resilience: A VANE classifier trained only on grade-school math (GSM8K) transfers zero-shot to code execution (CRUXEval) on Qwen3-14B with 91.6% AUROC. It also thrives under 4-bit quantization.
  • Selective prediction: Letting a 4-bit 72B model say "I don't know" on the 50% most geometrically unstable trajectories boosts its accuracy on GSM8K to 96.1%.

Limitations and Future Work

Because VANE needs layer-by-layer hidden states, it requires white-box model access—meaning you cannot run it on closed APIs like GPT-4 or Claude—and it needs a labeled calibration set to train its lightweight classifier. Cross-task transfer, while promising, is partial rather than universal, and performance can shift under different sampling temperatures or prompts. Looking ahead, because high geometric jerk localizes the exact token where reasoning derails, the authors suggest using VANE to trigger targeted mid-generation resampling or self-correction, as well as extending trajectory analysis to open-ended, multi-turn, and agentic workflows.

Summary updated

Abstract

Large language models often produce fluent reasoning chains that arrive at incorrect answers, and these failures are hard to detect from output probabilities alone. We show that a strong signal of correctness is reflected in the *geometry of internal computation*: hidden-state trajectories across transformer layers differ between correct and incorrect reasoning, with correct solutions following smooth, efficient paths and failures exhibiting elevated curvature, abrupt directional changes, and increased geodesic deviation. We capture this signal through VANE, five parameter-free geometric features (velocity, acceleration/jerk, curvature, geodesic deviation, and token coherence) computed from a single forward pass over layer-wise hidden states. Across six models (1.5B to 72B parameters) and five benchmarks spanning mathematics, code, and verbal reasoning, VANE achieves 70.7 to 96.6 AUROC and exceeds token log-probability on all 30 model–benchmark pairs (mean +25 percentage points, up to +50 percentage points). The geometric signal is near-independent of output confidence (r = -0.26), and a base-model control shows it emerges with instruction tuning. As a downstream application, filtering geometrically unstable outputs raises accuracy to 96.1% at 50% coverage on a 4-bit quantized 72B model. These results show trajectory geometry is a reliable single-pass indicator of reasoning correctness, even when the model is confidently wrong. Code is available at [https://github.com/hodfa840/geometric-instability-of-hidden-state-trajectories](https://github.com/hodfa840/geometric-instability-of-hidden-state-trajectories).
BibTeX
@inproceedings{fakharzadehjahromy2026geometric,
  author = {Hoda Fakharzadehjahromy and Andreas Christian Bueff and Fredrik Heintz and Mattias Tiger and Qing Li and Jiaqi Li and Jiahui Geng},
  title = {{Geometric Instability of Hidden-State Trajectories Predicts Reasoning Failures in Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=FlBf0YQuYc},
}
Figure