Abstract
While Large Language Models (LLMs) excel at sequential reasoning, they often struggle with structured outputs like graphs, where early errors can propagate and invalidate the entire structure. We present MIDGARD, a framework that applies the principle of self-consistency to structured reasoning. By aggregating multiple sampled graphs using a Minimum Description Length (MDL) objective and Integer Linear Programming (ILP) for structural constraints, MIDGARD effectively filters hallucinations and recovers missing details. Our evaluation across eight benchmarks shows consistent improvements over standard greedy decoding.
Introduction
LLMs generate text autoregressively, which poses a significant challenge for tasks requiring graph-structured outputs, such as argument maps or flowcharts. A single incorrect token can lead to a broken or contradictory graph. While "Self-Consistency"—sampling multiple outputs and selecting a majority—works well for discrete answers (e.g., math), it is not directly applicable to complex, unordered graphs. Simple aggregation often leads to a "hairball" of conflicting edges. MIDGARD addresses this by finding a consensus graph that best explains the sampled variations with minimal complexity.
Methods
MIDGARD (MInimum Description length Guided Aggregation of Reasoning in Directed acyclic graphs) follows a multi-step pipeline:
- Sampling: The LLM is prompted to generate multiple potential graphs (e.g., $T=10$) using temperature sampling rather than a single greedy output.
- MDL Framework: The aggregation is framed as finding a hypothesis graph that explains the samples with the fewest "bits." The description length is defined as the weighted cost of adding or deleting edges to transform the hypothesis into the observed samples.
- Optimization via ILP: To ensure the final output is a valid Directed Acyclic Graph (DAG), the framework uses Integer Linear Programming. This ensures the consensus is mathematically sound and cycle-free.
- Asymmetric Costs: The model employs unequal costs for adding versus deleting edges, allowing it to be more selective and favor high-precision connections over noisy hallucinations.
Experimental Setup
The researchers evaluated MIDGARD on eight benchmarks across four domains:
- Argument Structure Extraction: ESSAYS, ABSTRCT, and CDCP (identifying claims and their relationships).
- Explanation Graph Generation: EXPLAGRAPHS (creating commonsense maps to explain a stance).
- Script Planning: PROSCRIPT (inferring dependencies between everyday actions).
- Semantic Graph Generation: KELM, WEBNLG, and GENWIKI (extracting subject-property-type triples from text).
Results and Key Insights
MIDGARD consistently outperforms greedy decoding and other aggregation baselines across various models and tasks.
- Consistency as Correctness: The core insight is that hallucinations are rarely consistent. While an LLM might invent a random edge in one sample, it is unlikely to repeat the same error across many. MDL naturally captures this consensus.
- Synthesis over Selection: Unlike simple voting, MIDGARD can synthesize a final graph containing the best elements from different samples, even if that specific combination never appeared in a single sample.
- Error Reduction: Qualitative analysis confirms a significant reduction in "spurious" (hallucinated) and "reversed" edges compared to greedy decoding.
Limitations and Future Work
While effective, MIDGARD introduces higher computational costs due to multiple sampling passes and ILP solving. The ILP complexity also limits its application to very large, dense graphs. Future work may explore more efficient optimization techniques or extend this consensus-based approach to domains like legal reasoning or scientific discovery.
Summary updated