J udith J eyafreeda_ S tress I dent_ LT - EDI @ EACL 2024: GPT for stress identification (2024)

Abstract: Stress detection from social media texts has proved to play an important role in mental health assessments. People tend to express their stress on social media more easily. Analysing and classifying these texts allows for improvements in development of recommender systems and automated mental health assessments. In this paper, a GPT model is used for classification of social media texts into two classes - stressed and not-stressed. The texts used for classification are in two Dravidian languages - Tamil and Telugu. The results, although not very good shows a promising direction of research to use GPT models for classification.

## introduction emotion classification is a well-known and highlyutilised application in the field of text analysis. stress is a form of emotion. thus, stress classification is a particular case of emotion classification. stress is defined as a state of imbalance between one's internal demands and his/her ability to meet those demands @xcite , and is widely regarded as a medical problem @xcite . stress can be a potentially life threatening problem. stress can be identified from text, facial expressions, videos and audios of people. people express stress in different ways and forms. the field of identification of stress from text is an emerging research area. this is due to the fact that people have started to express themselves more comfortably on social media platforms with their friends and followers. in this work, we explore a method to classify social media text into stressed and non-stressed texts. the data from the task given in @xcite is in the dravidian languages of tamil and telugu. ## task description the task given in @xcite ) is a binary classification of social media posts in the languages of tamil and telugu. the two labels are "stressed" and "not stressed". the data from @xcite are given as separate sets for training, development and testing. ## related work there have been several studies in the areas of sentiment analysis and emotion classification. several ml methods have been developed for this purpose. @xcite presents a bidirectional long short-term memory (blstm) with attention mechanism to classify psychological stress and categorize the tweets based on their hashtag content, which gives the best performance. @xcite gives a review of all machine learning methods developed within the health sector, their advantages, their limitations and areas for further research. the authors reviewed papers on mental stress detection using ml that used social networking sites, blogs, discussion forums, questioner technique, clinical dataset, real-time data, bio-signal technology (ecg, eeg), a wireless device, and suicidal tendency. @xcite shows the accuracy of each ml model trained specifically for mental illness. pre-trained language models like elmo @xcite , openai gpt @xcite , and bert @xcite have moved natural language processing (nlp) passing into a new era. this has allowed the pre-trained model to play the role of the base, and this can be fine-tuned to respond to the nlp task. @xcite presented a method enhanced by lexicons. with respect to language of the text, there have been several works in the english language. however, works in dravidian languages have recently increased. @xcite @xcite presents an improvement of word sense translation for under-resourced languages. @xcite uses several machine learning algorithms which have been adapted to the task of multiclass classification sentiment analysis. @xcite suggests several machine language approaches to classify texts from code-mixed dravidian languages such as tamil, telugu, kannada and malayalam. @xcite uses a gpt model to perform a classification task on youtube comments in different dravidian languages. although, the results are not too high, this allows for further research to improve gpt models. ## proposed system in this work, gpt2 is used for classification of social media texts into stressful and non-stressful comments. the model is fine-tuned on the training dataset for each language, thus creating a task specific and language specific model. for the languages tamil and telugu, the text to be classified is transliterated to their english language equivalents, this approach has been inspired from (andrew, 2021) and @xcite . the labels for the task are in english language, thus transliteration is not required for this. pre-processing: similar to @xcite , a few steps of pre-processing is performed to get the accurate representation of the text. this involves the following: gpt models: generative pre-trained transformers (gpt) models are general-purpose language models that can perform a broad range of tasks from creating original content to write code, summarizing text, and extracting data from documents (gpt). generative pre-trained transformers (gpt) are a family of neural network models that uses the transformer architecture. these use a self-attention mechanism allowing to focus on different parts of the input text during the various stages on processing. the value of these models lies in their speed and the scale at which they can operate. in particular, gpt-2 model has 1.5 billion parameters and has been trained on 8 million web pages in a self-supervised fashion. @xcite provides a detailed description of the model. the model uses internally a mask-mechanism to make sure the predictions for the token i only uses the inputs from 1 to i but not the future tokens. this allows the model to learn the inner representation of the language, which can then be used to extract features for downstream tasks. gpt models for classification: although most use cases for a gpt involve text generation operations, recent research has shown that these models can also be fine-tuned for downstream tasks like classification. @xcite has used the gpt2 for classification of homophobic and transphobic comments from social media. as in @xcite , the python packages that allow the use of gpt models as in hugging face models are used along with other tools like nltk and textblob to allow cleaning of text. ## results and evaluation the performance of the classification system is measured in terms of macro averaged precision, macro averaged recall and macro averaged f1-score across all the classes (for both sub tasks). the scikit-learn 1 package is used for this purpose, similar to @xcite . the macro and weighted results for the task are shown in tables 2 and 3 respectively. overall, the results for the tamil language is better than that for the telugu language. language m.precision m.recall m.f1 ## conclusion from tables 2 and 3 , the results on the whole are not too high. this is an interesting result as the number of training data in both languages were similar with the exact same classes for classification. @xcite and @xcite suggest that using ipa substitutes for dravidian languages works well for certain machine learning approaches, however it might not be the best representation for a transformer based model. similarly, transliteration might not be the way to go with transformer models as well. choosing other forms of embedding dravidian texts could help improve the results.