Next Article in Journal
Energy Efficiency Improvement in Reconfigurable Photovoltaic Systems: An Evaluation of Team Systems
Next Article in Special Issue
Formation Control of Multiple Autonomous Mobile Robots Using Turkish Natural Language Processing
Previous Article in Journal
Preparation and Characterization of Polymer-Modified Sulphoaluminate-Cement-Based Materials
Previous Article in Special Issue
A Review of Current Trends, Techniques, and Challenges in Large Language Models (LLMs)
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Using Natural Language Processing for a Computer-Aided Rapid Assessment of the Human Condition in Terms of Anorexia Nervosa

by
Stella Maćkowska
1,
Bartosz Koścień
1,
Michał Wójcik
1,
Katarzyna Rojewska
2 and
Dominik Spinczyk
1,*
1
Department of Medical Informatics and Artificial Intelligence, Silesian University of Technology, 41-800 Zabrze, Poland
2
Central Laboratory of Clinical Psychology, Pediatric Endocrinology, Public Clinical Hospital No. 1 in Zabrze, 41-800 Zabrze, Poland
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(8), 3367; https://doi.org/10.3390/app14083367
Submission received: 18 February 2024 / Revised: 12 April 2024 / Accepted: 14 April 2024 / Published: 16 April 2024
(This article belongs to the Special Issue Natural Language Processing: Trends and Challenges)

Abstract

:
This paper demonstrates how natural language processing methods can support the computer-aided rapid assessment of young adults suffering from anorexia nervosa. We applied natural language processing and machine learning techniques to develop methods that classified body image notes into four categories (sick/healthy, past tense, irony, and sentiment) and analyzed personal vocabulary. The datasets consisted of notes from 115 anorexic patients, 85 healthy participants, and 50 participants with head and neck cancer. To evaluate the usefulness of the proposed approach, we interviewed ten professional psychologists who were experts in eating disorders, eight direct (first contact) staff, and fourteen school counselors and school psychologists. The developed tools correctly differentiated the individuals suffering from anorexia nervosa, which was reflected in the linguistic profile and the results of the machine learning classification of the body image notes. The developed tool also received a positive evaluation from the psychologists specializing in treating eating disorders, school psychologists, and nurses. The obtained results indicate the potential of using natural language processing techniques for the computer-aided rapid assessment of a person’s condition in terms of anorexia nervosa. This method could be applied as both a screening tool and for the regular monitoring of people at risk of eating disorders.

1. Introduction

Anorexia is a severe eating disorder characterized by an obsessive fear of gaining weight and the extreme restriction of food intake, leading to excessive thinness [1,2]. The issue of anorexia in a society has various dimensions and can result from multiple factors. Society often imposes specific beauty standards, promoting slim bodies as the ideal. Media, including magazines, advertisements, and online communities, often portray unhealthily thin figures as the ideal to emulate. It can exert pressure on individuals, especially young women and girls, leading to unhealthy eating practices [3,4], resulting in anorexia nervosa and low self-esteem. They are convinced that achieving a thin body will help them gain social acceptance and improve well-being [5]. Other issues that therapists claim to be crucial in influencing a person’s self-esteem are peer pressure, family issues, or traumatic experiences [6,7]. According to the research, anorexia accompanies highly developed and rich countries and societies. It influences mostly ambitious individuals with traits of perfectionism. High competition, academic pressure, and stress related to social achievements can lead to the neglect of a healthy lifestyle, including proper eating habits. Young people facing intense pressure may seek a controlled aspect of their lives, manifested through control over their eating habits [8].
Patients suffering from anorexia nervosa struggle with a distorted body image, which can be formulated as a picture of our body’s size, the shape we have in our minds, and our feelings and attitudes toward them [9,10,11]. Their reflection in the mirror is a complete negation of how they really look. Body image can be positive or negative, though the latter has historically received more attention due to its link with psychiatric disorders [12]. Anorexic patients see themselves as fat, obese, and ugly persons, though, in fact, their organs are devastated and all the surrounding see them as flesh and bones [10].
The increasing number of people suffering from anorexia nervosa may also be the effect of a lack of social awareness and, at the same time, education in this area. Society often lacks awareness of mental health issues, including eating disorders, which are marginalized. Furthermore, in many cultures and societies, mental disturbances are treated as something shameful [13]. Mental illnesses are often fraught with strong prejudice and stigma. People struggling with mental problems can face social exclusion and isolation, as well as discrimination. They are also poorly understood, as many people still do not exactly know the nature of mental illnesses. Consequently, these disorders are frequently misunderstood as personal weaknesses, contributing to the existing stigma [14].
However, in recent years, there has been a rise in the awareness of mental health problems. Educational activities, social campaigns, and open conversation have contributed to an increased understanding and acceptance [15]. The media are also responsible for shaping social attitudes, especially now the majority of people base their lives on the views of social media influencers. However, the main responsibility for successful treatment rests on the shoulders of health institutions, including facilitated access to specialists and prompt and appropriate therapy. Due to the lack of specialists, including psychiatrists and psychologists, and the increasing rate of various mental disorders, patients have limited access to professional help. Some individuals with anorexia may not receive proper psychological assistance.
The process of diagnosis and treatment for anorexia nervosa is difficult and longstanding. It employs a multi-disciplinary approach combining medical, nutritional, and psychological issues. The guidelines of the American Psychiatric Association (APA) provide three phases of criteria for the treatment of anorexia nervosa encompassing the following [2]:
  • Medical stabilization, which involves urgent hospitalization for the individuals with severe malnutrition or medical complications to restore physical health and to stabilize vital functions.
  • Nutritional rehabilitation and weight gain, which involves developing a personalized diet to address nutritional deficiencies and to help the patient achieve and maintain a healthy weight.
  • Psychotherapy recovery, which addresses psychological factors through group therapy, enhancing the proper behavioral patterns.
