The Topology of Ill-Posed Questions: Persistent Homology for Detection and Steering in LLMs
Researchers demonstrate that persistent homology—a topological data analysis technique—can detect and classify ill-posed questions (ambiguous, underspecified, or contradictory queries) in large language models by analyzing hidden state geometry across transformer layers. The method achieves 78-88% accuracy on benchmark datasets and enables targeted activation steering to improve response quality, offering a principled approach to handling inherently problematic inputs.
This research addresses a fundamental challenge in LLM deployment: handling questions that lack clear, singular answers. Rather than treating ill-posedness as a superficial output problem, the authors investigate whether diverse failure modes share identifiable geometric structure in the model's internal representations. By applying persistent homology—a mathematical framework that tracks topological features across different scales—to contextual hidden states, they uncover consistent patterns that distinguish well-posed from ill-posed queries.
The technical contribution is substantial. Instead of relying on surface-level prompt analysis or simple pooled embeddings, the topology-based approach captures layer-wise geometric signatures through three compact descriptors: mean finite lifetime, normalized lifetime entropy, and largest-lifetime concentration. These descriptors aggregate information across all transformer layers, creating a unified representation of question structure. The 11-percentage-point improvement over baselines on AmbigQA (67.4% to 78.9%) demonstrates that topological features genuinely capture something meaningful about input quality.
For AI practitioners, the steering mechanism is particularly valuable. Topology-conditioned activation steering uses similar examples to guide model behavior—encouraging clarifying questions or abstention rather than hallucinated answers. A 9-percentage-point improvement in acceptable response rates (61.4% to 70.6%) shows this approach translates geometric insights into practical intervention. This bridges interpretability and control, addressing safety concerns around LLM reliability.
The broader implication extends beyond academic interest. As LLMs enter production systems handling user queries, automatic detection of unanswerable or ambiguous inputs becomes critical infrastructure. This work provides a principled, model-agnostic method deployable across different architectures. Future work likely involves scaling these techniques to larger models and developing real-time intervention strategies that minimize inference overhead while maintaining response quality.
- →Persistent homology detects ill-posed questions by analyzing transformer hidden state geometry, improving classification accuracy by 11+ percentage points across benchmarks.
- →Three topological descriptors (lifetime mean, entropy, concentration) consistently identify ambiguous, underspecified, and contradictory queries without task-specific tuning.
- →Topology-conditioned activation steering improves acceptable response rates by 9 percentage points by retrieving similar examples and constructing targeted interventions.
- →The method works across three open-weight LLMs without model retraining, suggesting broad applicability to deployed language models.
- →This approach bridges interpretability and control, enabling LLMs to clarify ambiguous inputs or abstain rather than generate plausible but incorrect responses.