A Cost-Effective LLM-based Approach to Identify Wildlife Trafficking in Online Marketplaces
Juliana Barbosa, Ulhas Gondhali, Gohar Petrossian, Kinshuk Sharma, Sunandan Chakraborty, Jennifer Jacquet, Juliana Freire
TL;DR
Wildlife trafficking remains a critical global issue, exacerbated by online marketplaces that leave traces but pose challenges for data labeling. The paper introduces Learn to Sample (LTS), a cost-efficient framework that uses clustering and Thompson sampling to select diverse ads for few-shot LLM labeling, then trains specialized, lightweight classifiers on the resulting pseudo-labeled data. Across three real-use cases, LTS-produced models achieve high F1 scores (up to 0.95) at a fraction of the cost and with far fewer parameters than large foundation models, demonstrating strong performance and scalability. The approach enables researchers to study wildlife trade dynamics at scale, with open-source tooling and practical implications for conservation analytics and criminology, while highlighting avenues for prompt design, data management, and broader application to related illicit-content detection tasks.
Abstract
Wildlife trafficking remains a critical global issue, significantly impacting biodiversity, ecological stability, and public health. Despite efforts to combat this illicit trade, the rise of e-commerce platforms has made it easier to sell wildlife products, putting new pressure on wild populations of endangered and threatened species. The use of these platforms also opens a new opportunity: as criminals sell wildlife products online, they leave digital traces of their activity that can provide insights into trafficking activities as well as how they can be disrupted. The challenge lies in finding these traces. Online marketplaces publish ads for a plethora of products, and identifying ads for wildlife-related products is like finding a needle in a haystack. Learning classifiers can automate ad identification, but creating them requires costly, time-consuming data labeling that hinders support for diverse ads and research questions. This paper addresses a critical challenge in the data science pipeline for wildlife trafficking analytics: generating quality labeled data for classifiers that select relevant data. While large language models (LLMs) can directly label advertisements, doing so at scale is prohibitively expensive. We propose a cost-effective strategy that leverages LLMs to generate pseudo labels for a small sample of the data and uses these labels to create specialized classification models. Our novel method automatically gathers diverse and representative samples to be labeled while minimizing the labeling costs. Our experimental evaluation shows that our classifiers achieve up to 95% F1 score, outperforming LLMs at a lower cost. We present real use cases that demonstrate the effectiveness of our approach in enabling analyses of different aspects of wildlife trafficking.
