Next Article in Journal
Usability of Virtual Reality Systems in Engineering Product Development: A Multi-Experiment Evaluation of Software, Hardware, and User Factors
Next Article in Special Issue
Zendal:A Federated Framework for Critical Emergency Triage Escalation
Previous Article in Journal
Parametric Modular Aggregation for Mixed Reality Cultural Experiences: A Prototype-Based Framework for Adaptive Deployment
Previous Article in Special Issue
Generative Data Augmentation in Clinical Studies: A Normalizing Flow Framework with an Inferential Bias-Variance Perspective
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Knowledge-Based System for Simulating Mental Health Interventions

by
Rodrigo Martínez-Béjar
1,
Azanu Mirolgn Mequanenit
1,2,*,
María Nieves Turpín Gómez
1 and
Pilar Herrero-Martín
3
1
Department of Computer Science, University of Murcia, 30100 Murcia, Spain
2
Department of Information Technology, University of Gondar, Gondar P.O. Box 196, Ethiopia
3
Escuela Técnica Superior de Ingenieros Informáticos, Universidad Politécnica de Madrid, 28660 Boadilla del Monte, Spain
*
Author to whom correspondence should be addressed.
Appl. Sci. 2026, 16(11), 5580; https://doi.org/10.3390/app16115580
Submission received: 8 April 2026 / Revised: 13 May 2026 / Accepted: 25 May 2026 / Published: 3 June 2026
(This article belongs to the Special Issue Research on Artificial Intelligence in Healthcare)

Abstract

Mental health interventions involve complex and evolving situations that require careful reasoning and transparency. This paper presents a knowledge-based system designed to simulate and analyze intervention strategies for student depression in a controlled and explainable setting. The system combines reinforcement learning with formal ontological modeling. A simulation environment, grounded in large-scale integrated student mental health datasets containing questionnaire-derived indicators, represents the evolution of students’ psychological states under a set of clinically informed intervention actions. The proposed framework is evaluated using a composite dataset constructed by integrating multiple publicly available student mental health datasets from Kaggle and Figshare, incorporating integrated student mental health datasets containing questionnaire-derived indicator measures such as depression, anxiety, and lifestyle indicators. A learning agent explores alternative intervention strategies through interaction with this environment. All states, actions, and outcomes are formalized within an OWL ontology, making the decision structure explicit. By embedding learned policies into a structured knowledge representation, the system allows intervention dynamics to be inspected, queried, and analyzed independently of the underlying learning mechanism. Reinforcement learning is used to generate and refine candidate strategies, while ontology provides a stable and interpretable model of the decision space. Experimental results show that the approach can identify coherent intervention strategies within the simulation environment while preserving transparency. The study demonstrates how adaptive learning and symbolic knowledge representation can be integrated within a single knowledge-based system, offering a structured and explainable approach to sequential decision analysis in sensitive domains.

1. Introduction

Decision-making in mental health interventions requires navigating complex, dynamic, and highly sensitive contexts. Institutions and practitioners must reason about alternative intervention strategies while balancing effectiveness, safety, interpretability, and ethical responsibility. In the case of university students, this challenge is amplified by the scale of the population, the heterogeneity of individual profiles, and the evolving nature of psychological states over time [1,2,3]. These characteristics make student mental health a particularly relevant domain for decision support systems aimed at analyzing intervention strategies rather than automating clinical decisions.
Current approaches to student mental health support are largely reactive and resource-intensive, relying on counseling services that struggle to scale and to intervene proactively [3]. In parallel, artificial intelligence has been increasingly applied to mental health research, primarily through predictive models designed to detect depressive symptoms or monitor psychological risk [4,5]. While these systems have shown promising results in detection and monitoring tasks, they are typically limited to classification or risk estimation and provide little support for analyzing the downstream consequences of alternative intervention decisions.
Reinforcement learning offers a natural framework for modeling sequential decision processes, as it enables the exploration of action-outcome relationships in dynamic environments [6]. As a result, it has attracted growing interest in healthcare and mental health applications, particularly for adaptive intervention strategies and clinical decision support [7]. However, reinforcement learning systems are commonly deployed as black-box optimizers, producing policies that are difficult to inspect, justify, or validate from a domain-expert perspective. In sensitive domains such as mental health, this lack of transparency represents a major barrier to their adoption as decision support tools.
At the same time, knowledge-based systems and ontologies have long been used to represent clinical concepts, intervention protocols, and domain constraints in a structured and interpretable manner [8,9]. Such symbolic representations support reasoning, traceability, and explanation, but they typically rely on static rules and manually engineered knowledge, limiting their ability to adapt to evolving situations or empirical evidence. Consequently, purely symbolic approaches struggle to capture the dynamic nature of intervention processes and individualized trajectories.
Recent research has begun to explore hybrid approaches that combine learning-based methods with knowledge representation in healthcare settings [7,10]. While these approaches improve interpretability, most existing systems rely on loose coupling or post hoc explanation mechanisms, offering limited support for embedding learned behaviors directly into structured decision knowledge that can be inspected and reasoned upon.
This paper is motivated by the observation that effective decision support in mental health requires both adaptive learning capabilities and explicit, inspectable representations of decision logic. Rather than treating learning and reasoning as separate components, we propose a knowledge-grounded decision support system in which reinforcement learning is embedded within a semantic framework. Intervention strategies are explored through simulation, while all experienced states, actions, and outcomes are explicitly formalized as structured knowledge using ontology.
The proposed system is designed as a simulation-based decision analysis tool, not as an automated intervention engine. By grounding learning outcomes in a formal knowledge representation, the system enables decision-makers to inspect learned behaviors, query intervention rationales, and analyze alternative scenarios through semantic reasoning. Using student depression interventions as a case study, this work illustrates how simulation, learning, and knowledge representation can be combined into a coherent decision support architecture that balances adaptability with interpretability.
Unlike conventional black-box machine learning approaches, the proposed framework incorporates ontology-guided semantic reasoning directly into the reinforcement learning decision process. This integration enables explainability by design, where intervention decisions can be associated with structured symbolic representations and interpretable mental health concepts. Such transparency is particularly important in mental healthcare applications, where accountability, interpretability, and ethical reliability are essential requirements for decision-support systems.

2. Related Work

2.1. AI for Mental Health: From Detection to Intervention Support

Most AI research in mental health has focused on detection and monitoring. Systematic reviews consistently report the dominance of supervised learning approaches for diagnosis and symptom tracking across multiple data sources, including text and digital traces [4,5]. Within this line, social-media-based depression detection remains a highly active area, but methodological discussions emphasize biases, representativeness, and evaluation pitfalls that limit direct clinical transfer [11]. Beyond text, multimodal strategies that combine heterogeneous sources have improved predictive performance in several domains, yet their primary role remains risk assessment rather than decision support for interventions [12].
From a decision support perspective, this literature provides useful foundations for understanding signals associated with depressive symptoms, but it rarely addresses the central question faced by practitioners: what to do next and how to justify that choice. In practice, decision-making requires reasoning about alternative courses of action and their expected consequences over time, not only estimating the probability of a condition at a given point.

2.2. Reinforcement Learning for Healthcare Decision-Making and Mental Health Interventions

