How GPRidge finds a saddle¶
A first-order saddle point search on a reactive potential energy surface can need many energy and force evaluations, and each evaluation can be an electronic-structure calculation. GPRidge reduces that count by fitting a Gaussian-process (GP) surrogate to the evaluations already made, doing the optimizer’s work on the surrogate, and spending a true evaluation only where the surrogate cannot be trusted or where a result has to be confirmed. This page describes the pieces of that method in the order they act: the model, the fit of its hyperparameters, the choice of training rows, the choice of the next geometry to measure, the stopping rule, and the trust control. It points to the pages that derive or measure each piece and does not repeat them.
Status: implemented in gprn (nudged elastic band, NEB) and gprd (dimer).
Defaults quoted here are those of the current source tree; each is named with
the file or flag it comes from.
The method and its benchmarks are described in Goswami et al. [5]. The dimer implementation it builds on is Goswami et al. [3], and the farthest-point training subset and adaptive pruning are described in Goswami and Jónsson [1].
How to read the claims¶
Where a section makes claims of a stated kind, it ends with a short Standing paragraph that sorts them. Three labels are used.
Theorem: the claim follows from the definitions. The page names the derivation, the symbolic check, or the test that fixes it.
Choice: a design decision in the code. Nothing here says the choice is optimal.
Empirical: a claim about how the method behaves on real systems. The page names the measurement behind it. Where no committed measurement backs a claim, the page does not make it.
The loop¶
Both drivers repeat the same cycle.
Measure the oracle (the true potential) at the starting geometry or geometries. An oracle call returns one energy and the force components of the moving atoms.
Fit the GP to every measured row, refitting the hyperparameters on a schedule.
Run the optimizer on the surrogate with no oracle calls: the band relaxation for
gprn, the rotation and translation steps forgprd.Pick the geometry to measure next, inside a trust region around the training data.
Measure it and add the row.
Stop when the oracle force at the geometry the search would return is below the tolerance. Otherwise return to step 2.
The surrogate never decides convergence. A search that ends on a GP force alone is not reported as converged; the stopping rule below requires a measured force.
The surrogate¶
One latent function¶
Energy and every force component of the moving atoms are observations of one latent scalar function \(E(x)\) of the Cartesian positions \(x\). An oracle row therefore contributes one energy and \(D\) gradient components, where \(D\) is the number of moving Cartesian coordinates, and the kernel matrix has order \(n(1+D)\) for \(n\) rows. The covariance blocks between energies and gradients are derivatives of one scalar kernel, which makes the predicted force field the exact gradient of the predicted energy. The derivation is in The joint energy-force Gaussian process, and The surrogate loop and derivative observations describes how the loop uses it.
The kernel¶
The kernel is gpr::SexpatCF, a squared exponential on inverse atom-pair
distances. For atom pair \(f=(a,b)\) the feature is
\(\phi_f(x)=1/r_{ab}(x)\), with \(r_{ab}\) in Å, optionally multiplied by a
\(C^2\) quintic switch that reaches zero at a pair cutoff
(--gp-pair-cutoff, default 0 Å; for a molecule that keeps the unswitched
feature, and in a periodic cell it cuts at half the shortest lattice-row
spacing). Then
where \(\sigma_m^2\) is the signal variance and each pair type
\(\mathrm{pt}\) has its own length scale \(\ell_{\mathrm{pt}}\), in Å:math:^{-1}.
A pair type is an element pair; with --gp-reactive-types (default true),
atoms whose covalent bond set differs between reactant and product form their
own atom type, so reactive pairs fit their own length scales. The
hyperparameters are stored as logarithms: \(w_0=\log\sigma_m^2\) and
\(w_i=\log\ell_i\).
Standing. The block structure and the symmetry of the kernel are theorems, checked in the pages linked above. The choice of inverse distances, one length scale per pair type, and reactive atom types is a design choice.
Standardised targets and the prior mean¶
With the extended profile the GP trains on standardised targets,
\(\tilde E=(E-\bar y)/s_E\) and \(\tilde G=G/s_E\), where \(\bar y\) and the
scale \(s_E\) come from the training energies. Predictions are mapped back,
so energies are returned in eV and forces in eV/Å. The classic profiles
(below) train on raw targets. Away from its data the GP reverts to a constant:
the mean or the maximum of the training energies, after any prior-mean model
is subtracted, set by --gp-prior-mean-statistic (default mean). Two optional prior means exist
and are off by default: a switched ZBL residual (--gp-zbl-prior-mean,
The switched ZBL residual prior mean)
and a Morse force field (--gp-ff-prior-mean).
Noise¶
The likelihood noise variance is fixed unless --gp-learn-noise true, which
fits it under the NLML objective only. The defaults are choices recorded in
the source. gprn and gprd use gp_sigma2 = 1e-4
(main_neb.cpp and gpr/ParameterDefaults.cpp), and a comment ties that
value to a force resolution of about 0.01 eV/Å root mean square. Both add
a fixed relative nugget jitter_sigma2 = 1e-4; the source comment states that
outputs are standardised to unit signal variance, so this bounds the condition
number of the kernel matrix near 1e4.
Global and per-image models¶
In the extended profile gprn keeps one global GP, which owns the
hyperparameter fit, and per-image local GPs that condition on the rows nearest
each image with the global model’s fitted pair parameters. A per-image GP
activates after --neb-per-image-min-train rows (default 3) and conditions on
--neb-per-image-knn neighbours (default 10). The classic profiles turn the
per-image tier off (Run a GP-NEB band).
Fitting the hyperparameters¶
The objective¶
The default objective is the negative log marginal likelihood (NLML) of the joint energy and gradient vector,
with \(K\) the kernel matrix plus the noise and nugget diagonal and \(N\) the
number of scalar observations. --hyperparameter-objective selects instead
loo, the exact Gaussian leave-one-out negative log predictive density, or
local-loo, in which each held-out geometry is conditioned only on its own
kernel-metric neighbourhood (gpr/ml/GaussianProcessRegression.h).
The MAP penalty¶
The extended profile minimises the NLML plus a penalty in the log
parameters. This is the negative log of a weakly informative prior, including
the Jacobian of the log transform, with a barrier that keeps the signal
variance bounded:
The first bracket is a half-Cauchy prior on \(\sigma_m\) with scale \(A\),
where \(A^2=2s\) and \(s\) is an outlier-resistant estimate of the signal variance
from the energies and forces (mapRobustSignalVarianceAnchor). The second term is
a half-Student-\(t\) prior with \(\nu=4\) and \(\sigma_t^2=1\) on the
dimensionless ratio \(r_i=\ell_i/\rho_{0,i}\), where \(\rho_{0,i}\) is the
spread of pair type \(i\)’s inverse-distance feature over the fit rows
(\(\rho_{0,i}=1\) when that spread is undefined). The last term is a log
barrier at \(\log(100\,s)\); the objective is infinite beyond it. The weight
is
with \(N_{\mathrm{rows}}\) the number of configurations in the fit set. With 10
rows \(\lambda=0.0101\), and the cap applies from 500 rows. The prior therefore
dominates a fit on a handful of rows and fades as the data grow. The formulas
are in gpr/ml/MapObjective.h (applyMapPenalty) and the weight is set in
gpr/ml/gp/Optimize.cpp.
The classic profiles (chemgp, gprd_zbl) zero this barrier and weight and
carry the original Sexpat prior inside the model objective: a Student-\(t\)
prior on the square root of the signal variance, a Gaussian prior on the
length scales, and the log Jacobian (gpr/covariance_functions/SexpatCF.cpp). The
profile also selects raw targets, the NLML objective and the SCG optimizer.
Both drivers also enable --ls-prior by default, and the extended profile
adds its term to the model objective on top of the penalty above. At each fit
setHyperparameters (gpr/ml/GaussianProcessRegression.cpp) installs a
log-Gaussian prior on the packed log parameters. It is centred at
\(\log\rho_{0,i}\) for the length scales and at the log of an outlier-resistant energy
variance, \((1.4826\,\mathrm{MAD}(E))^2\), for \(\sigma_m^2\), and its
shared variance is the variance of the log pairwise descriptor distances
between training rows. The flag’s help text calls it a two-sided
chemistry-centred prior; --ls-prior false removes it. This page does not
derive how this term and the penalty above combine in a default fit.
Standing. That the bracketed terms are negative log prior densities in \(w\),
with the log Jacobian, follows from their construction, and the comments in
MapObjective.h give the Jacobian terms. The weight \(\lambda\) tempers the
prior, so \(J\) is a posterior density only at \(\lambda=1\). The values
\(\nu=4\), \(\sigma_t^2=1\), the factor 100 and the \(\lambda\) schedule are
choices. The page makes no claim about their effect on search cost; the
benchmark data that would answer it are in the Zenodo record
10.5281/zenodo.23776354.
The optimizer¶
--hyperparameter-mode selects the optimizer: scg (scaled conjugate
gradient), map_lbfgs, inla, rgmin_scg and rgmin:<method>. In gprn
the default is scg for the classic profiles and rgmin:lbfgs for
extended (main_neb.cpp). Without the flag gprd uses
the SCG settings of applyGprdDimerDefaults (at most 400 iterations, tolerance
1e-3; gpr/ParameterDefaults.cpp). The source records that the
exact Hessian of inla does not return inside the campaign wall time on the
larger cells. The objective is noisy near its minimum, so the rgmin L-BFGS
fits accept a step by a Hager-Zhang approximate Wolfe test, described in
Objective precision in GP hyperparameter fits.
The fit set and the refit schedule¶
The hyperparameters are fitted on a subset of the rows, not all of them. The
subset has --gp-fps-history rows (default 10): the 2 most recent rows plus
rows chosen by greedy farthest-point sampling on the Earth Mover’s Distance
(EMD) between geometries (selectOptimizationSubsetRows). The posterior still
conditions on every retained row, so the subset affects only the fitted
hyperparameters. A fit costs \(O(M^3)\) for kernel order \(M=n(1+D)\), so
bounding \(n\) bounds the cost of a refit. The full refit runs once per
--gp-refit-cadence training-set appends (default 5).
Standing. The cubic cost is the operation count of a dense Cholesky factorisation. The subset size, the 2 latest rows and the cadence are choices. Whether a 10-row subset costs accuracy on a given system is empirical, and this page does not measure it.
The subset is defined in Goswami and Jónsson [1].
Uncertainty over the hyperparameters¶
By default the predictive variance is conditioned on the fitted (MAP)
hyperparameters. --uncertainty-mode selects an alternative that averages
predictions over hyperparameter uncertainty:
Mode |
What it does |
Source |
|---|---|---|
|
One hyperparameter vector |
|
|
INLA-style Laplace approximation: a central composite design of \(1+2p+2^p\) points around the MAP vector for \(p\) hyperparameters (Rue et al., 2009) |
|
|
Doubling slice sampling of the hyperparameter posterior (Neal, 2003), 16 retained samples after 4 burn-in by default |
|
|
The MAP mean, with the variance taken from the Laplace mixture |
|
|
Stein variational gradient descent on a set of hyperparameter particles |
|
|
Averaging over a uniform tensor-product grid; the source describes it as for reference timing and rarely used in production |
|
For laplace the predictive variance is the law of total variance over the
grid (gpr/ml/LaplaceINLA.h). This page does not rank the modes. The default
is map, and How to add an uncertainty arm
describes how a new mode is added.
Choosing the training rows¶
Every oracle call is measured once and appended. Three controls bound the active set that the factorisation runs on.
Resolution dedup (
--gp-resolution-dedup, default true ingprn). An acquisition becomes a training row only if it lies farther from every existing row than the model can resolve, \(d=\ell\sqrt{\sigma^2/\sigma_m^2}/2\) with \(\sigma^2\) the noise variance (the formula from the flag’s help text). The measurement still goes to the observation archive, so no oracle result is discarded. The dimer has its own EMD test: it rejects a row that is a near duplicate of an existing row (AtomicDimer::appendObservationIfInformative) and always keeps the structural second-image probe.Adaptive influence prune (
--gp-adaptive-prune, default true). After every--gp-adaptive-prune-growthappends (default 5),gprnremoves one row if deleting it moves neither the band energy nor a Cartesian force by as much as one likelihood standard deviation. The influence is the worst posterior shift over the energy and every force, from the exact block downdate. Rows within one kernel length of the band and the most recent rows are kept, and the set never drops below 4 rows (gpr/neb/Session.h).Row budget (
--gp-adaptive-prune-max, default 0, meaning unbounded). A comment inSession.hrecords that the one-sigma test removed no rows in the campaign logs it refers to while the set kept growing, which is why the budget exists. The help text states that the publication command passes 128.
One control adds rows. With --gp-endpoint-symmetry true (default false) a
degenerate rearrangement, whose product is the reactant with like atoms
relabelled and rigidly moved, trains on the symmetry image of every oracle row.
The operation is \(x'_a=Q\,x_{p(a)}+t\), with \(p\) the relabelling that IRA
finds between the endpoints and \(Q,t\) the orthogonal Procrustes fit of the
relabelled reactant onto the product. The image row carries the same energy
and the gradient \(g'_a=Q\,g_{p(a)}\) (gpr/neb/EndpointSymmetry.h). The run
refuses to start unless \(Q,t\) carry each endpoint to within --trust-radius
of the other, or when the frame has fixed atoms or a periodic cell; only the
OIE and AIE modes accept it. An image
within the resolution floor of a training row is refused even with
--gp-resolution-dedup false, which is what keeps the image of the saddle,
fixed by the operation, from duplicating its source. So is an image within the
larger endpoint residual of a row. The band takes the symmetry once both
endpoints are rows, so each endpoint’s image, which lands on the other
endpoint, is refused before the model has a floor. The run prints the images
admitted and refused at the end. Image rows are not
acquisitions: they never reach the observation archive, and an archived row
regenerates its image on adoption.
Standing. That the image row is an exact observation is a theorem for a potential invariant under relabelling like atoms and under rigid motion, improper motion included when \(\det Q=-1\); a potential without that invariance makes it false. The trust-radius bound on the endpoint residuals, and refusing images within the residual, are choices.
The older switches use_prune and --use-prune are deprecated and ignored
(gpr/capi/gpridge_c.h).
Standing. The exact downdate is a theorem, with its derivation in
scripts/derive_adaptive_pruning_influence.py. The one-sigma threshold is a
unit comparison with the noise, not a tuned constant. The growth interval, the
protection rules and the budget are choices.
Adaptive pruning is the subject of Goswami and Jónsson [1].
Choosing what to measure¶
The band: where the next oracle call goes¶
gprn defaults to --nebmode gp_oie. The controller keeps three geometries
apart: the accepted band, whose images are certified against measured data;
the trial band, which the surrogate relaxation proposes and the trust checks may
reject; and the acquisition candidate, the one image whose energy and force
the oracle returns next. A rejected trial never changes the accepted band, and
final convergence is read from the accepted band
(GP-OIE controller invariants and design record).
The target comes from one planner with a fixed priority order, which the
design record lists. Only some of its arms may be replaced by a
posterior-based acquisition, and the default one is --acquisition tpe. The
TPE policy standardises the per-image force and force-variance utilities, adds energy once the band is
confident, splits the eligible interior images at the quantile
\(\gamma=\min(\lceil 0.1\,n\rceil,25)\), and picks the image with the largest
density ratio of the good set to the rest. The exploration weight is the
GP-UCB schedule of Srinivas and colleagues (2010), so there is no \(\kappa\)
to set. When the band is confident and has an interior energy maximum above
both endpoints, the pick is that maximum. The full definition is in
TPE acquisition for GP-OIE oracle targeting.
The other policies (ucb, imspe, ei, max_variance, thompson,
priorityCascade, psbax) stay selectable with --acquisition.
Standing. The utility algebra and the quantile split follow the cited algorithms. The confidence gate is a stated inequality on posterior standard deviation and barrier prominence. The decision to make TPE the default is a choice, and no committed table on this page ranks it against the others.
The dimer: the surrogate is the policy¶
gprd has no separate acquisition step. It measures the midpoint, performs
initial rotations, then repeats: fit, relax on the surrogate, measure at the
relaxed midpoint. Each outer iteration adds new observations
(AtomicDimer::execute, performGPRIterations). The relaxation rotates the
dimer onto the lowest curvature mode and translates the midpoint, both with
L-BFGS, and ends at the first of these:
the surrogate force at the midpoint falls below a tolerance of \(\max(F_{\mathrm{mid}}/10,\;0.1\,T_{\mathrm{dimer}})\), where \(F_{\mathrm{mid}}\) is the force norm at the last measured midpoint, 10 is
divisor_T_dimer_gpand \(T_{\mathrm{dimer}}\) is the force criterion;the midpoint is more than
disp_max= 0.5 Å from the nearest observed point;the inter-atomic distance ratio to the nearest observed point reaches
ratio_at_limit= 2/3;num_iter= 200 inner steps are used.
At most num_bigiter = 300 outer iterations run. The dimer separation is
0.01 Å, the initial rotation tolerance is 0.0873 rad with up to 6 initial
rotations, and the rotation tolerance during a GP phase is 0.01 rad
(gpr/ParameterDefaults.cpp, AtomicDimer::surrogateForceTolerance).
Standing. The tolerance rule is a choice. It ties the surrogate’s stopping point to how well the last measured force agrees with the model, with a floor at one tenth of the final criterion.
Stopping¶
The band¶
gprn stops when the oracle force at the geometry it would return is below
--converged-force (default 0.05 eV/Å). The check uses the oracle row measured
at that geometry’s current positions, and a stored gradient from another
geometry does not count (measuredForceBelowFinalTolerance). The test runs
before the refit and before any further oracle call. When the potential
reports a force noise, the tolerance becomes the root of the sum of squares of
--converged-force and that noise. Climbing-image activation is set by
--ci-activation-tol (absolute force, default 0.5 eV/Å) and
--ci-activation-factor (relative factor, default 0.8), and
--max-iterations (default 200) caps the outer loop; 0 requests band setup
only (builds the initial band without relaxation and exits 0). A converged climbing
image can be handed to a dimer burst (--use-mmf, default false).
The dimer¶
gprd reports convergence when three conditions hold on measured data: the
force on a measured midpoint is below the criterion (--converged-force,
which overrides \(T_{\mathrm{dimer}}=0.1\) eV/Å), the curvature along the
dimer direction is negative beyond its own resolution, and the measured
rotation angle is within tolerance or has stopped improving
(isFinalConvergenceReached, measuredModeIsCertified). If only the surrogate
force was below the criterion, the midpoint is measured before the search ends.
Standing. These are stopping rules, so they are choices. What they guarantee is stated by the certificate pages, not here.
Uncertainty and trust¶
The GP supplies a posterior variance with every prediction. gprn reports the
latent variance by default (--gp-variance-convention latent), without the
noise term. The variance enters acquisition and the acceptance of a trial
band. A relative-variance halt of the inner relaxation exists
(--inner-unc-relative) and is off by default. Variance alone is not a safe
guide far from the data, so a trust region limits where the surrogate is used.
The trust set is the set of geometries within a radius of some training row,
under the distance chosen by --trust-metric. The default metric is EMD. It
solves an assignment problem between the atoms of each type, so it is
unchanged by relabelling identical atoms, and it returns the largest, over atom
types, of the mean displacement of that type’s atoms under the best assignment,
in Å (gpr/auxiliary/Distance.h, gpr/ml/TrustRadius.h). The default radius
is fixed at 0.5 Å (--trust-radius; --use-adaptive-trust and
--scalefree-trust are off by default). A trial step that leaves the set is clipped to its boundary along the line segment, and
a trial band that leaves it is rejected, returning every interior image to its
accepted position (rejectUntrustedStep). The dimer applies the analogous
limits through disp_max and ratio_at_limit.
Standing. For the EMD metric the clipping fraction is a closed-form bound
from the triangle inequality, conservative by construction
(TrustRadius::certifiedLineStep). The radius and the choice of metric are
choices. A trust region does not make the surrogate correct inside it; the
measured-force stopping rule above is what protects the result.
After the search¶
A force below tolerance at a point says that the point is stationary on the true surface, not that it is a first-order saddle between the intended minima. The certificates that test the index and the connection to the endpoints are described in Saddle-point certificates, and Get an IRC certificate for a saddle shows one run.
Where this lives in the code¶
Piece |
File |
Function or class |
|---|---|---|
Kernel |
|
|
Descriptor and Jacobian |
|
|
Joint GP |
|
|
MAP penalty |
|
|
Hyperparameter fit, weight |
|
|
Hyperparameter uncertainty |
|
|
Adaptive prune |
|
|
Band loop |
|
|
Band acquisition |
|
|
Dimer loop |
|
|
Trust |
|
|
Certificates |
|
the endpoint walk |
Drivers and defaults |
|
command-line tables |