amphora's picture
v2: add 216 optimize tasks / 77 families (Tao constants, AlphaEvolve, Leaps in Bounds, FrontierShift, FrontierCO MDS, ALE-Bench, FrontierCS, EdgeBench)
ac7c4a9 verified
|
Raw History Blame Contribute Delete
14.8 kB
metadata
license: other
license_name: mixed
license_link: LICENSE.md
configs:
  - config_name: construct
    data_files: data/construct.parquet
  - config_name: optimize
    data_files: data/optimize.parquet
tags:
  - math
  - reinforcement-learning
  - rl-environment
  - verifiable-rewards
  - harbor
size_categories:
  - 1K<n<10K

MathConstructOptimize-Envs

3,793 RL tasks in 219 families where the model must construct a mathematical object, graded by a deterministic checker. There is no answer matching and no LLM judge in the reward path.

Most math RL data asks for a final number. Here the model has to produce the object itself: a colouring, a design, a counterexample, a point configuration, a polynomial. The checker accepts any valid object, not a stored answer. The collection has two subsets:

subset what the model does reward families tasks
construct produce any object satisfying stated conditions (a witness) 1 if valid, else 0 80 3,464
optimize produce a valid object with the best objective it can (extremal constructions, bound improvement) 0 if invalid; otherwise 0.1 + 0.9 × progress from a trivial baseline to the best known value 139 329

The runnable sandboxed version (one Harbor task directory per row) is in amphora/MathConstructOptimize-Envs-harbor.

Sources

Tasks are converted from existing generator suites and research-problem repositories. Each checker was re-implemented and hardened; see the list of upstream verifier bugs below.

source subset tier families tasks
RLVE-Gym construct competition 30 1,800
MathConstraint construct competition 33 875
NPPC construct competition 8 480
Reasoning Gym construct competition 3 180
AlphaEvolve repository of problems construct + optimize research (mostly) 34 203
EinsteinArena optimize research 26 28
FunSearch optimize research 3 15
Finch / Evolution Fine-Tuning (erdos_* tasks) optimize research / competition 12 12
Optimization Constants in Mathematics (Tao, Davis, Ivanisvili) optimize research 13 17
Leaps in Bounds (D. Munro) optimize research 14 82
FrontierShift open problems (AItonomy Foundation) optimize research 8 9
FrontierCO (minimum dominating set only) optimize competition 1 15
ALE-Bench (AtCoder Heuristic Contest) optimize competition 18 36
FrontierCS (algorithmic track) optimize competition 14 37
EdgeBench (released task dirs) optimize competition 2 4

Construct generators have 4–6 difficulty levels × 10 seeds. Optimize tasks are single research problems or contest instances, some at several sizes n. Sources added in v2 (2026-11-18) are described in the v2 section below. families.csv lists every family with its source, license, domain, problem_key and tags.

Row schema

column meaning
task_id unique id
subset, family, problem_key task contract, generator family, canonical math problem id (for cross-source dedupe)
domain, tier, level math area, competition or research, difficulty level
source, license upstream task and its license
tags see below
prompt full, self-contained task statement including the required JSON answer schema
instance JSON string with the instance data the checker needs
direction, baseline, best_known optimize only: objective direction, trivial-baseline score, best known score
reference_answer, reference_reward a known valid answer (planted witness or published construction) and its reward; for SFT/debugging, not needed for grading

Grading

from datasets import load_dataset
from huggingface_hub import snapshot_download
import sys, json

repo = snapshot_download("amphora/MathConstructOptimize-Envs", repo_type="dataset", allow_patterns=["grade.py", "graders/*"])
sys.path.insert(0, repo)
from grade import grade

ds = load_dataset("amphora/MathConstructOptimize-Envs", "construct", split="train")
row = ds[0]
reward, details = grade(row, json.loads(row["reference_answer"]))   # -> 1.0, {"valid": True}

Graders need Python ≥ 3.10 with numpy, scipy, sympy and networkx. Every check runs in under 60 s. Feasibility checks use exact integer or rational arithmetic wherever the problem allows.

The optimize reward is 0 for an invalid answer, else 0.1 + 0.9 · clip(progress, 0, 1). Progress is linear between baseline (a deliberately weak valid construction) and best_known. The kissing-number tasks use a log scale of the overlap loss instead. The 0.1 floor for validity keeps GRPO groups from being all-zero, because without it research-level tasks gave no signal in our pilot.

