GraphInstruct: A Progressive Benchmark for Diagnosing Capability Gaps in LLM Graph Generation

Zihe Wei, Sheng Xiang, Ying Zhang, Changjun JiangNeurIPS 2026 Evaluations and Datasets Track Poster 2026

TL;DR

When we ask Large Language Models (LLMs) to generate graphs—like social networks, molecules, or knowledge graphs—existing benchmarks only give us a single aggregate score that hides where models actually break down. GraphInstruct solves this by slicing graph generation into six distinct constraint-type levels and five evaluation dimensions. The surprising takeaway? Models don't diverge most on the "hardest-looking" tasks like multi-step graph editing; they fall apart on multi-constraint composition, and no single prompting trick works across all levels or model families.

What Problem Does This Paper Address?

Graphs are everywhere in science and engineering, and LLMs are increasingly used as on-demand graph synthesizers. However, evaluating how well an LLM generates graphs has a diagnostic blind spot. Existing benchmarks tend to group tasks by graph type or application domain, or they test whether an LLM can reason about a pre-existing graph rather than generate a new one.

Averaging performance into a single number masks critical failure modes. A model scoring 0.83 overall might ace single constraints (0.95) while collapsing on multiple joint constraints (0.58), or it might gain +4% from Chain-of-Thought (CoT) prompting on one model family while losing -4% on another. Without knowing which structural capability is failing, researchers are flying blind when designing better prompting or inference-time methods.

Methods

To diagnose these gaps, the authors built GraphInstruct around two core axes:

  1. Six Progressive Constraint-Type Levels (L0–L5): Rather than a strict difficulty ladder, each level introduces a new type of structural constraint:
  2. L0: Format generation (node/edge counts, syntax)
  3. L1: Single explicit constraint (e.g., "a tree with 10 nodes")
  4. L2: Multi-constraint composition (e.g., 4+ joint constraints like directed, connected, min-degree $\ge 2$)
  5. L3: Numerical attribute control (density, clustering coefficient, path length)
  6. L4: Domain semantics (social, citation, or molecular networks)
  7. L5: Multi-step graph editing (starting from a base graph and applying ordered edits)
  8. Five Evaluation Dimensions (D1–D5): Outputs are scored on structural quality (D1), serialization-sensitive surface similarity like node labels and edge types (D2), embedding-based distributional proximity (D3), instruction-match adherence (D4), and token efficiency (D5, reported separately as a cost-aware score $S_{\text{final}}$).

Atop these diagnostic signals, the authors also introduce a three-part improvement pipeline:

  • VGIG (Verification-Guided Iterative Generation): Uses deterministic, programmatic D4 checkers (avoiding unreliable LLM-as-a-judge setups) to feed constraint violations back to the model for iterative refinement.
  • CAAP (Constraint-Aware Adaptive Prompting): A rule table that picks the best prompting strategy per instruction based on the constraint level and model tier.
  • Domain Priors: Injects eight hand-curated structural priors (like average degree and clustering) for L4 domain tasks.

Datasets

GraphInstruct introduces 800 instructions generated from hand-authored templates across L0–L5, paired with 1,582 algorithmically synthesized reference solutions (two per feasible instruction, all verified with over 900 unit tests). Nine L2 instructions are deliberately infeasible (e.g., impossible degree-regularity combinations) to act as a confabulation detector. For distributional metrics at L3 and L4, the benchmark also includes a shared pool of 4,163 graphs (3,115 synthetic attribute-calibrated graphs for L3, and 1,048 graphs spanning 9 domains for L4, drawn from sources like ego-Facebook, cit-HepPh, email-Eu-core, CoDEx-S, and MUTAG).

The authors evaluated 12 LLMs across 45 (model, strategy) configurations (zero-shot, few-shot, zero-CoT, and few-CoT), generating roughly 180,000 outputs, and extended the panel to 20 LLMs (including reasoning models) in the appendix.

