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?

General-purpose NLP embedding models perform well on linguistic tasks, but their ability to capture symbolic ontological structure remains unclear. We introduce AVA, a systematic framework for evaluating whether embeddings distinguish logic-sensitive relational semantics in ontologies and knowledge graphs. AVA comprises 171,007 contrastive triplets derived from 163 heterogeneous ontologies using hierarchy inversion, relation substitution, and disjointness injection. Each triplet contains an ontology statement, a semantically equivalent paraphrase, and a logic-sensitive hard negative with contradictory relational meaning. We evaluate more than 25 state-of-the-art embedding models and find substantial limitations: the best model achieves only 0.739 triplet accuracy, while hard negative accuracy falls to 0.135. Fine-tuning improves discrimination by a large margin but transfers poorly to downstream Semantic Web tasks, including taxonomy discovery and ontology alignment. Further analysis suggests that improvements stem partly from perturbation-specific pattern recognition rather than robust ontological understanding. These findings reveal a persistent gap between linguistic representation learning and ontology-level discrimination, challenging the assumption that strong NLP benchmark performance translates to Semantic Web competence.

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 Nguyen, Anh N. 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 from factual inaccuracies, hallucinations, and difficulties in navigating complex semantic schemas. To address these limitations, this paper proposes a novel neuro-symbolic Agentic AI framework for KGQA on real-world knowledge graph. By integrating neural reasoning capabilities of LLMs with symbolic tools within a recursive flow orchestrated by LangGraph, the system is able to identify relevant terms, validate them based on specific ontology, and generate SPARQL queries for data retrieval. To demonstrate effectiveness of this approach an experimental evaluation using a real-world smart city knowledge base, implemented in the Snap4City platform, is carried out. Results indicate that the neuro-symbolic workflows improves the accuracy of information retrieval for non-expert users compared to standalone LLM solutions.

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

Background: Depression and anxiety are managed largely between clinical visits, yet outpatient care lacks scalable, accountable mechanisms for between-visit support. Large language models converse fluently but fuse clinical reasoning with language generation in one opaque process, so they cannot reliably deliver evidence-based psychotherapy and typically operate outside clinician oversight. Objective: To evaluate C-Mind, a provider-supervised neuro-symbolic system in which a Clinical Knowledge Graph (KG) governs therapeutic decisions for a large language model across eight psychotherapy modalities. Methods: Two simulation regimes addressed eight pre-specified governance questions: a structural validation of KG routing against 117 guideline-anchored vignettes, and a governance battery using progressively disclosing LLM patient agents to evaluate decision traceability, repeatability, provenance auditability, adversarial crisis-detection robustness (277 probes), provider treatment-goal governance, and counselor technique adherence. Crisis detection was additionally validated externally against an independent, clinician-annotated corpus (CRADLE Bench). Results: The KG routed 116/117 vignettes (99.1%) to guideline-appropriate care and detected all 18 high-risk presentations, firing a therapy-suppressing hard halt on 16/18. Adversarial crisis-detection sensitivity was 96.7% and specificity 95.4% (277 probes); on external validation, the system detected 98.5% of 600 dialogues with ongoing suicidal ideation or self-harm at or before the annotator confirming turn. Decisions were 99.1% repeatable, 100% reconstructable per turn, and 100% provenance-auditable across all 354 KG nodes. Provider-set diagnosis, goals, and safety context governed behavior deterministically. Stripped of governance, the same model produced unsolicited clinical monologues on 100% of turns (vs 9% governed) and delivered diagnoses and medication advice the governed system never produced. Conclusions: 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
Preprint Aug 2026

ANCHOR-RE: An Agentic Neuro-Symbolic Framework for Grounded Biomedical Relation Extraction

Biomedical relation extraction (BioRE) extracts structured knowledge from biomedical literature for applications such as knowledge base construction and hypothesis generation. Traditional symbolic systems such as SemRep provide high precision but limited recall, while large language models (LLMs) offer stronger contextual reasoning but remain prone to false-positive predictions. We developed ANCHOR-RE, a framework that integrates ontology-guided reasoning, external knowledge grounding, and data-driven verification rules into LLM inference. We evaluated it on three BioRE benchmarks (SemRepGS, DDI, and ChemProt) using both proprietary and open-weight LLMs. To assess generalizability beyond benchmark datasets while reducing potential evaluation bias from LLM pretraining contamination, we conducted a temporal evaluation using 100 biomedical articles published in 2026. With the proprietary backbone, ANCHOR-RE outperformed direct LLM prompting, improving micro-F1 from 0.654 to 0.676 on SemRepGS, from 0.769 to 0.872 on DDI, and from 0.939 to 0.941 on ChemProt. On DDI and ChemProt, it also outperformed previously reported inference-only methods and approached fine-tuned or instruction-tuned systems without parameter updates. Similar performance gains observed with open-weight LLMs indicate that the benefits were not limited to the proprietary backbone. On the post-cutoff set, manual assessment of 500 randomly sampled predictions yielded a precision of 69%, maintaining consistent precision on previously unseen biomedical literature. Neuro-symbolic reasoning can improve the reliability of LLM-based BioRE without fine-tuning. Results across multiple benchmarks, model families, and post-cutoff literature support ANCHOR-RE as a practical training-free approach to biomedical literature mining.

Shufan Ming, Yikun Han, Gibong Hong 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.