Choose a solver or approximation by problem size¶
This page maps the size of the training set to the solver that the record supports. It gives a small calculator for the size of the problem, a decision table, and the list of regimes that have no measurement. Each row of the table names its source. Where the record holds no number, the table says so.
Status: guidance. The table follows Methods and design decisions. If a row sends you to a technique that is closed there, the row says that it is closed.
Size the problem first¶
A GP with derivatives has \(n_{\mathrm{obs}}(1+D)\) joint rows, where
\(D\) is the number of Cartesian coordinates of the moving atoms. The dense
Gram matrix holds that number squared, in 8-byte doubles. The calculator
below prints the rows and the size of the Gram matrix. It also says whether
the full Gram matrix fits in the 256 MiB cap that the automatic feature
selection uses for its validation (kRFFValidationMemoryCapBytes in
gpr/ml/RFFFeatureSelection.h). When it does, the selection holds out the
last quarter of the geometries. When it does not, it fits on the longest
prefix whose Gram matrix fits and holds out the rest.
The three cases are a two-atom pair, a 14-atom system with 42 moving
coordinates, and the 811-geometry, 135-coordinate surface of pull request 223.
The last row reproduces the figures that the test
PlanForTheMeasuredGradientGpFitsUnderTheCap asserts: 110296 rows and 90.64
GiB.
awk 'BEGIN {
cap = 256 * 1024 * 1024
n[1] = 30; d[1] = 6
n[2] = 100; d[2] = 42
n[3] = 811; d[3] = 135
for (i = 1; i <= 3; i++) {
rows = n[i] * (1 + d[i])
bytes = 8 * rows * rows
where = (bytes <= cap) ? "fits the 256 MiB cap" : "exceeds the 256 MiB cap"
printf "n_obs %d, D %d: %d rows, Gram %.2f GiB, %s\n", n[i], d[i], rows, bytes / 2^30, where
}
print "sizes computed"
}'
n_obs 30, D 6: 210 rows, Gram 0.00 GiB, fits the 256 MiB cap
n_obs 100, D 42: 4300 rows, Gram 0.14 GiB, fits the 256 MiB cap
n_obs 811, D 135: 110296 rows, Gram 90.64 GiB, exceeds the 256 MiB cap
sizes computed
The decision table¶
Situation |
Use |
Evidence |
|---|---|---|
Up to a few thousand rows |
Dense Cholesky with HS-SVD, the default. No switch. |
A dense factor of 1408 rows takes 0.056 s and of 4480 rows 0.366 s (ledger 2026-11-13 16:36). |
Near-duplicate geometries or a very small noise |
Keep HS-SVD on. Raise |
Condition 3.8e13 falls to 1.000 (HS-SVD ). The noise guidance is in noise floor . |
Several MPI ranks on one dense GP |
Distributed dense factor. No approximation. |
Cholesky wall on d016: 57.05 s at 1 rank, 14.66 s at 8, 12.62 s at 16 ( |
Large added noise and a loose tolerance, covariance in memory |
Try the Krylov objective with |
The cost model chooses Krylov for noise 10 and tolerance 10 and dense for noise 1e-6 (operator layer ). At order 820 “CG cannot beat the factor, at any rank”. No search-level gain is recorded. |
The exact Gram matrix does not fit in memory |
Automatic random features, |
811 geometries by 135 coordinates give 90.64 GiB. The random-feature posterior differed from the exact one by 0.0025 eV/A at 2048 features on a subsample (PR 223, RFF auto ). |
Hundreds of atoms with a frozen environment |
The local band, |
The heptamer example has 343 atoms, 175 in the band. No timing or accuracy number is recorded. |
Far atoms dominate the covariance cost |
The far-field radius, C++ only, off by default. |
Distance and covariance within a relative 1e-3. No end-to-end benefit is recorded. |
A research comparison of an inducing posterior |
|
No speed or accuracy number is recorded (atomic inducing ). |
What the record supports, in words¶
Below a few thousand rows nothing recorded beats the dense factor. Every low-rank or sparse alternative failed at gpridge sizes, and the common reason is the flat spectrum of the derivative kernel.
The first approximation to try at large size is random features, chosen by the held-out rule. A fixed count is not safe. On two argon atoms 64 features raised the force error from 1.163 to 27.066 meV/A (
gp_settings.org).The Krylov objective is the only other approximation with an opt-in switch on a dense covariance, and its value has not been shown in a search.
Do not use¶
These are closed. Do not propose them again without a new measurement.
Technique |
Reason |
|---|---|
HODLR |
Removed. 3442 ms against 1561 ms for the dense Laplace Hessian at 100 observations ( |
Nystrom subset of data |
Removed. The derivative kernel has a flat spectrum. |
Vecchia, SPDE, Wendland, link-cell kNN |
None beat dense Cholesky at gpridge sizes; the Vecchia gradient error exceeded the tolerance (ledger 2026-11-13 16:36). |
Low-rank preconditioners for CG |
Five failed on d016 and on \(N=430\) ( |
Sparse inverse Cholesky |
9.4 % error at 54 % fill ( |
Inducing directional derivatives |
Five directions hold 43 % of the force energy ( |
A-priori random-feature bound |
\(10^{12}\) to \(10^{19}\) features (PR 223). |
Random features in the dimer loop |
NaN curvature at 64 features ( |
Radial far-field list |
Slower than the direct loop at every size measured ( |
Regimes with no measurement¶
The record holds no number for these. Treat any advice here as a guess.
A system with more than 4480 dense rows on one rank. The largest dense timing in the ledger is the 4480-row factor.
The operator layer in the 44-cell search gate. No result is recorded.
Wall time of automatic random features against the exact solve.
The local band, the pair cutoff and the far-field radius, against the full GP. Their benefits are asserted in the pages that introduce them and measured nowhere.
For the full reasoning, see Methods: the linear solve, Methods: approximations and Where the time goes.