Elamur Research

DisorBERT: A Double Domain Adaptation Model for Detecting Signs of Mental Disorders in Social Media

Paper · 2023 · Mario Ezra Aragón, A. Pastor López-Monroy, Luis C. González et al.

Summary

A person may describe difficulty sleeping or concentrating without naming the problem they are facing. Another person may discuss symptoms in detail because they are offering support. Both kinds of writing can appear in the same online community. DisorBERT examines whether a system that reads Reddit histories can better distinguish these cases after training on the language of the platform and on discussions of mental health. The study asks whether that preparation helps identify users in benchmark groups for anorexia, depression, and self-harm.

The authors start with BERT, a general-purpose system for representing text, and continue its training on broad Reddit material. They then continue from that version on a collection of mental health posts. At both stages, the training exercise is to recover words hidden from their surrounding text. A depression lexicon gives certain words priority when the authors choose what to hide. This makes the system practice recovering those words in context. For each detection task, the authors then use labeled Reddit histories to train a classifier. The classifier reads sections of a history separately, and the majority decision determines the label assigned to the user. Language models & pretraining · Text classification

On the eRisk test collections, DisorBERT with guided masking achieved positive-class F1 scores of 0.83 for anorexia, 0.69 for depression, and 0.72 for self-harm. F1 combines precision, the share of flagged users who carry the benchmark’s positive label, with recall, the share of positive users the system finds. The guided double adaptation scored above ordinary BERT and MentalBERT on this measure in all three tasks. The strongest self-harm setting was a simpler variant trained on mental health posts alone with guided masking, which reached 0.74. The comparisons therefore give different answers depending on the task and on whether the priority is finding more positive users or making fewer false positive predictions.

The authors also check what the adapted system learned before classification. It placed the original words of selected depression questionnaire responses higher in its predictions than BERT did. That result shows a change in the language the system expects to see. The classification results establish performance against research labels attached to Reddit histories. Those labels come from different sources across the tasks, including public reports of a diagnosis and questionnaire responses, and the experiments evaluate classification using the available histories. Clinical assessment and the timing of a useful early warning remain open questions.

Deep dive: DisorBERT: A Double Domain Adaptation Model for Detecting Signs of Mental Disorders in Social Media

DisorBERT adapts BERT to Reddit and mental health language, then tests whether that training helps identify signs of distress in user histories. · about 35 minutes to read

The problem and its context

What a Reddit history can tell a classifier

The paper starts from the observation that social media contains public accounts of everyday life, distress, and requests for help. Some users describe events as they happen. Others discuss psychological concerns directly, sometimes in spaces where they can speak anonymously. The authors also motivate the study through the disruption associated with the COVID-19 pandemic and the reported increase in anxiety and depression during that period. Their research question concerns the kinds of signs a computational system can identify in text people have already written.

A history contains language about the author and about other people. Someone can report an experience, describe a past event, give advice, or write about a topic because the community discusses it. The words available to a classifier may overlap across these uses. A search for terms associated with mental health can find relevant passages, but the benchmark asks the classifier to decide which user histories carry a particular label. That requires evidence beyond the fact that a topic appears. The control groups make the distinction concrete by including users who participate in mental health threads, potentially including clinicians offering support.

The unit of the task matters as much as the subject of the writing. The authors evaluate decisions about users, with the history of posts supplying the text for each decision. A passage can be informative even when much of the rest of the history concerns ordinary topics. Conversely, several passages can discuss a condition while supplying little information about the writer’s own situation. A user-level classification procedure needs a way to combine these passages. DisorBERT’s later decision rule gives each segment of the history a vote, which reflects the authors’ interest in signs that recur across the material.

The paper situates that task within research on computational screening. In the authors’ account, a system that surfaces textual evidence could support human work and help focus preventive attention. The experiments ask a narrower question that can be evaluated with the available data. Given previously collected writing and a benchmark label for each user, how well can a classifier recover those labels? Evaluating that question makes it possible to compare methods while keeping a distinction between what people write and what a clinician could determine with more information.

How earlier studies represented the text

Some of the earlier studies discussed in the paper represented posts through the words or short word sequences they contained. A classifier can use such features to learn which expressions tend to appear in positively labeled histories and which occur across both classes. A word sequence also preserves a little of the surrounding text. The appeal of this approach is that the features have a direct relationship to the input. Its representation still depends on which expressions the training data puts in view and how much of their context the features retain.

Other work used sentiment analysis to characterize the emotional properties of posts. The paper also describes studies that organized language into psychological categories to examine thinking styles, social relationships, and individual differences. Studies of suicide risk investigated associations between linguistic inquiry features and risk factors. These approaches bring different evidence into view. A category can connect several expressions that would otherwise be treated as separate words, while an emotional feature can describe a property of a passage that is distributed across the wording.

The paper describes a further direction in which systems learned representations of words and sequences together. Work on signs associated with suicide attempts combined word embeddings with a bidirectional long short-term memory network. The embeddings represent words numerically, and the network uses their sequence to incorporate context. Another study combined social media text with images to investigate suicidal ideation, examining the relationship between what users wrote and what they shared visually. DisorBERT’s inputs are text, so that latter line of work illustrates a separate source of evidence from the one tested here.

