Epistemic Nearest Neighbors
A fast, alternative surrogate for Bayesian optimization
ENN estimates a function's value and associated epistemic uncertainty using k-nearest neighbors (KNN) or approximate nearest neighbors (ANN). Queries take O(Nlnk) time (KNN) or O(k lnN) time (ANN), where N is the number of observations available for KNN lookups and k is the number of neighbors.
Code
- Python API:
src/enn/__init__.py - Rust API:
rust/crates/ennbo/src/lib.rs
Contents
- ENN surrogate,
EpistemicNearestNeighbors[1] - TuRBO optimizer via
create_optimizerwith config factoriesturbo_enn_config()- TuRBO-ENN (Rust-backed by default)turbo_zero_config()- TuRBO-zero (Rust-backed)lhd_only_config()- LHD design on everyask()(Rust-backed) The optimizer has anask()/tell()interface. Allturbo_*()methods follow TuRBO:- Generate candidates with RAASP [3] sampling.
- Select a candidate with UCB or Thompson sampling (TuRBO-ENN), or randomly (TuRBO-zero).
[1] M. Bafna, Jadhav, S. a., & Sweet, D., (2025). Taking the GP Out of the Loop. arXiv preprint arXiv:2506.12818. https://arxiv.org/abs/2506.12818 [2] Eriksson, D., Pearce, M., Gardner, J. R., Turner, R., & Poloczek, M. (2020). Scalable Global Optimization via Local Bayesian Optimization. Advances in Neural Information Processing Systems, 32. https://arxiv.org/abs/1910.01739 [3] Rashidi, B., Johnstonbaugh, K., & Gao, C. (2024). Cylindrical Thompson Sampling for High-Dimensional Bayesian Optimization. Proceedings of The 27th International Conference on Artificial Intelligence and Statistics (pp. 3502–3510). PMLR. [4] [4] Tekin, S. F., & Bordawekar, R. (2025). B+ANN: A Fast Billion-Scale Disk-based Nearest-Neighbor Index. arXiv preprint arXiv:2511.15557. https://arxiv.org/abs/2511.15557 https://proceedings.mlr.press/v238/rashidi24a.html
Installation
pip install ennbo[with-deps]
or
cargo add ennbo
Run tests with
make test
Metadata
Release files for ennbo 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ennbo-0.4.0-cp312-cp312-manylinux_2_31_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.31+ x86-64 | Details for ennbo-0.4.0-cp312-cp312-manylinux_2_31_x86_64.whl |
| ennbo-0.4.0-cp312-cp312-manylinux_2_25_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.25+ x86-64 | Details for ennbo-0.4.0-cp312-cp312-manylinux_2_25_x86_64.whl |
| ennbo-0.4.0-cp311-cp311-macosx_26_0_arm64.whl | CPython 3.11 | CPython 3.11 | macOS 26.0+ ARM64 | Details for ennbo-0.4.0-cp311-cp311-macosx_26_0_arm64.whl |
Total release size: 26.7 MB
Release files / ennbo-0.4.0-cp312-cp312-manylinux_2_31_x86_64.whl
| Download URL | ennbo-0.4.0-cp312-cp312-manylinux_2_31_x86_64.whl |
|---|---|
| Size | 7.1 MB |
| Tags | CPython 3.12 Linux glibc 2.31+ x86-64 |
|
SHA-256 checksum How to use checksums |
eaf6e4f83b2020ca828f863a5a4298e44240173df4d7f23a06e3301b5b638ee7
|
|
BLAKE2b-256 checksum How to use checksums |
56143392bd14209b0acd942ebbb6356eed75a1f08ddf0afc20324b16530d8b00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ennbo-0.4.0-cp312-cp312-manylinux_2_25_x86_64.whl
| Download URL | ennbo-0.4.0-cp312-cp312-manylinux_2_25_x86_64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | CPython 3.12 Linux glibc 2.25+ x86-64 |
|
SHA-256 checksum How to use checksums |
ef6f04aae4c2fc53256a2ef4bf1466402d94d5bbfe5d2f64ef39d57306029f17
|
|
BLAKE2b-256 checksum How to use checksums |
b2a4a18130b56596bf7a4daa4e77ff590a8565fe7355858e029e431af91de0bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ennbo-0.4.0-cp311-cp311-macosx_26_0_arm64.whl
| Download URL | ennbo-0.4.0-cp311-cp311-macosx_26_0_arm64.whl |
|---|---|
| Size | 12.6 MB |
| Tags | CPython 3.11 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d5bbf33956ecfd7473854586eebfc13f86aa95d66988b54f08034c6ab5db7eaa
|
|
BLAKE2b-256 checksum How to use checksums |
821cb0307104756dc65899efce087a9490c335c6bad50a36af7cb8a14f444dba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for ennbo 0.4.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.