MasonNLP+ at SemEval-2023 Task 8: Extracting Medical Questions, Experiences and Claims from Social Media using Knowledge-Augmented Pre-trained Language Models
Year: 2023

Abstract:
In online forums like Reddit, users share their experiences with medical conditions and treatments, including making claims, asking questions, and discussing the effects of treatments on their health. Building systems to understand this information can effectively monitor the spread of misinformation and verify user claims. The Task-8 of the 2023 International Workshop on Semantic Evaluation focused on medical applications, specifically extracting patient experienceand medical condition-related entities from user posts on social media. The Reddit Health Online Talk (RedHot) corpus contains posts from medical condition-related subreddits with annotations characterizing the patient experience and medical conditions. In Subtask-1, patient experience is characterized by personal experience, questions, and claims. In Subtask-2, medical conditions are characterized by population, intervention, and outcome. For the automatic extraction of patient experiences and medical condition information, as a part of the challenge, we proposed languagemodel-based extraction systems that ranked 3 on both subtasks’ leaderboards. In this work, we describe our approach and, in addition, explore the automatic extraction of this information using domain-specific language models and the inclusion of external knowledge.

heading: 1 Introduction
text: Social media platforms, like Reddit, allow users to share their experiences pseudonymously. On these platforms, users tend to share different kinds of information, including questions, their personal experiences using certain prescribed drugs, or how they deal with the different symptoms caused by their medical condition. Users may also make claims about certain clinical and non-clinical interventions (e.g. home remedies) and the associated outcomes. While this information can provide insight into
∗ Equal contribution
medical conditions and how the condition presentation among users, their personal experience may be inconsistent with current medical evidence.
Thus, effective monitoring of these medical condition-related forums is needed to prevent the spread of misinformation and corroborate various user claims against scientific evidence. Information from social media could also augment current scientific understanding of conditions and treatments. Natural language processing (NLP) information extraction (IE) techniques can extract information from user posts, which could be incorporated into systems for monitoring and preventing user misconception. The RedHot (Wadhwa et al., 2022) corpus consists of over 22,000 user posts from 24 medical condition-related subreddits annotated for entities related to patient experiences, claims, interventions, and outcomes. The posts are annotated in two stages: (1) Subtask-1 annotations include user claims, personal experiences, questions, and claim-based personal experiences and (2) Subtask2 annotations contain more granular information through entities related to patient population, intervention, and outcome (PIO).
In this work, we explore the automatic extraction of these entities from a subset of the RedHot corpus as released through Task-81 (Khetan et al., 2023) of the 17th workshop on Semantic Evaluation. The extraction of the patient experience and PIO entities was pursued in Subtask-1 and Subtask2, respectively. We propose Bidirectional Encoder Representations from Transformer (BERT)-based systems that extract the patient-experience and medical-condition entities. In this work, we compare BERT-based systems pre-trained on the general domain with domain-adapted BERT models and explore augmentation techniques incorporating external clinical knowledge priors. We extract the patient experience entities from Subtask-1 and medical condition entities from Subtask-2 at an over-
1https://causalclaims.github.io/
2143
all F1 of 68.59 (sentence-level) and 32.65 (tokenlevel), respectively, on the challenge test set. Our BERT-based systems ranked 3rd in both subtasks of the challenge.

heading: 2 Related Work
text: Extracting medical information from free text is a well-explored research domain. This medical IE work can broadly be viewed as belonging to two major categories: (1) Work attempting to extract information from biomedical literature and clinical text from electronic health records and (2) work that focuses on extracting relevant medical information from public forums, user platforms, and social media. Medical IE work includes the development of annotated data sets and data-driven extraction architectures. We discuss relevant datasets first and then briefly review extraction approaches.
In biomedical literature, commonly extracted information includes medical problems and their related characteristics (Uzuner et al., 2010; Kumar et al., 2015). The Evidence-Based Medicine (EBM)-NLP (EBM-NLP) (Nye et al., 2018) corpus has over 5,000 abstracts of medical articles describing clinical trials annotated for population, intervention comparators, and outcome entities. This dataset is widely used for benchmarking and evaluating model performance in the biomedical domain (Gu et al., 2022). The EBM-NLP corpus utilized medical experts and Amazon Mechanical Turk (MTurk) workers. The BioCreative-V Chemical Disease Relation (BC5CDR) corpus (Li et al., 2016) contains PubMed articles annotated for disease and chemical entities. Other corpora include annotations for biomedical phenomena like drugdrug interaction (Herrero-Zazo et al., 2013) and gene-disease associations (Becker et al., 2004).
Prior work describes the benefits of extracting information from online forums for providing better treatments to patients (Leaman et al., 2010; Gupta et al., 2014; Sampathkumar et al., 2014; Huynh et al., 2016). This information can be extracted from medical condition-specific forums (e.g. breastcancer.org, diabetesinfo etc.) or social media platforms (e.g. Reddit, Twitter). For e.g.(Athira et al., 2021; Romberg et al., 2020) extract medical condition-specific information from patient forums. Other works use social media platforms like Reddit to identify suicide risk (Zirikly et al., 2019), detect anxiety(Shen and Rudzicz, 2017), and depression (Pirina and Çöltekin, 2018), and identify
Schizophrenia by using linguistic analysis (Zomick et al., 2019) of the posts from online discussion forums. Social media and online forum corpora have been annotated with a range of medical information. The Self-Reported Mental Health Diagnoses (SMHD) dataset consists of Reddit posts of users who claimed to have been diagnosed with mental health conditions (Cohan et al., 2018) and build machine-learning-based systems to automatically classify diagnosed users from control with Reddit posts. The Early risk prediction on the Internet (eRisk) (Parapar et al., 2022) corpus focuses on detecting various text-related indicators of mental health conditions in Reddit posts.
Medical IE tasks have been pursued using rulebased and data-driven approaches. Early medical IE work used rule-based systems with semantic and lexical information (Hui, 2010) or discrete machine learning approaches like Logistic Regression, Support Vector Machine(SVM) (Patrick and Li, 2009) with engineered features. More recent medical IE work leverages neural networks. Contemporary state-of-the-art medical IE work utilizes pre-trained language models, like BERT (Devlin et al., 2019), which have gained prominence across various NLP tasks and biomedical applications. There are many domain-specific BERT models, including clinical and biomedical variants with mixed domain and in-domain pre-training techniques (Alsentzer et al., 2019; Lee et al., 2019; Basaldella et al., 2020).
Initial work using RedHoT focused on building a machine-learning-based system to verify user claims. The RedHot (Wadhwa et al., 2022) corpus contains Reddit posts annotated for patient experiences, claims, claim-based personal experiences, questions, and granular annotations describing patient populations, interventions, and outcomes across 24 health conditions. The system extracts relevant user claims and PIO entities from user posts. The system then uses this extracted information to inform the retrieval of trustworthy evidence relevant to the claim from a scientific knowledge base.

heading: 3 Methods

heading: 3.1 Data
text: The corpus for the SemEval causal claims shared task was a subset of the RedHOT corpus annotated for medical condition entities across nine medical conditions. The posts are annotated in two stages: (1) Subtask-1 annotations include user claims, per-
sonal experiences, questions, and claim-based personal experiences and (2) Subtask-2 annotations contain more granular information where entities that indicate patient population, intervention, and outcome are annotated. We used the extraction script provided by the organizers to scrape the text corresponding to the postIDs off Reddit. Some user posts may be deleted on Reddit over time. Our training set for Subtasks 1 and 2 contained 4964 posts and 517 posts, respectively. The RedHot corpus was annotated by a combination of experts and MTurk workers. The inter-annotator agreement varies by entity type. Entities like question, population have higher annotator agreement (>70% F1), and claim, experience, intervention, and outcome entities have lower annotator agreement (<55% F1). Table 1 contains the distribution of the user posts across different medical condition subreddits.
Users on medical condition-related subreddits often discuss their challenges dealing with the symptoms and medications and seek advice from other users who may have had similar experiences. Users may also provide advice based on their experience dealing with recovery or progress after going through treatment. These claims often describe a treatment/intervention (medical and non-medical) that affects patient outcomes related to the medical condition. Personal experience could describe the user’s experience, e.g., the trajectory of their condition when exposed to interventions. User posts that describe claims in a personal context are annotated as claim personal experience. Figure 1 contains a post from the RedHot corpus annotated for the relevant entities.
Table 2 contains the entity distribution and average length of the entities from Subtask-1 and -2 annotations for the RedHot training set. The personal experience and question entities are more
frequent than claims and claim-based personal experiences entities. questions tend to be short, and text describing personal experiences is relatively longer. claim-based personal experiences contain additional text that describes the user’s knowledge about an intervention, making them longer than claims or personal experiences.
Entities from the Subtask-2 annotation tend to be shorter. population and outcome may describe a medical condition or an effect of having the condition. Intervention spans could be medical and non-medical text that indicates a treatment, procedure, or other actions users may have taken while undergoing a described experience. A user post rarely contains more than one claim (<1%). Across all entity types, overlapping entity spans are rare (<1%) in the training set.

