Introduction
Online platforms are increasingly targeted by malicious actors, including spammers, fake reviewers, and vandals. While deep learning models have become the standard for detecting these users, they often suffer from a "glass jaw"—a high sensitivity to minor input perturbations. Specifically, attackers can evade detection through "generation-based attacks," where they append carefully crafted, AI-generated benign content to their post history to mask their true intent.
Existing detection models typically fail in these scenarios because they either process posts in isolation or lack the adversarial awareness to recognize that a sudden shift in behavior is a calculated attempt to bypass security. To address this, we present ROBAD (Robust Adversary-aware Local-Global Attended Bad Actor Detection), a framework designed to understand both the nuance of individual posts and the broader global patterns of a user's chronological history.
The ROBAD Framework
ROBAD utilizes a hierarchical, three-pronged architectural approach to ensure both high detection accuracy and resilience against evasion tactics.
1. Local Post-Level Encoding
To capture the semantic richness of individual activities, ROBAD employs a Transformer Encoder. This component processes each post bidirectionally, ensuring that the full context of the text within a single post is captured. This results in a "local" embedding that represents the specific characteristics of a single action.
2. Global Sequence-Level Modeling
The local post embeddings are then fed into a Transformer Decoder. Unlike the encoder, this layer uses masked self-attention to model the chronological relationship between posts. By analyzing the sequence of activities, the model captures the "global" behavioral pattern of the user, identifying how their style and intent evolve over time.
3. Adversary-Aware Contrastive Learning
The core innovation for robustness in ROBAD is its Adversary-aware Module. During the training phase, the model is exposed to both original sequences and "mimicked" adversarial sequences—created by appending generated posts to the original history. Using a SimCLR-based contrastive loss, the model is trained to minimize the distance between the embeddings of a user's original sequence and its adversarial counterpart. This forces the model to ignore the "noise" of an attack and focus on the underlying signal of malicious behavior, effectively acting as a vaccine against evasion attempts.
Experimental Evaluation
Datasets
The model was evaluated on two real-world datasets with ground-truth labels for bad actors:
- Wikipedia Vandal Dataset: 794 users (50% vandals) with over 11,000 edits.
- Yelp Fake Reviewer Dataset: 3,940 users (roughly 49% malicious) with over 35,000 reviews.
For both datasets, the authors filtered for users with at least five posts and utilized the 20 most recent posts to represent current behavior.
Performance and Robustness
ROBAD demonstrated superior performance in both raw detection capability and stability under attack:
- Detection Accuracy: On the Yelp dataset, ROBAD achieved a top-tier F1-score of 0.708, outperforming established models such as Facebook’s TIES and various BERT-based variants.
- Resilience to Attacks: When subjected to state-of-the-art adversarial attacks (using LLaMA to generate stealth posts), ROBAD’s performance remained remarkably stable. On the Yelp dataset, its F1-score dropped by only 1.129%, whereas the Hierarchical Recurrent Neural Network (HRNN) experienced a significantly sharper 5.037% decline.
- Ablation Studies: Removing either the Local-Global hierarchical module or the Adversary-aware module led to performance decreases of up to 4.4%, confirming that both the architecture and the contrastive training strategy are vital to the model's success.
Conclusion
ROBAD represents a significant step forward in making bad actor detection more robust against sophisticated adversarial tactics. By combining hierarchical attention with contrastive learning, the model maintains a stable internal representation of user identity even when faced with AI-generated "benign" noise.
Future work will focus on expanding the model to handle multilingual data and incorporating graph-based signals—such as follower networks and shared IP addresses—to further enhance detection capabilities in complex social media environments.
Summary updated