Simple Algorithm
Reinforcement Learning · Fixed Point · 26 min

Benchmarks & Honest Evaluation

Atari, MuJoCo and Procgen, seeds and confidence intervals: measuring progress without fooling yourself.

Two groups of runs of the same algorithm, differing only in their random seeds, can produce learning curves as different as two algorithms. Deep RL results also move with implementation details, hyperparameters, evaluation protocols and the choice of summary statistic. This lesson covers the standard benchmarks and what they do and do not measure, the evidence that one number is not enough, and the tools that keep comparisons honest: robust aggregate scores, stratified bootstrap intervals and performance profiles.

What you’ll learn

  • Describe the main RL benchmarks (the Arcade Learning Environment, MuJoCo and the DeepMind Control Suite, Procgen) and the protocol choices that make their numbers comparable.
  • Explain, with the experiments of Henderson et al. (2018) and Colas et al. (2018), why few seeds and point estimates mislead.
  • Compute human-normalized scores, the interquartile mean and the optimality gap, and explain when the mean and the median mislead.
  • Build stratified bootstrap confidence intervals, performance profiles and probabilities of improvement, following Agarwal et al. (2021).

Benchmarks and their protocols

A benchmark is a set of environments plus a protocol: how long agents train, how they are evaluated, and what counts as the score. Change the protocol and the same agent gets a different number, so a score without its protocol means little.

BenchmarkWhat it testsProtocol details that matter
Arcade Learning Environment (Bellemare, Naddaf, Veness & Bowling, 2013)Atari 2600 games played from pixels, with the change in game score as reward; the common suite has 57 gamesframe skip, sticky actions or no-op starts, episode caps, whether losing a life ends an episode, how frames are counted
Atari 100k (Kaiser et al., 2020)sample efficiency: 100,000 agent steps per game, about two hours of play, on 26 gamesnumber of runs and of evaluation episodes
MuJoCo locomotion (Todorov, Erez & Tassa, 2012) and the DeepMind Control Suite (Tassa et al., 2018)continuous control of simulated bodies, from states or from pixelssimulator and task versions, time limits, action repeat, reward scale
Procgen (Cobbe, Hesse, Hilton & Schulman, 2020)generalization: 16 procedurally generated games; train on a fixed set of levels (200 in easy mode, for 25M steps) and test on unseen onesnumber of training levels and difficulty mode

Atari games are deterministic: the same actions always produce the same game, so an agent can score well by replaying a memorized sequence of actions without looking at the screen. Machado et al. (2018) therefore proposed sticky actions: at every step, with probability ς=0.25\varsigma = 0.25, the emulator repeats the agent's previous action instead of its new one. Their recommended protocol also ends episodes at game over rather than at a lost life (with a cap of five minutes of play), counts every emulator frame including skipped ones, tunes hyperparameters on a separate set of games, and reports the average score of the last 100 training episodes at fixed budgets such as 10, 50, 100 and 200 million frames. Frame counting is a real trap: the DQN paper reports training for "50 million frames" per game, about 38 days of play, a figure that only adds up if those are 50 million agent steps, that is 200 million emulator frames at its frame skip of 4 (Mnih et al., 2015).

Check your understanding

Why did Machado et al. add sticky actions to the Arcade Learning Environment?

  1. To make the games harder for human players
  2. Because the emulator is deterministic, an agent could score well by replaying a memorized action sequence; random repetition of the previous action forces it to react to what it sees
  3. To speed up training by repeating each action several times
  4. To imitate the network latency of online play
Show the answer

B. Because the emulator is deterministic, an agent could score well by replaying a memorized action sequence; random repetition of the previous action forces it to react to what it sees

In a deterministic game an open-loop plan, a fixed list of button presses, can be optimal from the fixed start, and a learner can find one without learning to read the screen. Sticky actions make the outcome of each press uncertain, so a policy must respond to the state. It is a cheap way to inject stochasticity without changing the games.

One seed is not an experiment

Colas, Sigaud and Oudeyer (2018) turned this into a lesson in statistics, with DDPG on Half-Cheetah. Two groups of five runs of the same canonical implementation passed Welch's t-test as different (p=0.031p = 0.031): a false positive. And for two genuinely different variants (DDPG with action noise and with parameter noise), a power analysis from pilot runs put the probability of missing the real difference at 0.51 with five runs per algorithm and 0.19 with ten; their own five-run pilot did miss it (p=0.1p = 0.1), and the ten-run experiment detected it. Their advice is to fix the effect size that matters before running anything, then choose the number of runs by a power analysis.

