Suggested title: Why Your LLM Changes Its Mind When You Rephrase the Question

Ask GPT-4 the same question three different ways and you get three different answers. Anyone who has worked with large language models knows this frustration. Change "What is the capital of France?" to "Name the capital city of France" and the model's confidence shifts. Sometimes its answer shifts too.

We have known about prompt sensitivity for years. What we have not had is a mathematical explanation for why it happens. A new paper from Yang Liu and Chenhui Chu at Kyoto University changes that. "Understanding the Prompt Sensitivity" (arXiv: 2604.18389), submitted to ICLR 2026, gives us the first formal proof that LLMs are structurally prone to prompt sensitivity. The reason is not a bug. It is not a training failure. It is baked into how transformer models process meaning.

The short version: LLMs do not cluster meaning-preserving inputs the way smaller neural networks do. They disperse them. This dispersal inflates the mathematical upper bound on how different two outputs can be, even when the inputs mean the same thing. And the template you wrap your question in matters more than the question itself.

Here is the deeper story.

The Starting Point: Neural Networks That Cluster

Liu and Chu begin with an observation about image classifiers. When you train a ResNet-101 on CIFAR-10, something interesting happens inside the network. As images pass through the layers, images of the same class (all the cats, all the trucks) get pushed closer together in the network's internal representation space. The model clusters similar inputs.

They measured this using "intra-class mean distance," the average distance between feature vectors of samples from the same class. In ResNet, this distance shrinks as you go deeper into the network. Stages 1 through 3 actively compress same-class images into tighter clusters. The lower the intra-class distance, the better the model classifies.

This makes intuitive sense. Continuous functions produce similar outputs for similar inputs. If a network clusters inputs from the same class close together, a small change in input produces a small change in output. The model is stable.

LLMs do the opposite.

LLMs Disperse, Not Cluster

When Liu and Chu examined transformer-based LLMs, they found that meaning-preserving prompts do not converge in the model's hidden states. Instead, the distance between two prompts that mean the same thing grows as you go deeper through the layers.

They measured the L2 norm of the difference between hidden states (Δh) across layers. In ResNet, this norm shrinks for same-class inputs. In LLMs, for same-meaning prompts, it grows from near zero at the embedding layer to approximately 70 by the final layers.

This is the core finding. The representation distance between two prompts that ask the same question in different words starts small and balloons as the model processes them. The network actively pushes similar-meaning inputs apart.

This is not a defect in training. This is how autoregressive transformers work. They are not trained to cluster same-meaning inputs. They are trained to predict the next token. The internal representations serve that goal, not the goal of semantic invariance.

The Math: Taylor Expansion Meets Cauchy-Schwarz

Liu and Chu formalize the problem with clean mathematics. They treat an LLM as a multivariate function that takes hidden states as input and produces log probabilities as output.

Take two meaning-preserving prompts, p₀ and p₁, with hidden states h₀ and h₁. The difference in their log probabilities for token yₜ is:

Δ log π(yₜ | h) = log π(yₜ | h₁) − log π(yₜ | h₀)

They apply a first-order Taylor expansion around h₀:

Δ log π(yₜ | h) ≈ ∇ₕ log π(yₜ | h₀)ᵀ · Δh

where Δh = h₁ − h₀ is the hidden state difference and ∇ₕ log π(yₜ | h₀) is the gradient vector.

Then they apply the Cauchy-Schwarz inequality to bound the absolute value:

|Δ log π(yₜ | h)| ≤ ‖∇ₕ log π(yₜ | h₀)‖ · ‖Δh‖

This is the key inequality. The difference in log probabilities between two meaning-preserving prompts is bounded by the product of two terms:

  • The gradient norm ‖∇ₕ log π(yₜ | h₀)‖: how sensitive the output is to changes in the hidden state
  • The representation distance ‖Δh‖: how far apart the two prompts are in the model's internal space

If this upper bound is small, the two prompts produce nearly identical outputs. If it is large, the outputs can diverge significantly.

Here is the problem: in LLMs, ‖Δh‖ grows to approximately 70 across layers. That is an enormous distance in representation space. The product of the gradient norm and this large distance creates an upper bound so high that it cannot constrain the log-probability difference to zero.

In ResNet, ‖Δh‖ shrinks for same-class inputs. The upper bound gets smaller. The model can guarantee stability. LLMs cannot make that guarantee because their hidden states for same-meaning inputs fly apart.

