Semi-Supervised Language Models for Identification of Personal Health Experiential from T witter Data: A Case for Medication Effects (2021)

Abstract: First-hand experience related to any changes of one’s health condition and understanding such experience can play an important role in advancing medical science and healthcare. Monitoring the safe use of medication drugs is an important task of pharmacovigilance, and first-hand experience of effects about consumers’ medication intake can be valuable to gain insight into how our human body reacts to medications. Social media have been considered as a possible alternative data source for gathering personal experience with medications posted by users. Identifying personal experience tweets is a challenging classification task, and efforts have made to tackle the challenges using supervised approaches requiring annotated data. There exists abundance of unlabeled Twitter data, and being able to use such data for training without suffering in classification performance is of great value, which can reduce the cost of laborious annotation process. We investigated two semi-supervised learning methods, with different mixes of labeled and unlabeled data in the training set, to understand the impact on classification performance. Our results from both pseudo-label and consistency regularization methods show that both methods generated a noticeable improvement in F1 score when the labeled set was small, and consistency regularization could still provide a small gain even a larger labeled set was used.

## introduction first-hand experience related to any changes of one's health condition and understanding such experience can play an important role in advancing medical science and healthcare. what has happened since the covid-19 pandemic started demonstrates potential values and applications of such experiential knowledge, ranging from understanding the symptoms of the viral infection, to learning the effects after vaccination -personal experience shared on social media pertaining to symptoms of infection and side effects of vaccine may help us gain insight into the virus and vaccine, and ultimately advance medical science and clinical practice. post-market surveillance is an important activity of pharmacovigilance, and experiential information from the users of the therapeutic products can help supplement the knowledge of medication effects gathered with other data sources. many nations recognized importance of patient reporting of drug effects and its scientific value @xcite , and potential benefits of patient reported drug events were studied @xcite @xcite . patient reporting could help identify new adverse drug effects sooner than that by healthcare professionals alone @xcite . a study by mclernon and colleagues found that patient reports contained a higher median number of suspected adverse drug reactions (adrs) per report, and described reactions in more detail, and they were richer in descriptions of reactions than those from healthcare providers @xcite . one study showed that consumers reported seven categories of adrs unreported by the other sources, and the investigators recommended that consumers should be included in systematic drug surveillance systems @xcite . it is a primary concern of monitoring the health conditions as well as the safe use of pharmaceutical products to find a rich and accessible data source and build an efficient system to process and analyze the data. people share their personal health experience on social media thanks to their prevalence. as such, social media have been considered an alternative and active data source for studying health surveillance. platforms like twitter allow users to express their health condition freely online. there exist many studies of using social media for health surveillance, such as influenza outbreak detection @xcite , public health analyzing @xcite , dental pain surveillance @xcite . personal experience tweets (pets) related to medication use are defined as twitter posts expressing one's first-hand personal encounters or observations about their health conditions after the administration of pharmaceutical drugs. medication effects can be undesirable feelings caused by medication's side-effects which exacerbate one's health condition, or beneficial effects which help alleviate one's health condition after medication intake. below are examples of personal experience tweets (pets) pertaining to medication use (the medication names are in boldface and experiences are underscored): "codeine got me feeling sloooow xanax got me sleeping" "this vicodin is putting me to sleep" "morphine actual makes ur face so itchy think ive scratched ma whole face off" as a general purpose social media platform, twitter contains posts on almost all thinkable topics and many of them are unrelated to health, let alone misspellings, incorrect grammas, and creative short texts found in the posts. therefore, differentiating personal experience tweets (pets) from other irrelevant or noisy tweets is challenging. efforts have been made in previous endeavors. personal pronouns were chosen as the feature to distinguish pets from irrelevant tweets such advertisements, news, even spams @xcite ). an effort was made to engineer features including twitter specific features, ngrams, punctuation elements, and topics, but the topic feature was discarded because of its significant efforts required to achieve minimum merit of classification performance improvement @xcite . later, a set of 22 twitter features including textual data and metadata was engineered by jiang and his colleagues (2016) and conventional machine learning methods such as decision tree were applied to predict pets. the concept of deep grammulator was proposed to include a textual feature with expressions in one class but not in the opposite class, to enhance the discriminatory power of the classification @xcite . in recent studies, application of neural embedding and recurrent neural network (lstm) was investigated to improve the classification performance @xcite . in the latest development, pre-trained attention-based language model approaches based on bert and roberta language models were explored to have achieved even better classification performance @xcite . however, all previous attempts are based on fully supervised learning mechanisms, requiring the laborious effort of annotation which can be cost-prohibitive if a large amount of accurately labeled data is needed with a limited budget. unlike labeling text data in formal writing, annotating twitter posts can be especially challenging, because of various complexities associated with the data such as misspellings, use of nonstandard language, and lack of sufficient context within the limited space. in addition, supervised methods are widely used on social media data in health-related tasks due to their higher accurate than unsupervised approaches, requiring manual annotation of large corpora of data. furthermore, the subjectivity of labeling social media data is of concern. inter-annotator agreements tend to be relatively low for social media-based annotation tasks even with domain experts as annotators (o'connor, 2020). on social media, there exists an abundance of unannotated data, and being able to use such large amount of unlabeled data for training may improve the classification performance, without spending a significant amount of resources in annotation. in this study, we investigate how the classification performance in predicting personal experience tweets related to medication use will be affected using a relatively small amount of annotated data instances in training an attention-based language model. ## background data and features determine the upper limit of machine learning, while models and algorithms can only approach this upper limit. for most machine learning tasks, the amount of labeled data directly affects the final learning performance. in order to obtain a large set of labeled data, researchers usually need to spend a significant amount of time to annotate data, and the cost of annotation process can be drastic and sometimes unaffordable. on the other hand, there is abundance of unlabeled data which are easily accessible. semi-supervised learning is a promising approach in machine learning which uses the combination of both of labeled and unlabeled data. studies have shown that it can achieve considerable improvement for various tasks with a small labeled dataset in conjunction with a large set of unlabeled data. based on the cluster assumption, semisupervised learning methods are mainly classified into two different categories: proxy-label and consistency regularization. the proxy-label method uses the supervised model or its variants to generate proxy labels for the unlabeled data, and the proxy labels are mixed with true labels to provide additional features to benefit training process. a typical implementation of such approach is the pseudo-label method as described below (lee 2013). consistency regularization is a relatively new method. in consistency training, models are regularized to be invariant to a small amount of noise applied to inputs or hidden neurons. the invariance can be all or parts of hidden states in the network, or the outputs of the model. common methods include temporal ensembling @xcite , and unsupervised data augmentation @xcite . ## method the pipeline of data processing and analysis of our methods is depicted in figure 1 . our approach of identifying personal experience tweets was based upon the two semi-supervised learning methods mentioned above: (1) pseudo-label which generates pseudo labels for unlabeled tweets and trains the model with labeled tweets together in a supervised behavior, and (2) consistency regularization which does not generate any labels for unlabeled data but tries to keep the consistency of the model outputs with the same inputs injected with some stochastic noise. representations from transformers (bert) @xcite . although the google team highly recommends using its pre-trained language model, a microsoft team demonstrated that the domain-specific bert language model can perform better (gu et al., 2020), and we adopted microsoft's approach in this work. ## results and discussions listed in as can be seen in ## conclusion in this study, we investigated classification performance using semi-supervised learning in identifying personal experience tweets. two methods of semi-supervision were studied: pseudo-label and consistency regularization. our results show that either of the methods performs outstandingly well in individual classification measures, in comparison with the supervised baseline method. however, the f1 and auc/roc scores show that both could enhance the network performance when a small size of the labeled set was used, and consistency regularization performed consistently well even with the datasets containing high number of labeled instances. in summary, either semi-supervised method performed well in predicting pets with a small amount of labeled instances in the training set, which could significantly reduce the annotation effort. although this study focused on the personal experience pertaining to medication effects, it is conceivable that our semi-supervised approach can help other health-related studies where personal experience is needed.