Seeds are only one source of variation.

  • Implementation details. Engstrom et al. (2020) found that code-level details outside the core PPO algorithm (clipping the value loss, rescaling rewards, decaying the learning rate and others) account for most of PPO's advantage over TRPO in their experiments.
  • Design choices. Andrychowicz et al. (2021) trained over 250,000 agents on five continuous-control environments to measure the effect of more than 50 design choices in on-policy actor–critic methods.
  • Tuning budgets. A new method tuned for weeks against a baseline run with default settings measures the tuning effort as much as the method. Jordan et al. (2020) trace inconsistent results to flawed evaluation metrics and propose a methodology for reliable measurement on single environments and across them; Patterson, Neumann, White and White (2024) survey these pitfalls and how to design experiments around them.

Aggregating scores across tasks

A suite of 57 games yields 57 scores on incomparable scales: points in Pong run from −21-21 to 2121, while other games award thousands. The standard fix is the human-normalized score, with 00 for a random policy and 11 for the human baseline (often multiplied by 100):

HNS=scoreagent−scorerandomscorehuman−scorerandom\text{HNS} = \frac{\text{score}_{\text{agent}} - \text{score}_{\text{random}}}{\text{score}_{\text{human}} - \text{score}_{\text{random}}}
In Mnih et al. (2015) the human baseline is one professional games tester, averaged over about 20 episodes of at most 5 minutes per game, after about 2 hours of practice. "Superhuman" means above this baseline, not above the best human players. Agent57 (Badia et al., 2020) was the first deep RL agent to exceed it on all 57 games.

Then the scores must be summarized, and each summary has a failure mode.

  • The mean is dominated by a few games where agents score orders of magnitude above the human baseline; Hessel et al. (2018) name Atlantis as an example and track the median instead.
  • The median depends on one middle task. It ignores large gains or losses on half the suite, and with few runs it has high variance.
  • The interquartile mean (IQM), recommended by Agarwal et al. (2021), pools all runs of all tasks, discards the lowest and highest quarter, and averages the middle half. It is robust to outliers like the median but uses half the data, so its confidence intervals are narrower.
  • The optimality gap measures how far below a target score τ\tau (for example human level, τ=1\tau = 1) runs fall on average. Scores above the target earn nothing, so super-human outliers cannot hide failures elsewhere.
IQM⁡(x1,…,xn)=2n∑i=n/4+13n/4x(i),OG⁡τ(x1,…,xn)=1n∑i=1nmax⁡(0, τ−xi)\operatorname{IQM}(x_1, \dots, x_n) = \frac{2}{n}\sum_{i = n/4 + 1}^{3n/4} x_{(i)},\qquad \operatorname{OG}_\tau(x_1, \dots, x_n) = \frac1n\sum_{i=1}^n\max\big(0,\ \tau - x_i\big)
x(1)≤⋯≤x(n)x_{(1)} \le \dots \le x_{(n)} are the normalized scores of all runs on all tasks, sorted, with nn a multiple of 4 for simplicity.
Predict before you look

Eight runs, pooled over tasks, have normalized scores 0.0, 0.1, 0.2, 0.4, 0.5, 0.9, 1.1 and 4.0. Their mean is 0.9 and their median 0.45. What is their interquartile mean?

Show the answer

0.5

Drop the lowest two (0.0 and 0.1) and the highest two (1.1 and 4.0), and average the middle four: (0.2+0.4+0.5+0.9)/4=0.5(0.2 + 0.4 + 0.5 + 0.9)/4 = 0.5. The single run at 4.0 drags the mean up to 0.9; the IQM ignores it. The optimality gap at τ=1\tau = 1 is (1+0.9+0.8+0.6+0.5+0.1+0+0)/8≈0.49(1 + 0.9 + 0.8 + 0.6 + 0.5 + 0.1 + 0 + 0)/8 \approx 0.49.

Intervals, profiles and probabilities

Agarwal, Schwarzer, Castro, Courville and Bellemare (2021) reran published methods on the Atari 100k benchmark with 100 runs per method. Most papers had reported point estimates from 3 or 5 runs, sometimes 10 or 20, and those estimates proved unreliable: the reported medians varied widely across reruns, and intervals tight enough to trust needed far more runs than were used. Some published rankings did not survive: a comparison that favored one of two versions of Rainbow tuned for small budgets was not supported, and an evaluation protocol that took a maximum over evaluation points had made one method look better than another that a consistent protocol showed to be superior. Their remedy, implemented in the open-source library rliable, replaces point estimates with interval estimates and whole distributions.

