Manuscript Offprint

arXiv:2610.25163

M-JEPA: Predictive Self-Supervised Learning for Molecular Graphs with Scaffold-Shift Evaluation on Tox21

Karthik Iyer, Nasser Sabar

Abstract

Self-supervised molecular representation learning is increasingly used to improve transfer on small, label-limited property prediction tasks, yet commonly used contrastive objectives can be sensitive to view construction and are often evaluated with protocols that report only discrimination. We adapt Joint Embedding Predictive Architectures (JEPAs) to molecular graphs by masking chemically coherent connected subgraphs and training a context encoder to regress the masked target embedding produced by an exponential-moving-average (EMA) teacher. To evaluate predictive self-supervision under realistic distribution shift, we introduce a leakage-resistant, compute-matched three-phase protocol: (i) an 80-run objective screening on ESOL with fixed compute budgets, (ii) JEPA-only refinement of masking and augmentation choices, and (iii) per-assay Tox21 evaluation under Bemis–Murcko scaffold splits with joint discrimination–reliability analysis and attribution diagnostics. Under matched compute, M-JEPA achieves substantially lower ESOL proxy RMSE than a compute-matched InfoNCE baseline (mean RMSE 2.12 vs 3.75; mean paired Δ\DeltaRMSE 1.61; 95% bootstrap CI [1.52, 1.72]; Wilcoxon p=2.4×10^-4) and typically completes runs faster ( ≈\approx15–25 min vs ≈\approx35–45 min on a single GPU under identical hardware), albeit with higher runtime variance. On Tox21, improvements in ROC-AUC/PR-AUC are assay-dependent and do not uniformly imply better calibration; reliability diagrams and Brier/ECE metrics reveal endpoints where fine-tuning improves ranking but leaves probabilities miscalibrated.

Keywords: molecular representation learning; self-supervised learning; JEPA; graph neural networks; scaffold split; calibration; explainability; toxicity prediction.

This document is the unedited author's version of a Submitted Work that was subsequently accepted for publication in the Journal of Chemical Information and Modeling, © American Chemical Society, after peer review. To access the final edited and published work, see doi.org/10.1021/acs.jcim.6c00828.

Introduction

Accurate prediction of chemical properties is central to cheminformatics workflows, from prioritizing compounds in virtual screening to assessing safety liabilities early in discovery. Supervised models can perform well when labels are abundant and evaluation distributions match deployment, but many practical tasks are label-limited and experience strong distribution shift when novel scaffolds are encountered.

Graph neural networks (GNNs) have become a standard backbone for molecular property prediction because they operate directly on atom–bond graphs and can learn task-relevant representations via message passing (e.g., D-MPNN, GINE, and related architectures). However, training such models from scratch on small endpoints is prone to overfitting and can yield unreliable probability estimates under shift. (Kearnes et al., 2016; Gilmer et al., 2017; Withnall et al., 2020; Xiong et al., 2020).

Self-supervised learning (SSL) addresses data scarcity by pretraining representations on large unlabeled molecule corpora before fine-tuning. Many influential molecular SSL approaches are contrastive, using augmented 'views' of the same molecule and an InfoNCE objective to encourage invariance while separating negatives (e.g., MolCLR and related graph contrastive formulations). In chemistry, however, aggressive augmentations can violate chemical 'grammar' (e.g., by perturbing functional groups or stereochemistry) and may erase predictive signal rather than improve invariance. (Wang et al., 2021; Li et al., 2021; Hu et al., 2020; Wu et al., 2023).

Related work and positioning. Molecular SSL has been explored via contrastive objectives (e.g., MolCLR, GeomGCL), generative or masked modeling (e.g., self-supervised graph transformers; Mol-BERT), and predictive objectives that regress representations rather than discriminate negatives. Recent surveys categorize graph SSL into contrastive, generative, and predictive families. M-JEPA is positioned in the predictive family and emphasizes chemically coherent connected-subgraph masking together with leakage-resistant, compute-matched evaluation that jointly reports discrimination, calibration, and attribution diagnostics under scaffold shift. (Wang et al., 2021; Li et al., 2021; Rong et al., 2020; Li and Jiang, 2021; Wu et al., 2023; Skenderi et al., 2024; Piccoli et al., 2025).

Joint Embedding Predictive Architectures (JEPAs) provide a non-contrastive alternative: a student predicts a latent representation of a masked target region produced by a momentum-updated teacher, replacing explicit negative sampling with embedding-space regression. This predictive formulation is appealing for molecules because chemically coherent masking can create a structured prediction problem—recovering a missing substructure from its molecular context—while avoiding the need to define many augmentation-driven positives and negatives. (Assran et al., 2023; Skenderi et al., 2024; Piccoli et al., 2025).

In this work we propose M-JEPA, a JEPA adaptation for molecular graphs with connected-subgraph masking and an EMA teacher, and we evaluate it with a leakage-resistant pipeline designed to reduce selection bias. Our contributions are: (1) a molecular JEPA objective with chemically coherent masking and compute-matched contrastive baselines; (2) a three-phase evaluation protocol separating objective screening, configuration selection, and downstream testing under Bemis–Murcko scaffold splits; (3) reliability-aware reporting on Tox21 using ROC-AUC/PR-AUC together with Brier score, expected calibration error (ECE), and reliability diagrams; and (4) motif-level integrated-gradient attribution diagnostics to support qualitative interpretation under scaffold shift. Code and experiment artifacts are available at https://github.com/Kar488/M-JEPA/ (currently private; available to reviewers upon request; will be made public on publication). (Bemis and Murcko, 1996; Wu et al., 2017; Sundararajan et al., 2017; Guo et al., 2017; Brier, 1950).

References (64)