Interactive Proofs as a Unified Framework for Evaluating and Leveraging Verifiable Proof Generation by LLM Agents

Summary (Overview)

  • MERLIN-BENCH is introduced as a new benchmark that evaluates LLM agents' ability to construct verifiable proofs by casting them as provers in interactive proof systems, drawing on computational complexity theory (IP = PSPACE).
  • The benchmark comprises 100 test cases across 15 problem families, organized into three tiers: deterministic certificates (NP problems), multi-round interactive proofs (IP problems), and real-world verification tasks (Lean, Dafny, DRAT).
  • An automated test-case construction framework uses a construction agent that iteratively performs literature review, generator implementation, and feasibility/difficulty checks under human supervision.
  • Evaluation of 10 frontier LLMs reveals that reliably producing verifier-accepted proofs remains a substantial challenge, with strong discriminative power particularly in Tier 2.
  • Case studies identify actionable insights: tool use is essential, user prompt expertise significantly affects success, and proof-solving experience from abstract tasks transfers to real-world verification tasks.

Introduction and Theoretical Foundation

Background and Motivation

The emerging paradigm of human–AI collaboration in theorem proving requires LLM agents not only to find evidence but to complete proofs through interaction with a specified framework. Prior work has focused on specific tasks, but the authors seek to characterize a unified, protocol-agnostic proving capability.

Limitations of Prior Benchmarks

The paper identifies four key limitations in existing benchmarks:

BenchmarkAgent-orientedRigorous certificateScalable synthesisUnified proof
NLGraph✕✕√✕
NPHardEval✕✕√√
SATBench✕✕√√
miniF2F✕√✕✕
Verus-Bench√√✕✕
DafnyGym√√✕✕
Merlin-Bench√√√√

Theoretical Foundation: Interactive Proof Systems

NP Problems. A decision problem LL is in NP if there exists a polynomial-time algorithm V\mathcal{V} and a polynomial q(x)q(x) such that:

x∈L⇔∃w:∣w∣≤q(∣x∣)∧V(x,w)→1x \in L \quad \Leftrightarrow \quad \exists w: |w| \leq q(|x|) \land \mathcal{V}(x, w) \to 1

where ww is called the certificate.

Interactive Proof (IP) Systems. An interactive proof is carried out by a computationally unbounded prover P (Merlin) and a polynomial-time randomized verifier V (Arthur). A multi-round interactive protocol Π\Pi consists of the number of rounds nn, message formats, and speaking order rˉ∈{P,V}n\bar{r} \in \{\mathsf{P}, \mathsf{V}\}^n.

The interaction is formally defined as:

