TL;DR
We usually measure how similar two prompts are using standard Euclidean or cosine distances on their input embeddings—which completely ignores how the language model actually reads and processes them. By borrowing tools from differential geometry, the authors build a "model-intrinsic ruler" that measures prompt distance based on how much a model's output predictions change. This geometric lens vastly outperforms standard baselines at predicting prompt fragility, revealing which messages and word edits are most likely to trip up an LLM.
What Problem Does This Paper Address?
Anyone who has spent an evening wrestling with an LLM knows how maddeningly sensitive they are to phrasing. Swap a single word, and a helpful assistant might suddenly get confused or break character.
When engineers and researchers want to quantify how "far apart" two prompts are—say, for robustness testing—they typically compute the Euclidean or cosine distance between the prompts' input embeddings. Here is the catch: those distances are model-agnostic. Looking only at input embeddings is like judging how differently two recipes will taste solely by counting how many letters differ on the page, completely ignoring the chef. Two prompts might sit right next to each other in input embedding space, yet trigger wildly different internal computations and next-token predictions inside the transformer. We lack a principled, mathematical ruler that measures distance as seen by the model itself.
Methods
To build a model-aware ruler, the authors treat a frozen, decoder-only LLM (specifically testing Qwen3-0.6B and GPT-2-small) as a smooth mathematical map that takes continuous input embeddings and outputs a probability distribution over the next token.
Instead of measuring distance at the input and calling it a day, they start at the output probability space and pull back the geometry to the input space. Think of it like shining a grid of light onto a funhouse mirror: the way the grid warps on the glass tells you exactly where the mirror stretches or compresses an image. Mathematically, a "pullback metric" uses how fast the output changes with respect to the input to warp the input space—stretching regions where tiny prompt tweaks cause massive output shifts, and shrinking regions where the model doesn't care about rewording.
The authors test three output geometries to pull back:
- Euclidean metric on probability vectors.
- Angular metric on probability vectors.
- Fisher information metric, the natural geometry of probability distributions (which accounts for how sensitive probabilities are near zero or one).
Because the warped space curves from point to point, they test three ways to turn these local metrics into an actual distance between two prompts: evaluating the metric just at the starting prompt, averaging it at both prompts, and path integration—adding up the tiny warped steps along the straight-line path connecting the two prompts in embedding space.
Datasets
The authors introduce a controlled, synthetic bank-chatbot dataset designed specifically to probe single-token sensitivity without changing prompt length. From 350 source customer messages spanning five distinct behavioral categories, they draw 200 "seed" messages:
For each of the 200 seeds, they generate 50 single-token rewordings (varying morphology, function words, and other substitutions). Including the seeds, this yields 10,200 prompts and 255,000 within-family prompt pairs per model, allowing clean statistical comparisons within each message family.
Key Insights and Ideas
- Geometry exposes fragility without behavioral labels: The path-integrated Fisher distance is consistently larger than plain Euclidean distance across every message family—meaning the model stretches the space around real prompts. Crucially, this stretching is widest on adversarial (e.g., social engineering) and known-fragile (e.g., negation, typos) messages. The geometry alone flags dangerous or brittle prompts.
- Little words pack the biggest punch: Purely from the induced geometry, the method recovers a striking linguistic insight: substituting function words (like prepositions, articles, or negations) is the most disruptive single-token edit you can make to a prompt, warping the model's output space far more than morphological tweaks.
- The path matters: Simply looking at local sensitivity at the starting prompt helps, but integrating along the path between prompts captures nonlinear twists inside the model, yielding the sharpest alignment with actual output shifts.
Key Results
To see how well each distance ruler tracks true behavioral change, the authors correlate the distances within each message family against the symmetric Kullback–Leibler ($\text{sKL}$) divergence between the prompts' actual next-token distributions:
- Massive leap over baselines: Every single pullback metric beats standard Euclidean and cosine embedding distances by a wide margin on both Qwen3-0.6B and GPT-2-small.
- Fisher wins the crown: The Fisher pullback is the strongest performer in all but one comparison. On Qwen3-0.6B, the mean within-family Spearman correlation jumps from a weak 0.21 for standard Euclidean distance all the way to 0.84 for the path-integrated Fisher distance.
Limitations and Future Work
Because only pages 1–2 (Abstract and Table of Contents) and the dataset tables from page 8 were provided in the document excerpt, the specific limitations and future extensions (such as Section 5.2 on refining the straight-path approximation and Section 6.4 on uses and extensions) are not visible in the provided text.
However, from the experimental setup described in the abstract and tables, the current evaluation focuses on relatively compact models (Qwen3-0.6B and GPT-2-small), single-token edits (keeping token lengths fixed), and next-token probability distributions on an artificial domain dataset rather than multi-token generation or larger frontier models.
Summary updated