Tags

tag meaning
agentic_trivial a solver (CP-SAT, z3, brute force) cracks the top level within seconds, so the task is useful single-turn but weak for sandboxed agents (2,368 tasks)
np_search the task is essentially combinatorial search
best_known_uncertain best_known comes from our own search or an uncited value
ea_under_review EinsteinArena marks the problem as under review. We audited each one and included it only when we could make the check sound
unique_answer the answer is unique, but it is still verified as a witness (e.g. by expanding a factorization)
float_objective, exact_integer, exact_rational, ... how the objective is computed
reference_is_baseline / reference_below_record the shipped reference_answer is the weak baseline (reward 0.1) or a valid construction weaker than best_known
known_optimum best_known is a proved optimum, so the reward cannot exceed 1 by improving it
record_memorizable the record object is famous; an agent that recalls it saturates the reward
license_restricted source license restricts derivatives (ALE-Bench, CC BY-ND 4.0)
license_unknown the source states no license (FrontierShift)

Reference pass rates (pilot, 66 tasks)

Pilot with 8 single-turn samples and 4 agentic attempts per task (Harbor terminus-2, no network):

model / mode trivial (≥0.9) trainable too hard (≤0.1)
gpt-oss-120b, single-turn 23 23 20
gpt-oss-120b, agentic 33 19 13
Qwen3-8B, single-turn 13 15 38
Qwen3-8B, agentic 8 10 47

Pass rates vary a lot by model and mode, so filter for your policy. Difficulty levels are monotone within every generator family.

Upstream verifier bugs found and fixed

Re-implementing the checkers surfaced problems in the source verifiers that an RL policy could exploit:

  • Model output executed as code. RLVE integral (sympify) and Reasoning Gym integration (parse_expr) evaluate the model's answer as Python, and they also accept an unevaluated Integral(f, x). Our checkers parse through a whitelist syntax tree.
  • Empty answers accepted. MathConstraint verify() lets the solver fill in any variable the answer omits, so {} passes.
  • Missing range, length or type checks.
    • NPPC 3-colouring accepts an all-distinct colouring.
    • Clique and independent set accept a vertex repeated k times.
    • Quadratic congruence accepts x = 0.
    • Several verifiers accept floats or bools.
  • Floating-point feasibility checks.
    • EinsteinArena circle packing and circles-in-rectangle (the AlphaEvolve seed overlaps by about 1e-16).
    • Heilbronn triangle containment (uses a rounded √3).
    • Finch tolerances that allowed beating the proven 10/3 bound.
    • AlphaEvolve p58 (Erdős–Szekeres): the published 33- and 65-point sets reported as having no convex 7- or 8-gon do contain one under exact arithmetic.
  • Checks that are wrong or too weak.
    • AlphaEvolve spherical designs: the pass test compares a negated error, so it always passes.
    • AlphaEvolve 3D Kakeya ignores tubes that leave its Monte Carlo box.
    • Arithmetic Kakeya "repairs" the submitted distribution before scoring it.
    • The prime-number-theorem constraint was checked on random samples.
    • The uncertainty-principle root scan could miss roots.
  • Wrong or unreachable targets. Several Finch targets are above a provable maximum, below a known optimum, or infeasible.

Excluded

  • AlphaEvolve problem 6: the notebook's functional differs from the one a construction-checker can certify.
  • Problems with no checkable objective (proof-only or meta problems), or no recoverable construction or verifier.
  • FunSearch corner-free sets (checker not released).
  • Sources without a license (v1). v2 includes FrontierShift, which states no license, tagged license_unknown.
  • Duplicate problem and size pairs across sources (deduplicated by problem_key).

v2 (2026-11-18): optimize extension

216 new optimize tasks in 77 families (the construct subset is unchanged; the previous version is git tag pre-v2). Same reward contract and graders interface; every reference answer was re-graded in an isolated copy of the task's tests/ dir, through grade.py, and by the Harbor oracle agent in the sandbox image; a no-op answer scores 0 everywhere. All checks run in under 10 s.

