Train and ship a public-domain aroma descriptor model - #82
Merged
Merged
Conversation
The earlier audit missed a clean source: PubChem's 'Odor' annotation is public domain (HSDB/Haz-Map) for ~2,200 compounds. New pipeline: - build_odor_notes.py --pubchem-all now also captures SMILES (for fingerprints). - build_aroma_dataset.py keyword-normalizes the free-text odor into a controlled multi-label descriptor vocabulary (presence/absence) -> aroma_train.parquet. - train_aroma.py trains one RandomForest per descriptor on Morgan FP (the taste stack); keeps the 13 heads that clear CV-AUROC >= 0.70 (ammoniacal 0.96, medicinal 0.96, almond 0.91, citrus 0.90, garlic 0.88, fishy 0.85, fruity/minty/ camphor 0.84, ethereal 0.82, floral 0.80, pungent 0.80). - predict_aroma() surfaces predicted descriptors for ANY molecule; /api/aroma returns them alongside documented odor + threshold; the workbench shows them as bars with each head's AUROC. Honest ceiling documented in AROMA.md: presence/absence, not intensity (free text carries no scores); a scored map still needs licensed/customer panel data. Also: substitution neighbor cards now show IUPAC (common + IUPAC + SMILES). Signed-off-by: Austin L. <86896075+rvnminers-A-and-N@users.noreply.github.com>
predict_aroma now returns descriptors when aroma_models/ is present and an honest 'not trained here' marker otherwise (CI has no models). The test asserts both branches instead of the old fixed 'see AROMA.md' placeholder string. Signed-off-by: Austin L. <86896075+rvnminers-A-and-N@users.noreply.github.com>
This was referenced Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Aroma is now predicted, not deferred. PubChem's 'Odor' annotation is public domain (HSDB/Haz-Map) for ~2,200 compounds β the clean source the earlier audit missed.
Pipeline:
build_odor_notes.py --pubchem-all(corpus + SMILES) βbuild_aroma_dataset.py(free text β controlled multi-label descriptor vocabulary) βtrain_aroma.py(RandomForest per descriptor, taste stack). 13 heads clear CV-AUROC β₯ 0.70 β ammoniacal 0.96, medicinal 0.96, almond 0.91, citrus 0.90, garlic 0.88, fishy 0.85, fruity/minty/camphor 0.84, ethereal 0.82, floral 0.80, pungent 0.80.predict_aroma()predicts for any molecule (verified: ethyl hexanoate, not in corpus β 'fruity' 0.81)./api/aroma+ workbench show predicted descriptors with AUROC alongside documented odor + threshold.Honest ceiling (AROMA.md): presence/absence, not intensity β a scored map still needs licensed/customer panel data.
Also: substitution cards now show common + IUPAC + SMILES.