Next Article in Journal
Aspects of Cyber Security in Autonomous and Connected Vehicles
Next Article in Special Issue
SybilHP: Sybil Detection in Directed Social Networks with Adaptive Homophily Prediction
Previous Article in Journal
Influence of Biological Maturation Status on Kinanthropometric Characteristics, Physical Fitness and Diet in Adolescent Male Handball Players
Previous Article in Special Issue
An Emotion-Based Rating System for Books Using Sentiment Analysis and Machine Learning in the Cloud
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Detection of Inappropriate Tweets Linked to Fake Accounts on Twitter

by
Faisal S. Alsubaei
Department of Cybersecurity, College of Computer Science and Engineering, University of Jeddah, Jeddah 21959, Saudi Arabia
Submission received: 28 December 2022 / Revised: 15 February 2023 / Accepted: 20 February 2023 / Published: 26 February 2023
(This article belongs to the Special Issue Applications of Artificial Intelligence on Social Media)

Abstract

:
It is obvious that one of the most significant challenges posed by Twitter is the proliferation of fraudulent and fake accounts, as well as the challenge of identifying these accounts. As a result, the primary focus of this paper is on the identification of fraudulent accounts, fake information, and fake accounts on Twitter, in addition to the flow of content that these accounts post. The research utilized a design science methodological approach and developed a bot account referred to as “Fake Account Detector” that assists with the detection of inappropriate posts that are associated with fake accounts. To develop this detector, previously published tweets serve as the datasets for the training session. This data comes from Twitter and are obtained through the REST API. The technique of machine learning with random forest (RF) is then used to train the data. The high levels of accuracy (99.4%) obtained from the RF detection results served as the foundation for the development of the bot account. This detector tool, developed using this model, can be utilized by individuals, businesses, and government agencies to assist in the detection and prevention of Twitter problems related to fake news and fake accounts.

1. Introduction

In light of Elon Musk’s recent USD 44 billion acquisition of Twitter, the company is now largely considered to be one of the most successful social media organizations [1]. Even though Twitter’s user base has a reputation for being eccentric, it also makes it simple to interact directly with people who share your interests [2]. Twitter is a social network as well as a tool that can be utilized in business, and it provides a multitude of services that fall under both of these umbrella terms [3]. Discovering breaking news and keeping up with favorite celebrities, athletes, and other prominent personalities may be accomplished with the help of the Twitter update tool. If a company wishes to provide additional information to its audience, all that is required of them is to send out a single tweet rather than employing any other method. This choice is a lot more cost-effective than others, such as sending an email or making a phone call, for example, because it does not require a company to use any additional ways of communication. The excellent quality of the application programming interface (API) that the platform provides may be partially responsible for the success that Twitter has had in the field of data mining, in addition to the site’s support for academic research [4].
Twitter is facing various challenges, one of the most significant of which is the difficulty in identifying fake and fraudulent accounts, in addition to the widespread distribution of these accounts [5,6] through clickbait (i.e., post tempting headlines which appeal to other users to click on a given link) [7]. The most important aspect of this research is the approach that will be used to identify false Twitter accounts, fraudulent Twitter accounts, and incorrect information, as well as the content that will be tweeted by these accounts.
The strategies for extracting or filtering fake information or patterns of inappropriate broad fake content are the reasons for tackling the problem that have been discovered as being related to fake accounts and content on Twitter. This problem has been identified as being on Twitter. It is possible to attract attention to the provision of correct forecasts regarding phony Twitter accounts by proposing the usage of “Lexical variety” and “frequent word pattern”. These terms refer to patterns of words that are used frequently. It is possible for spam, false information, and misleading online ratings to be transmitted through phony accounts on Twitter. Twitter users are prohibited from creating false accounts, even though the company has made numerous attempts to protect this policy. Twitter is committed to doing its best to prevent users from engaging in behavior that is in violation of their policies; yet, individuals continue to find ways to get around Twitter’s efforts. Even if an automated account were created to prohibit interactions between users or attempt to deceive or mislead other users, the circumstance would still not preclude the act. This study is an important part of the solution to the problem that was identified as being associated with fake accounts and content on Twitter. The problem, which centers on methods for extracting or filtering fake information or patterns of inappropriate widespread fake content, needs to be addressed, and this study is an important part of that solution. The study has the potential to help prevent the posting of harmful links, expose users who create multiple accounts, prevent users from posting repeatedly to rending topics, solve the problem of posting duplicate updates, and expose users who post links with tweets that are unrelated to the links they are posting. The study also focuses on the prevention of misusing links or posting links with tweets that have nothing to do with the tweets itself.
The justification for undertaking this study lies with the fact that Twitter is a social media site that has a large user base and makes it easy for users to communicate information with one another through the use of short messages called tweets. It is possible that a large number of individuals will wonder what benefits Twitter will derive from enabling its users to communicate with one another through the use of short messages. It is possible that people who do not utilize social media will find it has less utility than was previously believed. It is possible that this is what is taking place. In a similar vein, it is probable that utilizing Twitter as a way to keep tabs on one’s personal life is not the wisest course of action. One more justification relates to the fact that more and more Twitter users are reporting fraudulent complaints that are being made through fake accounts, which can sometimes mean the difference between life and death [8]. These complaints are being made in an attempt to ensure that something will be done. It is possible that the fake accounts can belong to a certain movement, groups, businesses, corporations, or even government. Through the use of fake accounts, con artists are able to not only steal people’s money but also spread false information and even mislead public opinion [9]. In a similar vein, the severity of the incident can also have an effect on an entire society. This is because fake accounts on Twitter attract the attention of real users, which allows the perpetrators of the incident to carry out their deceptive intention [10]. Many users on Twitter are susceptible to fraud because fake accounts on the platform attract the attention of real users [11].
This study’s primary addition to knowledge is the illumination of an alternative perspective on the comprehension of digital content. The key to understanding the relationship between the present study and how they bridge the gap of the previous research studies lies with the use of new lexical diversity features which require an understanding of the characteristics shared by bots that are progressively tampered with and being accompanied by “text” that establishes patterns. This understanding can be achieved by taking into consideration the occurrences of those “words” which are referred to as “in this context”, “the frequently occurring terms” in the process of prediction for tracking the tendencies, and the association of fake content on how they prevail. Therefore, it is important to classify the legitimate Twitter accounts from the fake ones. The major contributions of this research include:
  • A technique for the classification of fake accounts and legitimate accounts has been proposed;
  • For the proof-of-concept implementation of the proposed work, a tool has been developed;
  • Finally, the proposed work builds the trust environment to communicate effectively while helping to identify and avoid fake accounts.
