Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Aug 13;16(1):7526.
doi: 10.1038/s41467-025-62781-z.

Large language model powered knowledge graph construction for mental health exploration

Affiliations

Large language model powered knowledge graph construction for mental health exploration

Shan Gao et al. Nat Commun. .

Abstract

Mental health is a major global concern, yet findings remain fragmented across studies and databases, hindering integrative understanding and clinical translation. To address this gap, we present the Mental Disorders Knowledge Graph (MDKG)-a large-scale, contextualized knowledge graph built using large language models to unify evidence from biomedical literature and curated databases. MDKG comprises over 10 million relations, including nearly 1 million novel associations absent from existing resources. By structurally encoding contextual features such as conditionality, demographic factors, and co-occurring clinical attributes, the graph enables more nuanced interpretation and rapid expert validation, reducing evaluation time by up to 70%. Applied to predictive modeling in the UK Biobank, MDKG-enhanced representations yielded significant gains in predictive performance across multiple mental disorders. As a scalable and semantically enriched resource, MDKG offers a powerful foundation for accelerating psychiatric research and enabling interpretable, data-driven clinical insights.

PubMed Disclaimer

Conflict of interest statement

Competing interests: The authors declare no competing interests.

Figures

Fig. 1
Fig. 1. Construction and contextualization of the Mental Disorders Knowledge Graph (MDKG).
a Example of a structured triplet representation derived from literature, demonstrating how biomedical relationships are contextualized with supporting metadata. In this case, the association between Lewy bodies in the amygdala and increased risk of major depression in Alzheimer’s disease is enriched with source information, sample characteristics, and analytical context. b Schematic overview of the MDKG construction pipeline. Unstructured data from literature abstracts and structured data from biomedical databases are processed through a multi-stage workflow involving GPT-4-assisted pre-labeling, active learning-based annotation, named entity recognition, relation extraction, tabular data parsing, and large language model (LLM)-powered triplet refinement. The resulting knowledge is aligned to a unified schema and enriched with contextual attributes to support downstream applications. The source data are provided as a Source Data file.
Fig. 2
Fig. 2. Composition and knowledge retrieval capabilities of the MDKG.
a Distribution of relation types and entity pairs in the literature-based Mental Disorders Knowledge Graph (MDKG). b Distribution of MDKG triplets across curated biomedical resources (e.g., DrugBank, DisGeNET, UMLS), model predictions, and other sources. c Example output of knowledge retrieval from MDKG for major depressive disorder (MDD), showing interconnected concepts such as physiological abnormalities, behavioral features, genetic variants, and therapeutic options. The source data are provided as a Source Data file.
Fig. 3
Fig. 3. Condition-related knowledge and causal structure in the MDKG.
a Word cloud showing the most frequent condition-related entities extracted from literature-derived triplets in the MDKG. Font size is proportional to entity frequency, highlighting prevalent clinical and behavioral features linked to mental disorders. b Top 10 most frequently mentioned condition-related entities in elderly and adolescent populations based on literature triplets containing conditional statements. c Example of a causal knowledge graph centered on depression, constructed by linking unidirectional risk relationships extracted from the literature. Nodes represent biological, psychological, or environmental factors, while directed edges indicate potential causal influence as inferred from the literature. The source data are provided as a Source Data file.
Fig. 4
Fig. 4. Comparative evaluation and structural composition of MDKG.
a Distribution of relation types in triplets related to anxiety and schizophrenia across PrimeKG, GENA, and MDKG. b Triplet quality evaluation across knowledge graphs by four independent human evaluators. Left: Correctness scores (box plots); Middle: Insightfulness ratings (1–3 scale, box plots); Right: Evaluation time per triplet (in seconds). Each dot represents the mean value from one evaluator based on 200 evaluated triplets. Box plots show the median (center line), interquartile range (box: 25th to 75th percentile), and whiskers extending to 1.5 times the interquartile range (IQR). Points outside this range are shown as outliers. c Coverage of triplets relevant to five mental disorders (major depressive disorder, anxiety, bipolar disorder, schizophrenia, and depression) across five knowledge graphs. d Inter-rater agreement on triplet evaluations. Kappa values and agreement rates are shown for six evaluator pairs across correctness and insightfulness judgments. e Ontological distribution of entity types in the integrated MDKG. The source data are provided as a Source Data file.
Fig. 5
Fig. 5. Predictive modeling of mental disorders using EHR features and knowledge graph embeddings.
a Workflow illustrating the integration of UK Biobank Electronic health records (EHRs) and the MDKG for mental disorder prediction. EHRs are first cleaned and preprocessed to extract non-medical factors (e.g., lifestyle, environmental exposures, family history). ICD-10 diagnoses and Phecodes are mapped to knowledge graph entities, and RDF2Vec is used to generate embeddings for the aligned medical entities. Each patient’s medical history embedding is computed by averaging these vectors. Predictive models are then trained under three input settings: (1) EHR factors only, (2) medical knowledge grpah (KG) embeddings only, and (3) a combination of both. b SHAP-based feature importance for predicting major depressive disorder (MDD) using environmental factors only (top) and using environmental factors combined with KG embeddings (bottom). Bars represent the average absolute SHAP value of each feature across all predictions. c Prediction performance (AUC) for MDD, anxiety, and bipolar disorder across different models and input feature settings. Each box plot shows results from 10-fold cross-validation for four classifiers—logistic regression (LR), random forest (RF), support vector machine (SVM), and XGBoost—under three experimental conditions: KG Embeddings Only, EHR Factors Only, and EHR + KG Embeddings. Box plots show the median (center line), interquartile range (box: 25th–75th percentile), and whiskers extending to 1.5 times the interquartile range (IQR). Each dot represents the AUC score from one cross-validation fold. Points beyond the whiskers are plotted as outliers. The source data are provided as a Source Data file.
Fig. 6
Fig. 6. LLM-powered workflows for data annotation and literature-based knowledge extraction.
a Workflow for literature-based triplet annotation using large language models (LLMs). The process begins with downloading abstracts and applying biomedical named entity recognition (e.g., BERN2, QuickUMLS). Annotated entities are used to construct transformed sentences, which are then submitted to GPT-based prompts for relation extraction. Human annotators manually review and refine the generated triplets to ensure accuracy. b Pipeline for extracting baseline characteristics from PDFs using LLM-powered question answering.

Similar articles

References

    1. Scangos, K. W., State, M. W., Miller, A. H., Baker, J. T. & Williams, L. M. New and emerging approaches to treat psychiatric disorders. Nat. Med.29, 317–333 (2023). - PMC - PubMed
    1. Vigo, D., Jones, L., Atun, R. & Thornicroft, G. The true global disease burden of mental illness: still elusive. Lancet Psychiatry9, 98–100 (2022). - PubMed
    1. Craske, M. G., Herzallah, M. M., Nusslock, R. & Patel, V. From neural circuits to communities: an integrative multidisciplinary roadmap for global mental health. Nat. Ment. Health1, 12–24 (2023).
    1. Tozzi, L. et al. Personalized brain circuit scores identify clinically distinct biotypes in depression and anxiety. Nat. Med.30, 2076–2087 (2024). - PMC - PubMed
    1. Derks, E. M., Thorp, J. G. & Gerring, Z. F. Ten challenges for clinical translation in psychiatric genetics. Nat. Genet.54, 1457–1465 (2022). - PubMed

LinkOut - more resources