Whatever the criteria for medical treatment are, anorexia nervosa also requires a diagnosis in terms of the psychological state made by therapists, such as psychologists, psychiatrists, or other mental health professionals. The process involves a thorough assessment of the individual’s psychological and behavioral characteristics, including clinical interviews, observations, and questionnaires to gather information on eating behaviors and attitudes toward body, weight, and shape. In this process, therapists may be supported by methods developed based on natural language processing (NLP) [16,17]. Such methods serve as non-invasive tools that only utilize a patient’s medical records to detect some psychological traits in an individual patient at the early stage [18]. The patient’s independent writing of a note about his or her body image is a projective method designed by specialists dealing with eating problems.
The principal objective of this paper was to develop a system to automatically analyze patients’ notes. It involves sentiment analysis, linguistics, and morphological feature detection using machine learning approaches. We also aimed to assist professionals in the diagnostic procedure and to enhance our comprehension of the psychological factors that lead to altered linguistic patterns among anorexic patients. Considering the increasing rate of anorexia worldwide, we see in our methods the possibility of being a first-aid tool for direct medical staff (nurses), school counselors, and psychologists. To confirm our approach, we surveyed ten professional psychologists, fourteen school counselors and psychologists, and eight nurses, who gave us positive feedback on the purposefulness of our research. During this research, we encountered several challenges that needed to be resolved by matching the appropriate measures to the research approaches. The most challenging factor was data collection. Despite the increasing amount of textual data on the Internet, there is a lack of databases covering specific topics that can help build quality machine learning solutions. In addition, the ambiguity of the meanings in words used, nuances such as irony or sarcasm, and the temporal context, especially references to the past, posed challenges in the objective assessment of sentiment regarding the topic of body image. In the research into linguistic analysis, it is essential to address these complexities to ensure a precise and comprehensive evaluation of language expressions related to opinions on body image. Efforts should be made to develop analytical tools and methods that account for these subtleties, allowing for a more objective understanding of the emotional context in linguistic expressions in the studies concerning body image.

2. Related Works

The rapid growth of multimedia, social media, and IT tools, especially in the entertainment sector, attracts growing numbers of users. Social media like Facebook, Twitter, or Instagram give users a chance to have fun, relax, express themselves, or even earn money. On these platforms, people exchange their opinions and share ideas, problems, and lifehacks. It is where people give each other support that they do not receive in real life. However, the massive use of social networking sites has also become a new area for many researchers who use textual information to detect the mental condition of users. As some researchers claim [19,20,21], textual information can reveal one’s mental condition. What a person says and what kind of language register he/she uses can be related to their current state [22]. Modern NLP tools facilitate the collection of vast amounts of textual data from various social sources, extracting valuable information, which can be analyzed and validated to detect the desired information. Some interesting research concerns applying NLP and machine learning, including the Support Vector Machine (SVM), Naive Bayes (NB), Random Forest (RF), Multilayer Perceptron (MLP), Logistic Regression (LR), and Decision Tree (DT) algorithms, to the identification identifying health information on social media sites [23,24]. For example, Twitter was the object of interest of Spanish researchers [25], who created the SAD (Spanish Anorexia Detection) based on records collected from this social networking site. The study concerned detecting anorexia in tweets from numerous accounts referring to anorexia and non-anorexia. Using machine learning approaches, they tried to automatically detect anorexia symptoms in the corpus. The authors aimed to establish linguistics statistics (the number of words, stop words, tweets, and the number of users) and then to extract the information on verbs, nouns, adjectives, and adverbs. As to grammatical tagging, the study revealed that anorexia nervosa tweets are characterized by fewer words and more negative language. Another interesting approach [26] refers to developing characteristic language traits among anorexic patients who, according to the authors, share some similar psychological features like anxiety, depression, controlling the amount of food, obsessive thinking about the body, and a disturbed body image. The participants answered a few questions about their bodies and their way of spending their spare time. The task also included a picture description, which was the crucial step as it helped to detect the most features differentiating anorexic patients from their healthy peers. The study analyzed linguistic features, including Lexical and Syntactic Indexes, as well as data derived from the LIWC-22 software, to compare the individuals with anorexia group (ANG) and a control group during different language tasks. The authors revealed that the ANG exhibited a higher content density, lower personal deixis frequency, and increased lexical richness in certain tasks. Syntactically, the ANG showed a lower complexity in noun phrases and overall syntactic complexity.
Studies using social media accounts to find the specific traits of AN language have been increasing in popularity. In [27], the authors used Yahoo! answers to examine the linguistic characteristics of various question types related to eating disorders. They used a strategy that involved employing diverse linguistic analysis methods to study the language employed in individuals’ inquiries to reveal the cognitive, social, and emotional dimensions that underlie their needs. Through term frequency analysis, Part-of-Speech (POS) analysis, and sentiment analysis, they investigated the linguistic content, stylistic elements, and emotional expressions in two categories of questions, namely informational and socio-emotional ones.

3. Materials and Methods

In the first phase, we used deep neural networks to automatically classify the young adults’ notes within four classes and to draw the user’s attention to certain aspects related to the interpretation of the note’s content.
In the second phase, we proposed using dictionary methods. The text analysis employed two approaches. The first included the linguistic method of the quantitative and qualitative analysis of class words, and the second, detecting the type of terms used by the research and control groups to compare and elicit the characteristic traits of anorexia language.
Finally, the combination of the first and second phases should allow a better understanding of the mechanism of the human condition in terms of anorexia nervosa by first contact staff.

3.1. Feature Engineering Techniques

3.1.1. Deep Neural Networks (DNNs)

Deep Neural Networks (DNNs) consist of multiple layers facilitating the acquisition of hierarchical features from data and helping the models to learn complex data patterns and relationships [28]. Training involves adjusting numerous parameters through backpropagation to minimize prediction errors. The after-training phase includes using the updated relationships as the equations for predicting the output variables based on the input variables [29]. DDNs are widely recognized for their adaptability in areas such as computer vision and natural language processing, especially in speech recognition; health care; and medical research for exploring new drugs, diagnosing critical illnesses like cancer, or employing medical imaging techniques [30].

