Unit 9 of 12 · about 3 hours · derive, measure

Interquartile mean, performance profiles and stratified bootstrap intervals

A few lucky runs can make any method look best. IQM plus profiles plus stratified intervals show the whole distribution instead of the luckiest point.

You'll be able to

  • Compute the interquartile mean as a 25 percent trimmed mean across all runs.
  • Read and build performance profiles as score distributions over thresholds.
  • Report stratified bootstrap intervals with the correct resampling unit and CI layout.

Covers

Interquartile mean, performance profiles and stratified bootstrap
1

Read

In this order, only the parts listed

0 of 2 done

  1. Precipice paper: stratified bootstrap, profiles and IQMDeep Reinforcement Learning at the Edge of the Statistical Precipice

    arXiv:2108.13264v4 Section 4.1: stratified bootstrap resampling runs independently per task; Section 4.2: performance profiles as run-score distributions over thresholds with bootstrap bands; Section 4.3: IQM as the 25 percent trimmed mean with Figures 6 to 7

  2. rliable: aggregate_iqm, interval estimates and profilesrliable

    rliable/metrics.py: aggregate_iqm with trim_mean proportiontocut=0.25 and probability_of_improvement; rliable/library.py: get_interval_estimates returning point estimates then interval arrays of shape (2, ...) with row 0 lower and row 1 upper, and create_performance_profile over tau_list with use_score_distribution

2

Focus on

  • IQM discards the bottom and top 25 percent of all runs and means the rest: for scores 0 to 7 it is 3.5, the mean of 2, 3, 4 and 5.
  • A profile value at is the fraction of runs scoring above ; higher curves are better and crossing curves mean the ranking depends on the threshold.
  • Stratified bootstrap resamples runs independently within each task, which respects the runs-times-tasks structure instead of pooling everything.
  • Report the aggregate with its interval and keep the per-run data: the interval is the result, not decoration on a point estimate.
Common mistakes · 3
  • Unpacking the interval call backwards. It returns point estimates first and intervals second; the docstring example also writes metrics.aggregate_IQM, which does not exist, so call metrics.aggregate_iqm exactly.
  • Reading CI rows swapped. Row 0 is the lower bound and row 1 the upper; swapped rows print nonsense like (0.449, 0.445).
  • Averaging task means before profiling. Score distributions across all runs carry less uncertainty than average-score distributions; the library defaults to score distributions for this reason.
3

Try it yourself

Closed-book, before checking anything

Closed-book, compute IQM of 0 to 7 as 3.5 and a profile value for a tiny score set at one threshold. Write the rliable call to get_interval_estimates from memory, unpacking as point then interval with a seed, and state the CI row layout.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.Scores 0 to 7 across runs. What is the IQM?Answer

    3.5. Drop the bottom two and top two values 0, 1, 6, 7 and mean the remaining 2, 3, 4, 5.

  2. 2.A profile shows 0.1 for A and 0.5 for B at threshold 0.6. What does that say?Answer

    Half of B runs beat 0.6 against a tenth of A runs. It compares full distributions at that threshold, not just centers.

  3. 3.Why resample runs independently per task instead of pooling all scores?Answer

    Tasks have different scales and difficulties. Stratification keeps each task represented and stops an easy task from dominating the interval.

  4. 4.Two curves cross in a performance profile. Which method is better?Answer

    Neither uniformly. Each wins on some threshold range; report IQM with intervals plus the profiles instead of picking one threshold.

5

Practice

  • rliable test suite: metrics and library tests

    tests/rliable/metrics_test.py test_aggregate_metrics and tests/rliable/library_test.py test_stratified_bootstrap, test_performance_profiles and test_improvement_probability_cis; then compute IQM, profiles and stratified intervals on your own run records

    Runs on CPU. Install with pandas<3, because arch fails to import under pandas 3; the named tests pass with pandas 2.2.3 on Python 3.13 and pandas 2.3.3 on Python 3.14 (checked 2026-10-14). Unpack as point then interval; row 0 is lower, row 1 upper.

You're done when

The rliable tests pass and your own run records produce an IQM with interval plus a profile with bands, all regenerated from retained per-run data.

Only when you can do this without notes.

Leads to

Notes

Resources · 2 for this unit, 12 more in the section
  • Deep Reinforcement Learning at the Edge of the Statistical PrecipiceDeepMind and Google Research · required

    Study the failure of common point estimates and small-seed comparisons. Report interval estimates, aggregate-score sensitivity and performance profiles with the underlying per-run data retained.

  • rliableGoogle Research · support

    Use the official repository to compute interquartile means, stratified bootstrap intervals and performance profiles for the track experiments. Verify the input run and task axes and keep plots reproducible from raw run records; check the pandas version it needs in your environment.

