Skip to main content
QUICK REVIEW

[Paper Review] MolXPT: Wrapping Molecules with Text for Generative Pre-training

Zequn Liu, Wei Zhang|arXiv (Cornell University)|May 18, 2023
Computational Drug Discovery MethodsComputer Science7 citations
TL;DR

MolXPT is a 350M-parameter generative language model pre-trained on scientific text, SMILES sequences, and 'wrapped' sequences that interleave molecule names with their corresponding SMILES. By jointly modeling text and molecular structure through this wrapping technique, MolXPT achieves state-of-the-art performance on molecular property prediction (MoleculeNet), comparable results to larger models on text-molecule translation with 44% fewer parameters, and strong zero-shot molecule generation without fine-tuning.

ABSTRACT

Generative pre-trained Transformer (GPT) has demonstrates its great success in natural language processing and related techniques have been adapted into molecular modeling. Considering that text is the most important record for scientific discovery, in this paper, we propose MolXPT, a unified language model of text and molecules pre-trained on SMILES (a sequence representation of molecules) wrapped by text. Briefly, we detect the molecule names in each sequence and replace them to the corresponding SMILES. In this way, the SMILES could leverage the information from surrounding text, and vice versa. The above wrapped sequences, text sequences from PubMed and SMILES sequences from PubChem are all fed into a language model for pre-training. Experimental results demonstrate that MolXPT outperforms strong baselines of molecular property prediction on MoleculeNet, performs comparably to the best model in text-molecule translation while using less than half of its parameters, and enables zero-shot molecular generation without finetuning.

Motivation & Objective

  • To improve molecular representation learning by jointly pre-training on scientific text and SMILES sequences.
  • To address the limitation of existing models that do not explicitly leverage the semantic relationship between molecule names and their structural representations.
  • To enable zero-shot molecular generation and few-shot transfer learning across diverse molecular and text-based tasks.
  • To reduce model size while maintaining or improving performance compared to larger state-of-the-art models in multimodal molecular generation.

Proposed method

  • MolXPT is pre-trained on three data sources: PubMed titles and abstracts, PubChem SMILES, and 8 million 'wrapped' sequences where molecule names are replaced with their corresponding SMILES.
  • Named entity recognition (NER) using BERN2 identifies molecule mentions in text, which are then linked to entities in knowledge bases like ChEBI to retrieve SMILES.
  • The 'wrapped' sequences are constructed by replacing detected molecule names with their SMILES, creating hybrid text-SMILES sequences that preserve contextual and structural information.
  • Tokenization is applied separately: BPE for text (40k merges) and regex-based tokenization for SMILES, with special tokens for start and end of molecule.
  • The model uses a 24-layer Transformer architecture with 350M parameters, trained via masked language modeling on all three data types.
  • Fine-tuning is performed via prompt-based tuning on downstream tasks such as molecular property prediction and text-to-molecule generation.

Experimental results

Research questions

  • RQ1Can joint pre-training on text and SMILES sequences, with explicit alignment via wrapped sequences, improve molecular representation learning?
  • RQ2Does MolXPT outperform existing GNN-based and multimodal models on molecular property prediction benchmarks like MoleculeNet?
  • RQ3Can MolXPT achieve competitive performance on text-molecule translation with significantly fewer parameters than state-of-the-art models?
  • RQ4To what extent does MolXPT exhibit zero-shot text-to-molecule generation capability without fine-tuning?
  • RQ5How does the use of wrapped sequences compare to end-to-end pre-training on raw text and SMILES in terms of model alignment and downstream performance?

Key findings

  • MolXPT outperforms strong GNN-based baselines on MoleculeNet, achieving a mean RMSE of 0.859 on the MoleculeNet benchmark, which is better than prior methods like GEM.
  • On the CheBI-20 text-molecule translation dataset, MolXPT achieves comparable performance to MolT5-large (800M parameters) while using only 44% of its parameters, with a BLEU score of 0.859 and a Text2Mol score of 0.983.
  • In zero-shot text-to-molecule generation, MolXPT achieves a top-1 Tanimoto similarity of 0.540 (MACCS), 0.383 (RDK), and 0.228 (Morgan) fingerprints, demonstrating meaningful generation without fine-tuning.
  • The model successfully recovers 33 molecules from text descriptions in zero-shot settings, confirming its ability to generalize to unseen generation tasks.
  • The use of wrapped sequences significantly improves performance over models like Galactica that pre-train on raw text and SMILES without explicit alignment, indicating the value of structured cross-modal supervision.
  • MolXPT achieves state-of-the-art performance on molecule-to-text generation with a METEOR score of 0.757 and a Text2Mol score of 0.983, outperforming MolT5-small and MolT5-base.

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.