LLM -Empowered Class Imbalanced Graph Prompt Learning for Online Drug Trafficking Detection (2025)

Abstract: As the market for illicit drugs remains extremely profitable, major online platforms have become direct-to-consumer intermediaries for illicit drug trafficking participants. These online activities raise significant social concerns that require immediate actions. Existing approaches to combat this challenge are generally impractical due to the scarcity of labeled samples and imbalance of classes in real-world applications. To this end, we propose a novel \textbf{L} arge \textbf{L} anguage M odel-empowered \textbf{Het} erogeneous \textbf{G} raph Prompt Learning framework for illicit \textbf{D} rug \textbf{T} rafficking detection, called \textbf{LLM-HetGDT} that leverages LLM to facilitate heterogeneous graph neural networks (HGNNs) to effectively identify minority classes, i.e., drug trafficking participants, in the class-imbalanced scenarios. Specifically, we first pre-train HGNN over a contrastive pretext task to capture the inherent node and structure information over an unlabeled drug trafficking heterogeneous graph (HG). Afterward, to alleviate the class-imbalanced issue, we leverage LLMs to augment the HG by generating high-quality synthetic user nodes in the minority classes. Then, we fine-tune the soft prompts on the augmented HG to capture the important information in the minority classes for the downstream drug trafficking detection task. To comprehensively study online illicit drug trafficking activities, we collect a new HG dataset over Twitter, called Twitter-HetDrug. Extensive experiments on this dataset demonstrate the effectiveness, efficiency, and applicability of our proposed method by comparing it with state-of-the-art baseline methods. Our source code is available at https://github.com/GraphResearcher/LLM-HetGDT.

## introduction as the market for illicit drugs (e.g., methamphetamine and heroin) remains immensely profitable, the crime of drug trafficking has continually evolved with modern technologies, e.g., online platforms. recent studies @xcite , 2023; @xcite have demonstrated that the major online platforms, e.g., twitter/x, facebook, and instagram, have become direct-to-consumer intermediaries for illicit drug trafficking. as depicted in figure 1 (b), illicit drug trafficking participants can effortlessly create accounts on these platforms to promote their products through drug-related posts and quickly attract other abnormal users to share or trade drugs on social media platforms. consequently, these drug-related behaviors among users naturally form drug trafficking networks on social media platforms, and these illegal drug-related activities have turned into a societal concern due to their catastrophic consequences, from violent crimes to public health (e.g., over 107,941 drug overdose deaths occurred in 2022 in the u.s. (centers for disease control and prevention, 2023)). to combat illicit drug trafficking online, there is an imminent need to develop novel and effective techniques for detecting drug trafficking activities on social media. to address this challenge, existing studies can be categorized into two approaches: (i) large language models (llms)-based frameworks @xcite @xcite and (ii) graph-based methods @xcite @xcite @xcite . however, these two approaches still face limitations, such as class-imbalanced and label-scarcity issues. on one hand, llm-based methods may struggle to efficiently identify drug trafficking activities on social networks because of the latency limitation. this inefficiency is exacerbated due to the classimbalanced issue. specifically, as illustrated in figure 1 (a), merely four out of twenty users are involved in drug trafficking activities, and llmbased methods require a significant amount of time to identify drug trafficking participants among huge social networks, making it impractical in real-world applications. moreover, llm-based methods primarily utilize user-level information, such as user profiles and posts for drug trafficking detection, while ignoring the rich and complex relationship information, e.g., users following others and replying to posts, etc. for example, @xcite utilizes anchor posts to identify drug-related users on instagram, while ignoring contextual relationships between users. as shown in figure 1 (b), it is challenging to classify the users "ud***in" and "ux***ad" by analyzing their posts. however, by examining the rich contextual relationships between users, such as their replies to the known drug buyer "bn***id", we can successfully identify them as drug users. on the other hand, graphbased methods typically study drug trafficking in balanced data settings, which fail to consider inherent class-imbalanced issues, making it difficult for real-world scenarios. in addition, they require sufficient labeled samples for training, which is time and labor-intensive, and ignore the rich information in the unlabeled data. this naturally raises the following question: how can we design an effective and efficient framework to detect drug-related users on social networks? to this end, we design a novel large language model-enhanced heterogeneous graph prompt learning framework called llm-hetgdt for drug trafficking detection. specifically, we leverage heterogeneous graphs (hgs) to model the complex relationships among entities, i.e., users, posts, and keywords, and further introduce the "pre-train, prompt" paradigm over heterogeneous graph neural networks (hgnns) to comprehensively study drug trafficking activities on social media. in the pre-train stage, we train an hgnn for the contrastive pretext task to capture the rich structure information in unlabeled data. afterward, inspired by the success of llms in natural language understanding and synthetic data generation @xcite @xcite , we leverage llms to augment the original hg by generating synthetic user nodes in minority classes, i.e., drug trafficking participants, enabling the model to learn valuable information from drug trafficking participant nodes. we further fine-tune three types of prompts, i.e., node, structure, and drug trafficking prompts on the augmented hg to facilitate the pre-trained hgnns to learn the node representations for downstream tasks. to conclude, our work makes the following contributions: ## methodology in this section, we present the details of llm-hetgdt, which includes two key steps: (i) pretrain hgnn, and (ii) llms-enhanced prompt tuning for drug trafficking detection. mention that the original hg contains text-attributed features, and we leverage sentencebert @xcite to encode text attributes @xmath0. the overall framework is illustrated in fig. 2 . ## conclusion to handle the class-imbalanced and label-scarcity issues in existing illicit drug trafficking detection methods, we propose a novel llmenhanced heterogeneous graph prompt learning framework, called llm-hetgdt, to detect online drug trafficking participants in real-world scenarios. specifically, we leverage llms to augment the heterogeneous graph (hg) by generating synthetic nodes in minority class, i.e., drug trafficking participants, facilitating the heterogeneous graph neural networks (hgnns) to learn valuable information in minority class. to comprehensively study the drug trafficking activities on social media, we collect a new hg dataset over twitter, called twitter-hetdrug. extensive experiments on the dataset demonstrate the effectiveness, efficiency, and applicability of our framework. input: instruction: <the same instruction in