The Topology of Ill-Posed Questions: Persistent Homology for Detection and Steering in LLMs

Guangyu Jiang, Sizhe Tang, Mahdi Imani, Tian LanarXiv 2026

When you ask a Large Language Model (LLM) a question like "What is the release date of T2?", the model faces a dilemma. Does "T2" refer to the movie Terminator 2, the train line, or a specific product? A well-behaved model should ask for clarification, but often, LLMs simply pick the most likely interpretation and state it as fact.

A new paper, "The Topology of Ill-Posed Questions: Persistent Homology for Detection and Steering in LLMs," suggests that the secret to identifying these "bad" questions lies not in the model's output, but in the geometric "shape" of its internal thoughts.

TL;DR

Researchers have discovered that ill-posed questions (ambiguous, underspecified, or contradictory) create distinct "fragmented" shapes in an LLM's internal activation space. By using persistent homology to measure these shapes, they can accurately detect problematic queries and steer the model to provide specific, grounded clarifications rather than generic refusals.

What Problem Does This Paper Address?

LLMs are increasingly used for general-purpose question answering, but they struggle with ill-posed questions. These are queries that lack a unique, valid answer due to:

  • Ambiguity: Lexical or semantic (e.g., "T2").
  • Underspecification: Missing temporal or geographic context (e.g., "Who is the governor?" without specifying a state).
  • Contradiction: Conflicting statements within the prompt.

Existing methods usually try to detect these issues by looking at the model's final text output or by using complex prompting techniques. However, these often fail to capture why a question is difficult for the model. The authors sought a unified way to represent ill-posedness within the model's internal states and use that representation to improve how the model responds.

Methods

The authors treat the internal state of an LLM as a geometric object. As a model processes a prompt, each token at each layer has a hidden state (a high-dimensional vector). The collection of these vectors forms a point cloud.

1. Persistent Homology ($H_0$)

To analyze this cloud, they use zero-dimensional persistent homology ($H_0$). Imagine growing a sphere around every point in the cloud. As the spheres grow, they begin to touch and merge. $H_0$ tracks how these clusters form and disappear across different scales.

  • Well-posed questions tend to form a single, coherent cluster quickly.
  • Ill-posed questions remain fragmented, with token groups representing different interpretations or missing constraints staying separated until much larger scales.

2. Topological Descriptors

Each layer is summarized by three compact statistics:

  1. Mean finite lifetime: The average scale at which components merge.
  2. Normalized lifetime entropy: How spread out the merge events are.
  3. Largest-lifetime concentration: Whether a few large separations dominate the structure.

3. Topology-Conditioned Steering

Instead of a "one-size-fits-all" refusal, the authors use these topological features to find similar examples in a training set. They then calculate a local steering vector—an intervention in the model's activation space—that nudges the model toward a "grounded" clarification (e.g., "Which T2 do you mean?") rather than a generic "I can't answer that."

Figure 1: Overview of our topology-based framework. We collect prompt-token hidden states across layers, treat each layer as a token point cloud, compute finite H0 persistence features, and use the resulting topology vectors for ill-posedness classification and topology-conditioned activation steering.

Datasets

The framework was evaluated across three open-weight models (Gemma-7B, Llama-3.1-8B, and Mistral-7B) using:

  • AmbigQA: Open-domain questions with multiple plausible interpretations.
  • SituatedQA: Questions where the answer depends on temporal or geographic context.
  • CLAMBER: A 9-way classification benchmark covering subtypes like polysemy, co-reference, and missing constraints.

Key Insights and Ideas

  • Ill-posedness is a Trajectory: The "shape" of a question isn't static. Figure 2 shows that different types of ill-posedness follow distinct paths as they move through the transformer layers. For instance, "missing knowledge" queries might show different entropy patterns than "lexical polysemy."
  • Connectivity as a Proxy for Certainty: The fact that $H_0$ (connectivity) is so effective suggests that the model's inability to resolve a question manifests physically as a failure to integrate different parts of the prompt into a unified representation.
  • Preserving Context via Locality: By using topology to find "neighbors" for steering, the model retains the specific entities of the original question. A global steering vector might make the model forget the user asked about "T2" entirely; local steering ensures it asks which "T2."
Layer-wise trajectories of topological features across different ill-posedness subtypes.

Key Results

The topological approach consistently outperformed both prompt-based baselines and previous state-of-the-art probing methods (like AEN).

  • Classification Accuracy: On AmbigQA, accuracy improved from 67.4% to 78.9%. On SituatedQA, it rose from 79.9% to 88.5%.
  • Steering Quality: The "grounded acceptable response" rate (where the model identifies the specific source of confusion) increased from 11.9% to 16.4%.
  • Total Acceptance: The overall rate of helpful, non-hallucinated responses grew from 61.4% to 70.6%.

Detailed results across models and datasets are shown in the table below:

Table 1: Ill-posedness classification across AmbigQA, SituatedQA, and CLAMBER. Each entry reports Accuracy/F1 in percent. AmbigQA and SituatedQA are binary ill-posedness detection tasks, while CLAMBER is a fine-grained 9-way classification task. Prompt-baseline metrics are computed only on valid parsed outputs; valid counts are omitted for compactness. InfoGain only works for the binary tasks and is therefore skipped for CLAMBER. Boldface marks the best method in each dataset–model row.

Limitations and Future Work

While powerful, the study has a few bounds:

  • Higher-Order Topology: The authors only used $H_0$ (connectivity). They suggest that $H_1$ (detecting "loops" or holes in the data) could provide even richer descriptors.
  • Model Scope: The experiments were limited to three specific open-weight model families.
  • Steering Complexity: Currently, the method helps the model decide to clarify; future work could use topology to help the model decide exactly what clarifying question is most efficient to ask.

By treating LLM activations as a geometric landscape, this research moves us closer to models that don't just guess, but actually understand when they are confused.

Summary updated

BibTeX
@misc{jiang2026topology,
  author = {Guangyu Jiang and Sizhe Tang and Mahdi Imani and Tian Lan},
  title = {{The Topology of Ill-Posed Questions: Persistent Homology for Detection and Steering in LLMs}},
  year = {2026},
  eprint = {2606.23590},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.23590},
}
Figure