Home

Awesome

MolReGPT: Empowering Molecule Discovery for Molecule-Caption Translation with Large Language Models: A ChatGPT Perspective

The official repo of MolReGPT - "Empowering Molecule Discovery for Molecule-Caption Translation with Large Language Models: A ChatGPT Perspective". (Accepted by IEEE TKDE (To appear))

Author List

NameAffiliationEmail
Jiatong LiThe Hong Kong Polytechnic Universityjiatong.li@connect.polyu.hk
Yunqing LiuThe Hong Kong Polytechnic Universityyunqing617.liu@connect.polyu.hk
Wenqi FanThe Hong Kong Polytechnic Universitywenqifan03@gmail.com
Xiao-Yong WeiThe Hong Kong Polytechnic University & Sichuan Universityx1wei@polyu.edu.hk
Hui LiuMichigan State Universityliuhui7@msu.edu
Jiliang TangMichigan State Universitytangjili@msu.edu
Qing LiThe Hong Kong Polytechnic Universityqing-prof.li@polyu.edu.hk

Contact

If you encounter any problems, please feel free to contact us.

News

In the first phase:

Our paper is accpeted by IEEE TKDE and we have updated the accepted version~ 🎉

We will soon release all the codes, data, and demo for MolReGPT. Please stay tuned! Thanks for your patience!

We first released the results of zero_shot and ten shot results ten_shot_bm25, ten_shot_morgan.

In the second phase and later:

We would like to announce our second work, In-Context Molecule Adaptation (ICMA), which aims to further improve the performance of MolReGPT by adapting the parameters of LLMs via in-context molecule tuning Paper Link.

Introduction

MolReGPT aims to create a foundation method for molecule discovery by leveraging large language models (LLMs). Thus, we focus on two crucial aspects:

  1. molecule understanding
  2. text-conditioned molecule generation

intro

To this end, we focus on a specific task, molecule-caption translation, the two sub-tasks of which exactly corresponds to the two aspects.

  1. molecule2caption (i.e., Mol2Cap) aims to generate a caption for a given molecule to describe its structure, properties, and functions.
  2. caption2molecule (i.e., Cap2Mol) aims to generate a molecule for a given caption, which could help researchers customize their molecules for specific purposes.

Abstract

Molecule discovery plays a crucial role in various scientific fields, advancing the design of tailored materials and drugs. Traditional methods for molecule discovery follow a trial-and-error process, which are both time-consuming and costly, while computational approaches such as artificial intelligence (AI) have emerged as revolutionary tools to expedite various tasks, like molecule-caption translation. Despite the importance of molecule-caption translation for molecule discovery, most of the existing methods heavily rely on domain experts, require excessive computational cost, and suffer from poor performance. On the other hand, Large Language Models (LLMs), like ChatGPT, have shown remarkable performance in various cross-modal tasks due to their great powerful capabilities in natural language understanding, generalization, and reasoning, which provides unprecedented opportunities to advance molecule discovery. To address the above limitations, in this work, we propose a novel LLMs-based framework (MolReGPT) for molecule-caption translation, where a retrieval-based prompt paradigm is introduced to empower molecule discovery with LLMs like ChatGPT without fine-tuning. More specifically, MolReGPT leverages the principle of molecular similarity to retrieve similar molecules and their text descriptions from a local database to ground the generation of LLMs through in-context few-shot molecule learning. We evaluate the effectiveness of MolReGPT via molecule-caption translation, which includes molecule understanding and text-based molecule generation. Experimental results show that MolReGPT outperforms fine-tuned models like MolT5-base without any additional training. To the best of our knowledge, MolReGPT is the first work to leverage LLMs in molecule-caption translation for advancing molecule discovery.

Model Strcuture

model

Dataset

We apply the same dataset used in MolT5, which is the dataset of ChEBI-20

Results

Results have been released!👏

Mol2Cap

MethodBLEU-2 $\uparrow$BLEU-4 $\uparrow$ROUGEL-1 $\uparrow$ROUGEL-2 $\uparrow$ROUGEL-L $\uparrow$METEOR $\uparrow$Text2Mol $\uparrow$
Transformer0.0610.0270.2040.0870.1860.1140.057
GPT-3.5-turbo (zero_shot)0.1030.0500.2610.0880.2040.1610.352
T5-base0.5110.4230.6070.4510.5500.5390.523
MolT5-base0.5400.4570.6340.4850.5780.5690.547
MolReGPT (GPT-3.5-turbo)0.5650.4820.6230.4500.5430.5850.560
T5-large0.5580.4670.6300.4780.5690.5860.563
MolT5-large0.5940.5080.6540.5100.5940.6140.582
MolReGPT (GPT-4-0314)0.6070.5250.6340.4760.5620.6100.585

Cap2Mol

MethodBLEU $\uparrow$EM $\uparrow$Levenshtein $\downarrow$MACCS FTS $\uparrow$RDK FTS $\uparrow$Morgan FTS $\uparrow$FCD $\downarrow$Text2Mol $\uparrow$Validity $\uparrow$
Transformer0.4990.00057.660.4800.3200.21711.320.2770.906
GPT-3.5-turbo (zero_shot)0.4890.01952.130.7050.4620.3672.050.4790.802
T5-base0.7620.06924.9500.7310.6050.5452.480.4990.660
MolT5-base0.7690.08124.4580.7210.5880.5292.180.4960.772
MolReGPT (GPT-3.5-turbo)0.7900.13924.910.8470.7080.6240.570.5710.887
T5-large0.8540.27916.7210.8230.7310.6701.220.5520.902
MolT5-large0.8540.31116.0710.8340.7460.6841.200.5540.905
MolReGPT (GPT-4-0314)0.8570.28017.140.9030.8050.7390.410.5930.899

Requirements

transformers == 4.30.0
torch == 1.13.1+cu117
rdkit == 2022.09.5
fcd == 1.1
rank_bm25 == 0.2.2
sentence_transformers == 2.2.2
openai == 0.27.2

Usage

Thanks for your attention! The codes will be released ASAP!

Demo

Currently, you can customize your own prompt via our released jupyter-notebook demo

We will also provide web-page for a more user-friendly demo.

Citation

@article{molregpt,
  title={Empowering Molecule Discovery for Molecule-Caption Translation with Large Language Models: A ChatGPT Perspective},
  author={Jiatong Li and Yunqing Liu and Wenqi Fan and Xiao-Yong Wei and Hui Liu and Jiliang Tang and Qing Li},
  journal={arXiv preprint arXiv:2306.06615},
  year={2023}
}