Skip to content
Open access

An ontology-guided knowledge graph and retrieval-augmented LLM framework for interpretable mental health assessment

Aug 2026 · Social Network Analysis and Mining · 0 citations

TL;DR

An ontology-guided framework that integrates a Knowledge Graph, an Ontology-Informed Retrieval Classifier, and a Large Language Model for interpretable mental health detection from social media text demonstrates that the KG–ORC cross-validation gate measurably improves predictive reliability over single component baselines, and that ontology-guided, knowledge-grounded reasoning offers a principled path toward interpretable and knowledge-consistent mental health analysis from social media.

Abstract

Mental health detection from social media has gained increasing attention due to the spontaneous expression of psychological states on online platforms. However, accurate interpretation remains challenging because social media language is highly contextual, ambiguous, and often includes sarcasm, metaphors, or non-clinical expressions, which can lead to unreliable predictions. Existing approaches based on machine learning, deep learning, transformers, and large language models (LLMs) primarily rely on text-driven patterns and often lack explicit ontology-guided grounding, structured knowledge validation, and interpretability. Although LLMs improve contextual reasoning, their predictions can be inconsistent and prone to hallucination when not supported by structured domain knowledge and a unified cross-component validation mechanism. To address these limitations, this paper proposes an ontology-guided framework that integrates a Knowledge Graph (KG), an Ontology-Informed Retrieval Classifier (ORC), and a Large Language Model for interpretable mental health detection from social media text. The framework leverages the Human Phenotype Ontology (HPO) to guide symptom extraction and Knowledge Graph construction, normalizing informal linguistic expressions into ontology-grounded representations. A key design contribution is an explicit KG–ORC cross-validation consistency gate, which requires both the Knowledge Graph and the ORC module to independently reach agreement before a prediction is committed reducing erroneous inferences from either component alone. The LLM is deliberately restricted to a post-validation role, generating human-readable explanations and supportive recommendations only from validated outputs, thereby reducing hallucination risks and preserving knowledge-consistency. The proposed framework is evaluated on the Dreaddit dataset, a large-scale, multi-domain Reddit corpus for stress and mental health analysis. Empirical evaluation on the HPO guided symptom extraction confirms differential detection rates of 56.04% in stress positive posts versus 31.11% in stress negative posts, validating the signal relevance of the ontology-driven extraction. End-to-end binary classification on the held-out test split achieves an accuracy of 74.82% with an F1-score of 75.64%. Crucially, on the 66.55% of instances where the KG and ORC modules reach consensus, the consistent subset accuracy rises to 78.84% (F1 = 78.28%), compared to 63.03% for the Knowledge Graph alone. The KG–ORC agreement rate across the full test set is 82.02%. These results demonstrate that the KG–ORC cross-validation gate measurably improves predictive reliability over single component baselines, and that ontology-guided, knowledge-grounded reasoning offers a principled path toward interpretable and knowledge-consistent mental health analysis from social media.

Read PDF

Similar papers

#artificial intelligence Preprint Aug 2026

Do General NLP Embeddings Capture Ontological Reasoning?

AVA is introduced, a systematic framework for evaluating whether embeddings distinguish logic-sensitive relational semantics in ontologies and knowledge graphs, and reveals a persistent gap between linguistic representation learning and ontology-level discrimination, challenging the assumption that strong NLP benchmark...

Hamed Babaei Giglou, Jennifer D'Souza, S. Auer · 0 citations
Aug 2026

CGX: OCR-enhanced knowledge graph retrieval for explainable heart failure analysis

Initial experiments on heart-failure-focused clinical question answering show that CGX improves evidence retrieval quality and perceived answer reliability over conventional retrieval methods, while reducing total graph construction time by 69.7% under the same input corpus and hardware setting.

Dat T. Nguyen, Ngoc-Anh Thi Le, Binh T. D. Trinh et al. · 0 citations
Conference Jul 2026

OASA-KGQA: Ontology-Aware Semantic Agent for Knowledge Graph Question Answering

In order to enable natural language interaction with structured knowledge bases based on ontologies, widely used to represent knowledge in multiple complex domains, Knowledge Graph Question Answering (KGQA) systems are required. Large Language Models (LLMs) can play a pivotal role in this context, however they suffer f...

Zahra Fereidooni, M. Fanfani, G. Pantaleo et al. · 0 citations
Open access Jul 2026

A Neuro-Symbolic Knowledge Graph and Large Language Model Hybrid Architecture for Multi-Modality Mental Health Counseling

A neuro-symbolic architecture achieves near-perfect guideline-appropriate routing with a governance profile, traceability, reproducibility, machine-traceable provenance, externally validated crisis detection, and deterministic provider control aligned with requirements for regulated clinical AI.

J. Tao, N. Fenn, H. Parent et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.