TL;DR
Human language is inherently fuzzy, yet we usually force AI models to translate ambiguous text into a single, rigid output—like one specific SQL query or chart. This paper flips the script: instead of forcing a premature guess, the model generates multiple plausible structured candidates, converts them into graphs, and reasons over their structural and semantic consistency to pick the winner. By explicitly embracing ambiguity during training and inference, the framework produces far more accurate, stable, and robust outputs when instructions are underspecified.
What Problem Does This Paper Address?
Imagine reading the sentence: "Sales increased in summer and declined in winter." If you had to turn that into a data table, would your rows be Seasons (Summer, Winter) or Months (June, July, December)? Both are completely valid interpretations of a slightly vague prompt.
In structured generation—the task of turning natural language into formal code like SQL queries, tables, or visualizations—standard models treat the problem as a deterministic, one-to-one mapping. During training, they rely on "single-reference supervision," meaning there is only one gold-standard answer. If the model guesses a valid month-level table when the reference answer is a season-level table, it gets penalized.
This mismatch between fuzzy human inputs and rigid single-target training causes models to suppress valid alternatives. Under the hood, it leads to erratic behavior, sensitivity to minor decoding tweaks, and brittle predictions whenever a user’s prompt is underspecified.
Methods
Instead of committing to one answer immediately, the authors reframe structured generation as an ambiguity-aware inference problem—reasoning over a set of plausible answers.
Here is how the pipeline works:
- Candidate Generation (Standard): Given an input prompt, a base LLM (here, LLaMA-2-13B) uses stochastic decoding (temperature sampling) to generate $k$ diverse candidate structures ($k=5$).
- Task-Specific Graph Construction: Each candidate structure is mapped deterministically into a typed relational graph. For text-to-SQL, nodes are tables, columns, and operators, while edges represent joins or conditions. For visualizations, nodes are chart types, attributes, and aggregations.
- Graph-Based Reasoning (Novel): While the graph schema is specific to the task, the reasoning engine is universal. A two-layer, edge-aware Graph Neural Network (GNN) processes each candidate graph to capture its structural organization, distinguishing candidates that look similar as text tokens but differ in grouping or logic.
- Ambiguity-Aware Scoring & Multi-Valid Training (Novel): Candidates are scored on three learned criteria: semantic coherence (does it match the text?), structural validity (is the graph complete and well-formed?), and relational consistency (do the entity relationships conflict?). Crucially, during training, the authors replace standard single-target loss with a multi-valid objective that distributes probability mass across all semantically equivalent candidates in the pool, preventing the model from punishing valid alternatives.
Datasets
The authors evaluate their framework on two established benchmarks known for implicit ambiguity (no new datasets are introduced, though the authors annotate candidate sets for semantic/execution equivalence to categorize inputs into low, medium, and high ambiguity):
- nvBench: A text-to-visualization dataset (7,878 samples) where a single natural language query can validly map to different chart encodings, aggregations, or groupings.
- Spider: A large-scale text-to-SQL benchmark (10,181 samples) where structurally distinct SQL queries (e.g., different join paths or operators) can be execution-equivalent.
Key Insights and Ideas
- Standard training actively hurts ambiguity resolution: The authors prove mathematically that under standard single-reference cross-entropy, every valid alternative that doesn't match the exact annotated reference receives a negative gradient update. Multi-valid training fixes this optimization flaw.
- Token likelihood is blind to structure: Simply generating multiple candidates and reranking them with an LLM or token probabilities saturates quickly. Two SQL queries might have nearly identical surface tokens, yet one has a broken join path. Representing candidates as graphs exposes these relational flaws, creating a much wider score margin between valid and invalid structures.
- Two-part harmony: Ablation studies reveal that GNN reasoning and multi-valid supervision aren't just redundant tricks—GNN scoring boosts accuracy even when trained on single references, and multi-valid supervision adds a clean, complementary boost on top.
Key Results
In controlled experiments holding the base generator (LLaMA-2-13B) constant, the proposed framework consistently beats deterministic decoding, likelihood reranking, and LLM-based reranking.
- Accuracy Gains: On nvBench, Exact Match (EM) climbs from 48.3% (Deterministic LLM) and 54.7% (LLM Rerank) to 58.9%. On Spider, EM rises from 62.5% (Deterministic) and 66.8% (LLM Rerank) to 70.3%. When evaluated against multiple valid references (Multi-EM), the score jumps to 68.4% on nvBench and 78.2% on Spider.
- Thriving in Chaos: When inputs have low ambiguity, all methods perform similarly. As ambiguity ramps up to "High," deterministic models plummet while the graph-reasoning approach stays remarkably resilient—especially on tricky relational ambiguities.
- Stability: Across multiple stochastic runs under high ambiguity, output consistency improves from 0.52 (Deterministic) and 0.63 (LLM Rerank) to 0.74.
- SOTA Configurations: When paired with benchmark-specific setups, the method achieves 83.4% EM on Spider (edging out DIN-SQL at 82.1%) and 76.3% EM on nvBench.
Limitations and Future Work
- Garbage in, garbage out: Because this is a selection and reasoning framework, it is bottlenecked by candidate generation. If the base LLM fails to generate a valid structure in its top-$k$ pool (accounting for ~28% of errors due to missing entities), the GNN cannot magically recover it.
- Setup overhead: Adapting the pipeline to a brand-new domain requires manually defining a task-specific graph schema, and multi-valid training requires a reliable way to check if candidates are equivalent (like SQL execution checks), which isn't available for free-form text.
- Compute cost: Generating $k$ candidates and running GNN passes costs more compute than greedy single-output decoding, and real-time latency wasn't benchmarked.
Future work aims to improve initial candidate coverage, automate graph construction for broader tasks, approximate valid alternatives when strict equivalence checks don't exist, and streamline selection for faster deployment.
Summary updated