HEE Documentation Source: docs/evaluation.md ↗

Evaluating a Model

Every HEE problem has a formal statement, and the formal statement is its verifier: a Lean answer must compile against Mathlib with the problem spliced in verbatim, and a Python answer must pass domain(x) and fail (or, for an existence claim, pass) check(x). Grading needs no judge model and no reference answer, so a model is graded the same way on problems nobody has solved and on problems with a known solution.

Every problem also has a git-verified opening time, so an evaluation can keep only problems that appeared after a model's training cutoff. This lowers the risk of contamination; it cannot rule it out, since a problem may restate older material.

1. Export a release

hee export --after 2026-06-01 --out ./release

Only reviewed problems (stage benchmark or dataset, see Scoring) whose formal statement was merged strictly after the cutoff are exported. Drafts, candidates awaiting review, classic problems, the historical archive and voided problems are not.

PathContents
benchmark/problems.jsonlAccepted problems that are still open. No answer is known.
dataset/problems.jsonlAccepted problems that have been solved.
dataset/answers.jsonlTheir outcome (proved, disproved or solved), closing time, solver and checked proof, solution or code. Kept apart from the problems; never show it to the model.
problems/<name>/The verifier of each problem: its README.md and problem.lean, problem.py, or task.py + baseline.py.
prompts.jsonlThe standard prompt for each problem (id, split, prompt).
manifest.jsonGit revision, cutoff, snapshot time, counts, the Lean and Mathlib versions of the checker, and the HEE canary string.

Each problem row has id, format (lean, python, or optimize), domain, claim, opened_at, tier (1–5, how long it has survived), points, statement, code, answer_files (the accepted answers and the outcome each establishes, e.g. {"proof.lean": "proved", "disproof.lean": "disproved"}), verifier, and lean_code for a Python problem with a Lean restatement.

2. Collect answers

Give the model the prompt from prompts.jsonl (or your own; see the protocol below) and write one line per attempt to a JSON Lines file:

{"id": "some-problem", "outcome": "proved", "lean": "import Mathlib\n\ntheorem HEE.some_problem.proof : HEE.some_problem := by\n  ..."}
{"id": "some-python-problem", "solution": {"rows": [[0, 1], [1, 0]]}}
{"id": "some-optimize-problem", "code": "import numpy as np\n\ndef solve(inp):\n    ..."}
{"id": "another-problem", "outcome": null}

A bare verdict ("true" or "false") is not an answer: only a proof, disproof, counterexample, witness, or target-beating solution.py that passes the verifier counts.

3. Grade

hee eval --release ./release --answers model.jsonl --lean --k 1,5 --model my-model

--lean compiles every Lean answer against Mathlib (--jobs in parallel, --timeout seconds each, default 600). It needs the Lean toolchain and the checker project lean/ of the same HEE revision, or the Docker image below. Without --lean, Lean answers that pass the static checks are marked unverified and the score is not official.

Each answer gets one verdict:

VerdictMeaning
validPasses the verifier.
invalidA well-formed answer the verifier rejects: a compile error, a forbidden construct, a disallowed axiom, a timeout, or an object that is not a counterexample or witness.
unverifiedA Lean answer that passes the static checks but was not compiled (no --lean).
malformedNot a usable answer for this problem, e.g. a JSON solution to a Lean-only problem.
abstained{"outcome": null}.
unknownThe id is not in the release.

The results go to <answers>-results/ (or --out): results.jsonl with one graded row per attempt, and summary.json:

To check a single answer against one problem, in a release or in a clone of the repository:

hee verify release/problems/some-problem proof.lean --lean
hee verify release/problems/some-python-problem x.json

hee verify prints the verdict and exits with 0 only when the answer is valid. (hee check is the stricter command for pull requests: it also requires the solver header of a closing file.)

Docker

The image ghcr.io/halley-lab/hee contains HEE, the pinned Lean toolchain and a prebuilt Mathlib, so Lean answers can be compiled without installing anything. latest follows main; each build is also tagged sha-<commit>. If the image's Lean or Mathlib differs from the release's, summary.json marks the score as not official.

docker run --rm -v "$PWD:/work" -w /work ghcr.io/halley-lab/hee:latest \
  eval --release release --answers model.jsonl --lean --jobs 4

Or build it from a clone: docker build -t hee .. Compiling a Lean answer imports Mathlib, which takes a few GB of memory per parallel job.

Protocol

Scores are comparable only under the same conditions. Report them with:

  1. The release: HEE revision, cutoff (--after) and snapshot time (as_of), all in summary.json. Use a cutoff no earlier than the model's training cutoff.
  2. Attempts: k, and how pass@k was computed (hee eval reports the unbiased estimator from n ≥ k attempts).
  3. Budget: tokens or time per problem, and the number of tool calls.
  4. Feedback: whether the model could run Lean, Python or hee verify while answering, and how many times. Single-shot answers and agentic answers with compiler feedback are different settings; label them.
  5. No retrieval of answers: the model must not see dataset/answers.jsonl, the closing files in the HEE repository or its website. An agent with internet access must have github.com/Halley-Lab/hee and halley-lab.github.io/hee blocked.
  6. The prompt: the standard prompt from prompts.jsonl, or the exact prompt used.

Limitations