The rest of the paper has been organized as follows. Section 2 presents the related work, while Section 3 discusses the research methodology, and Section 4 presents the results and discussion. Section 5 provides the conclusion of the work.

2. Related Work

Fraudulent accounts on the Internet is a common issue across different domains because Twitter, one of the most used platforms in the world, is a popular target for criminals to create fake account or news [12,13,14,15]. Previous studies have been conducted on the problems that are associated with Twitter; the ones that are associated with fake news, fake accounts/users, and fraudulent issues are particularly important to this study. The term “fake news” refers to narratives that are not true or accurate but are presented as news in order to mislead or deceive the audience and, so, harm the reputation of a person or organization. Whereas, real news is fact and supported with evidence provided as a report. A false user is one that has created an account on social media to look like it belongs to a real person, business, or organization in order to gain more credibility and the attention of its intended audience. Whereas, a real user is one that has created an account in social media which belongs to him/her and is managed by him/her in order to interact with his/her intended audience. Even though it is common knowledge that online fraud takes advantage of online services in order to defraud or exploit victims, the online services themselves should be held accountable for the crimes they enable. In the past, researchers have concentrated on detecting any negative issue related to any online engagement. Recently, every facet of online issues has been regarded separately; typically, when it comes to Twitter, there has been a considerable amount of study; among them is the work of Erşahin et al. [6], which reveals that “user activity”, such as the amount of tweets, profile, and friend counts, can be used to identify false accounts by utilizing graph approaches as well as detection analysis with a machine learning algorithm on well-defined datasets associated with the features highlighted. Similarly, online social network fraud detection Albahar [16] utilized a dataset from Twitter to build a hybrid model with a focus on “information of the Twitter users”, “connections between users”, and “user-generated content” in order to understand the nature of fake account detection.
The research community and Twitter users are concerned with the overall security of Twitter. Essential to this is the work done by Zhang et al. [17], which looked at the manipulation of Twitter trends while viewed from inside the security of Twitter trending. This study incorporates data from more than sixty-nine million tweets posted from five million accounts. The examination of the data indicates evidence of manipulation of Twitter trends using compromised and phony accounts as vantage points. In a different approach, Alshaikh et al. [18] have conducted research on Twitter privacy and safety and shared their findings. The research, which employed around two million relevant tweets over the course of two years, demonstrates that there is a substantial impact on privacy and security based on the perception of Twitter users. Ritter et al. [19] reveals a weekly supervised extraction of computer security events from Twitter in a supervised approach, in which extractors for new categories of events are easy to define and train, by specifying a small number of seed examples. This approach utilizes a supervised method, in which extractors for new categories of events are easy to define and train. Citlak et al. [20] revealed how spam can be spotted on Twitter despite the fact that Twitter has not offered a mechanism to repair this issue. This is possible since Twitter has not provided a means to correct the issue. In a similar vein, Basha et al. [21] suggest a study on constructing an algorithm essential for providing security on Twitter by finding the necessary weaknesses throughout the chain of security events. This algorithm would be necessary for providing security on Twitter. When compared to the two algorithms that already exist, the newly proposed method offers superior levels of safety. Hossmann et al. [22], suggest a security architecture for Twitter while it is operating in catastrophe mode. The study found that when there is a natural catastrophe, people have a tendency to rely significantly on the usage of Twitter to communicate and organize in emergency situations. However, the research also found that the communication may be vulnerable to security issues. To defend themselves, they have proposed new security extensions that will provide the same level of security in the disaster mode as they do in the normal mode.
Studies on the identification of the broken points that lead to security difficulties have demonstrated some great influence, despite the fact that Twitter’s security concerns mostly center on the platform’s general safety. One of these is the work conducted by Zervopoulos and colleagues [23]. The research presented a method to evaluate the veracity of tweets pertaining to news by concentrating on contrasting several kinds of machine learning algorithms. In a similar fashion, Swe and Myo [24] provided a model for detecting phony Twitter accounts by utilizing a blacklisting strategy. In this model, an inspection was carried out by generating a blacklist using topical modeling and keyword extraction methods that were based on the content of tweets. In addition, Sowmya and Chatterjee [25] devised a method for identifying bogus profiles on Twitter. The model was developed based on a collection of rules that can effectively classify false and actual profiles using machine learning classifiers. Ghanem et al. [26] proposed a model for detecting fake news on Twitter by making use of a repetitive neural model and a variety of distinct semantic and stylistic features that fit the model. In this model, a group of features extract the timelines of Twitter news accounts by reading their posts in fragments, rather than treating each tweet independently. The research demonstrates the empirical benefits of modeling the latent stylistic characteristics of mixed false and true news using a large-scale sequential model of strong baselines. This study finds it appropriate to continue from there because the previously mentioned research literatures do not associate their detection technique with the detection of inappropriate tweets linked to bogus accounts on Twitter.
Several recent studies have illuminated the urgency of addressing the issue of fake content in social media; in particular, Cresci [27] establishes the fact that bots increasingly tamper with political elections and economic discussions, tracing trends in detection strategies and key suggestions for how to win the fight against the menace, especially in relation to social media. Several other recent studies have also highlighted the urgency of dealing with the issue of bogus information on social media. Many studies highlighting the necessity of addressing the problem of bogus content on social media were published fairly recently.
Kaubiyal and Jain [28] claim that spammers have taken notice of the rise in popularity of social media platforms such as Twitter and Facebook over the past decade. With more people using social media, more phony personas are being created. These fictitious characters engage in spamming and the dissemination of false material in an effort to sway public opinion. Real users can be safeguarded by identifying these impostors. The authors in this study used a feature-based method to spot phony accounts on social media. With these 24 indicators, bogus accounts were easily spotted. Results from these classification methods are triple checked. Analysis using the random forest model found a 97.9% success rate in identifying phony profiles.
Spam activity has grown on Twitter, according to research by Sun et al. [29]. In the case of Twitter spam, most studies have been conducted in a controlled environment and very few have used machine learning in real-world situations. As a result, they utilize a system that can identify spam tweets in near real-time, collect tweet data, extract lightweight features from a single Twitter account, train a detection model, and present results visually on the web. The technology is able to identify spam thanks to user profiles and message content features. The empirical findings indicate that the model can be implemented in a near real-time Twitter spam detection system to safeguard users against spam. This technique is used to gather tweets in order to put classifiers through their paces in the real world.
Balfagih et al. [30] found that Twitter is a valuable resource for understanding public reactions to news events. Twitter is used by many to express themselves and to follow economic, political, technological, and social developments. Despite Saudi Arabia’s high Twitter usage ranking, the country has struggled in recent years due to hashtags centered on spam and fraudulent tweets. Since most Twitter spam detection has been conducted in English, leaving other essential languages such as Arabic under cover, they use machine learning to identify spam in Saudi tweets gathered until 2020. Arabic Twitter datasets are also scarce. They have been testing and training several machine learning methods, focusing on N-grams and Word2Vec embeddings. Random forest performed best in most experiments.
The current study will fill the gap associated with the detection of inappropriate tweets linked to fake accounts on Twitter by developing a system that allows Twitter users to determine whether a given account is fake or not, as well as validate the information coming from any Twitter account. The study also extrapolates a method of classifying an account’s total details in order to allow people to determine whether material from an unverified and unknown source is genuine or not before sharing it without further investigation.

