The soft geodesic heat-kernel prior¶
The atomistic kernel in the joint energy-force Gaussian process compares two configurations pairtype by pairtype and has no notion of where along the reaction path a configuration sits. Two geometries with similar bond lengths but on opposite sides of a barrier look similar to that kernel even though they belong to different basins. The soft geodesic heat-kernel prior adds a second, additive term that encodes position along a weighted reference graph (typically the working NEB band), without touching the guarantees established on the atomistic term.
Status: implemented and off by default. gprn --gp-geodesic-prior true
adds the term to the GP (class gpr::GeodesicHeatEnergyForceKernel), and
gprn --gp-geodesic-image-prior true (TOML key [band] geodesic_image_prior)
adds it to image placement. gprd and the Python bindings have no switch for
it. This page proves properties of the construction. It does not show that the
term lowers the number of oracle calls on any system.
The composite kernel is
where \(h(x)\) is a finite spectral feature built from the reference
graph’s heat kernel. Every theorem below is checked symbolically in
scripts/derive_soft_geodesic_energy_force_gp.py.
Composition with a coordinate chart¶
The base term can be either Sexpat or Pullback(SE, chart).
Sum(Pullback(SE, chart), GeodesicHeat) combines the chart with the heat
features on the same Cartesian observation space. The chart and heat
components do not require mutually exclusive dispatch.
The pair-type inverse-distance lengths remain a separate vector from the chart’s scalar length. The heat features retain their own reference path, pair metric, and nonnegative covariance weight. Fitting the chart length does not resize the pair vector or alter the heat weight. A chart’s initial length matches the base force covariance; the independent heat term is excluded from this matching calculation.
Training, prediction, posterior variance, and Hessian-vector products use
the same assembled operator. Training uses [E; G] with Cartesian
G = grad(E); physical force output is F = -G. The energy-force cross
blocks therefore change sign together when converting observation layouts.
The heat-weight evidence uses the same prior-mean residuals, output scale,
and diagonal regularization as the training likelihood. Base parameters
are fitted with the retained heat term present; the conditional heat-weight
fit holds that base fixed. An attached heat component keeps its own metric
through amplitude fits and changes of reference path. Base length updates
do not overwrite it. Parameter derivatives evaluate their owning component
directly, avoiding cancellation against independently weighted summands.
GP-OIE installs its selected components before the initial fit. A changed global chart requires another parameter fit, and its coordinate map stays fixed throughout a surrogate relaxation. Reattaching the identical chart preserves its fitted parameters and posterior. These consistency conditions do not establish that the composed kernel improves molecular convergence; that requires oracle-call and saddle validation comparisons.
Prediction support of the composition¶
A summed covariance has a position-dependent diagonal. Its positive correlation support uses
The NEB motion rule requires a training geometry with s < 1=, equivalent
to rho > exp(-1/2)=. Nonpositive correlations and invalid variances have
infinite score. This is a support score, with no triangle-inequality
assumption. Using only the base component’s length misses the heat
component’s changing variance and correlations.
KernelOperator::energyDiagonal evaluates only the diagonal, and Sum
adds its component diagonals. Heat energy queries omit Cartesian
Jacobians. Separate square roots in the normalization avoid multiplying
extreme variances; no query cache is required.
Energy correlation alone does not bound Cartesian force uncertainty. For positive scalar coordinates, the valid summed kernel
has joint training covariance diag(3, 4) for exact energy and gradient
observations at x=1. As x approaches zero, its energy correlation with
that training point approaches 2/3 > exp(-1/2). Its conditional gradient
variance nevertheless grows as 4/x^4: the derivative cross covariance
with the training point vanishes exponentially while the gradient prior
variance diverges. A summed kernel can therefore satisfy the energy
support rule with unresolved force channels. Force support requires a
separate assessment of those channels. This counterexample does not
establish the cause of a particular molecular trajectory.
Why not exponentiate the geodesic distance directly¶
One way to build a “position along the path” kernel measures a
geodesic distance \(d_{\text{geo}}(x,y)\) along the
reference graph and plugs it into a squared-exponential form,
\(\exp(-d_{\text{geo}}(x,y)^2 / 2\ell^2)\), the same way the
atomistic kernel uses Euclidean distance in descriptor space. That
substitution is not sound in general. A squared-exponential form is
PSD for every length scale only when the squared
distance is conditionally negative definite, equivalently when the
distance embeds isometrically into a Hilbert space (Schoenberg,
1938). Euclidean distance satisfies that condition. Ordinary geodesic
distance on a sphere does not in general: four equally spaced points
on a great circle give a Gaussian Gram matrix with a negative quadratic
form at a suitable positive length scale. The exact witness is checked
by theorem_circle_geodesic_gaussian_can_be_indefinite.
Shortest-path distance on a general weighted graph also lacks the
guarantee, so there is no assurance that a reference path
graph built from NEB-image spacings and per-pairtype conductance
values gives a metric that embeds that way. Exponentiating it
directly can produce an indefinite kernel with no diagnostic to
catch it.
The construction here sidesteps the question entirely: rather than exponentiating a distance, it builds an explicit finite-dimensional feature map \(h(x)\) from the graph’s own spectral decomposition, and defines the new term as the literal Gram matrix \(\gamma\, h(x)^\top h(y)\) of that feature map. A Gram matrix is PSD by elementary linear algebra regardless of the geometry that produced the features, so the term is valid by construction rather than by an argument about whether the underlying metric embeds that way.
The reference path Laplacian¶
Discretize the reference path as a weighted graph: nodes are reference configurations, edges carry conductances \(c_i\) (inverse of the effective spring constant between adjacent images), and each node carries a lumped mass \(m_i\). The mass-normalized Laplacian is
with \(B\) the oriented incidence matrix, \(C = \operatorname{diag}(c_i)\),
and \(M = \operatorname{diag}(m_i)\). Theorem
theorem_mass_normalized_path_laplacian_is_psd checks that \(L\) is
symmetric, that its quadratic form equals the conductance-weighted
edge norm \(\|\sqrt{C}\,B\,M^{-1/2}z\|^2\) (hence \(L \succeq 0\)),
and that the mass-weighted constant vector \((\sqrt{m_0}, \sqrt{m_1},
\ldots)\) is an exact null mode. \(L\) is the discrete Laplace-Beltrami
operator this construction diffuses heat on.
The heat features are a Gram matrix by construction¶
Given the eigenpairs \((\lambda_k, v_k)\) of \(L\), the heat kernel
at diffusion time \(t\) is \(\sum_k e^{-t\lambda_k} v_k v_k^\top\).
Writing the nodal heat features as \(h_i = (v_{k,i}\, e^{-t\lambda_k
/2})_k\), the heat kernel between two nodes is exactly
\(h_i^\top h_j\), a Gram matrix by definition. Theorem
theorem_heat_features_are_positive_semidefinite checks this Gram
identity symbolically for a truncated two-mode spectrum: the
resulting covariance is symmetric and its quadratic form matches the
feature-space norm, so it is PSD for any finite truncation, any
diffusion time \(t \ge 0\), and any nonnegative eigenvalues. This is
the theorem that licenses the additive term: because \(h\) is an
explicit map into \(\mathbb{R}^m\), PSD-ness never depends on the
graph’s metric structure at all.
Extending the feature map off the reference nodes¶
\(h\) is only defined at the discrete reference nodes so far; a query geometry \(x\) is a continuous point that rarely coincides with one. The extension used here is a smooth, normalized affinity: given per-node affinities \(a_k(x)\), define probabilities \(p_k(x) = a_k(x) / \sum_j a_j(x)\) and set \(h(x) = \sum_k p_k(x)\, h_k\). In the code the affinity is measured in the atomistic metric of the joint energy-force Gaussian process:
where \(c_k\) is the \(k\)-th reference node, \(\phi_f\) is the pair
feature (the inverse distance \(1/r\), with the quintic cutoff switch when
--gp-pair-cutoff is positive), and \(\ell_{\mathrm{pt}}\) is the
atomistic length scale of pairtype \(\mathrm{pt}(f)\)
(radialPairFeatures and atomistic_length_scale_ in
gpr/covariance_functions/GeodesicHeatEnergyForceKernel.cpp). The exponent
is the one of the atomistic kernel, so a query close to a node in that
kernel’s metric takes that node’s feature. Theorem
theorem_normalized_affinity_jacobian checks the derivative of this
softmax-style extension against its closed form on a two-node example with
Gaussian affinities in one coordinate. The identity holds for any positive
differentiable affinities, since it is the derivative of a softmax:
The theorem also checks that the derivatives of all \(p_k\) sum to zero (probabilities stay normalized to first order). This normalized-affinity identity makes \(h(x)\) differentiable at every query point, including away from the reference nodes, which the force-channel blocks derived next require: the extension has to be smooth for \(\nabla_x h(x)\) to exist at all.
The Laplacian null mode duplicates the constant kernel¶
\(L\)’s null mode is the mass-weighted constant vector. Passed
through the affinity-based extension, theorem
theorem_constant_heat_mode_is_redundant checks that the query-side
image of that mode is a literal constant function of \(x\) (its
value does not depend on which node the query is closest to) with
identically zero Cartesian derivative, and that appending it to a
retained non-constant mode’s covariance contributes exactly an
additive constant to the energy block and nothing to the force
block. A constant-plus-noise term is already what ConstantCF
provides; carrying the null mode in \(h\) would duplicate that
degree of freedom for no benefit, so the retained feature set keeps
only the non-constant spectrum.
The composite joint energy-force blocks¶
Differentiation distributes over the sum \(k = k_{\text{atom}} + \gamma h^\top h\), so every joint block from the joint energy-force Gaussian process decomposes additively:
with \(J_h\) the Jacobian of \(h\). Theorem
theorem_soft_joint_energy_force_blocks checks all three cross
blocks (\(K_{EF}\), \(K_{FE}\), \(K_{FF}\)) against this direct
sum, and separately checks that setting \(\gamma = 0\) recovers the
pure atomistic kernel exactly: the geodesic term is added to, not
substituted for, the atomistic kernel, so turning it off is a literal
special case rather than a separate code path.
The stacked feature factor reconstructs the same blocks¶
Applying the Gram argument from
the joint energy-force Gaussian process to the
geodesic term specifically: stacking \(\sqrt{\gamma}\, h(x)\) with
its negated per-coordinate derivatives into one factor reproduces
every block of the geodesic contribution as an exact Gram matrix.
Theorem theorem_joint_feature_factor_reconstruction checks this
for a three-node, two-mode reference path and confirms the factor
has exactly one column per retained mode (the redundant constant
mode from the previous section stays excluded). That factor is the
representation an efficient implementation would use directly: a
finite explicit factor rather than a dense block matrix formed from
derivatives after the fact.
Regularity through linear geometries¶
Theorem theorem_linear_geometry_descriptor_is_regular checks that a
descriptor built from log pair distances, and its Jacobian, stay finite
(no zoo, oo, or nan) at a collinear three-atom geometry, the
configuration where a bond-angle internal-coordinate chart would hit a
coordinate singularity. The theorem is stated for log pair distances. The
production affinity above uses the inverse distances \(1/r\) (with a
cutoff switch), not their logarithms. For those features finiteness at a
collinear geometry is immediate: \(1/r\) and its derivative are finite
whenever \(r>0\), and distinct atoms have \(r>0\). Both descriptors depend
on pair distances only, so the kernel stays well-defined through near-linear
transition-state-like geometries without a special case.
Stable whitening for an efficient update¶
Forming \(k_{\text{atom}} + \gamma h h^\top\) densely for every
evaluation is wasteful when the atomistic term is already factored
as \(LL^\top\). Theorem theorem_feature_factor_whitening checks
the whitened form
together with the matrix determinant lemma \(\det(I + \gamma\, \tilde h \tilde h^\top) = 1 + \gamma\, \tilde h^\top \tilde h\) and the corresponding Woodbury inverse and joint-target quadratic-form reduction. These are exact rank-one update identities: adding the geodesic term never requires refactoring the atomistic Cholesky factor from scratch, only a rank-one correction of it.
Evidence-selected mixing weight¶
\(\gamma\) is not a free hyperparameter fit by gradient descent on
the full joint likelihood; it is chosen by the marginal likelihood
(evidence) of the one-dimensional mixing problem. Using the Woodbury
reduction, theorem theorem_fixed_base_evidence_weight checks the
exact evidence delta
its exact score (derivative in \(\gamma\)), that \(\gamma = 0\) recovers the base model’s evidence exactly (\(\Delta\mathrm{NLML}(0) = 0\)), and the stationary weight \(\gamma^\star = (c^2-1)/a\) for a single mode. \(a\) and \(c\) are the mode’s prior precision and its whitened alignment with the training targets; the sign of \(c^2 - 1\) decides whether that mode is evidence-supported at all.
Scale-free heat time¶
The one remaining free parameter is the diffusion time \(t\), and it
should not need re-tuning every time the reference path’s units or
overall length change. Theorem theorem_scale_free_spectral_heat_time
checks that a uniform metric rescaling by a factor \(s\) (conductances
divide by \(s\), lumped masses multiply by \(s\), the natural pairing
under which the reference path’s physical length scales by \(s\))
divides the Laplacian by \(s^2\) exactly:
Because eigenvalues of a rescaled matrix rescale identically (\(\lambda_k(s) = \lambda_k(1)/s^2\)), the ratio \(\lambda_k / \lambda_1\) is invariant under \(s\), and so is any heat weight expressed in Fiedler units, \(\exp(-\lambda_k/\lambda_1)\); the theorem checks this invariance directly on the ratio formula. Fixing the diffusion time as a Fiedler-normalized quantity rather than an absolute one lets the same \(t\) setting apply unchanged across different molecular systems and different reference-path unit conventions, with no per-system recalibration.
Checks¶
The pixi task derive-soft-geodesic-energy-force-gp (environment
symbolic) runs scripts/derive_soft_geodesic_energy_force_gp.py, which
calls all eleven theorems named above and prints ALL_CHECKS_PASS. The
permutation-symmetry caveat noted at the end of
the joint energy-force Gaussian process applies to this term
directly: scripts/derive_symmetry_adapted_joint_gp.py checks that a
raw path-affinity feature breaks atom-exchange symmetry
(raw_path_affinity_breaks_atom_exchange_symmetry) and only becomes
invariant after the same group-averaging applied to the atomistic
kernel is applied to \(h\) as well
(projected_path_feature_is_invariant); projecting the geodesic
term alone, without also projecting the atomistic base kernel,
leaves the composite still asymmetric.