3.1.2. Transformers

Transformer architectures are widely used for solving classification problems. Initially, their application comprised natural language processing, but through their effectiveness, they have spread to such areas as image classification, language modeling, summarization, and translations. The most well-known transformer models are BERT (Bidirectional Encoder Representations from Transformers), GPT (Generative Pre-trained Transformer), and T5 (Text-To-Text Transfer Transformer) [31]. The architecture uses an encoder–decoder structure consisting of multiple layers aiming at capturing the dependencies between the elements in a sequence, making it well suited for the classification tasks where the relationships among the input elements are crucial [32]. The main concept in this architecture is the attention mechanism, which, according to the paper [33], calculates a weighted sum of the input features with the weights referred to as attention scores, which are dynamically determined by the input data. This mechanism is a key component emphasizing the crucial or relevant features while restraining the irrelevant or less important ones.

3.1.3. Types of Employed Cells

Long Short-Term Memory (LSTM) is a more complex recurrent neural network (RNN) architecture structure with memory cells, input gates, forget gates, and output gates. It operates well on sequence prediction tasks and in catching long-term dependencies. In this approach, the traditional recurrent node is replaced by a memory cell that contains an internal state, i.e., a node with a self-connected recurrent edge of fixed weight 1, ensuring that the gradient can pass across many time steps without vanishing or exploding [34].
The Gated Recurrent Unit (GRU) is another type of recurrent neural network (RNN) architecture, similar to LSTM but with a more straightforward design. GRUs also address the declining gradient problem using gating mechanisms, including update and reset gates. These gates control the flow of information and the state update within the network, facilitating the learning of long-term dependencies in the sequential data [35].

3.1.4. Selection of Encoding Method

Word embeddings stand out as a prevalent method for representing the vocabulary within documents. It excels in capturing the contextual nuances of words in a document, identifying semantic and syntactic similarities, as well as establishing the relationships with other words. This approach to word and document representation represents a pivotal breakthrough in deep learning, particularly for addressing the complex challenges in natural language processing. The advantage of employing compact, low-dimensional vectors lies in computational efficiency; most neural network frameworks struggle with high-dimensional and sparse vectors [36].

3.1.5. Optimization Algorithm

ADAM (Adaptive Moment Estimation) is a widely used optimization algorithm for the training of artificial neural networks. It belongs to the stochastic gradient descent (SGD) family, standing out for its efficiency and adaptability with dynamic learning rates based on historical gradients. It incorporates moment estimations through moving averages, addressing biases with bias correction. Known for its regularization and robust performance, the ADAM is popular for optimizing deep neural networks, especially in non-stationary and noisy domains [37,38].

3.1.6. Initialization of Model Weights

The Xavier (or Glorot) initialization algorithm is a widely used technique for setting the initial weights of a neural network. This technique copes with the problem of vanishing or exploding gradients during training. Generally, it adjusts the initial weights based on the size of the input and output layers to maintain a consistent weight variance across the layers. By providing a more accurate initialization strategy, Xavier’s initialization provides a better starting point for learning meaningful representations from the data. It results in more stable and efficient training, facilitating convergence and potentially achieving a better performance on various tasks.

3.2. Classification of Patients’ Text Records on Their Body Image

3.2.1. Proposed Method of Training the Model

This study used the model based on deep recurrent neural networks (RNNs) and was trained in three experimental scenarios. In the first case (Experiment 1), we trained the model using the notes from anorexic patients. Experiment 2 included the entire dataset, i.e., the notes related to anorexia and patients with head/neck cancers.
Since our text corpus addressing anorexia was limited in size, we decided to implement a model learning approach by using transfer learning. During the initial learning phase, we implemented the notes from the patients with head and neck cancer (HN). The textual HN data came from patients of different ages, sexes, and treatment stages. However, the topic of the notes concerned their attitude towards body image. Subsequently, in the second learning phase, the model incorporated the anorexia notes, as mentioned earlier, to further enhance its learning process. In Experiment 3 we decided to use a model tunning approach. First, we trained the model on the notes from the patients with head/neck cancers. Then, the training process operated on the notes relating to anorexia.

3.2.2. Selection of Meta-Parameter Values

We searched for the model’s meta-parameter values in the following set of parameters: the weight initialization method (CAUCHY, MSRA, MSRA1, MSRA2, NORMAL, XAVIER, XAVIER1, and XAVIER2), the type of cells applied in hidden layers (LSTM and GRU), and the number of neurons in hidden layers (5, 10, 15, 20, and 25). The values in the parameters of the optimization algorithm were applied, including the minibatchSize (2, 4, 5, 8, 16, and 32), maxEpochs (2, 4, 7, 16, 32, 64), and optimization method (“ADAM”|“LBFGS”|“MOMENTUM”|“VANILLA”). We divided the dataset into the proportions of 70, 15, and 15 for the training set, validation set, and test set, respectively.

3.3. Text Analysis

The dataset of the textual records also served as the material for extracting valuable insights, which enabled us to identify the characteristic patterns of anorexia language. We decided upon the presented approach after many consultations with a psychologist following the deep literary analysis on the anorexia topic. We aimed to establish the general grammatical patterns of patients with anorexia. In the initial stages of the research, it appeared essential to assess the language used by the individuals with anorexia from a morphological point of view.

3.3.1. Approach to the Analysis of Class Words

We split the analysis into steps covering the grammatical analysis of class words. This study used SAS Viya v.3.5, analytic software provided by the SAS Institute [39]. This software environment allows us for robust data preparation, writing specific language rules, and performing statistical analysis. After implementing the data corpus into the platform, we applied specific nodes dedicated to building models for data preparation. Initially, the textual data were cleared by removing terms with no value in the analysis (Stop list). The preserved terms (Start list) were next reduced to their basic forms—stems. In the next step, we tested the developed rules for detecting the tags of specific parts of speech and the characteristic terms associated with anorexia. A detailed description of the analysis is presented in the following paragraphs.

