Optimizer Workflow
The LatticeZero Optimizer finds the scoring weight combination that best separates known drugs from known non-drugs for a specific target. This guide explains how the optimizer works and when to use it.
:::note This guide covers the supervised optimizer (requires actives + decoys). For unsupervised profile generation, see Autotune. :::
What Is a Scoring Profile?
A scoring profile is a set of weights that tell the scoring engine how much to care about each physics term for a specific target. The default "equal weight" profile gives AUC ~0.50 (random discrimination). An optimized profile can achieve AUC 0.70–0.98 for the same target.
Why target-specific weights matter:
- ACE (metalloprotease): weights metal coordination heavily (ZBG score)
- CDK2 (kinase): weights hinge hydrogen bonds and depth heavily
- MCL1 (PPI): weights burial and inside-fraction heavily
- ESR1 (nuclear receptor): weights aromatic burial and depth heavily
When to Use the Optimizer
Use the Optimizer when you have:
- A prepared target (receptor + pocket definition)
- Known actives - SMILES or SDF of confirmed binders (≥20 recommended)
- Known decoys - SMILES or SDF of non-binders (≥200 recommended, ideally 30× actives)
The DEKOIS2 benchmark sets provide these for 27 validated targets. For custom targets, use ChEMBL actives with DUD-E or DEKOIS2-style decoys.
The Optimization Pipeline
Step 1 - Input Data
You need a scores CSV with physics term columns for all compounds. The typical pipeline:
- Dock all actives + decoys with IsoPose (or use pre-docked poses)
- Export the scores CSV (includes all 14 physics terms + geometric features)
- Merge with labels (1 = active, 0 = decoy)
Step 2 - Optimization Method
The optimizer uses differential evolution (SciPy DE) to search the weight space:
- Initialization - warm-start from target-class priors (not random)
- Objective - maximize mean holdout AUC across 5 cross-validation folds
- Search - DE tries thousands of weight combinations:
maxiter=500, Sobol initialization - Regularization - L2 penalty prevents extreme weights
- Polish - L-BFGS-B local optimizer fine-tunes after DE convergence
Step 3 - Validation
Results are only accepted if they pass validation:
| Check | Threshold | Meaning |
|---|---|---|
| CV AUC | > 0.55 | Better than random |
| Y-scramble AUC | < 0.55 | Signal is real, not artifact |
| Signal gap | CV AUC − Y-scramble > 0.15 | Genuine discrimination |
| Bootstrap CI | ±0.03 or better | Estimate is stable |
Y-scramble is mandatory: the optimizer runs again with randomized labels. If it still finds high AUC, the signal is fake (likely due to property biases in the dataset - avoid using MW, TPSA, logP as features).
:::warning Physics features only. Never include molecular descriptors (MW, logP, TPSA, HBD, HBA) in the feature set - they inflate AUC via DEKOIS2 property-matching artifacts without any binding information. :::
Step 4 - Tier Assignment
| CV AUC | Tier | Meaning |
|---|---|---|
| ≥ 0.90 | Platinum | Publication-quality discrimination |
| ≥ 0.70 | Gold | Reliable for lead discovery |
| ≥ 0.55 | Silver | Some signal, use with caution |
| < 0.55 | Internal | Not recommended for external use |
Feature Importance
After optimization, the profile shows which features drive discrimination:
- Large positive weights - terms that are significantly better in actives
- Large negative weights - terms that are significantly worse in actives (penalize if high)
- Near-zero weights - terms with no discriminative power for this target
This is scientifically informative: high E_hbq weight confirms hydrogen bonds are critical for the target. High inside_frac weight confirms tight burial is key. High ZBG weight confirms zinc coordination is essential.
Re-optimization Triggers
Consider re-optimizing a profile when:
- Engine update - new physics terms added or existing terms recalibrated
- More data - additional actives or decoys available
- Demo drift - health dashboard shows demo AUC significantly above validated AUC (re-opt candidate)
- New target class - novel target type not well-represented by existing priors
The Platform Health dashboard (admin only) tracks demo vs. validated AUC for all 18 benchmark targets and flags re-optimization candidates automatically.
Validated Profile Library
LatticeZero ships with 27 pre-validated profiles across 5 target classes:
| Tier | Count | Example Targets |
|---|---|---|
| Platinum | 1 | HMGR |
| Gold | 7 | PDE5, NA, MCL1, ESR1, ADRB2, CATL, FXA |
| Silver | 11 | HDAC2, BRAF, UROK, Thrombin, GBA, AR, P38A, HIVRT, CDK2, ACE, HIV1PR |
| Internal | 8 | BACE1, A2A, AmpC, HSP90, DHFR, PARP1, EGFR, COX2 |
See Benchmark Results for full DEKOIS2 validation numbers.