<!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>
      <journal-title-group>
        <journal-title>American Journal of Obstetrics &amp; Gynecology MFM 5 3 (2023) 100834.
doi:10.1016/j.ajogmf.2022.100834
[18] R. Quillivic</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.1016/j.ajogmf.2022.100834</article-id>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Iurii Krak</string-name>
          <email>yuri.krak@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oleksandr Ovcharuk</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Olexander Mazurets</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maryna Molchanova</string-name>
          <email>m.o.molchanova@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Olena</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sobko</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Olena Tyschenko</string-name>
          <email>tyschenko.helen@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Olexander Barmak</string-name>
          <email>alexander.barmak@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Glushkov Institute of Cybernetics of NAS of Ukraine</institution>
          ,
          <addr-line>Kyiv</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Khmelnytskyi National University</institution>
          ,
          <addr-line>Khmelnytskyi</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Taras Shevchenko National University of Kyiv</institution>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>1827</year>
      </pub-date>
      <volume>31</volume>
      <issue>9</issue>
      <fpage>60805</fpage>
      <lpage>60813</lpage>
      <abstract>
        <p>The paper proposes an approach to solving the problem of identifying manifestations of post-traumatic stress disorder in user text content. The approach differs from existing ones by increased focus on PTSDspecific context dependencies, and improved separation from manifestations of other mental illnesses. Increased focus on PTSD-specific context dependencies is achieved by using separate positional embeddings to account for word positions in text, improving model accuracy, and the neural network model used relative positional displacement instead of absolute. Improvement of separation from manifestations of other mental diseases was achieved due to the inclusion of educational texts with manifestations of other mental disorders in the orthogonal category of the dataset. The developed method for post-traumatic stress disorder manifestation analyzing provides the transformation of input information in the form of text content for analysis and a trained context-oriented neural network model with a tokenizer into output information in the form of a percentage of the manifestation of posttraumatic stress disorder in user content. The proposed approach allows not only to determine the manifestation of post-traumatic stress disorder in text content, but also to visually interpret the obtained results. The following metrics were obtained in approach: Accuracy 0.934, Precision 0.948, F1 0.841, AUC 0.872. Compared to known analogues, the effectiveness of detecting PTSD has increased: the Accuracy metric has improved by 0.130%, the F1 metric has improved by 0.031, and the AUC metric has improved by 0.132.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;PTSD manifestation</kwd>
        <kwd>natural language processing</kwd>
        <kwd>visual analytics</kwd>
        <kwd>PTSD detecting</kwd>
        <kwd>DeBERTa 1</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Post-traumatic stress disorder is a debilitating mental illness that affects approximately 10% of the
population [1, 2]. With the development of digital technologies and social media, a new
opportunity has appeared to study the manifestations of PTSD through the analysis of user content
[3]. This topic becomes especially relevant in armed conflicts context, natural disasters and other
traumatic events, which often leave a deep imprint on the psyche of people [4, 5]</p>
      <p>Analysis of user content, such as messages in social networks, blogs, forums and comments,
allows to obtain unique insights into the emotional and mental state of victims [6]. The application
of machine learning and natural language processing methods to detect signs of PTSD in user texts
is a modern and promising direction of scientific research, because it can not only identify
individual cases of PTSD, but also help in the development of preventive measures and support
programs for persons who are at risk [7, 8].</p>
      <p>In the conditions of modern society, which is affected by military actions, pandemics, etc., the
analysis of user content for the detection of PTSD is extremely important. This enables not only
scientists, but also practitioners in the field of psychology and social work to promptly respond to
the needs of the population [9].</p>
      <p>The main goal of the paper is to create the method for post-traumatic stress disorder
manifestation analyzing in user text content, which differs from existing ones by focusing on
context dependencies specific to PTSD, which helps to avoid confusion with other mental illnesses
(achieved by creating its own training data set), as well as by using separate positional embeddings
to take into account the positions of words in the text, which improves the accuracy of the model.</p>
      <p>The main contributions of the paper can be summarized as follows:


</p>
      <p>The method for post-traumatic stress disorder manifestation analyzing in text content has
been developed.</p>
      <p>The set of training data was created, which allows focusing the attention of the neural
network on PTSD, while reducing its confusion with other mental disorders due to the
inclusion of training texts with manifestations of other mental disorders in the orthogonal
category.</p>
      <p>The effectiveness of using the developed method has been experimentally proven, which