3.3.2. Detailed Grammar Rules

Class words refer to words belonging to a particular part of speech domain. In our method, we focused on tagging verbs, along with their time references (present or past references), and adjectives (with their positive and negative connotations). Despite the general adjective analysis, this study investigated the frequency the participants used the possessive adjective ‘my’ towards their bodies. The quantitative analysis of term ‘my’ was suggested by an expert in anorexia, as it can discover valuable information regarding the patient’s feeling of unity with her own body.

3.3.3. Verb Tense

In our approach, we focused on detecting a verb form in present and past categories to compare if the patients with anorexia tended to express themselves mostly in present timeframes or maybe they are stuck in the past, tearing up old experiences. This valuable factor enriching the analysis comprises the type of verbs people who are ill use. Do they focus more on actions in their utterances (using dynamic verbs), or do they focus more on their feelings, inwardly, or on their self-centeredness? As the analysis referred to the Polish language, we neglected categorizing the tenses into simple, progressive, or perfect.

3.3.4. Analysis of Possessives and Adjectives

Calculating the frequency of using the possessive adjective ‘my’ was crucial, because we hypothesized that constant preoccupation with the body, weight, and appearance may be associated with self-oriented behavior. The significant visible consequences of the illness, along with the psychological disturbances, may significantly impact the body image of patients.
The next phase explored adjectives, as they form a category of words providing significant information about a subject or object, often conveying emotional nuances. We developed a rule for extracting the exact adjectives related to the patient’s body. Subsequently, the process involved the identification of negative and positive adjectives within the text data. The categorization of adjectives into the positive and negative classes was guided by the Nencki Affective Word List (NAWL). This dictionary serves as a database of nearly 3000 Polish words derived from the Berlin Affective Word List (BAWL) with an emotional rating and the psycholinguistic trait of words [40].

3.3.5. Key Terms Associated with Anorexia

This study also targeted the detection of the characteristic words that indicate the most problematic areas for the patients. As the main feature of anorexia is distorted body image, we focused on filtering terms relating to the body, appearance, and perception. The analysis was mainly qualitative. Our goal was to search for valuable terms in the context of body image that could serve as markers of the altered linguistic profile of people with anorexia. Therefore, we only collected terms that were relevant in our opinion and that, in combination with other language attributes, could complement the method.

3.4. Material

The material in this study comprised the written records made by patients with anorexia who were undergoing therapy. We managed to collect the research material thanks to the established cooperation with the specialists from the Clinical Hospital No.1 in Zabrze, Poland, named after Professor S. Szyszko of the Medical University of Silesia. Another group of records was the notes written by healthy adolescent girls and young women from primary and secondary schools in Gliwice and Zabrze, Poland. All participants were asked to write a short note (a note of a few sentences) on their attitude to their bodies. The data collection consisted of 115 notes from anorexic patients and 85 from healthy schoolgirls.
This study utilized specific criteria for selecting the participants for the research and control groups. The criteria and data tagging were determined by experts in anorexia nervosa. For the research group, the inclusion criteria involved adolescent individuals (aged 12–19) diagnosed with anorexia by a psychiatrist, with an absence of concurrent psychological disorders and a duration of the disorder up to 3 years. The control group, on the other hand, included participants within the same age range (12–19) without any diagnosed psychological disorders.
In the research group, 115 females with the restrictive form of anorexia met the specified criteria of being females with anorexia (the restrictive form) aged 12–19, with an average age of 15.7 ± 2. The diagnoses of anorexia used the ICD-10 (International Classification of Diseases, tenth revision) and DSM IV (Diagnostic and Statistical Manual of Mental Disorders, fourth edition) criteria. The girls in the research group had an average weight of 35.1 ± 4.7 kg and a BMI (Body Mass Index) ranging from 11.3 to 20.2, with an average of 15.1 ± 2.8 (p < 0.001 vs. control group). The BMI SDS (Body Mass Index standard deviation score) ranged from –4.2 to 0.9, with an average of –2.72 ± 1.49 (p < 0.001 vs. control group).
In contrast, the control group consisted of 85 healthy girls aged 12–20, with an average age of 15.1 ± 1.9. Their average weight was 57.1 ± 10.1 kg and their BMIs ranged from 16.5 to 25.8, with an average of 21.5 ± 3.4. The BMI SDS ranged from –2.7 to 3.6, with an average of 0.19 ± 1.44.
Examples of the patient notes for the research and control groups are presented below, respectively:
  • Research group note example:
“I think this weight was the only thing I could really control, and that’s why I clung to it so tightly. Because there was nothing else I could decide about and my voice would be heard. At home I was always in last place, I was made fun of because of my figure. My peers were always pretty, slim, cheerful, self-confident, and I hated them for it. I hate the way I look, thick legs, curly hair, big lips—I look like a monkey princess. Sometimes I punished my body by vomiting. I know I’m not doing the right thing, my skin is dry, I have kidney problems, I ruined my teeth because of vomiting.
And it seems to me that this weight, this control, was so huge because it seemed to me that it was the only thing that no one could take away from me. I could control it myself. If I decide to lose ten kilos, I will lose weight…”
  • Control group note example:
“My body looks pretty good. My weight is normal. I like myself. I take care of myself, I do sports, so I’m not obese because I eat quite a lot. It is very important to me. I like to take care of myself and in my opinion it looks good.”

3.5. Method of Evaluation

This research adopted an evaluation that is based on misclassification errors from note classification models. The usefulness of the proposed method was studied by ten professional psychologists who were experts in eating disorders, fourteen school counselors and school psychologists, and eight direct staff (nurses). For this purpose, we prepared a questionnaire (presented in the results section) consisting of six questions (Table 1). The questions were suggested by three experts in anorexia. We asked the participants to rate each question using the Likert 1–5 scale, where 5—very useful, 4—useful, 3—I have no opinion, 2—not very useful, and 1—not useful at all.

