- Build the project in two stages.
V1is a chemically curated, probability-calibrated repellency model using standard cheminformatics features.V2adds electronic-structure descriptors afterV1has identified the most informative compounds. - Use the paper’s strategy as the template: feature-tokenized transformer for tabular molecular descriptors, frozen-backbone fine-tuning on small labeled data, calibrated uncertainty with cross-validation plus conformal prediction, and post-hoc interpretability with SHAP/attention.
- Do not implement a 3-class softmax model initially.
non-repellent,repellent, andinsecticidalare not cleanly exclusive, and the LifeChemicals insecticide file is currently an unlabeled screening pool, not supervised insecticide ground truth. - Treat “effectiveness” as a calibrated probability of activity in
V1. Only treat effectiveness as potency after real numeric labels such as% repellency,% mortality,LC50, orLD50are added.
- Create a reproducible data-curation pipeline that reads the three SDFs, strips salts/counterions, canonicalizes structures, keeps one canonical record per InChIKey, preserves source metadata, and flags malformed/placeholder records in the decoy file for exclusion.
- Define the first supervised endpoint as
repellent_activewith1from the repellent SDF and0from curated non-repellent decoys. Usenon-repellentas the complement of this probability, not as a separate head. - Restrict the first production model to the dominant assay scope:
Aedes aegyptirepellency. Keep the other species as metadata for later multi-domain expansion, not mixed into the first supervised target. - Build
V1with two model families trained on the same scaffold split: a strong baseline using Morgan fingerprints (radius=2,2048bits) plus RDKit 2D descriptors, and anFTTransformerover curated tabular features. Select the winner by scaffold-splitPR-AUC,ROC-AUC,MCC,Brier score, and calibration. - Pretrain the
FTTransformerbackbone on all curated molecules from the three SDFs using self-supervised masked-feature reconstruction. Freeze the backbone and fine-tune only the head on the labeled repellency task, mirroring the paper’s transfer-learning approach. - Export model outputs in a single prediction table with:
compound_id,canonical_smiles,scaffold_id,p_repellent,p_non_repellent=1-p_repellent,prediction_interval,ood_score, andsplit_id. - Add conformal uncertainty exactly as a first-class output. Use scaffold-aware 5-fold cross-validation for out-of-fold predictions, then fit calibration plus conformal intervals on those predictions so each molecule gets both a probability and an uncertainty band.
- Create a quantum-descriptor stage for
V2that runs afterV1and only on a selected subset. The default subset is300labeled molecules chosen by class balance and scaffold diversity (150repellent,150non-repellent) plus200unlabeled LifeChemicals molecules chosen from100highestp_repellentand100highest uncertainty. - Use
GFN2-xTBas the broad quantum layer. For each selected molecule, generate conformers with ETKDG, MMFF-optimize, keep the lowest-energy conformer, optimize with xTB, and extract at minimum:HOMO,LUMO,gap,dipole,total energy,partial charge mean/std/max,polarizability if available, and simple frontier-orbital-derived reactivity indices. - Use DFT only as a validation/high-fidelity layer on a smaller subset of
100molecules drawn from the xTB set with class balance and chemical diversity. Run single-point DFT on the xTB-optimized geometry to benchmark whether xTB descriptors are directionally reliable before expanding DFT usage. - Train
V2as an ablation study, not a blind replacement. Compare three feature sets on the same labeled quantum subset: cheminformatics-only, quantum-only, and fused features. Promote the fused model only if it improves scaffold-split discrimination and calibration. - Keep the LifeChemicals library unlabeled in training. Use it for self-supervised pretraining and later screening/ranking only. Do not train an
insecticidalhead until external insecticide assay labels are added from ChEMBL, PubChem, or literature. - Reserve the later
V3interface now: once insecticide labels exist, extend the model to a multitask setup with independent outputsp_repellentandp_insecticidal, each with its own calibration and uncertainty, instead of collapsing them into one multiclass label.
- Standardize on four project artifacts:
curated_molecules.parquet,split_manifest.json,model_predictions.parquet, andquantum_descriptors.parquet. curated_molecules.parquetshould contain identifiers, canonical structure fields, source dataset, label fields, assay/species metadata, scaffold, and aqc_statuscolumn for excluded/problematic molecules.quantum_descriptors.parquetshould key bycompound_idand store conformer provenance, method (xtbordft), charge/multiplicity, convergence status, and the extracted electronic descriptors.model_predictions.parquetshould expose only calibrated probabilities and uncertainty outputs that downstream ranking or simulation selection will consume.
- Verify data curation is deterministic: repeated runs produce identical canonical SMILES, label counts, and exclusion counts.
- Verify no leakage: no Bemis-Murcko scaffold appears in both train and validation folds.
- Benchmark
V1against random and majority baselines; require materially betterPR-AUC,MCC, andBrier score. - Check probability calibration with reliability plots and expected calibration error; reject any model with good AUC but poor calibration.
- For
V2, evaluate gain only on the same labeled subset with quantum descriptors; require improvement in at least one ranking metric and one calibration metric before adopting fused features. - For the DFT benchmark subset, require that xTB-derived HOMO/LUMO gap rankings correlate strongly enough with DFT to justify continued xTB use as the bulk descriptor engine.
- Run interpretability on the final selected model and confirm important features are chemically plausible rather than assay/source artifacts.
- The insecticide dataset obtained from LifeChemical is treated as an unlabeled candidate library until real insecticide activity labels are added.
- The first supervised endpoint is
Aedes aegyptirepellency because it is the dominant labeled target and gives the cleanest initial task. - “Effectiveness” in the first release means calibrated probability of repellency, not potency. Potency modeling is deferred until numeric assay labels exist.
- The decoy SDF contains some malformed or placeholder structures; those will be excluded during curation rather than force-fit into training.
- The default quantum workflow is
xTB first, DFT second, and quantum descriptors are used to improve a screened subset before any attempt to scale them to the full library.