allows, unlike existing analogues, not only to detect PTSD, but also to show visual
interpretation of the obtained results.</p>
      <p>The following section presents an overview of related works in the field of post-traumatic stress
disorder analysis. Section 3 offers the description of the proposed method for PTSD manifestation
analysis, and Section 4 is devoted to the description of experiment and dataset. Section 5 contains
results and discussion, and conclusions are presented in Section 6</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related works</title>
      <p>Over the years, the scientific community has explored monitoring approaches to detect specific
mental disorders and risk behaviors [10, 11] such as depression, eating disorders, gambling, and
suicidal ideation, among others, to activate prevention or mitigation strategies, and in severe cases
– clinical treatment [12]. Post-traumatic stress disorder rates have increased significantly due to
the COVID-19 pandemic. This is partly due to the isolation or inaccessibility of therapeutic
intervention caused by the pandemic. Additional screening tools may be needed to enhance the
identification and diagnosis of PTSD using a virtual environment. A study [13] suggests identifying
people with PTSD using sentiment analysis from semi-structured interviews. For this, a machine
learning model was used, which is trained on text data that is part of the Audio/Visual Emotion
Evoked and Workshop Corpus (AVEC-19). The sample size is 188 individuals without PTSD and 87
with PTSD. The Random Forests model was able to achieve a balanced accuracy of 80.4% on the
dataset used in AVEC-19 testing. A similar approach was used in [14] using a machine learning
approach to determine the relative importance of specific emotion regulation difficulties in relation
to PTSD symptom severity.</p>
      <p>Great achievements in the field of PTSD detection also belong to large language models [15].
ChatGPT has shown preliminary initial feasibility for this purpose, however, whether it can
accurately assess mental illness has been investigated in [16, 17]. The performance of ChatGPT and
the text-embedding-ada-002 (ADA) model was compared in detecting postpartum post-traumatic
stress disorder (CB-PTSD), a postpartum maternal mental illness that affects millions of women
each year, without standard screening. Using a sample of 1,295 women who had given birth in the
past six months and were 18 years or older, recruited through hospital announcements, social
media, and professional organizations, the potential of ChatGPT and ADA to screen for CB-PTSD
was investigated by analyzing maternal birth narratives. The PTSD Checklist for DSM-5 was used
to assess CB-PTSD. The proposed ML model, which uses a numerical vector representation of the
ADA model, identified CB-PTSD through narrative classification. The proposed model
outperformed (F1 score: 0.81) ChatGPT and six previously published large text embedding models
trained on data from mental health or clinical domains, suggesting that the ADA model can be used
to detect CB-PTSD. The proposed modeling approach can be generalized to the assessment of other
mental health disorders.</p>
      <p>A study [18] investigated language as a potential diagnostic biomarker for PTSD. The original
sample of 148 people who were victims of terrorist attacks in Paris on November 13, 2015 was
analyzed. Interviews conducted 5–11 months after the event involve individuals of similar
socioeconomic status who experienced the same incident, answering identical questions and using
the same PTSD measures. Using this dataset to capture nuances that may be clinically relevant, a
three-step interdisciplinary methodology is proposed that brings together expertise from the
psychiatry, linguistics, and natural language processing communities to examine the relationship
between language and PTSD.</p>
      <p>The first phase assesses a clinical psychiatrist's ability to diagnose PTSD using only transcribed
interviews. In the second stage, statistical analysis and machine learning models are used to create
language features based on psycholinguistic hypotheses and evaluate their predictive power. The
third step is to apply a hypothesis-free deep learning approach to PTSD classification in the
selected sample. Results show that a clinical psychiatrist diagnosed PTSD with an area under the
curve (AUC) of 0.72. This is comparable to the gold standard questionnaire (AUC ≈ 0.80). The
machine learning model achieved a diagnostic AUC of 0.69. The deep learning approach achieved
an AUC of 0.64. Importantly, the study controlled for confounding factors, established relationships
between language and DSM-5 subsymptoms, and combined automated methods with qualitative
analysis. This study provides a direct and methodologically sound description of the relationship
between PTSD and language. A similar study was conducted for military personnel deployed in
Afghanistan. The AUC of the developed model was 0.74 [19].</p>
      <p>Five supervised machine learning algorithms (Elastic Net, Gradient Boosting Machine, Random
Forest, Support Vector Machine, and C5.0) were tested using clinical data (Physician-Administered
PTSD Scale version 5) and sociodemographic characteristics [20]. 112 patients participated in the
study (61 with NET-Trauma and 51 with PROVE). A four-class model based on the C5.0 algorithm,
which used data from the 15-item CAPS-5 and sociodemographic characteristics, showed the best
results for the diagnosis of PTSD. The accuracy of this model was 65.6% for the training data set
and 52.9% for the test set. Main characteristics for predicting PTSD stage were number of
symptoms, CAPS-5 total score, total severity score, and presence of current or past traumatic
events.</p>
      <p>According to the results of the analysis of related works in the field of analysis of the
