Skip to content

Commit 8df86d6

Browse files
atschalzclaudeLennartPurucker
authored
SMILES as typed structure columns; the NCI AIDS antiviral screen added, hiva_agnostic retired (#15)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: LennartPurucker <lennart@priorlabs.ai>
1 parent e24d557 commit 8df86d6

63 files changed

Lines changed: 4006 additions & 2254 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/skills/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ run `data-foundry-curation claims claim <names>`. The details:
136136
case, honest evaluation, faithful data, worth benchmarking, the expert state), rule strengths (Must, Should, Weigh),
137137
the tensions between rules and how they are settled, exceptions and amendments.
138138
[evidence.md](knowledge-curation/references/evidence.md) says what counts as evidence and what a probe flag can mean.
139+
[molecules.md](knowledge-curation/references/molecules.md) is the guide to molecule datasets (SMILES, salts, scaffold
140+
splits, structures recovered from a release).
139141
* [knowledge-data-foundry](knowledge-data-foundry/SKILL.md): how this repository does it (records, the dashboard,
140142
`dataset.py`, the working copy, builds) and the house rules.
141143
* The dashboard's Guidelines page renders both.

‎.claude/skills/knowledge-curation/SKILL.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: knowledge-curation
3-
description: "Reference knowledge, no workflow: how we decide whether a tabular dataset belongs in TabArena and how we curate it, independent of the tooling, as ranked rules with IDs and strengths. The principles and how to decide (rank, Must / Should / Weigh, tensions, exceptions, consistent judgement), ethics and scope, the use case and prediction point, leaks, IID / grouped / temporal splits, sources and duplicates, whether a task is trivial or too small, which metric scores it, cleaning and features; plus evidence and reading probes, the verification checklist, writing for the curator, and a general probe library. Load it when advising on any of these, or when a workflow skill (/screen-candidates, /review-screened-candidates, /add-dataset, /review-added-datasets) points to one of its files."
3+
description: "Reference knowledge, no workflow: how we decide whether a tabular dataset belongs in TabArena and how we curate it, independent of the tooling, as ranked rules with IDs and strengths. The principles and how to decide (rank, Must / Should / Weigh, tensions, exceptions, consistent judgement), ethics and scope, the use case and prediction point, leaks, IID / grouped / temporal splits, sources and duplicates, whether a task is trivial or too small, which metric scores it, cleaning and features; a guide to molecule datasets (SMILES, salts, scaffolds); plus evidence and reading probes, the verification checklist, writing for the curator, and a general probe library. Load it when advising on any of these, or when a workflow skill (/screen-candidates, /review-screened-candidates, /add-dataset, /review-added-datasets) points to one of its files."
44
user-invocable: false
55
---
66

@@ -35,6 +35,12 @@ Procedure, at every rank:
3535
| [verification.md](references/verification.md) | | the last step of every workflow: the checklist and which stage runs which check |
3636
| [writing.md](references/writing.md) | | writing anything the curator will read: comments, notes, issues, the judgment record, reports |
3737

38+
Domain guides, which add no rules but show how the rules above apply to one kind of data:
39+
40+
| File | Read it when |
41+
|---|---|
42+
| [molecules.md](references/molecules.md) | a dataset's rows are molecules (a SMILES, a structure file, molecule identifiers, or descriptor or fingerprint columns computed from a structure): what ships, copies and salts, scaffold splits, recovering structures, the pitfalls and the measured evidence |
43+
3844
The general probe methods (leak, task, group, hidden-group and generated-data probes, as functions on a frame, a
3945
target and splits) are in [scripts/](scripts/); the commands that run them on a Data Foundry dataset are in the sibling
4046
skill.

‎.claude/skills/knowledge-curation/references/cleaning_features.md‎

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,21 @@ permutes the feature order when it runs.
260260

261261
### Molecules
262262

263-
**CLEAN-24 (Should).** A molecule's structure (SMILES) ships as RDKit's 2D descriptors from one pinned RDKit for every
264-
dataset, and the SMILES string is dropped; descriptors the source ships stay next to them. As text the SMILES adds
265-
nothing to the descriptors, and the benchmark needs no chemistry step of its own. Check for rows that become copies
266-
once the stereochemistry is gone (stereoisomers share every 2D descriptor). Cases: apistox,
267-
drug_induced_autoimmunity_prediction, qsar_bioconcentration (2026-10-14).
263+
**CLEAN-24 (Should; amended 2026-11-01, Lennart).** A molecule's structure ships as a SMILES column marked as a
264+
structure, never as plain text and never pre-encoded: the definition lists it in `smiles_columns` (RDKit's canonical
265+
form, `canonical_smiles`), the container records it as a semantic column of type `smiles` with the recommended
266+
encoding, and the benchmark encodes it, as it encodes dates and text. The recommended encoding is RDKit's 2D descriptors, the 166 MACCS keys and the ECFP4 counts (`encode_smiles`, one pinned RDKit); a benchmark may use its own. A SMILES read as
267+
text adds nothing (character n-grams: -0.025 to +0.010 ROC AUC next to descriptors; a text embedding: nothing on
268+
apistox), a fixed encoding of the structure does, and the MACCS keys add 0.02 on drug_induced_autoimmunity_prediction
269+
without costing more than 0.006 elsewhere. Source columns computed from the same structure are one modelling choice of
270+
the authors and leave, whether or not the recommended encoding reproduces them exactly (Lennart, 2026-11-01: "the real
271+
task here is going from smiles to a prediction"): drug_induced_autoimmunity_prediction's RDKit descriptors,
272+
qsar_tid_11's FCFP6 bits, qsar_oral_toxicity's ECFP bits, the Dragon descriptors of qsar_biodeg,
273+
qsar_fish_toxicity and qsar_aquatic_toxicity. Measured properties stay (qsar_bioconcentration's logKOW), and a column that mixes a measurement with a prediction of the same property stays whole when the actor of the use case would also reach for the prediction (USE-6; that logKOW is 84% measured and 16% the authors' consensus prediction). Salts stay as published: salt forms of one
274+
compound are a decision of their own (LEAK-19), since the largest fragment is no salt stripper. Check for rows that
275+
become copies once the stereochemistry is gone (`canonical_smiles(..., stereo=False)`: a 2D encoding does not tell
276+
stereoisomers apart). Cases: apistox, drug_induced_autoimmunity_prediction, qsar_bioconcentration,
277+
qsar_oral_toxicity, qsar_tid_11.
268278

269279
## Weighed factors
270280

@@ -312,6 +322,7 @@ Precedents: how a rule was applied. They never change a rule; an exception is li
312322
| CLEAN-14 | california_house_prices_2020, miami_housing, eryhemato_squamous_disease, student_portuguese_performance, anes_voting_2026 and 13 more | scores and ratings with no words per level, or words only at their ends, are numbers again (54 columns: school ratings 1-10, `structure_quality`, the ten 0-3 findings, 1-5 ratings, 7-point scales, a histologic stage, a degree of malignancy); labelled scales ordered by their words; reverses the 2026-10-31 typing of every scale shipped as numbers as an ordered category (2026-11-01, Lennart: "if we can replace the numbers with a description that is obviously not continous then orderd categorical makes sense") | applied |
313323
| CLEAN-17 | audiology_diagnosis | classes merged by a convention of the field, and the merge tested (TP-7) | applied |
314324
| CLEAN-17 | force_2020_well_well_log_and_lithofacies_dataset_for_machine_learning_competition | the Basement class (103 rows, all in well 16/4-1) dropped: a class that lives in one group cannot be on the train and the test side of a split by that group; the other 11 classes occur in at least 4 wells; the first class dropped for living in one group (2026-10-21, Lennart) | applied |
325+
| CLEAN-17 | nci_aids_antiviral_screen | the screen's three conclusions (CA, CM, CI) merged into active against inactive: four independent releases over eighteen years define that target on this file (the 2007 HIVA challenge, MoleculeNet, OGB's `ogbg-molhiv`, ChemPile), it is the call a screening team acts on (USE-5), and the merge is measured (41,140 compounds, 1,404 active, ROC AUC 0.78 to 0.82 over the nine splits); the potency scale the two active classes form stays in a decision table, and the metric follows the target from the log loss fallback to roc_auc (MET-4) (2026-11-02, Lennart) | applied |
315326
| CLEAN-19 | alfa_battle_2_0_task_2 | the features the 1st, 4th and 9th place solutions have in common (513 aggregates over the restored ruble amounts) replace the organisers' 127 (untuned LightGBM 0.787 / 0.771 / 0.772 against 0.774 / 0.757 / 0.763 on the three windows) (2026-10-13, Lennart); the top solutions' features are the better of the two, so they are taken and not merged with the organisers' (CLEAN-19 as amended 2026-10-21, Lennart) | applied |
316327
| CLEAN-19 | mortgage | a column joined from outside the source: Freddie Mac's 30-year mortgage rate (FRED MORTGAGE30US), the mean of the previous calendar quarter, and the loan's lagged rate minus it (the refinance incentive a payoff model uses); dated periods make the join exact; the first such join, so siblings with dated periods take the same treatment (2026-10-22, Lennart) | applied |
317328
| CLEAN-19 | rain_in_australia | the other locations' 9 am Rainfall, Pressure9am and Humidity9am of the same day (143 columns), each kept only where that location's 9 am comes no later than the row's own under both clock and standard time; ROC AUC 0.850 to 0.870 on the 9 windows then shipped (paired SE 0.0045, better in 8 of 9) (2026-10-26, Lennart; the rule amended) | applied |
@@ -326,10 +337,15 @@ Precedents: how a rule was applied. They never change a rule; an exception is li
326337
| CLEAN-21 | rosbank1 | amounts in each transaction's own currency (57 codes, up to 35.8 million dong) converted to rubles at the Bank of Russia's official rate in force on the transaction's day, the measuring body's conversion; the ISO numeric reading of the codes checked on the data (converted, the median POS purchase is 355-3,346 rubles in every currency, against 500 in rubles); the 0.3% of transactions in currencies the Bank did not quote then are masked, not converted from another source (2026-10-26, Lennart) | applied |
327338
| CLEAN-22 | coad_colon_adenocarcinoma | ships 36,355 features; its report had weighed one model's 50,000-feature cap (2026-10-15, Lennart) | applied |
328339
| CLEAN-22 | early_learning_predictors | `teacher_duration`, the minutes the teacher's rating form was open, leaves as a timer of the data collection, like the three `duration_elom` timers the definition already dropped: no property of the child or the facility, 39% zeros and forms open for up to 29 days, and its little signal (Spearman -0.06 with the score) follows the survey round, which is dropped (2026-10-30, Lennart) | applied |
329-
| CLEAN-24 | apistox, drug_induced_autoimmunity_prediction, qsar_bioconcentration | the SMILES as text next to the descriptors: -0.025 to +0.010 ROC AUC; the string is dropped (2026-10-14) | applied |
340+
| CLEAN-22 | qsar_bioconcentration | `logKOW_type` (measured against predicted) leaves, though it is no leak, no identifier, no copy and not the measurement the label is read from: it records how the authors filled their 2015 table, not a property of the chemical, the `teacher_duration` shape above. The effect sizes are not the reason and are given for the leak question it was raised under: 0.534 macro ROC AUC alone against 0.5 for chance, nothing on top of the structure (0.6806 with it and without it), -0.0013 in the full model. Distinguished from the provenance flags that stay, which are in the actor's own record: pva_revenue_prediction_kddcup98's `AGEFLAG`, `DATASRCE` and `LIFESRC`, thyroid_discordant's five `*_measured`, sf_permit_time's `point_source`. The price is that the 122 predicted rows are no longer identifiable, so CLEAN-24's "measured properties stay" is qualified above (2026-11-02, Lennart) | applied |
341+
| CLEAN-24 | apistox, drug_induced_autoimmunity_prediction, qsar_bioconcentration | the SMILES as text next to the descriptors: -0.025 to +0.010 ROC AUC; the string is dropped (2026-10-14); superseded by the amendment below | applied |
342+
| CLEAN-24 | apistox, drug_induced_autoimmunity_prediction, qsar_bioconcentration, qsar_oral_toxicity, qsar_tid_11 | the amendment: the SMILES ships as a typed structure column and the benchmark encodes it (recommended: RDKit's 2D descriptors with the MACCS keys and the ECFP4 counts); the shipped RDKit descriptors leave, drug_induced's source descriptors too (reproduced: 0.771 against 0.772 LightGBM ROC AUC); apistox keeps its 141 salts, since the largest fragment turns triclopyr and picloram triethylammonium into triethylamine (2026-11-01, Lennart; discussion doc "SMILES Handling in Data Foundry and TabArena v0.2") | applied |
343+
| CLEAN-24 | qsar_tid_11 | SMILES only: the authors' FCFP6 bits leave as one modelling choice; RDKit recomputes none of them exactly; LightGBM R^2 on the scaffold splits 0.645 with the bits, 0.601 with the recommended encoding, 0.658 with RDKit's ECFP4 counts added to it (2026-11-01, Lennart) | applied |
344+
| CLEAN-24 | qsar_oral_toxicity | SMILES only: the published ECFP bits (Dragon 7) leave as one modelling choice; the copies are found on the 2D structure instead of the bit vector, 11,116 chemicals (11 more: bit collisions had joined different chemicals) (2026-11-01, Lennart) | applied |
345+
| CLEAN-24 | qsar_biodeg, qsar_fish_toxicity, qsar_aquatic_toxicity | SMILES only: the structures the UCI copies left out come from the authors' own releases (the paper's supporting information; the Milano Chemometrics workbooks), the same rows in the same order, every descriptor identical, so the link needs no key; the Dragon descriptors leave, which also settles the descriptor-selection leaks of the two toxicity sets (LEAK-31) (2026-11-01, Lennart) | applied |
330346

331347
## In Data Foundry
332348

333-
The order of these steps in `_clean`, the helpers (`drop_columns`, `rdkit_descriptors`, `anonymize_ids`) and the
349+
The order of these steps in `_clean`, the helpers (`drop_columns`, `canonical_smiles`, `anonymize_ids`) and the
334350
bundle checks that catch what is missed: [definitions.md](../../knowledge-data-foundry/references/definitions.md),
335351
"The preprocessing recipe".

0 commit comments

Comments
 (0)