- 🔬 Project Overview
- 🎯 Objective
- 🧪 Dataset
- 🧹 Data Preparation
- 🧬 Molecular Representations
- 🧩 Scaffold-Aware Partitioning
- 🤖 Classical Machine Learning
- ⚙️ Hyperparameter Optimization
- 📏 Evaluation
- 📊 Experimental Design
- 🔬 Graph Neural Network
- 🛠️ Technology Stack
- 🚧 Current Status
- 🔭 Future Direction
- 📚 Technical Documentation
- 📖 Citation
- 👤 Author
This project develops a structure-aware molecular machine-learning pipeline for predicting the inhibitory potency of compounds against acetylcholinesterase (AChE).
The current implementation establishes a classical QSAR/ML benchmark using:
- ChEMBL bioactivity data
- Molecular standardization and quality control
- IC50 normalization and pIC50 transformation
- Morgan circular fingerprints
- RDKit molecular descriptors
- Scaffold-based molecular partitioning
- Grouped cross-validation
- Random Forest
- XGBoost
- LightGBM
- Optuna hyperparameter optimization
- Multi-metric evaluation and residual analysis
- Implemented GNNs
Research direction: move from fixed molecular feature representations toward increasingly structure-aware and scientifically constrained molecular learning.
Predict continuous pIC50 values from molecular structure.
The learning problem is formulated as:
Molecular Structure
↓
Molecular Representation
↓
Machine Learning Model
↓
Predicted pIC50
| Question | Purpose |
|---|---|
| How informative are circular molecular fingerprints? | Evaluate local structural representation |
| What additional information do molecular descriptors provide? | Evaluate physicochemical representation |
| Does combining both representations improve prediction? | Compare complementary feature spaces |
| How does structural separation affect performance? | Test molecular generalization |
| How do classical models compare under the same representation? | Establish reliable baselines |
| Can graph representations improve molecular learning? | GNN extension |
| Property | Configuration |
|---|---|
| Data source | ChEMBL |
| Target | Acetylcholinesterase |
| ChEMBL Target ID | CHEMBL220 |
| Activity endpoint | IC50 |
| Learning target | pIC50 |
| Task | Continuous regression |
Activity records are retrieved for the AChE target with available IC50 measurements.
Raw activity data are processed before being passed to the learning algorithms.
The preprocessing pipeline converts raw bioactivity records into a consistent molecular-level regression dataset.
ChEMBL Activity Records
↓
Data Validation
↓
Salt Removal
↓
Molecular Identity / InChIKey
↓
Duplicate Handling
↓
IC50 Unit Normalization
↓
pIC50 Transformation
↓
Replicate Aggregation
↓
Activity Filtering
↓
Final Molecular Dataset
The current pipeline performs:
- SMILES validation
- salt removal
- canonical molecular representation
- InChIKey generation
- duplicate handling
- activity-value validation
Supported source representations are normalized to a common concentration representation before pIC50 calculation.
Multiple measurements corresponding to the same molecular identity are grouped using InChIKey.
The current implementation calculates the median pIC50 and uses group-level median absolute deviation as a quality-control criterion.
This step is treated as part of the dataset definition, rather than as a modeling operation.
Two complementary engineered representations form the current classical ML feature space.
| Parameter | Value |
|---|---|
| Representation | Morgan circular fingerprint |
| Radius | 2 |
| Fingerprint size | 1024 bits |
Molecular Structure
↓
Circular Atom Environments
↓
Morgan Fingerprint
↓
1024-bit Vector
The current descriptor representation captures molecular physicochemical and structural properties including:
- Molecular weight
- MolLogP
- H-bond donors
- H-bond acceptors
- TPSA
- Partial-charge descriptors
- Heteroatom count
- Rotatable bonds
- Fraction Csp3
- Aromatic ring count
- Ring count
- Aliphatic nitrogen count
- Formal charge
| Configuration | Input |
|---|---|
| Morgan | 1024-bit Morgan fingerprint |
| RDKit | Molecular descriptors |
| Combined | Morgan + RDKit descriptors |
A central component of the project is structure-aware evaluation.
Random molecular splits can distribute closely related compounds between training and test sets. This can make a model appear to generalize when it is benefiting from structurally similar compounds during training.
The pipeline therefore groups molecules according to their Bemis–Murcko scaffold and assigns scaffold groups to dataset partitions.
Molecules
↓
Murcko Scaffold
↓
Scaffold Groups
↓
Training / Test Partition
Molecules sharing a scaffold are kept within the same partition.
The current benchmark consists of three tree-based ensemble models.
| Model | Role |
|---|---|
| Random Forest | Non-parametric ensemble baseline |
| XGBoost | Gradient-boosted tree model |
| LightGBM | Gradient-boosted tree model |
Each model is evaluated across the same molecular representation configurations:
Morgan RDKit Combined
│ │ │
Random Forest ✓ ✓ ✓
XGBoost ✓ ✓ ✓
LightGBM ✓ ✓ ✓
This provides a controlled comparison between model family and molecular representation.
Hyperparameter selection is performed using Optuna.
Training Data
↓
Scaffold-Grouped Cross-Validation
↓
Model Evaluation
↓
Validation MAE
↓
Optuna Trials
↓
Best Hyperparameters
↓
Final Training
The current implementation uses 3-fold GroupKFold, with scaffold identity used as the grouping variable.
The optimization objective is based on mean absolute error.
| Metric | Interpretation |
|---|---|
| MAE | Mean absolute prediction error |
| RMSE | Error with stronger penalty for large deviations |
| R² | Variance explained relative to the target mean |
| Pearson r | Linear association |
| Spearman ρ | Rank-order association |
Residuals are calculated as:
This enables analysis of:
- systematic prediction bias
- high-error compounds
- activity-range dependence
- residual distributions
- prediction calibration
- model failure regions
Morgan
│
├── Random Forest
├── XGBoost
└── LightGBM
RDKit Descriptors
│
├── Random Forest
├── XGBoost
└── LightGBM
Morgan + RDKit
│
├── Random Forest
├── XGBoost
└── LightGBM
Full Dataset
│
▼
Scaffold-Based Split
┌──────┴──────┐
▼ ▼
Training Test
│
▼
Grouped 3-Fold CV
│
▼
Optuna Optimization
│
▼
Final Model Training
│
▼
Held-Out Evaluation
The held-out test partition is reserved for final evaluation rather than hyperparameter selection.
Classical models receive fixed fingerprints or descriptor vectors. The GNN represents each molecule as a chemical graph and learns atom embeddings by passing bond-conditioned messages between neighboring atoms. In this study the learned graph representation is combined with molecular descriptors, so the evaluated model is a graph-plus-descriptor model, not a graph-only model.
The GNN uses the same scaffold-held-out test partition as the matched classical comparison described in Experimental Design. Its implementation and saved outputs are linked under Reproducibility Artifacts.
For a molecule, the graph is
| Atom feature | Encoded information |
|---|---|
| Atomic number | Element identity |
| Degree | Number of directly bonded atoms |
| Formal charge | Charge, clipped to a supported range and shifted to a nonnegative category |
| Hybridization | Supported RDKit hybridization states |
| Aromaticity | Whether the atom is aromatic |
| Hydrogen count | Number of attached hydrogens |
| Ring membership | Whether the atom belongs to a ring |
Each bond has 13 edge channels: four one-hot bond types (single, double, triple, aromatic), three bond properties (conjugated, aromatic, ring), and six one-hot stereochemical states. Every bond is added in both directions so messages can travel between either pair of neighboring atoms.
Each of the seven atom categories is mapped through its own embedding layer. Those embeddings are concatenated and projected into a 128-dimensional hidden state. At each of three message-passing steps, the source atom state is combined with the 13 bond channels and transformed into a message. Incoming messages are summed and divided by the destination atom's degree, then passed to a GRU-based update. A residual connection, dropout, and layer normalization produce the next atom state.
Atom categories ──> embeddings ──> node projection
│
Bond channels ──> edge-conditioned messages
│
degree-normalized aggregation
│
GRU update + residual
│
dropout + layer normalization
│
repeat 3 times
After message passing, node states are pooled per molecule using both mean and max pooling. The two graph-level vectors are concatenated with 14 RDKit descriptors. Descriptor imputation and standardization are fitted on the training partition only; target values are also standardized for training and predictions are returned to the original pIC50 scale.
The combined vector is passed through a multilayer regression head with ReLU activations and dropout to predict pIC50. This makes the role of the two input sources explicit:
Molecular graph ──> message passing ──> mean + max pooled graph vector ──┐
├─> regression head ──> pIC50
14 RDKit descriptors ──> train-fitted imputation / scaling ────────────┘
| Component | Configuration |
|---|---|
| Atom features | 7 categorical channels |
| Bond features | 13 channels; each bond is bidirectional |
| Global molecular descriptors | 14 RDKit descriptors |
| Hidden size | 128 |
| Message-passing steps | 3 |
| Graph pooling | Mean + max |
| Node update | GRU cell with residual connection |
| Regularization | Dropout 0.15 + LayerNorm |
| Regression loss | Smooth L1 |
| Optimizer | AdamW; learning rate 0.001; weight decay 0.0001 |
| Batch size | 64 |
| Gradient clipping | 5.0 |
| Early stopping | Validation MAE; patience 20 epochs |
| Random seed | 50 |
| Hardware | CPU |
The scaffold-disjoint partitions contain 3,108 training, 548 validation, and 915 test molecules. The best validation MAE was 0.6507 at epoch 48; early stopping ended training after 68 epochs. No molecules were rejected during graph construction for this run.
The table reports held-out metrics from the matched audit. Every model is evaluated on the same 915-molecule test partition; the test set is excluded from hyperparameter selection and training.
| Model | Representation | Test MAE | RMSE | R² | Pearson r |
|---|---|---|---|---|---|
| XGBoost | Morgan + RDKit | 0.6352 | 0.8347 | 0.4553 | 0.6795 |
| XGBoost | Morgan | 0.6510 | 0.8519 | 0.4326 | 0.6648 |
| Random Forest | Morgan + RDKit | 0.6764 | 0.8507 | 0.4341 | 0.6644 |
| Random Forest | Morgan | 0.6852 | 0.8631 | 0.4175 | 0.6506 |
| GNN | Graph + RDKit | 0.6908 | 0.9093 | 0.3535 | 0.6225 |
| XGBoost | RDKit | 0.6969 | 0.8892 | 0.3818 | 0.6188 |
| Random Forest | RDKit | 0.7169 | 0.8978 | 0.3698 | 0.6140 |
On this split, the best classical model's MAE is 0.0556 pIC50 lower than the GNN's. This is a result for this dataset, scaffold split, graph encoding, descriptor augmentation, and training configuration; it is not evidence that GNNs are generally inferior. The audit recommends repeated scaffold splits or an external test set for a more stable estimate.
- GNN implementation
- Architecture figure
- Matched classical/GNN audit report
- GNN run metrics
- Training history
- Held-out test predictions
- All GNN predictions
| Category | Technologies |
|---|---|
| Language | Python |
| Bioactivity | ChEMBL |
| Cheminformatics | RDKit |
| Data | NumPy · Pandas · DuckDB |
| Classical ML | scikit-learn · XGBoost · LightGBM |
| Optimization | Optuna |
| Statistics | SciPy |
| Visualization | Matplotlib · Seaborn |
| Experiment Tracking | MLflow |
| Graph ML | PyTorch · PyTorch Geometric |
| Component | Status |
|---|---|
| ChEMBL data retrieval | ✅ |
| AChE / CHEMBL220 dataset | ✅ |
| Molecular cleaning | ✅ |
| IC50 normalization | ✅ |
| pIC50 transformation | ✅ |
| Replicate handling | ✅ |
| Morgan fingerprints | ✅ |
| RDKit descriptors | ✅ |
| Scaffold grouping | ✅ |
| Scaffold-aware split | ✅ |
| Random Forest | ✅ |
| XGBoost | ✅ |
| LightGBM | ✅ |
| Optuna optimization | ✅ |
| Grouped CV | ✅ |
| Multi-metric evaluation | ✅ |
| Residual analysis | ✅ |
| Dataset / validation audit | ✅ |
| GNN | ✅ |
The project progresses through increasingly structured molecular representations:
Engineered Features
↓
Classical Molecular ML
↓
Molecular Graphs
↓
Graph Neural Networks
↓
Physics-Informed GNNs
↓
Structure-aware Molecular Machine Learning
The longer-term direction is to connect:
molecular structure → biological activity → mechanistic understanding
rather than optimizing predictive performance in isolation.
A separate technical report contains the detailed methodology, data-processing decisions, feature definitions, model configurations, hyperparameter spaces, validation analysis, GNN methodology, and experimental results.
The complete research record and archived software release are preserved through Zenodo.
If you use this repository, its methodology, implementation, or derived results in academic or scientific work, please cite the archived software release:
Venkataramanan, D. (2026).
AChE Molecular Machine Learning: Structure-Aware Prediction of Acetylcholinesterase Inhibitory Potency.
Zenodo.
https://doi.org/10.5281/zenodo.23191332
@software{venkataramanan_ache_qsar_2026,
author = {Venkataramanan, Darshan},
title = {AChE Molecular Machine Learning: Structure-Aware Prediction of Acetylcholinesterase Inhibitory Potency},
year = {2026},
version = {1.0.1},
publisher = {Zenodo},
doi = {10.5281/zenodo.23191332},
url = {https://doi.org/10.5281/zenodo.23191332}
}
கணக்கீட்டு உயிரியல் • வேதியியல் தகவல் புள்ளியியல் • மூலக்கூறு இயந்திரக் கற்றல் • கணக்கீட்டு மருந்து கண்டுபிடிப்பு
a.k.a
Computational Biology · Cheminformatics · Molecular Machine Learning · Computational Drug Discovery
Building from molecular representations toward scientifically grounded learning.