manifestation of post-traumatic stress disorder in user content, the problem of rather low accuracy
of PTSD detection was revealed (the reviewed existing implementations do not exceed 81%
accuracy). Therefore, the AI model used for the PTSD detection task should:



have a high ability to generalize, which should allow her to better cope with new or
unknown data, since different people can express their experiences in different ways;
be context-oriented (to identify specific language signs that may indicate the presence of
PTSD);
provide the possibility of visual interpretation of the results obtained by the model.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Method design</title>
      <p>The proposed approach to solving the problem of detecting manifestations of post-traumatic stress
disorder in user text content is shown in Figure 1. The approach demonstrates the transformation
of input information in the form of text content for analysis and a trained context-oriented neural
network model with a tokenizer into output information in the form of a percentage of the
manifestation of post-traumatic stress disorder in user content.</p>
      <p>At the first stage, preprocessing and tokenization of text content is carried out. The content is
checked for length and non-emptiness. However, punctuation marks, emoticons and the rest of the
text features are retained, as they may carry additional relevant information that indicates the
presence of PTSD. Tokenization is carried out by a tokenizer on which a neural network was
trained.</p>
      <p>At the second stage, a neural network analysis of the manifestation of post-traumatic stress
disorder in user content is carried out, for the detection of which a context-oriented neural
network of the transformer architecture will be used.</p>
      <p>As a context-oriented neural network model, the DeBERTa model [21] will be used, the
architecture of which is shown in Figure 2. The DeBERTa neural network model is characterized
by the presence of 5 layers sets: “Embedding”, “Encoder”, "”Pooler”, “Classifier” and “Dropout”.</p>
      <p>The “Embedding” layer includes dictionary embeddings and layer normalization. The “Encoder”
layer set contains 6 “DebertaV3Layer” layers, each with “attention”, “intermediate” and “output”
components. This model component consists of many layers and implements basic text processing.
Transformer mechanisms are implemented in it, which allow the model to have a high ability to
generalize. Through multiple interactions between words and context, this layer helps the model
learn complex dependencies and contexts, allowing it to better handle new or unknown data.
Instead of a traditional attention mechanism, DeBERTa uses split attention, which considers words
and positions separately. It was found that the separate implementation of the “attention”
components for the word and the position provides an increase in the amount of perceived
interaction between the words and the context, which, in turn, helps the model to analyze the
complex dependencies and contexts inherent in the task of detecting signs of PTSD in user text
content [22]. Also, this model is characterized by the use of relative positional displacement instead
of absolute, which allows the model to better take into account context dependencies at different
distances using variance estimation [23].</p>
      <p>“Pooler” is responsible for context pooling for summary outputs, and “Classifier” linear layer is
responsible for classification. The Dropout layer is used for regularization to prevent overtraining.</p>
      <p>The proposed method of detecting PTSD in text data is shown in Figure 3. According to the
scheme described in figure, it is first necessary to prepare working data. The dataset for detecting
PTSD in text data will be a composite of several datasets, and will require balancing and
preprocessing, which is necessary for effective neural network training. The dataset formation scheme
is described in detail in section 4.1.</p>
      <p>A balanced set of data is fed to the input of the neural network for further training. At the same
stage, the dataset is vectorized and divided into training and validation samples in the ratio of 80%
to 20%, respectively. Also, training parameters are set here, in the form of batch size and number of
epochs.</p>
      <p>After completion of the retraining process of the neural network of the transformer
