Parallel Optimization

There are some situations where it can be beneficial to run multiple optimizations in parallel. For example, if your objective function is very expensive to evaluate, you may want to run multiple evaluations in parallel.

Surrogates.potential_optimal_points — Function
potential_optimal_points(alg, strategy, lb, ub, surrogate, sample_type, n_parallel;
    num_new_samples = 500)

Return a batch of candidate points selected from the current surrogate without evaluating the true objective.

This is the generic interface used for parallel surrogate optimization. The method deep-copies the surrogate, selects one candidate at a time, and calls the virtual-point strategy to update the temporary surrogate between selections.

Arguments

  • alg::SurrogateOptimizationAlgorithm: optimization strategy, currently implemented for SRBF.
  • strategy::ParallelStrategy: virtual-point update strategy such as MinimumConstantLiar or KrigingBeliever.
  • lb: lower bound of the search domain.
  • ub: upper bound of the search domain.
  • surrogate: fitted surrogate satisfying the AbstractSurrogate evaluation and update! interface.
  • sample_type::SamplingAlgorithm: sampling strategy used to generate the candidate pool.
  • n_parallel::Integer: number of candidate points to return.

Keywords

  • num_new_samples: number of sampled candidate points considered before selecting the batch.

Returns

A tuple (points, merits), where points contains the selected candidate locations and merits contains their merit-function values.

source
potential_optimal_points(::LCBS, strategy, lb, ub, krig, sample_type, n_parallel;
    num_new_samples = 100, k = 2.0)

Propose n_parallel points by the lower confidence bound acquisition.

Each round scores a fresh candidate pool by $\mu(x) - k\sigma(x)$ against a temporary surrogate carrying a virtual value at every point already chosen, so a batch never proposes the same point twice. Returns (points, bounds).

source
Surrogates.MinimumConstantLiar — Type
MinimumConstantLiar()

Virtual-point strategy that inserts the current minimum observed surrogate value for each selected parallel point.

Interface

MinimumConstantLiar is used with potential_optimal_points and requires the surrogate to expose observed responses through surrogate.y.

source
Surrogates.MeanConstantLiar — Type
MeanConstantLiar()

Virtual-point strategy that inserts the mean observed surrogate value for each selected parallel point.

Interface

MeanConstantLiar is used with potential_optimal_points and requires the surrogate to expose observed responses through surrogate.y.

source
Surrogates.MaximumConstantLiar — Type
MaximumConstantLiar()

Virtual-point strategy that inserts the current maximum observed surrogate value for each selected parallel point.

Interface

MaximumConstantLiar is used with potential_optimal_points and requires the surrogate to expose observed responses through surrogate.y.

source
Surrogates.KrigingBeliever — Type
KrigingBeliever()

Virtual-point strategy that uses the Kriging surrogate prediction as the temporary objective value for each selected parallel point.

Interface

KrigingBeliever is passed to potential_optimal_points. It requires a Kriging surrogate with callable prediction and update! support.

source
Surrogates.KrigingBelieverUpperBound — Type
KrigingBelieverUpperBound()

Virtual-point strategy that updates the temporary Kriging surrogate with an upper-confidence value at each selected parallel point.

Interface

Use this strategy with potential_optimal_points when optimistic batching should account for Kriging uncertainty through prediction + std_error_at_point(...).

source
Surrogates.KrigingBelieverLowerBound — Type
KrigingBelieverLowerBound()

Virtual-point strategy that updates the temporary Kriging surrogate with a lower-confidence value at each selected parallel point.

Interface

Use this strategy with potential_optimal_points when batching should favor exploitation through prediction - std_error_at_point(...).

source

Ask-Tell Interface

To enable parallel optimization, we make use of an Ask-Tell interface. The user will construct the initial surrogate model the same way as for non-parallel surrogate models, but instead of using surrogate_optimize!, the user will use potential_optimal_points. This will return the coordinates of points that the optimizer has determined are most useful to evaluate next. How the user evaluates these points is up to them. The Ask-Tell interface requires more manual control than surrogate_optimize!, but it allows for more flexibility. After the point has been evaluated, the user will tell the surrogate model the new points with the update! function.

Virtual Points

To ensure that points of interest returned by potential_optimal_points are sufficiently far from each other, the function makes use of virtual points. They are used as follows:

  1. potential_optimal_points is told to return n points.
  2. The best-scoring candidate is selected. SRBF minimizes its merit function, EI maximizes expected improvement, and LCBS minimizes the lower confidence bound.
  3. This point is now treated as a virtual point: it is added to a temporary copy of the surrogate with an assigned value, which changes the acquisition landscape. How that value is chosen depends on the strategy used (see below). The surrogate you passed in is never modified.
  4. The best-scoring candidate under the updated temporary surrogate is selected. Candidates within the minimum-separation tolerance of an already-chosen point are rejected, so a batch never repeats a point.
  5. The process is repeated until n points have been selected.

potential_optimal_points is available for SRBF(), EI() and LCBS(). DYCORS schedules its coordinate-perturbation probability on the iteration index, which a batch has no counterpart for, and SOP already evaluates several centers per iteration; both raise an ArgumentError here and should be called through surrogate_optimize! instead.

The following strategies are available for virtual point selection with any of the three supported algorithms:

  • "Minimum Constant Liar (MinimumConstantLiar)":

    • The virtual point is assigned the lowest observed objective value.
  • "Mean Constant Liar (MeanConstantLiar)":

    • The virtual point is assigned the mean of the observed objective values.
  • "Maximum Constant Liar (MaximumConstantLiar)":

    • The virtual point is assigned the greatest observed objective value.

For Kriging surrogates, specifically, the above and following strategies are available:

  • "Kriging Believer (KrigingBeliever):

    • The virtual point is assigned the Kriging mean at that point, predicted by the temporary surrogate, so each belief accounts for the ones already placed in this batch.
  • "Kriging Believer Upper Bound (KrigingBelieverUpperBound)":

    • The virtual point is assigned 3$\sigma$ above the temporary surrogate's mean at that point.
  • "Kriging Believer Lower Bound (KrigingBelieverLowerBound)":

    • The virtual point is assigned 3$\sigma$ below the temporary surrogate's mean at that point.

A gradient-enhanced surrogate such as GEK or GEKPLS needs a gradient alongside every response, so a virtual point carries one too: the model's own slope at that point is used, meaning the virtual observation misstates only the response and asserts nothing about the slope the model does not already believe.

In general, MinimumConstantLiar and KrigingBelieverLowerBound tend to favor exploitation, while MaximumConstantLiar and KrigingBelieverUpperBound tend to favor exploration. MeanConstantLiar and KrigingBeliever tend to be compromises between the two.

Examples

using Surrogates

lb = 0.0
ub = 10.0
f = x -> log(x) * exp(x)
x = sample(5, lb, ub, SobolSample())
y = f.(x)

my_k = Kriging(x, y, lb, ub)

for _ in 1:10
    new_x,
    eis = potential_optimal_points(
        EI(), MeanConstantLiar(), lb, ub, my_k, SobolSample(), 3)
    update!(my_k, new_x, f.(new_x))
end