# An Anomaly Detection Framework for Twitter Data
## 1 Introduction  
The number of people using social media has rapidly increased, especially in the last decade. Over the preceding year, Facebook, Twitter, YouTube, Linked In, and Pinterest saw significant growth. Facebook is the most popular social media network, with more than 2.9 billion monthly active users, whereas Twitter has around 400 million monthly active users and sends out up to 500 million tweets daily (Source: [[https://datareportal.com/social-media-users](https://datareportal.com/social-media-users)]([https://datareportal.com/social-media-users](https://datareportal.com/social-media-users)) accessed on 14 August 2022); these data are increasing exponentially. Twitter is rapidly gaining popularity around the world and is experiencing rapid growth. Certain users use the Twitter interface to support various opinions, such as a platforms for fighting, information, and social mission dissemination; as well, it plays an increasingly important role in societal development. Social network analysis (SNA) is becoming an essential component for gauging the mood and behavior of the public. Researchers are currently studying social media posts to predict or achieve results. Social media is excellent for expressing feelings, thoughts, and opinions. Twitter is one of the most widely used social media platforms, allowing users to publish whatever they want. It allows users to express themselves authentically and in real-time. Detecting anomalies in social media is essential to prevent malicious activities such as stalking, planning terrorist attacks, and spreading fraudulent information. [PERSON] et al. [1] proposed a sentence embedding method based on machine learning for privacy awareness to social media users. [PERSON] et al. [2] raised thesame issue and identified different types of privacy leaks and later developed an automated classifier for them. With the recent popularity of social media, new types of abnormal behavior are emerging, raising concerns from various parties. While much work has been devoted to traditional anomaly detection problems, we see an increased research interest in the new area of social media anomaly detection [3]. Social media is a prime source of recent information, and Twitter is one of the most popular social outlets. Analyzing tweets indicates usual and unusual events happening in society as people react quickly to new events on Twitter. [PERSON] et al. [4] presented a detailed review of existing anomaly detection techniques and developed a five-point process for anomaly detection. While detecting an anomaly, a complex task is to define the normal behavior. The growing popularity of social media means that many social networks have become substantial prey for malicious people who illegally cause mental and financial harm to the users of these systems. Recently, humanity has faced severe threats from deadly diseases such as severe acute respiratory syndrome (SARS) in 2004, the H1N1 pdm09 virus in 2009, and COVID-19 in late 2019. These diseases are highly infectious. COVID-19 covered the whole world in a short period. At the beginning of COVID-19, people started posting tweets about health issues such as breathing, lung problems, cough, and fever. An analysis of tweets from November-December 2019 indicates a sudden change in health-related tweets. The main motivation for this paper is that during the COVID-19 pandemic period there was no direct/physical communication among public and government functionaries. To bridge this gap this paper focuses on detecting unusual tweet patterns in health-related posts. We propose a framework for the same. [PERSON] et al. [5] worked on a similar problem and created a dataset of tweets followed by preprocessing steps and NMF decomposing and topics extracted after cluster analysis, while we used topic modelling methods after preprocessing followed by BERT sentence transformer for anomaly detection.