Metadata-Version: 2.4
Name: gloss-opt
Version: 0.1.0
Summary: GLOSS: Global-Local-Unexplored Sampling Strategy for batch surrogate optimization in vast chemical search spaces
Author-email: zhangbc <zbc@ustc.edu.cn>
License: MIT
Project-URL: Homepage, https://github.com/zbc0315/gloss
Project-URL: Repository, https://github.com/zbc0315/gloss
Project-URL: Issues, https://github.com/zbc0315/gloss/issues
Keywords: bayesian-optimization,surrogate-models,autonomous-chemistry,batch-sampling,exploration-exploitation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21
Requires-Dist: scipy>=1.7
Requires-Dist: scikit-learn>=1.0
Provides-Extra: nn
Requires-Dist: torch>=1.9; extra == "nn"
Provides-Extra: ml
Requires-Dist: xgboost>=1.5; extra == "ml"
Requires-Dist: lightgbm>=3.3; extra == "ml"
Provides-Extra: all
Requires-Dist: torch>=1.9; extra == "all"
Requires-Dist: xgboost>=1.5; extra == "all"
Requires-Dist: lightgbm>=3.3; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# GLOSS

**Global–Local–Unexplored Sampling Strategy** — a multi-strategy
batch recommender for surrogate-based optimization in vast chemical
search spaces.

## Overview

GLOSS decomposes each $q$-point batch across three complementary
streams that share a single surrogate model:

- **Global** — UCB-driven exploitation
- **Local** — BallTree refinement around the current best
  (with an $\mathcal{O}(K)$ top-$K$ truncation that keeps it practical
  on $n=10^5$–$10^6$ candidate pools)
- **Unexplored** — maximizes geometric distance to observed points;
  uses no surrogate signal, providing robustness against an overfit
  surrogate

## Install

```bash
git clone https://github.com/zbc0315/gloss.git
cd gloss
pip install -e .
```

Python 3.9+ required. Dependencies are pinned in `requirements.txt`.

## Quick start

```python
from gloss import GLOSS

g = GLOSS(
    space={"candidates": candidates},
    direction="maximize",
    ratio={"global_best": 4, "local_best": 2, "unexplored": 2},
)
batch = g.recommend(X_obs, y_obs, n_points=8)
```

## Reproducing the benchmark

```bash
python -m benchmarks.bench_main --study all
```

Benchmark covers Buchwald–Hartwig ($n=3{,}955$), QM9 HOMO–LUMO gap
($n=100{,}000$), and an Arrhenius-2D virtual surface, comparing
GLOSS against UCB-BO, BO(EI), GA, and Random across 5 seeds.

## License

MIT.
