<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>I2C-UHU at MentalRiskES 2023: Detecting and Identifying Mental Disorder Risks in Social Media using Transformer-Based Models</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Laura Vázquez Ramos</string-name>
          <email>laura.vazquez005@alu.uhu.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Carlos Moreno García</string-name>
          <email>carlos.moreno831@alu.uhu.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jacinto Mata Vázquez</string-name>
          <email>mata@uhu.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Victoria Pachón Álvarez</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>I2C Research Group. University of Huelva</institution>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper presents the approaches proposed by the I2C Group to address MentalRiskES: Early Detection of Mental Disorder Risks in Spanish, as part of IberLEF 2023. Our proposal involves developing distinct transformer-based classifiers to tackle three specific tasks: i) Task1a: Binary classification for the detection of eating disorders, ii) Task1b: Simple regression for the detection of eating disorders, and iii) Task2c: Multiclass classification for the detection of depression. The main approach consisted of fine-tuning pre-trained transformer-based models. For the binary tasks, diverse methodologies were employed to predict users based on the predictions obtained from their individual messages. For the multiclass task, data augmentation approaches were used to balance the minority classes messages. The final submitted predictions achieved a Macro-F1 score of 0.641 for Task1a, ranking 19th out of 22 participants; an RMSE of 0.24 for Task1b, ranking 4th out of 17 participants; and a Macro-F1 score of 0.232 for Task2c, ranking 4th out of 10 participants.</p>
      </abstract>
      <kwd-group>
        <kwd>1 Mental Health</kwd>
        <kwd>Early Detection</kwd>
        <kwd>Natural Language Processing</kwd>
        <kwd>Deep Learning</kwd>
        <kwd>Mental Disorders</kwd>
        <kwd>Transformer-based Models</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Additionally, data augmentation [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] was used for multiclass classification. Moreover, a study of
hyperparameters was conducted to ensure efficient training of the models.
      </p>
      <p>The subsequent sections of this paper are structured as follows: Section 2 provides an exploration of
related works, examining previous research carried out in the respective field. Section 3 outlines the
dataset and tasks. Section 4 details the different approaches used to achieve each task. Section 5 presents
the results and analysis obtained from the conducted experiments. Lastly, Section 6 offers conclusions
derived from the study.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related works</title>
      <p>The significant increase in the number of mental disorder cases due to the COVID-19 pandemic has
attracted a growing number of researchers to this field of study, resulting in various proposals and
methodologies.</p>
      <p>These proposals and methodologies are closely intertwined with the exponential growth of social
media worldwide. The information derived from this vast amount of social media data is crucial for
building these systems and conducting experiments.</p>
      <p>
        A survey was conducted to examine case studies involving experiments [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], encompassing a total of
forty approaches, all of which are related to the detection of mental disorders. This exemplifies the
current global importance of addressing this health issue. Furthermore, there have been studies
specifically focused on advancing the prediction and detection of eating disorders within these case
studies [
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ].
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Datasets and tasks</title>
      <p>The dataset supplied by the organizers comprises a collection of labelled messages transmitted to
group channels on the widely used Telegram platform. The corpus was split into three distinct subsets,
each associated with a distinct disorder. Each dataset encompasses several hundreds of users, with an
average message count of 50 per user.</p>
      <p>•
•</p>
      <p>Corpus eating disorders (Task 1): 175 users for training, and 150 for testing.</p>
      <p>Corpus depression (Task 2): 175 users for training, and 150 for testing.</p>
      <p>For each user, a json file was provided. Additionally, a distinct file containing the labels of each user
was provided as well. By utilizing both files, a training dataset was created. The labelling scheme
applied to each user's messages was consistent with the user's label. For instance, if a user was assigned
label 1, all their messages were individually labelled as 1.</p>
      <p>Two distinct training datasets were created, one for Task 1 and another for Task 2. The dataset for
Task 1 consists of five columns: user, message, date, label_1a (label for Task 1a), and label_1b (label
for Task 1b). Table 1 shows the structure of the training dataset for Task 1.</p>
      <p>On the other hand, the dataset for Task 2 is composed of 4 columns as it can be seen in Table 2:
user, message, date, label_2c (label for Task 2c).</p>
      <p>After constructing the datasets, they were split into three sets: train, test, and valid. The train and
valid sets were allocated 80% of the data, while the test set received the remaining 20%. Within the
train dataset, 10% was further allocated for validation. Table 3 shows the distribution of examples for
each dataset.</p>
      <p>The distribution of the classes in each created dataset can be observed in Table 4 and Table 5.