Also in this section

  • Berkeley CS 185/285 Deep Reinforcement Learning (Spring 2026) - Exploration and Off-Policy Actor-CriticUC Berkeley · primary

    Slides are public at https://rail.eecs.berkeley.edu/deeprlcourse/static/slides/lec-N.pdf; current videos are not, and the public Fall 2023 playlist numbers lectures differently. Study Lecture 19 (exploration) and Lecture 23 (advanced exploration), and the SAC part of Homework 3 (src/agents/sac_agent.py on InvertedPendulum and Hopper; HalfCheetah needs hours on a GPU). The homework pins gym==0.25.2, which fails on NumPy 2, so port it to Gymnasium (terminated and truncated) or pin numpy<2 in its own environment, and turn off its forced WandB logging.

  • Stanford CS234 Winter 2026 - Bandits and ExplorationStanford University · required

    Study Lectures 9 to 12 (bandits, optimism and upper confidence bounds, exploration in MDPs). Rebuild one exploration comparison with matched information, interaction, update and tuning budgets.

  • Stanford CS224R Spring 2026 - Off-Policy and Goal-Conditioned RLStanford University · required

    Study Lecture 05 (off-policy actor-critic) and Lecture 12 (multi-task and goal-conditioned RL) and their DDPG and HER readings. Implement one goal relabeling test on a small task.

  • Soft Actor-Critic Algorithms and ApplicationsBerkeley AI Research · required

    Read the maximum-entropy objective, the soft policy iteration and the actor and critic targets, then the automatic temperature adjustment (this version adds it; the first SAC paper used a fixed temperature). Implement or audit a compact SAC path and compare sample efficiency and wall time with PPO under a matched protocol.

  • Addressing Function Approximation Error in Actor-Critic Methods (TD3)Fujimoto, van Hoof and Meger (ICML 2018) · required

    Read the overestimation analysis for actor-critic methods, clipped double Q-learning, delayed policy updates and target policy smoothing. Ablate one of the three changes on a small continuous task with matched seeds.

  • Hindsight Experience ReplayAndrychowicz et al. (NeurIPS 2017) · required

    Read the goal-conditioned setup and the relabeling strategies (final, future, episode). Implement relabeling on a sparse-reward bit-flipping or goal task and test that relabeled transitions carry the substituted goal and its recomputed reward.

  • Exploration by Random Network DistillationBurda et al. (ICLR 2019) · support

    Read the prediction-error bonus, the separate intrinsic and extrinsic value heads and the non-episodic intrinsic return. Use it to explain why a novelty bonus depends on the representation and how it can reward noise.

  • Unifying Count-Based Exploration and Intrinsic MotivationBellemare et al. (NeurIPS 2016) · support

    Read the pseudocount derivation from a density model and the exploration bonus built on it. Compare a tabular count bonus with its pseudocount form on a small grid.

  • What Matters in On-Policy Reinforcement Learning? A Large-Scale Empirical StudyAndrychowicz et al. (2020) · support

    Read the experimental protocol and the recommendations on normalization, initialization and hyperparameter sensitivity. Use it to set a tuning budget that is the same for every method you compare.

  • Hands-on Modern RL - DDPG, TD3, SAC and Intrinsic MotivationWalking Labs · support

    Use the DDPG and TD3 and SAC pages for vocabulary and the intrinsic-motivation page for concepts only. Its displayed TD3 target omits the terminal mask (the code has it), its SAC chart is author-reported, and its multi-agent demo does not learn; do not use those as practice. Pin commit 9231bab of walkinglabs/hands-on-modern-rl; its code/chapterNN folders do not follow the site chapter numbers.

  • Gymnasium documentation: API, time limits, vector envs and wrappersFarama Foundation · reference

    Use the Env API page for the reset and step contract, the handling-time-limits tutorial for termination versus truncation bootstrapping, the vector env pages for SyncVectorEnv and AsyncVectorEnv autoreset modes, and the wrappers table for RecordEpisodeStatistics, ClipAction, NormalizeObservation and TimeLimit.

  • Stable-Baselines3 RL Tips and TricksStable-Baselines3 · reference

    Use How to evaluate an RL algorithm for separate test envs, EvalCallback and deterministic eval; Which algorithm should I use for the discrete/continuous/goal picker and HER pointer; the custom-environment section for Markov, normalization and TimeLimit handling; and the seed-variance and RL-zoo tuning advice. Treat SOTA and speedup claims as pointers, not targets.