3. Methodology

This research makes use of an approach based on the design science research methodology, which is depicted as a flow in Figure 1. The strategy entails the creation of a bot account that will be referred to as a “Fake Account Detector.” This account’s purpose is to assist in the identification of inappropriate posts that are associated with fake accounts. There were two distinct phases involved in the process of developing the detector. The first thing that needs to be done is to use an approach called random forest machine learning, which is applied to the data that is produced by Twitter through the use of the REST. Random forest (RF) is an ensemble machine learning technique that generates many independent decision trees from a statistically-balanced distribution of indicator variables [31] API. This dataset will be used to extract the features associated with fake accounts and information, which will then be further pre-processed in preparation for an evaluation of the effectiveness of machine learning detection using random forest. Following the completion of the analysis of the random forest, a suitable detection model will be acquired. After that, the model is transformed into an effective interactive design in preparation for its implementation. In the end, the program is tested using information that has been procured immediately from the Twitter API.

3.1. Conceptualization of The Use of Machine Learning

The conceptual framework of this study is presented in Figure 2. The study is conceptualized to model a state-machine from which it extends the model and is deployed based on the accuracy of the model that was conceptualized. “Lexical Diversity of Fake News”, “most Frequently Used Words in Titles”, “Punctuation”, and “the Text Length” are conceptualized to be significant indicators for identifying Twitter accounts that are likely to be used to post malicious or offensive content. RF hold a key function in the analysis of the detection. Although decision trees are very beneficial for managing categorization issues related to measurable adaptation, there is less success when using them for nonlinear regression in the essential aspects of the analysis [32]. Statisticians came up with a wide variety of approaches in order to enhance the quantitative learning capabilities of decision trees. In spite of this, the accuracy of decision trees has significantly improved over the years; however, this has been a negative impact on the interpretability of their results [33]. The RF method can be applied with any type of indicator, including numerical, absolute, continuous, or discontinuous measurements [34]. The method interacts with the many indicator components of the model in a way that is favorable to both parties. They are accepted as one of the most innovative parameters in the field of machine learning due to their forward-operation approach. Following the application of RF for the resolution of problems involving classification and regression, this study proposes its application in the proposed conceptual framework presented in Figure 2. The application of the RF will start first with data acquisition, followed by data cleaning, feature extraction, and finally, the classification operation.

3.2. The Random Forest Model

The Random forest (RF) ensemble machine learning technique is responsible for the generation of a large number of decentralized decision trees. This is accomplished through the use of a random sampling of indicator parameters [35]. When it comes to dealing with classification issues of a large magnitude, decision trees in their most basic form have been shown to be useful. However, when applied to nonlinear regression, decision trees have been shown to be less fruitful [36]. With regards to the current situation of this research, where a huge amount of data on inappropriate tweets associated with fake accounts are the unit of analysis, RF is more suitable for this kind of operation.
Statisticians have developed a wide variety of creative approaches in order to statistically improve the capacity for learning exhibited by decision trees [37]. In spite of the fact that this helps to improve the accuracy of decision tree forecasts, doing so comes at the sacrifice of the trees’ capacity to be interpreted [38]. However, the RF method allows for the possibility of continuous operations to a greater extreme [39] which is another reason this current research adopted it. Furthermore, as a result of the hierarchical structure of trees that makes RF more suitable, the technique also interacts with the numerous indicators that are associated with many variables required for any classification and prediction problems [40]. This is particularly helpful in the current research considering the distribution of fake tweets within fake accounts that are currently causing a lot problems. In addition, RF trees are programmed to overlook incorrect allocations, abnormal data, and missing attributes, hence, this is helpful to the current research in the treatment of data integrity and validity.
Another argument in favor of using RF in this research is that it is composed of a large number of subsidiary judgement decisions, which is another rationale for its use. A random forest might well collect all of the data from tweets and then be able to classify them in such a way that they may present a variety of individual decisions so that those decisions can be applied to new data and categorized accordingly. As a direct consequence of this, the prediction that receives the most support will, in the end, be deemed accurate. In order to offer a piece of the data that will be utilized in the development of the core tweet dataset, a sample is taken from the dataset that is located at the beginning of each node of each tree. Further, what makes RF special lies with its creation of a random subset of the optional attributes that are selected for inclusion in the subset, and this subset is used to form the tree at each node [41]. Each tree in RF has the potential to reach its full growth potential even if it is not pruned. The use of an RF allows for the consolidation of several potentially erroneous classifiers or classifiers with just a moderate degree of connection into a single accurate classifier [42].

3.3. Dataset Acquisition and RF Detection Operation

