Exploring Diverse Generation Paths via Inference-time Stiefel Activation Steering

Dongxuan Zhu, Ly Tran Ho Khanh, Andy Yat-Ming Cheung, Man-Chung Yue, Viet Anh Nguyen

Large Language Models (LLMs) often default to a narrow set of high-probability outputs, leaving their generation paths homogeneous and prone to mode collapse. While sampling-based strategies inject randomness, they still struggle to guarantee structural diversity across multiple concurrent generation runs. A recent paper introduces a novel approach to force LLMs out of their "comfort zones" during generation by applying geometric constraints to the model's internal activations in real-time.

The Problem: Diversity Collapse in Best-of-$N$ Sampling

A popular strategy for solving complex problems with LLMs is "Best-of-$N$": generate $N$ candidate solutions and use a selector or verifier to pick the best one. However, this strategy is frequently bottlenecked by diversity collapse.

Even with stochastic sampling techniques like high temperature or nucleus sampling, parallel runs often converge on the same high-probability "line of thought." The model might produce ten different versions of the same flawed argument or ten nearly identical code snippets. This happens because the "latent trajectories"—the path the model's internal states take through its high-dimensional activation space—become homogeneous. To truly improve performance, the model needs to explore structurally different regions of its thought space.

The STARS Solution

To address this, the authors propose STARS (STiefel-based Activation Steering for Diverse ReaSoning), a training-free, inference-time intervention that prevents diversity collapse by pushing parallel generation runs away from each other in the model's latent space.

Overview of the STARS framework

STARS intervenes at every token during the generation process using the following mechanisms:

  1. Activation Steering: Unlike traditional steering (which might push a model to be more "helpful" by adding a fixed vector), STARS steers multiple concurrent runs away from each other.
  2. Volume Maximization: At each token, STARS collects the hidden activations from all $N$ parallel runs. It then computes additive steering vectors designed to maximize the geometric volume of the parallelepiped spanned by these activations. Intuitively, it spreads the "cloud" of parallel runs as wide as possible.
  3. The Stiefel Manifold: To ensure these steering vectors don't just push every run in the same direction, the authors constrain the vectors to be orthogonal to each other. This is formulated as an optimization problem on the Stiefel manifold (the set of matrices with orthonormal columns).
  4. Efficiency via One-Step Updates: Solving a full Riemannian gradient descent at every token is too slow for real-time use. The authors derived a lightweight one-step update with a closed-form "greedy" stepsize. This allows STARS to run with negligible overhead—adding only about 0.1 to 2 seconds of total latency per question.

Key Insights

  • Geometry vs. Probability: Diversity isn't just a matter of picking lower-probability tokens (as temperature sampling does). It’s about the underlying geometry of the hidden states. By intervening in the activation space, STARS changes the context for the next token in a way that token-level sampling cannot.
  • Orthogonality is a Diversity Multiplier: Forcing steering vectors to be orthogonal ensures that each parallel run explores a unique dimension of the model's internal representation.
  • Robustness at Low Temperatures: Standard sampling fails at low temperatures (e.g., $T=0.2$), producing zero diversity. STARS, however, maintains high diversity even at low temperatures, offering the logical consistency of low-temperature generation alongside the exploration of high-temperature sampling.
  • Middle Layers Matter Most: Steering is most effective in the middle-to-late layers of the transformer (e.g., layer 20 of 28), where the model is forming high-level concepts but hasn't yet committed to a specific output token.

Empirical Results

The researchers evaluated STARS across several LLM families (Gemma, Qwen, Llama) using benchmarks like TESTEVAL (generating diverse test cases for Python code) and LiveIdeaBench (scientific idea generation).

  • Massive Coverage Gains: On the TESTEVAL benchmark using Qwen3-1.7B, STARS achieved ~91% line coverage, compared to just ~60% for standard sampling at the same temperature.
  • Superior Idea Generation: In scientific discovery (LiveIdeaBench), STARS nearly doubled the diversity (fluency) score compared to standard sampling at low temperatures, while actually improving the feasibility and clarity of the ideas.
  • Negligible Overhead: The optimized one-step update achieved 98% of the performance of the full iterative optimization while being 30x faster, making it highly practical for production environments.
  • Uniformity Recovery: In a synthetic dice-rolling task, STARS successfully pushed a model biased toward specific numbers to generate a much more uniform distribution across all six faces.

Limitations and Future Work

While highly effective, STARS introduces a "steering strength" parameter ($\alpha$) that requires manual tuning; if set too high, the model's internal logic breaks down into gibberish. Additionally, the optimal layer for steering varies slightly between models, suggesting that an automated, per-token layer selection mechanism could be a valuable future improvement. Finally, while the paper tests up to $N=20$ parallel runs, the computational cost of the Singular Value Decomposition (SVD) used in the update scales with $N$, meaning future work could explore more efficient approximations for massive batch sizes.

Summary updated

BibTeX
@inproceedings{zhu2026exploring,
  author = {Dongxuan Zhu and Ly Tran Ho Khanh and Andy Yat-Ming Cheung and Man-Chung Yue and Viet Anh Nguyen},
  title = {{Exploring Diverse Generation Paths via Inference-time Stiefel Activation Steering}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=v0QOVSVPtq},
}
Figure