mi={P(x,hi−1),ri=P,V(x,hi−1),ri=V,DΠ(P,x)=Vout(x,hn)m_i = \begin{cases} P(x, h_{i-1}), & r_i = \mathsf{P}, \\ V(x, h_{i-1}), & r_i = \mathsf{V}, \end{cases} \quad D_{\Pi}(P, x) = V_{\text{out}}(x, h_n)

A decision problem belongs to IP if there exists a protocol Π\Pi and verifier VV satisfying:

  1. Completeness: ∃P,∀x∈L,Pr⁡[DΠ(P,x)→1]≥1−εc\exists P, \forall x \in L, \quad \Pr[D_{\Pi}(P, x) \to 1] \geq 1 - \varepsilon_c
  2. Soundness: ∀P,∀x∉L,Pr⁡[DΠ(P,x)→1]≤εs\forall P, \forall x \notin L, \quad \Pr[D_{\Pi}(P, x) \to 1] \leq \varepsilon_s

where εs,εc≤1/3\varepsilon_s, \varepsilon_c \le 1/3.

Example (GNI). Graph Nonisomorphism asks whether G0≇G1G_0 \not\cong G_1. Its membership in NP remains open, but an IP protocol exists: the verifier randomly relabels one of the graphs and asks the prover to identify the source. An unbounded prover can always succeed when G0≇G1G_0 \not\cong G_1 but can only guess when G0≅G1G_0 \cong G_1.

Key Insight: NP ⊆ IP (Lemma 2.1), since NP can be viewed as a single-round interactive proof where P sends the certificate and V verifies it. Raising problem complexity to IP = PSPACE preserves substantial headroom in difficulty even for agents with tool-use and code-generation capabilities.

Methodology

Test Case Formulation

A test case is formally defined as a 5-tuple:

c=(Dc,Gc,Πc,Vc,Bc)c = (D_c, \mathcal{G}_c, \Pi_c, \mathcal{V}_c, B_c)

where:

  • DcD_c: description of the decision problem LL
  • Gc\mathcal{G}_c: randomized generator that constructs instances z∈Lz \in L from random seed rr
  • Πc\Pi_c: interactive proof protocol with completeness εc≤10−10\varepsilon_c \leq 10^{-10} and soundness εs≤2−23\varepsilon_s \leq 2^{-23}
  • Vc\mathcal{V}_c: formal verifier
  • BcB_c: resource constraints (computation time, permitted tools)

The score of agent AθA_\theta on test case cc is:

Score⁡c(Aθ)=I[Vc(z,hn)→1∧Valid⁡Bc(τ)∣r←R,z←Gc(r)]\operatorname{Score}_c(A_\theta) = \mathbb{I}\left[\mathcal{V}_c(z, h_n) \rightarrow 1 \wedge \operatorname{Valid}_{B_c}(\tau) \mid r \leftarrow \mathcal{R}, z \leftarrow \mathcal{G}_c(r)\right]

Evaluation Procedure

The evaluator samples a random seed, generates an instance, creates a workspace for the agent, and launches a local HTTP server running the verifier. The agent interacts through a client; success is recorded as a pass, and if resource constraints are also satisfied, a strict pass.

Three-Tier Problem Classification

  • Tier 1 (36 cases, 6 NP problems): Deterministic single-round certificate verification.
  • Tier 2 (40 cases, 6 IP problems): Multi-round probabilistic interactions; some problems not known to be in NP.
  • Tier 3 (24 cases): Real-world protocols (Lean, Dafny, DRAT) as verifiers, demonstrating alignment with formal verification capabilities.

Construction Agent Workflow

  1. Literature review: Identify structural restrictions admitting specialized solutions (e.g., 2-SAT vs. general SAT).
  2. Generator implementation and automatic check: Implement generator, reference algorithm, and verifier; verify correct acceptance/rejection.
  3. Feasibility and difficulty check: A highly capable model (GPT-5.6 Sol) must pass within a 600s time limit; less capable models must fail.
  4. Human check: Final review of correctness and validity.

Empirical Validation / Results

Experimental Setup

  • Models evaluated: GPT-5.6-Luna, GPT-5.6-Terra, GPT-5.6-Sol, Claude-5-Sonnet, Claude-5-Opus, DeepSeek-V4-Flash, DeepSeek-V4-Pro, GLM-5.3-Flash, GLM-5.3, Kimi-K3.
  • Harnesses: DeepSeek Harness, Claude Code, and Codex, paired per model family.

Key Findings

  1. Strong discriminative power, particularly in Tier 2, across agents.
  2. Cross-tier correlation: Number of tasks solved in Tiers 1+2 is strongly positively correlated with Tier 3 performance (Spearman's ρ=0.834\rho = 0.834).

Failure Analysis

Using GPT-5.6-Sol and GPT-5.6-Terra on 40 Tier-2 cases:

  • Practice-level errors (interaction protocol, tool resources) account for 17.5% of Sol's results and 45.0% of Terra's; among failed runs only: 43.8% and 58.1%, respectively.
  • Both models identified the correct methodology in 8 and 7 test cases respectively but failed for other reasons.
  • Sol completes successful tasks faster (269s vs. 312.3s) but consumes more budget on failed tasks (532.2s vs. 436.1s).

Benchmark Robustness

TierGPT-5.6-Sol-HighGPT-5.6-Terra-High
Tier 1 (36)25.0±1.025.0 \pm 1.019.7±0.619.7 \pm 0.6
Tier 2 (40)21.0±2.621.0 \pm 2.69.3±0.69.3 \pm 0.6
Tier 3 (24)16.0±2.016.0 \pm 2.012.3±3.112.3 \pm 3.1
Total (100)62.0±2.062.0 \pm 2.041.3±2.941.3 \pm 2.9

Low variance across three independent runs confirms high reliability.

Case Study 1: Tool Use and Problem Complexity

  • Tier 0 ablation (P problems with tools): All models achieve 94.4%–100% pass rates, confirming P-level benchmarks saturate when tools are available.
  • Tier 1 ablation (tools removed): Both Sol and Terra drop to only 2 passes each (from 12 and 10 respectively), with Δ\Delta of −55.6 and −44.4 percentage points.

Conclusion: Tool use is essential; raising complexity from P to IP preserves discriminative headroom.

Case Study 2: User Prompt Expertise

Three prompt levels were tested on GPT-5.6-Terra across 40 Tier-2 cases:

ConditionPassed Tasks
Baseline9
Engineer14
Student9
Expert22
  • Engineer prompts reduce practice-level error rate from 45.0% to 37.5%.
  • Student prompts reduce inadequate core methods (24/40 → 18/40) but increase "correct approach yet failed" cases (7/40 → 13/40), with no net gain.
  • Expert prompts with domain-specific knowledge yield substantial improvement (22/40).

Case Study 3: Transfer from Synthetic to Real Tasks

Study guides distilled from Tier 1/2 solution traces were provided as prompts for Tier 3 tasks:

SettingLean (16)Dafny (16)DRAT (16)Total (48, %)
Sol+0Sol^{+0}11.3±0.611.3_{\pm 0.6}7.7±2.57.7_{\pm 2.5}12.0±1.012.0_{\pm 1.0}64.58±5.5164.58_{\pm 5.51}
Sol+SolSol^{+Sol}12.3±0.612.3_{\pm 0.6}10.0±3.510.0_{\pm 3.5}12.7±1.512.7_{\pm 1.5}72.92±9.5572.92_{\pm 9.55}
Terra+0Terra^{+0}5.3±1.25.3_{\pm 1.2}7.7±1.27.7_{\pm 1.2}4.3±0.64.3_{\pm 0.6}36.11±4.3436.11_{\pm 4.34}
Terra+TerraTerra^{+Terra}5.7±1.55.7_{\pm 1.5}8.0±1.78.0_{\pm 1.7}7.0±1.77.0_{\pm 1.7}43.06±1.2043.06_{\pm 1.20}
Terra+SolTerra^{+Sol}7.3±1.57.3_{\pm 1.5}8.7±0.68.7_{\pm 0.6}8.7±1.28.7_{\pm 1.2}51.39±6.3651.39_{\pm 6.36}

External benchmark results (AlgoVeri, CombiBench) also showed improvements, with the exception of a subtle decrease for Sol+SolSol^{+Sol} on AlgoVeri.

Key conclusions:

  • Synthesized experience improves real-world task performance.
  • A stronger teacher (Sol) yields better study guides than a weaker one (Terra).
  • A stronger learner (Sol) benefits more from the same guide.

Theoretical and Practical Implications

Theoretical Significance

  • Unified evaluation paradigm: MERLIN-BENCH provides a protocol-agnostic framework grounded in interactive proof systems, decoupling proof ability from proficiency with any specific proof language or tool.
  • Complexity headroom: By raising problem complexity to IP = PSPACE, the benchmark remains challenging even for agents with code generation and tool use, unlike P-level benchmarks that saturate.
  • Formal rigor: Certificates are checked by formal verifiers (not LLM auditors), ensuring soundness of evaluation.

Practical Implications

  1. Tool use is non-negotiable for practical proof generation—benchmarks must account for agentic tool use or risk becoming trivial.
  2. Prompt engineering matters at multiple levels: Engineering instructions reduce execution errors; domain-specific expertise dramatically expands solvable task range.
  3. Transferable skills: Experience from abstract IP problems can improve performance on real-world verification tasks (Lean, Dafny, DRAT), suggesting potential for post-training on synthetic proof data.
  4. Future direction: Converting Tier 1/2 solution trajectories into training data for post-training could improve models' formal proof capabilities with real-world verifiers.

Conclusion

MERLIN-BENCH introduces a new evaluation paradigm that places LLM agents in the role of provers within interactive proof systems, enabling evaluation of unified, protocol-agnostic proof generation capabilities. The benchmark includes 100 test cases across 15 problem families spanning three tiers of difficulty.

The evaluation of 10 frontier LLMs demonstrates that constructing proofs according to specified requirements remains a significant capability bottleneck, beyond merely finding certificates. The case studies reveal three actionable insights:

  1. Tool use is essential for practical results and must be incorporated into evaluation design.
  2. User prompts directly impact capabilities—both engineering guidance and domain-specific expertise improve performance.
  3. Synthetic interactive proof experience transfers to real-world formal verification tasks, suggesting promising avenues for test-time scaling and post-training.

Future work should explore converting synthetic proof trajectories into training data for post-training, potentially improving models' ability to construct proofs using real-world verifiers.

Related papers