mlsanityData to 7 Oct 2026

Perplexed by Quality: A Perplexity-based Method for Adult and Harmful Content Detection in Multilingual Heterogeneous Web Data

arXiv 2212.10440 ↗First posted 20 Dec 2022cs.CLcited by 22

On the map: LLM safety and security → Safety alignment, refusal and guardrails

Abstract (arXiv)

As demand for large corpora increases with the size of current state-of-the-art language models, using web data as the main part of the pre-training corpus for these models has become a ubiquitous practice. This, in turn, has introduced an important challenge for NLP practitioners, as they are now confronted with the task of developing highly optimized models and pipelines for pre-processing large quantities of textual data, which implies, effectively classifying and filtering multilingual, heterogeneous and noisy data, at web scale. One of the main components of this pre-processing step for the pre-training corpora of large language models, is the removal of adult and harmful content. In this paper we explore different methods for detecting adult and harmful of content in multilingual heterogeneous web data. We first show how traditional methods in harmful content detection, that seemingly perform quite well in small and specialized datasets quickly break down when confronted with heterogeneous noisy web data. We then resort to using a perplexity based approach but with a twist: Instead of using a so-called "clean" corpus to train a small language model and then use perplexity so select the documents with low perplexity, i.e., the documents that resemble this so-called "clean" corpus the most. We train solely with adult and harmful textual data, and then select the documents having a perplexity value above a given threshold. This approach will virtually cluster our documents into two distinct groups, which will greatly facilitate the choice of the threshold for the perplexity and will also allow us to obtain higher precision than with the traditional classification methods for detecting adult and harmful content.

Key facts. Cited by 22 papers in the map (data through 7 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 19 of its 27 references that are in the map. First posted on arXiv 20 Dec 2022.

Builds on

19 of 27 references.

References · 19

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  5. 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
  6. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  7. 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,968
  8. 2016Bag of Tricks for Efficient Text Classificationcited by 869
  9. 2019CCNet: Extracting High Quality Monolingual Datasets from Web Crawl Datacited by 544
  10. 2020HateXplain: A Benchmark Dataset for Explainable Hate Speech Detectioncited by 403
  11. 2021Quality at a Glance: An Audit of Web-Crawled Multilingual Datasetscited by 241
  12. 2017Advances in Pre-Training Distributed Word Representationscited by 207
7 more
  1. 2022Towards a Cleaner Document-Oriented Multilingual Crawled Corpuscited by 143
  2. 2020A Monolingual Approach to Contextualized Word Embeddings for Mid-Resource Languagescited by 131
  3. 2022Deep Learning for Hate Speech Detection: A Comparative Studycited by 13
  4. 2022Detecting Harmful Online Conversational Content towards LGBTQIA+ Individualscited by 8
  5. 2022Hate Speech Classification Using SVM and Naive BAYEScited by 3
  6. 2022Finding Pareto Trade-offs in Fair and Accurate Detection of Toxic Speechcited by 3
  7. 2022Exploring Hate Speech Detection with HateXplain and BERTcited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 4; 2024: 7; 2025: 9; 2026: 2.

22 papers.

Sort:

By area:

  1. 2023LLMDet: A Third Party Large Language Models Generated Text Detection Toolcited by 44
  2. 2024Multi-Task Contrastive Learning for 8192-Token Bilingual Text Embeddingscited by 20
  3. 2024Data Contamination Report from the 2024 CONDA Shared Taskcited by 19
  4. 2024An Empirical Study on Cross-lingual Vocabulary Adaptation for Efficient Language Model Inferencecited by 18
  5. 2024On Catastrophic Inheritance of Large Foundation Modelscited by 15
  6. 2025Towards Safer Pretraining: Analyzing and Filtering Harmful Content in Webscale datasets for Responsible LLMscited by 8
  7. 2025Guardians and Offenders: A Survey on Harmful Content Generation and Safety Mitigation of LLMcited by 8
  8. 2024CodeShell Technical Reportcited by 6
  9. 2026FBS: Modeling Native Parallel Reading inside a Transformercited by 6
  10. 2024Symmetric Dot-Product Attention for Efficient Training of BERT Language Modelscited by 5
  11. 2025Swift Cross-Dataset Pruning: Enhancing Fine-Tuning Efficiency in Natural Language Understandingcited by 4
  12. 2025GeistBERT: Breathing Life into German NLPcited by 4
10 more
  1. 2025REIS: A High-Performance and Energy-Efficient Retrieval System with In-Storage Processingcited by 4
  2. 2025SindBERT, the Sailor: Charting the Seas of Turkish NLPcited by 4
  3. 2025Beyond Length: Quantifying Long-Range Information for Long-Context LLM Pretraining Datacited by 4
  4. 2023Oasis: Data Curation and Assessment System for Pretraining of Large Language Modelscited by 3
  5. 2023Toxic language detection: a systematic review of Arabic datasetscited by 3
  6. 2023Efficient Transformer Knowledge Distillation: A Performance Reviewcited by 2
  7. 2025CMHG: A Dataset and Benchmark for Headline Generation of Minority Languages in Chinacited by 2
  8. 2026PortBERT: Navigating the Depths of Portuguese Language Modelscited by 2
  9. 2024Data Processing for the OpenGPT-X Model Familycited by 0
  10. 2025Multilingual Encoder Knows more than You Realize: Shared Weights Pretraining for Extremely Low-Resource Languagescited by 0