Manuscript Offprint
arXiv:2611.07127Scalable Bayesian Gaussian Process Classification for Cancer Histopathology: Calibrated Uncertainty Under Distribution Shift
Abstract
Reliable uncertainty quantification is essential for clinical deployment of cancer diagnosis models, yet neural networks and variational Gaussian process methods can produce overconfident predictions, particularly under the distribution shifts that arise when models trained at one hospital are applied at another. We present a scalable Bayesian Gaussian Process Classification (GPC) framework that operates on frozen pathology foundation model embeddings (Phikon) and combines accelerated Randomly Pivoted Cholesky (RPCholesky) for low-rank kernel factorization, Hamiltonian Monte Carlo (HMC) with non-centered parameterization for posterior sampling, and a pivots-as-inducing-points scheme for prediction. This makes HMC posterior sampling in the low-rank latent representation tractable at training points, enabling HC-based low-rank GPC on substantially larger datasets than prior MCMC-based demonstrations. We evaluate on two histopathology benchmarks for breast cancer metastasis detection: PCam and CAMELYON17-WILDS, where the latter tests calibration under hospital-level distribution shift. Compared to stochastic variational GP and neural network baselines, our method improves calibration and predictive performance — reducing expected calibration error by up to 88% and false negative rate by up to 90% — with the largest gains appearing under distribution shift, suggesting that HMC-based posterior sampling provides more trustworthy uncertainty estimates for cross-site pathology classification.
1 Introduction
Neural networks have been widely used for cancer diagnosis from histopathology images. Despite their high accuracy, neural networks can produce overconfident predictions[Guo et al., 2017], which is a serious limitation in clinical environments where uncertainty quantification is critical. For cancer histopathology, false negatives can be life threatening and delay treatment, whereas false positives can cause patient distress and unnecessary medical expenses. This problem is further compounded when models trained at one hospital are deployed at another, where differences in tissue preparation, staining protocols, and scanner hardware introduce distribution shifts that can silently degrade both accuracy and calibration in neural networks. As pathology foundation models like Phikon are increasingly adopted across institutions [Filiot et al., 2023], the need for uncertainty-aware downstream classifiers that remain calibrated across hospital sites becomes critical for safe deployment.
In contrast, Gaussian Process Classification (GPC) provides principled uncertainty estimates. Unfortunately, the posterior has no closed form since the Bernoulli likelihood is non-conjugate with the Gaussian prior. Historically, approximate inference methods like stochastic variational Gaussian process (SVGP) have dominated GPC instead of direct sampling methods like MCMC [Nickisch and Rasmussen, 2008] due to their much lower cost. In this paper, we show that with a new kernel
Preprint.
factorization method called accelerated randomly pivoted Cholesky (RPCholesky) [Epperly et al., 2025], we could use HMC, a type of Markov Chain Monte Carlo (MCMC) method to sample the posterior of GPC, which outperforms the SVGP and neural-network baselines on calibration and predictive metrics.
Contributions. We make the following contributions: (1) We propose a scalable Bayesian GPC that combines accelerated RPCholesky [Epperly et al., 2025] with HMC under non-centered parameterization, making MCMC-based GPC tractable at training points; (2) We introduce a pivots-as-inducing-points predictive scheme based on previous literature (Quiñonero-Candela and Rasmussen [2005], Williams and Seeger [2001]) that aligns the predictive inducing set with the RPCholesky training approximation; and (3) We demonstrate through cross-hospital evaluation on CAMELYON17-WILDS that HMC-based posterior sampling achieves substantially better calibration than SVGP and neural baselines on the held-out CAMELYON17-WILDS hospital, reducing ECE by up to 88% and false negatives by up to 90%.
Approximate Inference for GP Classification and Stochastic variational Gaussian processes A long line of work on approximate inference addresses the intractable GPC posterior issue, surveyed by Nickisch and Rasmussen [2008]. Among different posterior computation methods, MCMC stands out with the highest posterior fidelity but has been considered intractable for large datasets. SVGP has emerged as the dominant scalable approach to GP inference with non-Gaussian likelihoods, which combines the inducing-variable framework of sparse GPs [Quiñonero-Candela and Rasmussen, 2005, Titsias, 2009] with stochastic variational inference [Hensman et al., 2013]. Hensman et al. [2015] extend it to classification by optimizing a variational lower bound over a tractable Gaussian approximate posterior. However, variational inference based on the reverse KL objective can underestimate posterior variance [Blei et al., 2017, Yao et al., 2018]. This loss of posterior uncertainty is especially concerning in safety-critical classification problems, where miscalibrated probabilities and overconfidence under distribution shift can have direct downstream clinical consequences [Guo et al., 2017, Ovadia et al., 2019]. We use SVGP classification [Hensman et al., 2015] as our primary scalable GP baseline. Recently, Cooper et al. [2025] revived fully Bayesian GPC using elliptical slice sampling with Vecchia approximation, scaling to , whereas we make GPC tractable at training points, enabling MCMC-based low-rank GPC on datasets approximately larger than the setting considered by Cooper et al. [2025].
Neural Networks Deep learning has become the dominant approach for histopathology classification. Pathology foundation models such as Phikon [Filiot et al., 2023] learn transferable representations from large-scale self-supervised pretraining, and are typically paired with lightweight classification heads such as MLPs. Convolutional architectures like U-Net [Ronneberger et al., 2015] remain widely used in medical imaging, while Vision Transformers [Dosovitskiy et al., 2021] have shown competitive performance on image classification tasks with large-scale pretraining. These architectures achieve strong discriminative performance but lack built-in uncertainty quantification, typically requiring post-hoc calibration [Guo et al., 2017]. We use all of them as baselines to our proposed method.
3 Method
3.1 Gaussian Process Classification
Gaussian Process Classification (GPC) is a hierarchical Bayesian model [Rasmussen and Williams, 2006, Nickisch and Rasmussen, 2008] with three levels: A kernel hyperparameter prior, a latent function with a GP prior, and the Bernoulli mapping that maps that latent function to binary labels. There are training points with dimension (). We express the model in math language as follows.
- Hyperparameters: : In general, the hyperparameter is for the kernel matrix with prior . The matrix entries are calculated using the kernel function. For any two data points from the training points, the kernel function is
The kernel matrix is thus and positive semi-definite [Rasmussen and Williams, 2006]. In our case, we fix while sampling the latent function , and do parameter sweeps later to find a good .
-
Latent function: ;
-
Bernoulli mapping: . The mapping from latent function to binary labels is independent from . We choose to use sigmoid function as the link function .
3.2 Inference Problem
When are jointly sampled, the posterior is
In our work, we fix the kernel amplitude at , matching the kernel parameterization used in our accelerated RPCholesky implementation, and tune only the lengthscale. Jointly sampling with the latent function would require recomputing the low-rank factorization at each MCMC step, which is prohibitive at . We therefore fix () via parameter sweep (Section 4.3) and note that conditional on , HMC samples the posterior over without further approximation beyond the low-rank kernel factorization. The kernel matrix can be referred to simply as , and the posterior we are sampling is
The posterior of the latent function is generally not tractable since it is proportional to a Bernoulli likelihood multiplied by a Gaussian prior. In addition, the kernel matrix is an matrix, which costs memory to store, and time to factorize. Even for the smaller of our two training sets, , , the exact matrix factorization is not possible.
3.3 Low-rank Factorization: Accelerated RPCholesky
The accelerated RPCholesky algorithm exploits the rapid spectral decay typical of kernel matrices [Chen et al., 2025, Epperly et al., 2025] to factor the dense kernel matrix into low rank matrices:
for . Using the AbstractPSDMatrix class defined in Epperly et al. [2025], the low-rank factor is computed directly from the training data, while the actual kernel matrix is never computed or stored. The input is an matrix and the output is a matrix with low rank , which is usually .
3.4 Posterior Sampling: Hamiltonian Monte Carlo (HMC) with non-centered parameterization (NCP)
As mentioned above, the posterior of GPC is not tractable. SVGP addresses this issue by approximating the posterior with a Gaussian and optimizing via stochastic variational inference. An alternative for sampling this intractable posterior would be MCMC samplers, in particular HMC [Neal, 2011]. Our design using HMC for GPC is heavily inspired by Betancourt and Girolami [2013], which discuss using HMC for hierarchical models extensively.
Naive HMC sampling of the posterior based on is inefficient because the complicated kernel matrix induces strong correlation between latent values of nearby training points, creating elongated, and ill-conditioned posterior contours. We can use non-centered parameterization to solve this problem as follows: Set and thus
where is the HMC-sampled latent function after non-centered parameterization, and is the actual training latent function. We now have an isotropic prior geometry, no longer sampling from which has possible extreme eigenvalue spread. After NCP, we use Euclidean HMC as Betancourt and Girolami [2013] suggest. This means that for the auxiliary momentum and the kinetic energy in HMC,
Betancourt and Girolami [2013] give us the theoretical foundation for using HMC as the MCMC sampler for GPC, but in experiments we also compare the performance of different MCMC samplers on GPC at small scale to compare the relative sampling efficiency of the MCMC methods, before we use HMC on the full-scale dataset.
3.5 Pivots as Inducing Points
The posterior describes the belief we have on training data, while the predictive distribution is the distribution over new test points , assuming that the training and testing points are jointly Gaussian. Computing the predictive distribution can also be challenging at scale. For the joint Gaussian prior over training and testing latent values, and , a more accurate GP prediction requires solving linear systems involving the training kernel matrix. This costs time for a dense factorization and memory, which is infeasible for large . We therefore use the RPCholesky pivots as inducing points, adapting ideas from sparse variational GP approximations.
We adapt the inducing-variable method, specifically the deterministic training conditional (DTC) approximation [Quiñoneró-Candela and Rasmussen, 2005]. Let denote the set of RPCholesky pivot indices, and let
be the latent function values at these pivot points. Under the DTC conditional independence assumption
prediction depends on the training data only through the k-dimensional inducing variable u, reducing the dominant predictive linear algebra from N-dimensional to k-dimensional computations.
Unlike standard inducing-variable methods that optimize inducing locations during training [Snelson and Ghahramani, 2005, Titsias, 2009], we fix the inducing points to be the RPCholesky pivots . This choice is natural in our setting because the pivots are already selected by the low-rank kernel approximation procedure and correspond to informative columns of the kernel matrix [Chen et al., 2025]. The corresponding inducing variables satisfy
Moreover, the RPCholesky factor satisfies
so is available directly from the precomputed low-rank factor. Therefore, for an HMC sample with , the corresponding inducing variable is
For a test set , the DTC predictive conditional is
Here, is the test-pivot cross-kernel matrix, , and is the test-test kernel matrix. In practice, for marginal class probabilities we only need the diagonal of the conditional covariance, so can be replaced by its diagonal.
The resulting predictive cost is
where the term comes from factorizing , the term comes from applying to the test-pivot kernel matrix, and the term comes from forming . Since in our experiments and , the term dominates.
3.6 Computing the predictive
According to Rasmussen and Williams [2006], the class probability for a test point is
for the training label, the testing data, the sigmoid function. The integral is approximated using posterior samples [Rasmussen and Williams, 2006]:
where is a single draw from the DTC predictive conditional (Eq. 6) and is constructed from the -th HMC sample. Each term averages over both posterior uncertainty (via the HMC sample ) and predictive uncertainty (via the conditional draw ). We use post-warmup samples.
4 Experiments
4.1 Datasets and Feature Extraction
We evaluate on two histopathology benchmarks for identifying breast cancer metastasis, PCam and CAMELYON17-WILDS. PCam (Veeling et al. [2018]; CC0 1.0 license) contains 327,680 RGB/color image patches () divided into 262,144 training, 32,768 validation, and 32,768 test images, with binary labels indicating the presence of tumor tissue. CAMELYON17-WILDS (Bandi et al. [2019]; publicly available via the WILDS benchmark Koh et al. [2021]) is the CAMELYON17 dataset accessed via the WILDS benchmark (Koh et al. [2021]). It contains patches divided into 302,000 training images from three hospitals, 34,000 valid images from the fourth hospital, and 85,000 testing images from the fifth hospital. Both are standard benchmarks for cancer diagnosis where calibrated uncertainty is relevant. In addition, CAMELYON17-WILDS tests the method's calibration under distribution shift. We use the official CAMELYON17-WILDS splits for cross-hospital evaluation; because our classifiers operate on externally pretrained Phikon representations, these results are not intended as a standard WILDS leaderboard submission.
Embedding as features
The training datasets both have images of size pixels. Although ideally we can run GPC over raw pixels, the kernel matrices are not informative in such high dimensions. Thus, we use the 512-dimensional PCA projection of Phikon's [Filiot et al., 2023] (Apache 2.0 license) 768-dimensional CLS token output as features, where Phikon is a ViT-Base transformer pretrained on ~40M histopathology images. PCA was fitted on training-set embeddings only and applied unchanged to validation and test embeddings.
4.2 Experiment 1: Methodological Validation
Before scaling to full datasets, we validate our methodological choices on small-scale data (). First, using synthetic two-class Gaussian blob data, we confirm that accelerated
RPCholesky reduces kernel factorization time by 6× and total pipeline time by 15× compared to dense factorization (averaged over 10 runs). Second, we compare three MCMC samplers — Random-Walk Metropolis (RWM), the Metropolis-adjusted Langevin algorithm (MALA), and HMC — on the low-rank GPC posterior with . On synthetic data, MALA and HMC both outperform RWM in autocorrelation time and effective sample size per second, but do not clearly separate from each other. However, when repeating the comparison on a 2,000-point subsample of PCam, HMC establishes a clear advantage over both alternatives, motivating its use in subsequent full-scale experiments.
4.3 Experiment 2: Full-scale HMC GPC
We scale our method to the full training set of PCam and CAMELYON17-WILDS in both Experiment 2 and 3, while comparing against stochastic variational Gaussian process classification (SVGP) baseline in Experiment 2 and neural network baselines in Experiment 3.
SVGP baseline. We use SVGP [Hensman et al., 2015] as the primary scalable GP baseline, implemented in GPyTorch, trained with Adam (lr=10⁻², batch size 1024) for 50 epochs. The number of inducing points is fixed to , with locations initialized from training embeddings and optimized jointly with the variational parameters and kernel hyperparameters (bandwidth initialized at ) during training. Each method is evaluated at its own best configuration.
Experiment setup. For our method, we factor the training kernel matrix using accelerated RPCholesky and sample the low-rank GP posterior using the non-centered parameterization in eq. (4). The HMC sampler uses leapfrog integration with step-size adaptation via dual averaging [Hoffman and Gelman, 2014], following standard practice [Betancourt, 2017], with warmup steps and post-warmup samples. We select hyperparameters via sequential sweeps on a subset of PCam (Appendix A), fixing each before sweeping the next. Leapfrog steps () are chosen first: all configurations produce identical predictive metrics, so we select for low autocorrelation time and reasonable wall-clock cost. Rank () is chosen next: performance peaks at despite tighter kernel approximations at higher ranks, with ECE rising monotonically with rank. Bandwidth () is chosen last: the approximate median pairwise distance yields the lowest NLL. We apply the same configuration to both datasets: , , and bandwidth set to the approximate median pairwise distance ( on PCam, on CAMELYON17-WILDS). To avoid dataset-specific tuning, we reuse the same sampler and rank configuration on both datasets, while setting the RBF lengthscale to the training-set median pairwise distance.
Reproducibility. For SVGP and our method, we report mean and standard deviation over 5 independent runs (seeds 1–5). For our method, each seed rebuilds the RPCholesky factorization (re-randomizing pivot selection), reinitializes HMC, and redraws all posterior and predictive samples. For SVGP, each seed reinitializes inducing locations, variational parameters, and mini-batch ordering. Neural baselines are reported from a single run due to longer training times; our primary comparison is between HMC and SVGP.
4.4 Experiment 3: Neural Network Baselines
We evaluate three neural network baselines on both datasets.
-
MLP: a 2-layer MLP (512→512→1 with ReLU and dropout 0.3) trained on the same 512-dimensional Phikon embeddings used by our method, optimized with AdamW (lr=10⁻³, weight decay 10⁻⁴) and cosine annealing for up to 50 epochs with early stopping (patience 5) based on validation AUROC;
-
U-Net: a U-Net encoder-decoder (base channels 32) that produces a dense logit map and spatially averages it for image-level classification, trained directly on raw 96 × 96 pixel inputs with Adam (lr=10⁻³, weight decay 10⁻⁴) and class-balanced loss weighting, for 50 epochs on PCam and 50 epochs on CAMELYON17-WILDS, selecting the best epoch by validation AUROC (best epoch 3 on both datasets);
-
ViT-S: a Vision Transformer-Small (~21.6M parameters, patch size 16, depth 12, 6 heads) trained from scratch on raw pixel inputs with lr=3 × 10⁻⁴, weight decay 0.05, batch size 32, for 50 epochs.
Metrics We report metrics covering classification performance, calibration, probabilistic predictive quality, and training time: accuracy, negative log-likelihood (NLL), expected calibration error (ECE), area under the receiver operating characteristic curve (AUROC), Brier score, and false negative rate (FNR). ECE is computed with 15 equal-width bins. FNR is computed using a decision threshold of 0.5.
4.5 Results
Computational Cost All of the experiments are run on a high-performance computing (HPC) cluster and on a single NVIDIA A100 GPU (80 GB). Experiment 2 runs in approximately 22 minutes for PCam: Only 16 seconds for accelerated RPCholesky kernel factorization, and ~20 minutes for HMC sampling and ~2 seconds for predictive inference. By comparison, a dense Cholesky factorization for requires 550 GB storage (for PCam, , in float64) and is infeasible on a single 80 GB A100. Accelerated RPCholesky eliminates this bottleneck entirely: the factorization accounts for less than 2% of total runtime, shifting the computational cost to HMC sampling. Our method, SVGP, and the MLP baseline operate on precomputed Phikon embeddings; the one-time embedding extraction cost is shared across these methods and excluded from all reported times. Among methods operating on the shared precomputed Phikon embeddings, our method requires approximately 22 minutes compared with approximately 5 minutes for SVGP, U-Net and ViT-S operate directly on raw images and include representation learning in their reported runtime, so these times are not directly comparable.
Data Analysis Among the neural baselines, U-Net achieves the best calibration-related metrics on both datasets. ViT-S underperforms due to its high data requirements when training from scratch without large-scale pretraining. The MLP underperforms relative to our method despite using the same Phikon embeddings, suggesting that the lightweight classification head lacks the capacity to fully exploit the embedding structure, whereas the GP kernel captures richer similarity information from the same representations.
Table 1 reports results on both PCam and CAMELYON17-WILDS. On PCam, our method outperforms SVGP across all metrics (e.g., ECE 0.049 vs 0.087, accuracy 0.921 vs 0.905). On CAMELYON17-WILDS, where the test set comes from a held-out hospital, the gap widens dramatically: relative to SVGP, our method reduces ECE by 87.8%, NLL by 43.3%, Brier score by 76.7%, and false negative rate by 89.8%. Relative to U-Net (the best-calibrated neural baseline), it reduces ECE by 78.2%, NLL by 65.4%, Brier score by 83.6%, and false negative rate by 86.1%.
Figure 1 shows reliability diagrams with prediction histograms illustrating the calibration difference: on CAMELYON17-WILDS, SVGP's predicted probabilities diverge sharply from observed frequencies, while our method is substantially closer to the diagonal over the high-density probability regions. The histograms show that both methods concentrate predictions near 0 and 1, with few samples in intermediate bins where calibration curves may appear noisy.
Calibration on a held-out hospital. CAMELYON17-WILDS evaluates generalization to a hospital not represented in the training set. On this held-out hospital, our method achieves an ECE of 0.021 ± 0.001, compared with 0.173 ± 0.021 for SVGP. The calibration advantage observed on PCam persists in the cross-hospital setting and becomes substantially larger relative to SVGP. Because PCam and CAMELYON17-WILDS are distinct datasets, we do not interpret the change in absolute ECE between the two benchmarks as a direct measure of degradation caused by distribution shift.
| Dataset | Method | ECE ↓ | NLL ↓ | Brier ↓ | FNR ↓ | Acc. ↑ | AUROC ↑ |
|---|---|---|---|---|---|---|---|
| PCam | SVGP | .087±.004 | .250±.011 | .072±.004 | .177±.010 | .905±.005 | .979±.001 |
| U-Net | .059 | .401 | .110 | .152 | .859 | .925 | |
| MLP | .116 | .711 | .111 | .234 | .877 | .965 | |
| ViT-S | .191 | .814 | .206 | .427 | .751 | .875 | |
| Low-rank HMC GP | .049±.004 | .200±.010 | .059±.003 | .137±.008 | .921±.004 | .980±.002 | |
| CAM17-WILDS | SVGP | .173±.021 | .323±.045 | .103±.016 | .304±.044 | .848±.022 | .994±.001 |
| U-Net | .092 | .505 | .142 | .217 | .817 | .893 | |
| MLP | .189 | 1.402 | .183 | .377 | .811 | .956 | |
| ViT-S | .387 | 2.078 | .397 | .798 | .548 | .651 | |
| Low-rank HMC GP | .021±.001 | .183±.002 | .024±.000 | .031±.001 | .973±.000 | .992±.000 |
Table 1: Predictive metrics on PCam (top) and CAMELYON17-WILDS (bottom). SVGP and Low-rank HMC GP report mean over 5 seeds; ± denotes one standard deviation. Neural baselines are single-run. ↓=lower is better, ↑=higher is better. Best value per dataset in bold.


