Commit 928a9f0
authored
Broaden the memorizing aroma heads, and measure whether it worked (#258)
* feat(training): audit whether a head learns its class or memorizes it
A cross-validated AUROC only ever asks about molecules inside the labelled set, so it cannot
see the failure that matters most for the thin heads: a head fit on twelve molecules sharing
one scaffold scores 0.99 by recognising that scaffold, fires on exactly its own training
molecules, and discovers nothing. audit_generalization.py fires every head over the whole
corpus and counts the hits that were NOT trained on.
Scoring at a single threshold turned out to conflate two opposite problems. A head with 13
positives against 2400 negatives is calibrated conservatively even with balanced class
weights, so "0 novel at 0.5" covers both "learned nothing" and "learned the class but is shy
about saying so" — and those want opposite fixes. The audit therefore also probes at 0.35 and
returns a three-way verdict: generalizes / under-confident / memorizing.
That distinction is not hypothetical. Of the aroma roster, 153 generalize, 12 are merely
under-confident (pine finds 8 unlabelled molecules at 0.35, rosemary 9, freesia 9), and only
turmeric and celery memorize at any threshold — both genuinely narrow single-scaffold classes
where more molecules will not help. Read at 0.5 alone, all 14 looked like the same problem.
Also corrects METHODS.md, which still described the aroma model as deferred to licensed data
several hundred heads after it shipped. The gated piece is depth, not vocabulary.
Signed-off-by: Austin L. <86896075+rvnminers-A-and-N@users.noreply.github.com>
* data(aroma): broaden the twelve memorizing heads with diverse positives (#256)
Each of these heads was drawing its positives solely from the weak-labelled HSDB odor corpus,
with no entry in CURATED at all — which is why they were thin and narrow enough to memorize.
Adds well-established character-impact chemistry for each, chosen for structural spread rather
than volume, the same way #247 moved tingling off zero: pinenes/camphene/carene/bornyl esters
for pine, cineole/terpinen-4-ol/aromadendrene for eucalyptus, phthalides for celery,
indole/cresol/benzyl esters/cinnamyl alcohol for narcissus.
Honest result: five moved off zero at the 0.5 threshold — narcissus 0 to 4 novel discoveries,
frankincense and costus to 2, fennel and allspice to 1. Another five (pine, eucalyptus,
rosemary, freesia, elemi) turned out to be under-confident rather than memorizing once probed
at 0.35, so the extra positives sharpened heads that had already learned their class. Turmeric
and celery did not move at any threshold and are tracked separately; a single-scaffold class
that thin is a model problem, not a data problem.
AUROC fell for several heads (pine 0.965 to 0.905, frankincense 0.916 to 0.829). That is the
right direction — a broader class is genuinely harder to fit, and a score dropping while
discovery rises is what learning instead of memorizing looks like.
Corpus now trains 167 aroma heads, up from 164.
Signed-off-by: Austin L. <86896075+rvnminers-A-and-N@users.noreply.github.com>
---------
Signed-off-by: Austin L. <86896075+rvnminers-A-and-N@users.noreply.github.com>1 parent cbc7893 commit 928a9f0
3 files changed
Lines changed: 226 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
89 | 122 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
85 | 114 | | |
86 | 115 | | |
87 | 116 | | |
| |||
0 commit comments