Benchmarking and the Composite Score#
This chapter explains how we measure the quality of Panobbgo — what number we track, what it means, how to compute it, and how to decide whether a change is an improvement.
Why a single number?#
Black-box optimization has no shortage of metrics: success rate, ERT (Expected Running Time), best distance to optimum, area under the convergence curve, wall-clock time. Each captures a facet, none captures the whole.
For iterative, agent-driven self-improvement we need one scalar that:
Lives in a bounded, comparable range (
[0, 1]).Is monotonic in “doing better” — no artificial ceilings.
Penalises both failing to solve and solving slowly.
Is cheap enough to compute that it can gate every code change.
The BenchmarkHarness exposes exactly this number as
HarnessResult.composite_score.
Definition#
For each optimization run we track a convergence trace — the sequence of
evaluation indices at which the best-so-far value improved. From the trace we
extract the first-hit evaluation \(k^\star\), defined as the first
index whose func_distance = |f_best − f_opt| is within the tolerance.
Per-run “solve fraction”:
where \(B\) is the evaluation budget. This is in \((0, 1]\) for
successful runs: 1 means “solved on the first evaluation”,
\(1/B\) means “solved on the very last evaluation”. Failure always scores
0, so even a last-evaluation success is strictly better than no success.
Per (problem, strategy) pair we average \(s\) across repetitions.
The final composite_score is the unweighted mean over all pairs.
See panobbgo.harness.ProblemStrategyResult.compute_metrics() for the
exact implementation.
Interpretation#
Score |
Meaning |
|---|---|
|
Theoretical ceiling — every run solves at evaluation 1. |
|
Strong. Strategies consistently locate the optimum with budget left over. |
|
Mixed. Typical of hard multimodal problems or under-powered strategies. |
|
Weak. Usually succeeds only near the budget limit, or rarely succeeds. |
|
Never found any optimum within tolerance on any problem. |
Also reported#
Alongside composite_score each pair exposes:
success_rate— fraction of reps hitting tolerance.ert— Expected Running Time in evaluations, the BBOB/COCO standard.infwhen no rep succeeded.best_func_distance/median_func_distance— absolute gap to optimum.
Together these let you diagnose why the composite score moved, not just that it moved.
Running benchmarks#
The CLI lives at the repository root. Always prefix with uv run so the
correct environment is used.
# Quick — ~30 seconds, 3 problems × 2 strategies × 3 reps, 75 evals each.
uv run python benchmark_harness.py run --quick --output before.json
# Make changes to panobbgo ...
uv run python benchmark_harness.py run --quick --output after.json
uv run python benchmark_harness.py compare before.json after.json
Three preset modes trade cost against statistical power:
Mode |
Problems |
Strategies |
Reps |
Budget |
Typical wall-clock |
|---|---|---|---|---|---|
|
3 |
2 |
3 |
75 |
~30 s |
|
7 |
8 |
5 |
200 |
few minutes |
|
10 |
12 |
10 |
500 |
~1 hour |
Reproducibility#
Seeds are deterministic: each (problem, strategy, rep) triple derives its
seed via SHA-256 from a base seed (default 42). Re-running with the same
base seed produces byte-identical convergence traces under the default
sync_eval. See panobbgo.harness.BenchmarkHarness._derive_seed().
The compare workflow#
compare before.json after.json reports:
Composite-score delta and relative percent change.
Per-pair improved / degraded / unchanged classification, gated by
--eps(default0.01).Pairs that exist in only one file (e.g. you added a new strategy).
With
--fail-on-regression, the process exits2when the candidate scores worse. Useful for CI gating and automated accept/revert loops.
Statistical acceptance rule#
The naive |Δ| > eps gate is fast but fragile — at quick-mode sample sizes
a single lucky/unlucky run can flip it. For rigorous gating, add the --statistical flag:
uv run python benchmark_harness.py compare before.json after.json \
--statistical --fail-on-regression
The statistical rule follows planning/done/SELF_IMPROVEMENT_LOOP.md §6.2.
For every (problem, strategy) pair present on both sides the per-run
solve fractions — the same quantity averaged into the composite score —
are bootstrap-resampled to produce a confidence interval on the mean
difference. A single bootstrap index yields one composite delta (the mean
of per-pair deltas), and the percentile interval over n_boot such
indices is the composite CI.
The decision is accept iff all of:
Δ > eps_accept— moved in the right direction beyond noise.CI_low > 0— the improvement is statistically distinguishable from zero at the chosen confidence level.min_i Δ_i > −eps_regress— no individual pair crashes, even if the composite improved overall.
When --fail-on-regression is combined with --statistical the exit
code is 2 whenever the rule rejects (composite was noisy, regressed, or
a pair blew up). Every knob has a flag:
Flag |
Default |
Meaning |
|---|---|---|
|
|
Minimum composite delta required. |
|
|
Maximum tolerated per-pair regression. |
|
|
Bootstrap resamples for the CI. Fewer = faster, noisier CIs. |
|
|
Confidence level. |
|
|
RNG seed for reproducible bootstraps. |
|
auto |
Force the paired (rep-aligned) or independent bootstrap scheme; see Paired vs unpaired bootstrap below. |
Paired vs unpaired bootstrap#
Under --randomize the harness keeps reps instance-aligned by index
— rep i on the before side and rep i on the after side
are evaluated on the same sampled problem instance (the SHA-256 stream
is keyed on (base_seed, randomize_iteration, family, rep)). The
per-rep deltas are therefore strongly correlated, and the statistically
efficient sampler is the paired bootstrap — draw one shared resample
index and apply it to both sides, equivalent to bootstrapping the per-rep
delta vector a_frac − b_frac.
The historical default of an unpaired sampler (independent resamples on each side) discards the within-rep correlation and inflates the CI by roughly the within-side variance, often leaving a genuine improvement indistinguishable from noise:
# Strongly correlated reps: every rep solves 5 evals earlier on the
# same instance. The paired sampler accepts; the unpaired one does
# not.
paired: Δ=+0.0500 CI=[+0.0500, +0.0500] width=0.0000 → ACCEPT
unpaired: Δ=+0.0500 CI=[−0.2100, +0.3300] width=0.5400 → REJECT
The --paired and --unpaired flags toggle the scheme explicitly:
# Paired — recommended for any --randomize run or any other
# comparison where reps are instance-aligned by index.
uv run python benchmark_harness.py compare before.json after.json \
--statistical --paired
# Unpaired — required when reps are NOT instance-aligned (e.g. when
# comparing two ledgers built with different base_seed values).
uv run python benchmark_harness.py compare before.json after.json \
--statistical --unpaired
Without either flag the rule auto-selects: paired when at least one
shared pair has n_before == n_after, falling back to unpaired
otherwise. The auto-detect default is the right choice for the
randomized harness and a safe no-op for the asymmetric-rep edge cases
the unpaired scheme was originally written to handle.
The chosen scheme is reported on the
StatisticalDecision:
decision.paired is True if the paired sampler fired on at least
one pair, False otherwise. print_summary() and the
--json payload include the field.
With --json --statistical the emitted payload carries a
statistical block with the composite verdict, the overall CI, the worst
regressing pair, and per-pair CIs — everything an agent needs to drill
into a rejection:
{
"statistical": {
"accept": false,
"delta": -0.0002,
"ci_low": -0.0534,
"ci_high": 0.0527,
"worst_pair_regression": -0.34,
"worst_pair": ["Rastrigin_2D", "UCB_Diverse"],
"reasons": [
"lower CI bound -0.0534 ≤ 0 — improvement not statistically distinguishable from noise"
],
"per_pair": [ ... ]
}
}
The programmatic API is
panobbgo.harness.statistical_accept(). The result is a
StatisticalDecision with the same fields as the
JSON payload, plus a print_summary() method for human-readable output.
Stability note: the composite-score formula remains a stable contract. The statistical rule is a gate on top of that formula — adding it does not change the underlying number.
When to run which mode#
During development —
--quickafter each meaningful change. Fast enough to keep you honest without hurting flow.Before opening a PR — a quick paired multi-seed comparison is enough evidence for an improvement; bug fixes need none.
--standardand--fullare for re-baselining and deliberate studies, not a merge gate (the project’s rules:doc/dev/benchmarking.md).
Pitfalls and statistical caveats#
The composite score is noisy. Three symptoms to watch for:
Few reps —
--quickuses only 3 reps per pair. A delta of±0.02is firmly within noise. Treat quick-mode comparisons as trend signals, not proof.Lucky seeds — if a regression vanishes when you change the base seed (
--seed), the effect was seed-specific, not a real improvement.Problem-specific over-fitting — improving on a fixed problem set does not imply generalisation. This is the central motivation for the parametrically randomised battery described below.
Thread scheduling — every harness entry point (
benchmark_harness.py run,scripts/ioh_benchmark.py run,run_ioh_harness,HarnessConfig) evaluates synchronously by default (sync_eval, since 2026-09-25), so a seeded run is bit-reproducible. The reason is reproducibility, not speed.--no-sync-evalopts into the threaded evaluator, whose trajectory depends on thread scheduling. Both sides of a comparison must use the same mode (comparewarns if not); result files written before 2026-09-25 were measured asynchronously and load withsync_eval = False. The library itself (Config.sync_evaluation,evaluation.sync) still defaults to the asynchronous evaluator, which keeps workers busy for real expensive objectives.
Recommended practice: run the same comparison at two different base seeds
before accepting a +0.01 to +0.03 delta.
Parametrically randomised problems#
The fixed registry (_make_quick_problems etc. in
panobbgo/harness.py) is great for A/B reproducibility but vulnerable to
over-fitting: an agent that tunes a heuristic to the specific Rosenbrock
valley at (1, 1) may regress on the next problem it encounters. The
harness therefore ships a parametric problem layer that samples fresh transformed instances per
repetition, turning composite_score into a Monte-Carlo estimate of
expected performance on a problem family.
Usage#
Add --randomize to run or list:
uv run python benchmark_harness.py list --randomize
uv run python benchmark_harness.py run --randomize --output rand_before.json
# Make changes ...
uv run python benchmark_harness.py run --randomize --output rand_after.json
uv run python benchmark_harness.py compare rand_before.json rand_after.json --statistical
The --randomize-iteration flag (default 0) mixes an iteration
index into the instance seed. Within one iteration, before and
after runs see identical sampled instances (apples-to-apples);
across iterations the instances intentionally differ, so repeatedly
“winning” the same iteration is not enough — only sustained wins across
many iterations are real improvements.
What gets randomised#
For each ProblemFamily, the sampler
composes four transforms (filtered by per-family capability flags):
Transform |
Parameter |
Rationale |
|---|---|---|
Translation |
\(x^\star \sim U(\text{interior box})\) |
Kills hard-coded-centre exploitation; optimum lives away from edges. |
Rotation |
Haar-random \(Q \in O(d)\) |
Breaks axis-aligned local-search advantage on separable functions. |
Scaling |
Diagonal \(\Lambda\), \(\log_{10}\kappa \sim U[0, c_{\max}]\) |
Stresses second-order / ill-conditioning heuristics. |
Noise |
\(\tilde f(x) = f(x) + \sigma \varepsilon\) |
Matches the noisy-black-box use case. |
The composite transform is
and by construction \(\tilde f(x^\star) = f_{\text{opt}}\) so
known_optima for the transformed problem is {"x": x*, "fx": f_opt}
— the existing func_distance / ert / composite_score logic
works unchanged.
Default families#
panobbgo.harness_randomized.make_default_families() returns four
families covering the main optimisation challenges:
Rastrigin_family— separable, highly multimodal (translate + rotate + scale).Ackley_family— non-separable, multimodal with a funnel (translate + rotate + scale).Rosenbrock_family— non-separable, banana valley (translate + scale).DeJong_family— smooth convex sphere (all transforms; the baseline sanity case).
Schwefel and Griewank are intentionally excluded from the default set —
Schwefel’s optimum sits near the box boundary and Griewank’s oscillation
couples tightly to the coordinate axes, so rotation pushes y off the
function’s sensible domain.
Every default family ships dim_choices=(2,) — the whole default
battery is measured at dimension 2. This keeps the composite score a
stable contract (historical comparisons depend on it), but it also
means any optimizer improvement whose benefit only appears at higher
dimensions is invisible to the composite metric.
Opt-in extended (higher-dimensional) battery#
To probe a regime the frozen 2-D default battery cannot reach without
changing the composite contract, append extra families via the
--extra-highdim flag (run and list) or the
panobbgo.harness.HarnessConfig.extra_families field. The default
families are left untouched, so a plain --randomize run stays
byte-identical; the extra families only appear when explicitly opted in.
panobbgo.harness_randomized.make_highdim_families() currently
returns one family:
Rosenbrock_HighDim_family— a rotated Rosenbrock atdim_choices=(2, 5)with stratified dims. Unlike the defaultRosenbrock_family(translate + scale only, so its 2-D instances stay axis-aligned), it enables therotatetransform so the curved valley couples coordinates — the regime where curvature-aware local models pay off.
uv run python benchmark_harness.py list --randomize --extra-highdim
Success on a rotated, ill-conditioned 5-D valley at quick-mode budgets is
rare, so a composite_score A/B on this family can floor near zero.
Prefer the anytime AOCC metric (scripts/ioh_benchmark.py) for a
responsive signal; its battery is defined by panobbgo.harness_ioh,
not by randomized families.
Stratified dimension sampling#
When a ProblemFamily declares
dim_choices = (2, 5, 10), naive random selection would produce a
different mix of dimensions on each run — and since higher-dim
instances are systematically harder, that mix-noise contaminates the
deltas the bootstrap CI in panobbgo.harness.statistical_accept()
operates on.
The default stratify_dims=True flag eliminates that noise source by
construction.
stratified_dim_for_rep()
assigns the dim cyclically by repetition index so any contiguous
block of len(dim_choices) reps covers every declared dim exactly
once:
from panobbgo.harness_randomized import ProblemFamily
from panobbgo.lib.classic import DeJong
fam = ProblemFamily(name="dejong3", base_class=DeJong,
dim_choices=(2, 5, 10)) # stratify_dims=True
[fam.stratified_dim_for_rep(rep) for rep in range(7)]
# → [2, 5, 10, 2, 5, 10, 2]
When the family’s dim-choice tuple has only one element (the default
battery), stratification is a no-op and the per-rep dim is constant.
For backwards compatibility with older ledgers, set
stratify_dims=False to recover the legacy uniform-draw behaviour.
The result of a stratified sample is reflected in
RandomizedProblemSpec.last_sampled_params() via a
stratified_dim: bool field, useful for ledger introspection.
Reproducibility#
All randomness flows from a single 32-bit seed derived via SHA-256 from
(base_seed, iteration_id, family_name, rep) — the same scheme the
harness already uses for strategy seeds. A regression flagged by the loop
is deterministically reproducible from the printed tuple:
from panobbgo.harness_randomized import (
make_default_families, RandomizedProblemSpec
)
fams = make_default_families()
spec = RandomizedProblemSpec(
fams[0], iteration_id=5, base_seed=42, max_evaluations=200
)
prob = spec.create_problem_for_rep(3)
params = spec.last_sampled_params() # dim, translation, rotation_trace, ...
Design details: planning/done/SELF_IMPROVEMENT_LOOP.md §4. Implementation:
panobbgo.harness_randomized. Tests:
tests/test_harness_randomized.py.
Absolute baselines#
The harness runs Panobbgo strategies vs. Panobbgo strategies by default.
To judge Panobbgo in absolute terms, the
panobbgo.harness_baselines module plugs three external reference
solvers into the same StrategySpec interface:
Baseline_Random— uniform random search (the floor: any serious optimizer should beat it most of the time).Baseline_SciPyDE—scipy.optimize.differential_evolution.Baseline_SciPyAnneal—scipy.optimize.dual_annealing.
Enable them with the --baselines flag on run or list:
uv run python benchmark_harness.py list --standard --baselines
uv run python benchmark_harness.py run --standard --baselines --output standard_with_refs.json
uv run python benchmark_harness.py score standard_with_refs.json
They appear in the results table alongside Panobbgo strategies — the
composite score still averages over every (problem, strategy) pair,
so a fair comparison should either include baselines on both sides of
a compare call or exclude them from both.
Design#
Baselines are thin adapters that implement the subset of the strategy
surface the harness actually uses (.config.max_eval, .start(),
.best, .results.results). They do not subclass
StrategyBase — spinning up the event bus and Dask
machinery for a single-shot external solver would be pure overhead.
The shared objective wrapper enforces a hard evaluation budget: it
raises _BudgetExhausted once
max_eval evaluations are recorded, giving baselines the same budget
contract as Panobbgo strategies. Convergence traces are extracted from
the wrapper’s log, and the results DataFrame carries the same MultiIndex
columns (("fx", 0), ("who", 0), …) the harness expects.
External libraries: pycma, Nevergrad, Optuna#
A second set of baselines wraps established optimization libraries. They
need the optional baselines extra (uv sync --extra baselines) and
are opt-in by name: --baselines alone still runs only the three
above, and an external baseline joins when --strategies names it.
Baseline_pycma_IPOP,Baseline_pycma_BIPOP— pycma’s CMA-ES with IPOP / BIPOP restarts (cma.fmin2’s restart schedule over ask/tell, in the unit cube mapped onto the box, a uniform random start per run).Baseline_NGOpt— Nevergrad’sNGOpt, a hand-ruled selector over a portfolio (it picks its sub-optimizer from dimension, budget and the number of parallel workers), plusBaseline_NG_CMAandBaseline_NG_TwoPointsDEas cross-checks.Baseline_Optuna_CmaEs,Baseline_Optuna_TPE— Optuna’sCmaEsSamplerandTPESampler, default settings. The CMA-ES sampler runs without restarts (restart_strategyis deprecated since Optuna 4.4; the restart variants are the pycma baselines). Optuna’s per-trial cost grows with the trial count, so wall time is roughly quadratic in the budget (TPE: ~21 s for 2000 evaluations at dim 10).benchmark_harness.py’s default per-run timeout of 120 s would cut such runs short: measure them with--no-timeout(ioh_benchmark.pyhas no default timeout).
Conventions shared by all of them:
Start point — every run starts from a point drawn uniformly from the box with the run seed (pycma and Optuna CMA-ES
x0, Nevergrad’s parametrizationinit), never the box centre, where several classic test functions have their optimum.Failed values — a NaN (failed or timed-out evaluation) is the worst value and is told as
+inf; Optuna records it as a COMPLETE trial, so TPE learns the region is bad.±inffrom the objective passes through unchanged.Determinism — a fixed seed reproduces a run exactly. numpy’s global RNG is seeded from the run seed for the run and restored afterwards; pycma samples from the adapter’s own generator; the
cma.fmincalls Nevergrad makes in a background thread (NGOpt’sMetaModel(CmaFmin2)) get their own generator too.Fail fast — naming an external baseline without the extra installed is an
ImportErrorbefore any run, and naming any baseline without--baselinesis an error with that hint.benchmark_harness.py list --baselinesshows the external names marked[opt-in].
uv sync --extra dev --extra baselines
uv run python scripts/ioh_benchmark.py run --standard --baselines \
--strategies RoundRobin_CMAES Baseline_NGOpt Baseline_pycma_BIPOP
These adapters are batch-capable: each wraps its library in an
AskTellAdapter (ask(n) returns up
to n keyed candidates, tell(key, fx) reports one result in any
order). The harness drives it with batch size q =
config.batch_size (default 1; set it with
StrategySpec(config_overrides={"batch_size": q})): ask q points,
evaluate them in dispatch order, tell them. A CMA-ES adapter hands out at
most the rest of its current generation, so a batch can be smaller than
q; pycma therefore raises its base population to at least q so that
one generation fills the workers. Nevergrad receives q as
num_workers, which changes the algorithm NGOpt picks.
The in-house CMA-ES reference remains the
CMAES heuristic (RoundRobin_CMAES);
the pycma baselines are the upstream round-trip against it.
See panobbgo/harness_baselines.py for the full interface and
tests/test_harness_baselines.py and
tests/test_harness_baselines_external.py for the guarantees.
Expensive-track baselines: BoTorch, TuRBO, SMAC3, Py-BOBYQA#
For expensive evaluations at small budgets (10…200·dim) with q
parallel workers the incumbents are Bayesian-optimisation and model-based
tools. They live in panobbgo.harness_baselines_bo, need the
separate baselines-bo extra (uv takes torch from the CPU-only wheel
index; torch alone is ~0.7 GB installed) and are opt-in by name like the
ones above. uv sync is exact, so name every extra you need in one
command. PyTorch publishes no wheels for Intel macOS, so the extra does
not install there.
These baselines are meant for small budgets: an exact GP at thousands of
points takes hours per run. --budget-multiplier N sets the budget of
any ioh_benchmark.py run battery (IOH and families) to N·dim
(the battery name gets a -bN suffix; the default budgets do not
change), e.g. 20·dim and 100·dim on the families (dims 2/5/10):
uv sync --extra dev --extra baselines --extra baselines-bo
uv run python scripts/ioh_benchmark.py run --families --budget-multiplier 20 \
--baselines --virtual-workers 4 \
--strategies Baseline_BoTorch_qLogEI Baseline_TuRBO1 Baseline_SMAC_BB Baseline_PyBOBYQA
Each uses its library’s recommended setup for small budgets:
Baseline_BoTorch_qLogEI— BoTorch batchqLogExpectedImprovementon aSingleTaskGPwith its defaults (RBF kernel with the dimension-scaled log-normal length-scale prior,Standardizeoutcome transform), inputs in the unit cube, refitted withfit_gpytorch_mllbefore every proposal. Initial design:max(5, 2·d)scrambled Sobol points (Ax’s rule); the model takes over oncemax(2, ceil(n_init/2))points are observed (Ax’s threshold), and free workers get more Sobol points until then (Ax would leave them idle).best_fis the best observed value, the MC sampler a 256-sampleSobolQMCNormalSampler;optimize_acqf(num_restarts=10, raw_samples=512, batch_limit=5, maxiter=200)as in the BoTorch tutorials.Baseline_TuRBO1— TuRBO-1 after the BoTorch tutorial: Matérn-5/2 ARD GP (length scales in [0.005, 4], noise in [1e-8, 1e-3]) on the standardised data of the current trust region, Thompson sampling overmin(5000, max(2000, 200·d))perturbed Sobol candidates, length 0.8 in [0.5⁷, 1.6], success tolerance 3 (Eriksson et al. 2019 and the reference code; the tutorial’s 10 lets the region practically never expand at these budgets), failure toleranceceil(max(4/q, d/q)).2·dSobol points start each trust region; when it collapses the run restarts with a fresh design and fresh data (the original TuRBO-1 restart).Baseline_SMAC_BB— SMAC3’sBlackBoxFacade(SMAC’s facade for low-dimensional continuous problems) withdeterministic=Trueand every other setting at the facade default: Sobol initial design ofmin(8·d, budget/4)points, GP with a Matérn-5/2 ARD kernel andnormalize_y, EI (xi=0), local-and-sorted random search.Baseline_PyBOBYQA— Py-BOBYQA (Powell’s BOBYQA), the local model-based reference, not a global optimiser:npt = 2n+1,scaling_within_bounds=True(rhobeg0.1 of the box),rhoend = 1e-8, no restarts inside the solver; when a run ends before the budget, a new one starts from a fresh uniform random point.
Batches and pending points. q goes to each tool’s native batch
mechanism. BoTorch optimises a joint q-batch and passes the asked but
untold points as X_pending, so asynchronous tells (the virtual clock)
are handled. TuRBO proposes synchronous batches of q; like pycma it
hands out nothing more until the whole batch is told. The initial design
grows to at least q points so that the first batch fills the workers.
The parallel-BO comparison therefore rests on qLogEI and TuRBO:
SMAC has no batch acquisition. It is asked once per free worker, as its Dask runner does, and keeps asked trials as running, but it has no pending-point or fantasy handling, so a batch can hold near-duplicates. Report SMAC at
q = 1as its representative result, or labelq > 1rows “SMAC native (no batch acquisition)”.Py-BOBYQA is sequential: it keeps at most one point in flight, so with
q > 1it uses one worker. Itsaoccequals theq = 1run; itsaocc_timeshows what a sequential solver achieves onqworkers.
Failed values. A GP cannot take +inf. BoTorch and TuRBO replace
every failed (NaN) or non-finite value by the worst finite value observed
so far, recomputed at every fit. SMAC stores costs, so a failure is told
as a CRASHED trial with the conservative worst + max(worst - best,
|worst|·1e-6, 1e-12) of the finite values known at tell time, which
ranks it strictly below every real point known then; a failure before any
finite value waits as a running trial until one exists. Py-BOBYQA gets the moderated extreme barrier of
Powell’s solvers in PRIMA / PDFO: NaN and +inf become 1e30 and
finite values are clipped there. Huge finite values reach every model
unchanged (only each library’s own standardisation applies).
Determinism. torch draws run in a torch.random.fork_rng scope
seeded from the run seed (the global torch state is restored), the Sobol
engines are seeded explicitly, SMAC gets Scenario(seed=...); a fixed
seed reproduces a run exactly (tests/test_harness_baselines_bo.py).
Wall time. The GP fits dominate; evaluations are what is scored, but size runner jobs by it. Measured on a heavily loaded 16-core laptop (load 12–50; rough, a quiet runner is faster), at dim 10 and up to 200 observations: BoTorch qLogEI 2–12 s per proposal (growing with the data), TuRBO 0.3–12 s per proposal, SMAC 2–7 s per ask after its 50-point design (a whole budget-200 run: 6.5 min with 2 BLAS threads). What a run costs depends on how many proposals it makes, and that depends on the driver:
Virtual clock, async policy (the default of
--virtual-workers): every completion frees one worker and triggersask(1), so qLogEI and SMAC fit once per evaluation after the design, at anyq: a dim-10, budget-200 run costs about 15–20 min for qLogEI and 5–7 min for SMAC, whateverqis. TuRBO waits for whole batches, so it proposes once perqevaluations: 5–10 min atq = 1, roughly1/qof that above.Synchronous batches (
batch_size = qin the composite harness, or--virtual-policy sync): one proposal per batch for every tool but SMAC, so qLogEI and TuRBO cost roughly1/qof theirq = 1time (a jointq-batch optimisation is somewhat dearer than a single point). SMAC is asked once per point either way.Py-BOBYQA takes under a second.
Budget one GitHub runner job per (baseline, few problems), not per
battery. No per-run wall-clock timeout applies to these strategies
(no_wall_timeout): neither benchmark_harness.py’s (120 s by
default) nor ioh_benchmark.py run --timeout on the IOH and family
tracks; every other strategy of the same run is still cut. compare
warns when the two files come from different batteries (a -bN
budget suffix included) and refuses to gate under
--fail-on-regression.
Not included. HEBO 0.3.6 (the latest release, 2024) pins
numpy<1.25 and pymoo==0.6.0 and cannot be installed next to
numpy 2.5. PDFO 2.2.0 ships wheels only up to CPython 3.12, and its
source build needs a Fortran toolchain; Py-BOBYQA is the BOBYQA reference
instead. Ax is not used: it adds plotly, ipywidgets, pymoo and graphviz;
BoTorch is used directly with the tutorial setup. (Ax’s own default
acquisition is qLogNEI on the same SingleTaskGP; on the noiseless
benchmark objectives it behaves like qLogEI.) Py-BOBYQA’s
seek_global_minimum=True mode is not wrapped yet (TODO.md).
CI runs these tests in a separate test-bo job; the default test job
has no torch and skips them.
Real-world problems (CEC 2020)#
Synthetic landscapes are tidy; real problems have plateaus, equality
constraints, hidden infeasible regions and evaluations that fail. The
real-world set (panobbgo.lib.realworld, runner
panobbgo.harness_realworld) is a subset of the CEC 2020 real-world
constrained suite (Kumar et al., Swarm and Evolutionary Computation 56,
2020): 19 of its 57 problems, 2 to 14 variables —
industrial chemical processes RC01u, RC02u, RC03–RC05 (heat-exchanger networks, an alkylation unit, a reactor network, Haverly’s pooling problem), with up to 9 equality constraints;
process synthesis RC09, RC10 (one binary variable each);
mechanical design RC15–RC21, RC23, RC25, RC28, RC29, RC32 (speed reducer, refrigeration system, spring, pressure vessel, welded beam, three-bar truss, clutch brake, step-cone pulley, thrust bearing, rolling bearing, gas compressor, Himmelblau).
uv run python scripts/ioh_benchmark.py run --realworld # all 19, budget 500*dim
uv run python scripts/ioh_benchmark.py run --realworld --realworld-problems RC17 RC18
uv run python scripts/ioh_benchmark.py run --realworld --budget-multiplier 20
uv run python scripts/ioh_benchmark.py run --realworld-quick # smoke test
The battery is opt-in: no preset, no default battery and no re-baseline
suite includes it. Every model follows the suite’s reference code
(cec20_func.m); the paper gave the equations and their numbering, and
RealWorldSpec.notes
lists where the printed equation differs.
Constraints follow the suite: \(g_i(x) \le 0\), and each equality
as \(|h_j(x)| - 10^{-4} \le 0\). Panobbgo’s constraint handling sees
the combined vector through eval_constraints; a point is feasible when
every entry is \(\le 0\). Integer variables are rounded inside the
model (the suite’s convention, MATLAB rounding), so the optimiser sees
plateaus.
The metric is AOCC on the feasible relative gap
over the targets \(10^{-8} \dots 10^{0}\) (log_hi = 0): a relative
gap of 100 % scores nothing, so a random feasible point does not score for
being feasible. Unlike the constrained families, whose optimum is the
minimum of \(f\) over the whole box, a real problem’s constrained
optimum can be undercut by an infeasible point: a penalty
\(f + \rho\,\mathrm{cv}\) would give full credit to a slightly
infeasible point with a large Lagrange multiplier. So only feasible points
count, as in the suite’s own ranking, and the relative gap removes the
problems’ units (the objective values span 0.013 to 3·106). A run
that never finds a feasible point scores 0; a point below the best-known
value gets full credit. Each record’s f_opt is 0, best_fx the best
relative gap, and feasible, best_violation (the smallest mean
violation \(\nu\)) and first_feasible_eval rank the runs that score
0. The result file says "scored": "relative_feasible_gap" (every other
track: "objective") and log_hi: 0; compare refuses to compare
results that score different quantities or over different bounds. The
summary adds a per-problem table (AOCC and feasible runs per strategy).
Baselines on constrained problems. The baselines have no constraint
handling of their own. On every constrained problem — this track and the
constrained families — their objective is the penalty value
\(f + 100\,\mathrm{cv}\) (harness_baselines.penalized_value) —
the scalar surrogate of panobbgo’s default constraint handler
(get_penalty_value, same \(\rho\) and \(\mathrm{cv}\); the
handler itself ranks by (cv, fx)) — not the bare \(f\), so they do
not score by luck on whichever side of the constraints they land. Unconstrained problems are unchanged, bit for bit. (This changed the
baselines’ numbers on --families-constrained on 2026-09-26; older
reference files for that battery are not comparable for the baselines.)
Failures are real. Where a formula is undefined, the evaluation raises
EvaluationCrashed and the call is spent budget
without progress, exactly like the failure-region families: the logarithm of
a negative temperature difference in the heat-exchanger networks (about
31 % of the box for RC01u, about half of it for RC02u), and a division by
zero on the lower bound of RC20. The suite’s reference code guards most of
these logarithms; this transcription does not, on purpose, so RC01u and
RC02u are variants (“u” for unguarded) with the suite’s optimum and
best-known value, but run statistics on them are not comparable with
published CEC 2020 results.
Verification. Every problem carries a feasible reference point, its
value, and the best-known value — Kumar et al., Table 3, except RC25 (the
updated value of the competition guidelines, 22 July 2020, Table 4) and
RC18 (the proven optimum of the integer problem, 6059.714335, from the
suite’s Revision.docx; Table 3 lists the continuous-thickness value).
RC28 uses the paper’s bound \(Z \ge 4\) (the reference Cal_par.m
has 4.51, which excludes Table 3’s value). tests/test_realworld.py
checks all three, plus published points of the classic problems (CEC 2006
g04 for RC32, Haverly’s optimum, the integer pressure vessel, spring,
truss, gas compressor). Details per problem:
panobbgo.lib.realworld.REALWORLD_SPECS.
Resolution limit. At 500·dim the equality-heavy RC01u and RC02u
are rarely made feasible, and on RC03, RC16 and RC23 most strategies score
0 too; read the battery per problem, and rank the zero-AOCC runs by
best_violation. On RC04 and RC05 the best-known values use the 1e-4
equality tolerance: an optimiser that satisfies the equalities exactly
stops at a relative gap of 4.6e-4 (RC04) or 1.4e-5 (RC05), which caps its
AOCC below 1.
Not included (roadmap §3.3 candidates): YAHPO Gym needs numpy < 2
and ConfigSpace <= 0.6.1 and cannot be installed next to NumPy 2.5;
HPOBench is not on PyPI (git install, containers); the ESA GTOP trajectory
problems are in pykep, which has no Python 3.14 wheels (pygmo has
Linux-only 3.14 wheels but not GTOP). COCO bbob-constrained /
bbob-mixint are separate follow-ups.
Parallel behaviour on a virtual clock#
The primary battlefield is expensive, parallel evaluation: q workers,
calls of uneven duration. Measuring that with real threads makes every
number a function of the machine. The AOCC track can instead run each
strategy on a virtual clock (panobbgo.virtual_clock,
evaluation.method = "virtual"): a deterministic discrete-event
simulation of q workers. The objective is evaluated in-process when a
simulated worker picks a candidate up; each call gets a duration from a
model (constant, lognormal with mean 1, or x-dependent with an
explicit nominal mean), and results reach the strategy in (completion
time, dispatch order) order. A seeded run is bit-reproducible on any
host.
Common random numbers. The harnesses key the duration stream on the
cell — base seed, problem, dimension, instance, rep — not on the strategy
(VirtualSpec.duration_seed, evaluation.virtual_duration_seed), and
every driver draws one duration per dispatch in dispatch order. So on one
cell the i-th dispatched call takes the same time for every strategy and
baseline, and a paired comparison is paired in its durations too; the
optimizer seeds stay per strategy. Result files record this as
"durations": "crn" in virtual; virtual-clock files from before
2026-09-26 lack it (their streams were keyed per strategy) and are not
comparable.
The default policy (--virtual-policy async) is the asynchronous
expensive-evaluation one: a decision point at every completion instant, the
handlers drain (optimizer time is negligible), and the strategy is asked for
candidates for the free workers only: the loop sets the strategy’s request
cap (StrategyBase.request_cap) to the free workers within the budget,
so a bandit’s pull counts and a block’s length cover exactly the dispatched
evaluations, and nothing is queued beyond them. At q = 1 a run is
strictly one call at a time, each candidate chosen after the previous
result arrived. The real asynchronous loop (threaded / processes / dask
without evaluation.sync) runs the same pull-when-free policy by default
(evaluation.async_policy: pull): it asks the strategy only while a
worker is free, for at most the free workers, with jobs_per_client = 1,
and never queues past them. It differs from the virtual clock only in
what a simulation idealizes: results arrive in wall-clock completion order,
and the handlers need not have drained when the next decision is made.
Under a capped bandit a generational arm’s queued
generation drains at the bandit’s share of the workers, so its candidates
can get stale (a TODO.md follow-up). --virtual-policy sync keeps the
synchronous batch policy as a regression mode: with q = 1, a constant
duration and dask.local.n_workers = 1 it is exactly the sync_eval
run. “sync” means different things in the two drivers: for panobbgo
strategies the strategy’s own synchronous batch sizing, for the ask/tell
baselines (run_ask_tell()) batches of the free
workers, asked only when every worker is idle.
# q-sweep on the generated families; one JSON per q
for q in 1 4 16 64; do
uv run python scripts/ioh_benchmark.py run --families --virtual-workers $q \
--duration lognormal --output virtual_q$q.json
done
The API is the virtual=VirtualSpec(workers=q, duration=..., sigma=...)
argument of run_ioh_harness(),
run_ioh_harness_multi_seed() and
run_family_harness(). Run seeds do not
depend on q, so a sweep is paired cell by cell.
Every run then reports two scores:
aocc— AOCC over evaluations: the best-so-far after each call, overbudgetcalls. On the virtual clock the tracker records calls in completion order, and a call that failed or timed out counts as a spent, non-improving evaluation (it used a budget slot and a worker), exactly once, when it completes. A family’s signalled timeout (failure region,mode="timeout") is chargedevaluation.timeoutof virtual time (its drawn duration when none is set) and is not evaluated.aocc_time— AOCC over virtual time (aocc_virtual_time()). The best-so-far at time \(t\) is the best value among the calls completed by \(t\) (none before the first completion: the worst gap). It is sampled at\[t_j = j \cdot \bar d / q, \qquad j = 1, \dots, B,\]with \(\bar d\) the model’s mean duration (1 for the built-in models) and \(B\) the budget, and scored with the usual AOCC formula (log-precision clipped to
[log_lo, log_hi]). Time is thus measured in mean durations; the horizon \(B \bar d / q\) is the timeqperfectly busy workers need to spend the budget; calls completing after it are not scored and a run that ends early is held at its last value. Atq = 1with a constant duration the grid points are the completion times, soaocc_time == aocc. Idle workers, stale candidates, and — under an x-dependent model — expensive regions all lower it.Structural caps. No call completes before one duration, so the first
q - 1grid points are always the worst gap (the score is capped near1 - (q-1)/Bof the ideal), and under a heavy-tailed model (log-normal) the last calls usually complete after the horizon and are not scored. Both grow withq: compare strategies at the sameqand duration model, and read comparisons acrossqwith these caps in mind.
IOHHarnessResult.virtual records the settings (workers, policy,
duration model) and mean_aocc_time / per_strategy_aocc_time
aggregate the time score over the runs that have one (n_aocc_time; a
crash scores 0). The ask/tell external baselines (pycma, Nevergrad,
Optuna, and the expensive-track BoTorch, TuRBO, SMAC3, Py-BOBYQA;
AskTellBaselineStrategy) run on
the same clock (run_ask_tell(): ask for up to
the free workers, evaluate at dispatch, tell at completion) and get
aocc_time too. A strategy that evaluates outside any driver (the SciPy
baselines, which call the problem themselves) does not run on the clock: it
gets no aocc_time, is left out of the time aggregates, and the harness
warns. compare warns when the two files differ in their
virtual settings and refuses to gate (exit 2) under
--fail-on-regression; it prints the aocc_time delta next to the
AOCC one.
Per-arm sweeps and the decision protocol#
The composite score and the AOCC batteries answer “is the framework better”. A different question — “is this parameter of that arm better” — needs a tighter protocol, because at three seeds the effect being hunted is usually the same size as the noise. Three rules and four tools make up that protocol.
Pair the variants: seed_name#
The harnesses derive every run’s seed by hashing a strategy label. By
default that label is the spec’s name — so two specs that differ only
in their display name run on different RNG streams, and an A/B between
them carries the full run-to-run variance. A parameter that is never read
still shows a nonzero delta.
That is not hypothetical: an “interior optimum” for CMA-ES’s ipop_factor
was reported with a CI excluding zero, replicated, and split by dimension,
before it turned out the parameter was dead code in solo runs
(planning/DISCOVERY_2026-09-09.md §18). The sweep reports the maximum
over six such draws, and the winner of a null tournament is biased upward by
roughly the spread between draws; re-running the identical (name, seed)
pairs reproduces the identical numbers, so determinism was mistaken for
confirmation.
StrategySpec.seed_name fixes it. Set it to one constant across all
variants of an arm and they share the RNG stream per cell, so a dead
parameter yields exactly zero and a live one shows only its own effect:
StrategySpec(name="jso_np_15", seed_name="jso", ...)
StrategySpec(name="jso_np_30", seed_name="jso", ...)
None (the default) keeps seeding from name. The label the harness
actually hashes is StrategySpec.rng_identity = seed_name or name.
The null floor#
How large is “the same size as the noise”? Measured directly: one
configuration run under six different spec names — six RNG streams, nothing
else changed — on the standard battery, seeds 42 / 7 / 1234, paired per seed
exactly as a sweep is (planning/DISCOVERY_2026-09-09.md §18a).
Configuration |
sd of battery mean |
max − min |
Largest spurious “gain” |
|---|---|---|---|
CMA-ES (default) |
0.0204 |
0.0500 |
+0.0500, on 3 of 3 seeds |
L-SHADE |
0.0121 |
0.0312 |
+0.0066 |
A three-seed sweep can therefore hand CMA-ES a +0.05 “improvement” with
all three seeds agreeing, purely from a label change.
Rule adopted: on a three-seed battery mean, anything below ±0.05 for
CMA-ES or ±0.03 for a DE arm is not an effect and is not reported as
one. Note also that CMA-ES’s variance is bimodal — a stream either finds the
basin at d=5 or it does not — so its floor is genuinely wider than a DE
arm’s, and a result that is “positive on every seed” is not by itself
evidence.
The sweep tools#
Five scripts under benchmarks/, most of them running arms solo via
StrategyRoundRobin, all paired per seed on one RNG stream, all flushing
their rows after every seed so an interrupted run loses nothing:
Tool |
The question it answers |
|---|---|
|
Which value of one hyper-parameter is best for one arm run alone —
reported per dimension, since the battery’s |
|
How much there is to gain from choosing an arm at all: the per-cell max over arms (the oracle) minus the best single arm is the headroom any selection policy could ever win. |
|
Whether the new |
|
Whether a portfolio under |
|
Whether that verdict survives outside MA-BBOB: the same specs on the
generated problem families of |
Dimensions 30/40 on MA-BBOB are ioh_benchmark.py run --large, and a
bbob-largescale-style slice (plain BBOB, five functions at d 80/160,
500·d) is --largescale; that slice is scored on AOCC targets up to
1e6 rather than 1e2, because at the standard bound almost every run
scores 0. Every AOCC run pins BLAS to one thread (recorded as
blas_threads). The GP, QuadraticWLS and Nearby(quadratic=True)
heuristics are not for d ≥ 30.
The 24 plain BBOB functions (the function axis that
portfolio_screen.py kind=bbob screens) are ioh_benchmark.py run
--bbob, with --bbob-dims, --bbob-instances and --bbob-fids
(defaults: d 2/5, instances 0–2, all 24) and --budget-multiplier
(default 200·d). Each run record carries its fid, so a result can be
read per COCO class (harness_ioh.bbob_class_of).
The sealed test set#
ioh_benchmark.py run --sealed / --families-sealed run a held-out
battery: 20 fresh MA-BBOB instances and fresh family instances at d 2 to 40
(panobbgo.sealed) that no development battery can contain. The
result files are marked sealed. Run it only to report a result or back a claim; never
tune, screen, select or train on it. A number from it that steers a
decision burns the set. The harness prints a warning banner every time.
Typical invocation (nice it; progress is counted in evaluations, not
wall-clock):
uv run python benchmarks/arm_sweep.py jso out.json 42 7 1234 dims=2,5 bm=500
uv run python benchmarks/oracle.py oracle.json 42 7 1234 --defaults
When a default may change#
A three-seed sweep locates a candidate; it never ships one. A default
change needs a paired multi-seed comparison on fresh seeds
(harness_ioh.paired_seed_stats), reported as delta, CI and
wins/n. (Until 2026-09-25 this was a fixed 12-seed decision roster; the
numbers quoted in this guide come from it.) On top of that, a positive
result needs a mechanism: a claim about which code path the parameter
changes. NP_init passed both tests (read in __init__, effect
of +0.1 … +0.2 far above the floor, and a visible collapse at NP_init=4);
the secondary knobs of the first sweep pass (H, k_rank,
archive_factor, F_schedule, lbest) did not, and are recorded as
unproven rather than as wrong.
One sharpening of that rule, learned the expensive way: a screen
maximum’s own CI carries no weight. A screen reports the best of many
specs, and a confidence interval computed on a selected winner is not the
interval of a pre-registered spec. soft_be25 led a fourteen-spec screen
at +0.050 with a three-seed CI excluding zero, and returned −0.006 on
twelve fresh seeds (planning/DISCOVERY_2026-09-09.md §30). This is the
same mechanism as the dead-parameter story above, passing through a CI
instead of a point estimate. Only the re-check on fresh seeds decides.
Extending the harness#
Adding a problem#
Append a
ProblemSpecto the appropriate_make_*_problemsfactory inpanobbgo/harness.py.Provide
known_optimaand atolerancethat is achievable for the mode’s budget but not trivially so.Run
--quickto confirm the new problem is well-formed.
Adding a strategy#
Append a
StrategySpecto_make_*_strategies.The strategy must be deterministic given a seed (no external randomness outside the seeded
numpygenerator).Validate with
benchmark_harness.py list --standard.
Adding a metric#
Per-pair aggregates live on
ProblemStrategyResult. Add a field, populate it in
compute_metrics, surface it in HarnessResult.print_summary and
cmd_score’s JSON path. Do not change the composite score formula
without an ADR — historical comparisons depend on its stability.
See also#
panobbgo.harness— the harness implementation.panobbgo.harness_baselines— external reference strategies (Random, SciPy DE, SciPy dual annealing; pycma, Nevergrad, Optuna).panobbgo.harness_baselines_bo— expensive-track baselines (BoTorch qLogEI, TuRBO-1, SMAC3, Py-BOBYQA).benchmark_harness.py— CLI.tests/test_harness.py— harness test suite (60+ tests).tests/test_harness_baselines.py— baseline adapter tests.tests/test_harness_baselines_external.py— pycma / Nevergrad / Optuna adapter tests (skip without thebaselinesextra).tests/test_harness_baselines_bo.py— BoTorch / TuRBO / SMAC3 / Py-BOBYQA adapter tests (skip without thebaselines-boextra).tests/test_harness_stats.py— statistical acceptance rule tests.