Elamur Research
☰
home / papers / 2020 / CCNet: Extracting High Quality Monolingual Datasets from Web Crawl Data

CCNet: Extracting High Quality Monolingual Datasets from Web Crawl Data

Written for the Research library (claude-opus-5-5) from the paper text. Original — aclanthology.org/2020.lrec-1.494.pdf

Summary

Pretrained language models improve as their training corpora grow, but only if data quality is maintained. Curated sources such as Wikipedia are small for many languages, especially low-resource ones. The authors present CCNet, an open-source pipeline that converts raw Common Crawl snapshots (WET text) into large monolingual corpora and keeps whole documents intact. The pipeline has three stages:

  1. It removes duplicated paragraphs using hashes of normalized text.
  2. It assigns each document a language with the fastText identifier.
  3. It scores each document by its perplexity under a 5-gram Kneser-Ney model (KenLM, with a SentencePiece tokenizer) trained on Wikipedia. Each language is then split into head, middle and tail thirds.

Deduplicating before language identification strips English boilerplate and recovers many documents in smaller languages. On the February 2019 snapshot, the pipeline produced roughly 1.5 billion documents in 174 languages. Models trained on the low-perplexity portion outperform Wikipedia-trained counterparts. fastText embeddings improve steadily from tail to head, and BERT-BASE improves on XNLI, with the largest gain for Urdu. This makes web-scale pretraining practical for languages without big curated corpora.

Key points

  • The Feb. 2019 snapshot (about 24TB of text, 1600 shards of 5GB) yielded about 1.5B documents in 174 languages. English alone contributes about 700M filtered documents, or 532B tokens, around 120 times the BERT training data. Processing takes about 8.5 hours per snapshot on 5000 CPU cores.
  • Duplicated paragraphs make up about 70% of the text. Paragraphs are hashed with the first 64 bits of SHA-1. Comparing hashes across 50 shards was chosen as a practical trade-off, needing about 40GB of RAM.
  • Language identification uses the fastText classifier, which covers 176 languages and discards pages with a top score of 0.5 or lower. Running deduplication first noticeably increases document counts for low-resource languages. Ukrainian (uk) appears among the 25 largest languages in the reported statistics.
  • SentencePiece and KenLM models trained on Wikipedia were released for 48 languages. The release also includes code to train custom filters and a tool that rebuilds the dataset from URL lists. Everything is available at github.com/facebookresearch/cc_net.
  • In evaluation, English fastText analogy accuracy rose from 62.0 (tail) to 77.9 (head). BERT-BASE XNLI dev accuracy averaged 75.9 with CommonCrawl data versus 72.6 with Wikipedia data. For Urdu, accuracy rose from 57.3 to 64.3.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Fields: Natural language processing

Cited by

416 papers of our library cite it (of the 140673 whose bibliographies we read); 35 of them have a page here, 381 not yet.

Cite

The paper itself, not this page. BibTeX from the library's record of the work. arXiv 1911.00359

@inproceedings{wenzek2020ccnet,
  title = {{CCNet: Extracting High Quality Monolingual Datasets from Web Crawl Data}},
  author = {Wenzek, Guillaume and Lachaux, Marie-Anne and Conneau, Alexis and Chaudhary, Vishrav and Guzmán, Francisco and Joulin, Armand and Grave, Edouard},
  booktitle = {Proceedings of the Twelfth Language Resources and Evaluation Conference},
  year = {2020},
  eprint = {1911.00359},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.00359}
}

References

21 references, 5 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Baevski, A., Edunov, S., Liu, Y., Zettlemoyer, L., and Auli, M. (2019). Cloze-driven pretraining of self-attention networks. arXiv preprint arXiv:1903.07785. find
  2. Buck, C., Heafield, K., and Van Ooyen, B. (2014). Ngram counts and language models from the common crawl. In LREC, volume 2, page 4. find
  3. Citeseer. Conneau, A., Rinott, R., Lample, G., Williams, A., Bowman, S. R., Schwenk, H., and Stoyanov, V. (2018). Xnli: Evaluating cross-lingual sentence representations. In Proc. find
  4. EMNLP. Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. (2018). Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805. find
  5. Grave, E., Bojanowski, P., Gupta, P., Joulin, A., and Mikolov, T. (2018). Learning word vectors for 157 languages. arXiv preprint arXiv:1802.06893. find our card
  6. Heafield, K. (2011). KenLM: faster and smaller language model queries. In Proceedings of the EMNLP 2011 Sixth Workshop on Statistical Machine Translation. find our card
  7. Joulin, A., Grave, E., Bojanowski, P., Douze, M., Jégou, H., and Mikolov, T. (2016a). Fasttext.zip: Compressing text classification models. arXiv preprint arXiv:1612.03651. find our card
  8. Joulin, A., Grave, E., Bojanowski, P., and Mikolov, T. (2016b). Bag of tricks for efficient text classification. arXiv preprint arXiv:1607.01759. find
  9. Kudo, T. (2018). Subword regularization: Improving neural network translation models with multiple subword candidates. arXiv preprint arXiv:1804.10959. find
  10. Lample, G. and Conneau, A. (2019). Cross-lingual language model pretraining. arXiv preprint arXiv:1901.07291. find
  11. Lan, Z., Chen, M., Goodman, S., Gimpel, K., Sharma, P., and Soricut, R. (2019). Albert: A lite bert for self-supervised learning of language representations. arXiv preprint arXiv:1909.11942. find
  12. Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., and Stoyanov, V. (2019). Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692. find
  13. Mikolov, T., Sutskever, I., Chen, K., Corrado, G. S., and Dean, J. (2013). Distributed representations of words and phrases and their compositionality. In Adv. find
  14. NIPS. Mikolov, T., Grave, E., Bojanowski, P., Puhrsch, C., and Joulin, A. (2017). Advances in pre-training distributed word representations. arXiv preprint arXiv:1712.09405. find our card
  15. Ortiz Suárez, P. J., Sagot, B., and Romary, L. (2019). Asynchronous pipeline for processing huge corpora on medium to low resource infrastructures. find
  16. CMLC. Pennington, J., Socher, R., and Manning, C. (2014). Glove: Global vectors for word representation. In Proc. find
  17. EMNLP. Peters, M. E., Neumann, M., Iyyer, M., Gardner, M., Clark, C., Lee, K., and Zettlemoyer, L. (2018). Deep contextualized word representations. arXiv preprint arXiv:1802.05365. find
  18. Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., and Sutskever, I. (2019). Language models are unsupervised multitask learners. OpenAI Blog, 1(8). find
  19. Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., and Liu, P. J. (2019). Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv preprint arXiv:1910.10683. find
  20. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. (2017). Attention is all you need. In Adv. find
  21. NIPS. Yang, Z., Dai, Z., Yang, Y., Carbonell, J., Salakhutdinov, R., and Le, Q. V. (2019). Xlnet: Generalized autoregressive pretraining for language understanding. arXiv preprint arXiv:1906.08237. find our card