Sitemap
Optuna

A Hyperparameter Optimization Framework https://github.com/optuna/optuna/

Announcing Optuna 4.4

--

Introduction

We have released version 4.4 of the black-box optimization framework Optuna. We encourage you to check out the release note!

In addition to feature additions, bug fixes, and improvements in documentation and testing, version 4.4 introduces a new tool called the Optuna MCP Server. This blog post provides a brief overview of all the new features included in Optuna v4.4.

Please try upgrading to the latest versions of Optuna and OptunaHub!

$ pip install -U optuna optunahub

Optuna MCP Server

The Model Context Protocol (MCP) is a standardized communication protocol between large language models (LLMs) and applications. MCP’s SDKs are available for languages such as Python, C#, and Java. The adoption of MCP is increasing as services and software, such as GitHub and MySQL, have recently started offering MCP-compatible servers. And, real-world integrations of LLMs are becoming widely spread. To enable seamless use of Optuna alongside LLMs, we have developed an MCP server for Optuna.

The Optuna MCP server can be accessed by any MCP client via uv— for instance, with Claude Desktop, simply add the following configuration to your MCP server settings file. (Of course, other LLM clients like VSCode or Cline can also be used similarly. You can also access it via Docker. For details, please refer to the repository.) If you want to persist the results, you can use the --storage option.

