You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e846fc2
Browse filesBrowse the repository at this point in the historyBrowse files
Master's thesis project investigating how to scale [DataSAIL](https://doi.org/10.1038/s41467-025-58606-8) — a leakage-aware dataset splitting framework for molecular ML — to large datasets (10k–100k+ samples), where full pairwise similarity computation and ILP optimization become computationally impractical.
4
7
5
8
The project proposes a hybrid approximation: run DataSAIL on a representative subset of the data, then extend the resulting splits to the remaining samples using a **balance-aware k-nearest-neighbour assignment** strategy.
@@ -17,11 +20,13 @@ Across BACE, BBBP, Tox21, and HIV (MoleculeNet benchmarks), the scaled approxima
17
20
| BACE (~1.5k) | 3.1s | 5.8s | overhead dominates on small data |
18
21
| BBBP (~2k) | 3.8s | 6.3s | overhead dominates on small data |
19
22
| Tox21 (~8k) | 31.5s | 21.9s | 1.44x speedup |
20
-
| HIV (~41k) |~1800s (est.) |~312s | full DataSAIL impractical at this scale |
23
+
| HIV (~41k) |~1800s (est.) | 298.0s | full DataSAIL impractical at this scale |
24
+
25
+
Leakage fraction (test molecules with a near-duplicate in train, similarity > 0.7) dropped substantially vs. random splitting across all datasets — e.g. for BACE: 84.9% (random) → 7.3% (full DataSAIL) → 1.2–4.1% (scaled). See [`reports/MASTER REPORT.pdf`](reports/MASTER%20REPORT.pdf) for the full leakage, split-quality, and downstream ML performance analysis (Accuracy, F1, MCC, ROC-AUC, and PR-AUC using Random Forest and Logistic Regression classifiers).
21
26
22
-
Leakage fraction (test molecules with a near-duplicate in train, similarity > 0.7) dropped substantially vs. random splitting across all datasets — e.g. for BACE: 84.9% (random) → 7.3% (full DataSAIL) → 1.2–4.1% (scaled). See `report/` for full leakage, split-quality, and downstream ML performance analysis (Accuracy, F1, MCC, ROC-AUC, PR-AUC on Random Forest / Logistic Regression classifiers).
27
+
**Balanced kNN assignment was a necessary addition, not an optional refinement**: naive nearest-neighbour propagation caused runaway train-split dominance (up to ±14.5 percentage-point deviation from target ratios on BBBP), since unassigned molecules statistically favor neighbours in the largest existing partition. The balance-aware correction reduced the maximum deviation to approximately 0.5 percentage points or less in the final four-dataset evaluation.
23
28
24
-
**Balanced kNN assignment was a necessary addition, not an optional refinement**: naive nearest-neighbour propagation caused runaway train-split dominance (up to ±14.5 percentage-point deviation from target ratios on BBBP), since unassigned molecules statistically favor neighbours in the largest existing partition. The balance-aware correction reduced max deviation to ≤0.5pp across all four datasets.
29
+

├── report/ # thesis report (LaTeX/PDF) and seminar slides
92
-
├── environment.yml
96
+
├── reports/ # complete project report
97
+
├── tests/ # deterministic unit tests for core algorithms
98
+
├── environment.yml # complete research environment
99
+
├── pyproject.toml # lightweight package and CI dependencies
93
100
└── README.md
94
101
```
95
102
@@ -99,11 +106,22 @@ Data-SAIL_scaling/
99
106
100
107
## Setup
101
108
109
+
For the complete research environment:
110
+
102
111
```bash
103
112
conda env create -f environment.yml
104
113
conda activate datasail-scale
105
114
```
106
115
116
+
For the lightweight core package and its tests:
117
+
118
+
```bash
119
+
python -m venv .venv
120
+
source .venv/bin/activate
121
+
python -m pip install -e ".[test]"
122
+
pytest -q
123
+
```
124
+
107
125
---
108
126
109
127
## Running the Pipeline
@@ -168,7 +186,7 @@ All outputs are written to `results/analysis/` (CSVs) and `results/analysis/plot
168
186
2.**Run DataSAIL** on the subset only — similarity computation and ILP optimization scale quadratically with dataset size, so restricting this step to the subset is what makes the approach tractable.
169
187
3.**Assign remaining molecules** to train/val/test using balanced kNN: for each unassigned molecule, retrieve k nearest neighbours (Jaccard similarity on ECFP/Morgan fingerprints, radius=2, 2048 bits via RDKit), score each candidate split by similarity × balance-correction factor, and assign to the highest-scoring split. The balance factor penalizes already-oversized splits and boosts underrepresented ones, which is what prevents the train-dominance failure seen under naive nearest-neighbour propagation.
170
188
171
-
Full derivation, complexity analysis (O(k² + (n−k)·K) vs. O(n²) for full DataSAIL), and evaluation framework (leakage metrics, split-quality metrics, downstream ML performance) are in `report/`.
189
+
Full derivation, complexity analysis (O(k² + (n−k)·K) vs. O(n²) for full DataSAIL), and evaluation framework (leakage metrics, split-quality metrics, downstream ML performance) are in [`reports/MASTER REPORT.pdf`](reports/MASTER%20REPORT.pdf).
172
190
173
191
---
174
192
@@ -187,4 +205,4 @@ From [MoleculeNet](https://doi.org/10.1039/c7sc02664a):
187
205
188
206
## Status
189
207
190
-
Preliminary/exploratory results (single run, seed=42) — see `report/` conclusion and futurework for planned extensions (larger datasets, dynamic hyperparameter tuning for k, evaluation on D-MPNN models).
208
+
Research prototype with preliminary single-run results (`seed=42`). The central scaling result is promising, but it should not be interpreted as a statistically replicated benchmark. See the report's conclusion and future-work section for planned extensions, including repeated runs, larger datasets, dynamic tuning of `k`, and evaluation with D-MPNN models.
0 commit comments