An artificial intelligence program developed at "Alexandru Ioan Cuza" University of Iaşi (UAIC) analyzes posts on the X platform (formerly Twitter) to identify potential signs of depression and provides an explanation for its conclusion in plain language, the institution reports. In addition to the text content, the system also takes into account the time the post was published.
• The system combines the verdict with the explanation
According to UAIC, artificial intelligence systems can be used to monitor emotional states based on content published online, yet most offer only a verdict without explaining the underlying reasons. "In the field of mental health, simple classification is not enough," states Associate Professor Mădălina Răschip from the UAIC Faculty of Computer Science, who coordinated the system's development. According to the researcher, doctors, users, and researchers need to understand why a model classifies a post as indicating depression. Explanations can increase transparency and trust in the system and allow for verification that the model relies on relevant indicators rather than random correlations, Mădălina Răschip argues. UAIC notes that European Union legislation prohibits the use of artificial intelligence systems that detect human emotions in the workplace or in schools due to the risks posed to vulnerable individuals. In other contexts, such systems are classified as "high-risk" and must comply with requirements regarding decision explainability and human oversight, according to the institution's statement.
The research originated from a long-standing observation in the field suggesting that the time of day a person posts on social media can provide insights into their mental state. "We wanted to see if, in addition to the message content, the time of posting could also aid in detecting depression," explains Mădălina Răschip. The program first analyzes the post's text using an artificial intelligence model based on a Transformer neural network, known as BERT. The model interprets word meanings based on context and converts the message into a numerical representation. Information regarding the time of publication-specifically the time of day and day of the week-is then added to this representation. A third component subsequently generates an explanation for the verdict, word by word, based on the classification made and the time of posting.
• The system was trained on approximately 20,000 posts
Researchers from Iaşi trained the system on roughly 20,000 messages posted on X by 72 users. Half of the messages were labeled as associated with depression, while the other half were not. On the test set, the program correctly identified the verdict in 85% of cases. The authors chose the X platform because posts are public and display the exact time of publication-information essential for verifying the research hypothesis. Furthermore, according to the UAIC researcher, posts on X are short and spontaneous, often capturing a person's state of mind at a specific moment. The analysis indicated that posts classified as associated with depression appear more frequently during the night and early morning, whereas posts made around midday tend to receive lower scores. UAIC emphasizes that these trends are general patterns rather than strict rules.
• Explanations: harder to generate than the verdict
According to the UAIC statement, generating justifications proved more difficult than the classification process itself. Explanations previously generated using GPT-4 were used to train this component. The authors then generated explanations for the verdicts produced by the proposed model and compared them with the existing ones. The system-generated explanations conveyed a meaning similar to the originals, though lexical overlap was low. In other words, the program rephrased the explanations in its own words while capturing the post's core emotional message, according to the researchers from Iaşi.
























