Figure 1: Reliability diagrams with prediction histograms on PCam (left) and CAMELYON17-WILDS (right) for SVGP and our method (seed 1, 15 equal-width bins). The dashed line indicates perfect calibration. Under distribution shift (right), SVGP becomes severely miscalibrated while our method is substantially closer to the diagonal over the high-density probability regions (bottom panels).
5 Conclusion
Discussion
The most striking finding is that our method shows its largest calibration advantage on the held-out-hospital CAMELYON17-WILDS evaluation. While all methods perform reasonably on the in-distribution PCam benchmark, the gap widens substantially on CAMELYON17-WILDS, where test data comes from an unseen hospital. Variational inference based on the reverse KL objective has been shown to underestimate posterior variance [Blei et al., 2017, Yao et al., 2018], which may produce overconfident predictions that degrade when the test distribution differs from training. Our empirical results are consistent with this concern: on the held-out CAMELYON17-WILDS hospital, SVGP is substantially more miscalibrated than our HMC-based method. HMC-based sampling avoids imposing the Gaussian variational posterior used by SVGP and represents posterior uncertainty within the fixed low-rank model. This property is particularly relevant for clinical deployment, where a cancer detection model trained at one hospital must generalize reliably to others. In practice, well-calibrated predictive probabilities could, if validated at the slide and patient level, support institution-specific threshold selection that balances sensitivity and specificity according to local clinical priorities, rather than relying on a fixed threshold that may be miscalibrated at a new site.
Beyond calibration, we confirm that accelerated RPCholesky makes MCMC-based GPC feasible at modern dataset scale rather than purely theoretical. The factorization that was previously the computational bottleneck now accounts for less than 2% of total runtime, shifting the cost to HMC warmup and sampling.
Limitations
Our work has several limitations. First, we fix the kernel bandwidth via parameter sweep rather than sampling it jointly with the latent function . In a fully Bayesian treatment, would be inferred as part of the posterior, and fixing it may lead to suboptimal uncertainty estimates for some datasets. We additionally fix the kernel amplitude and do not evaluate sensitivity to this choice. Second, the sequential parameter sweep over leapfrog steps, rank, and bandwidth was guided in part by practitioner experience with MCMC tuning; a more systematic approach such as jointly optimizing these hyperparameters could yield improved results. Third, while we report mean and standard deviation over 5 seeds for our method and SVGP, the neural network baselines are single-run, and we do not perform formal statistical significance testing. Additionally, because our method and SVGP also differ in their inducing representations and kernel-hyperparameter treatment, the comparison does not isolate posterior inference as the sole cause of the observed calibration difference. Finally, our evaluation is performed on patch-level retrospective benchmarks and does not establish patient-level clinical utility.
Future Work
The primary computational bottleneck is now HMC sampling, which takes approximately 20 minutes. Parallel chains, adaptive mass matrices, or the No-U-Turn Sampler [Hoffman and Gelman, 2014] could reduce this cost. More broadly, our framework operates on frozen embeddings from a histopathology foundation model, but the clinical workflow for breast cancer begins with mammographic screening, not biopsy. Extending this method to mammography datasets such as EMBED would require embeddings from models pretrained on radiological rather than histopathological images. If feasible, uncertainty-calibrated classification at the mammography stage could reduce unnecessary biopsies, providing clinical value earlier in the diagnostic pipeline.
References
P. Bandi, O. Geessink, Q. Manson, M. van Dijk, M. Balkenhol, M. Hermsen, B. E. Bejnordi, B. Lee, K. Paeng, A. Zhong, Q. Li, F. G. Zanjani, S. Zinger, K. Fukuta, D. Komura, V. Ovtcharov, S. Cheng, S. Zeng, J. Thagaard, A. B. Dahl, H. Lin, H. Chen, L. Jacobsson, M. Hedlund, M. Cetin, E. Halici, H. Jackson, R. Chen, F. Both, J. Franke, H. Küsters-Vandevelde, W. Vreuls, P. Bult, B. van Ginneken, J. A. W. M. van der Laak, and G. Litjens. From detection of individual metastases to classification of lymph node status at the patient level: The CAMELYON17 challenge. IEEE Transactions on Medical Imaging, 38(2):550–560, 2019. doi: 10.1109/TMI.2018.2867350.
M. Betancourt. A conceptual introduction to hamiltonian monte carlo. arXiv preprint arXiv:1701.02434, 2017. URL https://arxiv.org/abs/1701.02434.
M. J. Betancourt and M. Girolami. Hamiltonian monte carlo for hierarchical models, 2013.
D. M. Blei, A. Kucukelbir, and J. D. McAuliffe. Variational inference: A review for statisticians. Journal of the American Statistical Association, 112(518):859–877, 2017.
Y. Chen, E. N. Epperly, J. A. Tropp, and R. J. Webber. Randomly pivoted cholesky: Practical approximation of a kernel matrix with few entry evaluations. Communications on Pure and Applied Mathematics, 78(5):995–1041, 2025. doi: 10.1002/cpa.22234.
A. Cooper, A. S. Booth, and R. B. Gramacy. Modernizing full posterior inference for surrogate modeling of categorical-output simulation experiments. arXiv preprint arXiv:2501.14946, 2025.
A. Dosovitskiy et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021.
E. N. Epperly, J. A. Tropp, and R. J. Webber. Embrace rejection: Kernel matrix approximation by accelerated randomly pivoted cholesky. SIAM Journal on Matrix Analysis and Applications, 2025. doi: 10.1137/24M1699048.
A. Filiot, R. Ghermi, A. Olivier, P. Jacob, L. Fidon, A. Mac Kain, C. Saillard, and J.-B. Schiratti. Scaling self-supervised learning for histopathology with masked image modeling. medRxiv, 2023. doi: 10.1101/2023.07.21.23292757. URL https://www.medrxiv.org/content/early/2023/07/26/2023.07.21.23292757.
C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On calibration of modern neural networks. In Proceedings of the 34th International Conference on Machine Learning, pages 1321–1330. PMLR, 2017.
J. Hensman, N. Fusi, and N. D. Lawrence. Gaussian processes for big data. In Proceedings of the Twenty-Ninth Conference on Uncertainty in Artificial Intelligence, pages 282–290, 2013.
J. Hensman, A. G. d. G. Matthews, and Z. Ghahramani. Scalable variational gaussian process classification. In Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, pages 351–360. PMLR, 2015.
M. D. Hoffman and A. Gelman. The no-u-turn sampler: Adaptively setting path lengths in hamiltonian monte carlo. Journal of Machine Learning Research, 15(47):1593–1623, 2014. URL https://jmlr.org/papers/v15/hoffman14a.html.
P. W. Koh, S. Sagawa, H. Marklund, S. M. Xie, M. Zhang, A. Balsubramani, W. Hu, M. Yasunaga, R. L. Phillips, I. Gao, T. Lee, E. David, I. Stavness, W. Guo, B. Earnshaw, I. Haque, S. M. Beery, J. Leskovec, A. Kundaje, E. Pierson, S. Levine, C. Finn, and P. Liang. WILDS: A benchmark of in-the-wild distribution shifts. In Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pages 5637–5664. PMLR, 2021. URL https://proceedings.mlr.press/v139/koh21a.html.
R. M. Neal. MCMC using Hamiltonian dynamics. In S. Brooks, A. Gelman, G. L. Jones, and X.-L. Meng, editors, Handbook of Markov Chain Monte Carlo, chapter 5, pages 113–162. Chapman and Hall/CRC, Boca Raton, FL, 2011.
H. Nickisch and C. E. Rasmussen. Approximations for binary gaussian process classification. Journal of Machine Learning Research, 9(67):2035–2078, 2008. URL https://jmlr.org/papers/v9/nickisch08a.html.
Y. Ovadia, E. Fertig, J. Ren, Z. Nado, D. Sculley, S. Nowozin, J. V. Dillon, B. Lakshminarayanan, and J. Snoek. Can you trust your model's uncertainty? evaluating predictive uncertainty under dataset shift. In Advances in Neural Information Processing Systems, volume 32, 2019.
J. Quinonero-Candela and C. E. Rasmussen. A unifying view of sparse approximate gaussian process regression. Journal of Machine Learning Research, 6(65):1939–1959, 2005. URL https://jmlr.org/papers/v6/quinonero-candela05a.html.
C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, Cambridge, MA, 2006. URL https://gaussianprocess.org/gpml/.
O. Ronneberger, P. Fischer, and T. Brox. U-Net: Convolutional networks for biomedical image segmentation. In MICCAI, 2015.
E. Snelson and Z. Ghahramani. Sparse gaussian processes using pseudo-inputs. In Advances in Neural Information Processing Systems, volume 18. MIT Press, 2005. URL https://papers.nips.cc/paper/2857-sparse-gaussian-processes-using-pseudo-inputs.
M. K. Titsias. Variational learning of inducing variables in sparse gaussian processes. In Proceedings of the Twelfth International Conference on Artificial Intelligence and Statistics, pages 567–574. PMLR, 2009.
B. S. Veeling, J. Linmans, J. Winkens, T. Cohen, and M. Welling. Rotation equivariant cnns for digital pathology. In Medical Image Computing and Computer Assisted Intervention – MICCAI 2018, volume 11071 of Lecture Notes in Computer Science, pages 210–218. Springer, 2018. doi: 10.1007/978-3-030-00934-2_24. URL https://arxiv.org/abs/1806.03962.
C. K. I. Williams and M. Seeger. Using the Nyström method to speed up kernel machines. In T. K. Leen, T. G. Dietterich, and V. Tresp, editors, Advances in Neural Information Processing Systems 13, pages 682–688. MIT Press, 2001. URL https://papers.nips.cc/paper/1866-using-the-nystrom-method-to-speed-up-kernel-machines.
Y. Yao, A. Vehtari, D. Simpson, and A. Gelman. Yes, but did it work?: Evaluating variational inference. In Proceedings of the 35th International Conference on Machine Learning, pages 5581–5590. PMLR, 2018.
A Parameter Sweep Details
Sweep 1: Leapfrog Steps. Configuration: , , , , bandwidth set to approximate median pairwise distance. We report integrated autocorrelation time for the latent variables () and log-posterior ().
| Accept rate | Final step size | Wall time (s) | |||
|---|---|---|---|---|---|
| 10 | 21.70 | 11.78 | 0.895 | 0.0335 | 1769.6 |
| 16 | 8.43 | 3.98 | 0.953 | 0.0343 | 573.4 |
| 25 | 4.06 | 2.58 | 0.810 | 0.0340 | 873.6 |
| 35 | 1.80 | 2.53 | 0.854 | 0.0340 | 2788.2 |
Sweep 2: Rank. Configuration: , , , , bandwidth = approx. median. Trace error is the relative trace-norm error .
| Rank k | Trace error | NLL | ECE | AUROC | Accuracy |
|---|---|---|---|---|---|
| 100 | 14.2% | 0.196 | 0.0445 | 0.980 | 0.921 |
| 200 | 10.8% | 0.186 | 0.0464 | 0.983 | 0.927 |
| 300 | 8.6% | 0.192 | 0.0509 | 0.982 | 0.924 |
| 500 | 6.7% | 0.194 | 0.0525 | 0.983 | 0.923 |
Sweep 3: Bandwidth. Configuration: , , , , .
| Bandwidth | Trace error | NLL | ECE | AUROC | Accuracy |
|---|---|---|---|---|---|
| 25 | 48.3% | 0.195 | 0.0500 | 0.982 | 0.929 |
| 49 | 11.1% | 0.192 | 0.0504 | 0.982 | 0.923 |
| 100 | 1.8% | 0.195 | 0.0536 | 0.982 | 0.924 |
| 200 | 0.4% | 0.216 | 0.0718 | 0.981 | 0.923 |