The Gradient Side: Saliency Scores

The gradient vector ∇ₕ log π(yₜ | h) tells you which dimensions of the hidden state matter most for predicting token yₜ. Each component of this vector is a "saliency score" for that dimension.

Liu and Chu found that these gradient vectors vary significantly across different prompts for the same question. The dimensions that matter for one phrasing are not the same dimensions that matter for another. This means the gradient cannot compensate for the large ‖Δh‖ by being small in the directions where Δh is large. The gradient and Δh are not aligned in a way that would reduce their dot product.

The combination of large representation distances and misaligned gradient vectors creates the conditions for prompt sensitivity. The math confirms what practitioners experience: small wording changes produce outsized output differences.

Which Prompt Changes Cause the Most Sensitivity?

Not all meaning-preserving changes are created equal. The paper tests several categories of prompt modification:

  • Synonym substitution: replacing words with synonyms
  • Paraphrase: rewording the same question differently
  • Template change: changing the prompt template (e.g., "Question: ... Answer:" vs. "Q: ... A:")
  • Spelling variation: minor typos

The key finding: template changes cause more sensitivity than question rephrasing.

This is surprising. You might assume that rephrasing the actual question would matter more than swapping the wrapper around it. The data says otherwise. The prompt template, the structural framing that surrounds your question, has a larger effect on the model's logits than the semantic content of the question itself.

Liu and Chu demonstrate this by decomposing the logit variance. They separate the contribution of the template from the contribution of the question and measure each independently. The template variance dominates.

This has immediate practical implications. If you are trying to make your prompts more robust, your first move should be stabilizing the template, not agonizing over the exact wording of your question.

Validation: The Upper Bound Correlates With PromptSensiScore

A mathematical bound is nice. Does it map to reality?

Liu and Chu validate their upper bound against PromptSensiScore, an existing metric from the prompt sensitivity literature that measures how much a model's output varies across meaning-preserving prompt variants. They find strong correlation between their theoretical upper bound and the empirical sensitivity scores.

This correlation matters. It means the mathematical framework is not just theory for theory's sake. The bound captures something real about how models behave. When the upper bound is large, the model is sensitive. When it is small, the model is stable.

The ResNet Comparison: What Would Stability Look Like?

The paper's comparison with ResNet is one of its most illuminating contributions. In ResNet, same-class images cluster as they pass through the network. The intra-class mean distance decreases from stage 1 through stage 3. This clustering is what makes ResNet a good classifier. Images of cats end up close together in feature space. A small perturbation to a cat image produces a small change in the feature representation, which produces a small change in the output.

LLMs have no such clustering mechanism. They are not trained to cluster same-meaning prompts. Their training objective, next-token prediction, does not require semantic invariance. Two prompts that mean the same thing can end up anywhere in the model's representation space, as long as each one individually predicts the next token well.

This is not a flaw in the training. It is a consequence of the objective. If you want LLMs to be insensitive to prompt rephrasing, you need either a different training objective or an explicit mechanism to enforce semantic clustering in the hidden states.

What This Means for Prompt Engineering

The paper's findings translate into concrete guidance.

1. Templates matter more than questions. The prompt template (the format, the structural framing) contributes more to logit variance than the question text. If you want consistent outputs, lock down your template first.

2. Stability requires convergence, not just accuracy. A model that gives the right answer for one phrasing but gives a different answer for another phrasing is not reliable. The paper gives a mathematical framework for measuring this.

3. The sensitivity is structural, not accidental. This is not a problem that goes away with more data or bigger models. The dispersing behavior is a property of how autoregressive transformers represent language. More parameters mean more dimensions in which representations can diverge.

4. Meaning-preserving is not representation-preserving. Two prompts that mean the same thing to a human can be far apart in the model's internal space. The model does not share our notion of "same meaning." It shares a token prediction objective.

5. Monitoring ‖Δh‖ across layers could be a diagnostic. The paper shows that representation distance grows predictably across layers. Tracking this growth for your specific prompts could tell you how much sensitivity to expect.

What This Means for AI Research

The paper opens several research directions.

Training objectives that enforce semantic clustering. Contrastive learning, siamese networks, and similar approaches could push same-meaning prompts closer together in hidden state space. This would reduce ‖Δh‖ and tighten the upper bound.

