Epigenetic Clock

Exploring neural network architectures for DNA methylation-based biological age prediction — comparing MLP, CNN, and Self-Attention against the classic Horvath linear model.

View Slides Back to Projects
🧬

DNA Samples

~7,900 samples, 142 datasets

📊

Methylation Data

20,318 CpG site beta values

🧠

Neural Networks

5 architecture variants

🎯

Age Prediction

MAE / MSE evaluation

Model Comparison

RankModelArchitectureResult
1MLP4 layers + batch norm + dropoutBest MAE
2CNN2 conv + pooling + 2 linearImproved over baseline
3Horvath (baseline)Elastic net, 353 CpGsClassic benchmark
4Linear (353 CpGs)PyTorch linear regressionBelow baseline
5Self-Attention1 pre-linear + 3 post-linearDegraded
6Linear (20K CpGs)PyTorch linear, all featuresWorst (overfit)

Key Findings

MLP Wins

A 4-layer MLP with batch normalization and dropout outperformed all other architectures including the classic Horvath elastic net model.

CNN Improves Accuracy

Convolutional layers captured local patterns in CpG site sequences, beating the linear baseline while staying computationally efficient.

Attention Hurts

Self-Attention degraded performance — the sequential nature of methylation site data does not benefit from global attention mechanisms.

More Features ≠ Better

Using all 20,318 CpG sites with a simple linear model led to severe overfitting. Feature selection (353 CpGs) outperformed the full set.

Dataset Diversity Matters

Training on diverse tissue types was critical. Homogeneous datasets failed to generalize across the 142-dataset evaluation split.

Cancer Age Acceleration

Cancer patient samples consistently showed higher predicted age than chronological age, validating known age acceleration in tumors.

PyTorch Python Illumina 27K/450K Elastic Net CNN Self-Attention