O-GNN: INCORPORATING RING PRIORS INTO MOLECULAR MODELING

Abstract

Cyclic compounds that contain at least one ring play an important role in drug design. Despite the recent success of molecular modeling with graph neural networks (GNNs), few models explicitly take rings in compounds into consideration, consequently limiting the expressiveness of the models. In this work, we design a new variant of GNN, ring-enhanced GNN (O-GNN), that explicitly models rings in addition to atoms and bonds in compounds. In O-GNN, each ring is represented by a latent vector, which contributes to and is iteratively updated by atom and bond representations. Theoretical analysis shows that O-GNN is able to distinguish two isomorphic subgraphs lying on different rings using only one layer while conventional graph convolutional neural networks require multiple layers to distinguish, demonstrating that O-GNN is more expressive. Through experiments, O-GNN shows good performance on 11 public datasets. In particular, it achieves state-ofthe-art validation result on the PCQM4Mv1 benchmark (outperforming the previous KDDCup champion solution) and the drug-drug interaction prediction task on DrugBank. Furthermore, O-GNN outperforms strong baselines (without modeling rings) on the molecular property prediction and retrosynthesis prediction tasks.

1. INTRODUCTION

Cyclic compounds, which refers to the molecules that have at least one ring in its system, naturally exist in the chemical space. According to our statistics on 109M compounds from PubChem (Kim et al., 2019) which is a widely used chemical library, more than 90% compounds have at least one ring. The rings could be small/simple (e.g., the benzene is a six-member carbon ring, and the pentazole is a five-member nitrogen ring) or large/complex (e.g., the molecule shown in Figure 1 ). Rings are important in drug discovery, for example: (1) Rings can potentially reduce the flexibility of molecules, reduce the uncertainty when interacting with target proteins, and lock the molecules to their bioactive conformation (Sun et al., 2012) . (2) Macrocyclic compounds, which usually have a ring with more than 12 atoms, play important roles in antibotics design (Venugopal & Johnson, 2011) and peptide drug design (Bhardwaj et al., 2022) . Recently, deep neural networks, especially graph neural networks (denoted as GNN) (Kipf & Welling, 2017; Hamilton et al., 2017a) , have been widely used in molecular modeling. A GNN takes a graph as input, and messages of different nodes are passed along edges. GNNs have made great success in scientific discovery: (1) Stokes et al. (2020) train a GNN to predict growth inhibition of Escherichia coli and find that Halicin is a broad-spectrum bactericidal antibiotic. (2) Shan et al. ( 2022) leverage GNN to model the interactions between proteins, and they eventually obtain possible antibodies for SARS-CoV-2. In addition, GNNs are widely used in drug property prediction (Rong et al., 2020) , drug-target interaction modeling (Torng & Altman, 2019), retrosynthesis (Chen & Jung, 2021), etc. However, none of the above work explicitly models the ring information into GNNs. From the application's perspective, they miss an important feature for their tasks. From the machine learning's perspective, Loukas (2020) points out that existing message-passing-based GNNs cannot properly capture the ring information when the product of network width and height is not large enough (see the Table 1 in Loukas ( 2020)). Therefore, with the classic GNNs, the ring information in compounds is not well leveraged. summarized that the intact taxane ring (i.e., r 4 , r 5 , r 6 ) and a four-membered oxetane side ring (i.e., r 7 ) is essential to induce cytotoxic activity. To tackle this issue, in this work, we propose a new model, ring-enhanced GNN (denoted as O-GNN), that explicitly models the ring information in a compound. The O stands for the rings in molecules and is pronounced as "O". Generally speaking, O-GNN stacks L layers, and each layer sequentially updates edge representations, node representations and ring representations by aggregating their neighbourhood information. We mainly use a self-attention layer for adaptive message passing, and use a feed-forward layer to introduce non-linearity to representations. We first demonstrate the advantage of O-GNN through theoretical analysis. O-GNN is able to distinguish two isomorphic sub-graphs lying on different rings using only one layer (see Figure 2 for the example). On the contrary, if we remove the ring-modeling components from O-GNN, such a distinguishability would require multiple layers (see Section 2.3 for detailed analysis). These results demonstrate that O-GNN is more expressive than conventional graph convolutional networks in the absence of explicitly modeling rings. The second and third substructures lie on different rings (a Cyclooctane and an Azocane). A regular GNN requires multiple layers to distinguish the three substructures while O-GNN requires only one layer due to the ring representations. We then conduct experiments on 11 datasets from three tasks, including molecular property prediction, drug-drug interaction prediction and retrosynthesis: (1) For molecular property prediction, we first conduct experiments on PCQM4Mv1, which is to predict the HOMO-LUMO gap of molecules. 



When the context is clear, we use nodes/atoms and edges/bonds alternatively in this work.



Figure 1: Paclitaxel, a compound with 7 simple rings. Kampan et al. (2015) summarized that the intact taxane ring (i.e., r 4 , r 5 , r 6 ) and a four-membered oxetane side ring (i.e., r 7 ) is essential to induce cytotoxic activity.

Figure 2: An illustrative example of theoretical results. The three substructures in the red circles are isomorphic. The second and third substructures lie on different rings (a Cyclooctane and an Azocane). A regular GNN requires multiple layers to distinguish the three substructures while O-GNN requires only one layer due to the ring representations.

AND PRELIMINARIESLet G = (V, E) denote a molecular graph, where V and E are the collections of nodes/atoms and edges/bonds 1 . Let R denote the collection of rings in G.Define V = {v 1 , v 2 , • • • , v |V | } and

GNN on DrugBank following the previous settings(Nyamabo et al., 2021; Li et al.,  2022), and achieve state-of-the-art results. (3) For retrosynthesis, we apply O-GNN to LocalRetro (Chen & Jung, 2021), a strong GNN-based method for retrosynthesis. On USPTO-50k, our method significantly boosts the accuracy.

availability

//github.

