mixle.doe.trust_region module¶
Trust-region Bayesian optimization (TuRBO, Eriksson et al. 2019) for higher-dimensional problems.
Global GP-BO degrades in high dimensions: one global surrogate is hard to fit and the acquisition is over-exploratory. TuRBO instead keeps a trust region – a box centered on the best point – and runs the BO only inside it, via Thompson sampling. The box side length grows after consecutive improvements and shrinks after consecutive failures; when it collapses, the search restarts from a fresh design. This local, self-tuning focus makes BO work for tens of dimensions where global EI stalls.
turbo_minimize() is the optimization loop (it calls your objective); TrustRegion is the
expand/shrink state if you want to drive the loop yourself. Both fit the torch GP surrogate.
- class TrustRegion(dim, length=0.8, length_min=0.0078125, length_max=1.6, success_tol=3, failure_tol=0, _success=0, _failure=0)[source]
Bases:
objectExpand/shrink state of a TuRBO trust region (side length in normalized
[0, 1]^dcoordinates).The length doubles after
success_tolconsecutive improving batches and halves afterfailure_tolconsecutive non-improving ones;collapsedis True once it drops belowlength_minand the caller should restart.failure_toldefaults to the dimension (Eriksson 2019).- Parameters:
- dim: int
- length: float = 0.8
- length_min: float = 0.0078125
- length_max: float = 1.6
- success_tol: int = 3
- failure_tol: int = 0
- property collapsed: bool
- turbo_minimize(objective, bounds, *, n_init=None, max_evals=100, batch_size=1, maximize=False, n_candidates=None, seed=None, fit_kwargs=None)[source]
Optimize a black-box
objectiveoverboundswith TuRBO (trust-region BO).Starts from a Latin-hypercube design of
n_initpoints (default2*d), then repeatedly fits a GP on the normalized data, draws Thompson candidates inside the current trust region, evaluates the bestbatch_sizeof them, and resizes the region by success/failure. On collapse it restarts from a new design. Runs untilmax_evalsobjective calls. Returns{'x', 'y', 'X', 'Y', 'n_restarts'}with the best point/value and the full history.