Skip to main content
QUICK REVIEW

[Paper Review] Molformer: Motif-based Transformer on 3D Heterogeneous Molecular Graphs

Fang Wu, Dragomir Radev|arXiv (Cornell University)|Oct 4, 2021
Machine Learning in Materials ScienceMaterials Science7 citations
TL;DR

Molformer proposes a novel 3D heterogeneous molecular graph (HMG) framework that integrates atom-level and motif-level nodes using functional groups and reinforcement learning for motif discovery. It employs a heterogeneous self-attention Transformer with multi-scale modeling and attentive farthest point sampling, achieving state-of-the-art or competitive performance across quantum chemistry, physiology, and biophysics benchmarks.

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. 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.

Motivation & Objective

  • To address the limitation of existing GNNs that focus only on atom-level graphs and ignore informative molecular substructures (motifs).
  • To develop a unified framework that integrates both atom-level and motif-level nodes into a single 3D heterogeneous molecular graph (HMG).
  • To design a Transformer-based architecture capable of modeling interactions across multiple graph levels while preserving 3D geometric information.
  • To improve molecular representation learning by leveraging task-specific motifs discovered via reinforcement learning for proteins and chemically defined functional groups for small molecules.
  • To validate the effectiveness of the proposed HMG and Molformer across diverse molecular property prediction tasks.

Proposed method

  • Construct heterogeneous molecular graphs (HMGs) by including both atom-level nodes and motif-level nodes derived from functional groups (small molecules) or RL-discovered quaternary amino acid sequences (proteins).
  • Introduce a heterogeneous self-attention (HSA) mechanism that distinguishes and computes attention between different node types (atom vs. motif) in the Transformer encoder.
  • Implement a multi-scale mechanism that captures local patterns at increasing receptive field sizes to model fine-grained structural details.
  • Propose an Attentive Farthest Point Sampling (AFPS) algorithm to downsample and aggregate node features into a global molecular representation.
  • Use reinforcement learning to mine task-relevant motif candidates in protein sequences, optimizing for downstream prediction performance.
  • Apply a multi-layer perceptron (MLP) to embed atomic features into learnable vectors before feeding into the Molformer architecture.

Experimental results

Research questions

  • RQ1Can integrating molecular motifs as explicit nodes in a 3D heterogeneous graph improve molecular representation learning compared to homogeneous atom-level graphs?
  • RQ2How effective is a reinforcement learning-based motif mining strategy for identifying biologically relevant substructures in protein sequences?
  • RQ3Does a heterogeneous self-attention mechanism that differentiates between atom and motif nodes lead to better performance in molecular property prediction?
  • RQ4To what extent does multi-scale modeling enhance the capture of local and long-range structural dependencies in molecular graphs?
  • RQ5How does the proposed Attentive Farthest Point Sampling (AFPS) algorithm compare to standard pooling or attention-based aggregation in learning global molecular representations?

Key findings

  • Molformer outperforms or achieves comparable performance to state-of-the-art baselines across diverse molecular property prediction benchmarks, including QM7, BBBP, and other biophysical datasets.
  • Ablation studies show consistent performance gains from adding each of the four functional group categories (hydrocarbons, haloalkanes, oxygen-containing, nitrogen-containing), with hydrocarbons contributing most significantly.
  • The RL-based motif mining method discovered motifs with a 1.38% occurrence rate in binding pockets—nearly double the rate in other regions—indicating biological relevance.
  • The heterogeneous self-attention mechanism enables effective modeling of cross-level interactions between atoms and motifs, improving representation quality.
  • The AFPS algorithm effectively aggregates node features and produces robust global molecular representations, contributing to the model's strong generalization.
  • The HMG formulation with explicit motif nodes leads to a noticeable performance improvement over naive fusion of multi-level features, validating the design choice.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.