MEDNA-DFM: A Dual-View FiLM-MoE Model for Explainable DNA Methylation Prediction
Authors: Yi He, Yina Cao, Jixiu Zhai, Di Wang, Junxiao Kong, Tianchi Lu
Organizations: Cuiying Honors College, Lanzhou University, Lanzhou, Gansu, China · School of Mathematics and Statistics, Lanzhou University, Lanzhou, Gansu, China · Cuiying Honors College, Lanzhou University, Lanzhou, Gansu, China. · School of Mathematics and Statistics, Lanzhou University, Lanzhou, Gansu, China. · School of Management, Lanzhou University, Lanzhou, Gansu, China · School of Management, Lanzhou University, Lanzhou, Gansu, China. · Shanghai Innovation Institute, Shanghai, China · Shanghai Innovation Institute, Shanghai, China. · Department of Computer Science, City University of Hong Kong, Kowloon, Hong Kong, China · Department of Computer Science, City University of Hong Kong, Kowloon, Hong Kong, China.
Accurate computational identification of DNA methylation is essential for understanding epigenetic regulation. Although deep learning excels in this binary classification task, its "black-box" nature impedes biological insight. We address this by introducing a high-performance model MEDNA-DFM, alongside mechanism-inspired signal purification algorithms. Our investigation demonstrates that MEDNA-DFM effectively captures conserved methylation patterns, achieving robust distinction across diverse species. Validation on external independent datasets confirms that the model's generalization is driven by conserved intrinsic motifs (e.g., GC content) rather than phylogenetic proximity. Furthermore, applying our developed algorithms extracted motifs with significantly higher reliability than prior studies. Finally, empirical evidence from a Drosophila 6mA case study prompted us to propose a "sequence-structure synergy" hypothesis, suggesting that the GAGG core motif and an upstream A-tract element function cooperatively. We further validated this hypothesis via in silico mutagenesis, confirming that the ablation of either or both elements significantly degrades the model's recognition capabilities. This work provides a powerful tool for methylation prediction and demonstrates how explainable deep learning can drive both methodological innovation and the generation of biological hypotheses.
Figures & tables
Figure 1: Comprehensive performance evaluation and ablation analysis of the MEDNA-DFM. (A, B) Comparison of predictive performance between MEDNA-DFM and representative state-of-the-art methods across 17 benchmark datasets. The line charts illustrate the AUC (A) and MCC (B) scores. (C, D) Impact of token granularity on feature extraction. The bar charts display AUC and MCC metrics for different k-mer tokenization strategies (3, 4, 5, and 6-mer) utilized in the Dual-View DNABERT module. (E, F) Ablation study on the efficacy of the FiLM module. Boxplots summarize the distribution of AUC and MCC values across all datasets for four structural variants: A1 (Full Model with Global-to-Local FiLM modulation), A2 (Simple Fusion via concatenation), A3 (6-mer backbone only), and A4 (Reversed FiLM with Local-to-Global modulation). The red dashed line indicates the median performance of the proposed A1 model. (G, H) Analysis of model capacity regarding the MoE module. Boxplots compare the AUC and MCC distributions for the baseline model without MoE ( Non ) and variants equipped with increasing numbers of experts ( MoE-1, MoE-2, MoE-4, MoE-8 ).
Figure 2: Impact of domain-adaptive fine-tuning and adversarial regularization on model robustness.(A,B,C) Performance comparison with and without fine-tuning. The scatter plots display the ACC (A), AUC (B), and MCC (C) scores across all datasets. The y-axis represents the MEDNA-DFM model utilizing domain-adaptive fine-tuning, while the x-axis represents the model without this phase. (D,E,F) Efficacy of adversarial training. Comparison of ACC (D), AUC (E), and MCC (F) between models trained with (y-axis) and without (x-axis) adversarial regularization. In all plots, each point represents one benchmark dataset. The purple dashed diagonal line ( y=x ) indicates the baseline of identical performance; points located above this line demonstrate that the applied strategy (fine-tuning or adversarial training) yields superior predictive metrics.
Figure 3: Visualization of internal representation dynamics and cross-species generalization capabilities.(A–D) Trajectory of feature space evolution via UMAP visualization. The scatter plots illustrate the distribution of samples at four key processing stages: (A) Raw Embeddings, (B) Post-DNABERT, (C) Post-FiLM, and (D) Post-MoE. Blue points represent positive samples, while yellow points represent negative samples. (E) Cross-dataset heatmap. The matrix depicts the pairwise evaluation where rows represent source datasets (training) and columns represent target datasets (testing). Color intensity reflects the relative transferability, calculated as the ACC on the target set normalized by the source-on-source baseline. The chemical structures at the bottom correspond to the three DNA methylation categories: 5-hydroxymethylcytosine (5hmC), N4-methylcytosine (4mC), and N6-methyladenine (6mA).
Figure 4: Mechanism of motif-driven generalization across evolutionary boundaries. (A–D) Comparative motif analysis using kpLogo illustrating the sequence preferences of the target and source datasets. (A) The external independent validation set Homo sapiens (5mC). (B–D) The source datasets used for training: (B) M. musculus (5hmC), (C) C. equisetifolia (4mC), (D) C. elegans (6mA). (E) AUC of the three source models directly applied to the external H. sapiens dataset. (F) Contrast between phylogenetic distance and predictive accuracy (ACC). The phylogenetic tree shows the evolutionary proximity of the species to H. sapiens , while the bar chart (right) reveals that the evolutionarily distant plant model ( C. equisetifolia ) significantly outperforms the closely related nematode model ( C. elegans ).
Figure 5: Signal disentanglement and high-fidelity motif purification via MEDNA-DFM. (A) Comparison of sequence logo landscapes for the 6mA_D.melanogaster dataset. The traditional KpLogo analysis effectively represents a composite union of these two independent feature subsets. (B) Analytical workflow for model-guided motif discovery and validation. Sequence features extracted from CAD and CWGA methods, along with raw data, are processed through STREME. The resulting motifs are validated via TOMTOM to identify statistically significant matches to known transcription factor binding sites.
STREME
Methyl-GP (3mer)
Methyl-GP (4mer)
Methyl-GP (5mer)
Methyl-GP (6mer)
CAD
CWGA
4.1×10−4
1.25×10−2
2.25×10−3
2.18×10−2
4.66×10−2
1.37×10−5
6.16×10−5
Table 1: Comparison of p -values for 6mA in A.thaliana across different methods. Baseline results for Methyl-GP and its corresponding STREME analysis are adopted from Xie et al. Xie et al. (2025) .
4mC_Tolypocladium
5hmC_H.sapiens
6mA_C.equisetifolia
STREME
5.0×10−2
9.3×10−1
2.7×10−2
iDNA_ABF
2.83×10−2
5.47×10−2
2.04×10−3
CAD
7.85×10−4
2.25×10−5
5.54×10−4
CWGA
1.77×10−3
1.45×10−4
9.68×10−4
Table 2: Comparison of p -values across different methylation types and species. Baseline results for iDNA-ABF and its corresponding STREME analysis are adopted from Jin et al. Jin et al. (2022) .
Figure 6: Computational deconstruction of the sequence-structure dependency in Drosophila 6mA regulation. The schematic illustrates the progressive purification of biological signals as data flows through the MEDNA-DFM architecture. (A) UMAP visualization of the feature space at the Post-DNABERT stage. While initial discrimination is achieved, positive samples (red) remain dispersed into disparate sub-clusters. (B) UMAP visualization at the Post-FiLM stage. This stage effectively draws the previously divergent sub-clusters together. (C) Corresponding to (A), the Dual-View DNABERT module captures the local GAGG core motif (D) Corresponding to (B), the FiLM module captures the A-Tract, which induces local DNA bending .
Figure 7: Targeted in silico mutagenesis reveals the sequence-structure dependency and validates the faithfulness of interpretation algorithms. The top schematic (A) illustrates the computational perturbation strategy applied to the positive test samples. The GAGG core motif and the upstream A-tract (AAAA) were specifically mutated to CTCC and alternating TATA, respectively. Negative samples were kept intact as an internal control. (B) Comparison of Sensitivity (SN) and Specificity (SP) across the wild-type (WT) and three mutated conditions (Mut-GAGG, Mut-A-tract, and Mut-Both). (C) Evaluation of global predictive performance metrics, including Accuracy (ACC), Area Under the Curve (AUC), and Matthews Correlation Coefficient (MCC).
Figure 8: Architecture of the MEDNA-DFM. (A) Overview of the benchmark data processing flow. (B) The Dual-View DNABERT module, featuring two parallel encoders. (C) The FiLM (Feature-wise Linear Modulation) module. (D) The Mixture of Experts (MoE) module. (E) The final Classification Module, which maps the aggregated high-dimensional features to binary prediction logits.
Gene expression prediction, which predicts mRNA expression levels from DNA sequences, presents significant challenges. Previous works often focus on extending input sequence length to locate distal enhancers, which may influence target genes from hundreds of kilobases away. Our work first reveals that for current models, long sequence modeling can decrease performance. Even carefully designed algorithms only mitigate the performance degradation caused by long sequences. Instead, we find that proximal multimodal epigenomic signals near target genes prove more essential. Hence we focus on how to better integrate these signals, which has been overlooked. We find that different signal types serve distinct biological roles, with some directly marking active regulatory elements while others reflect background chromatin patterns that may introduce confounding effects. Simple concatenation may lead models to develop spurious associations with these background patterns. To address this challenge, we propose Prism, a framework that learns multiple combinations of high-dimensional epigenomic features to represent distinct background chromatin states and uses backdoor adjustment to mitigate confounding effects. Our experimental results demonstrate that proper modeling of multimodal epigenomic signals achieves state-of-the-art performance using only short sequences for gene expression prediction.
Zhao Yang, Yi Duan, Jiwei Zhu +3
Gaoling School of Artificial Intelligence, Renmin University of China, Beijing, China · Zhongguancun Academy, Beijing, China · Beijing Key Laboratory of Research on Large Models and Intelligent Governance +1
Epigenetic clocks based on DNA methylation have emerged as powerful tools for estimating biological age, with broad applications in aging research, age-related disease studies, and longevity science. Despite advances across machine learning approaches to epigenetic age prediction, spanning penalised linear regression, deep feedforward networks, residual architectures, and graph neural networks, no existing method jointly models co-methylation graph structure and site-specific DNA sequence context within a unified framework. We propose a unified sequence--graph integration framework for epigenetic age prediction that addresses this gap, integrating eight-dimensional DNA sequence statistical features through a lightweight gated modulation mechanism that adaptively scales each site's methylation signal according to its sequence-determined biological relevance prior to graph convolution. Evaluated on 3,707 blood methylation samples against a comprehensive set of baselines, our method achieves a test MAE of 3.149 years, a 12.8% improvement over the strongest graph-based baseline. Biologically informed statistical features outperform CNN-based sequence encoding, demonstrating that handcrafted sequence features are more effective than end-to-end learned representations in this data regime. Post-hoc interpretability analysis identifies CpG density and local adenine frequency as features with age-dependent importance shifts, consistent with known mechanisms of age-related hypermethylation at CpG-dense promoter regions. Our code is at https://github.com/yaoli2022/graphage-seq.
Yao Li, Xikun Zhang, Xiaotao Shen +4
School of Computing and Information Systems The University of Melbourne · School of Computing Technologies RMIT University · Lee Kong Chian School of Medicine Nanyang Technological University Singapore +1
DNA methylation is a critical epigenetic modification that regulates gene expression and genome stability, primarily catalyzed by the DNA methyltransferase 3 (DNMT3) family of enzymes. Distinguishing precise sequence-specific flanking preferences between DNMT3A and DNMT3B remains computationally challenging due to the complex and high-dimensional nature of biochemical sequence data. In this study, we propose a novel Quantum Machine Learning (QML) approach to classify DNA methylation preferences, leveraging a Variational Quantum Classifier (VQC). Using experimentally derived deep enzymology data, we constructed a dataset containing 4,096 unique NNNCGNNN motifs. We evaluated a four-qubit VQC using a custom NumPy exact-statevector simulator. The described two-layer circuit contains 24 trainable rotations, eight CNOT gates, and eight input-encoding rotations, totaling 40 gates before measurement. Across five initialization seeds, the revised VQC evaluation achieved a ROC-AUC of 0.661 pm 0.009, where variability denotes sample standard deviation. The held-out test partition is approximately balanced, containing 200 DNMT3A-labeled motifs and 210 DNMT3B-labeled motifs. An always-DNMT3B predictor achieves 51.2% accuracy and a balanced accuracy of 0.500 on this test partition. This proof-of-concept establishes a foundation for utilizing near-term quantum architectures in complex epigenetic classification tasks, paving the way for hybrid quantum-classical pipelines in bioinformatics.
Murat Isik, Yusuf Moinuddin, Humaira Gowher +1
Purdue University, West Lafayette, USA · NC State University, Raleigh, USA