By the time of the study, earlier mental health projects had also applied fine-tuning to BERT. Fine-tuning starts from previously learned parameters and updates them using examples for a new objective. A system can therefore begin with general information about how words fit into sentences, then learn from labeled histories what tends to separate the benchmark classes. The authors treat this as a substantial baseline. Their question is whether BERT can arrive at the supervised task better prepared, particularly when useful language differs from the writing on which it initially trained.

Why adapt to both the platform and the subject?

BERT’s original training drew on books and Wikipedia. The authors identify separate reasons why that training might leave gaps for the task at hand. Broad Reddit writing differs from those sources in style and context. Mental health discussions also place familiar words in specialized contexts. Training on a collection that illustrates platform language can improve familiarity with the setting, while training on a narrower collection can give more practice with the situations and expressions pertinent to the task. In the authors’ design, the same parameters carry forward from the broad adaptation into the focused one.

As the paper explains, domain-specific training already had a precedent. SciBERT used scientific material to adapt BERT and improved on base BERT in multiple classification tasks. BioBERT trained on biomedical collections and was evaluated in biomedical text mining. BERTweet used roughly 850M tweets and was tested on tweet analysis tasks. These examples motivate the general move from a broad corpus to text closer to the eventual application. They also illustrate how the target domain can be defined by subject matter, by the medium in which people write, or by a combination of both.

MentalBERT is the closest comparison because it specializes in mental health language from Reddit. According to the paper, training on a corpus of 13,671,785 sentences took about eight days on four Tesla v100 GPUs. The DisorBERT authors emphasize the effort of assembling a corpus on that scale and the cost of training on it. Their design continues an existing training process using smaller collections. Comparisons with MentalBERT therefore address a practical question as well as a predictive one. They ask how much a particular adaptation procedure can accomplish with the resources the authors describe.

Continued pretraining itself was already an established approach in the work the paper cites. The authors draw on earlier methods for extending training on domain text and on a precedent for carrying it out in stages. Their own experiment combines that sequence with a change to the masked-word objective. The lexicon affects which positions become training targets, while the selected corpora determine the surrounding contexts. The paper’s controlled comparisons examine whether changing these choices helps on the final user classification tasks.

The method, step by step

From filling a blank to labeling a history

DisorBERT uses different exercises at different points in training. During adaptation, it sees a passage with selected words hidden and learns to recover them. The passage supplies the answers because the trainer knows what was originally there. During task training, the input instead comes from a labeled user history. The desired answer is a class label. A system can get better at predicting concealed words without becoming a better classifier, so the authors evaluate those outcomes separately.

The general idea behind masked-word training is that predicting a missing word requires information from its surroundings. If many targets come from psychological vocabulary, the system repeatedly has to use context to recover that vocabulary. The approach remains an exercise in reading a passage. It does not assign a risk label to a word or instruct the final classifier to flag a history merely because the word occurs. The lexicon decides where some of the blanks go during adaptation. The labeled examples later teach the classifier which patterns help distinguish the eRisk groups.

The sequence matters for how the study defines DisorBERT. The broad Reddit stage begins from BERT. The mental health stage begins from the version already adapted to Reddit. Each task then uses the resulting parameters as a starting point for supervised training. The single-domain alternatives take shorter paths from the original starting point, making it possible to compare the full sequence with an adaptation focused on either corpus.

From BERT to a user-level eRisk prediction

The steps in order.

From BERT to a user-level eRisk predictionStep 1: Start with pretrained BERT1. Start with pretrained BERTStep 2: Assemble broad Reddit text2. Assemble broad Reddit textStep 3: Prioritize lexicon words during masked-word training3. Prioritize lexicon words during masked-word trainingStep 4: Continue guided training on mental health posts4. Continue guided training on mental health postsStep 5: Fine-tune on labeled segments of user histories5. Fine-tune on labeled segments of user historiesStep 6: Predict a label for each test segment6. Predict a label for each test segmentStep 7: Combine segment labels by majority vote7. Combine segment labels by majority vote

The broad Reddit stage

For the first adaptation, the authors use a collection assembled by Kim and colleagues for text summarization. It contains more than 120k pairs of Reddit texts and summaries, covering a variety of subjects. Both sides of the pairs enter adaptation. The authors use them as material to read and predict words in, so the task for which the collection was originally assembled differs from the exercise DisorBERT performs.

The authors concatenate the examples into one body of text and divide it into blocks of 128 words. They describe these blocks as inputs for continued training. Concatenation and splitting make the training units blocks of a common size, whereas the source units were posts and their summaries. The description defines the block size in words. The relationship between those words and the internal pieces BERT reads is an implementation detail that the paper leaves open.

For this training the authors select 20% of the words for masking. They describe that percentage as within the customary range for BERT. The choice to use the lexicon concerns which words fill those places. Random selection spreads the prediction exercise across the text, including ordinary words and relevant expressions. Guided selection gives matches priority whenever they appear. In passages with few matches, the rest of the exercise still comes from random selections.

What the system can learn from this material depends on the contexts present in the collection. A broad discussion corpus exposes it to writing from a range of topics. Some passages may also contain words covered by the depression lexicon, which can appear in everyday uses as well as in discussions of distress. The training signal in either case is the original word. Accordingly, the priority rule can give the system practice with relevant vocabulary before it enters the focused mental health stage.

The focused mental health stage

The second adaptation uses four datasets drawn from Reddit communities with material connected to depression or mental health. The authors report more than 105k posts in the combined collection. They again join the examples and divide the text into blocks for masked-word training. The same depression lexicon guides target selection. The principal change is the text that supplies the words and contexts, together with the fact that training now continues from the broader Reddit adaptation.

