Exploring Drug Switching in Patients: A Deep Learning-based Approach to Extract Drug Changes and Reasons from Social Media (2023)

Abstract: Social media (SM) can provide valuable information about patients’ experiences with multiple drugs during treatments. Although information extraction from SM has been well-studied, drug switches detection and reasons behind these switches from SM have not been studied yet. Therefore, in this paper, we present a new SM listening approach for analyzing online patient conversations that contain information about drug switching, drug effectiveness, side effects, and adverse drug reactions. We describe a deep learning-based approach for identifying instances of drug switching in SM posts, as well as a method for extracting the reasons behind these switches. To train and test our models, we used annotated SM data from internal dataset which is automatically created using a rule-based method. We evaluated our models using Text-to-Text Transfer Transformer (T5) and found that our SM listening approach can extract medication change information and reasons with high accuracy, achieving an F1-score of 98% and a ROUGE-1 score of 93%, respectively. Overall, our results suggest that our SM listening approach has the potential to provide valuable insights into patients’ experiences with drug treatments, which can be used to improve patient outcomes and the effectiveness of drug treatments.

## introduction sm platforms (e.g., twitter, facebook, forums) have been widely used for health-related purposes, to share and exchange experiences about drugs, treatments and diagnosis or to interact with other patients with similar health conditions in online communities. they provide a unique opportunity to observe patient experiences with medication in realworld settings @xcite @xcite . detecting drug switches and reasons, where patients switch from one medication to another one, can provide valuable insights into medication efficacy, adverse drug reactions, side effects, and patient preferences. a drug switch refers to the substitution of a prescribed medication with a similar drug @xcite . by monitoring medication switches, researchers and drug companies can gain a deeper understanding of patient experiences with medications and make more informed decisions about treatments. while real-world claims data (e.g., iqvia claims data) gives medication switch information, it does not provide the reasons of the drug switches. to make use of this amount of user-generated data, it is essential to extract structured data from unstructured information @xcite . information extraction (ie) is the research domain dedicated to achieve this goal, enabling the use of such a vast amount of unstructured information in a structured and organized manner @xcite . while there have been numerous studies examining ie from sm platforms @xcite @xcite @xcite , to the best of our knowledge, there is no study that investigates drug switching in patients and the underlying reasons for such changes through sm analysis. therefore, our study aims to fill this knowledge gap by providing insights for healthcare professionals and decision-makers to better understand the factors that drive drug switching behaviors among patients. to achieve this, we present an sm listening approach which aims at (1) determining whether a medication switch has occurred based on two drug names mentioned in an sm post, and (2) extract and classify the reasons (e.g., the effectiveness of the drug, adverse reactions, etc.) for the medication change. our experiments showed that fine-tuning t5 on rulebased annotations achieved good performance (an f1-score of 98% for drug switch detection, and a rouge-1 score of 93% for ie and classification). ## related work over the last two decades, there has been a growing interest in extracting information from healthrelated sm posts using natural language processing (nlp), largely due to the widespread use and popularity of sm platforms. @xcite have shown that combining named-entity recognition with signal detection and topic modeling can be effective in extracting valuable insights from sm data related to health. in particular, they demonstrated that this approach was successful in detecting potential signals and gaining a better understanding of patients' behaviors toward drugs, including instances of misuse. @xcite demonstrated that sm, in addition to traditional pharmacovigilance methods, can be utilized to identify potential signals related to new black box warnings, labeling modifications, or drug withdrawals. although there are still some challenges to be addressed, the authors showed that sm can be a valuable tool for detecting signals associated with commonly mentioned drugs in specialized healthcare social networks and forums. to further advance the field, the authors suggested that additional research is necessary to improve nlp and effectively mine real-world data from sm platforms. @xcite conducted a study to examine the occurrence of drug switches for certain active substances in the netherlands. the goal was to gain insight into the use of generic drugs and the process of drug switching in the netherlands, as well as the factors that influence it. to obtain information on drug switches, the author used in the claims database of the national health care institute in the netherlands (zin), which contains data on prescribed drugs that are dispensed by pharmacists or dispensing general practitioners. the existing sm listening approaches do not detect drug switches and reasons behind these switches from sm. therefore, we propose a deep learning-based approach to extract drug switches and different reasons behind these switches. our approach uses rule-based annotations to train deep learning models. the deep learning model can extract more accurate information than rule-based annotations which are not scalable. ## conclusion in our paper, we presented our sm listening approach to extract valuable insights from patients' conversations and understand the reasons why patients switch drugs during treatment. to achieve this, we developed a drug switch detection model that can determine whether a drug switch has occurred by analyzing mentions of two drug names in an sm post. furthermore, we described an ie model that can extract the reasons for the medication change, such as adverse reactions, side effects, the effectiveness of the drug, etc. the results showed that our approach achieved good performance in drug switching detection and ie tasks.