Data was collected from two different sources: the first of which is the direct extraction of data from Twitter through the usage of the REST API. The second source is the benchmarking dataset [43]. There are 21,417 items in the dataset that are actual news, and there are 23,481 records that are fake news. A total of 1337 fake users and 1481 real users were acquired from Twitter and included in the dataset for profile detection. Building a dataset for the detection of fake news, other users, and fake users required the usage of Twitter application programming interface (API). The dataset used to generate the fake news is comprised of several news articles taken from well-known publications such as the Washington Post and the New York Times.
The loading of data from CSV files was accomplished with the help of the Pandas library. After that, the essential characteristics that will be of assistance in acquiring the very best model were chosen. In order to clean up the missing data, the study eliminated the columns that contained NaN values. After that, an RF model is constructed with the help of the Scikit-learn toolkit, which contains the vast majority of machine learning methods. The dataset has been divided into two sets: the train dataset and the test dataset. For the purpose of the training and study, additional columns that represent more of the data have been constructed. These new columns include “Lexical Diversity of Fake News”, “most Frequently Used Words in Titles”, “Punctuation”, and “the text Length.” These procedures were performed on the titles, as well as the content of the news.
The term lexical diversity can be used more or less interchangeably with lexical variety or lexical variability, or diversity of vocabulary [44]. Lexical diversity refers to the range of vocabulary that is employed in a language [45]. This reflects the patterns of behavior that are associated with the extent of a person’s vocabulary, also known as the number of words that a person possesses in their “active” vocabulary. This research conceptualized “Lexical Diversity of Fake News”, “most Frequently Used Words in Titles”, “Punctuation”, and “the Text Length” to be significant indicators for identifying Twitter accounts that are likely to be used to post malicious or offensive content; that is, they are used as the unit of analysis for detecting inappropriate tweets linked to fake accounts on Twitter.

3.4. Experimental Evaluation Criteria

To evaluate the performance of the proposed system, the performance measurements are needed to assess how effective and efficient a detection algorithm or model is. The type of performance metric employed defines the nature of the information it provides about the performance of the models, algorithms, or processes. The effectiveness of the proposed model was assessed using a variety of performance indicators applied to the test data. For instance, a two-dimensional matrix with the first dimension indexed by actual zones (or class) and the second dimension indexed by the classifier’s assigned zone (or class) was one of the performance measures. The main measure relies on two zones that are used for evaluating the confusion matrix: a positive (P) and a negative (N) zone associated with actual class and the detected class (see Table 1). The zones encompass: true positive (TP), false positives (FP), true negatives (TN), and false negatives (FN) and are all measures that are used to describe the make up of the matrix in this situation [33,34].
The practical definition of a TP is the metric that precisely detected inappropriate tweets associated to fake Twitter accounts. Whereas the erroneous detection of inappropriate tweets that are tied to fake Twitter accounts is an example of an FP, which can be operationally defined as a type 1 error. An FN is a measurement that, for operational purposes, is defined as the one that incorrectly disregards the detection of inappropriate tweets associated with fake Twitter accounts. This is known as a type 2 error. Finally, the operational definition of a TN is a measurement that precisely rejects the detection of inappropriate tweets that are tied to fake Twitter accounts.
The accuracy of the detection of the inappropriate tweets linked to fake accounts on Twitter can be measured with the help of the confusion matrix in Table 1. Hence, the extent to which measurement detection of the inappropriate tweets linked to fake accounts on Twitter is in conformity with the actual value or reflects a defined standard is measured by the accuracy (A), which is the function of the detection operation associated with the error rate given as:
A = 100% − Error Rate,
where the error rate is defined as:
E rror   rate = detection   rate current   rate current   rate × 100
Since the real detection rate as well as the current detection rate of the operation for identifying improper tweets linked with fake Twitter accounts were both deeply influenced, the actual accuracy of the detection rate can be expressed as
A = TP + TN P + N :
The Equations (1)–(3) have been used to evaluate the performance of the proposed work. Following the application of the accuracies associated with the detection rate of the inappropriate tweets linked to fake accounts on Twitter, another measure of the detection is associated with “Precision/sensitivity”, “recall”, “Sensitivity”, and “Specificity” of the measurement, where: sensitivity = TP/(TP + FN), specificity = True negative rate = TN/(TN + FP), and detection rate = TP/(TP + TN + FP + FN).

4. Experiments and Results

In this section, the experimental analysis is presented, and the results that were gathered from the experiment are also shared. The research takes into consideration the fact that the majority of the earlier study typically relied on machine learning in addition to a number of algorithms, such naive Bayes and decision trees, each of which has its own set of benefits and drawbacks. Because of this, the current research focuses on the RF algorithm and is meant to be deployed after the model is evaluated. There is a pressing requirement to achieve the maximum possible percentage of accuracy as one of the major research contributions.

4.1. Analysis of the Results

The experimental analysis begins with the loading of the raw dataset into Python, followed by the utilization of the natural language toolkit, also known as NLTK, which is a Python module. In most cases, the Pandas library was the tool of choice for reading datasets from CSV files. After that, the research narrowed its focus to just the essential features, such as “Lexical Diversity of Fake News”, “most Frequently Used Words in Titles”, “Punctuation”, and “the Text Length,” which will assist in obtaining the best model, and the research has eliminated the NaN value columns in order to clean up the missing data. These procedures were performed on the titles, as well as the content of the news. After that, the research constructed the machine learning model utilizing the Scikit-learn library, which contains the majority of the machine learning techniques that the research has. The characteristics of the dataset informed a number of different decisions on the partitioning or splitting of the data. After that, the study chose the few sub features that would be most helpful in order to construct our model and achieve the highest possible level of accuracy (see Table 2) for the attributes that were chosen.
The following are some of the modifications that were made to the data in the subsequent step: changing all NaN to 0 and merging the (fusers) and the (Rusers). The data is divided into a training set and a testing set. A model is then applied that is based on the architecture of deep neural networks in this section. In order to accomplish this, they have utilized the Keras library and imported the predefined functions that it provides.
The dataset was split into a training dataset and a testing dataset with a ratio of 70:30 percent in the first division of the training dataset. After being trained using the training dataset ration, the model was put through its paces using the test dataset. There was a 98.25 percent chance that the detection model was correct. Both the model’s sensitivity and specificity came in at 0.9813 and 0.1672, respectively. Additional performance indicators were additionally recorded (see Table 2).
For the next set of experiments the dataset was split into training and testing datasets with an 80:20 split at the second partition of the dataset. Following the completion of the training phase using the training dataset, the model was then evaluated using the test dataset. There was a 98.02 percent chance that the model was correct. Table 2 also includes presentations of the model’s remaining performance indicators, including its sensitivity and specificity, which were, respectively, 0.9591 and 0.1649.
At the third partitioning, the dataset was divided into training and testing datasets with a proportion of 90 percent to 10 percent, respectively. Following the completion of the training phase using the training dataset, the model was then evaluated using the test dataset. There was a 98.17 percent chance that the model was correct. The model has a sensitivity of 0.9915 and a specificity of 0.1717, respectively; the remaining performance measures are shown in Table 3 below.
Among the sample dataset observations that were used to train the detection model using an RF, the area under the ROC curve was 0.8213, 0.8368, and 0.8891 for the series of the partitioning, which indicated that all of the models are predicted correctly, with a high degree of accuracy, precision, and recall.