architecture, the efficiency of the model is evaluated according to the following metrics: Accuracy,
Precision, F1, AUC. After the metrics are derived, if their results are satisfactory (over 80% for each
metric), the model and tokenizer are saved.</p>
      <p>The last step is to explain the decisions obtained with the help of the trained neural
networktransformer. For this purpose, model explanation tools designed for working with transformer
architecture neural networks will be used.</p>
      <p>The effect of improving the analysis of PTSD manifestations according to the proposed
approach is shown in Figure 4.</p>
      <p>In particular, by using a relative positional shift instead of an absolute one, it was possible to
achieve an increased focus on PTSD-specific context dependencies, by using dispersion estimation,
it was possible to analyze context dependencies at different distances, by applying a separate
execution of the “attention” component for the word and for the position of the word, it was
possible to perform the analysis complex dependencies and contexts that are inherent in the
manifestations of PTSD in the text, by including texts with manifestations of other mental
disorders in the dataset, it was possible to improve the separation from the manifestations of other
mental diseases.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Experiment</title>
      <sec id="sec-4-1">
        <title>4.1. Dataset for experiment</title>
        <p>The dataset formation scheme is shown in Figure 5. Since there are no open datasets with enough
data to train the neural network, a composite dataset was formed based on the existing “Human
Stress Prediction” and “Aya PTSD” datasets.</p>
        <p>Thus, the "Human Stress Prediction" dataset [24] contains data published in subreddits related
to mental health. This data set contains different mental health issues that people use to talk about
their lives. The dataset contains the following markup: “subreddit”, “post_id”, “sentence_range”,
“text”, “label”, “confidence”, “social_timestamp” represents the headers for the “Stress.csv” file.
From this dataset, data that has the value “PTSD” in the “subreddit” column will be taken,
indicating the presence of post-traumatic stress disorder. The opposite category will include
records that do not contain signs of PTSD (all other records). The number of target records with
“PTSD” in this dataset is 584. The number of records assigned to the opposite category is 2,254.</p>
        <p>Since the rest of the data will contain records not only of healthy people, but also records of a
variety of mental illnesses, it is believed that the context dependencies responsible for PTSD will be
better searched, and there will be less confusion with the rest of the mental illnesses. However, this
can lead to poorer training accuracy rates.</p>
        <p>The resulting data set turned out to be unbalanced, the target class is almost 4 times smaller
