Optuna 5.0.0: single-obj default → Multivariate TPE (+ constant liar, enhanced bandwidth); multi-obj NSGA-II → Multi-Objective TPE; importance → PED-ANOVA. Same seed may diverge after ~trial 10. Revert: TPESampler(multivariate=False, constant_liar=False). Not investment advice.
Optuna 5.0.0 is on PyPI. The headline for after-work hyperparameter notebooks is a default sampler algorithm change, documented in the v5.0.0-rc1 release notes (same story for GA v5.0.0). This note is an upgrade checklist for Python / data / ML / quant learners — not investment advice.
The only course CTA is Introduction to Python Programming.
| Scope | Before (typical v4 mental model) | Optuna 5.0 default |
|---|---|---|
| Single-objective sampler | Classic / independent TPE path many notebooks assumed | Multivariate TPE + constant liar + enhanced bandwidth (Watanabe 2023; see also Preferred’s Multivariate TPE write-up) |
| Multi-objective sampler | NSGA-II as the familiar default | Multi-Objective TPE (TPESampler for multi-obj) |
| Hyperparameter importance | Older importance defaults | PED-ANOVA (Conditional PED-ANOVA; KDD 2026 paper line) as the default importance algorithm |
TPESampler still uses a startup phase (n_startup_trials, default 10). After that window, the new multivariate / constant-liar defaults can send suggestions onto a different trajectory than Optuna 4.x — even with the same seed. Treat “I pinned seed=42 so my study is bitwise identical” as false across a 4.x → 5.0 bump unless you pin the sampler kwargs below.
import optuna
from optuna.samplers import TPESampler
sampler = TPESampler(multivariate=False, constant_liar=False, seed=42)
study = optuna.create_study(sampler=sampler)
# study.optimize(objective, n_trials=...)
Check versions before you blame the objective:
python -c "import optuna; print(optuna.__version__)"
pip install "optuna==5.0.0" # or pin deliberately if you need 4.x behaviour longer
optuna.__version__ in every long-lived notebook.TPESampler(multivariate=False, constant_liar=False) explicitly.Upgrade (or pin) Optuna, run one tiny study, compare trial ~1–15 suggestions. If Python packaging is the blocker, Introduction to Python Programming.