4. Results

The following subsections summarize the research results from the series of two-step experiments including the machine learning approach and the statistical analysis of linguistic indicators.

4.1. Results of Machine Learning

Based on the hyper-parameter optimization carried out during the model development, the most satisfactory results we achieved were for the following parameter values: rnnType = ‘gru’, n = ‘5’, init = ‘xavier’, and act = ‘auto’. In the next phase, we conducted three experiments with three combinations of datasets, according to the scenario presented in the section that presented the proposed method of training the model. The results of the misclassification rate in machine learning obtained for each experiment for a particular expert flag are found in Table 2.

4.2. Text Analysis Results

This study investigated the distinctive features of language among females with anorexia and healthy females. It encompassed categorizing and evaluating desired parts of speech addressing the patient’s body. The method evaluated and designated the textual corpus into specific syntactic categories such as adjectives, verbs, and possessive adjectives. Moreover, we extended the analysis of adjectives to assigning them a positive or negative polarization. In the case of verbs, despite the general quantitative analysis, this study emphasized the analysis of past or present time references.
Figure 1 illustrates an overview of the desired content words (adjectives and verbs) and function words (possessives) identified in this study. Due to the similar length of the notes, we decided to present the average number of the desired parts of speech. Regarding the verb analysis, the participants in the research group generally used more verbs. The analysis revealed that the mean of verbs with a past reference (5.7) was slightly higher compared to the present (5.2). In the control group, the mean of verbs in the present was 2.3 and in the past 0.02.
The analysis of the adjectives covered our assumption that anorexia participants mostly used those noun modifiers in a negative sense, expressing unpleasant emotions or situations. The mean of the positive terms was only 0.8, whereas the negative was 3.3. In the control group, we can see the mean of the positive at the level of 2.8 and the negative at 1.8. The results clearly indicate that the healthy individuals in this study used positive and negative adjectives in similar proportions; however, during the initial manual analysis of the notes, we noticed that the usage of negative adjectives was not particularly connected with their bodies. The considerably large difference between positive and negative adjectives in the research group may indicate the patients’ concerns about their body image. Indeed, the analysis revealed participants using more adjectives with negative connotations when referring to their bodies.
The third item in the chart shows that the average of using the possessive adjective “my” in the research group was 1.4 and in the control 0.4, which may also relate to the higher concern about the body among the patients with anorexia.
A further examination of the text resulted in developing a set of specific terms revealing the most problematic areas of the body. As a result of general language analysis, we were able to track further word compounds that patients frequently employed when depicting the body, particularly when discussing their face, skin, abdomen, and legs. These expressions indicated concerns over a loss of attractiveness or being fat. The patients often referred to negative attitudes. These findings also showed serious concerns regarded their skin. The set of interesting terms are presented in Figure 2.

4.3. Evaluation of the Usefulness of the Developed Tool

The primary objective of this research was practical, utilizing the developed tool. Therefore, we interviewed a group of ten psychologists who are specialists in anorexia and eight nurses who have everyday contact with a patient and, on many occasions, may notice valuable symptoms or signs that are important in the diagnostic process of anorexic patients. Their positive feedback and suggestions were of great influence and help. That motivated us to broaden the method, so that it could serve as a screening tool at schools. We invited 14 school counselors and psychologists who answered the same set of questions. Table 3 presents the results of the questionnaire. The graphical representation of the results on the Likert scale is found in Figure 3.

5. Discussion and Conclusions

In general, a relatively small textual dataset referring to the attitude of people with anorexia towards body image was available (Experiment 1—research/control group size: 115/85). This fact also limited the possibility of expanding the model architecture—the best results were obtained with a relatively simple architecture (two hidden layers of five GRU cells each).
The average best performance for the three expert flags was 80%. Though the result is not ideal, it does not exclude the practical utilizing of the proposed method. For the sentiment flag, the results were much worse. However, our observation indicates using various variants of learning the selected model for the best results. This study points out that the obtained values were received without the use of general language models. Based on the results of the linguistic analysis, significant differences were found in the statements of people suffering from anorexia and healthy people. Therefore, the authors doubted the validity of using general language models, which are currently very popular and considered to be the state of the art in NLP methods. But we would like to emphasize that this is an open issue for further research. Additionally, in future research, significant work should be put into receiving the best quantitative results without losing the characteristic features of the anorexic patients’ notes.
An important aspect is also the explainability of decisions made by the model. Known explainability mechanisms for RNN models can be based on backpropagation through time (BPTT), gradients-based methods, the attention mechanism, layer-wise relevance propagation (LRP), or the SHapley Additive exPlanations (SHAP) [41]. However, in the case of the body image notes, we are dealing with subjective, unstructured statements, which makes them difficult to interpret. We must also consider the ambiguity of the words used and their subjective meaning for a given person. This refers to the so-called projective psychological methodology, which has arisen from consultations with specialists in eating disorders, where the examined person speaks freely on a given topic by choosing words arbitrarily. Due to the difficulty of interpreting the SHAP charts in this particular application, the authors refrained from using these methods in favor of building a linguistic profile of the examined person using the dictionary methods. The combination of these approaches gives valuable information about the condition of a patient in the opinion of the direct medical personnel.
The main emphasis in this work was on the psychological aspects of anorexia, due to the authors’ awareness of the lack of experience of the first contact staff in specialized issues related to eating disorders and in the use of NLP models and methods. The developed tools can be regarded as computer-assisted tools for the rapid assessment of the human condition. Using the participants’ notes, the psychologist can generate results that provide additional information about the patient’s condition.
The survey shows that the developed approaches using NLP were assessed as the most useful by psychologists specializing in the treatment of eating disorders. Slightly worse results were obtained from the group of school psychologists and nurses. The nurses found general indicators (healthy/sick) to be the most useful. Detailed indicators concerning the analysis of the examined person’s language are beyond the scope of interest of the nurses.
Having considered the results, we believe that the current pilot studies justify further work on tools allowing for minimally invasive assessment of the human condition. The conducted experiments and the evaluation results revealed the need for the first contact staff to use the tool for a longer period of time (there is no access to specialists in eating disorders at school). There can be two potential useful usage scenarios. The first is as a screening tool, used prophylactically for the entire school community. In this case, it is possible to identify people who are more likely to suffer from eating disorders. The second is as a follow-up, which would consist of observing selected people over a longer period of time and collecting more notes on a regular basis, which in turn would allow us to monitor the condition of these people and provide effective support.
The are some limitations of this study. The data we have are a single-item survey (we have one note from each patient). It would be desirable to have a follow-up of several notes to test the usefulness of the proposed method in monitoring the patient’s condition by a specialist, as well as to provide feedback for the patient in order to build up his/her well-being, creating a sense of value or empowerment.
In the context of further work, research should focus on acquiring larger datasets, which will enable us to apply more advanced machine learning architectures and also general language models. It would be ideal to apply the developed tools in the context of two scenarios: as a screening tool and for the regular monitoring of the human condition in the context of eating disorders, and in the context of a statistical analysis of the results obtained and their availability to the public.
The feasibility of using calibrators based on RNN architectures and LSTM, as well as GRU cells, to help assess a patient’s condition was explored.
Addressing the issue of anorexia in society requires a comprehensive approach, including education, eliminating harmful beauty standards, promoting a healthy lifestyle, and ensuring easier access to professional psychological assistance. Continued research into the causes and effects of anorexia is essential to develop more effective preventive and therapeutic strategies.

