Enhancing Molecular Property Prediction with Knowledge from Large Language Models

Peng Zhou, Lai Hou Tim, Zhixiang Cheng, Kun Xie, Chaoyi Li, Wei Liu, Xiangxiang ZengarXiv 2025 · OpenReview

Abstract: Predicting molecular properties is a critical component of drug discovery. Recent advances in deep learning, particularly Graph Neural Networks (GNNs), have enabled end-to-end learning from molecular structures, reducing reliance on manual feature engineering. However, while GNNs and self-supervised learning approaches have advanced molecular property prediction (MPP), the integration of human prior knowledge remains indispensable, as evidenced by recent methods that leverage large language models (LLMs) for knowledge extraction. Despite their strengths, LLMs are constrained by knowledge gaps and hallucinations, particularly for less-studied molecular properties. In this work, we propose a novel framework that, for the first time, integrates knowledge extracted from LLMs with structural features derived from pre-trained molecular models to enhance MPP. Our approach prompts LLMs to generate both domain-relevant knowledge and executable code for molecular vectorization, producing knowledge-based features that are subsequently fused with structural representations. We employ three state-of-the-art LLMs, GPT-4o, GPT-4.1, and DeepSeek-R1, for knowledge extraction. Extensive experiments demonstrate that our integrated method outperforms existing approaches, confirming that the combination of LLM-derived knowledge and structural information provides a robust and effective solution for MPP.

Introduction

Predicting molecular properties (MPP)—such as toxicity or solubility—is the backbone of drug discovery. Historically, this process relied on "expert-crafted features," which are hand-picked chemical descriptors. Recently, Graph Neural Networks (GNNs) changed the landscape by learning directly from molecular structures. However, GNNs are often "blind" to the vast wealth of human chemical knowledge found in scientific literature.

Conversely, using Large Language Models (LLMs) to extract this knowledge faces two major hurdles: the "long tail" problem, where LLMs struggle with rare molecules, and the risk of hallucinations, where models confidently provide incorrect chemical facts. This paper addresses these challenges by effectively integrating human prior knowledge (via LLMs) with structural data (via GNNs) to create a more accurate and reliable prediction model.

Methodology: Knowledge and Structure Fusion

The proposed framework introduces a "Knowledge and Structure Fusion" approach consisting of three main pillars:

  1. Executable Knowledge Extraction: Instead of just asking an LLM for a description, the system prompts it to act as a chemistry expert. The LLM generates judgment rules (e.g., "check for aromatic rings") and the Python code required to calculate those features using RDKit. This "executable" nature ensures the knowledge is grounded in actual data rather than just text.
  2. Multimodal Fusion: The model extracts knowledge-based features ($h^K$) from the LLM’s rules and code, and structural features ($h^S$) from a pre-trained GNN that analyzes the molecular graph.
  3. Mutual Information Maximization: To ensure these two sources of information are complementary rather than redundant, the authors use the Mutual Information Neural Estimation (MINE) approach. This forces the model to identify the most useful information between the text-based knowledge and the graph-based structure.
Comparison of traditional ML, GNN-based, and the proposed fusion method.

Results and Discussion

The integrated method was evaluated on standard benchmarks from MoleculeNet, including HIV, BACE, ClinTox, and BBBP. The results consistently outperformed baseline GNN models. Using GPT-4.1 as the knowledge source, the ROC-AUC on the ClinTox dataset increased by up to 9.41%. In some cases, precision improved by nearly 50% (e.g., on the HIV dataset), indicating a massive reduction in false positives.

A key insight from the study is that LLMs act as highly effective feature engineers. Simply using all available RDKit descriptors often led to worse performance due to noise and sparse data. LLMs, however, identify relevant descriptors for specific tasks. Visualizing these features through heatmaps reveals their high discriminative power, especially for datasets like ClinTox.

Heatmaps showing the discriminative power of LLM-generated features for the ClinTox dataset across different models.

For datasets like BACE, where LLM knowledge alone was visually messy and less predictive, fusion with structural GNN features led to significant performance jumps. This proves that the two modalities act as a safety net for each other. By forcing the LLM to write Python code to implement its rules, the authors effectively bypass the "black box" nature of LLM text, turning fuzzy reasoning into concrete numerical vectors.

Conclusion

While challenges like redundancy and knowledge gaps for niche properties remain, this fusion framework demonstrates a robust path forward for molecular property prediction. The success of this approach suggests it could be expanded beyond chemistry into other scientific domains where human literature and structural data coexist, such as materials science or protein engineering.

Summary updated

BibTeX
@misc{zhou2025enhancing,
  author = {Peng Zhou and Lai Hou Tim and Zhixiang Cheng and Kun Xie and Chaoyi Li and Wei Liu and Xiangxiang Zeng},
  title = {{Enhancing Molecular Property Prediction with Knowledge from Large Language Models}},
  year = {2025},
  eprint = {2509.20664},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.20664},
}
Figure