Skip to content

Add Meta-Learn TPE sampler (Warm-starting via Task Similarity)#360

Open
yasumorishima wants to merge 5 commits intooptuna:mainfrom
yasumorishima:add-meta-learn-tpe
Open

Add Meta-Learn TPE sampler (Warm-starting via Task Similarity)#360
yasumorishima wants to merge 5 commits intooptuna:mainfrom
yasumorishima:add-meta-learn-tpe

Conversation

@yasumorishima
Copy link
Contributor

Summary

  • Implements task similarity-based meta-learning for TPE (Watanabe et al., IJCAI 2023)
  • Transfers knowledge from completed source studies to accelerate optimization on related target tasks
  • Uses weighted mixture of TPE models based on Total Variation distance between promising regions
  • No additional dependencies beyond Optuna

How it works

  1. Build TPE models for each source study and the target study
  2. Compute task similarity via Monte-Carlo estimation of TV distance on below (promising) distributions
  3. Weight tasks proportionally to similarity
  4. Sample candidates from all tasks and score with weighted acquisition function

Benchmark

Standard TPE mean best: 0.9686, Meta-Learn TPE mean best: 0.0183 (98% improvement, 10 runs × 30 trials, 3 source studies on shifted quadratic)

Test plan

  • Basic 1D optimization with single source study
  • Multi-dimensional with multiple source studies
  • Empty source_studies raises ValueError
  • Categorical + log-scale parameters
  • Benchmark comparison vs standard TPE
  • ruff lint passes
  • Docstring coverage 100%

Closes #190

🤖 Generated with Claude Code

yasumorishima and others added 5 commits March 14, 2026 11:22
Implements task similarity-based meta-learning for TPE, based on
Watanabe et al. (IJCAI 2023). Transfers knowledge from completed
source studies to accelerate optimization on related target tasks.

Key features:
- Computes task similarity via Total Variation distance on promising regions
- Weighted mixture of TPE models across target and source tasks
- Falls back to standard TPE during startup trials
- No additional dependencies beyond Optuna

Benchmark: 98% improvement over standard TPE on shifted quadratic
(10 runs x 30 trials, 3 source studies).

Closes optuna#190

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@y0z y0z self-assigned this Mar 16, 2026
@y0z
Copy link
Member

y0z commented Mar 16, 2026

@nabenabe0928 Do you have any comments?

@y0z y0z added the new-package New packages label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-package New packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Warm-starting or Meta-learning capability for Tree-structured Parzen Estimator

2 participants