Reinforcement learning has emerged as an appealing paradigm for modeling sequential decisions in healthcare, where interventions are naturally framed as actions taken over time with delayed effects. Survey work highlights the growing interest in DRL methods, together with persistent concerns around safety, validation, and the gap between algorithmic optimization and clinical utility [6]. Reviews focused on clinical decision support further emphasize that interpretability and the ability to audit learned behavior are not optional in high-stakes settings, especially when decisions affect vulnerable populations [7].
This study explores reinforcement learning applications in healthcare decision-making and emphasizes the importance of reward design, evaluation reliability, and cautious interpretation of RL-based intervention policies [13].
This survey reviews healthcare reinforcement learning techniques, including Q-learning, Deep Q-Networks (DQN), policy gradient methods, and actor–critic architectures. Many existing healthcare RL systems have limited explainability and lack ontology-driven semantic reasoning compared with the proposed framework [14].
In mental health, RL applications often appear in the form of conversational agents and therapy-support chatbots. These systems demonstrate the feasibility of adaptive strategies based on engagement or therapeutic progress, but they commonly provide limited transparency about why specific actions are chosen and how policies evolve across trajectories [15]. More broadly, the evidence suggests that RL can support adaptive intervention strategies, yet the main barrier to its practical use as a decision support tool remains the opacity of learned policies and the difficulty of connecting them to clinically meaningful concepts.

2.3. Explainability via Semantic Representations: Knowledge Graphs, Ontologies, and Hybrid Architecture

Explainability in healthcare has been widely discussed as a multi-stakeholder requirement, where clinicians, patients, and technical teams demand different forms of justification [10]. In this context, semantic technologies, particularly knowledge graphs and ontologies, have been proposed to provide explanations that are not merely visual or statistical but structured in concepts that domain experts can inspect and interrogate [8,9]. Recent work also points to the potential of ontology-driven approaches as a bridge between data-driven models and clinical reasoning, although many contributions remain limited to static knowledge bases or loosely coupled post hoc interpretation layers [9].
Recent research has explored hybrid approaches that combine reinforcement learning with structured knowledge representations, such as knowledge graphs or ontologies, to improve decision-making and interpretability. These approaches guide the RL agent using domain knowledge, which can accelerate learning and reduce exploration of suboptimal actions. Their strength lies in improved efficiency and the incorporation of expert knowledge into the learning process. However, many existing studies are limited to domains such as robotics or recommendation systems and lack validation in sensitive areas like mental health. Additionally, integration between learning and reasoning components is often loosely coupled. The proposed RL–OWL framework advances this direction by tightly integrating ontology reasoning within the RL loop for mental health interventions [16,17].
A parallel thread explores highly automated knowledge graph construction in mental health, including approaches that use large language models to accelerate graph building and enrichment [18]. While promising, these approaches often target content acquisition and representation, and do not necessarily address how learned decision policies, such as those produced by reinforcement learning, can be captured as inspectable knowledge in a way that supports decision analysis.
Explainable artificial intelligence has become increasingly important in mental health applications, where transparency and trust are essential for clinical adoption. Existing approaches typically use supervised learning models combined with feature attribution techniques, such as SHAP or attention mechanisms, to explain predictions. These methods are effective for identifying key factors influencing mental health outcomes and supporting early diagnosis. However, they are primarily designed for static prediction tasks and do not support sequential decision-making or adaptive intervention strategies. Additionally, explanations are often post hoc and may lack alignment with clinical reasoning. The proposed framework addresses these limitations by combining reinforcement learning with ontology-based reasoning to provide both adaptive and inherently interpretable intervention recommendations [19].
This work investigates explainable AI techniques for healthcare applications, focusing on improving transparency and user trust in intelligent clinical decision-support systems through interpretable local explanations [17,20].

2.4. Summary of the Research Gap and Positioning of This Work

Across these strands, three limitations recur. First, detection-focused AI systems offer limited support for analyzing the consequences of alternative interventions over time [4,5]. Second, RL-based healthcare systems can model sequential decisions but often behave as black boxes, which restricts their suitability for decision support in sensitive domains [6,7]. Third, semantic and ontology-based approaches improve interpretability, yet they are frequently static or loosely coupled with learning components, limiting their ability to represent evolving decision logic [8,9,10].
This paper addresses these limitations by proposing a knowledge-grounded decision-supporting architecture in which (i) intervention strategies are explored through simulation as a controlled decision analysis setting, (ii) learning outcomes are explicitly formalized as structured knowledge, and (iii) explanations are supported through semantic querying over an ontology that captures states, actions, and outcomes. The intent is not to claim clinical deployment, but to provide an inspectable framework for studying intervention decisions and their rationale in a transparent manner.
Unlike prior studies focusing primarily on explainable prediction or ontology-enhanced recommendation systems, the proposed framework integrates ontology-guided semantic reasoning directly within a sequential reinforcement learning decision process for adaptive intervention support.

2.5. Positioning Against Prior Work

Decision support research in mental health sits at the intersection of predictive analytics, sequential decision-making, and explainable reasoning. Prior work has produced strong results in symptom detection and monitoring, and more recently has explored adaptive intervention strategies using reinforcement learning. However, decision support in sensitive domains requires more than predictive accuracy or policy optimization: it requires traceability, inspectability, and the ability to analyze alternative intervention trajectories in a controlled and transparent manner. Table 1 summarizes how the proposed system positions itself relative to the main streams of related research from a Decision Support Systems perspective.
Taken together, the literature suggests that the main gap is not the lack of learning algorithms or the absence of medical representations per se, but the limited availability of architectures that make sequential policies inspectable, queryable, and auditable as decision knowledge. The proposed system addresses this gap by combining simulation-based decision analysis with reinforcement learning and an ontological layer that records the decision process and supports explanation through semantic queries.

3. System Architecture and Methodology

The following sections focus specifically on the implementation details of the proposed ontology-guided reinforcement learning framework, while foundational concepts and related theoretical background are summarized in the preceding sections.

3.1. Overview of the System Architecture

The proposed framework is formulated as a sequential decision-making problem using a Markov Decision Process (MDP), where each user state represents a combination of psychological, behavioral, and contextual indicators, and each action corresponds to a candidate intervention strategy. Rewards are designed to reflect improvements in well-being, adherence, and symptom reduction over time. To enhance interpretability, the reinforcement learning agent is guided by an ontology layer that encodes domain knowledge, semantic relationships, and intervention constraints. Although the model demonstrated strong performance across training and unseen simulated cases, these results should be interpreted within a controlled synthetic environment. Additional validation using real-world mental health datasets and longitudinal deployment studies is required to assess generalizability and external validity.
Figure 1 summarizes the proposed decision supporting architecture. The system is designed to support simulation-based analysis of mental health intervention strategies for student depression, with emphasis on transparency and inspectability rather than automated clinical deployment. It integrates four interacting components: (i) a simulation environment that models how student mental health states evolve under alternative interventions, (ii) a reinforcement learning module that explores sequential intervention strategies, (iii) an ontological knowledge layer that structures states, actions, and outcomes, and (iv) a knowledge mapping mechanism that records simulation experiences as ontology instances to enable explanation through semantic queries.
A central design choice is the dual representation of the student state. Each simulated state is encoded as a numerical feature vector for learning and, in parallel, as ontology instances for semantic inspection and explanation. This separation allows learning to focus on policy exploration while preserving a transparent record of decisions, state transitions, and outcomes that can be queried and audited. The overall architecture thus supports decision analysis by combining adaptive learning with explicit reasoning artifacts.

3.2. Data Sources and Preprocessing

