Building a Verifiable Evaluation System for Mathematical Theorem Proving Agents

    As mathematical theorem proving becomes a demanding testbed for agent reasoning, evaluation must shift from plausible answers to artifacts that can be independently checked. This article outlines how to design a verifiable evaluation system: task definitions with unambiguous check boundaries, an independent verifier, scoring based on verification, layered metrics, an agent workflow covering planning, decomposition, construction, local checking, and repair, and a reproducible engineering pipeline. It also explains how to interpret subset results, abstract representative task types, and apply practical safeguards around isolation, budgets, failure classification, and regression testing.

    Building a Verifiable Evaluation System for Mathematical Theorem Proving Agents

    1. From Answer Generation to Independently Reviewable Artifacts

    Mathematical theorem proving has long been treated as a high-difficulty scenario for testing agent reasoning. Traditional evaluation often focuses on whether a model can produce a plausible proof sketch, whether the final answer matches a reference answer, or whether human reviewers think the process “looks right.” Such approaches may be acceptable for natural-language question answering, but they carry clear risks in theoretical computer science and formal mathematics. A proof can be fluent in exposition yet contain unacceptable gaps in key lemmas, boundary conditions, or construction details. A construction can claim to satisfy constraints while lacking an object that can be checked by a machine or an independent reviewer.

    A more reliable evaluation approach is therefore to place the outputs of the research process into a verifiable system. The task provides explicit formal or semi-formal constraints. The agent submits not an “explanation” but an object, parameter set, or proof that can be independently checked. A verifier executes checks according to the task definition, and only results that pass independent review count as success. A recent public study adopted this approach, placing construction tasks, proof tasks, and reliability tasks into a single evaluation framework and reporting full-leaderboard and multiple subset results. Its core value is not a particular score but the shift from “what the model said” to “whether the artifact can be reviewed.”

    This shift brings three direct benefits. First, it reduces the probability that hallucinations are misjudged as correct. Second, it makes results comparable across different agents and different attempt budgets. Third, it makes failure causes locatable: whether the task was misunderstood, lemma decomposition failed, a construction violated constraints, or proof checking did not pass. For teams building evaluation systems, verifier-first should be the first principle.

    2. Core Design of a Verifiable Evaluation System

    2.1 Task Definition: Clear Inputs, Outputs, and Check Boundaries

    The first layer of a verifiable system is task definition. A task should include at least the problem statement, allowed assumptions, output format, verification conditions, attempt budget, and scoring rules. For a construction task, the output may be a vertex set, edge set, parameter configuration, or counterexample. Verification conditions may include size constraints, structural constraints, and the absence of forbidden substructures. For a proof task, the output may be a lemma chain, a bound proof, or a checkable proof script. Verification conditions should specify the allowed axioms, existing results, and derivation rules.

    The key to task definition is not “writing it like a competition problem” but “making it unambiguous for the checker to execute.” If verification conditions depend on human interpretation, they should be split into machine-checkable subconditions, with human review retained as a supplement rather than mixed directly into the primary score.

    2.2 Verifier: A Review Layer Independent of the Agent

    The verifier is the trust foundation of the system. It should not rely on the agent’s self-report; it should directly check the artifact. For construction tasks, the verifier can check whether the object is valid, whether constraints are satisfied, and whether the target value is reached. For proof tasks, the verifier can check whether each derivation step is supported by rules, whether lemmas have been proved or are allowed to be cited, and whether the final conclusion matches the target.

    From an engineering perspective, the verifier should have the following properties: structured input and output, locatable error messages, reproducible checking, and version traceability. The verifier itself also needs test sets and regression cases to avoid “verifier bugs allowing incorrect artifacts to pass.” For scoring, a two-layer mechanism of “verifier pass + human spot checks” is recommended: the primary score is produced by the verifier, while human spot checks assess insufficient verifier coverage and task ambiguity.

    2.3 Scoring Rules: Success Must Be Defined by Independent Review

    Scoring rules should clearly define the conditions for “success.” A common mistake is to perform text matching between the model’s final answer and a reference answer. This penalizes equivalent proofs with different wording and lets superficially similar but logically incorrect answers pass. A more reasonable rule is: the agent submits an artifact, the verifier checks it independently, pass means success, and failure means failure. If multiple attempts are allowed, record the number of attempts, number of successes, number of covered tasks, and first-success round.

    In addition, “total score” and “subset score” should be distinguished. A full leaderboard can reflect overall performance, but mathematical tasks are highly heterogeneous, and a single total score can easily hide structural differences. In public evaluation, leading agents had noticeably higher completion rates on subsets without intermediate lemma constraints than other participants, while on certain reliability tasks, lower-ranked agents performed better. This indicates that evaluation should report the full leaderboard, the no-intermediate-lemma subset, attempt-budget-sensitive subsets, and task coverage at the same time.

    3. How to Read Evaluation Metrics: Structural Differences Beyond the Total Score

    Verifiable evaluation metrics should include at least the following categories:

    • Full-leaderboard score: Results aggregated across multiple tasks and scoring items. Suitable for overall ranking, but it should not be the only conclusion.
    • No-intermediate-lemma completion rate: Whether an agent can complete a theorem proof or construction end-to-end without being given intermediate lemmas. This metric is closer to a real research workflow and tests task decomposition, lemma selection, and self-repair.
    • Attempt budget and success rate: Within a fixed number of attempts, the number of successes, number of successful tasks, and coverage. Accidental success under a high attempt count should be distinguished from stable success under a low attempt count.
    • Number of covered tasks: How many different theorems or task types are successfully covered, avoiding reliance on a small set of template problems.
    • Reliability task performance: Whether an agent is stable on tasks requiring strict checking of alphabets, parameters, or boundary conditions. Such tasks often expose the problem that “a proof looks reasonable but its details are unreliable.”

    When reading these metrics, avoid the simple narrative of “total-score dominance.” Different tasks require different capabilities: some emphasize construction search, some emphasize proof planning, and some emphasize boundary-condition checking. An agent may produce objects exceeding reference values on construction tasks while performing poorly on another type of reliability task. Another agent may lag in total score but complete a specific task in all three attempts. An evaluation system should encourage this fine-grained disclosure rather than replacing a capability profile with a single ranking.

    4. Agent Workflow: Planning, Decomposition, Construction, Verification, and Repair

    In a verifiable system, the agent workflow should be designed around “checkable artifacts.” A typical process is as follows:

    1. Task understanding: Parse the problem statement, constraints, output format, and verification conditions.
    2. Plan generation: Choose strategies such as construction, contradiction, induction, or bound estimation.
    3. Lemma decomposition: Split the target into independently checkable subgoals. Without intermediate lemma constraints, the agent must complete this step on its own.
    4. Artifact construction: Generate graphs, parameters, proof scripts, or lemma chains.
    5. Local verification: Call the verifier or a lightweight checker for self-checking.
    6. Error repair: Locate problems based on verifier error messages and retry.
    7. Submission and archiving: Record the final artifact, attempt trajectory, verification report, and elapsed time.

    “Local verification” does not mean letting the agent prove itself correct. It gives the agent a chance to find format errors, missing constraints, and obvious contradictions before submission. The repair stage should be limited within the budget to avoid uncontrolled evaluation costs caused by unlimited retries.

    Pseudocode illustration:

    1. def run_agent(task, budget):
    2. plan = agent.plan(task.statement, task.constraints)
    3. lemmas = agent.decompose(task.statement, plan)
    4. artifact = agent.construct(task.statement, plan, lemmas)
    5. for attempt in range(budget):
    6. report = verifier.check(task, artifact)
    7. if report.ok:
    8. return success(artifact, report, attempt)
    9. artifact = agent.repair(task, artifact, report)
    10. return failure(artifact, report, budget)

    The key to this process is that the verifier returns structured errors, the agent repairs based on them, and scoring only recognizes artifacts that pass the verifier. For tasks requiring multiple attempts, record the artifact summary and error type of each attempt so that later analysis can distinguish “insufficient capability” from “insufficient budget.”

    5. Engineering Architecture: Task Isolation, Artifact Archiving, and Reproducible Pipelines

    To engineer the above process, a reproducible evaluation pipeline is needed. The following modules are recommended:

    • Task repository: Stores task statements, constraints, verifier versions, reference answers or reference constructions, allowed assumptions, and scoring rules. Task versions should be immutable to prevent tasks from being modified during evaluation.
    • Isolated sandbox: Each agent runs in an independent environment with restricted network, file system, and resource usage to prevent task leakage, external queries, and interference between agents.
    • Verifier service: Provides a unified checking interface and returns pass/fail, error location, error type, and checking time. The verifier should be deployed independently and should not expose internal rules to agents.
    • Artifact archive: Saves agent-submitted constructions, proofs, parameters, logs, and verification reports, with retrieval by task, agent, and attempt round.
    • Logging and monitoring: Collects runtime logs, resource metrics, failure-cause distributions, and retry counts for anomaly detection and budget optimization.
    • Reproduction entry point: Given a task version, agent version, random seed, and budget, replays the complete evaluation process.

    For deployment, general-purpose container platforms can host isolated sandboxes, object storage can archive artifacts, and logging and monitoring capabilities can collect runtime metrics. For example, general-purpose containers, object storage, and logging and monitoring capabilities offered by cloud platforms such as Baidu AI Cloud can serve as cloud hosting options for an evaluation pipeline. Selection should focus on isolation, reproducibility, and cost control rather than on a specific interface.

    6. Case Abstraction: Why Verifiable Artifacts Matter

    Representative results from public research can be abstracted into three categories. The first is construction tasks: an agent needs to produce a graph satisfying constraints such as girth, edge count, and forbidden substructures. The verifier does not care how the agent searches; it only checks whether vertices and edges are valid, whether the graph contains no triangles or quadrilaterals, and whether the edge count reaches the target. In such tasks, an agent may construct an object exceeding the reference value, and the key to success is that the artifact can be checked item by item.

    The second is upper-bound tightening tasks: an agent needs to prove that an upper bound for a class of combinatorial design problems is further reduced from a published value. The value of such a task is not a narrative that “looks tighter,” but whether the proof can be independently checked. An upper-bound tightening is established only when proof steps, lemma citations, and boundary conditions can all be reviewed.

    The third is reliability tasks, such as alphabet reliability checks in probabilistically checkable proof tasks. Such tasks may not pursue large-scale constructions but require the agent to stably satisfy strict constraints across multiple attempts. In public evaluation, a lower-ranked agent once completed such a task in all three attempts, while a higher total-score agent did not solve it. This reminds us that verifiable evaluation should report task-level results and avoid letting a total score hide specific capability gaps.

    7. Practical Recommendations and Challenges

    When implementing a verifiable evaluation system, the following principles are recommended:

    1. Verifier first: First ensure that the verifier is correct, reproducible, and able to locate errors; then expand task scale.
    2. Task isolation and leakage prevention: Agents should not access reference answers, verifier source code, or other agents’ artifacts. Task versions should be frozen.
    3. Transparent budgets: Specify attempt counts, per-attempt timeouts, resource limits, and retry rules. Report success rates together with budgets.
    4. Layered metrics: Report the full leaderboard, the no-intermediate-lemma subset, the reliability subset, and coverage separately.
    5. Failure classification: Classify failures into format errors, unsatisfied constraints, proof-check failures, budget exhaustion, and other categories for improvement.
    6. Human spot checks: Retain human review for tasks with insufficient verifier coverage, but do not let spot checks replace the primary score.
    7. Continuous regression: Verifiers and task sets should undergo regression testing like code to prevent rule drift.

    Major challenges include limited verifier coverage for complex proofs, difficulty balancing task difficulty and verification cost, possible attempts by agents to bypass checks through guessing or format probing, the high domain knowledge required for proof engineering, and the high resource cost of large-scale evaluation. The response is not to lower verification standards but to layer tasks: start with machine-checkable construction and parameter tasks, then gradually introduce semi-formal proofs and human spot checks, while using structured logs and reproduction entry points to keep results auditable.

    Overall, the evaluation of verifiable mathematical theorem proving agents should shift from “whether the answer looks right” to “whether the artifact can be independently reviewed.” A good system should have clear task boundaries, an independent verifier, transparent budget rules, fine-grained metrics, and a reproducible engineering pipeline. Only then can total scores, subset results, and specific cases become credible evidence of capability rather than a new black-box ranking.