← Back to Paper Radar

ClosureBench: A Constructive Benchmark for Compositional Graph Reasoning

Stefano Goria
2026

Reading guide · Based on sections of the original paper

The author presents ClosureBench, a generator of graph-reasoning questions with program-computed answers and separately controlled difficulty axes, and uses it to argue that language models fail mainly when executing many-step graph computations, a failure that fine-tuning a small model to emit verified programs largely removes.

Why read this

Practitioners evaluating LLMs on relational or multi-hop data tasks can use it for a contamination-resistant test harness and for evidence that delegating execution to code outperforms in-context reasoning.

What the authors found

  • Qwen3-4B was LoRA-tuned to write Ein programs. On the 1,300-instance held-out split (n=4–10, lenient scoring), it reached 94.3% and fell only 1.3pp from L1 to L3. The same model tuned on answers with the same setup reached 59.2% and showed a 19.3pp seen/held-out gap. A Python+NetworkX target reached 92.6%. The author cautions that edging past zero-shot o3 (92.8%) pits a task-specific fine-tune against a general model. 4.5 Program Synthesis as an Alternative
  • Every natural-language model lost accuracy from atomic to composed queries, including o3 (96.4% to 82.0%). Frontier L3 accuracy dropped sharply once graphs exceeded about 5 nodes and then plateaued. Edge density had only a weak effect. 4.2 Where Do Models Fail?
  • On a 200-instance subset, giving models JSON edge lists or adjacency matrices did not remove the compositional drop. The one exception was Gemini 2.5 Flash with matrices, which the author attributes partly to its extra thinking compute. 4.6 Robustness to Graph Encoding

Main limitation

The program-synthesis result rests on a single 4B base model with two program targets, and evaluation used small graphs (n≤10). Whether the near-flat accuracy across levels holds for other models or larger scales was not tested. 5 Discussion

Where to start

4.5 Program Synthesis as an Alternative · See the within-model answer-vs-program comparison, the breakdown of the 74 errors (82% misread edges), and the Ein vs Python trade-offs.

Abstract

Large language models fail on multi-step compositional reasoning, but measuring that failure is hard, because new models are trained on the benchmarks used to evaluate them. A fixed test set becomes a memorisation check soon after release. Constructive benchmarks avoid this by generating instances on demand. We introduce ClosureBench, a constructive benchmark for graph-relational logical reasoning. Each task is built from explicit primitives (reachability, degree, set operations, connectivity, aggregation), and its reference answer is computed by executing code that implements that logic exactly. Ground truth is therefore verified, and the supply of fresh instances is unlimited. The benchmark spans 26 task categories at three compositional levels, with three independent difficulty axes: graph size, edge density, and query depth. We evaluate models from 1.5B open weights to frontier systems (o3, GPT-4.1, Gemini 2.5, Claude Sonnet 4). Accuracy falls as graph size and query depth increase, and the two axes interact. The difficulty does not lie in the surface form, since it persists when the graph is given as a JSON edge list or an adjacency matrix rather than prose, nor in the reasoning rule, which models state correctly. It lies in carrying that rule out over the graph across many steps. A 4B model fine-tuned to emit verified programs instead of answers stays nearly flat across compositional levels, while every frontier model degrades. o3 falls from 96% on atomic queries to 82% on the most compositional; the 4B model holds at 93% at a fraction of the token cost. The program offloads multi-step execution to a runtime, and the model's remaining errors are almost entirely misread edges. Constructive generation also supports a direct memorisation check, comparing accuracy on seen and fresh instances.

Generated automatically from paper sections on 2026-11-28.