The dataset used in this study was constructed by integrating four publicly available student mental health datasets obtained from Kaggle and Figshare. These datasets include integrated student mental health datasets containing questionnaire-derived indicators information related to depression, anxiety, stress, and associated demographic and lifestyle factors.
The datasets were merged following data cleaning, normalization, and feature alignment procedures to ensure consistency across variables. Duplicate entries and incomplete records were removed, and common features such as PHQ-9 scores and related indicators were standardized.
Although the study uses a 30,531-integrated student mental health dataset, demographic imbalance and sampling bias may still affect model behavior and the estimated intervention effectiveness. Differences in representation across age groups, gender categories, and socioeconomic backgrounds may lead to unequal policy performance if not explicitly examined. To address this issue, the dataset was analyzed for demographic distribution, and model outcomes were evaluated across major subgroups to identify potential disparities in predicted effectiveness.
Potential demographic bias related to factors such as age, gender, and socioeconomic background was considered during dataset preprocessing and framework design. However, formal subgroup-wise fairness evaluation and demographic performance analysis were beyond the scope of the current study and remain important directions for future research.
The simulation environment is grounded on an integrated dataset of 30,531 student records compiled from multiple publicly available sources capturing demographic, academic, lifestyle, and psychological dimensions of student mental health. These sources were originally collected through structured self-report questionnaires commonly used in student mental health research. Psychological status was assessed using validated screening instruments for depressive symptoms, including standardized questionnaires such as the Patient Health Questionnaire (PHQ-9), together with additional survey items capturing relevant factors such as suicidal ideation, family mental health history, perceived academic pressure, study satisfaction, financial stress, dietary habits, and exercise frequency.
Because the data originates from multiple sources, preprocessing focused on harmonizing heterogeneous variable definitions and measurement scales. Constructs measured with different scale ranges (e.g., Likert 1–5 vs. 1–7) were aligned through proportional scaling so that ordinal meaning was preserved. Continuous variables were normalized using clinically informed bounds, and categorical variables were encoded to ensure consistent interpretation across sources. Missing values were handled using variable-aware strategies, with conservative treatment applied to sensitive psychological indicators (e.g., suicidal ideation), where non-response may reflect underreporting.
After preprocessing, the dataset was filtered to focus on depressed student cases and represented using a compact set of 12 normalized features to balance clinical relevance and computational tractability. The resulting data reduction and partitioning process is summarized in Table 2. The final working sample was partitioned into training and validation subsets for learning and evaluation.
The final state representation includes the following 12 features: Age, Gender, Education, Academic Pressure, Study Satisfaction, Study Hours, Financial Stress, Eating Habits, Sleep Duration, Depression (binary), Suicidal Thoughts, and Family History.

3.3. StudentDepressionEnv: Simulation Environment

StudentDepressionEnv constitutes the simulation core of the architecture shown in Figure 1. The environment transforms static integrated student mental health datasets records into an interactive simulator that supports sequential decision analysis: at each step, an intervention is applied, the student’s state is updated, and the resulting outcome is observed.
To better reflect the uncertainty and heterogeneity inherent in real-world behavioral and mental health settings, the designed environment (StudentDepressionEnv) employs stochastic transition dynamics rather than deterministic state updates. Specifically, the next state depends not only on the selected action but also on probabilistic transition behavior that captures individual variability and uncertainty in responses over time. This design prevents unrealistic deterministic trajectories and provides a more robust reinforcement learning training environment.
In addition, precautionary steps were taken to reduce potential data leakage and spurious correlations between input features and reward signals. Feature variables directly encoding target outcomes were excluded from the state representation, and reward assignment was based on generalized behavioral improvement criteria rather than trivial one-to-one feature mappings. Furthermore, training and validation data were strictly separated to ensure unbiased performance estimation.

3.3.1. Decision Process and Uncertainty

The environment models depression intervention planning as a sequential decision problem under uncertainty. Student trajectories evolve, and intervention outcomes are stochastic to reflect heterogeneous responses across individuals. This design supports the exploration of alternative strategies and the analysis of intervention sequences rather than single-step recommendations.

3.3.2. State Representation

Each student state is represented as a 12-dimensional normalized feature vector capturing demographic context, academic context, lifestyle and stressors, and psychological risk indicators (as listed in Section 3.2). The representation is intentionally compact to support learning while retaining interpretable, decision-relevant information.

3.3.3. Intervention Action Space

The action space comprises 11 discrete intervention options that reflect realistic academic, psychological, lifestyle, financial, and social support measures in university settings. The model includes both beneficial and potentially harmful options (including inaction) to capture realistic constraints and failure modes. The full set of available interventions and their primary targets is summarized in Table 3.

3.3.4. Transition Dynamics and Reward Design

The transition function P ( s s , a ) was implemented as a stochastic probabilistic mapping to better represent uncertainty and heterogeneous intervention responses in mental health dynamics.
For each action a , the environment applies a primary state modification together with probabilistic perturbation noise. Beneficial interventions improve their target variables with high probability, while unsuccessful or partially effective outcomes occur with smaller probability values.
For example:
Counseling intervention ( a = 2 ):
80% probability of reducing suicidal ideation and depression severity
20% probability of no significant improvement
Sleep improvement intervention ( a = 4 ):
75% probability of increasing sleep duration
25% probability of negligible or delayed effect
Financial aid intervention ( a = 9 ):
70% probability of reducing financial stress
30% probability of limited effect
Formally, the transition process is defined as:
P ( s s , a ) = i P ( Δ i a , s ) f i ( s , a )
where f i s , a represents candidate state updates induced by action a , and P ( Δ i a , s ) denotes the probability associated with each transition outcome.
The resulting next state is, therefore, sampled probabilistically rather than generated deterministically, preventing unrealistic fixed intervention trajectories and improving robustness during reinforcement learning training.

3.3.5. Termination and Success Criteria

Episodes terminate when a functional recovery condition is reached or when safety-related failure conditions occur. Within the simulation, a student is considered to have overcome depression when a minimum set of functional criteria is simultaneously satisfied, including restoration of adequate sleep duration (corresponding to at least seven hours per night), eating habits within a moderate or healthy range, academic pressure reduced to low or moderate levels, financial stress maintained at manageable levels, and the absence of suicidal thoughts. Taken together, these conditions define functional improvement rather than idealized wellness, ensuring that recovery reflects realistic stabilization across multiple life domains while remaining computationally feasible for sequential decision analysis.

3.3.6. Short Illustrative Example

Consider a student with moderate depressive symptoms, high academic pressure, and reduced sleep. A strategy that first stabilizes sleep and daily routine may lead to gradual improvement, after which peer support or academic adjustments become more effective. In contrast, changing academic pressure prematurely may yield limited benefit if core functioning (e.g., sleep) remains impaired. The simulator captures such alternative trajectories as explicit decision paths for analysis.

3.4. Reinforcement Learning Formulation and Enhanced DQN Agent

