Source-linked AI summary
Deep Neural Networks for Bot Detection
Sneha Kudugunta, Emilio Ferrara
TL;DR
The paper addresses bot detection from a single tweet, motivated by the growing abuse of social media and the limitations of account-level approaches. It proposes a contextual LSTM combining tweet content with metadata, achieving over 96% AUC at tweet level and over 99% AUC at account level with minimal features.
Problem
The paper studies whether a user is a bot from a single tweet, amid concerns about social-media manipulation and existing account-level detection methods.
Method
A contextual LSTM processes tokenized tweet text while incorporating tweet metadata as auxiliary input, alongside synthetic-minority oversampling and data-enhancement techniques.
Results
The model exceeds 96% AUC for single-tweet detection and achieves over 99% AUC for user-level detection, while metadata reduces the error rate by nearly 20%.
Takeaways & Limitations
Minimal, interpretable features and a single tweet can support highly accurate bot detection, while oversampling enables near-perfect account-level performance.
Takeaways & Limitations
The reasons some oversampling combinations fail to improve performance are not apparent and warrant further investigation.
Abstract
from arXiv · showhide
The problem of detecting bots, automated social media accounts governed by software but disguising as human users, has strong implications. For example, bots have been used to sway political elections by distorting online discourse, to manipulate the stock market, or to push anti-vaccine conspiracy theories that caused health epidemics. Most techniques proposed to date detect bots at the account level, by processing large amount of social media posts, and leveraging information from network structure, temporal dynamics, sentiment analysis, etc. In this paper, we propose a deep neural network based on contextual long short-term memory (LSTM) architecture that exploits both content and metadata to detect bots at the tweet level: contextual features are extracted from user metadata and fed as auxiliary input to LSTM deep nets processing the tweet text. Another contribution that we make is proposing a technique based on synthetic minority oversampling to generate a large labeled dataset, suitable for deep nets training, from a minimal amount of labeled data (roughly 3,000 examples of sophisticated Twitter bots). We demonstrate that, from just one single tweet, our architecture can achieve high classification accuracy (AUC > 96%) in separating bots from humans. We apply the same architecture to account-level bot detection, achieving nearly perfect classification accuracy (AUC > 99%). Our system outperforms previous state of the art while leveraging a small and interpretable set of features yet requiring minimal training data.
1 INTRODUCTION
The paper addresses the costly limits of account-level bot detection by proposing single-tweet classification using tweet content, metadata, and expanded labeled data.
- Bot detection matters because automated accounts have been used for political manipulation, scams, disinformation, and other social media abuse.
- Most successful existing methods classify accounts from substantial activity records using content, network, sentiment, and temporal features.
- Account-level methods require substantial user data and large labeled datasets, while available datasets often contain only hundreds of tweets from thousands of bots.
- The paper asks whether a single tweet can identify its source as bot or human and whether labeled data can be expanded without expensive collection and annotation.
- Its contributions include tweet-level classification, a Contextual LSTM using tweet text and metadata, and synthetic minority oversampling to generate additional labeled examples.
- Tweet-level detection supplies far more labeled datapoints for deep learning and can flag isolated or mixed bot-generated tweets within an account’s activity.
2 DATASET
The study uses a bot-and-human Twitter dataset with millions of tweets and deliberately limits metadata features to improve efficiency and interpretability.
- The dataset combines genuine accounts with three groups of sophisticated social spambots from the dataset presented by Cresci and collaborators.
- The training data contains over 8,386 user accounts and over 11,834,866 tweets.
- Account-level detection uses ten account features, while tweet-level classification uses six tweet features in addition to tweet content.
- The reduced feature set is intended to produce faster, less overfit models and more interpretable inputs than systems using hundreds or thousands of features.
3 METHODS
The paper evaluates account- and tweet-level bot detection, combining classical models, LSTMs, tweet metadata, and oversampling to address limited labeled data and single-tweet classification.
- 3.1 Task 1: Account-level Classification: Account-level detection uses a small set of interpretable user-metadata features with classical machine-learning classifiers.Most approaches exceeded AUC 90%, while Random Forest achieved an AUC of 98.45%.
- 3.1 Task 1: Account-level Classification: SMOTE generates minority-class samples and is combined with ENN or Tomek Links to address imbalanced account-level data.The paper reports significant gains with SMOTENN across all models, whereas SMOTOMEK improves results little.
- 3.1 Task 1: Account-level Classification: 99.81% accuracy is achieved by AdaBoost with SMOTENN on account-level bot detection.The results indicate near-perfect account-level detection without complex deep-learning architectures.
- 3.2 Task 2: Tweet-level Classification: Tweet-level detection classifies whether a single tweet comes from a bot or human, addressing the scarcity of successful single-observation methods.Earlier tweet-content approaches commonly rely on engineered features such as part-of-speech tags, hashtag counts, and tweet dissimilarity.
- 3.2 Task 2: Tweet-level Classification: The text-only LSTM tokenizes tweets, maps them to Twitter-trained GloVE vectors, and processes each tweet sequence into a classification output.Its state resets after each input, so it learns sequential structure within tweets rather than across a user’s tweet history.
- 3.2.3 Contextual LSTM architecture: The Contextual LSTM combines tweet text with metadata by concatenating auxiliary features with the LSTM output before a 2-layer ReLU network.An auxiliary classification output regularizes the model, with total loss weighted 0.2 for the auxiliary output and 0.8 for the main output.
4 RESULTS
The experiments show that synthetic oversampling strengthens account-level classification, while the proposed LSTM architectures substantially improve tweet-level bot detection using tweet content and metadata. Hidden-state visualizations further suggest that the LSTM representations distinguish human- and bot-generated tweets.
- Account-Level Classification: AUC > 98% was obtained by the strongest account-level classifiers even without oversampling.All classifiers performed well on the analyzed account-level dataset.
- Account-Level Classification: 99.81% accuracy was achieved by AdaBoost after SMOTE followed by ENN in account-level classification.Results improved across all classifiers, and SMOTOMEK also improved performance, though less than SMOTENN.
- Tweet-Level Classification: Tweet-metadata-only baselines stayed below an AUC of 78% without augmentation, while SMOTENN raised models to 88%–90% accuracy.SMOTOMEK did not produce the same improvement, and the authors state that the reason warrants further investigation.
- Tweet-Level Classification: 95.53% accuracy was obtained by the tweet-only LSTM, representing a performance lift of about 5%.This result used tweet text with 50D GloVe representations.
- Tweet-Level Classification: The Contextual LSTM combines tweet text with metadata and yields slightly more accurate predictions than content alone.Changing GloVe dimensionality had little effect, with a slight trend toward better performance at higher dimensionality; metadata was not oversampled for these systems.
- Interpretability: LSTM hidden-unit activations differ substantially between human- and bot-generated tweets, and many units show different activation distributions.These differences suggest that hidden units may correspond to distinct linguistic features.
5 RELATED WORK
Prior bot-detection research largely analyzed accounts using historical activity, network structure, sentiment, or temporal patterns. This work addresses the lack of tweet-based detection and uses LSTM representations to examine differences between human- and bot-generated tweets.
- Approaches: Bot-detection research includes social-network methods, crowd-sourcing and human computation, and predictive-feature algorithms.The paper places its framework in the predictive-features category.
- Bot Context: Bots vary widely in behavior, capabilities, and intent, spanning political conversation, fake news, conspiracy theories, stock markets, and public health.The paper also notes that bots can occasionally be used for positive interventions.
- Limitations of Prior Work: Account-level methods require historical user data, while API rate limits can prevent large-scale detection.The paper states that no tweet-based detection system existed prior to this work.
6 CONCLUSIONS
The paper presents contextual LSTM bot detection using tweet content and metadata, achieving high tweet-level accuracy and near-perfect user-level accuracy with minimal features. Future work includes releasing the system and applying it to study bot interference in public discourse.
- Over 96% AUC is achieved for bot detection from a single tweet using tweet content and metadata.The proposed contextual LSTM architecture combines both information sources at the tweet level.
- Nearly 20% lower error rates result when LSTM exploits metadata that is otherwise a weak predictor of account nature.
- > 99% AUC is achieved for user-level bot detection using synthetic minority oversampling.
- The methods use a minimal set of features obtainable directly from tweets and metadata while surpassing prior state of the art.
- Future work includes open-sourcing the system, providing a Web service, and studying bot interference and evolving capabilities across contexts.