hwwang55 / MolR

Chemical-Reaction-Aware Molecule Representation Learning
MIT License
72 stars 20 forks source link
graph-neural-networks molecule-representation-learning

MolR

This repository is the PyTorch implementation of MolR (paper):

Chemical-Reaction-Aware Molecule Representation Learning
Hongwei Wang, Weijiang Li, Xiaomeng Jin, Kyunghyun Cho, Heng Ji, Jiawei Han, Martin Burke
The 10th International Conference on Learning Representations (ICLR 2022)

MolR uses graph neural networks (GNNs) as the molecule encoder, and preserves the equivalence of molecules w.r.t. chemical reactions in the embedding space. Specifically, MolR forces the sum of the reactant embeddings and the sum of the product embeddings to be equal for each chemical reaction, which is shown to keep the embedding space well-organized and improve the generalization ability of the model.
MolR achieves substantial gains over state-of-the-art baselines. Below is the result of Hit@1 on USPTO-479k and real reaction dataset for the task of chemical reaction prediction:

Dataset USPTO-479k real reaction
Mol2vec 0.614 0.313
MolBERT 0.623 0.313
MolR-TAG 0.882 0.625

Below is the result of AUC on BBBP, HIV, and BACE datasets for the task of molecule property prediction:

Dataset BBBP HIV BACE
Mol2vec 0.872 0.769 0.862
MolBERT 0.762 0.783 0.866
MolR-GCN 0.890 0.802 0.882

Below is the result of RMSE on QM9 dataset for the task of graph-edit-distance prediction:

Dataset QM9
Mol2vec 0.995
MolBERT 0.937
MolR-SAGE 0.817

Below are the visualized reactions of alcohol oxidation and aldehyde oxidation using PCA:

drawing

Below is the visualized molecule embedding space on BBBP dataset using t-SNE:

drawing

For more results, please refer to our paper.

Files in the folder

Running the code

Required packages

The code has been tested running under Python 3.7 and CUDA 11.0, with the following packages installed (along with their dependencies):