Furthermore, Table 6 provides an overview of the distribution specifically for Task 2c.</p>
      <p>As it was described before, this paper is focused on Task 1 (Task 1a and Task 1b) and Task 2 (Task
2c). Task 1a is a binary classification in which it must be detected if the user suffers from anorexia or
bulimia. Labels will be 0 for “control” (negative, the user does not suffer from eating disorder) or 1 for
“suffer” (positive). Task 1b is a simple regression in which a probability for the user to suffer anorexia
or bulimia must be predict. A value of 0 means 100% negative and a value of 1 would be 100% positive.
Finally, Task 2c is a multiclass classification. The system must predict one of the four classes
(“suffer+against”, “suffer+in favour”, “suffer+other”, “control”).</p>
    </sec>
    <sec id="sec-4">
      <title>4. Methodology and experiments</title>
      <p>In this section, we provide an in-depth explanation of the various methodologies employed to
address the tasks. We will delve into the specific experiments conducted for Task 1 and Task 2,
outlining the steps taken and the techniques employed. Additionally, we present the results obtained
from these experiments, which will be thoroughly analyzed and discussed in the subsequent sections.
In this section, we aim to provide a clear understanding of the experimental framework employed in
our study.</p>
    </sec>
    <sec id="sec-5">
      <title>4.1. Task 1: Eating disorders detection</title>
      <p>
        To perform Task 1a and Task 1b, different transformer-based models, available in the Huggingface
[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] library, were fine-tuned. The models used were BERT-base-uncased [8], beto-emotion-analysis [9],
BERT-base-spanish-cased [10], DeBERTa-base [11], RoBERTa-base [12] and XLNet-base-cased [13].
      </p>
      <p>In order to prepare the data for analysis, several preprocessing methods were applied. This involved
removing links, usernames, hashtags, and emojis from the text. By eliminating these elements, we
aimed to focus solely on the textual content and minimize any potential noise or distractions.</p>
      <p>Furthermore, to ensure optimal model training, a study of hyperparameters was conducted. This
consisted in exploring different combinations of hyperparameters values to identify the most effective
settings. To streamline this process, we leveraged the WandB tool, which provided valuable insights
and facilitated efficient experimentation. Our objective was to optimize the performance and accuracy
of our models by fine-tuning the hyperparameters, ultimately resulting in outcomes that are more robust
and reliable.</p>
      <p>After completing the training process and generating predictions for the individual messages, a user
prediction methodology was employed for each task. In the case of Task 1a, once labels were predicted
for each message of a user, a percentage-based approach was applied. The user's label will be
determined by considering the majority label among the predictions generated for their individual
messages. In other words, if a significant proportion of the user's messages are consistently predicted
to belong to a particular class, that class will be assigned as the user's label. This approach ensures that
the user's label reflects the prevailing classification consensus derived from their message predictions.
For example, if a user has 20 messages and 14 of them were classified as 1, the user was automatically
labelled as 1.</p>
      <p>The user's label was derived by computing the average value of the predictions assigned to their
individual messages. By aggregating the predicted values in this manner, we obtained a representative
label that captures the overall tendency of the user's messages. This averaging process allowed us to
capture the collective sentiment or characteristic exhibited by the user's messages and assign a label
that reflects their overall classification.</p>
      <p>Figure 1 shows a summary of the methodology used for Task 1.</p>
      <p>Once this first study was done, a new study of hyperparameters was carried out with the models that
obtained the best results in the previous experiment. The hyperparameter search was done using the
WandB tool with strategy grid. Table 8 shows the hyperparameters space used for this study. Each
model was trained with these combinations of hyperparameters, and the best four combination values
are shown in Table 9.</p>
      <p>Table 10 provides a comprehensive overview of the results obtained for Task 1a using the optimal
hyperparameters. By carefully selecting and fine-tuning the hyperparameters, we aimed to maximize
the performance and achieve the most accurate predictions for this specific task.</p>
      <p>In order to gain a deeper understanding of the failures, we conducted an analysis of the errors made
by the models. Specifically, we delved into the results obtained from the best model. Figure 2 depicts
the confusion matrix for H2-roberta-base-bne model when making user predictions. It is worth noting
that the model exhibits superior performance in classifying users who do not have an eating disorder.
A noteworthy observation is that 91% of users with an eating disorder were correctly classified, while
users without an eating disorder were classified with 100% accuracy.</p>
      <p>Upon examining the two users incorrectly labelled as 0 by the model, it becomes apparent that both
individuals made comments pertaining to topics such as the “gym” and “food”, including references to
“supplements”, “proteins”, “BCAAs”, and similar content. Such messages have the potential to confuse
the model since not all individuals making such comments necessarily have an eating disorder.
Consequently, correctly solving this task can prove challenging due to the nuanced nature of
distinguishing between individuals who genuinely require assistance and those who do not solely based
on such comments.</p>
      <p>Taking into consideration the best model results in Task 1a experiments, the two models with highest