heading: 3.2 Evaluation
text: The organizers framed both subtasks as sequence tagging tasks, and a prediction was required for every test set token (whitespace word tokenization was required by the organizers). For test set evaluation, Subtask-1 was evaluated at the sentence level, and Subtask-2 was evaluated for token-level Precision (P), Recall (R), and F1 scores. Due to data-use restrictions, participants could not access the test set labels or the evaluation scripts. Apart from the performance reported on the task leaderboards, we additionally report performance on a held-out validation set and perform detailed error analysis on the validation set due to the above-mentioned data and evaluation restrictions. For the validation set evaluation, we evaluate our models using tokenlevel P, R, and F1 scores following (Wadhwa et al., 2022). We validate the effectiveness of the systems using a strict non-parametric (bootstrap) test (Berg-Kirkpatrick et al., 2012).

heading: 3.3 Medical-condition information extraction
text: Subtask-1 annotation tend to be full sentences and can be conceptualized as either a sentence classification task or a sequence tagging task where each sentence/span can be labeled as - claim, personal experience, claim personal experience, and question. We experimented with both of these conceptualizations but found no significant difference in performance between the two approaches. We approach Subtask-2 as an entity extraction task. We fine-tuned general and mixed-domain language models and studied the inclusion of external knowledge about the entities of interest into these language models.
Fine-tuning General and Mixed-domain pretrained models: Language models are pre-trained on the source domain and then fine-tuned to a specific task in a target domain. Prior work (Gururangan et al., 2020; Basaldella et al., 2020) indicates that language models benefit from performing unsupervised learning tasks on target domains. Additional pre-training on the text more similar to the target domain typically improves performance when the original source and target domains are more dissimilar (Gururangan et al., 2020; Zhou et al., 2022). To study this, we fine-tuned three BERT models that have been pre-trained on general and mixed-domain corpora. We selected BERT (Devlin et al., 2019) and RoBERTa (Liu et al., 2019) as our general-domain variants. BERT is trained on a corpus of Wikipedia articles and books, while RoBERTa is trained on a larger web crawl corpus. Our mixed-domain variants include BioMedRoBERTa (Gururangan et al., 2020) and BioRedditBERT (Basaldella et al., 2020). BioMedRoBERTa is the RoBERTa model subsequently pre-trained on the S2ORC corpus (Lo et al., 2019)
and the BioRedditBERT model is the BioBERT (Lee et al., 2019) subsequently pre-trained on health-related posts from Reddit.
Utilizing relevant external knowledge: Prior work (Roy and Pan, 2021; Harnoune et al., 2021) found performance improvements for target domain tasks by incorporating relevant knowledge in BERT-based methods via knowledge graphs. We incorporate external knowledge through pre-trained models via data augmentation. Our data analysis observed some overlap between disease names and the population entities and intervention entities indicating usage of medications. To analyze the overlap, we randomly sampled 50 posts that contained 35 population entities and 68 interventions. We found that 31 out of 35 population entities were disease names or their abbreviations, such as “gout,” “MS,” “IBS,” “CF,” “inflammation,” etc., and 43 out of 68 spans labeled interventions were chemical names such as “allopurinol,” “metoclopramide,” “hydroxychloroquine”, etc.. We used the en_ner_bc5cdr_md, a pre-trained model (Neumann et al., 2019) trained on BC5CDR corpus (Li et al., 2016) for incorporating external knowledge. The disease-chemical model is trained on over 1500 PubMed articles with disease and chemical entity annotations. Inspired by prior work on data augmentation using special tokens (Zhong and Chen, 2021; Ramachandran et al., 2023), we augment the given user posts in training and inference to encode disease and chemical entities with special tokens ($$ and ‘@@’) based on predictions from the pretrained BC5CDR model. A detailed illustration of the data augmentation is presented in Figure 2.
We train separate models with identical architectures for extracting the Subtask-1 and Subtask-2 entities using general and mixed-domain BERT
models and perform knowledge enhancement via data augmentation on these BERT models. We implement BERT-based sequence tagging models by adding a linear output layer to the BERT hidden state using a begin-inside-outside (BIO) label.