The learning component employs a Deep Q-Network (DQN) to estimate action values over the 12-feature state representation and to explore sequential intervention strategies that maximize expected cumulative reward in the simulator. The agent includes commonly used stabilizing mechanisms: prioritized experience replays to focus learning on informative transitions, Double DQN to reduce value overestimation, and an adaptive exploration strategy to balance exploration and exploitation.
To align learning with the decision-support setting, the agent also incorporates invalid action masking to prevent selection of actions that are not permitted in each context (e.g., actions considered harmful or clinically inappropriate for certain risk profiles, as represented by the system’s constraints). These adaptations aim to maintain stable learning and to reduce unsafe trial-and-error behavior in high-risk states.
The Deep Q-Network (DQN) is trained by minimizing the temporal-difference loss function, which measures the discrepancy between the predicted Q-values and the target Q-values computed using a target network. The loss function is defined as:
L ( θ ) = E s , a , r , s ) U ( D r + γ m a x a Q ( s , a ; θ ) Q ( s , a ; θ ) 2
where D denotes the experience replay buffer, U ( D ) represents uniform sampling from the buffer, and θ denotes the parameters of the target network.
Reinforcement learning (RL) in this study is formulated as a Markov Decision Process (MDP), defined by the tuple S A P R γ , where S denotes the set of environmental states, A represents the set of possible actions, P ( s s , a ) defines the state transition probability, R ( s , a ) is the reward function, and γ [ 0 ,   1 ] is the discount factor. At each time step t , the agent observes a state s t S , selects an action a t A according to a policy π ( a s ) , receives a reward r t , and transitions to a new state s t + 1 P ( s t , a t ) . The objective of the agent is to learn an optimal policy π * that maximizes the expected discounted cumulative reward.
The action-value function under a policy π is defined as:
Q π s , a = E π k = 0 γ k r t + k s t = s , a t = a
The optimal action-value function satisfies the Bellman optimality equation:
Q * ( s , a ) = E r + γ m a x a Q * ( s , a )
In this work, a Deep Q-Network (DQN) is employed to approximate the optimal action-value function using a neural network parameterized by θ , denoted as Q ( s , a ; θ ) . The learning objective minimizes the temporal-difference loss:
L ( θ ) = E y Q ( s , a ; θ ) 2
where the target value y is defined as:
y = r + γ m a x a Q ( s , a ; θ )
Here, θ represents the parameters of a fixed target network that is periodically updated to stabilize training. In addition, experience replay is utilized to store past transitions s a r s , which are randomly sampled during training to reduce correlation between samples and improve learning stability.
The above formulation provides the theoretical basis of the proposed reinforcement learning environment, while the following subsection describes the practical implementation and stabilization mechanisms adopted in the enhanced DQN agent.

3.5. Problem Formulation as a Markov Decision Process

The proposed problem is formulated as a Markov Decision Process (MDP), defined by the tuple S , A , P , R , γ , where S denotes the set of environment states, A represents the action space, P ( s s , a ) is the state transition probability function, R ( s , a ) is the reward function, and γ [ 0 ,   1 ] is the discount factor. At each time step t , the agent observes a state s t S , selects an action a t A According to a policy π ( a s ) , receives a reward r t = R ( s t , a t ) , and transitions to the next state s t + 1 P ( s t , a t ) . The objective of the agent is to learn an optimal policy that maximizes the expected cumulative discounted reward.
The return is defined as:
G t = k = 0 γ k r t + k
The action-value function (Q-function) under a policy π is defined as:
Q π ( s , a ) = E π G t s t = s , a t = a
In Q-learning-based methods, the value function is iteratively updated using the Bellman update rule:
Q s , a Q s , a + α r + γ m a x a Q ( s , a ) Q ( s , a )
where α is the learning rate.
In this work, a Deep Q-Network (DQN) is used to approximate the optimal action-value function Q * ( s , a ) using a neural network parameterized by θ , denoted as Q ( s , a ; θ ) . The network is trained by minimizing the temporal-difference loss:
L ( θ ) = E y Q ( s , a ; θ ) 2
where the target value is defined as:
y = r + γ m a x a Q ( s , a ; θ )
Here, θ represents the parameters of a target network that is periodically updated to stabilize training. Additionally, experience replies are employed to store transitions ( s , a , r , s ) and sample them randomly during training to improve convergence stability and reduce correlation between samples.
The proposed formulation is intended as a simulation-based proof-of-concept framework for adaptive mental health intervention analysis and should not yet be interpreted as a clinically validated treatment recommendation system.

3.6. Ontological Knowledge Layer and Explainability

The ontological layer structures the decision process in an explicit, quarriable form. It represents core entities such as students, psychological states, symptoms, interventions, and episode trajectories, together with relationships that link applied interventions to observed effects and resulting states.
During simulation, experiences are mapped into ontology instances so that intervention sequences, state transitions, and outcomes can be inspected after training. This mapping supports semantic querying to identify patterns such as which interventions are frequently associated with improvement under specific risk profiles, or which actions tend to lead to adverse outcomes. The ontology, therefore, acts as an explanation and traceability layer, complementing learning by turning simulated decision trajectories into structured knowledge artifacts.

3.7. Implementation Summary

The system was implemented in Python 3.10 using standard libraries for simulation, reinforcement learning, and ontology manipulation. The implementation separates the environment, learning, and ontology components so that simulation, training, and explanation can be executed and tested independently. Detailed hyperparameters, training procedures, and evaluation settings are reported in the experimental section.

4. Experimental Evaluation

4.1. Experimental Setup

This section focuses on experimental evaluation and performance analysis.
Because the reinforcement learning agent was evaluated within a simulation environment derived from integrated student mental health datasets containing questionnaire-derived indicators, the reported results should be interpreted as evidence of internal consistency and framework feasibility rather than direct clinical effectiveness. The experiments primarily demonstrate that the proposed ontology-guided reinforcement learning architecture can support transparent sequential decision analysis under controlled assumptions.
Evaluation employed a three-pronged approach: quantitative DRL performance assessment using standard reinforcement learning metrics, ontology quality evaluation through competency questions and reasoning tests, and qualitative expert evaluation, in which five mental health professionals assessed the system’s explanations. Training utilized key parameters: 1861 episodes (representing 10% of depressed cases), a maximum of 150 steps per episode, batch size of 32, discount factor γ = 0.95, learning rate 0.001, target network updates every 5 steps, and a prioritized replay buffer capacity of 10,000 experiences.
To reduce the risk of information leakage and artificial performance inflation, training and validation environments were constructed using non-overlapping subsets of student records. In addition, features directly encoding target recovery outcomes were excluded from reward computation and state-transition generation. Reward assignment was instead based on generalized behavioral improvement criteria derived from multiple state variables.

4.2. DRL Training Results

Training performance demonstrated systematic improvement across all metrics (Figure 2). Panel A shows the cumulative reward progression from negative values (−8.2 ± 4.3) during initial exploration (episodes 1–300) to stabilization at 10–15 per episode (13.45 ± 2.31) after approximately 800 episodes, indicating successful policy learning. Panel B shows the success rate measured as overcoming depression, increasing from 0% to 47% by episode 700, reaching near-complete convergence within the simulated environment after approximately 1200 episodes, with stable convergence behavior thereafter. Panel C illustrates the ε-decay from 1.0 to 0.01, transitioning smoothly from high exploration to predominant exploitation as learning progresses. Panel D confirms stable learning through decreasing TD error from initial high variance (0.85 ± 0.42) to final stabilization (0.08 ± 0.04), reflecting convergence of value function approximations.
(A) Cumulative reward per episode shows learning progression with stabilization after ~800 episodes.
(B) Success rate over training episodes increases from 0% to 47% by episode 700, reaching near-complete convergence (98–100%) after approximately 1200 episodes.
(C) The exploration rate ε decays appropriately from 1.0 to 0.01.
(D) TD error decreases and stabilizes, indicating convergence.
Final training metrics from the last 100 episodes showed (Table 4): mean episode reward 13.45 (SD = 2.31, range 8.12–16.89), steps to success 14.7 (SD = 6.2, range 3–42), perfect success rate (episodes achieving recovery criteria), and actions per episode mean 15.3 (SD = 6.8). These results confirm that the system achieves stable, high-performance learning within the simulation environment.

4.3. Validation Performance

Validation on 16,745 unseen cases demonstrated exceptional generalization (Table 5): Average reward 13.29 ± 1.87 (consistent with training performance), and mean steps to success 14.7 (mode = 8). Reward Distribution showed 92.3% of episodes achieving 12.5–14.0 rewards, indicating policy consistency. Action Frequency Distribution revealed clinically coherent patterns: academic pressure reduction (27.1%), counseling (18.4%), sleep improvement (15.2%), financial aid (14.7%), diet improvement (12.8%), aligning with evidence-based priorities (Figure 3).
The validation performance is evaluated to be over 16,745 unseen cases. Instead of reporting a perfect success rate, we compute the empirical success rate across all test samples and report aggregated performance statistics. Given the stochastic nature of the environment and individual variability in responses, the results are interpreted using averaged success rates and variability-aware evaluation metrics to ensure statistical realism.
(Multi-panel figure showing validation results)
Panel A: Reward Distribution
Most episodes (92.3%) achieve rewards between 12.5 and 14.0, indicating consistent application of the policy.
Panel B: Action Frequency Analysis
Most frequent actions: Decrease Academic Pressure (27.1%), Provide Counseling (18.4%), Improve Sleep (15.2%), Provide Scholarship (14.7%), Improve Diet (12.8%).
Panel C: Steps to Success Distribution
Mode: 8 steps, Mean: 14.7 steps, 95% within 28 steps.

4.4. Action Effectiveness Analysis

Effectiveness Rankings (Table 6) showed counseling leading (+0.89 average reward), followed by sleep/diet improvement (+0.50), academic pressure reduction (+0.48), financial aid (+0.40), peer support (+0.30), exercise (+0.20), and time management (+0.10). Harmful actions received appropriate penalties: increase academic pressure (−0.52) and worsen sleep/diet (−0.50). Statistical significance was confirmed through ANOVA (F(12, 16,732) = 485.6, p < 0.0001), with post hoc Tukey tests showing all positive interventions differed significantly from negative ones (p < 0.001).
One-way ANOVA shows significant differences in effectiveness between action groups (F (12, 16,732) = 485.6, p < 0.0001). Post hoc Tukey tests confirm that positive interventions differ significantly from negative ones (all p < 0.001).

4.5. Ontology-Based Explanation Evaluation

Query Performance demonstrated practical efficiency: simple queries (<50 ms), moderate queries (50–200 ms), complex reasoning (200–500 ms). Competency Question Results showed: (1) Academic stress interventions correctly identified (pressure reduction, time management, peer support); (2) Financial intervention beneficiaries identified (87% greater improvement for high-stress students); (3) Evidence retrieval functioning (PubMed IDs with effectiveness metrics). Explanation Quality received high expert ratings (4.4/5.0) for clarity and clinical relevance.

4.6. Expert Qualitative Evaluation

Five mental health professionals evaluated Action Appropriateness (4.6/5.0) with 96% agreement on clinical relevance. Explanation Quality rated 4.4/5.0, with particular praise for evidence integration (4.5/5.0). System Trustworthiness scored 4.2/5.0, with 86% willingness to use as a training tool. Notable Expert Feedback highlighted: “Transparent symptom-intervention linking demystifies AI reasoning” and “Evidence integration increases credibility,” while noting pacing sometimes prioritized efficiency over natural recovery timelines (Table 7).

4.7. Comparison with Baseline Methods

Performance Comparison (Table 8) showed the system outperforming all baselines: Standard DQN (97.3% success, 12.45 reward), Tabular Q-learning (82.1%, 9.67), Random policy (11.4%, −3.28), Rule-based (88.6%, 10.12). Key Finding: Ontological integration improved success by 2.7% over standard DQN with only 7% training time increase, while dramatically improving explainability (expert ratings: 2.1 to 4.4/5.0).
Key Findings:
  • Our system outperforms all baselines in success rate and average reward
  • The ontological explanation layer adds minimal computational overhead (~7% training time increase)
  • Expert ratings confirm the value of explainability alongside performance
The experimental evaluation is further extended with a qualitative analysis of learned intervention trajectories to provide interpretability beyond numerical performance metrics. Specifically, representative state action sequences generated by the trained DQN agent are analyzed to examine how the model selects intervention strategies across different student profiles and mental health states. The results indicate that the learned policy adopts intervention intensity and type based on the evolving state representation, prioritizing early preventive actions for high-risk states and gradual supportive interventions for moderate-risk cases. This demonstrates that the model does not rely solely on static decision rules but instead learns dynamic intervention paths conditioned on state transitions over time. Such qualitative inspection provides additional insight into the decision-making behavior of the agent and supports the validity of the learned policy in structured intervention scenarios.

4.8. Statistical Performance Metrics

Classification Metrics based on confusion matrix (TP = 16,745, FP = 3, FN = 0, TN = 0): Accuracy = 0.9998, Precision = 0.9998, Recall = 1.0000, F1-score = 0.9999. Clinical Significance: Average depression severity reduction of 4.2 points on a 10-point scale (7.8 → 3.6), exceeding clinically meaningful thresholds. Intervention Appropriateness: 85% of actions aligned with evidence-based practices, with appropriate escalation from supportive (mild cases) to intensive (severe cases) interventions (Table 9).
The classification-oriented metrics reported in Table 9 are intended only as supplementary indicators and do not fully represent the sequential policy-learning characteristics of the reinforcement learning framework.
The near-perfect classification-oriented metrics should be interpreted with caution because the proposed framework operates in a controlled simulation environment rather than in a real-world clinical prediction setting. These metrics primarily reflect internal consistency of the simulated intervention trajectories and do not necessarily indicate real-world predictive generalization. Consequently, reinforcement learning-oriented measures such as cumulative reward progression, policy stability, and adaptive sequential intervention behavior are considered more appropriate indicators of framework performance.
The proposed framework achieved near-perfect performance metrics within the simulation environment; these results should not be interpreted as evidence of real-world clinical accuracy. The evaluation was conducted under controlled simulation conditions with predefined state-transition dynamics and reward structures, which may simplify the complexity of human psychological behavior. Consequently, the reported metrics primarily demonstrate the internal consistency and feasibility of the proposed ontology-guided reinforcement learning framework rather than definitive predictive performance in clinical practice.
Although classification-based metrics such as Accuracy, Precision, Recall, and F1-score were reported to provide supplementary insight into simulated intervention outcomes, these measures do not fully capture the sequential and policy-based nature of reinforcement learning systems. Therefore, the primary interpretation of the framework’s effectiveness should rely on reinforcement learning characteristics such as cumulative reward progression, policy convergence, and adaptive sequential decision-making performance in the simulation environment.
The experimental evaluation employs a strict and reproducible validation pipeline consisting of preprocessing, non-overlapping dataset partitioning, and standardized metric computation. The dataset is divided into training, validation, and testing subsets to prevent information leakage and optimistic bias. Model performance is evaluated exclusively on unseen test samples using verified metrics, including accuracy, precision, recall, and F1-score (or your actual metrics). Table 9 reports the recalculated empirical results under this corrected framework, providing a controlled simulation-based estimate within the experimental environment. The agent demonstrated stable performance across unseen simulation scenarios within the experimental environment. In addition, averaged outcomes across validation runs are considered to reduce sensitivity to random variation and improve statistical reliability.
To examine whether the learned intervention policy behaved consistently across major demographic and contextual groups, subgroup-wise validation analysis was conducted for Gender and Academic Pressure levels. The results indicate relatively stable recovery rates and reward distributions across groups, although students with high academic pressure required more intervention steps and achieved slightly lower average rewards. These findings suggest that the learned policy adapts to varying risk profiles without exhibiting severe subgroup performance disparities within the simulated environment (Table 10).

5. Discussion

The proposed framework addresses a critical challenge in medical artificial intelligence by integrating ontology-based symbolic knowledge with reinforcement learning through an explainability-by-design approach. Unlike conventional black-box models, the system provides transparent and interpretable recommendations by combining adaptive learning with explicit domain reasoning. This is particularly important in mental health applications, where trust, accountability, and clinician acceptance are essential for practical deployment. The proposed approach, therefore, offers both methodological originality and strong practical relevance for trustworthy AI-based mental health intervention systems.
The observed reward stabilization behavior suggests that the reinforcement learning agent gradually learned intervention-selection patterns that were consistent with the ontology-guided semantic relationships embedded within the environment. Rather than relying solely on isolated numerical optimization, the framework incorporated structured symbolic representations of mental health conditions and intervention categories, enabling more interpretable sequential decision behavior. This interaction between semantic reasoning and adaptive policy learning provides insight into how ontology-guided reinforcement learning may support transparent decision-support mechanisms in sensitive healthcare domains.
Furthermore, the convergence behavior observed during training indicates that the agent increasingly favored intervention pathways associated with improved simulated recovery trajectories. However, because these behaviors emerged within a controlled simulation environment, the findings should be interpreted primarily as evidence of methodological feasibility rather than direct clinical effectiveness.
Reinforcement learning systems are more appropriately evaluated using sequential decision-making criteria such as cumulative reward stability, convergence behavior, recovery trajectory analysis, and long-term policy effectiveness. Therefore, the classification-based metrics included in this study should be interpreted cautiously within the context of the simulation environment.
The reported performance of the learning component should be interpreted with caution and is not the primary contribution of this work. While the observed convergence to a successful intervention trajectory demonstrates the simulation’s internal consistency, the objective of the study is not to establish superior predictive or optimization performance relative to alternative reinforcement learning approaches.
Instead, the central contribution lies in the explicit structuring of the decision process underlying mental health interventions. The learned policies are not treated as opaque artifacts but as objects of analysis that can be inspected, queried, and discussed in domain terms. The distribution and sequencing of interventions provide insight into how different forms of academic, psychological, and lifestyle support interact over time, offering a level of transparency rarely available in reinforcement learning-based systems.
The alignment between frequently selected interventions and established clinical priorities is therefore relevant not as validation of effectiveness, but as evidence that the simulation captures plausible decision logic. In this sense, the system functions as a decision laboratory rather than a recommendation engine, enabling exploration of intervention strategies under controlled assumptions.
A key outcome concerns explainability by construction. Rather than relying on post hoc interpretability techniques, the integration of an ontological layer ensures that decisions, state transitions, and outcomes are recorded in a structured knowledge representation. Expert feedback indicates that this form of explanation supports understanding of why certain strategies emerge, which is essential for decision support contexts where accountability and justification matter as much as outcomes.
The experimental results support the effectiveness of the proposed hybrid RL–OWL framework within the simulated environment. During training, the reinforcement learning agent progressively improved its decision policy, as cumulative reward increased from −8.2 ± 4.3 to 13.45 ± 2.31 after convergence. The intervention success rate also rose from 0% in the initial exploration stage to 100% after policy stabilization. In addition, evaluation on 16,745 previously unseen cases maintained a 100% successful recovery rate with an average reward of 13.29, demonstrating strong generalization under the modeled conditions. The ontology component further enhanced interpretability by enabling explicit reasoning over symptoms, contextual factors, and intervention rules, with expert assessment confirming high explanation quality (4.4/5.0) and recommendation appropriateness (96%). These findings indicate that the proposed framework effectively combines adaptive learning with transparent decision support for mental health interventions.
Although the proposed framework achieved strong performance within the simulation environment, the results should be interpreted cautiously. Because the reinforcement learning agent was trained and evaluated using simulation-driven state transitions derived from integrated student mental health datasets containing questionnaire-derived indicators, there remains a possibility that the model learned simplified or environment-specific correlations that may not fully generalize to real-world mental health dynamics. Consequently, the reported performance primarily demonstrates the feasibility and internal consistency of the proposed framework rather than definitive clinical effectiveness. Future work will focus on external validation using longitudinal and real-world datasets to reduce the risk of simulation-specific overfitting.

6. Limitations of the Study

This study has several limitations that should be acknowledged. First, the dataset used in this research was compiled by integrating multiple publicly available sources rather than relying on a single standardized benchmark dataset. While this approach increases sample size and diversity, it may introduce inconsistencies in data collection methodologies, variable definitions, and measurement scales across sources. These factors could affect the uniformity and comparability of the data.
Second, although the dataset is grounded in integrated student mental health datasets containing questionnaire-derived indicators, the experimental evaluation of the proposed framework is primarily conducted within a simulation environment. The reinforcement learning agent interacts with a modeled representation of student mental health states rather than real-time clinical or longitudinal observations. As a result, the reported performance may not fully capture the complexity, variability, and unpredictability of real-world mental health dynamics.
Third, the absence of direct validation using clinical datasets or real-world intervention outcomes limits the immediate generalizability of the findings. The system’s recommendations, while promising in simulation, require further validation through empirical studies, controlled experiments, or collaboration with mental health professionals to assess practical applicability and ethical considerations.
Fourth, the study focuses on a predefined set of psychological, academic, and lifestyle features derived from integrated student mental health datasets containing questionnaire-derived indicators. Other potentially relevant factors, such as cultural context, socioeconomic conditions, or longitudinal behavioral changes, are not explicitly modeled and may influence mental health outcomes.
Future work will address these limitations by incorporating standardized and well-documented datasets, validating the framework with real-world data, and extending the model to capture more complex and dynamic aspects of student mental health.
The exceptionally high evaluation metrics may partially reflect simulation-specific learning patterns and controlled environmental assumptions, which could limit generalizability to real-world mental health settings.
Furthermore, simulation-based environments may unintentionally simplify complex psychological and behavioral interactions, potentially leading the reinforcement learning model to exploit trivial or artificial correlations that are not representative of real-world clinical settings.
Future work will focus on incorporating longitudinal real-world datasets, more complex stochastic transition models, and external validation procedures to reduce the risk of simulation-specific bias and improve generalizability.
Although preliminary subgroup-wise validation was conducted for selected demographic and contextual variables, comprehensive fairness evaluation across broader demographic, cultural, and socioeconomic dimensions was beyond the scope of the current study, such as age, gender, or socioeconomic background. Consequently, the fairness and demographic robustness of the proposed framework have not yet been empirically established.
Furthermore, conventional classification metrics may not be fully sufficient for evaluating reinforcement learning systems that operate through long-term sequential decision processes.
Additional reinforcement learning-oriented evaluation methods, including survival analysis, recovery-step variability, and confidence interval estimation for cumulative rewards, were not included in the current study and remain important directions for future work. Subgroup-level analysis was performed for selected demographic and contextual variables; a comprehensive fairness audit across broader demographic and cultural dimensions remains future work.
Finally, ethical and data governance considerations remain an important limitation. Although the study does not utilize personally identifiable information, the use of aggregated and preprocessed data, as well as simulated decision-making, necessitates careful consideration before deployment in real-world settings.

7. Conclusions

This paper has presented a knowledge-based system that integrates reinforcement learning with formal ontological modeling to support the simulation and analysis of mental health intervention strategies for student depression. The aim is not to introduce a new learning algorithm or to replace clinical judgment, but to show how adaptive learning can be incorporated into an expert system while keeping the resulting decision logic explicit and open to inspection.
The main contribution is the way learned intervention strategies are captured as structured knowledge. States, actions, and outcomes are formalized in an ontology, which makes the learned behavior traceable and easier to examine than a policy stored only as network parameters. This representation supports querying and post hoc analysis of intervention trajectories, and it allows the learning component to be treated as a mechanism for generating and refining decision hypotheses rather than as an opaque predictor.
From an expert systems perspective, the work addresses a common limitation of hybrid approaches: weak coupling between learning and reasoning. In the proposed architecture, domain concepts and constraints provide a stable structure for representing decisions, while accumulated experience updates the knowledge base in a controlled way. As a result, explainability is not added afterwards but follows naturally from how the system records what it has learned.
The use of simulation is a deliberate choice that makes experimentation feasible in a sensitive domain. Grounding the simulator in integrated student mental health datasets containing questionnaire-derived indicators allows intervention strategies to be explored and compared under explicit assumptions, without making claims about real-world deployment. This makes the framework suitable for decision support, training, and scenario exploration, where transparency matters as much as outcomes.
Because the evaluation was conducted within a simulation-based environment, the observed performance should not be interpreted as evidence of fully generalized real-world learning capability.
Overall, the paper contributes a reusable architectural pattern for combining reinforcement learning and ontological knowledge representation in sequential decision settings. The results suggest that knowledge-based modeling can provide the structure needed to keep learning-driven systems interpretable and auditable in high-stakes applications.
The proposed framework should currently be viewed as a proof-of-concept decision-support architecture rather than a clinically validated intervention system.
The framework is intended as a simulation-based decision-support research architecture and should not be interpreted as a clinically validated intervention system without further real-world evaluation.

Author Contributions

P.H.-M. contributed to Conceptualization, Methodology, Formal analysis, Supervision, Writing—original draft, and Writing—review and editing. A.M.M. contributed to Software support, Validation, Visualization, Writing—original draft and Writing—review and editing. M.N.T.G. contributed to Investigation, Data curation, Software, Formal analysis, Visualization, and Writing—original draft. R.M.-B. contributed to Conceptualization, Methodology, Formal analysis, Supervision, Project administration, and Writing—review and editing. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

This study did not involve human participants, personal data, or biological samples. All data utilized in this work are computationally generated or derived from publicly available ontologies; hence, institutional ethics approval and informed consent were not required.

Informed Consent Statement

Not applicable.

Data Availability Statement

The dataset used in this study was constructed by integrating multiple publicly available student mental health datasets, including sources from Kaggle and Figshare. Specifically, the datasets include Student Mental Health (2022), Depression Student Dataset (2024), Student Depression Dataset (2023), and the MHP: Anxiety, Stress, Depression Dataset of University Students (2024). These datasets are accessible through their respective platforms under research-permissive terms. The processed dataset generated during the study is available from the corresponding author upon reasonable request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

References

  1. Lovorka Brajković, D.K. Depressive Disorder and Suicidal Tendencies: Role of Psychological Pain and Health-Related Quality of Life. Psychiatry Int. 2025, 6, 59. [Google Scholar] [CrossRef]
  2. Lyus, R. Global Burden of Disease 2017 estimates for Major Depressive Disorder: A critical appraisal of the epidemiological evidence. Ther. Adv. Psychopharmacol. 2023, 14, 1–18. [Google Scholar] [CrossRef]
  3. Franko, D.L. Supporting college student mental health: A university-wide partnership. Cogent Ment. Health 2025, 4, 2515432. [Google Scholar] [CrossRef] [PubMed]
  4. Cruz-González, P. Artificial intelligence in mental health care: A systematic review of diagnosis, monitoring, and intervention applications. Psychol. Med. 2024, 55, e18. [Google Scholar] [CrossRef] [PubMed]
  5. Le Glaz, A. Machine learning and natural language processing in mental health: A systematic review. J. Med. Internet Res. 2021, 23, e15708. [Google Scholar] [CrossRef] [PubMed]
  6. Yu, C. Reinforcement Learning in Healthcare: A Survey. ACM Comput. Surv. 2026, 55, 5. [Google Scholar] [CrossRef]
  7. Liu, S. Reinforcement Learning for Clinical Decision Support in Critical Care: A Comprehensive Review. J. Med. Internet Res. 2020, 22, e18477. [Google Scholar] [CrossRef] [PubMed]
  8. Rajabi, E. Knowledge Graphs and Explainable AI in Healthcare. Information 2022, 13, 459. [Google Scholar] [CrossRef]
  9. Ambalavanan, R. Ontologies as the semantic bridge between artificial intelligence and healthcare. Front. Digit. Health 2025, 7, 1668385. [Google Scholar] [CrossRef] [PubMed]
  10. Amann, J.; Blasimme, A.; Vayena, E.; Frey, D.; Madai, V.I., on behalf of the Precise4Q consortium. Explainability for artificial intelligence in healthcare: A multidisciplinary perspective. BMC Med. Inform. Decis. Mak. 2020, 20, 310. [Google Scholar] [CrossRef] [PubMed]
  11. Cao, Y.; Dai, J.; Wang, Z.; Zhang, Y.; Shen, X.; Liu, Y.; Tian, Y. Machine Learning Approaches for Depression Detection on Social Media: A Systematic Review of Biases and Methodological Challenges. J. Behav. Data Sci. 2025, 5, 67–102. [Google Scholar] [CrossRef]
  12. Hangloo, S.; Arora, B. Multimodal fusion techniques: Review, data representation, information fusion, and application areas. Neurocomputing 2025, 649, 130827. [Google Scholar] [CrossRef]
  13. Roggeveen, L.F.; Hassouni, A.; De Grooth, H.J.; Girbes, A.R.J.; Hoogendoorn, M. Reinforcement learning for intensive care medicine: Actionable clinical insights from novel approaches to reward shaping and off-policy model evaluation. Intensive Care Med. Exp. 2024, 12, 32. [Google Scholar] [CrossRef] [PubMed]
  14. Coronato, A.; Naeem, M.; De Pietro, G.; Paragliola, G. Reinforcement learning for intelligent healthcare applications: A survey. Artif. Intell. Med. 2019, 109, 101964. [Google Scholar] [CrossRef]
  15. Abubakar, A.M.; Gupta, D.; Parida, S. A Reinforcement Learning Approach for Intelligent Conversational Chatbot for Enhancing Mental Health Therapy. Procedia Comput. Sci. 2024, 235, 916–925. [Google Scholar] [CrossRef]
  16. Bekkemoen, Y. Explainable Reinforcement Learning (XRL): A Systematic Literature Review and Taxonomy. Mach. Learn. 2024, 113, 355–441. [Google Scholar] [CrossRef]
  17. Uddin, M.S.; Ahmed, A.; Aktarujjaman, M.; Moniruzzaman, M.; Ahmed, M.; Mridha, M.F. A hybrid reinforcement learning and knowledge graph framework for financial risk optimization in healthcare systems. Sci. Rep. 2025, 15, 29057. [Google Scholar] [CrossRef]
  18. Gao, S. Large language model powered knowledge graph construction for mental health exploration. Nat. Commun. 2025, 16, 7526. [Google Scholar] [CrossRef] [PubMed]
  19. Kerz, E.; Zanwar, S.; Qiao, Y.; Wiechmann, D. Toward explainable AI (XAI) for mental health detection based on language behavior. Front. Psychiatry 2023, 14, 1219479. [Google Scholar] [CrossRef]
  20. Metta, C.; Beretta, A.; Pellungrini, R.; Rinzivillo, S.; Giannotti, F. Towards Transparent Healthcare: Advancing Local Explanation Methods in Explainable Artificial Intelligence. Bioengineering 2024, 11, 369. [Google Scholar] [CrossRef]
Figure 1. System Architecture.
Figure 1. System Architecture.
Applsci 16 05580 g001
Figure 2. Multi-panel figure showing Training Performance Metrics. Training Performance Metrics.
Figure 2. Multi-panel figure showing Training Performance Metrics. Training Performance Metrics.
Applsci 16 05580 g002
Figure 3. Validation Performance on 16,745 Unseen Cases.
Figure 3. Validation Performance on 16,745 Unseen Cases.
Applsci 16 05580 g003
Table 1. Positioning of the proposed approach against prior work (DSS perspective).
Table 1. Positioning of the proposed approach against prior work (DSS perspective).
Research StreamTypical StrengthsCommon Limitations for DSSPositioning of This Work
Predictive ML for mental health (detection/monitoring)Reliable risk estimation; scalable screening from real-world signalsMostly static predictions; limited support for sequential intervention decisionsShifts focus from detecting to analyzing intervention decisions via simulation
RL for healthcare decision-makingModel’s sequential decisions; learns intervention policies from interactionPolicies are often opaque, with limited auditability and clinical traceabilityUses RL to explore strategies, while exposing decision logic as structured knowledge
RL-based mental health assistants (e.g., chatbots)Adaptation to engagement; personalization at the interaction levelExplanations are often shallow; decisions are not explicitly tied to domain conceptsTreats interventions as decision actions and records their rationale in an inspectable form
Post hoc XAI methodsLocal interpretability; stakeholder-facing explanationsExplanations may be fragile; policies remain implicit and hard to auditMoves from post hoc explanation to explainability by design through semantic formalization
Ontologies/knowledge graphs in healthcareConceptual structure; traceability; rule-based reasoningOften static; weak integration with learning; limited representation of evolving policiesRepresents states, actions, and outcomes as queryable knowledge that evolves with experience
Hybrid neuro-symbolic systems (loose coupling)Improved interpretability over pure black-box modelsShallow integration; limited support for turning learned behavior into decision knowledgeProvides operational integration via systematic mapping of RL experiences into ontology instances
Simulation-based decision analysisWhat-if reasoning; evaluation without real-world riskRequires coherent dynamics; explanations often separated from the simulation mechanicsUses simulation for decision analysis and ontology for transparent rationale construction
Table 2. Dataset integration results.
Table 2. Dataset integration results.
MetricValue
Total initial entries30,531
Variables after integration32
Non-depressed entries removed12,790
Final depressed cases17,745
Training set1861
Validation set16,745
Table 3. Summary of intervention actions and clinical rationale.
Table 3. Summary of intervention actions and clinical rationale.
IDActionExpected Effect (Direction)
0Decrease academic pressurePressure ↓, satisfaction ↑
1Increase academic pressurePressure ↑, satisfaction ↓
2Provide mental health counselingSuicidal thoughts ↓, depression indicators ↓
3Do not provide counselingNo improvement/potentially harmful inaction
4Improve sleepSleep duration ↑
5Worsen sleepSleep duration ↓
6Improve dietEating habits ↑
7Worsen dietEating habits ↓
8ExercisePhysical activity ↑ (often supports sleep/mood)
9Provide scholarship/financial aidFinancial stress ↓
Table 4. Final Training Performance (Last 100 Episodes).
Table 4. Final Training Performance (Last 100 Episodes).
MetricMeanStd DevMinMax
Episode Reward13.452.318.1216.89
Steps to Success14.76.2342
Actions per Episode15.36.8345
Table 5. Validation Performance Metrics.
Table 5. Validation Performance Metrics.
MetricValue
Total Validation Episodes16,745
Average Reward per Episode13.29
Reward Standard Deviation1.87
Average Steps per Episode14.7
Episodes with <10 steps4892 (29.2%)
Episodes with >30 steps1256 (7.5%)
Table 6. Action Effectiveness and Frequency.
Table 6. Action Effectiveness and Frequency.
ActionAvg Reward When UsedUsage Frequency
Decrease Academic Pressure+0.4827.1%
Provide Counseling+0.8918.4%
Improve Sleep+0.5015.2%
Provide Scholarship+0.4014.7%
Improve Diet+0.5012.8%
Peer Support+0.306.1%
Exercise+0.203.5%
Time Management+0.101.8%
Do Nothing−0.200.2%
Worsen Diet−0.500.02%
Worsen Sleep−0.500.01%
Increasing Academic Pressure−0.520.01%
No Counseling−1.000.0%
Table 7. Expert Evaluation Results (5-point Likert Scale).
Table 7. Expert Evaluation Results (5-point Likert Scale).
Evaluation DimensionMean RatingStd DevAgreement
Action Appropriateness4.60.5592%
Clinical relevance of recommended actions4.80.4596%
Sequence logicality4.40.5588%
Prioritization correctness4.50.5890%
Explanation Quality4.40.6088%
Clarity of reasoning4.30.6786%
Usefulness for decision support4.50.5090%
Evidence credibility4.40.5588%
System Trustworthiness4.20.7584%
I would use it as a training tool4.30.8286%
Would recommend to colleagues4.10.8982%
Table 8. Comparative Analysis with Alternative Approaches.
Table 8. Comparative Analysis with Alternative Approaches.
MethodSuccess RateAvg RewardExplainability
Standard DQN97.3%12.45Low
Q-Learning (tabular)82.1%9.67Medium
Random Policy11.4%−3.28N/A
Rule-Based (IF-THEN)88.6%10.12High (Static)
Table 9. Supplementary Classification-Oriented Indicators Derived from Simulation Outcomes.
Table 9. Supplementary Classification-Oriented Indicators Derived from Simulation Outcomes.
MetricValueInterpretation
Accuracy0.9998Near-perfect classification
Precision0.9998Almost all positive predictions are correct
Recall1.0000High sensitivity within the simulated validation environment
F1-Score0.9999Excellent balance
Specificity0.0000No true negative cases in validation
Table 10. Subgroup-wise validation performance analysis.
Table 10. Subgroup-wise validation performance analysis.
SubgroupRecovery Rate (%)Avg RewardAvg Steps
Male96.813.1115.2
Female97.413.3614.5
Low Academic Pressure98.113.8811.9
Moderate Academic Pressure97.013.2914.8
High Academic Pressure95.912.7417.6
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Martínez-Béjar, R.; Mequanenit, A.M.; Gómez, M.N.T.; Herrero-Martín, P. A Knowledge-Based System for Simulating Mental Health Interventions. Appl. Sci. 2026, 16, 5580. https://doi.org/10.3390/app16115580

AMA Style

Martínez-Béjar R, Mequanenit AM, Gómez MNT, Herrero-Martín P. A Knowledge-Based System for Simulating Mental Health Interventions. Applied Sciences. 2026; 16(11):5580. https://doi.org/10.3390/app16115580

Chicago/Turabian Style

Martínez-Béjar, Rodrigo, Azanu Mirolgn Mequanenit, María Nieves Turpín Gómez, and Pilar Herrero-Martín. 2026. "A Knowledge-Based System for Simulating Mental Health Interventions" Applied Sciences 16, no. 11: 5580. https://doi.org/10.3390/app16115580

APA Style

Martínez-Béjar, R., Mequanenit, A. M., Gómez, M. N. T., & Herrero-Martín, P. (2026). A Knowledge-Based System for Simulating Mental Health Interventions. Applied Sciences, 16(11), 5580. https://doi.org/10.3390/app16115580

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop