Adaptive operator selection for differential evolution
Does a learned policy for choosing DE mutation operators actually beat picking one at
random?
That question, not a new algorithm, is what this repository answers. Five adaptive
policies, five fixed operators, a uniform-random ablation over the identical operator
pool, and JADE as an external published reference — all on the same DE, the same
budget, the same seeds, and the same statistical treatment.
The uniform-random ablation is the point. Adaptive operator selection is usually
reported against a single fixed operator, which cannot distinguish learning from
operator diversity. If a policy cannot beat uniform random selection over the same
pool, its benefit came from having five operators available, not from choosing between
them — and that comparison is rarely published.
Findings
At D=5 the learning helps. At D=20 it is worse than doing nothing — and the reason is
not that the bandits failed to learn.
|
D = 5 |
D = 20 |
| Policies beating uniform (Cliff’s δ) |
5 of 5 |
0 of 5 |
| Significant after Holm correction |
4 of 5 beat it |
2 of 5 lose to it |
| Best adaptive policy vs uniform |
success-rate, δ = −0.37, p = 0.008 |
pm, δ = +0.19, n.s. |
| Worst adaptive policy vs uniform |
thompson, δ = −0.28, n.s. |
thompson, δ = +0.73, p = 0.006 |
Every policy degrades by between +0.64 and +1.01 in Cliff’s δ going from D=5 to D=20.
At D=20 the full ranking puts a single fixed operator (current-to-pbest/1, 3.79) and
JADE (3.96) ahead of uniform (4.62) — and all five adaptive policies behind it.
Why: the policies win the proxy and lose the objective
Credit is immediate fitness improvement, so a policy is rewarded for operators that
improve the parent often, not for operators that reach a low final error. At D=20
those come apart:
|
trials that improved |
most-used operator |
its share |
Friedman rank |
uniform |
32.5% |
— (flat by construction) |
20.0% |
4.62 |
pm |
43.3% |
best/1 |
28.4% |
5.50 |
success-rate |
43.8% |
best/1 |
26.2% |
5.92 |
ap |
49.7% |
best/1 |
41.0% |
6.83 |
ucb |
49.4% |
best/1 |
42.6% |
7.33 |
thompson |
58.2% |
best/1 |
57.3% |
9.33 |
Every policy converges on DE/best/1, which produces the most frequent improvements —
and which is the worst fixed operator in the study by final error (rank 11.52 of 13).
The policies are not failing to optimise; they are optimising correctly against a reward
that does not track the goal. The harder a policy commits, the worse it does:
Spearman ρ = 0.90 between top-operator share and Friedman rank (p = 0.037).
Thompson sampling, which commits hardest (57.3% on one operator), is the worst algorithm
of all twelve at D=20. Uniform random selection, which cannot commit at all, beats every
one of them.
The baseline decides the conclusion
Running the identical comparison against every available baseline, at D=20:
| baseline used |
policies better |
significantly better |
fixed:best/1 |
5 / 5 |
5 / 5 |
fixed:rand/2 |
5 / 5 |
5 / 5 |
fixed:current-to-best/1 |
5 / 5 |
5 / 5 |
fixed:rand/1 |
4 / 5 |
1 / 5 |
fixed:current-to-pbest/1 |
0 / 5 |
0 / 5 |
uniform (the ablation) |
0 / 5 |
0 / 5 |
Same runs, same statistics, same 24 functions. Compared against best/1 this study
reports that all five policies significantly beat the baseline. Compared against
uniform random selection it reports that none of them do — two significantly lose.
The convention in this literature is to pick one fixed operator and report against it.
That choice, not the algorithm, determines the headline. A policy that beats best/1
has demonstrated only that it avoids the worst operator some of the time, which uniform
random selection also does — for free, and better.
What this means
The failure here is not a tuning problem and not a weak bandit. The bandits work: they
identify the operator with the highest immediate success rate and exploit it, exactly as
designed. The defect is upstream, in what they are told to maximise. Fixing it means
changing the reward — crediting progress toward a low final error rather than the
frequency of small improvements — not swapping UCB for something fancier.
Full numbers, tables and figures: paper/RESULTS.md.
Reproduce
make setup # venv + pinned dependencies
make test # 80 tests, ~25s
make report # regenerate every table and figure from results/exp01
To re-run the experiment itself from scratch (~2 hours on 9 cores):
make experiment
Every number in paper/RESULTS.md is regenerated by make report
from results/exp01/runs.csv. Nothing is hand-entered.
What was measured
|
|
| Suite |
24 noiseless BBOB functions via IOHexperimenter (ioh), instance 1 |
| Dimensions |
D = 5 and D = 20 |
| Budget |
500 × D function evaluations, hard-enforced — an evaluation past the limit raises rather than silently inflating the budget. A restricted budget is deliberate: it is the regime where adaptive operator selection is claimed to matter most |
| Runs |
25 per (algorithm, function, dimension) |
| Seeds |
Derived per cell from SeedSequence([master, algorithm_index, fid, instance, dim, run]) and written into runs.csv. Order- and parallelism-independent: the same cell reproduces exactly whether it runs first, last, or on another machine |
| Grid |
12 algorithms × 24 functions × 25 runs × 2 dimensions = 14,400 runs |
Budget is counted in function evaluations, never wall-clock or generations. The
selection policies spend zero evaluations — they learn from evaluations the search
was going to make anyway — so their cost is wall-clock only, and it is reported
separately.
What is being compared
All twelve share one DE (synchronous generations, NP=50, F=0.5, CR=0.9, binomial
crossover, midpoint bound repair), so a difference between them is a difference in
operator selection and nothing else.
Operator pool — DE/rand/1, DE/best/1, DE/rand/2, DE/current-to-best/1,
DE/current-to-pbest/1 (JADE-style, with archive).
| Group |
Members |
Role |
| Fixed |
one per operator |
the floor, and the input to the hindsight oracle |
| Ablation |
uniform |
the null hypothesis: same pool, no learning |
| Bandits |
ucb (sliding-window UCB1), thompson (Gaussian posterior) |
exploration–exploitation over a non-stationary reward |
| Classical AOS |
pm (probability matching), ap (adaptive pursuit) |
quality-proportional selection |
| Published-style |
success-rate |
SaDE-style success-rate selection |
| External baseline |
jade |
a real published adaptive DE — adapts F and CR, not operators |
| Post-hoc bound |
oracle:best-fixed |
best fixed operator per function chosen after seeing results. Not an algorithm — the ceiling any online method over this pool could reach |
Credit assignment is extreme-value over a sliding window by default (the best recent
outcome, not the average), following Fialho et al.'s finding that rare large
improvements matter more than frequent small ones. average and binary are available
so the claim is testable rather than inherited.
How it was tested
Following the experimental contract:
- Friedman across algorithms, functions as blocks, on per-function median error
- Post-hoc pairwise Wilcoxon signed-rank with Holm step-down correction — reported
two ways: over all 78 pairs for the full ranking, and over the 12 control comparisons
for the “does it beat uniform” question. All-pairs correction is the wrong family for
a comparison against a control and costs most of the power (Demšar 2006); with it,
only one of the five D=5 results clears 0.05, against four under the correct family
- Cliff’s δ — computed per function on the raw 25 runs, never on the
across-function aggregates, with Romano et al. magnitude labels
The level distinction in (3) is the one this literature routinely gets wrong. An effect
size computed on 24 median values answers “does A beat B on more functions”, which the
Friedman ranks already said. Computed within one function on its raw runs, it answers
“when A and B both run on this function, how often does A win” — which is what an
effect size is for.
Reporting is never a single scalar: final target error, an ECDF over 51 log-spaced
targets (anytime behaviour), convergence curves with IQR bands, and the figure that
matters most here — operator usage over the run, which shows whether a policy is
adapting at all, independently of whether its error numbers look good.
Layout
src/aos/
operators.py 5 DE mutation strategies + crossover + bound repair
credit.py credit assignment and the sliding window
policies.py the selection policies, including the uniform ablation
de.py DE with a pluggable policy
baselines.py JADE (Zhang & Sanderson 2009)
problems.py BBOB adapter with hard budget enforcement and tracing
registry.py the algorithm roster (append-only: index feeds the seed)
runner.py grid construction, per-cell seeding, parallel execution
stats.py Friedman / Holm-Wilcoxon / Cliff's δ <-- spine seam
report.py tables and figures
experiments/ exp01.yaml (the study), smoke.yaml (pipeline check)
tests/ 80 tests
paper/ generated output — RESULTS.md, tables, figures
Spine seam
src/aos/stats.py is a local copy of the statistics module that mirrors
the metaheuristics-bench spine. When that repository
lands, delete this module and import mhbench.stats — the function names and
signatures were chosen to match, so the swap is one line per caller. tests/test_stats.py is what makes that swap safe: if the
spine’s module passes the same tests, no published number can change silently.
Limitations
- A restricted budget (500 × D). The conclusions are about this regime. The D=5
advantage may not survive a longer run, and the D=20 reversal may soften — the ECDF
shows the anytime profile within the budget, but not beyond it.
- One BBOB instance (instance 1). Instance variation is not measured, so
conclusions are about these 24 functions, not the function classes.
- F and CR are fixed at 0.5 / 0.9 for every policy-based algorithm. This is
deliberate — it isolates operator selection — but it means
jade, which adapts both,
is not a like-for-like comparison. It is included as an external reference point, not
as a competitor in the same category.
success-rate is SaDE-style, not SaDE. Published SaDE counts its learning
period in generations and adapts F and CR simultaneously; here the window is counted
in applications and F/CR are held fixed. Documented in the class docstring.
- Step 0 of guide 2 is not done. The guide’s sequence begins with reproducing
Bolufé-Röhler’s own published method before building anything; this repository
starts at step 1. The reproduction remains the single highest-value addition.
- Policy hyperparameters (window size, C, α, β) are set to literature-typical values
and not tuned. Tuning the adaptive policies without equally tuning the baselines
would reproduce the flaw this repository is built to avoid; tuning everything is
future work with a stated budget.
References
- Fialho, Da Costa, Schoenauer & Sebag — bandit-based adaptive operator selection and
extreme-value credit assignment
- Zhang & Sanderson (2009), JADE: Adaptive Differential Evolution With Optional
External Archive, IEEE TEC 13(5)
- Qin, Huang & Suganthan (2009), Differential Evolution Algorithm With Strategy
Adaptation, IEEE TEC 13(2)
- Romano et al. — Cliff’s δ magnitude cut-points
- Bolufé-Röhler & Xu (2024), Deep Reinforcement Learning for Smart Restarts in
Exploration-Only Exploitation-Only Hybrid Metaheuristics, Metaheuristics
International Conference — the reproduction target in guide 2 step 0, not attempted
here. Note: guide 2 states the
UES-CMAES-DRL implementation is public, but a
search did not surface a repository URL; the method is indexed in
Awesome-MetaBBO as UES-CMAES-RL. Confirm
availability before planning that step
License
MIT.
评论