4.2. Deployment of Fake News Detector

Following the use of the RF approach, this section focuses on the categorization of the information, in particular the news, according to whether it is authentic or phony. In a similar vein, a Python package is required in conjunction with other tools such as the Keras library for the utilization of an implementation of neural network specifically, machine learning model, and the PyQT library as a Python binding for Qt, which is a suite of C++ libraries and development tools that feature platform-independent graphical user interface concepts. Both of these libraries are required in order to use an implementation of neural network specifically, a machine learning model. Other examples include klearn, which is a free and open-source data analysis toolkit for machine learning, and NTLK, which is a platform for developing Python programs to work with human language data. Both of these examples may be found on the NTLK website.

4.3. Development of the Detector for Inappropriate Tweets Linked to Fake Accounts on Twitter

The trained model prepares the system to be deployed as a detector tool. The first step in the functional stages that are included in the development of the detectors is the construction of the model. Following this stage, a tweet is published on the bot profile, tagging the user with the outcome of the checking procedure. The initial tasks associated with the functional sections of the detectors include retrieving the data from the REST API in order to take in the data that will be entered into the model. This is performed in order to complete the initial activities associated with the detectors. Following the completion of this stage, the data are then structured in accordance with the criteria that have already been determined. After this, the data will be tokenized so that any sensitive data elements will be replaced with non-sensitive alternatives, and any unnecessary data will be removed. After the preceding stage has been finished, the process of constructing and training the model gets started in order to recognize the accounts that are comparable, followed by the production of the detections in order to create the percentage result of the false accounts.
To re-emphasize, the purpose of the application is to generate fake profiles through the use of the similarity check. As inputs, it will take the profile name and photo, as well as the tweets, bio, and join date, and as an output, it will provide a likelihood that the account is a fake one. It will put together a request for you. Data (related to account information and tweet trends) are taken from Twitter REST API and input. Following that, Twitter will carry out the requested action. The query information is returned once the request has been processed. It then filters the users and checks to see if any of them have the same name or a name that is similar. Tweets, user biographies, and follower information are among the data that is collected. The result is displayed as the current standing of the account as the output. The application sends a tweet request in the bot account profile to construct a tweet that includes a mention to alert the subject user about the impersonated account if there is an impersonated account. This is performed if there is an impersonated account.
It is necessary to perform the processing in order to identify the false account and examine the followers of the bot account. If it detects that their accounts are being impersonated by a fake account of any kind, it posts a notification on Twitter about the impersonation and includes a reference to the real account. Following that, it discloses the information regarding the fake account to Twitter. Moreover, it also helps to identify bogus news. In this way, the users of the detector toll have the ability to check whether the Arabic news is fake or not by sending direct messages to the bot account, which is made available as a function of the application. The detector toll then verifies the credibility of the news source and provides a percentage indicating how accurate the story is.
Before obtaining permission to retrieve data from Twitter, the data must first be transmitted to the REST API. After that, the REST API performs an additional check in order to protect itself from malicious users. Following that, the application submits a request to Twitter to retrieve users’ information. After the application has received the data, it filters the people and checks to see if any of them have the same name or a name that is quite similar. The program then transmits a GET request in order to retrieve data from the users who have been selected. Tweets, user biographies, and follower information are all recovered as data. The program constructs a feature vector for each user based on the obtained data and then feeds the trained model with the vectors in order to obtain a projected result about whether or not the profile has a similar fake account. The program tags the user who is the topic of the procedure and sends a tweet request to the bot profile. This process has been depicted in Figure 3.

4.4. Proof of Concept Implementation of the Model