Key Insights and Ideas

Figure 1: Level-resolved evidence for the 12- and 16-model panels. (a) T1–T3 gap per level on the same continuous D4 score, with 95% paired bootstrap CIs. (b) Tier-free cross-model dispersion (population std) of zero-shot level scores. (c) Change in Q relative to each family’s best prompting baseline in nine model families: Combined (bars) and no-feedback Retry (markers, where it was run); the Qwen3.5-35B method runs shown here use thinking mode (App. I).
  • Discrimination peaks at multi-constraint composition (L2), not L5: Cross-model dispersion is highest at L2 (0.110 standard deviation, $1.6\times$ the next highest level). Adding constraints appears to multiply the probability of violation, making L2 failures brittle.
  • No universal prompting strategy exists: Prompting strategies have opposite-signed effects across levels. Few-shot prompting boosts L4 (+0.058)—mostly by teaching the model the expected serialization format—but hurts L2 (-0.029). Conversely, few-CoT helps L5 (+0.047, tentative) but hurts L3 (-0.078), likely because extra reasoning amplifies numerical drift.
  • CoT depends on model family and capability: Few-CoT consistently helps Qwen3.5 models (+0.044 to +0.052), hurts weaker GPT models (GPT-3.5: -0.174; GPT-4o-mini: -0.038), and leaves stronger GPT-4o/4.1 models essentially unchanged.
  • Weaker models are more prompt-sensitive: Strategy variance ($\sigma_{\text{strat}}$) drops as base model capability rises, suggesting prompt-engineering budgets should scale inversely with model strength.
  • A simple pass/fail verifier goes a long way: In VGIG, binary pass/fail feedback recovers 75% of the quality gain achieved by fine-grained per-constraint feedback over simple retrying, and iterative refinement largely plateaus after $T \approx 5$ rounds.
  • L4 stays flat under iteration: Purely verifier-guided iteration doesn't improve L4 because models already satisfy the structural constraints (D4); their low scores come from D2 (missing node labels/edge types), which few-shot exemplars fix.

Key Results

  • Beating the Prompting Oracle: Combining CAAP, Domain Priors, and VGIG outperforms the empirical "Oracle" (picking the best of the four prompting strategies per level) by +0.035 to +0.050 across three target models:
  • GPT-4o-mini: 0.7533 (zero-shot) $\rightarrow$ 0.8558 (vs. Oracle 0.8062)
  • DeepSeek-V3: 0.8225 $\rightarrow$ 0.8951 (vs. Oracle 0.8588)
  • Qwen3.5-35B: 0.8101 $\rightarrow$ 0.9081 (vs. Oracle 0.8731)
  • Cost–Quality Pareto Frontier: Only 6 of 45 baseline configurations are Pareto-optimal (all from Anthropic or OpenAI), and 3 of the 12 models (GPT-3.5, GPT-4o-mini, Llama-3.1-8B) never reach the $Q \ge 0.8$ quality threshold under any standard prompting strategy.

Limitations and Future Work

The authors note several boundaries: GraphInstruct focuses on static, serialized, instruction-following graph generation, leaving dynamic graphs, multimodal settings, and graph-building-code generation out of scope. The L5 split is relatively small ($N=50$ in the main benchmark, later expanded to 150 in v1.1), making L5 comparisons tentative. Additionally, D2 is sensitive to surface serialization, and verifier-guided methods risk optimizing specifically toward the checker.

Promising future directions include adding an L6 level for multi-graph reasoning and cross-structure inference, as well as developing a serialization-robust semantic metric to replace D2.

Summary updated

BibTeX
@inproceedings{wei2026graphinstruct,
  author = {Zihe Wei and Sheng Xiang and Ying Zhang and Changjun Jiang},
  title = {{GraphInstruct: A Progressive Benchmark for Diagnosing Capability Gaps in LLM Graph Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=ogKUVGdJZR},
}
Figure