Author Contributions

Conceptualization, S.M. and D.S.; methodology, S.M. and D.S.; software, S.M., B.K. and M.W.; validation, D.S.; formal analysis, D.S.; investigation, S.M., B.K. and M.W.; resources, S.M.; data curation, S.M. and K.R.; writing—original draft preparation, S.M. and D.S.; writing—review and editing, S.M. and D.S.; visualization, S.M.; supervision, D.S. and K.R.; and project administration, S.M. and D.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

The study was conducted according to the guidelines of the Declaration of Helsinki, and approved by the committee of the Medical University of Silesia (protocol code: PCN/CBN/0052/KB/131/22; date of approval: 12 July 2022).

Informed Consent Statement

Each study participant signed written consent to participate in this experiment and consented to the anonymous use of the collected data for the analysis and publication of the results.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Miskovic-Wheatley, J.; Bryant, E.; Ong, S.H.; Vatter, S.; Le, A.; Aouad, P.; Barakat, S.; Boakes, R.; Brennan, L.; Bryant, E.; et al. Eating Disorder Outcomes: Findings from a Rapid Review of over a Decade of Research. J. Eat. Disord. 2023, 11, 85. [Google Scholar] [CrossRef] [PubMed]
  2. Diagnostic and Statistical Manual of Mental Disorders, 4th ed.; American Psychiatric Publishing, Inc.: Arlington, VA, USA, 1994; ISBN 0-89042-061-0 (Hardcover); 0-89042-062-9 (Paperback).
  3. Dane, A.; Bhatia, K. The Social Media Diet: A Scoping Review to Investigate the Association between Social Media, Body Image and Eating Disorders amongst Young People. PLoS Glob. Public Health 2023, 3, e0001091. [Google Scholar] [CrossRef]
  4. Perloff, R.M. Social Media Effects on Young Women’s Body Image Concerns: Theoretical Perspectives and an Agenda for Research. Sex Roles 2014, 71, 363–377. [Google Scholar] [CrossRef]
  5. Fairburn, C.G.; Cooper, Z.; Shafran, R. Cognitive Behaviour Therapy for Eating Disorders: A “Transdiagnostic” Theory and Treatment. Behav. Res. Ther. 2003, 41, 509–528. [Google Scholar] [CrossRef] [PubMed]
  6. Del Casale, A.; Adriani, B.; Modesti, M.N.; Virzì, S.; Parmigiani, G.; Vento, A.E.; Speranza, A.M. Anorexia Nervosa and Familial Risk Factors: A Systematic Review of the Literature. Curr. Psychol. 2023, 42, 25476–25484. [Google Scholar] [CrossRef]
  7. Leary, M.R. Handbook of Theories of Social Psychology: Volume 2; Sage Publication: Thousand Oaks, CA, USA, 2012. [Google Scholar]
  8. Iliadis, C.; Frantzana, A.; Ouzounakis, P.; Kourkouta, L. Anorexia Nervosa: A Literature Review. Prog. Health Sci. 2020, 10, 74–79. [Google Scholar] [CrossRef]
  9. Dalhoff, A.W.; Romero Frausto, H.; Romer, G.; Wessing, I. Perceptive Body Image Distortion in Adolescent Anorexia Nervosa: Changes After Treatment. Front. Psychiatry 2019, 10, 748. [Google Scholar] [CrossRef] [PubMed]
  10. Cleland, L.; Kennedy, H.L.; Pettie, M.A.; Kennedy, M.A.; Bulik, C.M.; Jordan, J. Eating Disorders, Disordered Eating, and Body Image Research in New Zealand: A Scoping Review. J. Eat. Disord. 2023, 11, 7. [Google Scholar] [CrossRef] [PubMed]
  11. Slade, P.D. What Is Body Image? Behav. Res. Ther. 1994, 32, 497–502. [Google Scholar] [CrossRef] [PubMed]
  12. Markey, C.H.; Gillen, M.M. Body Image and Mental Health. In Encyclopedia of Mental Health; Levesque, R.J.R., Ed.; Elsevier Inc.: Boston, MA, USA, 2016; pp. 187–192. [Google Scholar] [CrossRef]
  13. Mahanta, P.; Kahua, T.; Choudhury, M.K.; Shobhana, M. The Influence of Culture and Society on Mental Health. Medico-Legal Updat. 2018, 18, 198. [Google Scholar] [CrossRef]
  14. Ahmedani, B.K. Mental Health Stigma: Society, Individuals, and the Profession. J. Soc. Work Values Ethics 2011, 8, 41–416. [Google Scholar] [PubMed]
  15. Foulkes, L.; Andrews, J.L. Are Mental Health Awareness Efforts Contributing to the Rise in Reported Mental Health Problems? A Call to Test the Prevalence Inflation Hypothesis. New Ideas Psychol. 2023, 69, 101010. [Google Scholar] [CrossRef]
  16. McGregor, K.A.; Clancy, O. 100. Starving For Support: Natural Language Processing And Machine Learning Analysis of Anorexia Nervosa In Pro-Eating Disorder Communities. J. Adolesc. Heal. 2019, 64, S53. [Google Scholar] [CrossRef]
  17. Rojewska, K.; Maćkowska, S.; Maćkowski, M.; Różańska, A.; Barańska, K.; Dzieciątko, M.; Spinczyk, D. Natural Language Processing and Machine Learning Supporting the Work of a Psychologist and Its Evaluation on the Example of Support for Psychological Diagnosis of Anorexia. Appl. Sci. 2022, 12, 4702. [Google Scholar] [CrossRef]
  18. Spinczyk, D.; Bas, M.; Dzieciątko, M.; Maćkowski, M.; Rojewska, K.; Maćkowska, S. Computer-Aided Therapeutic Diagnosis for Anorexia. Biomed. Eng. Online 2020, 19, 53. [Google Scholar] [CrossRef] [PubMed]
  19. Iliev, R.; Dehghani, M.; Sagi, E. Automated Text Analysis in Psychology: Methods, Applications, and Future Developments. Lang. Cogn. 2015, 7, 265–290. [Google Scholar] [CrossRef]
  20. Calvo, R.A.; Milne, D.N.; Hussain, M.S.; Christensen, H. Natural Language Processing in Mental Health Applications Using Non-Clinical Texts. Nat. Lang. Eng. 2017, 23, 649–685. [Google Scholar] [CrossRef]
  21. Rezaii, N.; Walker, E.; Wolff, P. A Machine Learning Approach to Predicting Psychosis Using Semantic Density and Latent Content Analysis. Npj Schizophr. 2019, 5, 9. [Google Scholar] [CrossRef]
  22. O’Dea, B.; Boonstra, T.W.; Larsen, M.E.; Nguyen, T.; Venkatesh, S.; Christensen, H. The Relationship between Linguistic Expression in Blog Content and Symptoms of Depression, Anxiety, and Suicidal Thoughts: A Longitudinal Study. PLoS ONE 2021, 16, e0251787. [Google Scholar] [CrossRef]
  23. Kim, J.; Lee, D.; Park, E. Machine Learning for Mental Health in Social Media: Bibliometric Study. J. Med. Internet Res. 2021, 23, e24870. [Google Scholar] [CrossRef]
  24. Yin, Z.; Sulieman, L.M.; Malin, B.A. A Systematic Literature Review of Machine Learning in Online Personal Health Data. J. Am. Med. Inform. Assoc. 2019, 26, 561–576. [Google Scholar] [CrossRef] [PubMed]
  25. López Úbeda, P.; del Arco, F.M.; Diaz Galiano, M.C.; Urena Lopez, L.A.; Martin, M. Detecting Anorexia in Spanish Tweets. In Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP 2019), Varna, Bulgaria, 2–4 September 2019; Mitkov, R., Angelova, G., Eds.; INCOMA Ltd.: Varna, Bulgaria, 2019; pp. 655–663. [Google Scholar]
  26. Cuteri, V.; Minori, G.; Gagliardi, G.; Tamburini, F.; Malaspina, E.; Gualandi, P.; Rossi, F.; Moscano, M.; Francia, V.; Parmeggiani, A. Linguistic Feature of Anorexia Nervosa: A Prospective Case-Control Pilot Study. Eat. Weight Disord. 2022, 27, 1367–1375. [Google Scholar] [CrossRef] [PubMed]
  27. Oh, J.S.; He, D.; Jeng, W.; Mattern, E.; Bowler, L. Linguistic Characteristics of Eating Disorder Questions on Yahoo! Answers–Content, Style, and Emotion. Proc. Am. Soc. Inf. Sci. Technol. 2013, 50, 1–10. [Google Scholar] [CrossRef]
  28. López-Úbeda, P.; Plaza-del-Arco, F.M.; Díaz-Galiano, M.C.; Martín-Valdivia, M.-T. How Successful Is Transfer Learning for Detecting Anorexia on Social Media? Appl. Sci. 2021, 11, 1838. [Google Scholar] [CrossRef]
  29. Park, H.; Kim, S. Chapter Three-Hardware Accelerator Systems for Artificial Intelligence and Machine Learning. In Hardware Accelerator Systems for Artificial Intelligence and Machine Learning; Kim, S., Deka, G.C., Eds.; Elsevier: Amsterdam, The Netherlands, 2021; Volume 122, pp. 51–95. ISBN 0065-2458. [Google Scholar]
  30. Abut, S.; Okut, H.; Zackula, R.; Kallail, K.J. Deep Neural Networks and Applications in Medical Research; Domínguez-Morales, P.D.M.J., Civit-Masot, D.J., Muñoz-Saavedra, M.L., Damaševičius, D.R., Eds.; IntechOpen: Rijeka, Croatia, 2023; Chapter 1; ISBN 978-1-83768-323-9. [Google Scholar]
  31. Hasan, M. Transformers in Natural Language Processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, Online, 16–20 November 2020. [Google Scholar]
  32. Dang, Y.; Chen, Z.; Li, H.; Shu, H. A Comparative Study of Non-Deep Learning, Deep Learning, and Ensemble Learning Methods for Sunspot Number Prediction. Appl. Artif. Intell. 2022, 36, 2074129. [Google Scholar] [CrossRef]
  33. Choi, S.R.; Lee, M. Transformer Architecture and Attention Mechanisms in Genome Data Analysis: A Comprehensive Review. Biology 2023, 12, 1033. [Google Scholar] [CrossRef] [PubMed]
  34. Kumar, J.; Goomer, R.; Singh, A.K. Long Short Term Memory Recurrent Neural Network (LSTM-RNN) Based Workload Forecasting Model For Cloud Datacenters. Procedia Comput. Sci. 2018, 125, 676–682. [Google Scholar] [CrossRef]
  35. Alfarraj, M.; AlRegib, G. Petrophysical-Property Estimation from Seismic Data Using Recurrent Neural Networks. In SEG Technical Program Expanded Abstracts 2018; SEG Technical Program Expanded Abstracts; Society of Exploration Geophysicists: Tulsa, OK, USA, 2018; pp. 2141–2146. [Google Scholar]
  36. Li, Y.; Yang, T. Word Embedding for Understanding Natural Language: A Survey BT-Guide to Big Data Applications. In Guide to Big Data Applications; Srinivasan, S., Ed.; Springer International Publishing: Cham, Switzerland, 2018; pp. 83–104. ISBN 978-3-319-53817-4. [Google Scholar]
  37. Reyad, M.; Sarhan, A.M.; Arafa, M. A Modified Adam Algorithm for Deep Neural Network Optimization. Neural Comput. Appl. 2023, 35, 17095–17112. [Google Scholar] [CrossRef]
  38. Liu, M.; Yao, D.; Liu, Z.; Guo, J.; Chen, J. An Improved Adam Optimization Algorithm Combining Adaptive Coefficients and Composite Gradients Based on Randomized Block Coordinate Descent. Comput. Intell. Neurosci. 2023, 2023, 4765891. [Google Scholar] [CrossRef]
  39. SAS Visual Analytics for SAS Viya; SAS Institute: Cary, NC, USA, 2020.
  40. Wierzba, M.; Riegel, M.; Wypych, M.; Jednoróg, K.; Turnau, P.; Grabowska, A.; Marchewka, A. Basic Emotions in the Nencki Affective Word List (NAWL BE): New Method of Classifying Emotional Stimuli. PLoS ONE 2015, 10, e0132305. [Google Scholar] [CrossRef]
  41. Holzinger, A.; Saranti, A.; Molnar, C.; Biecek, P.; Samek, W. Explainable AI Methods-A Brief Overview. In Proceedings of the xxAI-Beyond Explainable AI: International Workshop, Held in Conjunction with ICML 2020, Vienna, Austria, 18 July 2020; Revised and Extended Papers; Holzinger, A., Goebel, R., Fong, R., Moon, T., Müller, K.-R., Samek, W., Eds.; Springer International Publishing: Cham, Switzerland, 2022; pp. 13–38. ISBN 978-3-031-04083-2. [Google Scholar]
