Abstract
Social media platforms such as Instagram and Twitter have emerged as critical channels for drug marketing and illegal sale. Detecting and labeling online illicit drug trafficking activities becomes important in addressing this issue. However, the effectiveness of conventional supervised learning methods in detecting drug trafficking heavily relies on having access to substantial amounts of labeled data, while data annotation is time-consuming and resource-intensive. Furthermore, these models often face challenges in accurately identifying trafficking activities when drug dealers use deceptive language and euphemisms to avoid detection. To overcome this limitation, we conduct the first systematic study on leveraging large language models (LLMs), such as ChatGPT, to detect illicit drug trafficking activities on social media. We propose an analytical framework to compose knowledge-informed prompts, which serve as the interface that humans can interact with and use LLMs to perform the detection task. Additionally, we design a Monte Carlo dropout based prompt optimization method to further to improve performance and interpretability. Our experimental findings demonstrate that the proposed framework outperforms other baseline language models in terms of drug trafficking detection accuracy, showing a remarkable improvement of nearly 12%. By integrating prior knowledge and the proposed prompts, ChatGPT can effectively identify and label drug trafficking activities on social networks, even in the presence of deceptive language and euphemisms used by drug dealers to evade detection.
Introduction
As social media platforms have evolved into primary communication hubs, they have also inadvertently become marketplaces for illegal activities, most notably illicit drug trafficking. Platforms like Instagram and Twitter are frequently exploited by dealers who utilize the reach and anonymity of these networks to market controlled substances. Detecting these activities is a persistent "cat-and-mouse" game where traditional automated filters often fall short.
Conventional supervised learning models, such as BERT and RoBERTa, have been the standard for text classification. However, they face two significant hurdles in this domain:
- Data Scarcity: These models require vast amounts of hand-labeled data to achieve high accuracy, a process that is both expensive and slow.
- Evasive Language: Drug dealers are highly adaptive, employing code words, emojis, and character substitutions (e.g., "CΘKE" or "SHRΘΘMS") to bypass keyword-based detection systems.
This research explores the potential of Large Language Models (LLMs), specifically ChatGPT, to overcome these challenges by leveraging their inherent "world knowledge" through a specialized prompting framework.
Methodology: Knowledge-Prompted ChatGPT
The core of this study is the development of a framework that transforms ChatGPT from a general-purpose assistant into a specialized domain analyst. This is achieved through Knowledge-Informed Prompting, where the model is provided with a structured context consisting of three primary components:
- Knowledge ($K$): A combination of expert-defined domain knowledge (such as known drug hashtags, contact patterns like WhatsApp/Wickr handles, and symbols) and "acquired knowledge" extracted from the LLM itself via few-shot examples.
- Question ($Q$): Precise instructions directing the model to analyze the text for specific trafficking indicators.
- Original Text ($x$): The raw social media post being evaluated.
Monte Carlo Dropout-based Prompt Optimization
To further refine the model's performance, the researchers introduced a novel optimization technique based on Monte Carlo (MC) dropout. While typically used to estimate uncertainty in neural networks, here it was adapted to evaluate the importance of specific words within the prompt. By iteratively "dropping out" words and measuring the impact on the F1 score, the system identifies "Positive Words" that aid detection (e.g., "delivery," "discreet") and "Negative Words" that act as noise. This pruning process ensures the prompt remains highly focused and effective.
Experimental Setup and Results
The framework was tested using the IDDIG (Instagram Drug Dealers and Groups) dataset, which contains 886 real-world samples from Instagram (486 positive for trafficking, 400 negative). The data is characterized by messy text, obfuscated contact information, and heavy hashtag usage.
Performance Comparison
The Knowledge-Prompted ChatGPT framework significantly outperformed traditional supervised learning baselines:
- Accuracy: The proposed framework achieved 94.58%, a nearly 12% improvement over RoBERTa (82.78%) and BERT (76.23%).
- Precision: It reached 96.60%, a critical metric for minimizing false positives in law enforcement and moderation contexts.
- F1 Score: The final optimized model achieved 94.98%.
Notably, the model demonstrated extreme efficiency in low-data environments. It reached peak performance with only 40 labeled examples, whereas traditional models typically require thousands of samples to reach comparable levels of robustness.
Discussion and Future Directions
The success of this framework highlights that prompting should be viewed as a form of reasoning rather than simple querying. By providing a "mini-encyclopedia" of trafficking tactics within the prompt, the LLM performs in-context learning that mimics the analysis of a human expert.
However, several areas for future research remain:
- Knowledge Freshness: As drug slang evolves rapidly, the static knowledge base must be updated dynamically to maintain detection efficacy.
- Multi-modal Analysis: Drug trafficking on Instagram is inherently visual. Future iterations should incorporate multi-modal LLMs (such as GPT-4V) to analyze images and videos alongside text.
- Cross-Platform Generalizability: While this study focused on Instagram, the framework needs to be validated on other platforms like Telegram and X (formerly Twitter) to ensure broad utility for public safety.
Conclusion
By integrating domain-specific knowledge with the reasoning capabilities of Large Language Models, this research provides a powerful new tool for enhancing online security. The ability to detect deceptive and euphemistic language with high precision and minimal labeled data marks a significant advancement in the fight against digital drug trafficking.
Summary updated