NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DrugChat: Towards Enabling ChatGPT-Like Capabilities on Drug Molecule Graphs

Youwei Liang, Ruiyi Zhang, Li Zhang, Pengtao XiearXiv 2023

Abstract

A ChatGPT-like system for drug compounds could be a game-changer in pharmaceutical research, accelerating drug discovery, enhancing our understanding of structure-activity relationships, guiding lead optimization, aiding drug repurposing, reducing the failure rate, and streamlining clinical trials. In this work, we make an initial attempt towards enabling ChatGPT-like capabilities on drug molecule graphs, by developing a prototype system DrugChat. DrugChat works in a similar way as ChatGPT. Users upload a compound molecule graph and ask various questions about this compound. DrugChat will answer these questions in a multi-turn, interactive manner. The DrugChat system consists of a graph neural network (GNN), a large language model (LLM), and an adaptor. The GNN takes a compound molecule graph as input and learns a representation for this graph. The adaptor transforms the graph representation produced by the GNN into another representation that is acceptable to the LLM. The LLM takes the compound representation transformed by the adaptor and users' questions about this compound as inputs and generates answers. All these components are trained end-to-end. To train DrugChat, we collected instruction tuning datasets which contain 10,834 drug compounds and 143,517 question-answer pairs.

Introduction

The drug discovery pipeline is notoriously slow and expensive, often costing billions of dollars and taking over a decade to bring a single compound to market. While AI has made significant strides in predicting molecular properties, most existing tools function as "black boxes" or are specialized for single tasks. There is a significant gap in tools that can intuitively "understand" and explain Structure-Activity Relationships (SAR)—the complex way a molecule’s shape dictates its biological effect. Furthermore, molecular graphs are non-sequential and structurally complex, making them difficult for standard, text-based LLMs to process directly. DrugChat aims to create a system that can translate these complex graphs into meaningful, interactive insights for human researchers.

Methodology

The DrugChat architecture consists of three primary components trained in an end-to-end fashion:

  1. Graph Neural Network (GNN): A pre-trained GNN acts as the structural encoder. It takes a compound's molecular graph as input and learns a high-dimensional representation (vector) of its structure.
  2. The Adaptor: This linear projection layer serves as the bridge between modalities. It transforms the GNN’s output into a "soft prompt" vector, formatted so that the LLM can "read" it as if it were a series of words describing the molecule.
  3. Large Language Model (LLM): The system utilizes Vicuna-13b (an open-source model based on LLaMA). The LLM receives the transformed graph representation along with natural language questions to generate conversational answers.

During training, the weights of the GNN and the LLM are frozen, and only the adaptor's weights are updated. This alignment process teaches the adaptor how to map chemical structural features to the linguistic space understood by the LLM.

Datasets

To teach the model how to discuss chemistry, the researchers curated two massive new instruction-tuning datasets. In total, the training set encompasses 10,834 compounds and 143,517 question-answer (QA) pairs.

Statistics of the ChEMBL and PubChem instruction-tuning datasets used to train DrugChat.

The ChEMBL Drug Instruction Tuning Dataset focuses on technical molecular features, such as rotatable bonds, Lipinski’s Rule of Five violations, and specific mechanisms of action. The PubChem Drug Instruction Tuning Dataset provides descriptive, encyclopedic summaries of drugs sourced from databases like ChEBI, LOTUS, and YMDB.

Results and Discussion

DrugChat demonstrates the ability to handle multi-turn reasoning and structural analysis. Qualitative examples show the model can correctly identify therapeutic indications by explaining a compound's role in inhibiting specific enzymes, such as acetylcholinesterase for Alzheimer's disease.

Example question-answer pairs demonstrating DrugChat's ability to analyze molecular properties, mechanisms, and regulatory status.

The model also exhibits zero-shot interaction capabilities, providing informative answers about side effects and administration routes even for compounds not explicitly seen during training. By using a simple linear adaptor to project graph features into the LLM's embedding space, the model can treat a molecule as a "visual" prompt, maintaining context across follow-up questions.

Conclusion and Future Work

DrugChat represents a first-of-its-kind prototype bringing ChatGPT-style interactivity to pharmacology. However, like all LLMs, it is susceptible to "language hallucination," where it might provide incorrect chemical descriptions. Future work will focus on systematic quantitative evaluation involving pharmaceutical scientists, the use of higher-quality human-verified data, and Reinforcement Learning from Human Feedback (RLHF) to enhance accuracy and safety in medical contexts.

Summary updated

BibTeX
@misc{liang2023drugchat,
  author = {Youwei Liang and Ruiyi Zhang and Li Zhang and Pengtao Xie},
  title = {{DrugChat: Towards Enabling ChatGPT-Like Capabilities on Drug Molecule Graphs}},
  year = {2023},
  eprint = {2309.03907},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.03907},
}
Figure