The authors point out that people posting in these communities have a range of experiences. Someone can write about negative feelings without having a psychological disorder. Discussions can also contain accounts of other people and exchanges of support. The masked-word exercise can use these passages because its supervision comes from the wording itself. A contributor’s diagnostic status is unnecessary to the task of predicting a hidden word. The resulting adaptation is to language found in mental health discussions, a corpus property that is distinct from the health status of every writer.

The paper describes continuation training for three epochs, a batch size of 128, and a learning rate of 2e −5. An epoch is a pass through the material used for training. The batch size governs how many training examples are grouped together for an update, and the learning rate governs the size of changes to the learned parameters. The reported hardware is an NVIDIA Tesla V100 32GB SXM2 GPU. These settings belong to continued masked-word training. The supervised task stage has its own settings.

The path through the corpora gives the second stage a starting point that has already been updated on Reddit data. This is an important detail when reading the single-domain results. The health-only variant also learns from mental health text, but it arrives there directly from BERT. Comparing those paths tests the effect of including broad Reddit adaptation before the health stage as implemented by the authors. It also changes the material and amount of continuation training, issues that matter when judging claims about the order itself.

How the lexicon chooses the blanks

The lexical resource comes from Losada and Gamallo’s work on depression vocabulary. The paper says that its creators extended an existing terminology collection using patterns of distribution in text and lexical relationships such as synonymy. Distributional evidence concerns the contexts in which words appear. Synonymy concerns similarity of meaning. Together these sources gave the authors an existing vocabulary to use when deciding which words should receive extra practice during training.

DisorBERT’s authors extend the verbs in that resource with inflected forms. Their example begins with abandon and includes abandoned, abandoning, and abandons. These forms can occur when the timing or grammatical framing of an event changes. A match against the base form alone would fail to give those other forms the same priority. The expansion makes the masking rule apply across more of the morphology already present in the training text. The resource still has a single depression-oriented origin, including when it is used to prepare classifiers for anorexia and self-harm.

For a piece of input text, the authors first look for words that occur in this expanded lexicon. They mask those words first. If this leaves part of the 20% budget unfilled, they select other words at random until they reach the target. A passage with no matching vocabulary is thus handled through random selection. A passage with matches directs more of the training exercise toward those positions. The procedural description gives priority to matches and explains how the authors fill an undersized selection. It leaves the choice among matches unspecified for a passage in which they could exceed the budget.

The distinction between a target and a cue helps explain the design. In the masked exercise, a prioritized word is itself the answer the system is asked to recover. It has to use the visible surroundings to do so. The same word may be visible in other training examples or during classification. The procedure changes the training examples presented to BERT and therefore can change what it learns from context. The authors’ attention visualizations come later and examine the trained system. The masking rule itself sets priorities for training targets.

The variants using random masking retain the same basic exercise and omit the lexical priority. This comparison is valuable because a term from the lexicon could be selected by chance under random masking too. The experiment asks what happens when these terms are preferentially selected. Its measured outcome is classification performance on a separate labeled task. The paper does not report a separate experiment on the contribution of the added verb forms or the original lexicon construction methods.

Turning posts into classifier inputs

For downstream classification, the authors lower-case the text and remove material such as URLs, hashtags, and emoticons. They divide each user’s history into segments. The chosen count, expressed using the paper’s notation, is:

N = 35

Here N is the number of segments into which the authors divide a user’s post history. The equals sign identifies the selected setting, and 35 is the value the authors chose empirically after trying sequence sizes drawn from earlier work. The same count applies to histories with different amounts of text. A segment is the classifier’s immediate input, while the user remains the unit that receives the final test label.

During task training, the authors treat each segment as an individual item associated with the user’s class. This makes it possible to use portions of a history as training examples. It also means the labels refer to users, even when applied to segments that discuss unrelated matters. In a positively labeled history, the training evidence can range from relevant descriptions to ordinary passages. The procedure makes sense as a way to learn from labels available at the history level, where a separate determination for each passage is unavailable.

The classification stage uses a batch size of 256, the Adam optimizer, and a learning rate of 1e −5. The training loss is cross-entropy. For a labeled input, this loss penalizes the classifier for assigning low probability to the correct class. Adam uses the training loss to guide parameter updates. The authors train for three epochs and report using an NVIDIA Tesla V100 32GB SXM2 GPU. The implementations use HuggingFace v4.24.0 and PyTorch v1.13.0.

At test time each segment receives a binary prediction. In the paper’s notation, a positive segment gets 1, and the other label is 0. A majority of positive segments gives the user a positive classification. The procedure combines votes after the classifier has assigned labels. A vote contributes according to its class, without any reported extra weight for the classifier’s confidence or for the recency of the text.

This voting rule makes repeated evidence particularly relevant to the final prediction. A history with a short passage suggesting risk can still receive a control prediction if most other segments are classified that way. Likewise, scattered signals can affect the result when they recur across enough segments. These are consequences of the decision rule. The paper evaluates the result against user labels with the available histories, leaving the timing and strength of the evidence within them as separate questions.

The ranking calculation used in the language analysis

The authors also measure how much the recovery of hidden words changes after adaptation. For this experiment, they select questionnaire responses from the Beck Depression Inventory, or BDI, and remove a keyword from each response. The original keyword supplies the known answer. They retain the top 5 predictions for each response and use reciprocal rank to reward an answer more when it appears earlier:

