How does a median pruner decide when to abort a trial?

Quick Overview

Asks how a median pruner, such as the one in Optuna, decides to stop an unpromising hyperparameter trial partway through training. Tests whether you know what is compared at each step, which trials form the reference, the warmup and startup safeguards, and where the rule cuts good trials.

How does a median pruner decide when to abort a trial?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

In hyperparameter search with early stopping of unpromising trials (for example Optuna's `MedianPruner`), how does a median pruner decide when to abort a trial? ```hint What gets compared At a given training step, think about which number from the current trial is compared with which numbers from other trials, and at which step those numbers were recorded. ``` ```hint Early in the study Consider what keeps the pruner from acting on the very first trials or on noisy early epochs. ``` ### What a Strong Answer Covers - Which value from the current trial is compared, and against what reference at the same step - Which trials supply the reference values, and how the comparison flips for minimizing versus maximizing - The settings that delay or limit pruning: startup trials, warmup steps, check interval, minimum number of reporting trials - How the objective code reports intermediate values and stops a trial - Where the rule goes wrong, such as learning curves that cross ### Follow-up Questions - Which hyperparameter settings does a median pruner tend to kill unfairly, and how would you protect them? - How does median pruning differ from successive halving or Hyperband? - How would you make pruning more or less aggressive? - What changes when 32 workers run trials in parallel from the start of a study?

Overview: Asks how a median pruner, such as the one in Optuna, decides to stop an unpromising hyperparameter trial partway through training. Tests whether you know what is compared at each step, which trials form the reference, the warmup and startup safeguards, and where the rule cuts good trials.

General logo
General
Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

In hyperparameter search with early stopping of unpromising trials (for example Optuna's MedianPruner), how does a median pruner decide when to abort a trial?

What a Strong Answer Covers Guidance

  • Which value from the current trial is compared, and against what reference at the same step
  • Which trials supply the reference values, and how the comparison flips for minimizing versus maximizing
  • The settings that delay or limit pruning: startup trials, warmup steps, check interval, minimum number of reporting trials
  • How the objective code reports intermediate values and stops a trial
  • Where the rule goes wrong, such as learning curves that cross

Follow-up Questions Guidance

  • Which hyperparameter settings does a median pruner tend to kill unfairly, and how would you protect them?
  • How does median pruning differ from successive halving or Hyperband?
  • How would you make pruning more or less aggressive?
  • What changes when 32 workers run trials in parallel from the start of a study?