EpiClock
transformer models for DNA age estimation
2 min readupdated
EpiClock is a family of five transformer models that predict human age from DNA methylation using Illumina 450K or EPIC data. The models are trained on a filtered set of healthy donor profiles and tested on independent studies. Developed for research purposes only, this tool is not a medical device. It is useful for data scientists and researchers in bioinformatics and biogerontology.
Key features
- Includes five variants of different sizes: ranging from EpiClock-T (2.1M parameters) to EpiClock-XL (48.0M parameters).
- Each CpG site is processed as a token, taking into account genomic context and beta values.
- Pre-training involves masking and reconstructing 25% of CpG sites without using age labels.
- Fine-tuning combines linear clocks with a correction learned by the transformer.
What you can do
- Run age predictions on a DNA beta-value matrix using the ready-to-use
epiclock.pyscript. - Compare the accuracy of the model family against classical methods like Elastic net or Horvath V1/V2.
- Integrate the model into your own research pipelines for methylome analysis.
Example
from epiclock import epiclock_predict
# rows = samples, columns = CpG ids (cg...), values = beta in [0, 1]; missing values are allowed
res = epiclock_predict("EpiClock-B/model.pt", betas_dataframe)
ages = res["epigenetic_age"]
Read more
DetailsBenchmarks: the mean absolute error of the models on the test set is about 4.78–4.89 years.
Hardware requirements: standard PyTorch checkpoints, model sizes from 2.1M to 48M parameters.
Limitations: works only with a fixed panel of 9,098 CpG sites, primarily trained on blood and adult data.
License: CC BY-SA 4.0.










Comments