source families tasks license notes
Optimization Constants in Mathematics 13 17 Apache-2.0 one family per constant where a finite object certifies a bound (Lehmer/Mahler measure, degree vs sensitivity, Komlós discrepancy, matrix-multiplication exponent from exact small-format algorithms, biplanar chromatic number, Bohnenblust–Hille, Berry–Esseen, Brezis–Gallouet–Wainger, sunflower-free families, Fourier entropy–influence, hollow lattice width, narrowest admissible tuples, covering systems)
AlphaEvolve repository (new problems/sizes) 7 16 CC-BY-4.0 2D Nikodym over F_{p²}, Hausdorff–Young, Thomson n=292/306, hexagons in a hexagon, Erdős discrepancy C=3, Szemerédi–Trotter incidences, Rudin L4/L2 spherical harmonics
Leaps in Bounds 14 82 MIT cages, degree–diameter, superpermutations, snake/coil-in-the-box, Golomb rulers, no-three-in-line, sorting-network size/depth, equal circles in a square/triangle, isosceles sets, unit squares in a square, disk covering
FrontierShift 8 9 unknown matrix-multiplication rank 3×3/4×4 over Q, max-determinant ±1 23×23, Boolean nonlinearity n=9, low-weight codeword (decoding challenge n=1280), abc quality, Cramér–Shanks–Granville gap ratio, rational Diophantine septuples, tetrahedra packing density
FrontierCO 1 15 MIT minimum dominating set only (the other 7 types overlap CO-Bench)
ALE-Bench 18 36 CC BY-ND 4.0 non-interactive AtCoder Heuristic Contest problems, 2 public-seed instances each; statements kept verbatim; scorers re-implemented in Python and matched against the official tools on ~7,700 outputs
FrontierCS 14 37 MIT algorithmic-track problems with deterministic scorers (Max-Cut, Max-3-SAT, Zarankiewicz grids, XOR-Sidon sets, ...); each port matched the upstream checker on ≥100 outputs
EdgeBench 2 4 CC-BY-4.0 the two released task directories that run offline (AHC056, AHC058)

License caveats. ALE-Bench is CC BY-ND 4.0 (no derivatives): its statements are reproduced verbatim and its tasks carry license_restricted; check that your use is compatible before redistributing modified versions. FrontierShift states no license (its repository is not public); those tasks carry license_unknown. AtCoder problem statements (ALE-Bench, EdgeBench) remain © AtCoder.

best_known provenance. Values are the published records where available (cited in tests/instance.json → best_known_source, hidden from the agent). For contest instances and several FrontierCS/ALE problems no per-instance record is published, so best_known is our own best solution (tag best_known_uncertain); agents can beat it and the reward clips at 1.

Excluded in v2. Anything overlapping the problem families of HorizonMath, HeuriGym or CO-Bench is left out at every size (e.g. Ramsey/Schur/van der Waerden colourings, kissing numbers, Tammes, spherical designs, difference bases, merit factor, codes and covering designs, Hadamard matrices, sphere packing, TSP/routing, scheduling, bin/rectangle/circle-unequal packing, facility location, set cover, graph colouring, MIS). Also skipped: constants whose certificate is a proof rather than an object, interactive or program-output problems, problems needing a GPU/network/hardware, and problems whose verifier could not be made sound and fast.

Upstream verifier bugs found in v2 sources (all fixed in our checkers):

  • AlphaEvolve p6 scores a different functional than stated; p13 never checks f̂ ≥ 0; p14 truncates the Fourier integral; p33 clamps coincident points to distance 1e-12; the hexagon-packing outer side is taken as input, not computed; p40 scores the longest valid prefix plus a bonus; p55's sample layout overlaps; p56 silently drops duplicate lines; p57 drops coefficients below 1e-8.
  • EdgeBench AHC058: the eval script reads any Score = … line, so a submission can forge the score.
  • FrontierCS 58/8 compare counts only modulo primes; 192/176 ignore trailing tokens; 227 has no range check; 111 and 27 accept empty answers; 193 is a re-encoding of 192.
  • FrontierCO MDS accepts 3.0/True as node ids.
  • ALE-Bench tools: ahc014 turn count wrong, ahc004 panics on Unicode whitespace, ahc024/041 accept an empty output at turn 0.

License

Each row carries the license of its source (license column): MIT (93 families), CC-BY-4.0 (68), Apache-2.0 (32), CC-BY-ND-4.0 (18, ALE-Bench), unknown (8, FrontierShift). Attribution belongs to the original authors of each source listed above. Our packaging, checkers and generators are released under the same terms as the corresponding source.