Method for providing psychological health suggestions, method for training deep learning network and psychological health consultation system
By combining acceptance and commitment therapy (ACT) and deep learning technology among children's special needs parents in Hong Kong, China, we provide a mental health consultation system based on AI chatbots, solving the problem of parents with children's special needs to obtain mental health services, and achieving efficient and personalized mental health advice and services.
Patent Information
- Application Number
- CN202410980842.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-10-04
- Filing Date
- 2024-07-22
- Publication Date
- 2025-04-11
AI Technical Summary
In Hong Kong, China, the significant increase in children’s special needs has led to huge challenges for parents in accessing effective, comprehensive and accessible mental health services, including nursing needs, geographical barriers and self-stigmatization.
Adopting acceptance and commitment therapy (ACT) and deep learning-based mental health counseling system provides mental health advice through AI chatbots. The system includes a knowledge database, external large language models, irrelevant processing methods and artificial intelligence logic models, and uses deep learning networks to identify users' mental health status and generate related outputs.
The system can provide personalized, convenient and efficient mental health advice, reduce the operational burden of mental health practitioners, improve parents' access to mental health services, and improve their mental health status.
Smart Images

Figure CN119811596A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for providing mental health advice and a method for training a deep learning network in a system for providing mental health advice. In particular, although other uses are not excluded, the present invention relates to a mental health consultation system using acceptance and commitment therapy (ACT) and based on deep learning. Background Art
[0002] In Hong Kong, China, a significant increase in children with special needs, ranging from 6.2% to 10.7% per year, is evident in the rise in the number of preschoolers and school-age children diagnosed with special educational needs (SEN). In 2019, there were 17,193 newly diagnosed preschool cases and 56,640 registered school-age students with SEN in the 2020 / 2021 school year, a 30% increase since 2012 / 14. This surge is mainly attributed to increased awareness of children and improved early identification mechanisms, both through the On-site Pre-school Rehabilitation Service (OPRS) managed by the Social Welfare Department. Raising a young child with special needs has long been considered a difficult task for parents. However, this challenge is further exacerbated by the long waiting period for diagnosis and early intervention, which can stretch to a daunting 19.6 months. This extended period of uncertainty has heightened stress for parents, often leading to the emergence of symptoms of depression and anxiety.
[0003] In this context, access to effective, comprehensive, and accessible mental health services is a significant challenge for parents. The relentless demand for care, geographic barriers, and the prevalence of self-stigma combine to create significant barriers. The latter, in particular, manifests as self-blame for one’s parenting abilities, which discourages parents from actively seeking face-to-face professional mental health services, which are often perceived to be cost-prohibitive. Summary of the invention
[0004] The present invention provides systems and methods for providing deep learning-based mental health counseling services by using Acceptance and Commitment Therapy (ACT). Some key features of the system for providing such mental health counseling services include:
[0005] 1. Knowledge database and customized question bank, simulating the life situation and problem-oriented interviews between the interventionist or counselor and the user in the first real-life ACT counseling session;
[0006] 2. External Large Language Model (LLM);
[0007] 3. Irrelevant (dialogue) processing methods; and
[0008] 4. Artificial Intelligence (AI) Logic Model, which is a pre-trained Natural Language Processing (NLP) model based on the Bidirectional Encoder Representation Transformer (BERT) architecture, including the Robustly Optimized BERT Pretraining Approach (RoBERTa) architecture, which has learned ACT consulting logic.
[0009] According to a first aspect of the present invention, a method for providing mental health advice is disclosed. The method includes receiving text input from a user during an ACT counseling session; processing the text input by applying a predefined mental health condition relationship to determine the user's mental health status, and generating an output related to the user's mental health status.
[0010] According to the first aspect, the mental health condition relationships are trained by a deep learning network.
[0011] According to a first aspect, a deep learning network is a deep neural network configured to identify a mental health state based on received text input labeled by the deep neural network.
[0012] According to a first aspect, the text input includes a user's responses to one or more predetermined questions in a question bank based on Acceptance and Commitment Therapy (ACT) knowledge, using an artificial intelligence (AI) chatbot as an interface during an ACT counseling session.
[0013] According to a first aspect, the question bank is configured to simulate life situations and problem-oriented interviews between counselors and users in a live ACT counseling session.
[0014] According to a first aspect, a question bank is generated after an initial live ACT counseling session between a counselor and a user.
[0015] According to the first aspect, the question bank is generated based on a self-report mental health assessment completed by a user, wherein the self-report mental health assessment uses a validated instrument to assess a range of psychological or mental health symptoms and well-being, including but not limited to anxiety symptoms, depressive symptoms, stress, and the user's state of psychological rigidity or psychological flexibility.
[0016] According to the first aspect, the method further includes providing an AI chatbot to ask the user one or more predetermined questions and receive text input from the user during the ACT counseling session.
[0017] According to a first aspect, one or more predetermined questions are provided to the user in the form of a questionnaire and / or one or more chat dialogues.
[0018] According to the first aspect, the method further includes detecting at least one irrelevant answer provided by a user and obtaining a confirmatory answer from the user when using the AI chatbot in an ACT counseling session.
[0019] According to the first aspect, if a predetermined number of irrelevant responses are detected, the AI chatbot will adjust the inquiry route.
[0020] According to the first aspect, the AI chatbot is configured to ask the user additional questions when irrelevant responses are detected, thereby eliciting confirmatory responses necessary to accurately assess the user's mental health status.
[0021] According to the first aspect, the AI chatbot is further configured to autonomously initiate and maintain interaction with the user and guide the conversation in a manner to extract more relevant information to assess the user's mental health status.
[0022] According to a first aspect, the output includes the frequency / number of occurrences of irrelevant items in an ACT counseling session.
[0023] According to the first aspect, the AI chatbot is further supported by an external Large Language Model (LLM) processing engine, which is designed to enhance the generation of context-relevant responses to facilitate interaction with users through the AI chatbot.
[0024] According to the first aspect, the method further includes pre-processing the text input before applying the mental health condition relationship model to the text data to accurately identify the user's mental health status.
[0025] According to a first aspect, preprocessing of text input includes processing the text input, including at least removing stop words, lowercase processing, punctuation normalization, back translation and data augmentation.
[0026] According to the first aspect, the psychological health state includes the user's psychological rigidity and psychological flexibility.
[0027] According to the first aspect, mental health status is associated with the following psychological inflexibility processes:
[0028] - Experiential avoidance;
[0029] -Cognitive fusion;
[0030] -Conceptualized past and fear of the future;
[0031] - Attachment to a conceptualized self;
[0032] - Lack of clarity on values; and
[0033] -Inaction, impulsivity, and avoidance persist.
[0034] According to the first aspect, psychological health status is associated with the following psychological flexibility processes:
[0035] -Acceptance;
[0036] -Cognitive dissociation;
[0037] - Focus on the present moment;
[0038] -Observing self;
[0039] - Values clarification; and
[0040] - Commitment to action.
[0041] According to the first aspect, the learning network includes a natural language processing (NLP) model that has been pre-trained specifically for ACT consulting logic using a Bidirectional Encoder Representation Transformer (BERT) architecture, including a Robust Optimized BERT Pre-training Method (RoBERTa) architecture.
[0042] According to a second aspect of the present invention, a method for training a deep learning network according to the first aspect is disclosed, comprising the steps of collecting data, preprocessing data, tokenization, model prediction, model evaluation, and optimizing hyperparameters to train the learning network.
[0043] According to a second aspect, the method also includes fine-tuning the deep learning network using a cosine annealing scheduler and an Adam optimizer, and integrating a retrieval-augmented generation (RAG) framework configured to retrieve data from a knowledge database.
[0044] According to the second aspect, the knowledge database is dynamic and continuously updated with a summary of AI chatbot user statistics and questions asked.
[0045] According to the second aspect, the deep learning network was evaluated by assessing the diagnostic ability of the classifier to classify each psychological flexibility and rigidity process in ACT counseling conversation data, as the discrimination threshold in the Receiver Operating Characteristic (ROC) method was varied.
[0046] According to the second aspect, the deep learning network is further evaluated by using a confusion matrix to improve the accuracy of the classifier in diagnosing and identifying each psychological flexibility and / or rigidity process, providing a comprehensive view of the overall performance of the model, and determining whether the imbalanced class is mainly predicted as the dominant class.
[0047] According to a second aspect, the method further comprises the step of testing the deep learning network, including at least segmenting sentences, preprocessing data, prediction and post-processing.
[0048] According to a third aspect of the present invention, a mental health counseling system using Acceptance and Commitment Therapy (ACT) and based on deep learning is disclosed, comprising: providing an AI chatbot according to the first aspect on a user device, wherein the AI chatbot is supported by a deep learning network; and a cloud service with a content management system (CMS) and a database.
[0049] According to a third aspect, a user device is configured to collect text input via a questionnaire and / or via a conversation with an AI chatbot and provide functionality including interactive operations configured to make appointments with counselors and facilitate mental health services.
[0050] According to a third aspect, the system also includes an operation interface supported by a cloud service with a content management system (CMS) and a database, which is configured to facilitate the import of data and visualize the user's mental health status analysis and chat history.
[0051] According to a third aspect, the system further comprises a portal website configured to display output related to the user's mental health status and / or statistical data of detected irrelevant content, including the frequency and number of occurrences of irrelevant content.
[0052] Embodiments of the present invention may be used to provide digital, personalized deep learning-based mental health advice using Acceptance and Commitment Therapy (ACT), mimicking ACT sessions led by a real therapist.
[0053] In an example embodiment, a method for providing mental health advice may include providing counseling based on acceptance and commitment therapy (ACT) knowledge through a chatbot logic module; and classifying and analyzing the user's mental health status through a classification and analysis module. The infrastructure of the chatbot logic module includes four components. The first component is a knowledge database and a customized question library. The second component is an external large language model (LLM). The third component is an irrelevant processing method. The fourth component is an artificial intelligence (AI) logic model. In the classification and analysis module, the performance of classifying and analyzing the user's mental health status includes a training step and a system testing step. In addition, the training step includes collecting data, preprocessing data, word segmentation, model prediction, model evaluation, and optimizing hyperparameters. The data preprocessing step includes removing stop words, lowercase, punctuation standardization, back translation, and data enhancement. The model prediction step is performed by a pre-trained model of the bidirectional encoder representation (BERT) type, including a RoBERTa (Robust Optimized BERT Pre-training Method) architecture. The method may also include fine-tuning the pre-trained model through an Adam optimizer and a cosine annealing scheduler. In addition, the model prediction step is further enhanced by integrating the Retrieval Augmented Generation (RAG) framework, which aims to enrich the response generation capabilities of the system with a dynamic knowledge database that supports the RAG functionality. Model evaluation includes evaluating the diagnostic ability of the classifier through the Receiver Operating Characteristic (ROC) method as the classification threshold is varied. Model evaluation also includes providing the Area Under the ROC Curve (AUC) score to quantify the area under the ROC curve, summarizing the overall performance of the classifier under all possible area / threshold settings. To further improve the accuracy of the classifier in identifying psychological flexibility and / or rigidity, a confusion matrix is used. The analysis also discusses the granularity of the target variable in the classification task, and three-class and six-class classifications are designed. In addition, the system testing includes segmenting sentences, pre-processing data, prediction, and post-processing, where a customized segmentation method is used to generate multiple potential paragraphs for prediction, and finally a non-maximum suppression method is applied to reduce the total number of predictions.
[0054] In another embodiment of the present invention, a computer program product is provided. It includes a non-transient computer executable storage device, which contains computer-readable program instructions, which, when executed by a computer, cause the computer to perform a method of mental health advice. The computer executable program instructions include providing consultation based on acceptance and commitment therapy (ACT) knowledge through a chatbot logic module; and classifying and analyzing the user's mental health status through a classification and analysis module. The infrastructure of the chatbot logic module includes four components. The first component is a knowledge database and a customized question library. The second component is an external large language model (LLM). The third component is an irrelevant processing method. The fourth component is an artificial intelligence (AI) logic model. In the classification and analysis module, the performance of classifying and analyzing the user's mental health status includes a training step and a system testing step. In addition, the training step includes collecting data, preprocessing data, word segmentation, model prediction, model evaluation, and optimizing hyperparameters. The data preprocessing step includes removing stop words, lowercase, punctuation standardization, back translation, and data enhancement. The model prediction step is performed by a pre-trained model of the Bidirectional Encoder Representation (BERT) type, including the RoBERTa (Robust Optimized BERT Pre-training Method) architecture. The method may also include fine-tuning the pre-trained model through the Adam optimizer and the cosine annealing scheduler. In addition, the model prediction step is further enhanced by integrating the Retrieval Augmented Generation (RAG) framework, which aims to enrich the response generation capabilities of the system with a dynamic knowledge database that supports the RAG function. The model evaluation includes evaluating the diagnostic ability of the classifier through the Receiver Operating Characteristic (ROC) method as the classification threshold is varied. The model evaluation also includes providing an Area under the ROC Curve (AUC) score to quantify the area under the ROC curve, summarizing the overall performance of the classifier under all possible area / threshold settings. In order to further improve the accuracy of the classifier in identifying psychological flexibility and / or rigidity, a confusion matrix is used. The analysis also discusses the granularity of the target variable in the classification task, and three-class and six-class classifications are designed. Furthermore, the system testing includes sentence segmentation, data preprocessing, prediction, and post-processing, where a customized segmentation method is used to generate multiple potential paragraphs for prediction, and finally a non-maximum suppression method is applied to reduce the total number of predictions.
[0055] According to another embodiment of the present invention, a method for providing mental health advice is provided. The method includes providing counseling based on acceptance and commitment therapy (ACT) knowledge through a chatbot logic module; and classifying and analyzing the user's mental health status through a classification and analysis module, wherein the chatbot logic module includes four components, including a knowledge database associated with a customized question library, an external large language model (LLM), an unrelated processing unit, and an artificial intelligence (AI) logic model. The performance of classifying and analyzing the user's mental health status includes a training step and a system testing step. The training step includes collecting data, preprocessing data, word segmentation, model prediction, model evaluation, and optimizing hyperparameters. The model prediction step includes integrating a retrieval-enhanced generation (RAG) framework to enrich the response generation capability based on a knowledge database configured to support the RAG framework. In addition, the knowledge database is dynamic and continuously updated by the AI chatbot through user / chat statistics and question summaries, and the question library is customized and configured to simulate life situations and problem-oriented interviews between the interventionist or counselor and the user in an initial live ACT counseling session. An external large language model (LLM) is configured to be coupled with an OpenAI service to enhance the generation of context-relevant responses when a user interacts with an AI chatbot. The external LLM may be GPT-3.5-turbo, GPT-4, and / or GPT-4Turbo. The OpenAI service is an Azure OpenAI service. In addition, the LLM is configured to process user input and generate corresponding responses. The framework of the chatbot logic module is integrated into the user interface. The irrelevant processing unit is configured to adjust the query line when the user response is irrelevant. Further, the irrelevant processing unit is configured to autonomously initiate and maintain interaction with the user, and guide the conversation to extract more relevant information and enrich the downstream process. The downstream process includes a detection task. The artificial intelligence (AI) logic model is configured to logically control the chatbot's question flow, detect the intent of the user input, and serve as four components of the core integrated chatbot logic module to perform various methods. The various methods include input and output parsing, data query and update, applying retrieval enhancement generation (RAG), applying small amount learning, and chain thinking to the data flow. The method may also include displaying statistics about query-response pairs and different users' tendencies toward irrelevant responses. The method may also include providing a snapshot of current user metrics and the quality of ongoing conversational sessions to provide insights and optimizations for LLM applications within the ACT framework. The irrelevance processing unit is configured to proactively prompt more relevant information questions, display statistics on a portal, and analyze performance for accuracy and success rates.
[0056] According to another embodiment of the present invention, a Pai.ACT system is provided to provide mental health advice. The system includes an input module configured to receive user input from a chatbot artificial intelligence (AI) or service session; a retrieval augmentation generation (RAG) unit configured to retrieve from a knowledge database; a chain thinking unit configured to provide prompts with intermediate step instructions; a small amount of learning unit configured to provide demonstration pairs about the target input / output template to obtain additional information; an output parsing unit configured to parse the unstructured output completed by the large language model (LLM) into content that can be understood by the Pai.ACT system; an irrelevant processing unit configured to determine whether the detected irrelevant amount is within a threshold, and if the result is determined to be true, let the AI chatbot ask another round of questions to collect more information; and a portal website unit configured to display statistics on the detected irrelevant content and irrelevant frequency / occurrence.
[0057] According to another embodiment of the present invention, there is provided a method for evaluating the performance of a Pai.ACT system for providing mental health advice. The method includes receiving input from a user; performing tagging to generate an accuracy metric; performing chatbot artificial intelligence (AI) to generate a success rate metric; and performing prompt comparison and optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 is a schematic diagram of a computer server configured to function as a processor for a mental health consultation system according to one embodiment of the present invention.
[0059] Figure 2 is a block diagram showing a mental health consultation system according to an embodiment of the present invention.
[0060] Figure 3 is a block diagram illustrating a mental health consultation system according to another embodiment of the present invention, wherein the mental health consultation system is also referred to as Pai.ACT when implemented as an application program that can be run on a user device.
[0061] Figure 4 is a radar chart showing the psychological flexibility or psychological rigidity process / course and its related bars in Acceptance and Commitment Therapy, which is displayed as an output related to the user's psychological health status according to one embodiment of the present invention.
[0062] Figure 5is a graphical plot of a receiver operating characteristic (ROC) illustrating the diagnostic ability of a classifier on six psychological rigidities, including experiential avoidance, cognitive fusion, attachment to a conceptualized self, lack of present moment awareness, and inaction / impulsive behavior in pursuit of valued goals, with the classification threshold being varied according to one embodiment of the present invention.
[0063] Figure 6 is a graphical plot of a receiver operating characteristic (ROC) illustrating the diagnostic ability of a classifier in three categories of psychological rigidity, including emotional avoidance, rule following, and behavioral avoidance, with the classification threshold being varied according to one embodiment of the present invention.
[0064] Figure 7 is a graphical plot of the AUC score, quantifying the area under the ROC curve, summarizing the overall performance of the classifier over all possible region / threshold settings.
[0065] Figure 8 is a block diagram illustrating a mental health counseling system using Acceptance and Commitment Therapy (ACT) based on deep learning according to an embodiment of the present invention. DETAILED DESCRIPTION
[0066] This application claims the benefit of U.S. Provisional Application Serial No. 63 / 587,850, filed on October 4, 2023, the entire contents of which including any tables, diagrams, or drawings are hereby incorporated by reference into this document.
[0067] According to an embodiment of the present invention, an example of an artificial intelligence-driven, chatbot-assisted mental health method and system is described, which has domain knowledge of Acceptance and Commitment Therapy (ACT, an evidence-based, low-intensity psychotherapy) to provide mental health services to users, such as but not limited to parents of children with special needs, or caregivers of others such as the elderly or teenagers.
[0068] The terms used herein are used only to describe specific embodiments and are not intended to limit the present invention. As used herein, "and / or" includes any and all combinations of one or more of the associated list items. As used herein, the singular forms "a", "an" and "the" are intended to include the singular or plural forms unless the context clearly indicates otherwise. It should also be understood that when the terms "include" and / or "comprises" are used in this specification, the presence of the features, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, steps, operations, elements, components and / or combinations thereof is not excluded.
[0069] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs. It should also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the context of the relevant art and the present invention, and will not be interpreted in an idealized or overly formal manner unless explicitly defined herein.
[0070] When the term "about" is used herein, when used with a numerical value, it is understood that the value may be within the range of 90% to 110% of the value, that is, the value may be + / -10% of the value. For example, "about 1 kg" means from 0.90 kg to 1.1 kg.
[0071] refer to Figure 1 , showing an embodiment of the present invention. The embodiment is configured to provide a system for providing mental health advice by performing the steps of a method: receiving text input from a user in a consultation session; processing the text input by applying a mental health condition relationship to identify the user's mental health condition; and providing output related to the user's mental health condition.
[0072] In this example embodiment, the processor is implemented by a computer with an appropriate user interface. The computer can be implemented by any computing architecture, including a portable computer, a tablet computer, a stand-alone personal computer (PC), a smart device, an Internet of Things (IoT) device, an edge computing device, a client / server architecture, a "dumb" terminal / host architecture, a cloud computing-based architecture, or any other appropriate architecture. The computing device can be appropriately programmed to implement the present invention.
[0073] The system can be used to receive text input from a user, such as multiple responses provided by the user in a counseling session. In particular, it can be configured for the user to answer a series of questions that are very useful for a mental health counselor or practitioner to understand the user's mental health status based on the responses provided by the user. The system can then analyze the responses to predict or determine the mental health status, similar to the way a mental health counselor or practitioner performs in a live counseling session, and the system can also provide output, such as a report or recommendation to the user, so that the user understands or at least learns more about the user's mental health status. In the present disclosure, when ACT counseling is provided to a user, the counseling session generally refers to an Acceptance and Commitment Therapy (ACT) counseling session.
[0074] like Figure 1As shown, a schematic diagram of a computer system or server labeled 100 is shown. The figure shows an example embodiment of a processor in a health monitoring system. In this embodiment, the system includes a server 100, which contains suitable components required to receive, store and execute appropriate computer instructions. The components may include a processing unit 102, including a central processing unit (CPU), a mathematical co-processing unit (math processor), a graphics processing unit (GPU) or a tensor processing unit (TPU) for tensor or multi-dimensional array calculations or operations, a read-only memory (ROM) 104, a random access memory (RAM) 106, and input / output devices such as a disk drive 108, an Ethernet port, an input device 110 such as a USB port. A display 112, such as a liquid crystal display, a light-emitting display or any other suitable display and a communication link 114. The server 100 may include instructions contained in the ROM 104, the RAM 106 or the disk drive 108, and can be executed by the processing unit 102. A plurality of communication links 114 may be provided, which may be connected in various ways to one or more computing devices, such as servers, personal computers, terminals, wireless or handheld computing devices, Internet of Things (IoT) devices, smart devices, edge computing devices, cloud devices. At least one communication link may be connected to an external computing network via a telephone line or other type of communication link.
[0075] The server 100 may include storage devices such as a disk drive 108, which may include a solid-state drive, a hard disk drive, an optical drive, a tape drive, or a remote or cloud-based storage device. The server 100 may use a single disk drive or multiple disk drives, or a remote storage service 120. The server 100 may also have an appropriate operating system 116, which resides in a disk drive or in the ROM of the server 100.
[0076] The computer or computing device may also provide the necessary computing power to operate or interface with a machine learning network (such as a neural network) to provide various functions and outputs. The neural network may be implemented locally or accessed or partially accessed through a server or cloud-based service. The machine learning network may also be untrained, partially trained, or fully trained, and / or may also be retrained, adjusted, or updated over time.
[0077] refer to Figure 2 , shows an embodiment of a health monitoring system numeral 200. In this embodiment, the server 100 is used as a part of the system 200, and the system 200 is structured to receive text input from a user, process the input by applying a mental health condition relationship to identify the user's mental health condition, and provide an output related to the user's mental health condition.
[0078] Acceptance and Commitment Therapy (ACT) also promotes a high level of commitment to healthy, constructive activities that support personal values or goals. Its goal is to help individuals process challenging emotions so that they can redirect their energy toward healing rather than dwelling on negative experiences. Research has shown that ACT can be effective for a range of psychological and physical conditions, including anxiety, depression, obsessive-compulsive disorder, psychosis, eating disorders, substance use disorders, work stress, and chronic pain.
[0079] The six processes / paths of psychological rigidity reflect a person’s mental health and can lead to increased distress and ineffective behaviors, which require therapeutic interventions such as ACT to transition from psychological rigidity to psychological flexibility. These processes are explained below:
[0080] -Experiential avoidance: This manifests as an unwillingness to engage with uncomfortable thoughts, feelings, memories, and physical sensations, leading to attempts to suppress, deny, or escape these experiences.
[0081] -Cognitive fusion: This involves becoming so entangled with our thoughts and feelings that they dominate behavior, often at odds with our underlying values.
[0082] -Conceptualized past and fear of the future: This process involves an over-attachment to a rigid identity based on past experiences or an endless anxiety about potential future scenarios that overshadows the present. An excessive focus on the past and future contrasts with being present-oriented.
[0083] - Attachment to a conceptualized self: This is a strict identification with the self-concept (the story one tells about oneself) rather than understanding the self as a situation—a lens through which to view experience. This can limit perspective and flexibility in responding to changing situations.
[0084] - Lack of clarity of values: Unlike the clear understanding and commitment to personal values found in psychological flexibility, psychological rigidity involves unclear or discommitted values, which can lead to aimless or unsatisfying behavior patterns.
[0085] -Inaction, impulsivity, and avoidance persistence: This refers to behavior that is inconsistent with chosen values, whether it is failing to act, acting without considering the long-term impact, or persistently engaging in discomfort-avoidance behaviors at the expense of personal growth or achievement.
[0086] The six processes of psychological flexibility are fundamental components of ACT and they help improve psychological well-being and adaptive functioning. These processes are explained below:
[0087] -Acceptance: This process involves acknowledging and accepting all thoughts and emotions, rather than trying to avoid, deny, or change them. Acceptance is not about negativity or giving up, but recognizing our inner experience, which can reduce the struggle associated with resistance.
[0088] - Cognitive defusion: The cognitive defusion technique teaches individuals to detach from the contents of their thoughts and view them as mere words or images, rather than what they literally mean. This helps to reduce their influence on behavior and emotions.
[0089] -Focus on the present moment: This emphasizes active engagement with the present moment. It encourages mindfulness and an open, accepting, non-judgmental attitude toward present experience, allowing the individual to detach from automatic thoughts of the past or future.
[0090] -Observing Self: This principle helps individuals understand that they are more than just their thoughts and feelings. By adopting a "self as situation" perspective, individuals learn to observe their experiences without being attached to the self.
[0091] -Values Clarification: This focuses on clarifying what is most important to the individual, essentially defining personal values that guide and motivate behavior. Values act like a compass, helping individuals direct their behavior in meaningful ways.
[0092] -Commitment to Action: This involves making behavioral changes that are consistent with the values that have been identified. Commitment is about taking effective actions that lead to a rich, fulfilling, and meaningful life, even if it involves going through difficult or uncomfortable experiences.
[0093] In these example embodiments, psychological flexibility and psychological rigidity processes may be represented by different terms, e.g. Figure 4 The example radar chart is further illustrated in Figure 1.
[0094] In one example embodiment, the method of the present invention was developed based on the analysis of more than 18,000 transcript-based texts that present ACT coaching sessions conducted via video conferencing between parents and experienced counselors. In this example, the transcript-based texts and associated analysis provided by ACT counselors are included in a knowledge database for training a classifier to classify responses provided by users of a learning network system.
[0095] More preferably, the learning network can be a pre-trained natural language processing (NLP) model based on the Bidirectional Encoder Representation (BERT) architecture, including the Robustly Optimized BERT Pre-Training Method (RoBERTa) architecture, and the architecture has learned the ACT tutoring logic. Using the BERT-based model for natural language processing (NLP) tasks, the analysis leads to the creation of a pre-trained deep learning language model of the method and system of the present invention, which can accurately recognize the text and its context in different languages / dialects, and by learning the tutoring logic of ACT, that is, training the learning network with the tutoring logic of ACT, the system can accurately identify the user's psychological flexibility / psychological rigidity process.
[0096] For example, the training database may be a Cantonese / Chinese ACT database centered in Hong Kong, China, specifically for parents of children with special needs, developed through the methods and systems of the present invention. In addition to capturing conversations between ACT experts and parents, the database also integrates expert-led feature engineering through the platform, including (1) highlighting keywords in conversations, (2) annotating ACT category principles to build ACT case conceptualizations, (3) identifying specific conversation keywords to indicate mental health severity, and (4) determining appropriate graded care, ACT-specific mental health interventions. These steps together promote a comprehensive learning process based on the deep learning method of the complexity of ACT tutoring logic.
[0097] It should be understood by those skilled in the art that different training databases can be used to train learning networks, preferably deep learning networks, based on different target languages / dialects, and if necessary, learning networks based on different languages can also be obtained through appropriate model conversion or adaptation processes. For example, when the system may be used to provide mental health advice or counseling to adolescents, different corpora based on conversations between adolescent patients and their counselors or health care providers can be used as training corpora for constructing new mental health status relationships for use by the system. The corpus can be annotated by experts or processed by supervised, semi-supervised or unsupervised learning techniques, and then used by the system to provide necessary mental health advice or counseling to the target group. Other groups that may benefit from the system include, but are not limited to, the elderly, children, students, teachers, workers, disaster relief personnel and victims, emergency personnel, law enforcement personnel, military personnel, medical personnel, social workers, unemployed people, patients, socially vulnerable groups, disadvantaged groups, displaced groups, ethnic minorities, prisoners, or any group that needs mental health advice or counseling.
[0098] The pre-trained deep learning language model of the method and system of the present invention can accurately identify and classify the user's psychological flexibility and / or rigidity processes (e.g., experiential avoidance, cognitive fusion, attachment to the conceptualized self, lack of present awareness, and inaction / impulsivity in the pursuit of valuable goals) and / or the three major categories of flexibility and rigidity, including emotional avoidance, rule following, and behavioral avoidance in the dialogue text of the consultation session.
[0099] As mentioned earlier, system users can "chat" with the system just as they would with a real consultant. Figure 2 , a chatbot, hereinafter referred to as "AI chatbot" 202, is provided for asking one or more predetermined questions to a user in an ACT counseling session and receiving text input 204 from the user. In the present disclosure, a counseling session can broadly refer to a period in which a user seeks mental health advice or uses a system to provide mental health advice in accordance with an embodiment of the present invention. In addition, the AI chatbot 202 also facilitates displaying various information, such as questions and analysis results or outputs 206 related to the user's mental health status to the user and a medical professional or counselor (who is also a user of the system, but from the perspective of helping the patient user).
[0100] Preferably, the AI chatbot 202 can be implemented on a user device, such as a mobile application executable on a device such as a smartphone or tablet. The AI chatbot 202 is supported by a support learning network, enabling users to interact with the system 200 through a mobile application, just like talking to an actual consultant, simulating human-like interaction through the mobile application. In addition, in some example embodiments, cloud services and / or databases can be accessed through the mobile application. For example, the database and possible model parts can be dynamically updated and provided as a cloud service, thereby keeping the mobile application lightweight.
[0101] In a preferred embodiment, the AI chatbot 202 is further supported by an external large language model (LLM) processing engine 208 or a natural language processing (NLP) engine to enhance the generation of context-relevant responses to interact with users through the AI chatbot.
[0102] For example, refer to Figure 3In one embodiment, the methods and systems of the present invention are configured to integrate AI-driven ACT logic models with third-party LLM / NLP models (e.g., OpenAI), which can be used to answer general questions and provide empathic responses. In addition, the methods and systems of the present invention include a text-to-speech chatbot module that mimics the human responses of a trained ACT counselor, enabling users to engage in empathic conversations and receive personalized mental health interventions, including assessments, consultations, process-matched ACT intervention modules using text, audio recordings, and / or video animations, and personalized graded care interventions based on ACT principles, implemented through a mobile application 300 named "Pai.ACT".
[0103] In this example, a user device that installs or runs Pai.ACT 300 may collect text input 204 through a questionnaire and / or through a conversation with an AI chatbot 202, which may be further processed to determine the user's mental health status. In addition, Pai.ACT 300 may also provide functionality, including interactive operations configured to make appointments with counselors and promote mental health services. For example, if the Pai.ACT application 300 determines that more intensive mental health support is needed, the user can be configured to meet with an ACT counselor in real time. In addition, Pai.ACT may provide users with questions commonly used in ACT therapy in the form of questionnaires and / or one or more chat conversations.
[0104] In one example embodiment, the questions or question bank used in the AI chatbot can be generated, customized, or enhanced after the initialization step is completed. For example, this step may occur after a user interacts with an AI chatbot that simulates an initial ACT counseling session, or after a user completes a live ACT counseling session, using data from this conversation to optimize the questions or question bank. Alternatively, initialization may involve a self-report assessment that assesses symptoms of anxiety, depression, stress, and psychological rigidity or psychological flexibility. As a result, subsequent counseling sessions are tailored specifically to the user, providing customized questions for different users whose care roles in real-life scenarios may vary. This customization ensures that the therapeutic interaction is relevant and sensitive to each user's personal situation.
[0105] The deep learning-based methods and systems of the present invention play a dual role as both a mentoring platform for ACT learners around the world and a foundational resource for learners to understand the principles of ACT real-life counseling. The methods and systems of the present invention are critical in promoting a comprehensive understanding of the therapeutic approach while also serving as an influential platform for cultivating a growing community of ACT experts. By skillfully establishing a seamless connection between theoretical knowledge and its practical application, the methods and systems effectively address a critical gap in the training continuum. As a result, they lay the foundation for cultivating a cadre of highly skilled ACT practitioners.
[0106] exist Figure 3 In the preferred embodiment shown, the mental health consultation system 300 includes an AI chatbot logic module 302, which may include multiple components. The first component is a knowledge database 304, which is composed of statistical data 210 collected when the user interacts with the AI chatbot 202 (see Figure 2 ), question summaries, and a customized question bank that is dynamically and continuously updated, which is specifically designed to mimic the life-situational and problem-oriented interviews that interventionists or counselors would have with users in an initial live-action ACT counseling session.
[0107] As previously mentioned, the records of the interactions between the interventionist or counselor and the patient in the ACT counseling session (i.e., the corpus) can be used as the (initial) knowledge database for establishing the AI chatbot logic module 300. It should be understood by those skilled in the art that the knowledge database 304 can be replaced with any relevant corpus according to its application, including the early and late stages of ACT counseling. For example, the training corpus can be customized for specific demographics or conditions according to different applications, such as ACT counseling for elderly care, youth care, chronic disease management, or general population care.
[0108] The second component is an external large language model (LLM) 306, such as GPT-3.5-turbo, GPT-4 and / or GPT-4Turbo, in conjunction with Azure OpenAI services to enhance the ability of users to generate contextually relevant responses when interacting with the AI chatbot 302. The model is responsible for processing user input and generating corresponding responses and is at the core of language-based interactions within the application. In addition, the framework of the chatbot logic module can be seamlessly integrated into a user program interface, such as a mobile application executable by a user's device. In addition, through the AI chatbot 202, users (such as but not limited to Chinese native parents of children with special needs) can also utilize text-to-speech capabilities to convey their mental health needs when interacting with the chatbot-based ACT counseling logic model.
[0109] Alternatively, external LLMs 306 provided by other service providers may also be utilized to enhance the AI chatbot 202 or text processing capabilities. Such enhancements may significantly improve the user experience, making interactions with AI-based consultants more human. Furthermore, it is contemplated that at least some LLMs may be deployed locally, while still being fully external in certain example embodiments. This flexibility allows for customized integration based on specific implementation needs or requirements.
[0110] In addition, the language model 306 can also pre-process the text input (i.e., classify the text input according to mental rigidity and / or flexibility processes) before applying the mental health status relationship to identify the user's mental health status. Users may provide erroneous or inaccurately worded responses, such as typing with typos or grammatical errors, and pre-processing the text input, such as removing stop words, lowercasing, punctuation normalization, back translation, and data augmentation, can help improve the accuracy of mental health status / state determination based on the classification of the pre-processed text input.
[0111] The third component is irrelevant handling 212, where the AI chatbot demonstrates an enhanced ability to adjust its line of inquiry when faced with irrelevant responses from users. Preferably, it is able to autonomously initiate and maintain interactions with users, guiding the conversation to extract more relevant information to enrich downstream processes such as detection tasks or classification of text input.
[0112] For example, when at least one irrelevant response is detected during an ACT consultation session in which a user interacts with an AI chatbot, such detected interruption 214 may trigger irrelevant processing 212, where a confirmatory response from the user is obtained before further processing (i.e., classifying or labeling) the response provided by the user. During irrelevant processing, the AI chatbot 202 may adjust the line of inquiry when it is determined that the user response is irrelevant. For example, if a predetermined number of irrelevant responses are detected, an additional round of questions may be provided to the user.
[0113] In another example, when it is determined that the user may be losing focus or unable to provide responses relevant to the ACT treatment or mental health advice sought, the AI chatbot 202 can autonomously initiate and maintain interaction with the user and guide the conversation to extract more relevant information to identify the user's mental health state.
[0114] Additionally, the chatbot 202 or LLM 208 may detect other critical interrupts, such as an indication of a risk of self-harm, which would prompt an immediate request for human intervention from an operator or counselor. Alternatively, it may issue a warning to the user suggesting an immediate consultation with a physician or psychologist. In the event that the chatbot 202 or LLM 208 determines that additional or confirmatory information is required, these interruptions will trigger further interrupt handling processes as needed.
[0115] In an exemplary embodiment, there may be multiple architectural components and a sequence of processes within Pai.ACT 300 that trace the path from user input to final output. The architecture is intended to enhance the functionality and responsiveness of the AI chatbot. It is particularly directed to optimizing the use of trained LLM 308 and effectively managing irrelevant responses during interaction with the AI chatbot, preferably including the ability to handle irrelevant processing 212 as previously described.
[0116] Preferably, the processing of text input 204 may include the following steps:
[0117] (i) User input: This step represents the initial stage of collecting text data through interactions with the AI chatbot (e.g., when parents use the AI chatbot in Pai.ACT) or during service sessions (e.g., when parents receive existing ACT counseling services).
[0118] (ii) Retrieval-augmented generation (RAG 314): In this phase, information is obtained from the knowledge base by using identifiers such as user_id and conversation_id. Its role is to provide contextually relevant information to inform the subsequent response.
[0119] (iii) Thinking Chain: Here, the system adopts a structured approach, using prompts that provide intermediate steps to enable the LLM to navigate through a series of logical steps.
[0120] (iv) Few-Shot Learning (FSL): This step relies on demonstration pairs to provide the model with explicit examples of the target input-output relationship. This is valuable for training the model to interpret subtle or domain-specific cues. Within Pai.ACT’s treatment scope, certain scenarios or challenges may rarely occur but still be critical. Through few-shot learning, Pai.ACT is able to skillfully handle such rare situations with limited examples. This step also enables Pai.ACT to tailor its responses based on a concise series of interactions, facilitating a more personalized user experience.
[0121] (v) Large Language Model (LLM): This step involves the main language model processing the data and forming a response.
[0122] (vi) Output parsing: After the LLM generates a response, this step involves parsing the unstructured output into structured data so that the system can interpret and utilize it effectively.
[0123] (vii) Irrelevant handling: If the system identifies an irrelevant response based on a predefined threshold, this step triggers the chatbot to request further clarification or additional information from the user.
[0124] (viii) AI Chatbot: This step may represent an overall system that coordinates the above modules, ensuring seamless data flow and continuity of operations.
[0125] (ix) Portal: This step displays an interface, such as a user dashboard, that provides statistics related to the chatbot’s performance, with an emphasis on the management of irrelevant responses.
[0126] In addition, the system of the present invention includes a comprehensive data visualization module that is capable of displaying statistics about query-response pairs and different users' tendencies toward irrelevant responses. For example, a portal website can be provided for displaying output 206 related to the user's mental health status, as well as statistics on detected irrelevant content and irrelevant frequency / incidence. Thus, the system operator can obtain a clear snapshot of current user metrics and the quality of conversational sessions with the AI chatbot. In addition, an operation interface supported by cloud services and CMS databases can be provided to import data and visually analyze users' mental health status and chat records. This analytical capability not only gives operators deeper insights, but also significantly helps to optimize LLM applications within the ACT framework.
[0127] The fourth component is the artificial intelligence (AI) chatbot logic model, which is responsible for the logical control of the chatbot’s question flow and the detection of user input intentions. It serves as the core to integrate different components to perform input and output parsing, data query and update, apply retrieval enhanced generation (RAG) 314, few-shot learning, and thought chaining to data flow methods.
[0128] As previously described, the AI logic model can be a pre-trained natural language processing (NLP) model based on the Bidirectional Encoder Representation (BERT) architecture, which has learned the ACT consultation logic (i.e., ACT framework 310) and is specifically used to identify six psychological flexibility and / or rigidity processes in the dialogue text generated during the user's interaction with the AI chatbot - classification module 312. The AI logic model can accurately classify psychological flexibility and / or rigidity processes and identify the most common flexibility and / or rigidity processes in the dialogue text when the user interacts with the AI chatbot, thereby informing the process matching ACT intervention module of which processes should be targeted first through text, audio recording and / or video animation. The AI logic model imitates the ACT interventionist or counselor's understanding of the user's life environment and psychological challenges in a real ACT session.
[0129] The approach and system based on the integration of the above four components are carefully designed to foster a user-friendly environment that facilitates seamless engagement in conversations in high-pressure situations. As a result, the burden on counselors to conduct exhaustive mental health assessments is significantly reduced while maintaining an excellent user experience.
[0130] In order to improve the performance of the AI chatbot logic module, the AI logic model is integrated with a third-party NLP model (such as OpenAI), which may have the ability to answer general questions. On the other hand, the AI logic model is designed to handle situations related to ACT. By integrating the AI logic model with OpenAI, the method and system of the present invention can improve the overall effectiveness of the AI chatbot logic module by improving the accuracy and naturalness of general answers while maintaining a focus on conversations related to ACT.
[0131] In addition, this integration enhances the smoothness of the dialogue flow between questions and answers. Therefore, the chatbot logic module of the mental health consultation system of the present invention provides consultation based on ACT knowledge and can answer general questions more effectively to improve user experience.
[0132] In an exemplary embodiment, a parent (or family caregiver) of a child with special educational needs may seek mental health advice and begin an initial ACT counseling session by using the Pai.ACT application 300. After completing the initial assessment questionnaire, the user can begin a "chat" by interacting with the AI chatbot using the voice-to-text feature. During the initial counseling session, the AI chatbot provides customized questions to the user, and the user can answer these questions accordingly, simulating an interaction with a human ACT counselor. Once the user has answered all questions, the system captures and processes all responses provided by the user (i.e., text input 204), classifying all keywords that may be related to ACT therapy. After the session, the system assesses the user's mental health state 206, focusing on psychological rigidity (or flexibility) processes. These include experiential avoidance (or acceptance), cognitive fusion (or cognitive dissociation), attachment to a conceptualized self (or observing self), conceptualized past and fear of the future (or focus on the present), lack of value clarity (or value clarification), and inaction, impulsivity, or avoidance of persistence (or committed action). These assessments are shown in the radar chart 400 as Figure 4 As shown. Based on this comprehensive analysis, the system provides process-matched ACT suggestions designed to enhance the user's psychological flexibility. Suggestions may include guidance on acceptance, cognitive defusion, observing self, focusing on the present, values clarification, and committed action. These suggestions are roughly divided into three actionable strategies: "Openness", "Live in the Present", and "Do What Matters". Each strategy targets a specific tendency towards psychological rigidity, such as emotional avoidance, rule following, or behavioral avoidance. These tailored suggestions are designed to promote meaningful improvements in the user's psychological health and behavioral responses.
[0133] According to one embodiment of the present invention, a method for training a learning network is also provided, as described above, comprising training the learning network using at least one of the steps of collecting data, preprocessing data, word segmentation, model prediction, model evaluation, and optimizing hyperparameters.
[0134] Training can be based on machine learning to build a deep neural network for analyzing the user's psychological condition. In particular, the machine learning engine of the classification module 312 can be trained by conversation data between parents and counselors during actual counseling sessions, which are ACT counseling based on real-time video conferences, and the data can be manually marked or labeled by ACT experts. The conversation between the user and the AI chatbot is then classified using machine learning methods, thereby facilitating the method to understand the user's mental health condition through the perspective of the acceptance and commitment therapy (ACT) framework.
[0135] The training of the classification module 312 includes a training process step and a system testing process step. The training process step is used to train the machine learning processing engine, while the system testing process step is used to test / use the machine learning processing engine.
[0136] Preferably, the training process unit is configured to perform the following steps.
[0137] Data Collection - Collect large-scale Cantonese-based text data, such as transcription data collected from video conferences between experienced ACT counselors and parents of children with special needs, and therapeutic conversations during individualized ACT consultations.
[0138] The transcription data 304 is then classified and labeled by an ACT expert to identify six psychological flexibility and / or rigidity processes (transdiagnostic processes that inform acceptance and commitment therapy, including experiential avoidance, cognitive fusion, attachment to a conceptualized self, conceptualized past and fear of the future, lack of value clarity, and inaction, impulsivity, avoidance persistence) and / or three major categories of flexibility and / or rigidity processes, including emotional avoidance, rule following, and behavioral avoidance, in the conversation texts generated during the user's interaction with the AI chatbot. These labeled texts are used for training the retrieval-based deep learning engine embedded in the method and system of the present invention to improve its accuracy and performance.
[0139] Data Preprocessing - During the data preprocessing step, certain “stop words” like “a”, “the” or “is” that lack substantive meaning are eliminated, reducing data noise and highlighting more important terms, such as words that can be classified as “experiential avoidance”, one of the key psychopathological processes. In addition, punctuation, symbols, and special characters that do not constitute classification are removed to enhance data cleanliness and simplify input. Next, data augmentation is performed using techniques such as RoFormerV2, back-translation, and libraries such as JioNLP and nlpcda to enrich the diversity and quality of the dataset.
[0140] In a preferred embodiment, data preprocessing may include the following parts: stop word removal: remove stop words according to a custom stop word list; lowercase conversion: convert uppercase words to lowercase to maintain uniformity; punctuation normalization: convert full-width punctuation to half-width punctuation to ensure consistency; back translation: use the online translation API to perform back translation and expand the training data set; data enhancement: further enhance the training data set through techniques such as rewriting or synonym replacement.
[0141] Tokenization - The input text is then divided into individual tokens which correspond to the smallest meaningful units in the text like words or subwords and are associated with a vocabulary book. Tokenization based on a transformer model like the vocabulary book designed by "*hfl / chinese-roberta-wwm-ext*".
[0142] Domain transfer learning of pre-trained models - Pre-trained models can be beneficial when working on specific tasks such as previously performed classification tasks. Through the process of domain transfer learning, such models can be fine-tuned to achieve excellent performance within a specific domain. The domains of interest include Cantonese and Acceptance and Commitment Therapy (ACT). In this case, due to the large amount of conversational data collected from users in Hong Kong, China, it was further involved to pre-train the model using these unannotated datasets. The additional pre-training aims to improve the model's ability to understand and respond to the unique language and therapy characteristics of the target user group.
[0143] Prediction Model Logic Flow Unit - The Prediction Model Logic Flow Unit is based on Transformers, specifically on Bidirectional Encoder Representations (BERT) type pre-trained models (BERT and RoBerta).
[0144] In one embodiment, the pre-trained model utilizes the Roberta pre-trained model under the transformer model, such as "hfl / chinese-roberta-wwm-ext", and wraps a model such as "BertForSequenceClassification", which has two layers ([Dropout(p=0.1,inplace=False),(Linear(in_features=1024,out_features=6,bias=True))]) attached to adapt to the classification task of the present invention.
[0145] Preferably, the learning network may be fine-tuned via an Adam optimizer with a cosine annealing scheduler and an integrated retrieval-augmented generation (RAG) framework 314, configured to retrieve data from a knowledge database.
[0146] In one embodiment, the Adam optimizer selected from the *torch.optim.Adam* module is used to optimize the model of the present invention during model training, using the following equation:
[0147] mt=β1*mt-1+(1-β1)*gt
[0148] vt=β2*vt-1+(1-β2)*gt 2
[0149]
[0150] gt: Gradients computed via backpropagation.
[0151] γ: learning rate, default is 1e-3.
[0152] β1,β2: coefficients used to calculate the running average of the gradient, preset to 0.9 and 0.99 respectively.
[0153] ∈: To avoid the denominator being 0, it is preset to a small value, such as 1e-8.
[0154] θt: New updated parameters after 1 optimization step.
[0155] A cosine annealing scheduler with soft restarts is employed to address several issues in the training phase such as getting stuck in a local minimum or unstable updates in the early stages. Two main factors such as (T0=5, Tmult=2) which contribute to the number of iterations for the first restart and the factor that determines the step to return to the maximum learning rate are utilized. More implementation details can be found in the CosineAnnealingWarmRestarts module of torch.
[0156] etat=etamin+1 / 2*(ηmax-ηmin)(1+cos(Tcur*π / Ti))
[0157] η: learning rate at the tth iteration.
[0158] Tcur: current iteration number.
[0159] Ti: The number of epochs between two warm-up restarts. Whenever Tcur=Ti, it can be multiplied by the factor Tmult.
[0160] T0: The number of iterations for the first restart.
[0161] Early stopping technique can be performed using patient number = 5 and min_delta = 1. Cross entropy loss is selected as the loss function when fine-tuning the model for downstream tasks.
[0162] When the validation loss deviates significantly from the training loss, this is a strong indication that the model may be overfitting. To mitigate potential problems, a technique called "early stopping" / "early stopping" is used:
[0163] Initiate min V alLoss=0,Counter=0
[0164] while True:
[0165] if valLoss>min ValLoss+Δ:
[0166] Counter++
[0167] if Counter>patience:
[0168] break
[0169] else if valLoss <min V alLoss:
[0170] Counter=0
[0171] Select cross entropy loss to calculate the loss between the input log and the target
[0172]
[0173] C: Number of categories
[0174] ·p i : True value
[0175] ·q i : Prediction logarithm
[0176] The constructed network can be evaluated by assessing the diagnostic ability of the classifier, such as by the receiver operating characteristic (ROC) method. More ideally, the system can be further evaluated by using a confusion matrix to improve the accuracy of the classifier in diagnosing and identifying mental flexibility and / or rigidity, thereby providing a comprehensive view of the overall performance of the model and determining whether the imbalanced class is mostly predicted as the dominant class.
[0177] To further improve the accuracy of the classification module 312 in identifying psychological flexibility and / or rigidity, a confusion matrix 316 can be employed, in which each row represents the actual category and each column represents the predicted category. The diagonal of the matrix 316 represents the correct prediction for each category, while the off-diagonal elements represent the location of the misclassification. The matrix 316 provides a comprehensive view of the overall performance of the model. By examining the elements in the matrix 316, it can be determined whether the imbalanced categories are mostly predicted as the main category. The matrix 316 also provides a detailed breakdown of the classifier's performance and can be expanded to true positives, false positives, true negatives, and false negatives in a one-to-one or one-to-many manner. By analyzing these categories, the classifier's precision, recall, and F1 score can provide detailed insights into its ability to correctly identify and classify psychological flexibility and / or rigidity. The analysis also discusses the granularity design of the target variable in the classification task, involving three-class classification and six-class classification.
[0178] Since the task is done by single-label classification instead of multi-label classification, accuracy, micro F1 score or macro F1 score is used. The micro F1 score is defined by the following accuracy equation:
[0179]
[0180] -TP: True Positive Cases
[0181] -FN: False Negative
[0182] - Accuracy: The ratio of true positive predictions to the sum of true positive and false positive predictions. It measures the correctness achieved in the positive predictions.
[0183]
[0184] TP is a true positive case and FP is a false positive case.
[0185] - Recall / Sensitivity: The ratio of true positive predictions to the sum of true positive and false negative predictions. It measures the ability of the classifier to find all positive instances.
[0186]
[0187] Where P is the true positive case and FN is the false negative case.
[0188] - Specificity: The ratio of true negative predictions to the sum of true negative and false positive predictions. It measures the ability of the classifier to correctly identify negative instances.
[0189]
[0190] -TN: True negative cases
[0191] -FP: False Positive
[0192] -NPV (Negative Predicted Value): The ratio of true negative predictions to the sum of true negative and false negative predictions. It measures the accuracy achieved in negative predictions.
[0193]
[0194] -TN: True Negative Cases
[0195] -FN: False Negative Cases
[0196] - Confusion Matrix: In multi-class classification, the confusion matrix 316 has dimensions N times N, where N is the number of classes.
[0197] Rows represent actual categories
[0198] Columns represent predicted categories
[0199] The diagonal line from the upper left corner to the lower right corner represents the true positive counts for each category
[0200] Off-diagonal elements represent misclassifications
[0201] Receiver Operating Characteristic (ROC) curve: See Figure 5 and Figure 6 , the ROC curve shows the diagnostic ability of the classifier under varying discrimination thresholds. This plot is created by plotting the true positive rate (TPR / recall / sensitivity) against the false positive rate (FPR) at various threshold settings. The one-to-many or one-to-one and average approach is used to extend to multi-class classification scenarios.
[0202]
[0203] -One-to-many approach
[0204] 1. For each category: Binarize the prediction n (determine 1 as the positive class and the other labels as negative classes).
[0205] 2. Choose a threshold value based on each predicted value in the dataset.
[0206] 3. Calculate the TPR and FPR for each category and plot the ROC curve.
[0207] -One-to-one approach
[0208] 1. Choose 2 classes at random and mark 1 as positive and the other as negative.
[0209] 2. Choose a threshold value based on each predicted value in the dataset.
[0210] 3. Calculate TPR and FPR and draw ROC curve.
[0211] -Area under the ROC Curve (AUC) score: Figure 7 As shown, the AUC score quantifies the area under the ROC curve, summarizing the overall performance of the classifier under all possible area / threshold settings. An AUC of 0.5 indicates no discrimination ability (similar to random guessing), while an AUC of 1.0 indicates perfect discrimination.
[0212] Hyperparameters are configuration settings that are not learned during training but directly affect the performance of the model. Hyperparameter tuning involves systematically adjusting these settings to find the best combination that results in the best performance.
[0213] After the system is built and evaluated, the system can be tested in the system testing flow steps, which include at least sentence segmentation, data preprocessing, prediction, and post-processing steps, which are further explained below:
[0214] Sentence segmentation- Prediction inputs for multiple different ROIs can be created on an n-gram basis from the paragraphs collected by the AI chatbot.
[0215] - Sentence segmentation process
[0216] 1. Define n = 3, segment list = […]
[0217] 2. Segment the sentences according to the segment list → [List of sentence fragments in order]
[0218] 3. Generate multiple inputs based on different ROIs
[0219] For example, n=2: [aaa,bbb,ccc]→[[aaa],[bbb],[ccc],[aaa bbb],[bbb,ccc]]
[0220] Returns 5 possible inputs for prediction
[0221] Data preprocessing - remove stop words like "a", "the" or "is" that have no significant meaning to reduce data noise and focus on more important words.
[0222] Additionally, remove punctuation, symbols, and special characters that do not aid classification to clean the data and simplify entry.
[0223] Predictive Model Inference - The generated input batch is input into the predictive model of the present invention and outputs a probability distribution of the target class.
[0224] Post-processing - predictions must exceed a confidence threshold to be considered valid, and "none of the above" cases are excluded.
[0225] -Confidence threshold of the probability distribution: If the probability is less than the threshold, the sentence is considered not to belong to any of the six categories.
[0226] 1. Probability distribution p = [x, y, z, ...]
[0227] 2. Return the highest k probabilities, the parameter is topK
[0228] 3. Arrange the probabilities in descending order
[0229] 4. For i in the probability list:
[0230] If probability > threshold:
[0231] Return prediction
[0232] Otherwise returns None of the above
[0233] -Non-maximum suppression can be performed on these input batches and requires computing the Intersection over Union (IoU).
[0234] - Non-maximum suppression
[0235] 1. Define an empty list B nms =Φ
[0236] 2. Sort the segment processing output in descending order by prediction result →
[0237] 3. For S i :
[0238] for The remaining S j :
[0239] If IOU(s i ,s j )>IOU threshold :
[0240] from Remove S j
[0241] 4. Return the final
[0242]
[0243] The final results can be returned by the method and system of the present invention for further analysis.
[0244] In one embodiment, NLP models, particularly language models such as "hfl / chinese-roberta-wwm-ext", can be fine-tuned and customized by leveraging the collected data. The process involves adapting the pre-trained model to better understand the unique vocabulary, expressions, and conversational styles associated with parents of children with special needs.
[0245] In another embodiment, domain-specific language capabilities can be enhanced. In particular, the system's understanding of domain-specific terminology and language patterns related to Acceptance and Commitment Therapy (ACT) and the challenges faced by parents of children with special needs. This process may involve building a custom vocabulary or embedding domain-specific knowledge of ACT into the model.
[0246] In another embodiment, the scalability and performance of the present invention may be optimized by improving the architecture and infrastructure of the entire back-end and front-end methods and systems to handle increased user demands.
[0247] In another embodiment, long-term data collection and effectiveness testing are enhanced by continuously collecting user data. In addition, user interactions with chatbots and other Pai.ACT features, results (e.g., mental health results after 6 to 12 months), and user feedback can be analyzed to optimize Pai.ACT.
[0248] In an example evaluation process, the "User Input" component can serve as the main source of data acquisition, capturing information through AI chatbot interactions or specific service sessions. After data collection, the module passes the acquired data to the AI chatbot, which acts as the central processing unit of the system. In this module, real-time computational operations are performed to generate contextually appropriate prompts and responses. At the core of the AI chatbot's performance is the knowledge database, which contains the key data required to implement Retrieval Augmented Generation (RAG) 314. The database 304 stores quantitative and qualitative indicators related to user behavior, including but not limited to indicators of self-harm tendencies, conversation engagement, interaction time, and average response length.
[0249] Additionally, the utilization of question summarization algorithms enhances the contextual understanding capabilities of LLM, facilitating more personalized responses. The knowledge database is dynamic and continuously updated by the AI chatbot. During data processing, the AI uses predetermined prompt templates, calibrated to fit the chain thinking paradigm. After completing the processing phase of LLM, the generated output is evaluated through final metrics to determine its relevance and appropriateness.
[0250] Furthermore, to enhance the robustness of the system, irrelevant handling 212 is integrated. When LLM detects potential inconsistencies in contextual relevance, the irrelevant handling process is activated. It includes launching auxiliary conversation sessions to collect more relevant user data, displaying statistical indicators related to the relevance performance of different LLM iterations, and suggesting proactive user interactions to optimize the acquisition of relevant information. As a result, a layer of system adaptability is added and more meaningful interactions with users are ensured.
[0251] It was observed that the system's performance evaluation method relies on two key metrics. The initial metric focuses on the accuracy of irrelevant response detection, based on data previously collected from the AI chatbot or service session. Calculating this metric may require minimal labeling tasks by the operator. The second metric involves the effectiveness of the chatbot's function to proactively prompt for additional information when receiving irrelevant user input. Subsequent user responses are analyzed to determine the success rate of the AI chatbot's proactive data collection when faced with irrelevant input. As data accumulates, optimization of the system design is performed, including the RAG system and prompt design. User engagement, diagnostic accuracy, and algorithm fidelity of the high-level system are calculated.
[0252] refer to Figure 8, the core components of the system 800 and its example applications are shown. In this example, (1) a mobile application 802 named "Pai.ACT" can be used for user data collection and mental health services, where the application 802 can be installed on a user device 810; (2) a cloud service and database 804 of a content management system (CMS); and (3) a machine learning engine platform 806 including modules that support the aforementioned chatbot infrastructure. The mobile application 802 is used by users 808, such as parents of children with special educational needs, to collect information through questionnaires and conversations with the AI chat system, and also provides the function of making appointments to meet with counselors and conducting interactive operations for mental health services. The cloud service and database of the CMS not only provide operators 812 (such as members of the ACT research team) with the ability to import data, but also operate devices 814 to visualize user psychological state analysis, chat records, and other information. The machine learning component 806 acts as an engine to provide functionality for the aforementioned chatbot infrastructure by hosting an AI chatbot and a classification model using BERT, and provides functionality to the backend through a restful API. Additionally, machine learning can be performed by dynamically training an updated database 816 after a consultation session initiated by user 808 ends, incorporating chat transcripts and / or operator-imported data.
[0253] These embodiments may be advantageous for the system to be able to provide a retrieval-based mental health counseling platform with domain expertise in Acceptance and Commitment Therapy (ACT) counseling logic. Through a speech-to-text module embedded in an AI chatbot, it is intended to autonomously assess the basic psychopathological processes experienced by parents of children with special needs, covering six psychological flexibility and / or six psychological rigidity processes (a transdiagnostic process including experiential avoidance, cognitive fusion, attachment to conceptualized self, lack of present awareness, and inaction / impulsive behavior in the pursuit of valued goals) and / or three pillars of flexibility and / or three pillars of rigidity, including emotional avoidance, rule following, and behavioral avoidance.
[0254] Advantageously, the methods and systems subsequently provide therapeutic interventions consistent with ACT principles. By providing real-time, early counseling services covering assessment, intervention, and follow-up, the methods and systems of the present invention are configured to validate their perceived effectiveness and utility in improving the mental health of parents coping with children with special needs. An important consequence of the methods and systems of the present invention is their inherent ability to reduce the operational burden on frontline mental health practitioners.
[0255] Additionally, through an intuitive mobile application with real-time, personalized support, the methods and systems of the present invention have the ability to relieve emotional burden, enhance parental well-being, and improve the overall quality of life for parents and children. Advantageously, by providing 24 / 7 mental health support to Chinese-speaking parents, Pai.ACT can provide a one-stop, effective, highly accessible, and low-cost mental health counseling system and method for all Chinese-speaking parents of children with special needs, ultimately improving the overall well-being of these vulnerable families. In addition, when the system detects interruption conditions, such as threats to the well-being of the user or family members (e.g., self-harm, physical harm to others, etc.) or potential emergencies, or requests for specific services or information, the system is also able to detect these interruption conditions and provide assistance to the user (e.g., information reference, appointment with a medical professional, or direct contact with emergency services or social workers).
[0256] In addition, the system provides the following advantages in different applications:
[0257] Expanded Services and Subscriptions: Partners and NGO partners working with the inventor have the opportunity to take advantage of Pai.ACT’s comprehensive maintenance services. These services include personalized ACT consultations and professional ACT training subscriptions for prospective professionals. The Pai.ACT mobile app and its associated deep learning training models strategically offer flexible application / pricing models, including subscription-based plans, one-time fee options, freemium models with in-app purchases, and pay-per-service structures. This multifaceted pricing strategy not only ensures user satisfaction, but also provides a revenue-generating mechanism for the platform.
[0258] Adaptability and Retraining: The system demonstrates significant scalability through Pai.ACT’s user-chatbot interactions and, in some cases, through interactions with ACT counselors. This inherent flexibility strategically positions Pai.ACT as a multifaceted solution with broad applicability, significantly expanding its market potential.
[0259] Enhanced AI chatbot capabilities: The AI chatbot in Pai.ACT demonstrates the ability to recalibrate its questioning logic when encountering irrelevant responses. It has the autonomy to proactively engage and interact with users to obtain more relevant information, which subsequently enhances downstream tasks such as detection tasks.
[0260] Comprehensive Data Visualization: A notable feature of the system is its ability to display statistics on query-response pairs and different users’ propensity towards irrelevant responses. This approach provides system operators with a clear snapshot of current user metrics and the quality of ongoing conversational sessions. Such insights not only empower operators with a deeper understanding, but also provide a rich contribution to leveraging LLM in the ACT domain.
[0261] Global Expansion and Cross-Border Collaboration: With its expertise in Chinese, including Cantonese, Pai.ACT is poised to support Cantonese-speaking families around the world, especially those with children with special needs. Pai.ACT’s adaptive framework, designed to address psychological challenges using ACT counseling techniques, can be seamlessly adapted to different language and cultural contexts, thereby expanding its reach and unlocking new market opportunities around the world.
[0262] Although not required, the embodiments of the reference figures may be implemented as an application program (API) or a series of libraries for use by developers, or may be included in other software applications, such as a terminal or personal computer operating system or a portable computing device operating system. In general, program modules include routines, programs, objects, components, and data files that assist in performing specific functions, and those skilled in the art will understand that the functionality of a software application may be distributed among multiple routines, objects, or components to achieve the same functionality required herein.
[0263] Those skilled in the art will also understand that when the methods and systems of the present invention are implemented entirely or in part by a computing system, any suitable computing system architecture may be utilized. This includes stand-alone computers, network computers, and dedicated hardware devices. When the terms "computing system" and "computing device" are used, these terms are intended to encompass any suitable computing hardware configured to be able to implement the described functionality.
[0264] Those skilled in the art will appreciate that many changes and / or modifications may be made to the specific embodiments shown without departing from the spirit or scope of the invention. Therefore, the present embodiments should be considered as illustrative rather than restrictive.
[0265] Any reference to prior art in this document should not be taken as an admission that the information is common knowledge unless otherwise stated.
Claims
1. A method for providing mental health advice, comprising the following steps: - receiving text input from a user in a consultation session; - processing the text input by applying a mental health condition relationship to identify the user's mental health status; as well as -Providing output related to the user's mental health status.
2. The method according to claim 1, wherein the mental health condition relationship is trained by a deep learning network.
3. The method of claim 2, wherein the deep learning network is a deep neural network configured to identify a mental health state based on the received text input, the input being labeled by the deep neural network.
4. A method according to claim 3, wherein the text input includes the user's conversational responses to one or more predetermined questions in a question bank based on Acceptance and Commitment Therapy (ACT) knowledge in the counseling session.
5. The method according to claim 4, wherein the question bank is configured to simulate a life situation and problem-oriented interview between a counselor and the user in a real ACT counseling session to understand the user's mental health condition, which involves the state or process of psychological rigidity and / or psychological flexibility.
6. The method according to claim 5 further comprises the step of providing an artificial intelligence (AI) chatbot, wherein the AI chatbot is configured to ask the user one or more of the predetermined questions and receive the text input from the user in the consultation session.
7. The method according to claim 6, wherein the one or more predetermined questions are provided to the user in the form of a questionnaire and / or one or more chat dialogues.
8. The method of claim 4, wherein the question bank is generated after an initial real ACT counseling session between the counselor and the user.
9. The method of claim 4, wherein the question bank is generated based on a self-reported mental health assessment completed by the user, wherein the self-reported mental health assessment is related to an assessment of the user's anxiety symptoms, depressive symptoms, stress, psychological rigidity, or psychological flexibility.
10. The method of claim 6, further comprising the steps of detecting at least one irrelevant response provided by the user in the consultation session and obtaining a confirmatory response from the user.
11. The method of claim 10, wherein the AI chatbot is configured to adjust the line of inquiry upon detecting a predetermined number of irrelevant responses.
12. The method according to claim 11, wherein the AI chatbot is configured to provide the user with an additional round of questions when an irrelevant response is detected to obtain a confirmatory response from the user to accurately determine the user's mental health status.
13. The method according to claim 12, wherein the AI chatbot is further configured to autonomously initiate and maintain interaction with the user and guide the conversation to extract more relevant information to identify the mental health state of the user.
14. The method of claim 11, wherein the output comprises a number of occurrences of irrelevant items in the counseling session.
15. The method according to claim 6, wherein the AI chatbot is further supported by an external large language model (LLM) processing engine to enhance the ability to generate context-relevant responses to facilitate the AI chatbot to interact with the user.
16. The method according to claim 1 further includes the step of pre-processing the text input before applying the mental health condition relationship to process the text input to identify the mental health state of the user.
17. According to the method of claim 16, the preprocessing of the text input includes at least one of removing stop words, lowercase processing, punctuation normalization, back translation and data enhancement.
18. The method according to claim 1, wherein the psychological health status comprises psychological rigidity or psychological flexibility of the user.
19. The method according to claim 18, wherein the mental health state is associated with the following mental rigidity process or mental flexibility process: - Experiential avoidance or acceptance; - cognitive fusion or cognitive dissociation; -Conceptualized past and fear of the future or focus on the present; - Attached to the conceptualized self or the observing self; - Lack of values clarity or clarification; and -Inaction, impulsivity, and avoidance of sustained or committed action.
20. A method according to claim 4, wherein the deep learning network is a Bidirectional Encoder Representation Based Transformer (BERT) architecture, and a pre-trained natural language processing (NLP) model of ACT consulting logic has been learned, wherein the BERT architecture includes a Robustly Optimized BERT Pre-Training Method (RoBERTa) architecture.
21. A method for training a deep learning network according to claim 20, comprising training the deep learning network by at least one of the following steps: collecting data, preprocessing data, tokenizing, model prediction, model evaluation, and optimizing hyperparameters.
22. The method according to claim 21 further comprises the step of fine-tuning the deep learning network through an Adam optimizer and a cosine annealing scheduler, and integrating a retrieval-augmented generation (RAG) framework configured to retrieve data from the knowledge database.
23. The method according to claim 22, wherein the knowledge database is dynamic and continuously updated by chat statistics and question summaries.
24. The method of claim 22, wherein the deep learning network is evaluated by evaluating the diagnostic ability of the classifier and adjusting the discrimination threshold by a receiver operating characteristic (ROC) method.
25. The method of claim 24, wherein the deep learning network is further evaluated by using a confusion matrix to refine the accuracy of the classifier in diagnosing and identifying the psychological flexibility and / or the psychological rigidity process, providing a comprehensive view of the overall performance of the model and determining whether most of the predictions are imbalanced classes of the dominant class.
26. The method according to claim 21 further comprises the step of testing the deep learning network, which comprises at least one or more of sentence segmentation, preprocessing data, prediction and post-processing.
27. An Acceptance and Commitment Therapy (ACT) mental health counseling system based on deep learning, comprising: The AI chatbot according to claim 6 provided on a user device, wherein the AI chatbot is powered by a deep learning network; as well as Provides cloud services for content management systems (CMS) and databases.
28. The system according to claim 27, wherein the user device is configured to collect the text input through a questionnaire and / or through a conversation with the AI chatbot, and provide one or more of the following functions: - Matching ACT interventions to one or more processes of psychological rigidity or psychological flexibility; - Customized graded mental health interventions based on ACT principles; and -Schedule appointments with counselors and conduct interactions with mental health services.
29. The system according to claim 27 further includes an operation interface supported by the cloud service providing the content management system (CMS) and the database, wherein the operation interface is configured to facilitate importing data and visualizing the analysis of the user's mental health status and chat records.
30. The system of claim 27, further comprising a web portal configured to display output related to the user's mental health status and / or statistics related to detected irrelevant content and frequency / occurrence of irrelevant content.
Citation Information
Cited By
Method and system for generating MBTI psychological scale for specific scene
CN120878087A
A method and system for generating MBTI psychometric scale for specific scenarios
CN120878087B