Add support for constrained multi-objective optimization in GPSampler#6224
Merged
nabenabe0928 merged 10 commits intooptuna:masterfrom Aug 1, 2025
Conversation
…onstrained-multiobjective-optimization-in-gpsampler
nabenabe0928
reviewed
Aug 1, 2025
nabenabe0928
reviewed
Aug 1, 2025
nabenabe0928
reviewed
Aug 1, 2025
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
GPSmplerGPSampler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This PR adds support for constrained multi-objective optimization in
GPSampler, extending the functionality introduced in:GPSamplerto support constraint functions #5715; andGPSampler#6069,which added support for constrained optimization and multi-objective optimization in
GPSampler, respectively.Here, we use the
ConstrainedLogEHVIintroduced in:ConstrainedLogEHVI#6198.Description of the changes
sample_relativemethod inGPSamplerto support constrained multi-objective optimization.Benchmarks
I conduct benchmarks to evaluate the effectiveness of this new feature.
Benchmarking Setup
Benchmarking Problem. I use the C2-DTLZ2 problem 1, available in the C-DTLZ problem collection on OptunaHub. I set the number of objectives to two and the number of variables to three. See the original paper 1 and the OptunaHub document for more details.
Implementation Details. I set the number of trials to 300. Also, I use
deterministic_objective=TrueforGPSampler, since the C2-DTLZ problem is deterministic. The benchmarking code and the visualization code I used is as follows:The benchmarking code
benchmark.py
benchmark.sh
The visualization code for the Pareto front
plot_pareto_front.py
place_figures.tex
plot_pareto_front.sh
The visualization code for the hypervolume history
plot_hyprvolume_history.sh
#!/bin/bash python plot_hypervolume_history.py --constraint_type 2 --function_id 2Machine Specifications. The benchmarks are conducted on a computer running Arch Linux with Intel® Core™ i9-14900HX processor (24 cores, 32 threads, up to 5.8GHz) and Python 3.11.0.
Results
Figure 1 illustrates the obtained Pareto fronts, while Figure 2 shows the history of the best feasible hypervolume across trials. For the detailed discussions, see our blog post.
(a) `GPSampler` w/ constraints.
(b) `GPSampler` w/o constraints.
(c) `TPESampler` w/ constraints.
(d) `NSGAIISampler` w/ constraints.
Figure 1. Obtained Pareto fronts for the C2-DTLZ2 problem after 300 trials. The results show that the constraint-aware
GPSampler(a) effectively reduces wasted evaluations in infeasible regions compared toGPSamplerwithout constraint handling (b) andTPESampler(c), whileNSGAIISampler(d) remains far from convergence after 300 trials.Figure2. History of the best feasible hypervolume on the C2-DTLZ2 problem 1. The solid lines denote the mean, and the shaded regions denote the standard error, both computed over five independent runs with different random seeds.
GPSamplerwith constraint handling achieves faster convergence to higher hypervolume values compared toTPESamplerandNSGAIISampler, demonstrating the effectiveness of the new feature in reducing evaluation cost.Footnotes
Jain, H., and Deb, K. An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point Based Nondominated Sorting Approach, Part II: Handling Constraints and Extending to an Adaptive Approach. In IEEE Transactions on Evolutionary Computation, 18(4):602–622, 2014. ↩ ↩2 ↩3