Loading...
Searching...
No Matches
AcquisitionStrategy.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) gpridge developers
3// See LICENSE for details.
4
17
18#ifndef GPR_NEB_ACQUISITIONSTRATEGY_H_
19#define GPR_NEB_ACQUISITIONSTRATEGY_H_
20
21#include <Eigen/Dense>
22#include <random>
23#include <vector>
24
25namespace gpr {
26namespace neb {
27
31enum class AcquisitionType {
32 MaxVariance, // Select image with highest posterior force variance
33 MaxForce, // Select image with highest NEB force
34 UCB, // Upper confidence bound: force magnitude + kappa * sigma_perp
35 ThompsonSampling, // Sample from GP posterior, select maximum force
36 // magnitude
37 IMSPE, // GP-OIE chain IMSPE (Sacks 1989, R&W 5.4.2).
38 // selectNextImage scores joint energy+gradient
39 // variance, not the chain IMSPE reduction.
40 ExpectedImprovement, // EI for argmax-E saddle finding (R&W 5.4.1).
41 // selectNextImage scores energy variance.
42 PriorityCascade, // GP-OIE outer-loop cascade selector.
43 // selectNextImage scores joint energy+gradient
44 // variance.
45 TPE, // GP-OIE interior-index TPE
46 // (oie::selectTpeOracleTarget). selectNextImage
47 // scores joint energy+gradient variance and
48 // does not use kappa.
49 PSBAX, // GP-OIE chain PS-BAX (Cheng et al. NeurIPS
50 // 2024; InfoBAX, Neiswanger et al. ICML 2021).
51 // selectNextImage scores joint energy+gradient
52 // variance.
53};
54
63 double energy = 0.0;
64 Eigen::VectorXd gradient;
65};
66
93int selectNextImage(const std::vector<Eigen::VectorXd>& neb_forces,
94 const std::vector<ObservationVariance>& variances,
95 const std::vector<Eigen::VectorXd>& tangents,
96 const std::vector<bool>& evaluated,
97 AcquisitionType strategy, double kappa = 1.0,
98 std::mt19937* rng = nullptr);
99
110std::vector<int> expandToTriplet(int center, int n_total);
111
122double perpendicularSigma(const Eigen::VectorXd& gradient_variance,
123 const Eigen::VectorXd& tangent);
124
125} // namespace neb
126} // namespace gpr
127
128#endif // GPR_NEB_ACQUISITIONSTRATEGY_H_
The nudged elastic band: path, GP-NEB driver, configuration and result, acquisition,...
int selectNextImage(const std::vector< Eigen::VectorXd > &neb_forces, const std::vector< ObservationVariance > &variances, const std::vector< Eigen::VectorXd > &tangents, const std::vector< bool > &evaluated, AcquisitionType strategy, double kappa, std::mt19937 *rng)
Select the next unevaluated intermediate image by a per-image score.
std::vector< int > expandToTriplet(int center, int n_total)
Expand a single image index to a triplet {i-1, i, i+1}.
double perpendicularSigma(const Eigen::VectorXd &gradient_variance, const Eigen::VectorXd &tangent)
Compute perpendicular GP variance (variance orthogonal to path tangent).
AcquisitionType
Available acquisition strategies for image selection.
Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
Definition Macros.h:16
Predictive variance of one joint energy-and-gradient observation.