RR = 1 ÷ r

RR is reciprocal rank for a single response. r is the position of the original word in the ranked predictions, with 1 identifying the earliest position. The division sign expresses the inverse relationship. The paper separately assigns RR a value of 0 for an original word outside the retained predictions. Thus the measure registers both whether the original word appears in the list and where it appears.

The authors then average the scores across the responses. That calculation can be written as:

MRR = (∑ᵢ RRᵢ) ÷ n

MRR is mean reciprocal rank. i identifies a response, RRᵢ is that response’s reciprocal rank, and ∑ᵢ adds those values across all responses in the probe. n counts the responses included in the average. The parentheses group the sum before division. This procedure evaluates the ordering of specific word completions. The binary classification experiment instead evaluates whether the assigned user label matches the benchmark.

Experiments and results

The eRisk collections and their labels

The authors evaluate anorexia and self-harm with collections from eRisk 2019-2020. The depression experiment uses eRisk 2018 data for training and the eRisk 2020 depression collection for testing. All the classification inputs are drawn from Reddit histories, but the meanings and origins of their labels differ. That difference is important when comparing the scores. Each task asks for a distinction between a positive and a control group defined for that collection.

According to the paper’s description of the anorexia and self-harm tasks, the organizers looked for explicit reports of a diagnosis by a medical specialist when identifying positive users. A statement expressing suspicion or assigning oneself a label without such a report was insufficient. The comparison groups include both randomly selected Reddit users and participants in relevant mental health threads. This makes topic familiarity an imperfect guide to the label. There can be rich discussion of symptoms or risks in a control history.

The depression test group comes from a different process. The eRisk organizers collected users’ answers to the BDI and originally asked participants to estimate severity from the history of posts. The questionnaire acted as the reference for that assessment. DisorBERT’s authors turn this into a binary classification task. For the test collection, users with BDI scores of 21 or more enter the positive group, and users with scores lower than 21 enter the control group. The paper describes a score higher than 20 as indicative of moderate or severe depression. Here the control class is defined by the questionnaire cutoff.

The collections also vary in the balance between positive and control users. The anorexia training split contains 61 positive users and 411 controls. Its test split contains 73 positive users and 742 controls. For depression, the training split contains 214 positive users and 1493 controls. The test split contains 40 positive users and 49 controls. The self-harm training split contains 41 positive users and 299 controls, and its test split contains 104 positive users and 319 controls. The depression test split has a substantially different class balance from its training split, and its balance also differs from that of the other test collections.

The quantity of writing varies within and between the collections. In the anorexia test split, the positive group averages 241.4 posts per user, while the control group averages 745.1. In the self-harm test split, the corresponding averages are 112.4 and 285.6. In the depression test split, the positive group averages 493.0 posts and the control group averages 543.7. Because the authors partition each history into the same number of segments, the amount of writing underlying a segment can vary with the history. These dataset statistics describe the setting in which the voting rule is tested.

The paper also reports average words per post for the groups. In the anorexia test split these averages are 37.2 for positive users and 21.7 for controls. In self-harm they are 21.4 for positive users and 11.9 for controls. In depression the averages are 39.2 for positive users and 45.6 for controls. The direction of the group difference in post length therefore depends on the collection. The paper reports these figures as descriptions of the data, without isolating the effects of post count or post length on the classifier.

What the baselines learn from

The bag-of-words comparison represents text through individual words, or unigrams. It weights these features using TF-IDF, which gives a word weight based on its occurrence in a text and how broadly it occurs across texts. The authors use a chi-square test to select features associated with the class labels. A support vector machine with a linear kernel then classifies the weighted representation. The authors tried alternatives within the bag-of-words approach and report that this classifier performed best among the ones they examined.

The neural baselines are a convolutional network and a bidirectional long short-term memory network. In the results the latter is labeled RNN-GloVe, with RNN referring to a recurrent neural network. Both use GloVe embeddings of dimension 300. The reported networks use 100 neurons and Adam. The convolutional network uses 100 randomly initialized filters with sizes 1 and 2. These baselines can learn from short local patterns or sequences of words while starting from a different representation of the input than BERT uses.

The BERT baseline starts with the general pretrained parameters and receives supervised training on the corresponding task’s labeled data. MentalBERT also receives supervised training for each task, but its starting parameters come from earlier training on Reddit mental health language. These comparisons help distinguish familiar alternatives for a researcher selecting a system. The study also uses its own Reddit-only and health-only adaptations, together with guided and random versions of the double adaptation. Those variants give more direct comparisons of the specific design choices.

The authors say they explored baseline settings through manual or grid search, depending on the system, and used the best-performing configurations they found. Grid search compares combinations from a chosen set of parameter values. The results therefore compare tuned baselines under the authors’ evaluation setup. The shared-task comparison is distinct because it uses published results from teams whose original objective included identifying users early.

What the metrics measure

The reported classification scores concern the positive class at the user level. Precision measures how many of the people the classifier flags belong to the benchmark’s positive group. A classifier has lower precision when more controls receive a positive prediction. Recall measures how many people in the benchmark’s positive group the classifier flags. A classifier has lower recall when more of those users receive the control prediction. Both quantities depend on the benchmark labels and on the final vote for each user.