results were trained to perform Task 1b. Results are shown in Table 11.</p>
    </sec>
    <sec id="sec-6">
      <title>Task 2: Depression detection</title>
      <p>To perform Task 2c, the model with best results in Task 1a was trained. The experiments done in
this task are focused on roberta-base-bne model as it was the one that obtained best scores. The first
phase of the study consisted of training the model mentioned before with the hyperparameter
combination H2.</p>
      <p>However, the results were not as expected, and another experiment was done. In addition to applying
the above hyperparameters, a data augmentation method was applied to the train dataset to improve the
results. Moreover, the training dataset has been restricted using only the three most representative
classes: "control", "suffer+against" and "suffer+in favour". This technique is justified on the grounds
that the "suffer+other" class could generate ambiguity during the model learning process, due to the
similarity of the messages with the other two classes, "suffer+against" and "suffer+in favour".</p>
      <p>The technique of back translation [14] was used with the minority classes, translating messages
from Spanish to English, English to French and French to Spanish. Table 12 shows the distribution of
the train dataset before and after the data augmentation method was applied.</p>
      <p>Once the individual messages of each user were predicted, a method was employed to determine the
class of each user. In this case, the classification of the user was determined by identifying the class that
received the highest frequency of predictions. By selecting the class that was most commonly predicted
across the user's messages, we aimed to assign a definitive label to each user that reflects the prevailing
classification consensus. Figure 2 shows the methodology used in this task.</p>
      <p>Results of both experiments are shown in Table 13, where Class 0 refers to “Control”, class 1
“Suffer+against”, class 2 “Suffer+in favour” and class 3 “Suffer+other”. The scores did not meet our
expectations and it could be improved in the future. The model H2-roberta-base-bne refers to the first
experiment. The second technique used is represented by the model H2-DA-roberta-base-bne, where
data augmentation was applied and the class “suffer+other” was ignored.</p>
    </sec>
    <sec id="sec-7">
      <title>5. Results</title>
      <p>For the evaluation phase, model H2-roberta-base-bne was used for Task 1a and Task 1b and
H2DA-roberta-base-bne model was used to overcome Task 2c.</p>
      <p>Our results [15] in the competition for Task 1a among the participants are shown in Table 14 and
Table 15. The results were not as expected, and it will be improved in future works.</p>
      <p>Table 16 and Table 17 show the results of the competition of Task 1b among the participants. In this
case, position 4 was achieved, so the strategies used to overcome Task 1a were more useful to carry out
this part of the task.</p>
      <p>The observed promising results can likely be attributed to the specific training technique employed.
