Abstract
Detecting illicit drug traffickers on social media is a critical yet challenging task due to severe class imbalance and the high cost of manual data labeling. This paper introduces LLM-HetGDT, a novel framework that combines the structural learning capabilities of Heterogeneous Graph Neural Networks (HGNNs) with the generative power of Large Language Models (LLMs). By synthesizing realistic drug-trafficking profiles to balance the dataset and employing a "pre-train and prompt" strategy, LLM-HetGDT achieves state-of-the-art performance on a newly curated Twitter dataset while maintaining the low latency required for real-world deployment.
Introduction: The Challenge of Online Drug Trafficking
Social media platforms have increasingly become hubs for illicit drug trade. Identifying participants in these networks is difficult because traffickers represent a tiny minority of users—a classic "needle in a haystack" problem. Traditional machine learning models often fail in these scenarios, biasing toward the majority benign class. Furthermore, while LLMs are adept at analyzing text, applying them to every user in a massive network is computationally prohibitive and ignores the vital relational context of social interactions.
LLM-HetGDT: A Novel Framework
To address these issues, we propose LLM-HetGDT (LLM-empowered Heterogeneous Graph Prompt Learning for Drug Trafficking detection). The framework operates in three primary stages:
- HGNN Pre-training: We construct a heterogeneous graph (HG) consisting of Users, Tweets, and Keywords. An HGNN is pre-trained using contrastive learning on unlabeled data to capture the structural and contextual nuances of the social network.
- LLM-Driven Graph Augmentation: To mitigate class imbalance, we utilize Llama 3.1 70B to generate synthetic drug-trafficker profiles. Unlike simple oversampling, the LLM creates semantically rich profiles and logically determines their connections within the existing graph, ensuring the synthetic data is both realistic and structurally integrated.
- Graph Prompt Tuning: We adapt the pre-trained model to the detection task using learnable prompts at the node, structure, and task levels. This "pre-train and prompt" paradigm allows the model to achieve high accuracy with minimal labeled data.
Experimental Setup and Dataset
We evaluated our framework on Twitter-HetDrug, a new real-world dataset collected between 2020 and 2021. The dataset reflects the natural imbalance of social networks, with only 11.9% of the 28,839 users identified as trafficking participants. The graph includes over 118,000 tweets and nearly 300 drug-related keywords, providing a complex environment for testing detection capabilities.
Performance and Efficiency
LLM-HetGDT significantly outperforms 21 baseline methods. With only 10% of the training data labeled, it achieved a Macro-F1 score of 70.52, surpassing the previous state-of-the-art graph prompt model.
Beyond accuracy, efficiency is paramount for live moderation. In deployment simulations, LLM-HetGDT processed detections in just 0.18 seconds per user. This is approximately 26 times faster than pure LLM-based detection methods, which averaged 4.72 seconds, demonstrating the practical viability of our graph-based approach.
Conclusion and Future Directions
LLM-HetGDT demonstrates that combining LLMs with graph neural networks effectively solves the class imbalance and latency issues inherent in online drug trafficking detection. Future work will explore the use of more advanced text encoders and even more powerful LLMs to further refine the quality of synthetic data and improve detection precision.
Summary updated