Dynamicity-aware Social Bot Detection with Dynamic Graph Transformers

Buyun He, Yingguang Yang, Qi Wu, Hao Liu, Renyu Yang, Hao Peng, Xiang Wang, Yong Liao, Pengyuan Zhou

Abstract

Detecting social bots has evolved into a pivotal yet intricate task, aimed at combating the dissemination of misinformation and preserving the authenticity of online interactions. While earlier graph-based approaches, which leverage topological structure of social networks, yielded notable outcomes, they overlooked the inherent dynamicity of social networks -- In reality, they largely depicted the social network as a static graph and solely relied on its most recent state. Due to the absence of dynamicity modeling, such approaches are vulnerable to evasion, particularly when advanced social bots interact with other users to camouflage identities and escape detection. To tackle these challenges, we propose BotDGT, a novel framework that not only considers the topological structure, but also effectively incorporates dynamic nature of social network. Specifically, we characterize a social network as a dynamic graph. A structural module is employed to acquire topological information from each historical snapshot. Additionally, a temporal module is proposed to integrate historical context and model the evolving behavior patterns exhibited by social bots and legitimate users. Experimental results demonstrate the superiority of BotDGT against the leading methods that neglected the dynamic nature of social networks in terms of accuracy, recall, and F1-score.

The Challenge of Bot Evolution

The detection of social bots has become an "arms race." Modern bots are no longer simple scripts; they are meticulously engineered to forge numerical features and mimic legitimate network structures, such as forming communities, to escape detection. A significant limitation of current graph-based detectors is their reliance on static graphs, analyzing only the most recent state of the network.

Evolution of interaction patterns for humans and social bots across historical and current snapshots.

As illustrated in Figure 1, while a bot might successfully camouflage its current identity to appear "human," its historical trajectory—how it formed connections and interacted over time—often reveals its artificial nature. Static models suffer from a deficiency in utilizing this historical context, making them vulnerable to bots that have already completed their disguise.

The BotDGT Framework

To address these vulnerabilities, we propose BotDGT (Bot detection with Dynamic Graph Transformers). This framework treats the social network as a sequence of snapshots over time, allowing the model to capture the evolution of user behavior.

The BotDGT framework architecture, featuring graph construction, structural message-passing, and temporal attention modules.

As shown in Figure 4, the architecture consists of two primary components:

  1. Structural Module: For each time snapshot, this module employs a message-passing mechanism using scaled dot-product attention. It captures the topological layout by learning which neighbors are most significant for defining a user's role at a specific moment.
  2. Temporal Module: This core innovation processes the sequence of structural representations through a self-attention-based temporal layer. This allows the model to "attend" to specific historical periods that might indicate bot-like behavior.

To enhance the temporal module, we introduced specialized Position Embeddings. These include Absolute Temporal Position for chronological ordering and Evolving Temporal Signals, which track metrics like the Local Clustering Coefficient (LCC) and Bidirectional Links Ratio (BLR). While humans typically maintain stable, high LCC and BLR, bots often exhibit erratic patterns as they indiscriminately follow users to build influence.

Experimental Evaluation

BotDGT was evaluated on two large-scale Twitter benchmarks: TwiBot-20 (229,142 users) and TwiBot-22 (1,000,000 users). These datasets provide the multi-year historical data necessary for dynamic analysis.

Key Findings

  • Superior Performance: BotDGT consistently outperformed state-of-the-art static models (e.g., BotRGCN) and feature-based methods. It achieved an accuracy of 87.25% on TwiBot-20 and 79.33% on TwiBot-22.
  • High Recall: The model showed a significant jump in Recall, reaching 94.24% on TwiBot-20. This indicates a superior ability to identify disguised bots that static models often miss.
  • Optimal Granularity: Experiments revealed a "sweet spot" at 12-month intervals. Finer granularity introduced noise, while coarser granularity missed subtle behavioral shifts.
  • Historical Significance: Visualization of attention weights showed that the model often prioritizes historical snapshots from before 2015, effectively looking back at a bot's origin before it adopted more sophisticated modern camouflage.

Conclusion

By shifting the detection paradigm from static snapshots to dynamic trajectories, BotDGT effectively unmasks sophisticated social bots. The integration of structural and temporal modeling proves that historical context is a vital asset in the ongoing effort to preserve the integrity of online social networks. Future work will focus on optimizing computational complexity to scale the framework for real-time social media streams.

Summary updated

BibTeX
@inproceedings{he2024dynamicity,
  author = {Buyun He and Yingguang Yang and Qi Wu and Hao Liu and Renyu Yang and Hao Peng and Xiang Wang and Yong Liao and Pengyuan Zhou},
  title = {{Dynamicity-aware Social Bot Detection with Dynamic Graph Transformers}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=TZ8gNsfUW7},
}
Figure