As stated earlier, this paper focuses on Twitter after conducting an analysis of two of its most significant issues, which are the dissemination of false information and news and the creation of a variety of fake user accounts. It is an established fact that Twitter has become one of the most successful social media companies. The company was just recently sold for a mega amount of money, which places it among the most influential technology companies. In a similar vein, Twitter not only draws in a peculiar audience, but it also makes it simple to zero in on the specific demographics of the audience you are trying to reach. Accordingly, the purpose of this research is to find a long-term solution to the problem of fake Twitter accounts as well as the dissemination of false information. The results of this research have proven this to be the case. In this context, a model that is appropriate for detecting fake information and fake accounts is currently in the process of being developed with a high accuracy of detection.
After the model has been constructed, the next step is to put it into action. Before the deployment, it is required to conduct additional functional user requirement analysis. Following the phase in which the user requirements are specified, the development process moves on to the design phase, at which point the project begins to take form. The design phase of the development process may result in the creation of functional design tools such as UML schemas, dioramas, sketches, flow charts, site trees, HTML screen designs, prototypes, image impressions, and other types of artwork. This is contingent on the nature of the development being carried out. All of this has been completed. Figure 4 and Figure 5 present the results of the work that was carried out. The detection of the account by the system has been put to the test, with both a legitimate profile and a fake account being obtained and detected by the system. The system has demonstrated a detection accuracy of 98 percent for both types of profiles.
According to the findings of this research, it is possible to recognize fake news, and any and all false information can be located and recognized. After being evaluated, the system is able to provide an indication of this, and it is indeed able to extract key words that reflect whether the information that was provided or the news that was provided is fake. In a similar manner, the system is able to report the legitimacy of the content of the news or information if it determines that the news is authentic or that it is not authentic. Figure 5 demonstrates that the system was successful in determining whether or not the news was legitimate. The system continues to verify information even if it is unclear whether the news in question is authentic or not. Because the system has a detection accuracy of 98 percent for this kind of check, this indicates that the system was able to determine the status of the news.
The significance of this finding lies in the fact that it has been demonstrated that it is possible to determine whether news stories found on Twitter are authentic or fake, as well as the status of Twitter accounts and whether or not they are fake. This is extremely important because it outlines some facts that are associated with these claims. First, the research has shown that it is possible to use Twitter as both a social network and as a tool for business. It has also shown that Twitter can be used as a source of breaking news and as an easy way to obtain updates from issues that are of particular interest to the user. Because of this, it creates a situation or an atmosphere in which a great deal of unfavorable activity can take place. As a result of this finding, the proposed model can identify not only fake Twitter accounts but also the fake information and news that is constantly being disseminated. It was found that the model could detect with high reasonable accuracy any fake news and any fake account on Twitter. The model was achieved, proposed, and tested.
This accomplishment of the ongoing research has an implication for business, and that implication is that businesses will be able to have more trust in Twitter accounts and in the news that comes from Twitter. This would not only make it simpler to comprehend, recognize, and understand one of the most significant problems that Twitter is currently facing, but it would also solve the problem of fraudulent and fake accounts that exist on the platform. This particular piece of research is expected to lead to the development of such systems that could classify the fake accounts from the legitimate ones.

5. Conclusions

Studies have demonstrated that Twitter may be utilized not only as a social networking and commercial tool, but also as a source of breaking news and a practical means of keeping up to date on a variety of personal interests. It has been observed that one of the most major issues provided by Twitter is the rise of fraudulent and false accounts, as well as the challenge of recognizing these accounts. Accordingly, it is a challenge to determine which accounts are fraudulent and phony. The identification of fraudulent accounts, fake information, and fake accounts on Twitter, in addition to the flow of content that these accounts post, is the primary focus of this research. This is in addition to the research area’s focus on the flow of content that these accounts post. A system that was built for use on Twitter has demonstrated the ability to identify fake accounts as well as the transmission of incorrect information and news. It was found that the proposed method was capable of accurately identifying any false news and phony Twitter accounts with extremely reasonable accuracy. The fact that the proposed system was able to identity a false user account and that phony news was recognized by the system is evidence that the proposed system addresses the associated challenge of fake account identification. In this way, the system has the capacity to report the legitimacy of an account if it discovers that the account in question is genuine. This proved the effectiveness of the proposed system. The detection accuracy of 99 percent proved the effectiveness of the proposed system empirically. Furthermore, the proposed system also helps to determine whether or not the information found on Twitter is fake, which has ramifications for the current research. The author believes that this is really important because it outlines information that is pertinent.

Funding

This work was funded by the University of Jeddah, Jeddah, Saudi Arabia, under grant No. (UJ-22-DR-70). The authors, therefore, acknowledge with thanks the University of Jeddah for its technical and financial support.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Will be provided on demand.

Acknowledgments

I would like to thank Abrar AlBarraq and Renad Bawareth for their support and assistance in this research.

Conflicts of Interest

The author declares no conflict of interest.