Taking the harmonic mean of recall and precision gives the F1 score. A result with both scores reasonably high can have a stronger F1 than one with high precision and low recall, or the reverse. This is particularly relevant when there are many more controls than positive users. An overall count of correct decisions can give a different picture because it includes correct control predictions. Positive-class F1 summarizes performance on finding cases and limiting false flags without showing every aspect of the classifier’s behavior.

These measures help explain why the same variant can look stronger or weaker depending on the intended comparison. Precision describes the quality of a set of alerts relative to the benchmark, while recall describes its coverage of the known positive users. The authors discuss applications that might prioritize coverage and others that might want a more selective set of alerts. Their results give observed scores at the reported classification settings. They do not establish an operating point for an actual screening program.

Anorexia

Anorexia is the clearest case in which the guided double adaptation achieved the strongest positive-class F1 in the reported comparison. General BERT reached 0.77, and MentalBERT reached 0.76. The guided Reddit-only and health-only variants each reached 0.82. DisorBERT with random masking also reached 0.82. With guided masking in both stages, it reached 0.83. The result places several kinds of continuation training ahead of the pretrained baselines in this experiment, with the authors’ full procedure finishing highest.

Positive-class F1 on the eRisk anorexia test split

Guided DisorBERT leads the comparison, with several adapted variants close behind.

Positive-class F1 on the eRisk anorexia test splitBERT: 0.77BERT0.77MentalBERT: 0.76MentalBERT0.76Reddit-only BERT with guided masking: 0.82Reddit-only BERT with guided masking0.82Health-only BERT with guided masking: 0.82Health-only BERT with guided masking0.82DisorBERT with random masking: 0.82DisorBERT with random masking0.82DisorBERT with guided masking (this paper): 0.83DisorBERT with guided masking (thispaper)0.83
The numbers
System or settingF1
BERT0.77
MentalBERT0.76
Reddit-only BERT with guided masking0.82
Health-only BERT with guided masking0.82
DisorBERT with random masking0.82
DisorBERT with guided masking (this paper)0.83

The positive-class precision and recall columns show which users the systems tended to flag. BERT obtained precision of 0.70 and recall of 0.85. Guided DisorBERT obtained precision of 0.82 and recall of 0.85. MentalBERT found a larger share of the positive users, with recall of 0.89 and precision of 0.66. The guided Reddit-only variant recorded 0.82 for both measures. Thus, even among systems with close F1 values, the balance between correctly flagging users and finding the labeled positives varies.

The pattern is more pronounced for the GloVe baselines. In the anorexia test set, the recurrent approach reached precision of 0.92 and recall of 0.51. The convolutional approach reached precision of 0.93 and recall of 0.52. Their reported F1 scores were 0.65 and 0.67, respectively. High precision in these rows means a high share of their positive predictions matched the positive labels. The recall values show that positive predictions covered a smaller share of the positive group than the adapted BERT variants did.

Depression

On the binary depression test set, BERT reached a positive-class F1 of 0.62 and MentalBERT reached 0.67. The health-only variant with random masking also reached 0.67. The guided Reddit-only, guided health-only, and random double-adaptation settings each recorded 0.68. Guided DisorBERT reached 0.69. The stronger settings are close together on the reported scale. These scores apply to the task the authors created from the cutoff in BDI scores.

Positive-class F1 on the eRisk depression test split

Guided DisorBERT has the highest reported F1 among several closely grouped adaptations.

Positive-class F1 on the eRisk depression test splitBERT: 0.62BERT0.62MentalBERT: 0.67MentalBERT0.67Reddit-only BERT with guided masking: 0.68Reddit-only BERT with guided masking0.68Health-only BERT with guided masking: 0.68Health-only BERT with guided masking0.68DisorBERT with random masking: 0.68DisorBERT with random masking0.68DisorBERT with guided masking (this paper): 0.69DisorBERT with guided masking (thispaper)0.69
The numbers
System or settingF1
BERT0.62
MentalBERT0.67
Reddit-only BERT with guided masking0.68
Health-only BERT with guided masking0.68
DisorBERT with random masking0.68
DisorBERT with guided masking (this paper)0.69

The guided double adaptation recorded positive-class precision of 0.56 and recall of 0.89. MentalBERT recorded precision of 0.57 and recall of 0.80. Two random-masking variants attained recall of 0.93, one with health-only adaptation and one with double adaptation. Their precision values were 0.53 and 0.54, respectively. Guided masking in the double adaptation gives the highest reported F1, while versions with random masking give the highest reported recall. The authors’ precision–recall plot illustrates this kind of tradeoff across the tasks.

The traditional baselines put the adapted results in context. The bag-of-words system recorded depression F1 of 0.58, with precision of 0.56 and recall of 0.60. The convolutional baseline recorded F1 of 0.61, with precision of 0.56 and recall of 0.68. An observed precision can therefore recur across systems that find different shares of the positive group. Guided DisorBERT belongs to that set of examples, with the same reported precision of 0.56 and recall of 0.89.

Self-harm

The strongest self-harm result comes from guided health-only adaptation. Its positive-class F1 was 0.74. Guided DisorBERT obtained 0.72, as did the randomly masked double adaptation and the guided Reddit-only variant. MentalBERT recorded 0.71, and general BERT recorded 0.60. The experiment supports the usefulness of continued adaptation in this setting. Within the adapted systems, the ranking favors a single focused stage under the selected metric.

Positive-class F1 on the eRisk self-harm test split