DerivationA stratified bootstrap interval
  1. Arrange the normalized scores in a matrix xn,mx_{n,m}: NN runs (rows) on each of MM tasks (columns). The benchmark fixes the tasks; what would change if the experiment were repeated is the runs.

  2. xn,m(b)=xJn,m, m,Jn,m∼Uniform{1,…,N} independently,θ^b=IQM⁡(x(b))x^{(b)}_{n,m} = x_{J_{n,m},\,m},\qquad J_{n,m} \sim \text{Uniform}\{1, \dots, N\}\ \text{independently},\qquad \hat\theta_b = \operatorname{IQM}\big(x^{(b)}\big)

    For b=1,…,Bb = 1, \dots, B: in every task separately, draw NN runs with replacement from that task's own runs, and compute the aggregate of the resampled matrix, here the IQM. This is bootstrap resampling, stratified by task:

  3. The 2.5% and 97.5% quantiles of θ^1,…,θ^B\hat\theta_1, \dots, \hat\theta_B form a 95% percentile confidence interval. Resampling within tasks keeps the mix of easy and hard tasks fixed in every replicate, and because the aggregate pools all tasks, the interval is meaningful even with only a handful of runs per task.

Two more tools look past any single summary.

  • A performance profile plots, for each threshold τ\tau, the fraction of all runs whose normalized score exceeds τ\tau, with bootstrap bands. If one algorithm's profile lies above another's everywhere, it is better for every choice of threshold (it stochastically dominates), and the area under a profile is the mean score.
  • The probability of improvement Pr⁡(X>Y)\Pr(X > Y) averages over tasks the chance that a random run of algorithm XX beats a random run of YY on that task, with ties counting one half: the Mann–Whitney statistic. It says how often XX wins, not by how much.
python
import numpy as np
from scipy.stats import trim_mean

def iqm(scores):                      # scores: (runs, tasks), normalized
    return trim_mean(scores, proportiontocut=0.25, axis=None)

def optimality_gap(scores, target=1.0):
    return np.mean(np.maximum(0.0, target - scores))

def stratified_bootstrap_ci(scores, stat=iqm, reps=2000, level=0.95, seed=0):
    """Resample runs with replacement within each task; the tasks stay fixed."""
    rng = np.random.default_rng(seed)
    runs, tasks = scores.shape
    boot = [stat(np.take_along_axis(scores, rng.integers(0, runs, (runs, tasks)), axis=0))
            for _ in range(reps)]
    return stat(scores), np.quantile(boot, [(1 - level) / 2, (1 + level) / 2])

def prob_improvement(x, y):
    """P(a run of X beats a run of Y on the same task), averaged over tasks."""
    return np.mean([np.mean((a[:, None] > b) + 0.5 * (a[:, None] == b))
                    for a, b in zip(x.T, y.T)])

def performance_profile(scores, taus):
    return np.array([(scores > t).mean() for t in taus])

The core of Agarwal et al.'s recommendations in NumPy and SciPy, for score matrices of shape (runs, tasks). trim_mean with a proportion of 0.25 cut from each end, over the flattened matrix, is the IQM; take_along_axis resamples rows independently within each column, which is the stratified bootstrap.

A checklist for honest evaluation

  1. Ask one question. Sample efficiency at a fixed budget, final performance, robustness and generalization are different questions with different tasks, budgets and metrics.
  2. Plan the number of runs. Decide the effect size that matters and choose the runs by a power analysis; report how many were used. Three to five runs support few conclusions.
  3. Report uncertainty. Give stratified bootstrap intervals for the IQM, the mean or the optimality gap, performance profiles, and probabilities of improvement for pairwise claims.
  4. Never select on the evaluation. No maximum over evaluation checkpoints, no tuning on the evaluation tasks or seeds; tune on separate games, as Machado et al. recommend.
  5. Treat baselines fairly. The same protocol, budget and tuning effort for every method, with published implementations or an account of the differences.
  6. Report the protocol. Sticky actions, frame counting, episode limits, number of evaluation episodes, normalization constants, code-level details.
  7. Release the evidence. Code, configurations and per-run scores, so that others can recompute every aggregate.

Key takeaways

  • A benchmark score is meaningful only with its protocol: sticky actions or not, how frames are counted, when episodes end, how long the agent trained and how it was evaluated.
  • Few seeds mislead: two groups of runs of the same algorithm can differ significantly, and five runs per algorithm can miss real differences about half the time; choose the number of runs by power analysis.
  • Normalize scores per task, then aggregate robustly: the mean is hostage to outlier tasks, the median to a single task, while the interquartile mean and the optimality gap are more reliable.
  • Report uncertainty: stratified bootstrap intervals for aggregate scores, performance profiles for whole score distributions, and the probability of improvement for pairwise comparisons.
  • Fix the protocol and statistics before running, give baselines the same budget and tuning, never select on evaluation results, and release per-run scores.

