Active Learning for Drug Discovery
Purpose
Closed-loop molecular optimization: iteratively query the most informative compounds, label with assay/oracle, retrain model. Accelerates hit-to-lead and lead optimization by minimizing wet-lab experiments.
When to Use This Skill
- Building a surrogate model to replace expensive docking/assay calls
- Running a DMTA (Design-Make-Test-Analyze) loop
- Accelerating virtual screening with AL-ranked acquisition
- Combining QSAR uncertainty with experimental prioritization
Reference Files
Load specific references on demand:
| File |
Content |
references/al-theory.md |
Query strategies, acquisition functions, convergence, pool vs stream |
references/molecular-al.md |
Molecular representations, batch AL, diversity-reweighted sampling |
references/uncertainty-integration.md |
GP/conformal/ensemble signals → acquisition, calibration |
references/docking-al.md |
Surrogate docking oracle, VS acceleration, Logloss/BEDROC metrics |
references/dmta-loop.md |
Full DMTA cycle, stopping criteria, experiment prioritization, case studies |
Quick Routing
"I want to find actives with fewest assay calls"
→ al-theory.md (query strategy) + molecular-al.md (batch AL)
"I want to accelerate a docking campaign"
→ docking-al.md (surrogate oracle)
"I have GP/conformal uncertainty, want to plug into AL loop"
→ uncertainty-integration.md
"I'm running a real DMTA cycle with a CRO"
→ dmta-loop.md
Core Loop Pattern
# Canonical active learning loop
labeled_pool = initial_dataset # seed: 50–200 diverse cpds
unlabeled_pool = virtual_library # 10k–1M candidates
for round in range(n_rounds):
model.fit(labeled_pool.X, labeled_pool.y)
scores = acquisition_fn(model, unlabeled_pool.X) # uncertainty / EI / UCB
batch = select_batch(unlabeled_pool, scores, k=batch_size)
labels = oracle(batch) # assay / docking / human expert
labeled_pool = labeled_pool + (batch, labels)
unlabeled_pool = unlabeled_pool - batch
Key Principles
- Seed diversity matters — MaxMin or clustering on initial pool prevents early bias
- Batch mode requires diversity — greedy top-k collapses; use DPP or greedy submodular
- Calibrate before querying — miscalibrated uncertainty → wrong queries (use MAPIE/isotonic)
- Track enrichment, not accuracy — AL goal is finding actives fast, not global R²
- Stopping criterion — plateau in hit rate OR budget exhausted
Integration with ALKYL Skills
- Uncertainty estimates:
uncertainty-qsar skill (GP, conformal, deep ensembles)
- Diversity selection:
chem_diversity.py (MaxMin)
- Docking oracle:
docking skill (Vina/Gnina)
- Library design:
generative-design skill (REINVENT + AL reward)
- Property filtering:
chem_filter.py, chem_batch.py
1---2name: active-learning3description: Use when designing active learning or closed-loop molecular optimization (DMTA cycles). Covers query strategies (UCB/EI/BALD/QBC), batch DPP selection, docking oracles (Vina/Gnina), BEDROC/EF metrics, and Design-Make-Test-Analyze campaign management.4---56# Active Learning for Drug Discovery78## Purpose9Closed-loop molecular optimization: iteratively query the most informative compounds, label with assay/oracle, retrain model. Accelerates hit-to-lead and lead optimization by minimizing wet-lab experiments.1011## When to Use This Skill12- Building a surrogate model to replace expensive docking/assay calls13- Running a DMTA (Design-Make-Test-Analyze) loop14- Accelerating virtual screening with AL-ranked acquisition15- Combining QSAR uncertainty with experimental prioritization1617## Reference Files18Load specific references on demand:1920| File | Content |21|------|---------|22| `references/al-theory.md` | Query strategies, acquisition functions, convergence, pool vs stream |23| `references/molecular-al.md` | Molecular representations, batch AL, diversity-reweighted sampling |24| `references/uncertainty-integration.md` | GP/conformal/ensemble signals → acquisition, calibration |25| `references/docking-al.md` | Surrogate docking oracle, VS acceleration, Logloss/BEDROC metrics |26| `references/dmta-loop.md` | Full DMTA cycle, stopping criteria, experiment prioritization, case studies |2728## Quick Routing2930**"I want to find actives with fewest assay calls"**31→ `al-theory.md` (query strategy) + `molecular-al.md` (batch AL)3233**"I want to accelerate a docking campaign"**34→ `docking-al.md` (surrogate oracle)3536**"I have GP/conformal uncertainty, want to plug into AL loop"**37→ `uncertainty-integration.md`3839**"I'm running a real DMTA cycle with a CRO"**40→ `dmta-loop.md`4142## Core Loop Pattern4344```python45# Canonical active learning loop46labeled_pool = initial_dataset # seed: 50–200 diverse cpds47unlabeled_pool = virtual_library # 10k–1M candidates4849for round in range(n_rounds):50 model.fit(labeled_pool.X, labeled_pool.y)51 scores = acquisition_fn(model, unlabeled_pool.X) # uncertainty / EI / UCB52 batch = select_batch(unlabeled_pool, scores, k=batch_size)53 labels = oracle(batch) # assay / docking / human expert54 labeled_pool = labeled_pool + (batch, labels)55 unlabeled_pool = unlabeled_pool - batch56```5758## Key Principles591. **Seed diversity matters** — MaxMin or clustering on initial pool prevents early bias602. **Batch mode requires diversity** — greedy top-k collapses; use DPP or greedy submodular613. **Calibrate before querying** — miscalibrated uncertainty → wrong queries (use MAPIE/isotonic)624. **Track enrichment, not accuracy** — AL goal is finding actives fast, not global R²635. **Stopping criterion** — plateau in hit rate OR budget exhausted6465## Integration with ALKYL Skills66- Uncertainty estimates: `uncertainty-qsar` skill (GP, conformal, deep ensembles)67- Diversity selection: `chem_diversity.py` (MaxMin)68- Docking oracle: `docking` skill (Vina/Gnina)69- Library design: `generative-design` skill (REINVENT + AL reward)70- Property filtering: `chem_filter.py`, `chem_batch.py`