A Language Model-Driven Semi-Supervised Ensemble Framework for Illicit Market Detection Across Deep/Dark Web and Social Platforms

Navid Yazdanjue, Morteza Rakhshaninejad, Hossein Yazdanjouei, Mohammad Sadegh Khorshidi, Mikko S. Niemelä, Fang Chen, Amir H. GandomiarXiv 2025 · DOI

Introduction

Detecting the illegal trade of drugs, weapons, and stolen credentials has become increasingly difficult as illicit marketplaces migrate from the dark web to social platforms like Telegram, Reddit, and Pastebin. This shift introduces three primary challenges: extreme data scarcity for manual labeling, linguistic obfuscation through jargon and coded language, and structural complexity where critical evidence is often buried in long-form documents that exceed the 512-token limit of standard transformer models.

Examples of illicit marketplaces across various platforms, including drug markets on the Dark Web and Telegram, weapon markets, and credential markets.

Methodology

To address these hurdles, this research introduces a two-stage Semi-Supervised Ensemble (SSE) framework.

Feature Extraction and Long-Context Modeling

The framework utilizes ModernBERT, a transformer designed for long documents (up to 8192 tokens), fine-tuned on domain-specific illicit content. This allows the model to capture pricing information or crypto-addresses that would otherwise be truncated. These semantic embeddings are supplemented with manually engineered features, such as regex-based detection of Bitcoin addresses and IP addresses.

Entropy-Based Weighted Voting

The core of the detection system is a semi-supervised ensemble of XGBoost, Random Forest, and SVM. The authors implemented a novel entropy-based weighted voting mechanism that calculates the "Mean Entropy of Correct Predictions" (MEC) and "Mean Entropy of Wrong Predictions" (MEW) for each classifier. This allows the system to dynamically prioritize the most "confident" and "reliable" models during the self-training process, preventing the model from being poisoned by incorrect pseudo-labels.

Results and Key Insights

The framework demonstrated state-of-the-art performance across multiple benchmarks, including a new multi-source corpus of 21,575 samples and the DUTA/CoDA datasets.

  • High Accuracy: The model achieved an accuracy of 0.96489 and an F1-score of 0.93467, significantly outperforming specialized baselines like DarkBERT.
  • Robustness to Low Data: Even with only 25-50% of labeled data, the model maintained high reliability, proving its utility in environments where expert labels are scarce.
  • Contextual Superiority: The transition to an 8192-token capacity was critical; illicit posts often bury contact info or product lists deep in the text, which standard models fail to process.

Conclusion

By combining long-context language models with uncertainty-aware ensemble methods, this framework provides a scalable solution for monitoring illicit activities across the modern web. Future work will focus on expanding multi-lingual support and developing risk assessment modules to prioritize high-severity threats, such as heavy weaponry or major data breaches.

Summary updated

BibTeX
@misc{yazdanjue2025language,
  author = {Navid Yazdanjue and Morteza Rakhshaninejad and Hossein Yazdanjouei and Mohammad Sadegh Khorshidi and Mikko S. Niemelä and Fang Chen and Amir H. Gandomi},
  title = {{A Language Model-Driven Semi-Supervised Ensemble Framework for Illicit Market Detection Across Deep/Dark Web and Social Platforms}},
  year = {2025},
  eprint = {2507.22912},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.22912},
}
Figure