Contrastive Representation Learning for 3D Protein Structures

Pedro Hermosilla, Timo Ropinski

TL;DR

This paper introduces an unsupervised contrastive learning framework tailored for 3D protein structures that pre-trains graph neural networks on hundreds of thousands of unlabeled chains from the Protein Data Bank (PDB). By sampling continuous backbone sub-structures as positive pairs, the model learns representations that capture high-level protein architecture, slashing structural search times from hours to seconds and achieving state-of-the-art accuracy when fine-tuned on fold and enzyme classification tasks.

What Problem Does This Paper Address?

Deep learning models that operate directly on 3D protein atomic coordinates can predict function, design novel proteins, and evaluate structural quality. However, structural data is scarce: while sequence databases like Pfam contain tens of millions of entries, the PDB contains only around 180,000 macromolecular structures, and the subset of reliably annotated structures for specific tasks is smaller still.

Training deep models directly on small labeled sets often causes severe overfitting. While contrastive learning has solved similar data-scarcity bottlenecks in computer vision and natural language processing, applying generic graph contrastive techniques (e.g., dropping random nodes or spatial subgraphs) breaks the linear continuity of the polypeptide chain and ignores the physical and biological rules governing protein folding.

Methods

The authors introduce a domain-aware contrastive learning pipeline:

  • Continuous Sub-structure Sampling: For each protein chain, the framework selects a random starting residue and expands bidirectionally along peptide bonds until 40%–60% of the chain is selected. This simulates partial protein domains while preserving local sequence and structural continuity. Two distinct sub-structures from the same chain form a positive pair; sub-structures from different chains in the mini-batch serve as negative pairs.
  • Rotation-Equivariant Backbone Encoder: To minimize memory footprint and allow large batch sizes, each amino acid is represented solely by its alpha carbon ($C_\alpha$). The message-passing convolution incorporates directional vectors ($\vec{t}$) in the residue's local frame, relative orientation dot products ($r$), and sequence distance ($\delta$), rendering the kernel rotation-equivariant and sensitive to chiral structure.
  • Contrastive Objective: The network maps pooled sub-structure embeddings into a projection space using an MLP head, optimized with an InfoNCE-style normalized temperature-scaled cross-entropy loss.
       Protein Chain
      /             \
Sub-structure A   Sub-structure B   (40-60% continuous sequence)
      |                 |
  Encoder E         Encoder E       (ResNet blocks + pooling)
      |                 |
  Projector P       Projector P     (MLP)
      \             /
     Maximize Cosine Similarity (InfoNCE Loss vs. Batch Negatives)

Datasets

  • Pre-training: Derived from the PDB, filtering out chains with fewer than 25 amino acids (~476,000 chains). Chains sharing folds or enzyme families with the test sets were excluded to prevent data leakage.
  • SCOPe 1.75 Fold Classification: 16,712 proteins across 1,195 folds, evaluated on three increasingly challenging test splits: Protein, Family, and Superfamily (Hou et al., 2018).
  • Enzyme Classification (EC): 37,428 proteins across 384 EC numbers, split such that test proteins share $<50\%$ sequence identity with training proteins (Hermosilla et al., 2021).
  • DaliLite Protein Similarity Benchmark: 140 query domains matched against a database of 15,211 target chains across Fold, Superfamily, and Family tiers (Holm, 2019).

Key Insights and Ideas

  • Local Continuity Matters: Unlike generic graph contrastive methods (e.g., You et al., 2020) that select arbitrary spatial subgraphs—resulting in fragmented, disconnected chain segments—preserving continuous sub-chains forces the model to infer global fold topology from coherent local structural fragments.
  • The Cropping Sweet Spot: Ablations revealed that masking out 40%–60% of the chain is optimal. Masking too little ($<20\%$) makes the task trivial, while masking too much ($>60\%$) discards too much contextual information.
  • Data Augmentation Divergence: Strong sub-chain cropping is vital for self-supervised contrastive learning, but applying the same transformation during supervised training degrades performance. Supervised training benefits instead from mild coordinate Gaussian jittering.
  • Global Topology vs. Local Detail: The unsupervised embeddings cluster proteins naturally by global fold architecture, but capture less fine-grained distinction at the family level, where subtle side-chain interactions dominate.

Key Results

  • Fold Classification: Fine-tuning the pre-trained encoder achieved 76.9% average accuracy, outperforming previous state-of-the-art methods (71.2%) and baseline models trained from scratch (72.3%). On the hardest Superfamily split, accuracy reached 50.3%.
  • Enzyme Classification: Fine-tuning reached 87.6% accuracy, establishing a new benchmark over existing 3D architectures.
  • Rapid Structural Retrieval: In similarity searches against 15,000 target structures, an MLP trained on top of frozen embeddings reached an $F_{max}$ of 0.35 on the Fold level (beating TM-align's 0.12 and DeepAlign's 0.28). Queries run in a few seconds, compared to ~1 hour for TM-align and ~15 hours for DaliLite on standard hardware.
Method Fold Classification (Avg) Enzyme Classification Fold Retrieval ($F_{max}$)
TM-align / DaliLite 65.7% — 0.12 / 0.38
Supervised Baseline (Hermosilla et al., 2021) 71.2% 87.2% —
Ours (Learned Distance / Frozen) — — 0.35
Ours (Fine-tuned) 76.9% 87.6% —

Limitations and Future Work

  • Fine-Grained Detail: While the model excels at detecting global fold similarity, its performance drops at the Family level on the DaliLite benchmark, struggling to separate fine structural variations without side-chain atomic information.
  • Single-Chain Focus: The pre-training operates on isolated protein chains rather than full multi-chain complexes or quaternary interactions.
  • Future Directions: The authors propose extending this representation framework to predict protein–protein interaction (PPI) interfaces by matching geometric patterns across latent embeddings, as well as releasing pre-computed embeddings for the entire PDB.

Summary updated

BibTeX
@inproceedings{hermosilla2022contrastive,
  author = {Pedro Hermosilla and Timo Ropinski},
  title = {{Contrastive Representation Learning for 3D Protein Structures}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=VINWzIM6_6},
}
Figure