than its opposite. Therefore, there is a need to supplement these data with another dataset. It will
be complemented by the “Aya PTSD” dataset [25] available on Kaggle, which contains data
specifically related to PTSD. It includes various attributes such as clinical scores,
sociodemographic characteristics, etc. (“ID”, “PTSD Severity”, “label”, “text”, “file_path”", “response”),
making it a comprehensive resource for the study of PTSD. stress disorder. From this dataset,
records will be taken that indicate a PTSD level of the PTSD Severity attribute greater than 50%.
After adding data, the target class began to contain 1120 records.</p>
        <p>In this way, a data set of 3374 records was formed, consisting of 2 categories: “PTSD” and “No
PTSD”. The number of entries in the “PTSD” category is 1,120, and the number of entries in the
opposite category is 2,254.</p>
        <p>At the same time, 2,200 records will be used during neural network training, namely 1,100
records from the “PTSD” category and 1,100 records from the “No PTSD” category.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Experiment description</title>
        <p>In order to study the effectiveness of the developed method of analyzing the manifestation of
posttraumatic stress disorder in text content, the corresponding software was created in the form of a
Notebook in the Google Colab cloud environment.</p>
        <p>As a pre-trained neural network of the transformer architecture, the
“microsoft/deberta-v3small” model from the “HuggingFace” resource [26] was taken. The “DeBERTaV3” model improves
upon the original “DeBERTa” model by replacing mask language modeling (MLM) with replaced
marker detection (RTD), a more sampling-efficient pre-training task [27]. This model was retrained
on the data set created and described above for 3 epochs.</p>
        <p>In general, the trained model was tested on the validation sample, which showed the following
metrics values: Accuracy 0.934, Precision 0.948, F1 0.841, AUC 0.872. The ROC for evaluating the
quality of neural network learning is shown in Figure 6.</p>
        <p>Precision value of 0.948 means that of all the samples that the model identified as positive
(PTSD), 94.8% were indeed positive. This is important in the context of PTSD, as false positives can
lead to unnecessary interventions. The F1-Score of 0.841 is a good value combining Precision and
Recall. This indicates an overall balance between accuracy and the ability of the model to find
positive samples. As for the ROC curve graph, it illustrates the performance of the binary
classification model by comparing the true positive rate (TPR) and false positive rate (FPR) at
different decision thresholds [28]. The area value of 0.872 indicates the ability of model to
effectively identify PTSD cases with minimal number of false positives.</p>
        <p>Also, within the framework of the experiment, the possibility of visual interpretation of the
results provided by the trained neural network was investigated for a better understanding of the
classification process. Transformers Interpret [29], a model explanation tool designed to work
exclusively with the transformers package, was used to explain the obtained neural network
solutions.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Results and discussion</title>
      <p>When training a transformer architecture neural network, the following metrics were obtained:
Accuracy 0.934, Precision 0.948, F1 0.841, AUC 0.872. These results are higher than in similar
scientific studies. For example, in comparison with [13], in which Accuracy is 80.4%, it was possible
to improve this indicator to the level of 93.4%. At the same time, comparing the F1 evaluation
indicator at the level of 0.81 in [16], it was possible to increase it to level of 0.841.</p>
      <p>The machine learning model [18] achieved a diagnostic AUC of 0.69, and the AUC of the
developed model [19] was 0.74. In comparison, the developed approach made it possible to obtain a
value of 0.872, which is significantly higher in comparison with the conducted studies.</p>
      <p>Thus, compared to known analogues, the efficiency of PTSD detection has increased: the
Accuracy metric has improved by 13.0% from 80.4% to 93.4%, the F1 metric has improved by 0.031
from 0.810 to 0.841, and the AUC metric has improved by 0.132 from 0.740 to 0.872.</p>
      <p>The developed method is resistant to confusion with other psychological disorders, as it was
trained on a data set in which the opposite category contained data not only of psychologically
healthy people, but also of people with other psychological disorders.</p>
      <p>According to the obtained values of the metrics, they can be improved by adding a larger
number of epochs, as the loss continued to fall during training, which indicated that the neural
network is capable of better generalization and generalization of data. However, given the
limitations of available resources and time for neural network training, such studies were not
conducted. The training of the neural network of the specified architecture took a total of 10 hours,
with a session limit of 12 hours in Google Colab.</p>
      <p>The confusion matrix for the validation set is shown in Figure 7.</p>
      <p>As can be seen in Figure 7, only 10 entries in the PTSD class out of 220 were identified as
having no manifestation. However, 24 records out of 220 that did not have PTSD were falsely
identified as PTSD, although given the comparison with similar studies, these results are good.</p>
      <p>The developed method allows not only to effectively analyze the manifestation of
posttraumatic stress disorder in user content, and to provide an explanation of the decisions made. An
example of the interpretation of the model's decision about the presence of PTSD in the text is
shown in Figure 8.</p>
      <p>According to Figure 8, the input of the neural network was given the following text: “He said he
had not felt that way before, suggeted I go rest and so i decide to look up feelings of doom in hopes of
maybe getting sucked into some rabbit hole of ludicrous conspiracy, a stupid are you psychic test or
new age b.s., something I could even laugh at down the road. No, I ended up reading that this sense of
doom can be indicative of various health ailments; one of which I am prone to.. So on top of my doom
to my gloom..I am now f'n worried about my heart. I do happen to have a physical in 48 hours”. This
text is indicative of PTSD as it contains a sense of doom and phrases such as “doom to my gloom”
indicate a high level of anxiety and worry. As can be seen from Figure 9, the words “doom”,
“gloom” have a significant weight in the direction of prioritizing the neural network to the “PTSD”
category. Trigger words such as “conspiracy”, “psychic” and “rabbit” also have a similar coloring.</p>
      <p>As part of the research, it was also analyzed how the model processes and interprets different
parts of the text. This is especially useful for diagnosing and improving models. Using the tool
"BertViz" [30], the visualization shows the attention weights for all layers and all heads in each
layer. An example of an illustration of such a mechanism is shown in Figure 9, where attention
weights are displayed in color: the brighter the color, the greater the influence of this context
dependence on the final arousal.</p>
      <p>Each layer has multiple heads of attention, and each head can have its own “picture” of
attention. Arrows in the visualization show the direction of attention from one token to another.
The direction of attention indicates which token is “ooking” at which other token, and the
thickness and color of the arrow indicate the strength of that attention.</p>
      <p>Thus, with the help of the models “Transformers Interpret” and “BertViz” it was possible not
only to determine the presence of PTSD in text content, but also to interpret obtained results.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusions</title>
      <p>Based on the results of the analysis of modern approaches to monitoring for the detection of
mental disorders and socially dangerous behavior, an approach to solving the problem of detecting
manifestations of post-traumatic stress disorder in user text content is proposed. The approach
differs from existing ones by increased focus on PTSD-specific context dependencies, and improved
separation from manifestations of other mental illnesses.</p>
      <p>Increased focus on PTSD-specific context dependencies is achieved by using separate positional
embeddings to account for word positions in text, improving model accuracy. In particular, instead
of the classic “attention” component for transformer neural networks, a separate execution of the
“attention” components for word and position is applied, which ensures an increase in the amount
of perceived interaction between words and context, which, in turn, helps the model to analyze
complex dependencies and contexts that inherent tasks of identifying signs of PTSD in user text
content. Also, to focus on PTSD-specific context dependencies, the neural network model used
relative positional displacement instead of absolute, allowing the model to better account for
context dependencies at different distances using variance estimation.</p>
      <p>Improvement of separation from manifestations of other mental diseases was achieved due to
the inclusion of educational texts with manifestations of other mental disorders in the orthogonal
category of the dataset. The use in training of a data set in which the opposite category contained
data not only of psychologically healthy people, but also of people with other psychological
disorders helps to minimize confusion with other mental illnesses. This was achieved by creating a
custom training dataset of 3374 records.</p>
      <p>The developed method for post-traumatic stress disorder manifestation analyzing in text
content provides the transformation of input information in the form of text content for analysis
and trained context-oriented neural network model with tokenizer into output information in the
form of percentage of post-traumatic stress disorder manifestation in user content. The proposed
approach allows not only to determine the manifestation of post-traumatic stress disorder in text
content, but also to visually interpret the obtained results.</p>
      <p>The developed method effectiveness was investigated by developing the appropriate software.
When training neural network of described architecture, the following metrics were obtained:
Accuracy 0.934, Precision 0.948, F1 0.841, AUC 0.872. Compared to known analogues, the
effectiveness of detecting PTSD has increased: the Accuracy metric has improved by 13.0% from
80.4% to 93.4%, the F1 metric has improved by 0.031 from 0.810 to 0.841, and the AUC metric has
improved by 0.132 from 0.740 to 0.872.</p>
      <p>Further research will be aimed at expanding the dataset for training and finding additional
labels in texts characterizing PTSD, which will make the decision of the neural network model
more understandable and will make it possible to more accurately identify the manifestations of
PTSD in text content. Also, the direction of further research is conducting experiments on
improving the values of the metrics by increasing the number of training epochs, since the loss
indicator continued to decrease during training, which indicated that the neural network is
potentially capable of better generalization and generalization of data characterizing PTSD in text
content.</p>
    </sec>
    <sec id="sec-7">
      <title>Declaration on Generative AI</title>
      <p>The authors have not employed any Generative AI tools.</p>
    </sec>
    <sec id="sec-8">
      <title>References</title>
      <p>[1] E. Kuhn, J. E. Owen, Advances in PTSD treatment delivery: the role of digital technology in
PTSD treatment, Current Treatment Options in Psychiatry 7 (2020) 88-102.
doi:10.1007/s40501020-00207-x
[2] A. H. Park, H. Patel, J. Mirabelli, S. J. Eder, D. Steyrl, B. Lueger-Schuster, F. Scharnowski, C.</p>
      <p>O'Connor, P. Martin, R. A. Lanius, M. C. McKinnon, A. A. Nicholson, Machine learning models
predict PTSD severity and functional impairment: A personalized medicine approach for
uncovering complex associations among heterogeneous symptom profiles, Psychological
Trauma: Theory, Research, Practice, and Policy (2023). doi:10.1037/tra0001602
[3] M. Malgaroli, K. Schultebraucks, Artificial Intelligence and Posttraumatic Stress Disorder
(PTSD), European Psychologist 25 4 ( 2020) 272–282. doi:10.1027/1016-9040/a000423
[4] A. Bartal, K. M. Jagodnik, S. J. Chan, M. S. Babu, S. Dekel, Identifying women with
postdelivery posttraumatic stress disorder using natural language processing of personal
childbirth narratives, American journal of obstetrics &amp; gynecology MFM 5 (2023) 100834.
doi:10.1101/2022.08.30.22279394
[5] L. Browning, I. Rashid, A. Javanbakht, The Current State of Digital Technologies for the
Treatment and Management of PTSD, A Look into the Future of Psychiatry (2024).
doi:10.20944/preprints202409.1313.v1
[6] S. Inamdar, R. Chapekar, S. Gite, Machine Learning Driven Mental Stress Detection on Reddit
Posts Using Natural Language Processing, Hum-Cent Intell Syst 3 (2023) 80–91.
doi:10.1007/s44230-023-00020-8
[7] J. Wang, H. Ouyang, R. Jiao, S. Cheng, H. Zhang, Z. Shang, W. Liu, The application of machine
learning techniques in posttraumatic stress disorder: a systematic review and meta-analysism
NPJ Digital Medicine 7 (2024) 121. doi:10.1038/s41746-024-01117-5
[8] C. W. Tomas, J. M. Fitzgerald, C. Bergner, C. J. Hillard, C. L. Larson, T. A. deRoon‐Cassini,
Machine learning prediction of posttraumatic stress disorder trajectories following traumatic
injury: Identification and validation in two independent samples, Journal of Traumatic Stress
35 (2022) 1656-1671. doi:10.1002/jts.22868
[9] A. Arowosegbe, T. Oyelade, Application of Natural Language Processing (NLP) in Detecting
and Preventing Suicide Ideation: A Systematic Review. Public Health 20 (2023) 1514.
doi:10.3390/ijerph20021514
[10] N. P. Shetty, Y. Singh, V. Hegde, D. Cenitta, D. K, Exploring emotional patterns in social media
through NLP models to unravel mental health insights, Healthc. Technol. Lett. (2025).
doi:10.1049/htl2.12096.
[11] I. Krak, O. Zalutska, M. Molchanova, O. Mazurets, R. Bahrii, O. Sobko, O. Barmak, Abusive
Speech Detection Method for Ukrainian Language Used Recurrent Neural Network, CEUR
Workshop Proceedings 3688 (2024) 16–28. doi:10.31891/2307-5732-2024-331-17
[12] A. Montejo-Raez, M. D. Molina-Gonzalez, S. M. Jimenez-Zafra, M. A. Garcia-Cumbreras, L. J.</p>
      <p>Garcia-Lopez, A survey on detecting mental disorders with natural language processing:
Literature review, trends and challenges, Computer Science Review 53 (2024) 100654.
doi:10.1016/j.cosrev.2024.100654
[13] J. Sawalha, M. Yousefnezhad, Z. Shah, M. R. G. Brown, A. J. Greenshaw, R. Greiner, Detecting
Presence of PTSD Using Sentiment Analysis From Text Data, Frontiers in Psychiatry 12 (2022).
doi:10.3389/fpsyt.2021.811392
[14] N. M. Christ, J. D. Elhai, C. N. Forbes, K. L. Gratz, M. T. Tull, A machine learning approach to
modeling PTSD and difficulties in emotion regulation, Psychiatry Research 297 (2021) 113712.
doi:10.1016/j.psychres.2021.113712
[15] O. Barmak, O. Mazurets, I. Krak, A. Kulias, A. Smolarz, L. Azarova, K. Gromaszek, S. Smailova,
Information technology for creation of semantic structure of educational materials,
Proceedings of SPIE – The International Society for Optical Engineering, 11176 (2019) 1117623.
doi:10.1117/12.2537064
[16] A. Bartal, K. M. Jagodnik, S. J. Chan, S. Dekel, AI and narrative embeddings detect PTSD
following childbirth via birth stories, Sci Rep 14 (2024) 8336. doi:10.1038/s41598-024-54242-2
[17] A. Bartal, K. M. Jagodnik, S. J. Chan, M. S. Babu, S. Dekel, Identifying women with
postdelivery posttraumatic stress disorder using natural language processing of personal</p>
    </sec>
  </body>
  <back>
    <ref-list />
  </back>
</article>