Guided health-only adaptation ranks first, ahead of both double-adaptation variants.

Positive-class F1 on the eRisk self-harm test splitBERT: 0.60BERT0.60MentalBERT: 0.71MentalBERT0.71Reddit-only BERT with guided masking: 0.72Reddit-only BERT with guided masking0.72Health-only BERT with random masking: 0.69Health-only BERT with random masking0.69DisorBERT with random masking: 0.72DisorBERT with random masking0.72DisorBERT with guided masking: 0.72DisorBERT with guided masking0.72Health-only BERT with guided masking (this paper): 0.74Health-only BERT with guided masking(this paper)0.74
The numbers
System or settingF1
BERT0.60
MentalBERT0.71
Reddit-only BERT with guided masking0.72
Health-only BERT with random masking0.69
DisorBERT with random masking0.72
DisorBERT with guided masking0.72
Health-only BERT with guided masking (this paper)0.74

Guided health-only adaptation obtained precision of 0.72 and recall of 0.76. Guided DisorBERT obtained precision of 0.73 and recall of 0.71. The random double adaptation had precision of 0.65 and recall of 0.80. The identical F1 values for the double-adaptation variants therefore conceal different behavior. With guidance, a greater share of positive predictions matched positive users, and a smaller share of the positive group was identified.

At either end of the tradeoff, the paper reports striking baseline results. The bag-of-words system reached positive-class precision of 0.95 and recall of 0.34. BERT reached precision of 0.44 and recall of 0.94. Their positive-class F1 values were 0.50 and 0.60, respectively. Each excelled on a different component of F1. The adapted systems tended to occupy a more balanced region of the authors’ plot for self-harm, although some of the earlier baselines found a larger share of positive users than the guided variants did.

How the shared-task comparison should be read

The paper places the best DisorBERT result for anorexia and self-harm alongside the F1 scores of eRisk participants. In both comparisons the authors report that their result falls in the highest quartile. In anorexia they report an F1 above that of the highest-scoring participant. The boxplots locate DisorBERT in the distribution of published classification scores. The paper gives no corresponding comparison for the eRisk 2020 depression participants, whose original task was assessed with different metrics.

The conditions differ in a way that matters to the interpretation. The eRisk teams had an objective that included early decisions as well as correct ones. The DisorBERT comparison uses decisions from the available histories and evaluates correctness. A system that can read the available posts before committing has different evidence from one aiming to flag a user early. The boxplots place the resulting labels in context, while the value of the method for predicting at an earlier point in a history remains unmeasured.

What the ablations show

What changes when the authors choose a different corpus?

The paper reports single-domain variants that adapt BERT only to broad Reddit text or only to mental health text. Each is evaluated with random and guided masking. The double adaptation is evaluated with both masking choices too. These comparisons answer practical questions about the procedure. A reader can see how the shorter and longer paths perform with the same type of masking, and how lexical selection changes outcomes within a given path.

With random masking, Reddit-only adaptation reached anorexia F1 of 0.81, health-only adaptation reached 0.80, and double adaptation reached 0.82. For depression the corresponding results were 0.66, 0.67, and 0.68. For self-harm they were 0.71, 0.69, and 0.72. Under random masking, the two-stage procedure led the single-domain alternatives on positive-class F1 across these test splits. The pattern indicates that the result for the double adaptation does not require the priority rule to appear in this particular comparison.

With guided masking, Reddit-only and health-only adaptation both reached anorexia F1 of 0.82, and double adaptation reached 0.83. In depression the single-domain variants each reached 0.68, and double adaptation reached 0.69. In self-harm the guided health-only approach reached 0.74, with the guided Reddit-only and double settings both at 0.72. The contribution of the broad stage to the reported best setting therefore varies by task. The guided self-harm result is direct evidence that the added stage is unnecessary for the highest F1 reported on that test split.

There are several differences between a single-domain path and the full path. The latter sees material from both sources and goes through continuation training in the stated sequence. A comparison with the health-only setting changes both prior exposure to Reddit material and the amount of adaptation the system has undergone. The paper evaluates these as complete procedures. Its results leave open how training for the same amount of time in another order, or on a combined collection, would affect the comparison.

What changes when the lexicon chooses targets?

The within-corpus comparisons bring the masking decision closer to isolation. For the Reddit-only path, guided masking changes anorexia F1 from 0.81 to 0.82 and depression F1 from 0.66 to 0.68. Self-harm F1 moves from 0.71 to 0.72. For the health-only path, guided masking changes anorexia F1 from 0.80 to 0.82 and depression F1 from 0.67 to 0.68. Self-harm moves from 0.69 to 0.74. The health-only self-harm pair is especially informative because the lexicon was assembled for language connected with depression.

For the double adaptation, the guided version improves the reported F1 for anorexia and depression, while the self-harm F1 stays at 0.72. The precision and recall values still move on self-harm. Thus the ablation shows both a transfer of benefit to another task and a case where the form of that benefit depends on the metric. The findings are consistent with the idea that a depression vocabulary overlaps with contexts relevant to the other tasks. They leave the responsible words and contexts unidentified.

The masking change also alters the classifier’s behavior in different directions depending on the setting. In the Reddit-only depression comparison, guided masking reports recall of 0.90 and precision of 0.55, while random masking reports recall of 0.80 and precision of 0.56. In the health-only depression comparison, guided masking reports recall of 0.85 and precision of 0.57, while random masking reports recall of 0.93 and precision of 0.53. The same priority rule is associated with higher recall in the broad adaptation and higher precision in the focused one. Its effect depends on the input contexts and the subsequent training path.

