Abstract
Learning generalizable, transferable, and robust representations for molecule data has always been a challenge. The recent success of contrastive learning (CL) for self-supervised graph representation learning provides a novel perspective to learn molecule representations. The most prevailing graph CL framework is to maximize the agreement of representations in different augmented graph views. However, existing graph CL frameworks usually adopt stochastic augmentations or schemes according to pre-defined rules on the input graph to obtain different graph views in various scales (e.g. node, edge, and subgraph), which may destroy topological semantemes and domain prior in molecule data, leading to suboptimal performance. Therefore, designing parameterized, learnable, and explainable augmentation is quite necessary for molecular graph contrastive learning. A well-designed parameterized augmentation scheme can preserve chemically meaningful structural information and intrinsically essential attributes for molecule graphs, which helps to learn representations that are insensitive to perturbation on unimportant atoms and bonds. In this paper, we propose a novel Molecular Graph Contrastive Learning with Parameterized Explainable Augmentations, MolCLE for brevity, that self-adaptively incorporates chemically significative information from both topological and semantic aspects of molecular graphs. Specifically, we apply deep neural networks to parameterize the augmentation process for both the molecular graph topology and atom attributes, to highlight contributive molecular substructures and recognize underlying chemical semantemes. Comprehensive experiments on a variety of real-world datasets demonstrate that our proposed method consistently outperforms compared baselines, which verifies the effectiveness of the proposed framework. Detailedly, our self-supervised MolCLE model surpasses many supervised counterparts, and meanwhile only uses hundreds of thousands of parameters to achieve comparative results against the state-of-the-art baseline, which has tens of millions of parameters. We also provide detailed case studies to validate the explainability of augmented graph views.
Introduction
In AI-driven drug discovery, the quality of molecular representations is paramount. While supervised learning has seen success, labeled molecular data is notoriously expensive and time-consuming to produce. Self-supervised Contrastive Learning (CL) offers a solution by training models on massive unlabeled datasets. The standard CL recipe involves creating two "augmented" versions of the same data and teaching the model to recognize they represent the same underlying entity.
However, applying this to molecules is challenging. Standard graph augmentations—like randomly dropping nodes or edges—often destroy "topological semantemes." In chemical terms, randomly removing an atom or bond might break an aromatic ring or remove a critical functional group, turning a meaningful chemical structure into nonsense. This "noise" makes it harder for the model to learn the underlying chemistry. To address this, we propose MolCLE, which replaces random "stochastic" augmentations with parameterized, learnable augmentations.
Methodology
MolCLE introduces a self-adaptive framework that learns how to "intelligently" augment molecular graphs. Instead of fixed rules, it uses deep neural networks to learn two types of masks:
- Topological Masks: These identify which bonds (edges) are essential to the molecule's identity and which are "unimportant" perturbations.
- Attribute Masks: These identify which atom features (e.g., atomic number, chirality) are most contributive to the representation.
To make the discrete choice of "mask or don't mask" trainable via backpropagation, we utilize the reparameterization trick (specifically the Binary Concrete distribution). To ensure the augmented views remain chemically sensible, we introduce three regularization terms: a Ratio Constraint to prevent over-deletion, a Continuity Constraint to encourage connected subgraphs, and an Entropy Constraint to force decisive feature selection.
Experiments and Results
The model was pre-trained on 2 million unlabeled molecules from the ZINC15 database and evaluated on six diverse benchmarks from MoleculeNet, including biophysics (BBBP) and physiology (BACE, Tox21, ToxCast, ClinTox, SIDER) tasks. We employed scaffold-splitting to ensure the test set contains structurally different "scaffolds" than the training set, better simulating real-world drug discovery scenarios.
MolCLE consistently outperformed other self-supervised baselines across all datasets. A key finding is the model's efficiency: MolCLE, with only hundreds of thousands of parameters, performs comparably to or better than models like GROVER, which has tens of millions of parameters. This suggests that a smarter, domain-aware pre-training strategy can compensate for a smaller model size.
Furthermore, MolCLE provides inherent explainability. Because the augmentations are learned, we can visualize what the model deems "important." Case studies on the BBBP dataset confirmed that the masks naturally align with chemical intuition, preserving aromatic rings and amine groups while ignoring simple carbon chains.
Conclusion
MolCLE demonstrates that for domain-specific data like molecules, augmentations should not be random. By learning to mask only the "unimportant" parts, the model focuses on the functional groups that drive chemical properties. Future work will involve testing MolCLE on more complex tasks, such as predicting quantum chemical properties, and exploring more advanced GNN backbones to further boost performance.
Summary updated