heading: 3.4 Experimental setup
text: We split the provided training set for each Subtask1 and -2 into new training sets and validation sets for model development and parameter tuning. We sampled the Subtask-1 and -2 validation sets intentionally biased to reflect the entity distribution in the provided data (as in Table 2). All our models operated at a sentence level, and we tokenized the sentences in the user posts using scispaCy (Neumann et al., 2019) en_core_sci_md tokenizer. The systems were implemented in PyTorch using the HuggingFace transformers library (Wolf et al., 2020). We used AdamW optimizer (Loshchilov and Hutter, 2017). We used grid search and tuned the hyperparameters- epochs and batch size on the validation set. We left the dropout and learning rate at recommended default values. The final hyperparameters include a training batch size of 64, a validation batch size of 16, a maximum sequence length of 256, a dropout rate of 0.2 for regularizing the model, and the initial learning rate at 5e-5. We trained the models for Subtask-1 for ten epochs, while the models for Subtask-2 were trained for 20 epochs.

heading: 4 Results and Discussion

heading: 4.1 Test set performance
text: Table 3 and 4 present the test set performances for both subtasks, respectively. We applied BERT-base
for both Subtask-1 and -2. We present our system’s performance (ranked 3rd in both subtasks) along with the performance of top-2 teams and the median performance for comparison. For Subtask-1, the median score is the median of the seven system performances posted on the task leaderboard, and for Subtask-2, the median score presented is the median of the six system performances posted on the task leaderboard.

heading: 4.2 Validation set performance
text: To provide a more granular performance breakdown and a more comprehensive set of the developed architectures, we additionally report the per-
formance of our systems on held-out validation sets and perform a detailed error analysis of our model predictions. Table 5 and 6 contains the performance for extracting patient experience-related
and medical condition-related entities on the validation sets, evaluated at the token level. We present the performance of six models in total. BERTbase and RoBERTa models showed similar performance; hence we only tabulate BERT-base’s performance. Models with a ’+’ next to their names were trained on knowledge-augmented training data as described in Figure 2.
Examining the results for Subtask-1, we can see that general domain language models (such as BERT) and domain-specific models (such as BioRedditBERT and BioMedRoBERTa) exhibit similar overall performance. This suggests that incorporating external knowledge about diseases and chemicals did not significantly improve for longer entity spans, such as the user’s personal experiences and disease-related questions. This may be explained due to (1) the low annotator agreements, (2) ambiguity in annotated phenomena, like claim, claim personal experience (3) augmented external knowledge may not be sufficient to disambiguate the entities in the Subtask-1 annotation. We provide detailed examples of prediction errors in the following section.
The BioRedditBERT+ model performs significantly better (p < 0.05) overall across all the other models and specifically when extracting population, showing the benefits of using both a domainspecific language model and augmenting disease knowledge. The overall performance among the knowledge-augmented models did not significantly differ. The annotated phenomena in Subtask-2 (PIO) are shorter spans that describe disease or medication names that have direct overlap with the external knowledge we augmented with. We used the BERT-base system (indicated by δ in Table 5 ) to predict the entity types in the test set for Subtask-1 since it did not significantly differ in performance from the other systems. For Subtask-2, we decided to again predict the entity types in the test set using BERT-base (indicated by δ in Table 6). We believe that the proposed domain-specific knowledge-augmented systems will perform significantly better in practical use when extracting these medical condition-related entities.

