﻿# C4: understand the consequences of heuristic cleaning

Choose a C4 configuration deliberately, trace its cleaning rules and preserve URL-based validation boundaries for a useful pretraining baseline.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/data-guide-c4-filter-distribution/
Language: en

## Use C4 for the right baseline

C4 supplies unlabeled Common Crawl text for pretraining. The [T5 paper](https://arxiv.org/abs/1910.10683) studies it alongside model architecture, objectives and transfer procedures; C4 is not itself a question-answer benchmark. It is useful as a documented English baseline when a new preprocessing choice needs comparison with an established recipe. Keep the language-model objective separate from later supervised tasks when interpreting results.

## Name the configuration and builder

The [TensorFlow Datasets catalog](https://www.tensorflow.org/datasets/catalog/c4) lists the default English configuration, en.noclean, realnewslike, webtextlike and multilingual configurations. These select materially different data. The uncleaned variant disables cleaning, while the domain-oriented variants restrict the eligible web material. Record the configuration with builder version 3.1.0 where reproducing the catalog default. A directory called C4 without this information does not adequately identify the training distribution or its preprocessing.

## Preserve page-level features

Catalog records include text, url, timestamp, content-type and content-length as strings, with no supervised target keys. Retain URL and timestamp before turning pages into token sequences. The transport length metadata should not be mistaken for a computed token length of the final cleaned text. A tokenizer-specific count belongs in a derived field with its own definition. The [provenance guide](/journal/document-markdown-json-provenance/) explains how to retain this distinction when converting documents between formats.

## Inspect rules before explaining bias

The [official builder](https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/text/c4.py) normalizes URLs, selects pages, invokes cleaning and duplicate-text processing, detects language and applies configured blocklist filtering. It retains historical implementation choices for reproducibility. Those choices can change genres and vocabulary, so a proposed cleaning comparison should inspect rejected passages rather than assume that all removed text was useless. The en.noclean configuration changes several operations together; it is not automatically an isolated experiment on one filter.

## Maintain the validation meaning

The builder assigns training and validation through hashed URLs. Preserve that split when reproducing a result, then check related documents if a new evaluation requires stronger independence. The [document split guide](/journal/document-level-data-split-leakage/) explains why shared templates, mirrors or derivatives can survive URL separation. Validation likelihood on C4 measures fit to this processed distribution. It does not establish factual accuracy, broad language coverage, or the absence of copied evaluation text from the upstream web.
