Knowledge Graph and Large Language Model for Metabolomics

Yuxing Lu

Abstract

Metabolomics, the comprehensive study of small molecules within biological systems, is essential for identifying disease biomarkers and mapping metabolic pathways. However, the field currently suffers from an "integration gap," where data is siloed across heterogeneous sources. This paper presents a research program to bridge this gap by integrating structured Knowledge Graphs (KGs) with Large Language Models (LLMs). The core contribution is MetaKG, the first metabolite-centric knowledge graph, combined with a Retrieval-Augmented Generation (RAG) framework to enhance the accuracy and context-awareness of LLMs in clinical and biological research.

Introduction

In the era of precision medicine, metabolomics provides a functional readout of cellular state. Despite its importance, the field faces significant challenges in data harmonization. Metabolic pathways, enzyme functions, and clinical observations are often stored in disparate, disconnected databases. While Large Language Models (LLMs) offer powerful reasoning capabilities, they frequently lack the domain-specific, structured knowledge required for metabolomics and are prone to "hallucinations" regarding niche chemical interactions. Conversely, traditional structured databases lack the natural language interface and cross-domain reasoning necessary for complex scientific inference. This research seeks to harmonize these two paradigms to improve predictive modeling and clinical diagnostics.

Methodology

The proposed framework utilizes a three-pronged approach to integrate structured biological knowledge with generative AI:

1. MetaKG: A Metabolite-Centric Knowledge Graph

The author developed MetaKG by aggregating extensive data from the Human Metabolome Database (HMDB). To ensure the utility of this graph, the system implements KG representation learning and a unique triple contrastive learning module. This module is specifically designed to reduce "batch effects"—systematic variations introduced during different laboratory runs—by focusing on the underlying biological relationships between metabolites and other entities rather than raw data noise.

2. Multimodal Data Integration

For clinical applications, the research employs dynamic learning and guided cross-attention. This allows the model to process and weigh diverse data types—such as facial images, tongue coating images, and fundus (eye) scans—differently depending on their relevance to a specific diagnostic task. This multimodal approach is particularly effective in calculating "AgeDiff," the discrepancy between biological and chronological age.

3. KG-Enhanced LLMs via RAG

To mitigate LLM hallucinations and provide factual grounding, the author utilizes Retrieval-Augmented Generation (RAG). Structured data from MetaKG and other databases are converted into natural language templates. These templates serve as "external memories" or prompts that guide the LLM, ensuring that its reasoning is based on verified metabolic interactions and clinical facts.

Datasets and Validation

The research was validated using several high-profile datasets:

  • HMDB: The foundation for MetaKG construction.
  • Multimodal Clinical Data: Used to calculate biological age biomarkers through facial and ocular imaging.
  • Genomics/Omics Data: DNA methylation and mRNA/miRNA expression data from cancer patients.
  • Electronic Health Records (EHR): Used for testing diagnostic classification and cross-departmental knowledge transfer.
  • NAFLD Dataset: A real-world clinical dataset for Non-Alcoholic Fatty Liver Disease diagnosis.

Key Insights

  • Structured Foundations: MetaKG achieved state-of-the-art (SOTA) results in 12 different attribute prediction tasks, demonstrating that structured graph embeddings capture chemical properties more effectively than raw data.
  • Normalization through Knowledge: The use of contrastive learning within the KG provides a novel solution to the persistent problem of batch effects in metabolomics, effectively "normalizing" data through biological context.
  • Synergistic Reasoning: The research highlights that LLMs and KGs are complementary: KGs provide the "truth" (structure), while LLMs provide the "logic" (reasoning and natural language interface).
  • Multimodal Biomarkers: The integration of disparate data types, such as tongue coatings and eye scans, proves that "biological age" (AgeDiff) is a potent biomarker for predicting various systemic diseases.

Results

The integration of MetaKG and LLMs yielded significant performance improvements across multiple domains:

  • Cancer Subtype Prediction: The multimodal approach achieved an average AUC of 87.41% across 12 tasks, significantly outperforming the previous SOTA of 84.85%.
  • Clinical Diagnostics: MetaKG proved highly effective in real-world clinical diagnosis for NAFLD and demonstrated superior performance in transferring diagnostic knowledge across different medical departments using EHR data.

Limitations and Future Directions

While MetaKG represents a milestone, the author acknowledges it is not yet exhaustive. Future work will focus on:

  • Expansion: Integrating more diverse metabolomic databases and adopting advanced graph neural network (GNN) architectures.
  • Specialization: Training a domain-specific LLM for metabolomics using the vast textual corpus of PubMed to create a model with a deeper "understanding" of chemistry and biology.
  • Autonomous Discovery: The long-term objective is to leverage these tools to automatically generate high-quality scientific hypotheses and design experimental protocols, potentially accelerating the pace of metabolic discovery.

Summary updated

BibTeX
@inproceedings{lu2025knowledge,
  author = {Yuxing Lu},
  title = {{Knowledge Graph and Large Language Model for Metabolomics}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i28.35218},
}
Figure