Molformer: Motif-based Transformer on 3D Heterogeneous Molecular Graphs

Fang Wu, Dragomir Radev, Stan Z. Li
10/4/2021
124 citations
q-bio.QMcs.CEcs.LG
transformer-attention

Official code: smiles724/Molformer (96 stars, Python, last commit 2025-06-14).

Abstract

Procuring expressive molecular representations underpins AI-driven molecule design and scientific discovery. The research mainly focuses on atom-level homogeneous molecular graphs, ignoring the rich information in subgraphs or motifs.

Show full abstract

However, it has been widely accepted that substructures play a dominant role in identifying and determining molecular properties. To address such issues, we formulate heterogeneous molecular graphs (HMGs), and introduce a novel architecture to exploit both molecular motifs and 3D geometry. Precisely, we extract functional groups as motifs for small molecules and employ reinforcement learning to adaptively select quaternary amino acids as motif candidates for proteins. Then HMGs are constructed with both atom-level and motif-level nodes. To better accommodate those HMGs, we introduce a variant of Transformer named Molformer, which adopts a heterogeneous self-attention layer to distinguish the interactions between multi-level nodes. Besides, it is also coupled with a multi-scale mechanism to capture fine-grained local patterns with increasing contextual scales. An attentive farthest point sampling algorithm is also proposed to obtain the molecular representations. We validate Molformer across a broad range of domains, including quantum chemistry, physiology, and biophysics. Extensive experiments show that Molformer outperforms or achieves the comparable performance of several state-of-the-art baselines. Our work provides a promising way to utilize informative motifs from the perspective of multi-level graph construction.

View on arXivView PDF

Code Implementations(1)

Code for Molformer (AAAI 2023)

9612PythonJul 20, 20211 years ago

Similar Papers

Cite this paper

@article{wu2021molformer,
  title  = {Molformer: Motif-based Transformer on 3D Heterogeneous Molecular Graphs},
  author = {Fang Wu and Dragomir Radev and Stan Z. Li},
  year   = {2021},
  eprint = {2110.01191},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.01191}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2110.01191.svg)](https://codeofpaper.com/paper/2110.01191)

Discussion