NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Atom-Motif Contrastive Transformer for Molecular Property Prediction

Wentao Yu, Shuo Chen, Chen Gong, Gang Niu, Masashi Sugiyama

TL;DR

The paper introduces the Atom-Motif Contrastive Transformer (AMCT), a novel Graph Transformer framework for molecular property prediction that captures both fine-grained atom interactions and high-level structural motifs (functional groups). By leveraging dual-level contrastive learning and a property-aware attention mechanism, AMCT significantly improves prediction accuracy and successfully identifies chemically critical substructures.

What Problem Does This Paper Address?

Molecular Property Prediction (MPP) is a foundational task in drug discovery, biomedicine, and materials science. Recently, Graph Transformers (GTs) have become popular for MPP because they excel at capturing latent relationships between nodes (atoms) in a molecular graph.

However, most existing GT-based methods focus exclusively on pairwise atom-level interactions. This approach overlooks motifs—meaningful, recurring subgraphs like functional groups (e.g., benzene rings, hydroxyl groups) that play a dominant role in determining a molecule's chemical behavior.

Without motif-level awareness, models can suffer from structural blindness. For example, when hydrogen atoms are omitted (a standard practice in graph-based molecular modeling), phenol and cyclohexanol map to the exact same molecular graph. Yet, phenol is significantly more acidic due to how its hydroxyl group interacts with the electron cloud of its benzene ring. AMCT addresses this limitation by explicitly modeling both atoms and motifs.

Figure 2: Molecular formulae of phenol and cyclohexanol, as well as their corresponding molecular graph. As the hy- drogen atom is neglected in the MPP task, phenol and cyclo- hexanol have the same molecular graph.

Methods

The authors propose AMCT, a framework that processes molecules at two distinct granularities simultaneously:

  1. Dual Encoding: Molecules are split into individual atoms and segmented into motifs using a tree decomposition algorithm. Separate atom and motif encoders (utilizing Multi-Head Attention and degree centrality) generate low-level and high-level molecular representations.
  2. Atom-Motif Alignment Loss ($L_{align}$): Because atom and motif representations are simply two different views of the same molecule, an intra-molecule contrastive loss aligns them using Kullback-Leibler (KL) divergence to provide self-supervisory training signals.
  3. Motif Contrastive Loss ($L_{contrastive}$): Identical motifs across different molecules typically exhibit similar chemical properties. AMCT employs an inter-molecule contrastive loss to maximize the representation agreement of identical motifs across the entire training batch.
  4. Property-Aware Decoding: Instead of treating all molecular properties equally, the decoder uses a cross-attention mechanism to map property embeddings against motif representations. This highlights which specific functional groups drive a given property (e.g., toxicity or solubility).
Figure 3: The framework of our proposed AMCT. First, two molecules are split into multiple atoms and segmented into multiple motifs, respectively. Second, the atom and motif embedding layers (i.e., (a) and (b)) generate atom and motif embeddings, respectively. Third, the atom and motif encoders (i.e., (c) and (d)) are used to obtain atom-level and motif-level molecular representations (i.e., (e) and (f)), respectively. Finally, the decoder (g) and a linear layer are invoked to obtain predicted results, where the atom-motif alignment loss, motif contrastive loss, and supervised losses are used for model training.

Datasets

The model was extensively evaluated on seven widely recognized benchmark datasets from the Open Graph Benchmark (OGB):

  • Classification Tasks: ToxCast, Tox21, BBBP, BACE, SIDER, and HIV.
  • Regression Task: ESOL (predicting water solubility).

Key Insights and Ideas

  • Molecules as Multi-View Data: Treating atoms and motifs as distinct "views" allows self-supervised contrastive learning to extract rich structural features without requiring expensive 3D coordinate data.
  • Chemical Consistency Across Contexts: Forcing identical motifs (like an $-NH_2$ group) to maintain consistent representations across different molecular environments helps the model learn generalized chemical rules.
  • Interpretability via Cross-Attention: The property-aware attention mechanism acts as an automated chemist, identifying and visualizing which functional groups are responsible for specific traits, such as inhibiting HIV replication.

Key Results

AMCT consistently outperformed 11 state-of-the-art baselines (including top-performing Graph Transformers like Graphormer and Molformer) across all seven datasets:

  • Classification Performance: On the BACE dataset, AMCT achieved a top Area Under the ROC curve (AUC) of 0.895, outperforming Molformer (0.881) and Graphormer (0.860). On the HIV dataset, it reached an AUC of 0.813.
  • Regression Performance: On the ESOL solubility dataset, AMCT achieved the lowest Root Mean Square Error (RMSE) of 0.815.
  • Ablation Validation: Removing the motif contrastive loss ($L_{contrastive}$) caused a significant performance drop (e.g., lowering the BACE AUC by over 2%), proving that inter-molecular motif alignment is vital for learning robust representations.
Figure 4: Visualization of identified motifs of four molecules in the HIV dataset. Their IDs in the dataset are 265, 2444, 2547, and 6139, respectively. The blue stars in the first col- umn indicate the motifs that are considered important in chemistry for influencing molecular properties. The blue hollow circles in the last column contain the atoms in the corresponding motifs, and the numbers around them are their corresponding motif IDs.

Limitations and Future Work

Not discussed in the paper.

Summary updated

BibTeX
@article{yu2026atom,
  author = {Wentao Yu and Shuo Chen and Chen Gong and Gang Niu and Masashi Sugiyama},
  title = {{Atom-Motif Contrastive Transformer for Molecular Property Prediction}},
  journal = {ACM Trans. Intell. Syst. Technol.},
  year = {2026},
  doi = {10.1145/3787204},
}
Figure