Skip to main content

BITS for GAPS

CI codecov PyPI Docs

Bayesian Information-Theoretic Sampling for hierarchical GAussian Process Surrogates.

BITS for GAPS framework overview: a hierarchical Gaussian process surrogate (GAPS) places priors on the kernel hyperparameters; Bayesian information-theoretic sampling (BITS) repeatedly selects the next input by maximizing the predictive differential entropy and collects data there; the result is an information-optimal surrogate whose predictions average over the hyperparameter posterior.

Graphical abstract from the paper (© 2026 The Authors, CC BY 4.0).

A framework for information-theoretic sequential experimental design with Bayesian hierarchical Gaussian-process surrogates. Prior physical knowledge is encoded through priors on the GP hyperparameters; sampling is guided by maximizing the predictive differential entropy, so hyperparameter uncertainty (not just predictive variance) drives data acquisition.

Reference: K. D. Jones and A. W. Dowling, "BITS for GAPS: Bayesian Information-Theoretic Sampling for hierarchical GAussian Process Surrogates," Computers & Chemical Engineering 211 (2026) 109650. https://doi.org/10.1016/j.compchemeng.2026.109650

The paper is bundled in this repository so you can read the method alongside the code: paper/bits_for_gaps_paper.pdf. It is redistributed under CC BY 4.0 (© 2026 The Authors, published by Elsevier Ltd); the DOI above is the canonical citation.

Install

pip install bits_for_gaps

The core library is pure Python (GPflow / TensorFlow / NumPy / SciPy) with no Julia dependency. Julia + Clapeyron are only needed for the vle_distillation example, which isn't part of the PyPI package -- see "From source" below.

Supports Python 3.9-3.12. Python 3.13+ isn't available: this package depends on GPflow, and GPflow requires numpy<2 in every release -- no NumPy 1.x publishes a Python 3.13 wheel. That's an upstream constraint, not something this package can work around; see docs/installation.md for the full explanation.

macOS note: set export PYTHON_JULIACALL_HANDLE_SIGNALS=yes before importing juliacall, or Julia crashes with a bus error (SIGBUS).

From source (for examples/, paper/, and development)

git clone https://github.com/dowlinglab/bits_for_gaps
cd bits_for_gaps
conda env create -f environment.yml
conda activate bits_for_gaps
pip install -e ".[dev]"          # core + test tools
# pip install -e ".[dev,vle]"    # add the Julia/Clapeyron VLE example backend

Layout

src/bits_for_gaps/   the library (algorithm)
examples/            worked examples (incl. the paper's VLE/distillation case study)
paper/               scripts + reference metrics to reproduce the published figures
tests/               unit / integration / regression tests
docs/                Sphinx documentation (ReadTheDocs)

Quick test

pytest -q

To measure coverage locally (scoped to src/bits_for_gaps -- examples/, paper/, and tests/ are repo-only and excluded from the denominator):

pytest --cov=bits_for_gaps --cov-report=term-missing

Provenance

The research code behind the paper was originally developed in a private repository over the course of the study. It was then migrated here and reorganized into an installable, tested package: the algorithm was separated from the vapor–liquid-equilibrium case study, generalized to arbitrary input dimension, and covered by a test suite. That private repository holds only the development history — nothing you need to use this package or to reproduce the paper's figures is missing from this repository. The data the figure scripts read is committed here under paper/data/ (see paper/REPRODUCTION.md).

Docs

Full docs (installation, a pure-Python quickstart, theory notes, the VLE example, reproducing the paper's figures, and the API reference): https://bits-for-gaps.readthedocs.io

To build and browse locally instead:

pip install -e ".[docs]"
sphinx-build -W docs docs/_build/html
open docs/_build/html/index.html   # or your platform's equivalent

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bits_for_gaps-0.2.0.tar.gz (36.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bits_for_gaps-0.2.0-py3-none-any.whl (36.7 kB view details)

Uploaded Python 3

File details

Details for the file bits_for_gaps-0.2.0.tar.gz.

File metadata

  • Download URL: bits_for_gaps-0.2.0.tar.gz
  • Upload date:
  • Size: 36.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bits_for_gaps-0.2.0.tar.gz
Algorithm Hash digest
SHA256 190e674326c7c33aece9b19efab06a25fd47e1c180f34f529b29175feb84f728
MD5 c9472b23b2af793ea8de3a934a736165
BLAKE2b-256 93ff096ad7a58a4133d87b1c69bb949543500de87675be2cfbdabd5b1a91c465

See more details on using hashes here.

Provenance

The following attestation bundles were made for bits_for_gaps-0.2.0.tar.gz:

Publisher: publish.yml on dowlinglab/bits_for_gaps

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bits_for_gaps-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: bits_for_gaps-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 36.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bits_for_gaps-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ed9149f122e9f83628c0c9bddd0b1c7462ada9a067947b28db1d43e5749edf1
MD5 be62d1e8110c5748a070e79a5c97bfac
BLAKE2b-256 f7688d978155b8c2760bde40855c0c035fae19c30499b33365a8371f1bac9f08

See more details on using hashes here.

Provenance

The following attestation bundles were made for bits_for_gaps-0.2.0-py3-none-any.whl:

Publisher: publish.yml on dowlinglab/bits_for_gaps

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page