|
| 1 | +--- |
| 2 | +id: constraints |
| 3 | +title: Constraints |
| 4 | +--- |
| 5 | + |
| 6 | +BoTorch supports two distinct types of constraints: Parameter constraints |
| 7 | +and outcome constraints. |
| 8 | + |
| 9 | + |
| 10 | +### Parameter Constraints |
| 11 | + |
| 12 | +Parameter constraints are constraints on the input space that restrict the |
| 13 | +values of the generated candidates. That is, rather than just living inside |
| 14 | +a bounding box defined by the `bounds` argument to `optimize_acqf` (or its |
| 15 | +derivates), candidate points may be further constrained by linear (in)equality |
| 16 | +constraints, specified by the `inequality_constraints` and `equality_constraints` |
| 17 | +arguments to `optimize_acqf`. |
| 18 | + |
| 19 | +Parameter constraints are used e.g. when certain configurations are infeasible |
| 20 | +to implement, or would result in excessive costs. These constraints do not affect |
| 21 | +the model directly, only indirectly in the sense that all newly generated and |
| 22 | +later observed points will satisfy these constraints. In particular, you may |
| 23 | +have a model that is fit on points that do not satisfy a certain set of parameter |
| 24 | +constraints, but still generate candidates subject to those constraints. |
| 25 | + |
| 26 | + |
| 27 | +### Outcome Constraints |
| 28 | + |
| 29 | +In the context of Bayesian Optimization, outcome constraints usually mean |
| 30 | +constraints on some (black-box) outcome that needs to be modeled, just like |
| 31 | +the objective function is modeled by a surrogate model. Various approaches |
| 32 | +for handling these types of constraints have been proposed, a popular one that |
| 33 | +is also adopted by BoTorch (and available in the form of `ConstrainedMCObjective`) |
| 34 | +is to use variant of expected improvement in which the improvement in the objective |
| 35 | +is weighted by the probability of feasibility under the (modeled) outcome |
| 36 | +constraint ([^Gardner2014], [^Letham2017]). |
| 37 | + |
| 38 | +See the [Closed-Loop Optimization](../tutorials/closed_loop_botorch_only) |
| 39 | +tutorial for an example of using outcome constraints in BoTorch. |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | +[^Gardner2014]: J.R. Gardner, M. J. Kusner, Z. E. Xu, K. Q. Weinberger and |
| 44 | +J. P. Cunningham. Bayesian Optimization with Inequality Constraints. ICML 2014. |
| 45 | + |
| 46 | +[^Letham2017]: B. Letham, B. Karrer, G. Ottoni and E. Bakshy. Constrained Bayesian optimization with noisy experiments. Bayesian Analysis 14(2), 2019. |
0 commit comments