Detecting the Semantic Fixed Point: A Geometric Framework for Efficient Inference
Jiawei Gu, Ziyue Qiao, Xiao Luo
Overview
This talk introduces a geometric framework for accelerating Large Language Model (LLM) inference by detecting when a model's internal representation has effectively stopped changing. Modern transformer architectures uniformly execute every layer for every input token, regardless of whether a query is a trivial factual lookup or a complex multi-step reasoning problem. This uniform execution model wastes substantial compute on easy inputs. While early exit techniques attempt to mitigate this by halting execution mid-stack, existing approaches typically rely on output confidence or entropy metrics, which incur massive overhead and are notoriously prone to calibration failures.

Key moments
- 0:00 Introduction to early exit and motivation
- 2:00 Tracking hidden states and discovering the two-phase pattern
- 4:00 The geometric exit method and low-overhead design
- 6:00 Main experimental results and accuracy comparisons
- 8:00 Comparing geometry versus confidence and speedup analysis
- 10:00 Q&A: Handling variable generation difficulty and KV cache management
- 12:00 Q&A: Addressing state norm inflation and step size normalization
Detecting the Semantic Fixed Point: A Geometric Framework for Efficient Inference
Speakers: Jiawei Gu; Ziyue Qiao; Xiao Luo
Conference: ICML
YouTube: https://slideslive.com/39083567
Overview
This talk introduces a geometric framework for accelerating Large Language Model (LLM) inference by detecting when a model's internal representation has effectively stopped changing. Modern transformer architectures uniformly execute every layer for every input token, regardless of whether a query is a trivial factual lookup or a complex multi-step reasoning problem. This uniform execution model wastes substantial compute on easy inputs. While early exit techniques attempt to mitigate this by halting execution mid-stack, existing approaches typically rely on output confidence or entropy metrics, which incur massive overhead and are notoriously prone to calibration failures.
To overcome these limitations, the speakers propose an input-adaptive early exit method based on the geometry of internal hidden states. Instead of interrogating the output probability distribution, the framework tracks two simple signals across layers: the magnitude of the layer-to-layer update and the directional stability of successive updates. When these metrics indicate that the residual stream has reached a semantic fixed point, inference terminates early. This approach reduces compute by approximately one-third while retaining over 98% of full-model accuracy, translating to a real 1.45× end-to-end wall-clock speedup without requiring any model retraining, auxiliary classifier heads, or specialized KV cache kernels.
Background
▶ Watch: Introduction to early exit and motivation (0:00)
The systems and ML literature has long recognized that deep neural networks—and transformer stacks in particular—operate as iterative refinement processes. Mathematically, each transformer layer takes a hidden state vector and applies a small update, progressively shaping the representation from a rough initial state into a finalized output. In classical numerical analysis, iterative methods terminate automatically once updates fall below a predefined threshold, signaling that the process has converged.
However, standard autoregressive LLMs ignore this convergence principle, forcing every prompt through the entire stack of $N$ layers. Prior attempts to introduce adaptive computation via early exiting have faced two primary bottlenecks. First, confidence-based exit criteria require projecting intermediate hidden states through the massive output vocabulary projection matrix (the LM head) at every candidate exit layer to compute softmax probabilities or entropy. For models with large vocabularies (e.g., 32,000 to 128,000+ dimensions), this projection is computationally expensive, often consuming more time and FLOPS than the transformer layers saved by exiting early.
Second, output confidence is an unreliable proxy for semantic completion. A model can exhibit high confidence while generating factually incorrect text, or low confidence while maintaining a representation that is already directionally correct. These failure modes limit the practical utility of existing confidence-based heuristics, leaving a clear gap for a lightweight, representation-level criterion that evaluates the internal dynamics of computation directly.
Key Findings
▶ Watch: The geometric exit method and low-overhead design (4:00)
The central discovery of this work is that transformer depth dynamics naturally divide into two distinct phases: a building phase and a coasting phase.
- The Two-Phase Trajectory: In early layers, layer-to-layer updates are large, volatile, and change directions erratically as the model gathers information, resolves syntactic structures, and builds the representation. Quite suddenly—typically across a span of just two to three layers in the middle-to-late section of the model—updates shrink dramatically and their directional vectors stabilize.
- The Coasting Phase: Once this transition occurs, the model is no longer incorporating novel information; it is primarily carrying the established representation forward through the remaining layers.
- Input Adaptability: The layer at which this transition occurs varies dynamically by input complexity. Easy inputs reach the fixed point much earlier in the stack, whereas hard reasoning tasks require deeper computation.
- Accuracy-Compute Tradeoff: Across diverse evaluation tasks—including question answering and common-sense reasoning benchmarks such as TriviaQA—the geometric early exit method cuts compute by roughly 33% while preserving over 98% of the full baseline model's accuracy.
- Robustness Across Architectures: The two-phase convergence pattern is not an artifact of a single model family; it generalizes across multiple architectures, with the switch consistently occurring in the middle-to-late tiers of the model stack.
Technical Deep Dive
▶ Watch: Main experimental results and accuracy comparisons (6:00)
The technical core of the framework rests on tracking two lightweight geometric signals computed directly from the hidden states of successive transformer layers, entirely bypassing the output vocabulary projection head.
Let $h_l$ denote the hidden state vector at transformer layer $l$. The layer update is defined as $\Delta h_l = h_l - h_{l-1}$. At each layer, the system evaluates two criteria:
- Update Magnitude: The relative size of the update vector, measured by computing vector norms.
- Directional Stability: The cosine similarity or dot product between consecutive update vectors ($\Delta h_l$ and $\Delta h_{l-1}$), capturing whether the model is continuing along a stable trajectory.
An exit is triggered only when a conjunction of two conditions is met: the update size falls below a tight threshold and the directional stability remains steady. Relying on magnitude alone risks premature halting due to local noise or momentary flattening, while relying on direction alone risks stopping while the magnitude of the remaining movement is still substantial.
To safeguard against anomalous layers, two additional safety mechanisms are integrated:
- A lower-bound constraint prohibiting exits in the earliest layers, where foundational semantic composition occurs.
- A persistence requirement demanding that the convergence signal remains stable across multiple consecutive layers before an exit is finalized.
Crucially, this mechanism operates entirely in the latent space of the residual stream. Because it avoids evaluating the output vocabulary projection matrix at intermediate layers, the per-check overhead is negligible. In contrast, confidence-based exit methods require repeated vocabulary-space projections, making them roughly 25 times more expensive per check. The theoretical justification relies on a bound demonstrating that once updates enter the shrinking, directionally stable tail phase, the remaining residual movement is bounded, guaranteeing that the final output cannot deviate significantly from a full-stack run.
Experimental Setup & Results
▶ Watch: Q&A: Handling variable generation difficulty and KV cache management (10:00)
The evaluation benchmarks the framework across two distinct model scales and four evaluation datasets spanning question answering and common-sense reasoning.
- Baseline Comparisons: The geometric method is compared against two primary baselines: the uncompressed full-depth model, static layer-dropping heuristics (fixed-depth pruning), and traditional confidence- and entropy-based early exit policies.
- Accuracy Retention: On TriviaQA, smaller models utilizing entropy-based exit strategies suffer severe degradation, losing nearly 6 points of accuracy. By contrast, the geometric framework incurs a performance drop of only about 1 point while discarding a comparable amount of compute.
- Comparison to Fixed Depth: When evaluated at equivalent average compute depths, the input-adaptive geometric method outperforms fixed layer-cutting strategies by 6 to 7 accuracy points, confirming that dynamic allocation across inputs is critical.
- Wall-Clock Speedup: Due to the extremely low overhead of hidden-state norm and dot-product calculations, the framework achieves a 1.45× end-to-end wall-clock speedup, closely tracking the theoretical theoretical compute savings. Confidence-based exit methods achieve only a modest ~1.1× speedup because their intermediate vocabulary projection checks introduce heavy latency penalties.
- Ablation Results: Ablation experiments confirm that both signals are strictly necessary. Using magnitude alone or direction alone results in degraded accuracy retention, validating the dual-criterion design.
Practical Implications
▶ Watch: Q&A: Addressing state norm inflation and step size normalization (12:00)
For infrastructure teams and model deployers, this work demonstrates that compute savings in LLM inference can be successfully translated into real wall-clock latency reductions without retraining models or modifying network weights.
- Elimination of Custom Kernels: By determining a single exit depth per request during the prefill phase, the system maintains a contiguous KV cache, bypassing the need for complex, hardware-specific sparse kernels or fragmented memory layouts.
- Trading-off Granularity: While fixing the exit depth per request simplifies deployment and preserves cache contiguity, the speakers note a key limitation: long, open-ended generative sequences can occasionally demand deeper computation mid-generation than the initial prompt required. Because the geometric signal is computationally cheap, extending the framework to perform token-level re-evaluation represents a natural direction for future deployments handling long-form text generation.
- Deployment Simplicity: The absence of auxiliary classification heads, hyperparameter-heavy loss tuning, or custom training pipelines makes this framework immediately drop-in compatible with standard transformer serving stacks.
Key Takeaways
- Compute vs. Complexity Mismatch: Standard LLMs waste significant compute by forcing easy and hard inputs through identical transformer depths.
- Geometry Over Confidence: Monitoring internal hidden-state update magnitude and directional stability provides a more reliable indicator of computational completion than output probability entropy or confidence scores.
- Zero-Overhead Checking: Evaluating hidden-state vector norms and dot products avoids the massive computational penalty of repeated vocabulary-space projections required by confidence-based exits.
- Real Wall-Clock Speedups: The method achieves a 1.45× end-to-end speedup by converting theoretical layer savings into actual inference latency reductions.
- No Retraining Required: The framework operates purely at inference time on pre-trained models, requiring no architectural modifications, fine-tuning, or specialized custom kernels.
About the Speaker(s)
Authors: Jiawei Gu, Ziyue Qiao, Xiao Luo.
Reviews
→ Top-rated talks at International Conference on Machine Learning 2026
All talks from International Conference on Machine Learning 2026