Introduction of objective constraints in botorch - unclear implementation and runtime issues #2434
-
Hello together, thanks for providing and maintaining the botorch library! I am having some issues with the introduction of objective/outcome constraints in multi-objective optimization. I am using the qNoisyExpectedHypervolumeImprovement acquisition function, where I am trying to introduce the constraints.
my constraint function looks like this:
After introducing this, I observe the following:
So I am not sure if I introduced the constraint correctly and what is causing these huge runtime increases. Furthermore, I was how I should adjust the optimize_acqf values: Should I tune them down when implementing constraints? Many thanks in advance for any help or comments! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Interesting; this is a somewhat non-standard setting. Typically, we assume that if an objective is maximized, we don't "cap" it. The proper way to incorporate this into the multi-objective optimization acquisition functions themselves, in this case A workaround could be for you to, rather than maximize temperature up to some upper threshold
It is expected for the optimization to take quite a bit longer with your setup. Each outcome constraint will be modeled by an additional GP model, and the optimization problem also becomes more challenging. You can avoid these issues with the workaround I mentioned above.
That the constraint is exceeded is expected somewhat frequently is expected (since it's modeled as a black-box constraint). By how much it exceeds the constraint depends somewhat on how uncertain the model is about certain regions. The constrained optimization works via probability-weighting the expected HV improvement, so you have sth like |
Beta Was this translation helpful? Give feedback.
-
@MoBurmeister Thank you for reaching out. Additional observations and suggestions here:
This is most likely primarily caused by either
You could analyze if the constraint model predicts the candidates returned by To ameliorate 1): You could improve the model either with a better prior mean (e.g. you could put a monotonic / linear function with a positive slope here if you know a-priori that certain inputs should generally increase the temperature. Otherwise, you could add a In any case, and to ameliorate 2), we generally and strongly recommend replacing Let me know if this helps or you have further thoughts or questions. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your detailed responses! It is indeed a non-typical setup and after trying around a bit the best solution is probably to change the objective into the minimization of the temperature difference. This worked out quite fine for me Thanks for explaining how the constraints internally work, I will consider this in the future. |
Beta Was this translation helpful? Give feedback.
Interesting; this is a somewhat non-standard setting. Typically, we assume that if an objective is maximized, we don't "cap" it.
The proper way to incorporate this into the multi-objective optimization acquisition functions themselves, in this case
qNoisyExpectedHypervolumeImprovement
. At this point Hypervolume-based acquisition functions don't support this, theirref_point
argumentbotorch/botorch/acquisition/multi_objective/monte_carlo.py
Line 331 in e44280e