Skip to main content

fastgps: Fast Gaussian Process Regression in Python

Docs Tests

Installation

pip install fastgps

Overview

Gaussian process (GP) regression on $n$ data points typically require $\mathcal{O}(n^3)$ computations and $\mathcal{O}(n^2)$ storage. Fast GPs only require $\mathcal{O}(n \log n)$ computations and $\mathcal{O}(n)$ storage by forcing nice structure into the $n \times n$ Gram matrix of pairwise kernel evaluations. Fast GPs require

  • Control over the design of experiments, i.e., sampling at fixed locations which we will choose to be quasi-random (low-discrepancy) sequences, and
  • Using special kernel forms that are practically performant but generally uncommon, e.g., one cannot use common kernels such as the Squared Exponential, Matern, or Rational Quadratic. We will use (digitally)-shift invariant kernels.

Scope

fastgps currently support two flavors:

  1. Pairing rank-1 integration lattices with shift-invariant (SI) kernels creates circulant Gram matrices that are diagonalizable by Fast Fourier Transforms (FFTs). SI kernels are periodic and arbitrarily smooth.
  2. Pairing digital sequences (e.g. Sobol' sequences) with digitally-shift-invariant (DSI) kernels creates Gram matrices diagonalizable by Fast Walsh-Hadamard Transforms (FWHTs). DSI kernels are discontinuous, yet versions exist for which the corresponding Reproducing Kernel Hilbert Space (RKHSs) contains arbitrarily smooth functions.

Features

A reference standard GP implementation is available alongside the fast GP implementations. All GP methods support:

  • GPU computations as fastgps is built on the PyTorch stack.
  • Batching of both outputs (for functions with tensor outputs) and parameters (with flexibly shareable parameters among batched outputs).
  • Multi-Task GPs with product kernels and generalized fast multi-task GPs.
  • Derivative Information of arbitrarily high order.
  • Bayesian Cubature for approximating integrals or expectations.
  • Flexible kernel parameterizations from the QMCPy package.
  • Efficient variance projections for determining if and where to sample next.

Resources

The fastgps documentation contains a detailed package reference documenting classes including thorough doctests. A number of example notebooks are also rendered into the documentation from fastgps/docs/examples/. We recommend reading Aleksei Sorokin's slides on Fast GPs which he presented at MCM 2025 Chicago.

Citation

If you find the fastgps package helpful in your work, please consider citing the following papers

@phdthesis{sorokin.thesis,
  title               = {Algorithms and scientific software for quasi-{M}onte {C}arlo, fast {G}aussian process regression, and scientific machine learning},
  author              = {Aleksei G. Sorokin},
  year                = {2025},
  school              = {Illinois Institute of Technology},
  journal             = {ArXiv preprint},
  volume              = {abs/2511.21915},
  url                 = {https://arxiv.org/abs/2511.21915},
}

@inproceedings{sorokin.fastgps_probnum25,
  title               = {Fast {G}aussian process regression for high dimensional functions with derivative information},
  author              = {Sorokin, Aleksei G. and Robbe, Pieterjan and Hickernell, Fred J.},
  year                = {2025},
  booktitle           = {Proceedings of the First International Conference on Probabilistic Numerics},
  publisher           = {{PMLR}},
  series              = {Proceedings of Machine Learning Research},
  volume              = {271},
  pages               = {35--49},
  url                 = {https://proceedings.mlr.press/v271/sorokin25a.html},
  editor              = {Kanagawa, Motonobu and Cockayne, Jon and Gessner, Alexandra and Hennig, Philipp},
  pdf                 = {https://raw.githubusercontent.com/mlresearch/v271/main/assets/sorokin25a/sorokin25a.pdf},
}

@article{sorokin.FastBayesianMLQMC,
  title               = {Fast {B}ayesian multilevel quasi-{M}onte {C}arlo},
  author              = {Aleksei G. Sorokin and Pieterjan Robbe and Gianluca  Geraci and Michael S. Eldred and Fred J. Hickernell},
  year                = {2025},
  journal             = {ArXiv preprint},
  volume              = {abs/2510.24604},
  url                 = {https://arxiv.org/abs/2510.24604},
}

Metadata

Release files for fastgps 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastgps 1.1
File Size Uploaded Provenance
fastgps-1.1.tar.gz 29.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fastgps 1.1
File Interpreter ABI Platform
fastgps-1.1-py3-none-any.whl Python 3 none any Details

Total release size: 64.6 kB

Release files / fastgps-1.1.tar.gz

Download URL fastgps-1.1.tar.gz
Size 29.7 kB
Tags Source
SHA-256 checksum
How to use checksums
90a7e46b6c53ed1ecc757d610926ab3620f519b22a82c6d907b9381c006f23fd
BLAKE2b-256 checksum
How to use checksums
513a5e496ed7c68e38cce485f7717c514ab0fb8723404e01082c10c9919b7bc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.24.1 CPython/3.13.6 Darwin/24.6.0

Release files / fastgps-1.1-py3-none-any.whl

Download URL fastgps-1.1-py3-none-any.whl
Size 35.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d2fbac18f34dcd76fd008bb37a04e1afdcb48065ed67fcdc7e17ea31f722ea4
BLAKE2b-256 checksum
How to use checksums
95a569991ad45a1920444fcf912eac443d0055c64255c503a5101850e58cf13c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.24.1 CPython/3.13.6 Darwin/24.6.0

Security for fastgps 1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page