TL;DR
Large Language Models (LLMs) struggle to understand ambiguous instructions because they get stuck on superficial wording differences. This paper introduces Topological Active Inference (TAI), a new method that uses topology to understand the underlying "intent" of instructions, allowing LLMs to ask much more effective clarifying questions and resolve ambiguity with fewer interactions.
What Problem Does This Paper Address?
When we give instructions to LLMs, especially for complex tasks like writing code or planning, our language is often underspecified. This means a single instruction can map to many different, valid interpretations or "intents." LLMs are great at generating text, but when it comes to figuring out what we really want, they often fall short. This is called "semantic blindness" – they might ask questions to distinguish between minor wording changes (like "count += 1" vs. "count = count + 1") instead of understanding the core functional difference (like "recursive" vs. "iterative"). This leads to wasted turns, user frustration, and potentially incorrect or even harmful outputs.
Methods
TAI tackles this by recasting task disambiguation as "intent-manifold contraction." Here's the breakdown:
- Manifold Skeletonization (Perception): Instead of treating each generated solution as a separate, independent option, TAI assumes that valid solutions for a given intent lie on a geometric "manifold" in a semantic space. It uses Persistent Homology (a technique from topological data analysis) to analyze the shape of this manifold. This process acts like a "topological filter," identifying robust, long-lived structures (representing distinct intents) while discarding short-lived variations (syntactic noise). This effectively "skeletonizes" the manifold into a set of distinct intent clusters.
- Topological Expected Information Gain (TEIG): Once the intent clusters are identified, TAI generates clarifying questions. Crucially, it doesn't just pick any question; it uses TEIG to select questions that are most likely to "bisect" the probability mass between the most competitive intent clusters. This is a geometric approach to information gain, optimizing for reducing uncertainty over clusters rather than individual solutions.
- Active Disambiguation Loop: TAI then enters an iterative loop: it asks the selected question, receives the user's answer, updates its belief about which intent cluster is most likely, and repeats until the ambiguity is resolved.
Datasets
The authors evaluate TAI on three domains:
- Ambi-Code: Derived from HumanEval, with key functional constraints removed to create ambiguity.
- Ambi-Plot: Underspecified visualization tasks.
- Ambi-Nav: A GridWorld planning domain with ambiguous latent objectives.
They also use the HumanEval and MBPP benchmarks, modified to inject ambiguity.
Key Insights and Ideas
- Semantic Blindness is Real and Costly: The paper clearly illustrates how standard methods get stuck on superficial differences, wasting valuable interaction turns.
- Topology as a Semantic Fingerprint: TAI's core idea is that the underlying structure of the "intent manifold" (how different solutions relate to each other geometrically) holds the key to disambiguation, not just the individual solutions themselves. Persistent Homology is the tool to extract this structure.
- Geometric Information Gain: TEIG is a novel way to select questions that geometrically separate intent clusters, leading to more efficient uncertainty reduction.
- Logarithmic Complexity: By moving from individual solutions to intent clusters, TAI achieves a theoretical interaction complexity of O(log K) (where K is the number of intents), a massive improvement over O(N) for methods that consider individual samples.
- Model Agnosticism: TAI acts as a "cognitive scaffold," providing significant performance gains even with smaller LLMs, suggesting its effectiveness isn't solely dependent on massive model scale.
Key Results
- Efficiency: TAI achieves >95% success in 1-3 turns across all tested domains, significantly outperforming baselines like Standard BED and Random-Ask.
- Effectiveness: TAI consistently achieves higher success rates, especially in complex scenarios where Standard BED hits a performance ceiling.
- Robustness: TAI is robust to syntactic noise (e.g., variable renaming) and noisy user feedback (e.g., "I don't know" responses), degrading gracefully where baselines collapse.
- Scalability: TAI performs well even with smaller LLMs, demonstrating its ability to leverage topological structure rather than just raw computational power.
Limitations and Future Work
- Embedding Quality: While TAI is robust to some degree, its performance is still influenced by the quality of the semantic embedding model. Better embeddings lead to better manifold representations and thus more precise disambiguation.
- Candidate Coverage: TAI relies on the initial sampling to cover all potential intent modes. If an intent is missed during sampling, it cannot be recovered.
- Future Work: The authors suggest making the topology adaptive through resampling and online refinement, and integrating TAI with free-form dialogue for more natural interactions. They also envision TAI as a component of broader safety-aware systems.
Summary updated