By focusing exclusively on the three majority classes ("control," "suffer+against," and "suffer+in
favour") during the training phase, while bypassing the "suffer+other" class, it is plausible that the
model achieved heightened effectiveness, leading to favorable outcomes. This selective approach to
training allowed the model to concentrate its learning on distinguishing between the most prevalent
classes, potentially contributing to the attainment of highly satisfactory results.</p>
    </sec>
    <sec id="sec-8">
      <title>6. Conclusions</title>
      <p>In this paper, we presented our proposal for MentalRiskES (Early detection of mental disorders risk
in Spanish) and the results obtained in the shared Task for IberLEF 2023. Our approach consisted of
fine-tuning transformer-based models using models from Hugging Face library. Moreover, a study of
hyperparameters was carried out. Different approaches have been applied to each classifier to achieve
the proper results. Our final model for Task 1a achieved a 0.641 Macro-F1 and got the nineteenth
position in the ranking. For Task 1b, our model achieved a 0.240 RMSE and got the fourth position in
the ranking. Finally, for Task 2c our model achieved a 0.232 Macro-F1 and got the fourth position in
the ranking. It is worth mentioning the first place achieved in ERDE Multiclass Classification of Task
1c.</p>
      <p>In future works we plan to explore other techniques of creating ensemble as well as do more
exhaustive hyperparameters search for each classifier and apply this technique to make a real
investigation of the early detection of mental disorder on Telegram.</p>
    </sec>
    <sec id="sec-9">
      <title>7. References</title>
      <p>[8] Devlin, Jacob, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. BERT: Pre-training
of deep bidirectional transformers for language understanding. CoRR abs/1810.04805.
[9] Pérez, Juan Manuel, Juan Carlos Giudici, and Franco Luque. 2021. Pysentimiento: A python toolkit
for sentiment analysis and socialnlp tasks. arXiv Preprint arXiv:2106.09462.
[10] Wu, Shijie, and Mark Dredze. 2019. Beto, bentz, becas: The surprising cross-lingual effectiveness
of BERT. arXiv Preprint arXiv:1904.09077.
[11] He, Pengcheng, Xiaodong Liu, Jianfeng Gao, and Weizhu Chen. 2020. Deberta:
Decodingenhanced bert with disentangled attention. arXiv Preprint arXiv:2006.03654.
[12] Liu, Yinhan, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike
Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert
pretraining approach. arXiv Preprint arXiv:1907.11692.
[13] Yang, Zhilin, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R. Salakhutdinov, and Quoc V.</p>
      <p>Le. 2019. Xlnet: Generalized autoregressive pretraining for language understanding. Advances in
Neural Information Processing Systems 32.
[14] Sugiyama, Amane, and Naoki Yoshinaga. 2019. Data augmentation using back-translation for
context-aware neural machine translation. Paper presented at Proceedings of the Fourth Workshop
on Discourse in Machine Translation (DiscoMT 2019).
[15] Mármol-Romero, Alba María and Moreno-Muñoz, Adrián and Plaza-del-Arco, Flor Miriam and
Molina-González, María Dolores and Martín-Valdivia, María Teresa and Ureña-López, Luis
Alfonso, and Montejo-Ráez Arturo. 2023. Overview of MentalRiskES at IberLEF 2023: Early
detection of mental disorders risk in spanish. Procesamiento Del Lenguaje Natural 71.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Guntuku</surname>
            ,
            <given-names>Sharath</given-names>
          </string-name>
          <string-name>
            <surname>Chandra</surname>
            ,
            <given-names>David B.</given-names>
          </string-name>
          <string-name>
            <surname>Yaden</surname>
          </string-name>
          , Margaret L. Kern,
          <string-name>
            <surname>Lyle H. Ungar</surname>
          </string-name>
          , and
          <string-name>
            <surname>Johannes</surname>
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Eichstaedt</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Detecting depression and mental illness on social media: An integrative review</article-title>
          .
          <source>Current Opinion in Behavioral Sciences</source>
          <volume>18</volume>
          :
          <fpage>43</fpage>
          -
          <lpage>9</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Vaswani</surname>
            , Ashish, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones,
            <given-names>Aidan N.</given-names>
          </string-name>
          <string-name>
            <surname>Gomez</surname>
            , Łukasz Kaiser, and
            <given-names>Illia</given-names>
          </string-name>
          <string-name>
            <surname>Polosukhin</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Attention is all you need</article-title>
          .
          <source>Advances in Neural Information Processing Systems</source>
          <volume>30</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Shorten</surname>
            , Connor,
            <given-names>Taghi M.</given-names>
          </string-name>
          <string-name>
            <surname>Khoshgoftaar</surname>
            , and
            <given-names>Borko</given-names>
          </string-name>
          <string-name>
            <surname>Furht</surname>
          </string-name>
          .
          <year>2021</year>
          .
          <article-title>Text data augmentation for deep learning</article-title>
          .
          <source>Journal of Big Data</source>
          <volume>8</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>34</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Greco</surname>
          </string-name>
          ,
          <string-name>
            <surname>Candida</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Andrea</surname>
            <given-names>Simeri</given-names>
          </string-name>
          , Andrea Tagarelli, and
          <string-name>
            <given-names>Ester</given-names>
            <surname>Zumpano</surname>
          </string-name>
          .
          <year>2023</year>
          .
          <article-title>Transformer-based language models for mental health issues: A survey</article-title>
          .
          <source>Pattern Recognition Letters</source>
          <volume>167</volume>
          :
          <fpage>204</fpage>
          -
          <lpage>11</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>Shirley B.</given-names>
          </string-name>
          <year>2021</year>
          .
          <article-title>Machine learning to advance the prediction, prevention and treatment of eating disorders</article-title>
          .
          <source>European Eating Disorders Review</source>
          <volume>29</volume>
          (
          <issue>5</issue>
          ):
          <fpage>683</fpage>
          -
          <lpage>91</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Benítez-Andrades</surname>
          </string-name>
          , José Alberto,
          <string-name>
            <surname>José Manuel</surname>
          </string-name>
          Alija-Pérez, Isaías García-Rodríguez, Carmen Benavides, Héctor Alaiz-Moretón, Rafael Pastor Vargas, and
          <string-name>
            <surname>María Teresa</surname>
          </string-name>
          García-Ordás.
          <year>2021</year>
          .
          <article-title>BERT model-based approach for detecting categories of tweets in the field of eating disorders</article-title>
          (ED).
          <source>Paper presented at 2021 IEEE 34th International Symposium on Computer-Based Medical Systems (CBMS)</source>
          , .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Face</surname>
            ,
            <given-names>Hugging.</given-names>
          </string-name>
          <article-title>No title</article-title>
          . in Retrieved from SBERT: https://huggingface. co/sentencetransformers [database online]. 2022Available from https://huggingface.co/.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>