The comparisons attribute these outcomes to the guided procedure as a whole. The design combines a particular lexicon with verb expansion and a rule that gives matches priority before filling remaining places randomly. The paper does not compare this lexicon with an equally sized set of unrelated words or with another lexicon tailored to a different condition. It therefore gives direct evidence about this guided procedure and open questions about which properties of the lexical resource account for the gains.

What the significance comparison establishes

The authors use McNemar’s test to compare the best DisorBERT results with selected baselines and with health-only adaptation. The test uses paired outcomes on the same users. In this setting the informative cases are those on which one member of the pair was correct and the other was wrong. This is a different question from how far apart their positive-class F1 scores are, because F1 summarizes precision and recall and the paired test examines disagreements in correctness.

The reported comparisons with BERT, the convolutional network, and the support vector machine are marked p < 0.001 in all three tasks. For MentalBERT, the anorexia comparison is marked p < 0.001, while depression and self-harm are marked p < 0.05. For health-only BERT, the anorexia and depression comparisons are marked p < 0.05, and self-harm is marked p < 0.01. Here p is the probability used for the significance decision under the test’s null hypothesis. The thresholds describe the evidence against that hypothesis in each reported comparison.

The significance markings alone give neither the direction of an F1 difference nor the result of the comparison under a different metric. Health-only adaptation and DisorBERT illustrate why those distinctions matter. The authors report a statistically significant difference for self-harm, while the best guided health-only row has the higher positive-class F1. The statistical table also concerns pairs of trained systems on these test users. Variation across repeated training runs is a separate source of uncertainty.

What the missing-word experiment reveals

The authors chose a response for each of the 21 BDI items and masked a keyword in each selected response. The questions cover concerns such as mood, guilt, pessimism, and dissatisfaction with oneself. For each masked response, BERT and DisorBERT supplied ranked word predictions. Because the original word was known, the authors could inspect the meanings of the proposed words and measure where the intended word appeared.

In an example about an ability the speaker once had, BERT proposed activities such as reading and walking. DisorBERT produced possibilities such as focusing, sleeping, and eating, which the authors relate to difficulties associated with mental health. In another example, involving a negative statement about oneself, the guided adaptation placed the original verb at the top. Such differences give a concrete sense of the change in the expectations learned during adaptation. A completion may fit a sentence grammatically while carrying a different implication about the speaker’s situation.

On the top 5 predictions per response, BERT obtained an MRR of 0.2436, and DisorBERT obtained 0.4325. These scores refer to the original words in the selected BDI responses. The higher value means DisorBERT recovered more of the original words near the front of the lists, achieved better positions on words both systems recovered, or benefited from both. The authors report that even the adapted system struggled with several items. A response can also admit a plausible alternative word, and this measure awards credit specifically for the original one.

The paper provides a second view of the predictions by collecting the predicted words and weighting them by frequency across the probe. The authors observe more general vocabulary in BERT’s outputs and more words associated with mental health in DisorBERT’s. Some words appear in both sets but recur with different frequencies. The paper reports a cosine similarity of 0.4767 between the resulting word distributions. Cosine similarity measures how closely the patterns of weights align. The authors interpret the result as showing some overlap alongside substantial differences in the predictions.

This probe compares BERT with the finished adaptation. Both the choice of corpora and the lexical priority distinguish those systems. The classification ablations help show how the choices affect user-level F1, but the paper gives no corresponding missing-word scores for the intermediate or randomly masked variants. The probe establishes a difference in what the finished system predicts. The contribution of each adaptation stage to the questionnaire result remains open.

What the attention examples reveal

For a more local view of classifier behavior, the authors apply a visualization based on Transformer and attention. A Transformer uses attention weights to combine information across positions in its input. There are multiple attention heads, each forming its own pattern of weights, and the patterns can change across layers. The method the authors use begins at the special [CLS] token associated with classification and traces high-weight connections to tokens in the preceding layer. The resulting graph shows which parts of a post become prominent along those paths.

The authors illustrate the procedure with a user who had the highest BDI score in the depression collection and a user in the self-harm group. In the depression example, they identify prominent language connected with anxiety and medication. In the self-harm example, they identify language suggesting low self-confidence. These are illustrations of what the trained system attends to in selected passages. They add information of a different kind from the masked-word probe, which looks at predictions for fixed sentences, and from the F1 comparisons, which aggregate user decisions.

The graphs are examples of interpretability through inspection of internal weights. Their evidential reach is local. A high attention value identifies a connection selected by the visualization. Determining whether the selected phrase was necessary for the classifier’s decision would require testing what happens when that phrase or its context changes. Similarly, determining how common those patterns are would require inspecting a broader sample of positive and control histories. The paper presents the graphs to illustrate the kinds of material that can receive attention.

Limitations

Limits the authors identify

The authors describe the collections as observational. They have access to Reddit histories and the labels constructed for eRisk, while personal and medical information normally used in risk assessment is outside the study. An explicit public report of a diagnosis is evidence about what a person says happened. Its accuracy cannot be independently checked with the data used in the paper. The authors acknowledge that some publicly reported cases could therefore be mislabeled. They also explain why self-reports are used to construct experimental benchmarks in this research area.