Check yourself

In the interactive lesson these are scored with your confidence, and what you miss comes back for review.

Question 1

Why do Agarwal et al. (2021) recommend the interquartile mean of normalized scores over the mean and the median?

  1. It is always the largest of the three
  2. It discards the lowest and highest quarter of runs, so a few outlier games cannot dominate it as they dominate the mean, and it averages half of all runs instead of relying on one middle value, so its confidence intervals are narrower than the median's
  3. It equals the median for every symmetric distribution, so nothing is lost
  4. It is the only statistic that can be bootstrapped
Show the answer

B. It discards the lowest and highest quarter of runs, so a few outlier games cannot dominate it as they dominate the mean, and it averages half of all runs instead of relying on one middle value, so its confidence intervals are narrower than the median's

The IQM trades a little of the median's robustness for much of the mean's statistical efficiency. With the few runs per task that deep RL can afford, that efficiency shows up directly as tighter intervals.

Question 2

Henderson et al. split ten runs of TRPO with identical settings into two groups of five, and a t-test reported a significant difference. What does this show?

  1. TRPO is a buggy algorithm
  2. The t-test is invalid for RL and should never be used
  3. HalfCheetah is too easy to be a useful benchmark
  4. With few runs, variation between seeds alone can produce differences that look like algorithmic effects, so comparisons need more runs and estimates of uncertainty
Show the answer

D. With few runs, variation between seeds alone can produce differences that look like algorithmic effects, so comparisons need more runs and estimates of uncertainty

Deep RL training is a high-variance process: random initialization, exploration and environment noise compound over millions of steps. A test on five runs per group can then be fooled, by heavy-tailed or skewed run distributions or by plain chance. The remedy is more runs, chosen by power analysis, and interval estimates instead of single numbers.

Question 3

In a stratified bootstrap over a matrix of scores with NN runs on each of MM tasks, what is resampled?

  1. Runs, with replacement, separately within each task; the set of tasks stays fixed
  2. Tasks, with replacement, keeping all the runs of each chosen task
  3. Individual episodes inside each run
  4. The random seeds, by training the agents again
Show the answer

A. Runs, with replacement, separately within each task; the set of tasks stays fixed

The benchmark fixes the tasks; what would change if the experiment were repeated is the runs. Resampling runs within each task imitates that repetition and keeps the mix of easy and hard tasks the same in every replicate.

Question 4

A paper evaluates its agent every 10,000 steps and reports the best evaluation score seen during training, while its baselines report final scores. What is wrong?

  1. Nothing: the best score shows what the agent can do
  2. Evaluating every 10,000 steps is too frequent
  3. The maximum of many noisy evaluations is biased upward and is not comparable with a final score; every method must be scored with the same protocol, fixed in advance
  4. Final scores are always lower, so the comparison favors the baselines
Show the answer

C. The maximum of many noisy evaluations is biased upward and is not comparable with a final score; every method must be scored with the same protocol, fixed in advance

Each evaluation is a noisy estimate, and the largest of many noisy estimates overstates the truth, more so the more checkpoints there are. Agarwal et al. (2021) found that such a protocol had made one method look better than another that a consistent protocol showed to be superior.

Further reading

  • M. G. Bellemare, Y. Naddaf, J. Veness & M. Bowling, "The Arcade Learning Environment: An evaluation platform for general agents," Journal of Artificial Intelligence Research 47, 253–279 (2013).
  • M. C. Machado, M. G. Bellemare, E. Talvitie, J. Veness, M. Hausknecht & M. Bowling, "Revisiting the Arcade Learning Environment: Evaluation protocols and open problems for general agents," Journal of Artificial Intelligence Research 61, 523–562 (2018).
  • P. Henderson, R. Islam, P. Bachman, J. Pineau, D. Precup & D. Meger, "Deep reinforcement learning that matters," AAAI (2018).
  • C. Colas, O. Sigaud & P.-Y. Oudeyer, "How many random seeds? Statistical power analysis in deep reinforcement learning experiments," arXiv:1806.08295 (2018).
  • R. Agarwal, M. Schwarzer, P. S. Castro, A. Courville & M. G. Bellemare, "Deep reinforcement learning at the edge of the statistical precipice," Advances in Neural Information Processing Systems 34, 29304–29320 (2021).