heading: 4.3 Error Analysis:
text: We performed a detailed error analysis on the validation sets for Subtask-1 and -2. Given the relatively low F1 scores across PIO entity types, we focused the error analysis on the mislabeled sam-
ples by all models. We include Tables 7 and 8 containing the token-level confusion matrices to understand the trends in misclassifications by our system across Subtask-1 and Subtask-2. We discuss these trends with specific examples from the posts in the validation set in the sections below for better understanding.

heading: 4.3.1 Errors in extracting patient experience-related entities
text: User Question descriptions: Question has higher performance compared to all the other entities, which is likely attributable to question spans tend to be shorter, typically start with a question word, and frequently end with a question mark. However, we observed users often use question-like sentences to describe claim or claim personal experience, which were harder for models to predict.
Sentence tokenization: Some errors were due to the sentence tokenization. While models could correctly predict longer entities, they often failed to predict longer sequences spanning multiple sentences. For example, the description “Pantoprazole intake for the past two weeks since have been awfully off, to say the least: ..., but I feel like my chest has to work for it more”, with >75 tokens, annotated as claim personal experience was correctly predicted whereas the description, “The medical doctor says I dont have it. Naturopathic doctors says I have it. ...Medical doc says that is just IBS” annotated as claim personal experience with 50 tokens was split into five sentences and misclassified. These errors may be resolved by including cross-sentence context.
Confusability between experience-related entities: Entity types claim, claim personal experience and personal experience were confusable. For example, the description, “I’m T1D and my blood sugars went low.,” was annotated as claim and predicted by all the systems as personal experience. Similarly, distinguishing claim personal experience and personal experience is challenging due to the closeness in the structure. For example, “Now the Gouts gone my Ankle is grade 3 sprained from walking funny and putting too much pressure on it” while the gold label is claim personal experience, it was predicted as personal experience. In another instance, “I took them but my pain and swelling got worst during night.,” was annotated as personal experience and predicted as claim personal experience.

heading: 4.3.2 Errors in PIO extraction
text: Five frequent medical conditions - “Gout,” “Multiple Sclerosis,” “POTS,” “Lupus,” and “Cystic Fibrosis,” account for 35% of the population entity phrases in the validation set. These phrases were extracted with high performance by domainspecific knowledge-augmented systems compared to the general-domain models without external knowledge. Abbreviated medical conditions were challenging classification targets or were confused between population and outcome when abbreviations appear in different contexts. Users sometimes coreference people suffering from the medical condition using phrases like “patients” or “individuals.” These were annotated as population but were not predicted by the models. Some intervention phrases mention disease names followed by “drugs”, e.g. “Cystic Fibrosis drugs” or “seizure medication”. The medical conditions in these phrases were predicted as population and words following these disease names- “drugs” and “medication” were predicted as intervention. Some false negative intervention phrases included brand names (e.g. “pepsi”) or informal names for medications (e.g. “Tobi” for the medication “Tobramycin”).

heading: 5 Conclusions
text: We explore a novel medical information extraction task in which Reddit posts are characterized by entities related to patient experiences and medical conditions. We perform this IE task from a sequence-tagging approach using domain-specific
and knowledge-augmented systems. Domainspecific pre-trained models are better at identifying the medical condition-related entities while general-domain pre-trained models are as good as domain-specific models in understanding patient experience-related descriptions. The inclusion of external knowledge, specifically disease information, helped improve population entity detection, and including chemical information helped identify intervention. With thorough error analysis, we identify where knowledge-augmented systems overcome errors faced by general-domain systems. In future work, it may be useful to utilize crosssentence information and perform entity normalization to extract the experience-related and medical condition-related entities with higher performance.

heading: Future Work
text: In future work, it may be useful to utilize crosssentence information and perform entity normalization to extract the experience-related and medical condition-related entities with higher performance