A second stated limit concerns who appears in the collections. The people whose histories are available may differ from people at risk who rarely use social media, lack an account, or keep their writing private. The authors mention older people among the groups that can be missed by this method of collecting data. The study can evaluate patterns in writing that users chose to share in these settings. Its results give little information about people whose experiences never enter the data.

The authors’ ethics discussion addresses privacy and the possibility of biased predictions associated with age, gender, or sexual orientation. They describe the collections as publicly available and anonymized and say the research involved no contact with users. They also describe the data use as research use under the respective terms. These statements describe how the experiments were conducted. Performance for particular demographic groups remains unmeasured by the results in the paper.

The comparison with eRisk participants comes with a qualification the authors state explicitly. Those teams worked on making predictions early as well as accurately. DisorBERT’s evaluation focused on the accuracy of classification once the available text could be used. The paper also acknowledges that different applications might value precision and recall differently. The observed balance in the benchmarks motivates the authors’ discussion of screening, while selecting a threshold and measuring the consequences of acting on alerts would require evidence from the intended setting.

The conclusion identifies additional scope limits by naming directions for further work. The authors suggest trying lexical resources closer to each target task and examining clinical data, including MIMIC, for more specialized training. They also want to investigate whether emojis should be included, given their role in social media writing, and to expand the work beyond its focus on English. These directions concern sources of evidence that the reported experiments did not evaluate.

Limits visible in the experimental design

The labels belong to different kinds of evidence. In the depression test split, the positive class is defined by a threshold on a questionnaire about symptom severity. Its control class covers respondents below that threshold. For the other tasks, the paper describes positive-group selection through explicit public reports and a control group drawn from Reddit activity. The classification scores are meaningful against those definitions. A common clinical interpretation across all the positive labels would need additional information about how each label relates to an assessment performed in practice.

The use of histories also leaves the timing of useful evidence unresolved. The training procedure applies a user label to each segment, and the test procedure gives each segment an equal vote after classification. A positive decision may depend on material from several times in a history, possibly including explicit discussions of receiving a diagnosis. The paper does not report a separate evaluation that excludes these discussions or asks how early the remaining evidence would have supported a correct decision. Good classification of the available text therefore leaves the onset and recognition of symptoms as separate questions.

Relatedly, the authors chose 35 segments empirically, but they do not present a comparison across segmentation counts or voting rules in the main results. Evidence that appears in one concentrated part of a history contributes differently under this procedure than evidence that recurs across many segments. Differences in history lengths can also affect what gets grouped together. The result is for the reported segmentation and majority vote as a package. The value of any particular number of segments or the advantage of majority voting over other ways to combine predictions remains open.

The adaptation comparisons establish that the tested path works well relative to the reported alternatives. To establish a benefit specifically from the order, a comparison would need to vary which corpus comes first while controlling exposure or training effort. A mixed-corpus setting could also test whether separate stages matter. The existing single-domain comparisons change the amount and type of data seen along with the number of stages. The paper’s efficiency argument is grounded in starting with trained BERT and in the reported corpora and hardware. It does not supply a matched measurement of the full cost of obtaining each comparison system.

The transfer from a depression lexicon to anorexia and self-harm is another result with a well-defined scope. It shows that a resource prepared for one area can help in these benchmark tasks, including the strongest self-harm setting. The experiment leaves open whether the same benefit would hold in different communities, where relevant experiences might be described differently, or how performance would change with a vocabulary focused on each task. It also leaves open whether certain terms drawn from the lexicon explain much of the observed change or whether the effect is spread across many kinds of training context.

There is uncertainty about how stable small score differences are. The paper provides point estimates and paired tests on the reported test predictions. It gives no spread across random initializations for the closely grouped F1 results. That matters especially when variants report similar values or share an F1 with different precision and recall. A paired comparison answers whether the observed patterns of errors differ on the same users. Repeated training would address whether changing the random training conditions could alter the ordering.

Finally, the two analyses of learned behavior have different limitations. Recovering words from the BDI demonstrates closer alignment with the selected inventory responses. It leaves open whether the system can recognize equivalent descriptions people produce outside those prompts or estimate their symptom severity. Attention graphs can illustrate selected text that receives high weights. They leave open whether that text drives correct decisions consistently, whether similar phrases are used in control histories, and how the system behaves when a passage expresses those ideas in another way. The paper’s strongest evidence remains the comparative classification results on the specified eRisk collections.

What came after

There are no documented follow-up studies to trace here. The open questions the authors identify concern the effect of task-specific vocabulary, the use of clinical text for adaptation, the contribution of emojis, and whether the approach transfers to other languages. These are directions proposed by the authors, with outcomes still undetermined in the study.

Cite

Cite as Mario Ezra Aragón, A. Pastor López-Monroy, Luis C. González, David E. Losada and Manuel Montes-y-Gómez. 2023. DisorBERT: A Double Domain Adaptation Model for Detecting Signs of Mental Disorders in Social Media. Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2023.acl-long.853

@inproceedings{aragon2023disorbert,
  title = {{DisorBERT: A Double Domain Adaptation Model for Detecting Signs of Mental Disorders in Social Media}},
  author = {Mario Ezra Aragón, A. Pastor López-Monroy, Luis C. González, David E. Losada and Manuel Montes-y-Gómez},
  booktitle = {Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.853},
  url = {https://doi.org/10.18653/v1/2023.acl-long.853}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/aragon-2023-disorbert-double-domain-adaptation-model/