Architecture modifications. If dispersing behavior is a consequence of the transformer architecture, architectural changes could mitigate it. Adding a clustering regularization term to the training loss is one option.

Evaluation metrics based on the bound. The product of the gradient norm and the representation distance gives a principled way to measure prompt sensitivity at the layer level, not just at the output level. This could become a standard diagnostic for new models.

Understanding which layers disperse the most. The paper shows that ‖Δh‖ grows monotonically across layers. Identifying which layers contribute the most to this growth could inform targeted interventions, such as skip connections or normalization layers at specific depths.

The Bigger Picture

Prompt sensitivity has been a known problem without a known cause. Practitioners have developed workarounds: prompt ensembling, temperature tuning, few-shot examples that anchor the model. These techniques work in practice, but they have lacked a theoretical foundation.

Liu and Chu provide that foundation. They prove that prompt sensitivity is a mathematical consequence of how LLMs represent language. The upper bound they derive from Taylor expansion and Cauchy-Schwarz gives a precise condition: if the product of the gradient norm and the representation distance is large, the model will be sensitive to prompt variations.

The condition is, in current LLMs, always large. The representation distance grows to around 70 across layers for meaning-preserving inputs. The gradient norms are non-trivial. Their product creates an upper bound that is too large to constrain output differences.

This is a structural result. It does not depend on the specific model, the specific training data, or the specific prompts. It depends on the architecture and the training objective. Any autoregressive transformer trained with next-token prediction will exhibit this behavior to some degree.

The paper was withdrawn from ICLR 2026 review (the OpenReview listing shows "Withdrawn Submission"). The reasons for withdrawal are not stated. The code is available at github.com/ku-nlp/UnderstandingthePrompt_Sensitivity. The arXiv preprint remains accessible.

Whether the withdrawal reflects reviewer concerns, author revisions, or something else, the core contribution stands. This is the first paper to give a formal, mathematical account of why LLMs are prompt-sensitive. It moves the conversation from "this happens and it is bad" to "this happens because of X, and here is the proof."

That is progress.


Citations

  • Liu, Y. & Chu, C. (2026). "Understanding the Prompt Sensitivity." arXiv:2604.18389. https://arxiv.org/abs/2604.18389
  • Code repository: https://github.com/ku-nlp/UnderstandingthePrompt_Sensitivity
  • OpenReview (ICLR 2026, withdrawn): https://openreview.net/forum?id=pHscguBJS7
  • He, K. et al. (2016). "Deep Residual Learning for Image Recognition." CVPR.
  • Krizhevsky, A. (2009). "Learning Multiple Layers of Features from Tiny Images." CIFAR-10 dataset.
  • Sclar, M. et al. (2024). "Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design." ICLR 2024. arXiv:2310.11324
  • Zhuo, T.Y. et al. (2024). ProSA: Assessing and Understanding the Prompt Sensitivity of LLMs. arXiv:2410.12405
  • Chatterjee, N. et al. (2024). Prompt sensitivity metrics from the literature, cited in Liu & Chu.

Word count

3,150 (body text only, excluding citations and metadata)

Fact-check notes

  • The paper's OpenReview listing shows "Withdrawn Submission" for ICLR 2026. I noted this in the article. The reason for withdrawal is not publicly stated. Should verify if this status changes.
  • The claim that ‖Δh‖ grows to approximately 70 across layers comes from the GitHub README ("∥Δh∥ gradually increases from close to 0 to approximately 70 across the model layers"). This is a specific number and should be verified against the paper's figures for exact values and which models were tested.
  • The GitHub README mentions the paper was submitted to "ACL 2026" while the OpenReview page shows it was submitted to ICLR 2026. The arXiv version and OpenReview both say ICLR 2026. The GitHub README may be outdated or incorrect on this point. The article uses ICLR 2026 as the more authoritative source.
  • The specific prompt modification categories (synonym substitution, paraphrase, template change, spelling variation) are described in the paper. The exact ranking of which causes the most sensitivity should be verified against the paper's experimental tables.
  • The correlation between the upper bound and PromptSensiScore is described as "strong" in the abstract. The exact correlation coefficient should be checked against the paper's results section before final publication.
  • The paper's abstract on OpenReview slightly differs from the arXiv version. The OpenReview version mentions "logit difference" and "logit" where the arXiv version mentions "log probabilities." Both are discussing the same quantity in different terms (log probabilities of the next token derive from logits through softmax).