BotRGCN: Twitter bot detection with relational graph convolutional networks

Shangbin Feng, Herun Wan, Ningnan Wang, Minnan Luo

Abstract

BotRGCN is a novel framework for Twitter bot detection that integrates multi-modal user data—including textual, numerical, and categorical features—with Relational Graph Convolutional Networks (R-GCNs). By treating "following" and "follower" relationships as distinct edge types within a heterogeneous graph, the model effectively identifies bots that attempt to evade detection through human-like disguise or coordinated community behavior. BotRGCN achieves state-of-the-art performance on the TwiBot-20 benchmark, demonstrating the importance of relational social structures in identifying malicious automated accounts.

Introduction

Twitter bot detection has evolved into a sophisticated "cat-and-mouse" game. Modern bots have moved beyond simple spam scripts to overcome traditional detection in two primary ways: disguise and community. Bots now mimic genuine users by stealing profile pictures, using human-like names, and interspersing malicious tweets with neutral content. Furthermore, malicious actors deploy "botnets" that act collectively; while an individual bot might look benign in isolation, its membership in a coordinated group reveals its true nature.

Existing detection methods often rely on manual feature engineering, which is easily bypassed, or fail to account for the complex social graph structure where these communities hide. BotRGCN addresses these gaps by combining deep multi-modal feature learning with relational graph modeling.

Methodology

The BotRGCN framework utilizes a two-pronged approach to identify sophisticated bots.

Multi-modal User Feature Encoding

To counter "disguise," the model avoids manual feature engineering and instead uses deep learning to process four types of data:

  • User Descriptions and Tweets: Processed using a pre-trained RoBERTa model to capture semantic nuances. Tweet representations are averaged across a user's recent timeline.
  • Numerical Metadata: Standard statistics such as followers, likes, and account age are normalized and passed through a fully connected layer.
  • Categorical Metadata: Binary or discrete flags, such as verified status or the use of a default profile, are one-hot encoded.

Relational Graph Convolutional Networks (R-GCN)

To address the "community" challenge, BotRGCN constructs a heterogeneous graph. Unlike standard Graph Convolutional Networks (GCNs) that treat all connections identically, R-GCNs distinguish between different types of relationships. BotRGCN defines two specific edge types: "following" and "follower." This allows the model to learn distinct weights for the influence of who a user follows versus who follows them, capturing the directional nature of social influence critical for spotting coordinated botnets.

The BotRGCN architecture: Multi-modal feature encoding followed by a Relational Graph Convolutional Network.

Experimental Setup

The model was evaluated on TwiBot-20, a comprehensive benchmark for Twitter bot detection containing 229,580 nodes and 227,979 edges. Unlike older datasets, TwiBot-20 provides the explicit follow relationships necessary to build and test graph-based models, making it a rigorous testing ground for relational approaches.

Key Insights and Results

BotRGCN achieved state-of-the-art (SOTA) results on the TwiBot-20 benchmark, outperforming nine competitive baselines, including industry standards like Botometer and recent frameworks like SATAR. The model reached an accuracy of 0.8462, an F1-score of 0.8707, and an MCC of 0.7021.

The Power of Relations

Comparative analysis shows that using an R-GCN significantly outperforms standard GCNs and Graph Attention Networks (GATs). This confirms that the directionality of social ties is a critical signal for identifying botnets. Furthermore, the researchers found that two layers of R-GCN provided optimal performance; adding more layers led to "over-smoothing," a common issue in deep Graph Neural Networks where node representations become indistinguishable.

Performance comparison of BotRGCN (R-GCN) against other GNN architectures and a non-GNN baseline.

Feature Importance

Ablation studies highlighted that categorical metadata (e.g., verified status) contributed more to the model's performance than any other single feature set, including tweets. This suggests that while bots can mimic human language, they often fail to replicate the metadata profiles of long-standing, legitimate users.

Conclusion

BotRGCN demonstrates that the combination of multi-modal features and relational graph structures is highly effective for modern bot detection. While the current model focuses on "follow" and "follower" edges, the framework is extensible to other interaction types like retweets or mentions. Future work will focus on scaling these relational models to handle the massive volume of the full Twitter social graph and improving robustness against evolving bot evasion tactics.

Summary updated

BibTeX
@inproceedings{feng2021botrgcn,
  author = {Shangbin Feng and Herun Wan and Ningnan Wang and Minnan Luo},
  title = {{BotRGCN: Twitter bot detection with relational graph convolutional networks}},
  booktitle = {ASONAM},
  year = {2021},
  doi = {10.1145/3487351.3488336},
}
Figure