TL;DR
Gaussian Processes (GPs) are great for modeling expensive functions, and feeding them gradient observations makes them dramatically smarter in high dimensions—right up until the $\mathcal{O}(n^3 d^3)$ computational cost melts your GPU. This paper introduces TERA, a method that exploits a neat geometric symmetry: to predict a scalar value at a target point, you only care about gradient directions pointing toward your neighboring data, while everything orthogonal is dead weight. By combining this exact mathematical shortcut with local neighbor approximations, TERA scales derivative GPs to over a thousand dimensions and tens of thousands of samples at the speed and memory cost of a standard, gradient-free GP.
What Problem Does This Paper Address?
Modern scientific simulations and machine learning models often give you gradients (slopes) alongside function outputs essentially for free via automatic differentiation or adjoint solvers. When building a surrogate model—say, to predict molecular energy or run Bayesian Optimization (BO)—incorporating those $d$-dimensional gradients gives you vastly more local information per query than scalar values alone.
Derivative Gaussian Processes (dGPs) provide a principled way to fuse values and gradients, but they hit a brutal algebraic wall. With $n$ data points in $d$ dimensions, tracking one value and $d$ partial derivatives per point creates a giant covariance matrix of size $n(d+1) \times n(d+1)$. Inverting it takes $\mathcal{O}(n^3 d^3)$ time. If $n = 1,000$ and $d = 500$, exact inference isn't just slow; it's impossible. Existing workarounds rely on global kernel interpolations or variational inducing points, which still treat the massive joint function-gradient state as the main object to approximate.
Methods
The authors flip the problem on its head: even when we observe full gradients, our downstream target is usually just a scalar function value. Their method, TERA (Target-specific Exact gradient Reduction for Accelerating derivative GP inference), combines a standard spatial statistics trick with two novel algebraic insights:
- Standard — Vecchia Approximation: Instead of conditioning a prediction on all $n$ data points, TERA conditions only on $m$ nearest neighbors (typically $m = 20$), breaking a giant global problem into small, independent local factors that can be minibatched on a GPU.
- Novel — Target-Specific Exact Gradient Reduction: Within a neighborhood of $m$ points, you still have $md$ gradient coordinates. The authors prove that for stationary kernels (where covariance depends only on distance), any gradient component orthogonal to the $m$-dimensional subspace spanned by the vectors connecting the target to its $m$ neighbors is conditionally independent of the target's function value. Projecting the $m$ neighbor gradients onto these $m$ difference vectors compresses $md$ numbers down to $m^2$ directional derivatives—with zero loss of information for that local prediction.
- Novel — Direct Block Construction: Forming the $md \times md$ covariance matrix just to project it down would still cost $\mathcal{O}(m^2 d^2)$ memory. TERA bypasses the full matrix entirely, constructing the reduced $m^2 \times m^2$ covariance blocks directly from the $m \times m$ Gram matrix of target-centered distances.
This drops the per-target cost to $\mathcal{O}(dm^2 + m^6)$ time and $\mathcal{O}(dm^2 + m^4)$ memory, completely decoupling $d$ from the matrix inversion.
Datasets
No new datasets are introduced; TERA is evaluated across three existing settings:
- Synthetic GP Simulations: Controlled draws from exact Matérn-5/2 dGPs ($d$ up to $1,000$; $n$ up to $300$) to test exact posterior fidelity.
- MD22 Molecular Benchmark: Six molecular dynamics systems—DHA, AT-AT, Stachyose, AT-AT-CG-CG, Buckyball-catcher, and Double-walled-nanotube—spanning $n = 5,032$ to $69,753$ configurations and $d = 168$ to $1,110$ dimensions (predicting scalar energy using atomic forces as gradients).
- High-Dimensional BO Benchmarks: Full-dimensional synthetic Ackley-200D and Levy-200D functions, where every coordinate actively affects the objective.
Key Insights and Ideas
- Organize around the target, not the data: You don't need to model the entire $d$-dimensional vector field just to predict a scalar height. Because stationary kernels only care about distances between points, gradients wiggling perpendicular to the lines connecting your target and its neighbors tell you nothing new about the target's value.
- Dimension-free matrix solves: Once the $m \times m$ Gram matrix of neighbor distances is computed in $\mathcal{O}(dm^2)$ time, the dense Cholesky factorization scales as $\mathcal{O}(m^6)$—meaning $d$ vanishes from the cubic bottleneck.
- Lightweight training: Because TERA optimizes a conditional Vecchia likelihood over function values given gradients, it only learns kernel and noise hyperparameters—needing just a single pass (epoch) over the training factors on MD22 rather than optimizing thousands of variational inducing parameters.
Key Results
- Zero-loss reduction: In simulated fidelity sweeps, TERA's marginal KL divergence to the exact dGP posterior overlaps identically with full-gradient Vecchia dGPs, while compute time and GPU memory stay virtually flat from $d = 10$ to $d = 1,000$ (staying under $0.1\text{ GB}$ for $m=20$).
- State-of-the-art molecular regression: On all six MD22 benchmarks, TERA achieves the lowest test energy RMSE per atom, beating scalable dGP baselines (DDSVGP and DSoftKI). On DHA ($n = 69,753, d = 168$), where Exact GP and DSoftKI run out of resources, TERA finishes cleanly; on Double-walled-nanotube ($d = 1,110$), it stays well under $1\text{ GB}$ of GPU memory.
- Practical 200D Bayesian Optimization: Over 150 queries on Ackley-200D and Levy-200D, TERA achieves substantially lower simple regret than value-only BO (TuRBO-1, VBO) and L-BFGS-B. A full 150-evaluation Ackley-200D run takes ~100 seconds total (<1s per query) and
<0.4 GBof VRAM.
Limitations and Future Work
- Sensitivity to neighborhood size ($m$): Trading $d$ for $m^2$ introduces an $\mathcal{O}(m^6)$ Cholesky cost. While $m = 20$ works well as a default here, problems with long-range correlations requiring large conditioning sets (e.g., $m \ge 100$) will become computationally expensive.
- Noise model constraints: The exact equivalence between reduced and full gradients requires either noiseless gradients or Gaussian gradient noise matched to the kernel's metric ($\boldsymbol{\epsilon}_i^g \sim \mathcal{N}(\mathbf{0}, \sigma_g^2 \boldsymbol{\Lambda}_\theta)$). Under arbitrary anisotropic or correlated gradient noise, TERA still yields a valid GP conditional, but it is no longer an exact match to conditioning on the full noisy gradient. Extending exact reductions to general noise models remains open future work.
Summary updated