References

  1. Conger, K.; Hirsch, L. Elon Musk Completes $44 Billion Deal to Own Twitter. The New York Times 2022. Available online: https://www.nytimes.com/2022/10/27/technology/elon-musk-twitter-deal-complete.html (accessed on 25 February 2023).
  2. Ng, R.; Indran, N.; Liu, L. A playbook for effective age advocacy on Twitter. J. Am. Geriatr. Soc. 2022, 70, 2363–2370. [Google Scholar] [CrossRef]
  3. Curran, K.; O’Hara, K.; O’Brien, S. The Role of Twitter in the World of Business. Int. J. Bus. Data Commun. Netw. 2011, 7, 1–15. [Google Scholar] [CrossRef] [Green Version]
  4. Schnitzler, K.; Davies, N.; Ross, F.; Harris, R. Using Twitter™ to drive research impact: A discussion of strategies, opportunities and challenges. Int. J. Nurs. Stud. 2016, 59, 15–26. [Google Scholar] [CrossRef] [Green Version]
  5. Gerber, M.S. Predicting crime using Twitter and kernel density estimation. Decis. Support Syst. 2014, 61, 115–125. [Google Scholar] [CrossRef]
  6. Ersahin, B.; Aktas, O.; Kilinc, D.; Akyol, C. Twitter fake account detection. In Proceedings of the 2017 International Conference on Computer Science and Engineering (UBMK), Antalya, Turkey, 5–8 October 2017; pp. 388–392. [Google Scholar] [CrossRef]
  7. Ahmad, I.; Alqarni, M.A.; Almazroi, A.A.; Tariq, A. Experimental Evaluation of Clickbait Detection Using Machine Learning Models. Intell. Autom. Soft Comput. 2020, 26, 1335–1344. [Google Scholar] [CrossRef]
  8. Jabardi, M.; Hadi, A.S. Twitter Fake Account Detection and Classification using Ontological Engineering and Semantic Web Rule Language. Karbala Int. J. Mod. Sci. 2020, 6, 8. [Google Scholar] [CrossRef]
  9. Jung, A.-K.; Ross, B.; Stieglitz, S. Caution: Rumors ahead—A case study on the debunking of false information on Twitter. Big Data Soc. 2020, 7, 1–15. [Google Scholar] [CrossRef]
  10. Vosoughi, S.; Roy, D.; Aral, S. The spread of true and false news online. Science 2018, 359, 1146–1151. [Google Scholar] [CrossRef] [PubMed]
  11. Li, H.; Sakamoto, Y. Computing the Veracity of Information through Crowds: A Method for Reducing the Spread of False Messages on Social Media. In Proceedings of the in 48th Hawaii International Conference on System Sciences, Kauai, HI, USA, 5–8 January 2015; pp. 2003–2012. [Google Scholar] [CrossRef]
  12. Mueller, S.D.; Saeltzer, M. Twitter made me do it! Twitter’s tonal platform incentive and its effect on online campaigning. Inf. Commun. Soc. 2020, 25, 1247–1272. [Google Scholar] [CrossRef]
  13. Dmitrienko, A.; Liebchen, C.; Rossow, C.; Sadeghi, A.-R. On the (In)Security of Mobile Two-Factor Authentication. In Financial Cryptography and Data Security; Springer: Berlin/Heidelberg, Germany, 2014; pp. 365–383. [Google Scholar] [CrossRef]
  14. Al-Rousan, S.; Abuhussein, A.; Alsubaei, F.; Collen, L.; Shiva, S. Ads-Guard: Detecting Scammers in Online Classified Ads. In Proceedings of the 2020 IEEE Symposium Series on Computational Intelligence (SSCI), Canberra, Australia, 1–4 December 2020; pp. 1492–1498. [Google Scholar] [CrossRef]
  15. Al-Rousan, S.; Abuhussein, A.; Alsubaei, F.; Kahveci, O.; Farra, H.; Shiva, S. Social-Guard: Detecting Scammers in Online Dating. In Proceedings of the 2020 IEEE International Conference on Electro Information Technology (EIT), Chicago, IL, USA, 31 July–1 August 2020; pp. 416–422. [Google Scholar] [CrossRef]
  16. Albahar, M.A. Detecting Fraudulent Twitter Profiles: A Model for Fraud Detection in Online Social Networks. Int. J. Innov. Comput. Inf. Control. 2019, 15, 1629–1639. [Google Scholar] [CrossRef]
  17. Zhang, Y.; Ruan, X.; Wang, H.; Wang, H.; He, S. Twitter Trends Manipulation: A First Look Inside the Security of Twitter Trending. IEEE Trans. Inf. Forensics Secur. 2016, 12, 1. [Google Scholar] [CrossRef]
  18. Alshaikh, M.; Zohdy, M.; Olawoyin, R.; Debnath, D.; Gwarzo, Z.; Alowibdi, J. Social Network Analysis and Mining: Privacy and Security on Twitter. In Proceedings of the 2020 10th Annual Computing and Communication Workshop and Conference (CCWC), Las Vegas, NV, USA, 6–8 January 2020; pp. 0712–0718. [Google Scholar] [CrossRef]
  19. Ritter, A.; Wright, E.; Casey, W.; Mitchell, T. Weakly Supervised Extraction of Computer Security Events from Twitter. In Proceedings of the 24th International Conference on World Wide Web, Geneva, Switzerland, 18–22 May 2015; pp. 896–905. [Google Scholar] [CrossRef] [Green Version]
  20. Çıtlak, O.; Dörterler, M.; Doğru, I.A. A survey on detecting spam accounts on Twitter network. Soc. Netw. Anal. Min. 2019, 9, 1–13. [Google Scholar] [CrossRef]
  21. Basha, C.B.; Rajaprakash, S.; Harish, V.V.A.; Krishna, M.S.; Prabhas, K. Securing Twitter Analysed Data Using CBB22 Algorithm. Adv. Math. Sci. J. 2020, 9, 1093–1099. [Google Scholar] [CrossRef]
  22. Hossmann, T.; Carta, P.; Schatzmann, D.; Legendre, F.; Gunningberg, P.; Rohner, C. Twitter in Disaster Mode: Security Architecture. In Proceedings of the Special Workshop on Internet and Disasters; Association for Computing Machinery: New York, NY, USA, 2011; pp. 1–8. [Google Scholar]
  23. Zervopoulos, A.; Alvanou, A.G.; Bezas, K.; Papamichail, A.; Maragoudakis, M.; Kermanidis, K. Deep learning for fake news detection on Twitter regarding the 2019 Hong Kong protests. Neural Comput. Appl. 2021, 34, 969–982. [Google Scholar] [CrossRef]
  24. Swe, M.M.; Myo, N.N. Fake Accounts Detection on Twitter Using Blacklist. In Proceedings of the 2018 IEEE/ACIS 17th International Conference on Computer and Information Science (ICIS), Singapore, 6–8 June 2018; pp. 562–566. [Google Scholar] [CrossRef]
  25. Sowmya, P.; Chatterjee, M. Detection of Fake and Clone accounts in Twitter using Classification and Distance Measure Algorithms. In Proceedings of the 2020 International Conference on Communication and Signal Processing (ICCSP), Melmaruvathur, India, 28–30 July 2020; pp. 0067–0070. [Google Scholar] [CrossRef]
  26. FacTweet: Profiling Fake News Twitter Accounts|SpringerLink. Available online: https://0-link-springer-com.brum.beds.ac.uk/chapter/10.1007/978-3-030-59430-5_3 (accessed on 5 July 2022).
  27. Cresci, S. A decade of social bot detection. Commun. ACM 2020, 63, 72–83. [Google Scholar] [CrossRef]
  28. Kaubiyal, J.; Jain, A.K. A feature based approach to detect fake profiles in Twitter. In Proceedings of the 3rd International Conference on Big Data and Internet of Things, Melbourn, VIC, Australia, 22–24 August 2019; pp. 135–139. [Google Scholar]
  29. Sun, N.; Lin, G.; Qiu, J.; Rimba, P. Near real-time twitter spam detection with machine learning techniques. Int. J. Comput. Appl. 2020, 1–11. [Google Scholar] [CrossRef]
  30. Balfagih, A.; Keselj, V.; Taylor, S. N-gram and Word2Vec Feature Engineering Approaches for Spam Recognition on Some Influential Twitter Topics in Saudi Arabia. In Proceedings of the 2022 the 6th International Conference on Information System and Data Mining, Atlanta, GA, USA, 27–29 May 2022; pp. 101–107. [Google Scholar]
  31. Biau, G.; Scornet, E. A random forest guided tour. Test 2016, 25, 197–227. [Google Scholar] [CrossRef] [Green Version]
  32. Kotsiantis, S.B. Decision trees: A recent overview. Artif. Intell. Rev. 2011, 39, 261–283. [Google Scholar] [CrossRef]
  33. Luna, J.M.; Gennatas, E.D.; Ungar, L.H.; Eaton, E.; Diffenderfer, E.S.; Jensen, S.T.; Simone, C.B.; Friedman, J.H.; Solberg, T.D.; Valdes, G. Building more accurate decision trees with the additive tree. Proc. Natl. Acad. Sci. USA 2019, 116, 19887–19893. [Google Scholar] [CrossRef] [Green Version]
  34. Bai, J.; Li, Y.; Li, J.; Yang, X.; Jiang, Y.; Xia, S.-T. Multinomial random forest. Pattern Recognit. 2021, 122, 108331. [Google Scholar] [CrossRef]
  35. Tang, F.; Ishwaran, H. Random forest missing data algorithms. Stat. Anal. Data Min. ASA Data Sci. J. 2017, 10, 363–377. [Google Scholar] [CrossRef] [PubMed]
  36. Rivera-Lopez, R.; Canul-Reich, J.; Mezura-Montes, E.; Cruz-Chávez, M.A. Induction of decision trees as classification models through metaheuristics. Swarm and Evolutionary Computation 2022, 1, 101006. [Google Scholar] [CrossRef]
  37. Demertzis, K.; Kostinakis, K.; Morfidis, K.; Iliadis, L. An interpretable machine learning method for the prediction of R/C buildings’ seismic response. J. Build. Eng. 2023, 63, 105493. [Google Scholar] [CrossRef]
  38. Singh, U.P. Decision Making and Predictive Analysis for Real Time Data. Adv. Data Sci.Anal. Concepts Paradig. 2022, 1, 21–38. [Google Scholar]
  39. Dhibi, K.; Fezai, R.; Mansouri, M.; Trabelsi, M.; Bouzrara, K.; Nounou, H.; Nounou, M. A Hybrid Fault Detection and Diagnosis of Grid-Tied PV Systems: Enhanced Random Forest Classifier Using Data Reduction and Interval-Valued Representation. IEEE Access 2021, 9, 64267–64277. [Google Scholar] [CrossRef]
  40. Lipu, M.S.H.; Hannan, M.A.; Hussaion, A.; Ansari, S.S.; Rahman, S.A.; Saad, M.H.; Muttaqi, K. Real-Time State of Charge Estimation of Lithium-Ion Batteries Using Optimized Random Forest Regression Algorithm. IEEE Trans. Intell. Veh. 2022, 8, 639–648. [Google Scholar] [CrossRef]
  41. Jiang, Z.; Zhang, W.; Huang, H.; Zhai, Z.; Chen, D.; Ai, Y.; Li, B.; Chen, X. Rapid Identification of Tobacco Mildew Based on Random Forest Algorithm. Sci. Program. 2022, 2022, 1–10. [Google Scholar] [CrossRef]
  42. Ramos, D.; Faria, P.; Gomes, L.; Vale, Z. A Contextual Reinforcement Learning Approach for Electricity Consumption Forecasting in Buildings. IEEE Access 2022, 10, 61366–61374. [Google Scholar] [CrossRef]
  43. Ahmed, H.; Traore, I.; Saad, S. Detecting opinion spams and fake news using text classification. Secur. Priv. 2017, 1, e9. [Google Scholar] [CrossRef] [Green Version]
  44. Carroll, J.B. Diversity of vocabulary and the harmonic series law of word-frequency distribution. Psychol. Rec. 1938, 2, 379–386. [Google Scholar] [CrossRef] [Green Version]
  45. Jarvis, S. Defining and measuring lexical diversity. In Vocabulary Knowledge: Human Ratings and Automated Measures; John Benjamins Publishing: Amsterdam, PH, USA, 2013; pp. 13–44. [Google Scholar]
Figure 1. The flowchart of the methodological approach.
Figure 1. The flowchart of the methodological approach.
Applsci 13 03013 g001
Figure 2. The conceptual framework.
Figure 2. The conceptual framework.
Applsci 13 03013 g002
Figure 3. The combine interactive deployment framework.
Figure 3. The combine interactive deployment framework.
Applsci 13 03013 g003
Figure 4. The result of detecting the status of Twitter account as either fake or legitimate.
Figure 4. The result of detecting the status of Twitter account as either fake or legitimate.
Applsci 13 03013 g004
Figure 5. The result of detecting the status of news on Twitter as either fake or legitimate.
Figure 5. The result of detecting the status of news on Twitter as either fake or legitimate.
Applsci 13 03013 g005
Table 1. The confusion matrix evaluation.
Table 1. The confusion matrix evaluation.
Detected Class
PN
Actual ClassPTPFN
NFPTN
Table 2. The feature selections formulated for the experiment.
Table 2. The feature selections formulated for the experiment.
AttributeData TypeDescription
statuses_countIntThe number of tweets (including retweets) issued by the user.
followers_countIntThe number of followers this account currently has. Under certain conditions of duress, this field will temporarily indicate “0”.
friends_countIntThe number of users this account is following (AKA their “followings”). Under certain conditions of duress, this field will temporarily indicate “0”.
favourites_countIntThe number of tweets this user has liked in the account’s lifetime
listed_countIntThe number of public lists that this user is a member of.
urlStringNullable. A URL provided by the user in association with their profile
Table 3. The performance of the detection model.
Table 3. The performance of the detection model.
PartitioningModelAccuracySensitivitySpecificity
First70:3098.25%.0.98130.1672
Second80:2099.42%.0.98910.1649
Last90:1098.17%.0.99150.1717
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Alsubaei, F.S. Detection of Inappropriate Tweets Linked to Fake Accounts on Twitter. Appl. Sci. 2023, 13, 3013. https://0-doi-org.brum.beds.ac.uk/10.3390/app13053013

AMA Style

Alsubaei FS. Detection of Inappropriate Tweets Linked to Fake Accounts on Twitter. Applied Sciences. 2023; 13(5):3013. https://0-doi-org.brum.beds.ac.uk/10.3390/app13053013

Chicago/Turabian Style

Alsubaei, Faisal S. 2023. "Detection of Inappropriate Tweets Linked to Fake Accounts on Twitter" Applied Sciences 13, no. 5: 3013. https://0-doi-org.brum.beds.ac.uk/10.3390/app13053013

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop