My Role
Front-end Development, Software Model Architecture, Testing
Type
Academic Project
Team
Dominic Miranda, Lance Dias, Deepali Kayande
Timeline
July 2020 - April 2021
Backstory
The World Health Organization (WHO) estimates that India has a significant portion of its population that suffers from mental illness. Although many colleges in India have counseling services, most students either do not utilize them or are hesitant to open up. This inspired the creation of a tool that sheds light on mental health issues in academic institutions in India.
I worked on this project for my bachelor's thesis as a part of my coursework.
Problem
In India or Indian institutes, a substantial number of students experience mental stress or anxiety with limited or no resources to cope with them. This project aims to not only raise awareness about mental health but also offer assistance to these students through its focus on their needs.
Solution
The objective of this study is to comprehend the mindset of students and develop a tool that creates an effective platform for them to express their emotions. The chatbot will interact with students and offer suggestions to enhance their mental well-being. By utilizing medical-standard mental health questionnaires and classifying various parameters, the tool will make informed conclusions to aid the students.
Analysis and Design
We conducted a qualitative survey to analyze the nature of mental health problems that students in particular face. On the basis of frequency, we singled out certain recurring terms and cleaned our dataset as per these terms. The dataset consisted of anonymous patient-therapist conversation threads which were obtained via web scraping.
User Flow Pseudocode
A user flow was created to simulate a conversation between a patient and a therapist, keeping the architecture of the system in mind.
System Architecture
Users will be asked to fill in the questionnaire, namely, the WHO-5. The result of this questionnaire will be displayed. The user then proceeds to type their problems in the form of text to an embedded chatbot which will reply as per the problem using sentiment analysis and text generation (NLP). The front-end architecture involves HTML, CSS, and JavaScript along with a Flask server.
Implementation
The initial conversation with the chatbot is based on the WHO-5 standardized questionnaire. This is used to gauge the overall mental health of the user conversing with the bot. The chatbot can detect the underlying issue in the user’s comment/conversation and reply to the user through a text-generated response based on the training data used.
Response-generating Transformer model
The model used in this project is DialoGPT a pre-trained GPT-2 based model. It is fine-tuned on the selected dataset and tweaked to give a result, considering the available resources. The chatbot generates a response using the concept of context of the previous reply.
Responses generated by the fine-tuned model.
Here’s a short demonstration of the project.
Outcomes
This tool has achieved text generation with high-level grammar and sentence formation.
Implementation of the model as a chatbot was successful with an optimal UI interface.
The structure of the application is designed with the intent to familiarize the user with the process of mental health diagnosis, followed by qualitative analysis.
Based on this work, we published a research paper titled "CareBot: A Mental Health ChatBot" which was presented at the 2021 2nd International Conference for Emerging Technology (INCET).