NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Geometric decomposition of prompt steering

Fan L. Cheng, Nikolaus KriegeskorteNeurIPS 2026

TL;DR

When you change a prompt from "Are there people?" to "How many people?", how does an AI model internally reorganize its "thoughts" without changing a single weight? By mapping the geometry of hidden states across different instructions, the authors discover that prompting largely acts like a surprisingly simple mathematical operation: a shift (translation) does most of the heavy lifting, while linear feature-mixing (an affine shear) locks the representation into the exact shape needed to steer behavior. Nonlinear warping barely adds anything at all.

What Problem Does This Paper Address?

Asking a model to "describe the object" versus "describe the artistic style" completely changes what features of an image or text matter, steering its output at inference time.

Two parallel lines of research have circled this phenomenon:

  1. Representational analyses show that prompts warp internal activation spaces, usually summarizing these changes with single scalar numbers (like probing accuracy or manifold capacity).
  2. Activation steering shows that we can manually hack model behavior by adding simple "steering vectors" or applying linear maps to hidden layers.

What’s been missing is the bridge between them: what exact mathematical transformation does natural prompting actually perform? Nobody had systematically decomposed prompt-induced changes into distinct geometric operations—like shifting, rotating, or stretching—or tested whether those exact natural maps causally drive the model's downstream answers.

Prompting reshapes manifolds across layers

Methods

The authors treat a model's layer-$\ell$ hidden state (at the final input-prompt token) for a set of stimuli as a geometric point cloud, or manifold. Given two prompts $A$ and $B$ applied to the exact same stimuli, they search for a stimulus-invariant (global) map that aligns Prompt $A$'s cloud onto Prompt $B$'s cloud.

Instead of testing one transformation, they introduce a nested geometric decomposition—a Russian nesting doll of five increasingly expressive transformation tiers:

  1. Translation: A pure shift of the cloud's center (mean-shift).
  2. Rigid + uniform scaling: Rotation, reflection, and uniform zoom (solved via classical orthogonal Procrustes analysis).
  3. Rigid + axis-wise scaling: Stretching or squishing individual rotated axes independently.
  4. Affine: Full linear feature mixing/shearing (solved via ridge regression).
  5. Nonlinear: An affine map plus a one-hidden-layer MLP fitted on the leftover residuals.
Figure 3: Nested geometric decomposition of prompt-induced representational maps: translation (FT), rigid transformation with uniform scaling (FOu), rigid transformation with axis-wise scaling (FOa), affine transformation (FL), and nonlinear transformation(FN). Top: Schematic of the additional geometric freedom introduced by each tier (listed in parentheses); blue and red grids show the source and transformed representations, respectively. Middle: Incremental explained variance over the preceding tier, ∆R2, as a function of normalised layer depth for LLMs, pooled across datasets and prompt pairs. Bottom: The same decomposition for VLMs.

To prove these maps aren't just statistical flukes, they run a causal intervention: they feed a held-out stimulus into the model under Prompt $A$, intercept a single layer, swap the hidden state with its mathematically transformed version $\hat{f}(h^A)$, and let the model finish generating text to see if it behaves as though it read Prompt $B$. They also evaluate structural alignment using Representational Similarity Analysis (RSA)—which checks if pairwise distances between stimuli match the target task's structure—and silhouette scores (measuring cluster separation).

Datasets

The authors evaluate three LLMs (OPT-2.7B, Llama-3-8B-Instruct, Qwen3-8B) and three Vision-Language Models (BLIP-2, LLaVA-OneVision-7B, Qwen3-VL-8B) across six datasets:

  • Text datasets (for LLMs): EmotionalStory, WritingStyle, and Number.
  • Image datasets (for VLMs): EmoSet, StyleTransfer, and COCO.

Each dataset is structured around two distinct attributes (e.g., story topic $\times$ emotion, or object detection $\times$ count). This factorial setup lets the authors systematically test six prompt-pair groups—comparing open-ended queries, specific yes/no questions, and task-irrelevant factual questions ("What is the capital of France?") both within and across attributes.

Key Insights and Ideas

  • Prompts actively sculpt task geometry: Prompting doesn't just route readouts; as depth increases, it reorganizes the representation space so stimuli cluster neatly according to the asked-about attribute.
Figure 2: Prompting reshapes representational geometry toward the instructed task structure. (a) Two-dimensional MDS visualization of the layer-27 representations for LLaVA-OneVision on 1,000 COCO images under two prompts. Each point represents one image; the same MDS coordinates are shown twice and colored by the task-relevant labels for each prompt. (b) Representational dissimilarity matrix (RDM) for the same model, layer, and image set as in panel (a). The top two RDMs are computed from the prompt-A and prompt-B hidden states, respectively. The bottom RDM is the target task RDM for prompt B, constructed from numerical distances between count labels. (c) Layerwise alignment with the target task structure (pooled across models and datasets). Left: Spearman correlation between each prompt-induced RDM and the corresponding target RDM, computed separately for prompt A and prompt B. Right: silhouette score using the target labels, which measures whether stimuli with the same target label form compact, well-separated clusters in representation space. The shaded regions show ±1 SD.
  • Translation dominates variance, but shearing builds structure: Pure shifts (translation) explain the lion's share of raw activation change, explaining why simple "steering vectors" work so well in practice. However, translation and rigid rotations preserve pairwise shapes—meaning they cannot reorganize which stimuli are grouped together. Affine transformations (cross-dimensional linear mixing) are the critical missing piece that actually reshapes the cloud into Prompt $B$'s task geometry and unlocks big jumps in behavioral accuracy.
  • Different models use different "routing strategies": Instruction-tuned models like Llama-3 and Qwen3 rely heavily on low-dimensional shifts ("instruction codes") early on. Meanwhile, OPT-2.7B (the only base model without post-training) leans much harder on distributed rotations and affine mixing in early-to-middle layers.
  • Linear maps travel well; nonlinearities overfit: When transferring a fitted prompt map to a completely different dataset, the linear/affine core generalizes remarkably well (once you re-center the dataset means). The extra capacity of the nonlinear MLP, however, clings to corpus-specific quirks and transfers poorly.

Key Results

  • Monotonic growth: Prompt-induced representational change starts tiny in early layers ($10^{-4}$ to $10^{-2}$ normalized squared Frobenius distance) and grows nearly monotonically to $10^{-1}$–$10^0$ in final layers across all models and modalities.
  • Consistent tier hierarchy: Across prompt groups, incremental explained variance follows a clear order: $\text{Translation} > \text{Affine} > \text{Rigid (uniform)} > \text{Rigid (axis)} \approx \text{Nonlinear}$.
  • Cross-dataset generalization: Within a dataset, cumulative held-out $R^2$ reaches 0.98 at the affine and nonlinear tiers (averaged across Llama-3-8B and LLaVA-OneVision). Raw transfer to a new dataset drops affine $R^2$ to 0.62 and nonlinear to 0.56, but simply re-centering on the target dataset's mean restores the affine fit to 0.83—outperforming the nonlinear tier.
  • Input layout robustness: Moving the prompt instruction from a standard header into an interior sentence boundary lowers deep-layer LLM $R^2$ slightly (from 0.89–0.95 down to 0.78–0.88 across tiers) while preserving the exact geometric hierarchy, failing only when Prompts $A$ and $B$ put instructions at mismatched token boundaries.

Limitations and Future Work

  • Zero-shot only: The study focuses strictly on short, zero-shot instruction prompts. Few-shot in-context learning, soft prompts, and long-context conditioning may use very different geometric mechanisms.
  • Single-point interventions: Causal patching was restricted to a single layer and a single readout token (the final prompt token). Exploring multi-layer or multi-token interventions—and testing more extreme distribution shifts—remains open territory for turning this diagnostic framework into practical, lightweight steering tools.

Summary updated

BibTeX
@inproceedings{cheng2026geometric,
  author = {Fan L. Cheng and Nikolaus Kriegeskorte},
  title = {{Geometric decomposition of prompt steering}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=OBmtKw49N3},
}
Figure