All models

MolCLR

A graph neural network encoder with a projection head, pre-trained contrastively on unlabeled molecule graphs.

Molecules, proteins and genomics · 160 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (8 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
2.4M
Operations
160
Framework
PyTorch
Recurrent
No
Published
Nature Machine Intelligence (arXiv 2021)
Cited by
856 (as of 28 October 2026)
Authors
Yuyang Wang, Jianren Wang, Zhonglin Cao, Amir Barati Farimani
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m18505
Graph hash
7ceb550c0ddfd550cebf68478f25988b63fdb89e0d00a8ed6fa252deac879efe
Skeleton hash
2aab68f1293b365ece0941b07a432c2e52bd1ff457c7358524409f6bfdbcd33e
Architecture hash
ab8eb5b562563a6c75344f96d6a238c8477e9b2781e654b3462679362fb3fe40
Diagram SHA-256
b43a3a96021a7623ecb6f4aeea968d82264cd21e7f042582a0b90ac4a14a8dee
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

MolCLR (Molecular Contrastive Learning of Representations via Graph Neural Networks) is a self-supervised learning framework that pre-trains graph neural networks on about 10M unique unlabeled molecules. The motivation is that labeled molecule data can be expensive and time-consuming to acquire.

A molecule is turned into a graph in which each node represents an atom and each edge represents a chemical bond between atoms. Three augmentations are proposed (atom masking, bond deletion and subgraph removal), and a contrastive estimator maximizes the agreement of augmentations from the same molecule while minimizing the agreement of different molecules. The feature extractor is a GCN or a GIN: 5 layers of graph convolution with ReLU activation, with an average pooling readout that extracts a 512-dimension molecular representation. An MLP with one hidden layer then maps that representation into a 256-dimension latent space, where the contrastive loss is applied.

After pre-training, the model is fine-tuned on molecular property prediction benchmarks from MoleculeNet. Against the same networks trained with supervision only, the paper reports average gains on classification benchmarks of 12.4% for GCN and 16.8% for GIN. It also notes that GIN shows more improvement than GCN from MolCLR pre-training.

Key idea. MolCLR pre-trains GNN encoders on about 10M unlabeled molecules by contrasting graphs augmented with atom masking, bond deletion and subgraph removal.

  • MolCLR
  • Molecular Contrastive Learning of Representations
  • molecular contrastive learning
  • molecule graph pre-training
  • self-supervised molecular representation
  • molecular property prediction
  • graph contrastive learning
  • MoleculeNet
  • drug discovery

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{wang2022molecularcontrastivelearningrepresentations,
      title={Molecular Contrastive Learning of Representations via Graph Neural Networks}, 
      author={Yuyang Wang and Jianren Wang and Zhonglin Cao and Amir Barati Farimani},
      year={2022},
      eprint={2102.10056},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      doi={https://doi.org/10.1038/s42256-022-00447-x},
      url={https://arxiv.org/abs/2102.10056}, 
}