Contextual Semantic Classification of Trafficking-Related Advertisements Using DistilBERT
Bakhita Salman, Muneeb Yassin, Jose Leonidez · Information · 2026
Detecting trafficking-related indicators in online advertisements remains a challenging natural language processing task due to ambiguous language, repetitive templates, and evolving euphemistic expressions. This study presents a lightweight transformer-based framework for identifying potential trafficking-related risk indicators in publicly accessible online advertisements using contextual semantic classification and leakage-aware evaluation. The framework combines standardized text preprocessing, duplicate filtering, semantic group-aware dataset partitioning, and DistilBERT-based classification to improve detection reliability while reducing semantic leakage between dataset subsets. The dataset consists of 3000 curated online advertisements collected from escort and service-related platforms, labeled using trafficking-related linguistic indicators derived from prior research, public trafficking typologies, and domain-informed annotation guidelines. On the held-out test set, the framework achieves an accuracy of 88.7% and a macro F1-score of 0.8338 under leakage-aware evaluation conditions, with PR-AUC and ROC-AUC of 0.984 and 0.993, respectively. Same-dataset baseline experiments using TF-IDF logistic regression and TF-IDF SVM classifiers show that while these feature-based models attain higher macro F1-scores on the curated dataset, the proposed framework achieves higher overall accuracy and substantially stronger threshold-independent ranking (ROC-AUC), indicating more reliable probabilistic discrimination across decision thresholds in a recall-sensitive setting. The reported PR-AUC and ROC-AUC values are interpreted as upper-bound estimates within the present evaluation setting, as residual dataset-specific regularities may persist despite leakage-aware partitioning. The framework is computationally efficient, suitable for deployment in resource-constrained environments, and designed as a human-in-the-loop decision-support system rather than an autonomous enforcement tool. Overall, lightweight transformer architectures provide a scalable and operationally realistic approach for identifying trafficking-related risk indicators in online advertisements under leakage-aware evaluation conditions.