{
"mcpServers": {
… (Other MCP Servers' settings)
"Optuna": {
"command": "uvx",
"args": ["optuna-mcp"]
}
}
}

By utilizing the Optuna MCP server, LLM clients can perform optimization and analysis using Optuna. For example, Figure 1 demonstrates an actual case where an Optuna MCP server was installed on Claude Desktop, and the LLM was instructed to optimize a two-dimensional spherical function. The input prompts were as follows:

  • Please create an Optuna study named “Optimize-2D-Sphere” for minimization.
  • Please suggest two float parameters x, y in [-1, 1].
  • Please report the objective value x**2 + y**2. To calculate the value, please use the JavaScript interpreter and do not round the values.
  • Please suggest another parameter set and evaluate it.
  • Please plot the optimization history so far.
Figure 1: Example optimization of a 2D spherical function using the Optuna MCP server

The Optuna maintainers believe this newly released server has various potential use cases. While we’ll be introducing them ourselves, we encourage the community to share any interesting use cases they come up with. The Optuna MCP server’s GitHub repository is actively collecting feedback — feel free to create an issue with your suggestions.

Additionally, the released Optuna MCP server is still under active development! Please note that the features in v0.1.0 are experimental, and breaking changes may be introduced in future updates. We actively welcome feature requests and contributions through our GitHub repository — we encourage you to join us in the development process.

Gaussian Process-Based Multi-objective Optimization

Optuna’s GPSampler, introduced in version 3.6, offers superior speed and performance compared to existing Bayesian optimization frameworks, particularly when handling objective functions with discrete variables. In Optuna v4.4, we have extended this GPSampler to support multi-objective optimization problems. The applications of multi-objective optimization are broad, and the new multi-objective capabilities introduced in this GPSampler are expected to find applications in fields such as material design, experimental design problems, and high-cost hyperparameter optimization.

GPSampler can be easily integrated into your program. We encourage you to try it out with your multi-objective optimization problems.

sampler = optuna.samplers.GPSampler()
study = optuna.create_study(directions=["minimize", "minimize"], sampler=sampler)

Figure 2 presents performance comparisons of speed and performance for a nine-dimensional input and four-dimensional output multi-objective optimization problem from the WFG5. We compared GPSampler against two samplers: BoTorchSampler, a Gaussian process-based optimizer available in optuna-integration, and NSGAIISampler, Optuna’s standard multi-objective optimization algorithm. From Figure 2 (left), we observe that while both GPSampler and BoTorchSampler require O(N³) computation time per trial as a function of the number of trials N, GPSampler demonstrates significantly superior speed performance compared to BoTorchSampler. Furthermore, Figure 2 (right) shows that GPSampler also achieves better optimization performance than BoTorchSampler for this specific problem. Note that these experiments used a relatively small number of trials (200), which is insufficient for NSGAIISampler’s optimal performance. Additionally, all methods were terminated after 8 hours of total sampling time, explaining why BoTorchSampler’s results appear only partially completed.

Figure 2: Benchmark results for the multi-objective GPSampler using WFG5 (n_objectives=4, dimension=9, k=3). Both graphs show the number of trials on the x-axis, with shaded areas indicating standard error across five different seeds. Left graph: Hypervolume evolution by number of trials. The y-axis represents hypervolume, where larger values are preferable. Right graph: Run time by number of trials. The y-axis shows the elapsed execution time for each algorithm.

New Features in OptunaHub

During the development period of Optuna v4.4, several new features were also introduced to OptunaHub, the feature-sharing platform for Optuna:

Here, we will particularly introduce the Google Vizier-based sampler and the acquisition function visualization feature for TPESampler.

Google Vizier is a black-box optimization framework developed by Google. The figure below (Figure 3) compares the performance of Google Vizier’s sampler (VizierSampler) against various Optuna algorithms for the 21st problem in the BBOB benchmark suite, namely Gallagher’s Gaussian 101-me Peaks. The results show that VizierSampler performs best for this problem, with Optuna’s GPSampler coming in as the second-best performer. However, it’s important to note that VizierSampler isn’t universally superior to GPSampler; performance differences can vary significantly depending on the specific problem. For more detailed information, please refer to the VizierSampler documentation page.

Figure 3: Performance comparison of samplers in Gallagher’s Gaussian 101-me peaks

Next, let’s examine the acquisition function visualization feature for TPESampler. Figure 4 is a gif demonstrating how the TPESampler acquisition function transitions during optimization of a simple objective function: np.abs(x) — 10 * np.cos(x) + 10. We encourage you to try this feature directly from here.

Figure 4: Acquisition function visualization feature for TPESampler for the objective function of np.abs(x) — 10 * np.cos(x) + 10.

Other Improvements

In addition to these newly described feature developments, Optuna v4.4 includes numerous other improvements. For instance, several bugs were fixed in GrpcStorageProxy and Study components. The TPESampler, Optuna’s default sampler, now features simplified arguments (the consider_prior argument has been deprecated and fixed behavior when consider_prior=True). Furthermore, significant enhancements were made to OptunaHub. The API call limits problem was mitigated, the documentation was improved, and notably, the technical barrier preventing direct access to OptunaHub from Anaconda has been completely removed! In the next release, users will be able to access OptunaHub directly from Anaconda. For detailed information, please refer to the release note.

Conclusion

Optuna v4.4 introduces several new features, including the Optuna MCP server, a Gaussian process-based multi-objective optimization, and enhancements to OptunaHub. These updates are implemented in accordance with the recently released Optuna v5.0 roadmap. For example:

  • The Optuna MCP server is directly linked to the core concept of the v5.0 roadmap: “Unleashing the potential of black-box optimization with generative AI.” We released it as a component of the black-box optimization toolchain for generative AI applications.
  • The Gaussian process-based multi-objective optimization is tied to the core concept of the v5.0 roadmap of “Continuing the sustainable growth of Optuna.” Through enhanced functionality in GPSampler, this algorithm offers significant improvements in exploration performance for multi-objective optimization use cases.
  • The various new features added to OptunaHub are aligned with the v5.0 roadmap’s focus on “Continuing the sustainable growth of Optuna.” By incorporating diverse algorithms, analytical methods, and benchmark datasets based on community demand, Optuna has become even more user-friendly.

We’re excited to announce that we’ll continue releasing numerous new features for Optuna v5.0! Some upcoming enhancements include integrated LLM analytics capabilities in the Optuna Dashboard and significant improvements to Optuna’s default sampler. Keep an eye out for these exciting developments in Optuna’s evolution.

Contributors

The v4.4 release includes contributions from the following contributors. Thank you all!

@AdrianStrymer, @Ajay-Satish-01, @Alnusjaponica, @Copilot, @HideakiImamura, @ParagEkbote, @Prashantdhaka23, @Samarthi, @Shubham05122002, @SubhadityaMukherjee, @c-bata, @contramundum53, @copilot-pull-request-reviewer[bot], @fusawa-yugo, @gen740, @himkt, @hitsgub, @hrntsm, @kAIto47802, @lan496, @leevers, @milkcoffeen, @msdsm, @nabenabe0928, @not522, @nzw0301, @saishreyakumar, @sawa3030, @shmurai, @toshihikoyanase, @y0z

--

--

No responses yet