Figure 1. The average number of parts of speech per note in research and control groups.
Figure 1. The average number of parts of speech per note in research and control groups.
Applsci 14 03367 g001
Figure 2. The examples of valuable terms referring to the body in the anorexia notes.
Figure 2. The examples of valuable terms referring to the body in the anorexia notes.
Applsci 14 03367 g002
Figure 3. The results of the questionnaire according to the Likert scale.
Figure 3. The results of the questionnaire according to the Likert scale.
Applsci 14 03367 g003
Table 1. Questions in the questionnaire.
Table 1. Questions in the questionnaire.
Question
Number
Question
Q1Is the form of the tool helpful as a screening tool?
Q2Is the sentiment towards the body useful information?
Q3Is irony useful information?
Q4Is past tense useful information?
Q5Is Healthy/Sick tag useful information?
Q6Combined with a vocabulary assessment, does the tool help assess a person’s condition?
Table 2. The results of misclassification rate in machine learning.
Table 2. The results of misclassification rate in machine learning.
FlagHealthy/SickSentimentPast TenseIrony
ParameterMisclassification Error (%)Misclassification Error (%)Misclassification Error (%)Misclassification Error (%)
Experiment 126.663.3103.3
Experiment 218.452.621.110.5
Experiment 330.838.530.815.4
Table 3. The results of the feedback from specialists shown according to the Likert scale.
Table 3. The results of the feedback from specialists shown according to the Likert scale.
Question NumberExpert PsychologistsSchool Counselors/PsychologistsFirst Contract Staff (Nurses)
Q14.43.933.88
Q24.74.53.25
Q34.44.362.88
Q44.13.933.0
Q54.94.864.5
Q64.44.214.13
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Maćkowska, S.; Koścień, B.; Wójcik, M.; Rojewska, K.; Spinczyk, D. Using Natural Language Processing for a Computer-Aided Rapid Assessment of the Human Condition in Terms of Anorexia Nervosa. Appl. Sci. 2024, 14, 3367. https://doi.org/10.3390/app14083367

AMA Style

Maćkowska S, Koścień B, Wójcik M, Rojewska K, Spinczyk D. Using Natural Language Processing for a Computer-Aided Rapid Assessment of the Human Condition in Terms of Anorexia Nervosa. Applied Sciences. 2024; 14(8):3367. https://doi.org/10.3390/app14083367

Chicago/Turabian Style

Maćkowska, Stella, Bartosz Koścień, Michał Wójcik, Katarzyna Rojewska, and Dominik Spinczyk. 2024. "Using Natural Language Processing for a Computer-Aided Rapid Assessment of the Human Condition in Terms of Anorexia Nervosa" Applied Sciences 14, no. 8: 3367. https://doi.org/10.3390/app14083367

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop