Skip to content

MoleculeNet Classification Data : Modularization, dynamic splits, Clean Code#174

Draft
aditya0by0 wants to merge 34 commits into
devfrom
fix/molecule_net_dynamic_split
Draft

MoleculeNet Classification Data : Modularization, dynamic splits, Clean Code#174
aditya0by0 wants to merge 34 commits into
devfrom
fix/molecule_net_dynamic_split

Conversation

@aditya0by0

@aditya0by0 aditya0by0 commented Jul 17, 2026

Copy link
Copy Markdown
Member

Changes related to Molecule Net classification introduced in #130

  • Remove Redundant Code logic for molecule net classification
  • Modularize the molecule net classification code
  • Enable dynamic splitting functionality
  • Use deepchem to access data (https://deepchem.readthedocs.io/en/latest/api_reference/moleculenet.html)
  • Use the recommended split type ("scaffold" or "random") for underlying data specified by https://arxiv.org/abs/1703.00564
  • Disable split data size specification (we shouldn't use custom split size for these data rather we should follow the standards used in community which is 80/10/10, for fair comparison)
  • Add Two more missing data classes PCBA and ToxCast for classification
  • Delete Tox21 data class and test, instead new modularized class is created

General Changes

  • Check before dataloader to assert if the data is empty (as pytorch or lightning doesn't check this)

  • Generalize _DynamicDataset class to all datasets by replacing _graph_to_raw_dataset to _preprocess_data_into_dataframe

  • Modularize splitting logic into separate classes (so we dont need to specifiy the split logic for every new data class, rather just inherent the required splitting logic class )

Suggested Metric as per data type by https://arxiv.org/abs/1703.00564 for Molecule Net dataset

Dataset Task Type Classes Recommended Metric Why
BACE Binary classification 2 ROC-AUC Standard benchmark metric; moderate class imbalance
BBBP Binary classification 2 ROC-AUC MoleculeNet standard; threshold-independent
HIV Binary classification 2 ROC-AUC Highly imbalanced dataset
MUV Multi-task binary (17 tasks) 2 PR-AUC (Average Precision) Extremely imbalanced; ROC-AUC can be misleading
PCBA Multi-task binary (128 tasks) 2 PR-AUC (Average Precision) Very sparse positives; PR-AUC is preferred
SIDER Multi-task binary (27 tasks) 2 ROC-AUC Standard MoleculeNet evaluation
ClinTox Multi-task binary (2 tasks) 2 ROC-AUC Standard benchmark metric
Tox21 Multi-task binary (12 tasks) 2 ROC-AUC Widely used benchmark metric
ToxCast Multi-task binary (hundreds of tasks) 2 ROC-AUC (sometimes PR-AUC as secondary) Standard MoleculeNet metric

@aditya0by0 aditya0by0 changed the title Dynamic Splits for MoleculeNet Classification datasets MoleculeNet Classification Data : Modularization, dynamic splits, Clean Code Jul 19, 2026
@aditya0by0
aditya0by0 requested review from schnamo and sfluegel05 July 19, 2026 12:22
@aditya0by0

Copy link
Copy Markdown
Member Author

@sfluegel05, once I complete the gnn experiments with molecule net dataset, then we could merge the PR. Until then we could keep this PR in the draft state.

* Rename 'val' to 'validation' in data splits

* Update chebi-utils version requirement in pyproject.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants