Abstract
In the dynamic and rapidly evolving world of social media, detecting anomalous users has become a crucial task to address malicious activities such as misinformation and cyberbullying. As the increasing number of anomalous users improves the ability to mimic normal users and evade detection, existing methods only focusing on bot detection are ineffective in terms of capturing subtle distinctions between users. To address these challenges, we proposed SeGA, preference-aware self-contrastive learning for anomalous user detection, which leverages heterogeneous entities and their relations in the Twittersphere to detect anomalous users with different malicious strategies. SeGA utilizes the knowledge of large language models to summarize user preferences via posts. In addition, integrating user preferences with prompts as pseudo-labels for preference-aware self-contrastive learning enables the model to learn multifaceted aspects for describing the behaviors of users. Extensive experiments on the proposed TwBNT benchmark demonstrate that SeGA significantly outperforms the state-of-the-art methods (+3.5% ~ 27.6%) and empirically validate the effectiveness of the model design and pre-training strategies. Our code and data are publicly available at https://github.com/ying0409/SeGA.
Introduction
Social media platforms are increasingly plagued by anomalous users who spread misinformation or engage in cyberbullying. While researchers have become proficient at spotting automated bots, trolls—human-controlled accounts that intentionally mimic normal user behavior—present a much harder challenge. Because trolls are human, their network structures and basic activity levels often look indistinguishable from legitimate users. SeGA addresses this gap by capturing the subtle nuances of user intent and preference—the "what" and "how" of their posting behavior—to distinguish malicious actors from regular citizens.
Methods
The SeGA (Preference-Aware Self-Contrastive Learning with Graphs for Anomalous User Detection) framework operates in three main stages:
- Heterogeneous Information Network (HIN) Construction: SeGA builds an HIN that includes both users and "Lists" (curated account selections), capturing complex relationships like "following," "membership," and "ownership."
- LLM-Powered Preference Summarization: The model uses ChatGPT to analyze a user's recent tweets and summarize them into topic-emotion pairs (e.g., "news - anger").
- Preference-Aware Self-Contrastive Learning: The model creates a "pseudo-label" for each user based on their preference distribution. Using a contrastive loss function, the model is pre-trained to pull users with similar preference profiles closer together in the embedding space.
- Fine-Tuning: Finally, the model is fine-tuned on a labeled dataset to perform a three-way classification: Normal User, Bot, or Troll.
Results and Discussion
The authors introduced a new large-scale benchmark called TwBNT, extending the TwiBot-22 dataset by incorporating "troll scores" for human accounts. The resulting dataset contains 100,001 users and over 1.3 million edges representing diverse relationships.
SeGA demonstrated a significant performance leap over state-of-the-art (SOTA) baselines, achieving a Macro F1-score of 60.69, outperforming the best baseline (RGT) by 3.5%. Ablation studies confirmed that removing the "List" nodes or the LLM-based pre-training stage caused a noticeable drop in performance, proving that both structural information and preference-aware learning are vital. t-SNE visualizations show that SeGA creates much tighter, more distinct clusters for bots, trolls, and normal users compared to previous methods.
Conclusion
SeGA represents a major step forward in detecting sophisticated anomalous users by leveraging thematic gravity and emotional triggers. While the model currently relies on LLM API calls and static snapshots, future work will explore real-time deployment and temporal dynamics to identify "sleeper" accounts that evolve into malicious actors over time.
Summary updated