cc-re-2021 / README.md
G-reen's picture
Remove 248 rows overlapping rounaksaha12/ai-det-test-human-refined
66b6c22 verified
|
Raw History Blame Contribute Delete
19.7 kB
---
license: odc-by
language:
- en
task_categories:
- text-classification
tags:
- common-crawl
- web
- human-written
- pre-chatgpt
- llm-detection
- ai-text-detection
- machine-generated-text-detection
pretty_name: cc-re-2021
size_categories:
- 100K<n<1M
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
---
# cc-re-2021: pre-ChatGPT human-written English web text
**499,752 documents** of clean English, overwhelmingly human-written web text,
extracted from the 9 CommonCrawl
crawls of **2021**, globally deduplicated within the year (and sharing no
identical document with the sister year), annotated with
[WebOrganizer](https://arxiv.org/abs/2502.10341) topic × format labels, and
selected so the per-format and per-topic row totals are each as uniform as the
eligible pool allows (water-filled marginal targets + exact LP; scarce labels
contribute their entire pool — see `reports/selection_report.json`
`achieved_marginals` for the realized totals).
This corpus is the **"human" class for training and evaluating LLM-text
detectors**. Two properties make it suitable:
1. **Temporal purity.** Every page was crawled in 2021 — before the release of
ChatGPT (Nov 2022) and before large-scale LLM text existed on the public web —
which rules out *chatbot-era* AI contamination by crawl date. Pre-LLM machine
text (synonym-spinner spam, raw machine translation, template/doorway pages)
does exist on the 2021 web; after remediation a manual audit measures its
residual at **~5% of rows** (95% CI 0.7–9.3; see Known limitations).
2. **No LLM in the loop.** No LLM ever generated, rewrote, paraphrased, or
summarized any text in this dataset. Models are used *read-only*: language ID,
fastText quality scoring, and topic/format classification. The `text` bytes
are what [trafilatura](https://trafilatura.readthedocs.io/) extracted from
the original 2021 HTML, post-processed only by (a) FineWeb's standard
heuristic filters (the C4 rules also drop boilerplate lines — cookie/policy
notices, javascript mentions, sub-3-word lines — and strip bracketed
citation markers, exactly as in FineWeb), and (b) a deterministic,
removal-only line scrubber for page furniture (cookie banners, share
widgets, bylines/postmeta, breadcrumbs, pagination, footer notices — 18
documented rules, no model involved; `boiler_lines_removed` records the
per-row count, ~5.6% of rows touched, ~0.06% of characters). No masking or
any other rewriting is applied. Some navigation/UI residue still survives
in a minority of rows — deterministic scrubbing is precision-first, not
exhaustive.
Sister dataset: the corresponding corpus for the other pilot year at
[`G-reen/cc-re-2020`](https://huggingface.co/datasets/G-reen/cc-re-2020) /
[`G-reen/cc-re-2021`](https://huggingface.co/datasets/G-reen/cc-re-2021).
## Pipeline
The pipeline composes the published recipes of FineWeb, GneissWeb,
Ultra-FineWeb, and WebOrganizer (extraction → filtering → dedup → annotation →
balanced selection). Full source code: the `ccre` pipeline repo (see
`reports/pipeline_config.yaml` in this repo for the exact configuration used).
1. **Manifest** — enumerate the year's CommonCrawl dumps; sample WARC files
uniformly across crawls and segments (seeded, reproducible).
2. **Extraction + heuristic filtering** (exact FineWeb stage-A recipe, via
[datatrove](https://github.com/huggingface/datatrove)):
WARC records (not WET) → UT1 adult/URL blocklist → trafilatura
(`favour_precision=True`, no comments) → fastText **lid.176 English ≥ 0.65**
→ Gopher repetition filter → Gopher quality filter → C4 filters (without the
terminal-punctuation line rule) → FineWeb quality filters.
3. **Cheap junk fences** (from GneissWeb, applied as lenient floors):
extreme-tokenized-document filter `0.1 < tokens/char < 0.5`
(catches mixed-script leakage, encoded junk, and permutation spam that
language ID misses); McAlpine-EFLAW readability is stored as **metadata
only** — never used as a filter, to preserve register diversity.
4. **Quality floors, not ceilings** (Ultra-FineWeb + DCLM): every document is
scored by the [Ultra-FineWeb-en fastText classifier](https://huggingface.co/openbmb/Ultra-FineWeb-classifier)
(with its exact DeepSeek-V2-token preprocessing) and the
[DCLM fastText](https://huggingface.co/mlfoundations/fasttext-oh-eli5).
Keep rule: `dclm_score ≥ 0.002` (GneissWeb's permissive floor); the UFW score is recorded as metadata only (no UFW floor is applied — a UFW gate would skew the corpus toward educational text). These thresholds are
deliberately permissive **floors**: the goal is diverse, representative human
writing, not FineWeb-edu-style "educational" ceilings that would collapse the
register distribution a detector must learn.
5. **Global per-year MinHash deduplication** (datatrove 4-stage MinHash:
signatures → buckets → clusters → filter), sha1 64-bit,
14 buckets × 8 hashes over word
5-grams (≈ 0.72 Jaccard threshold),
across **all** of the year's crawls (unlike FineWeb's per-dump dedup —
uniqueness matters more than benchmark-optimal mixing for detector data).
Duplicate-cluster sizes are retained as metadata.
6. **Topic × format annotation** ([WebOrganizer](https://arxiv.org/abs/2502.10341)):
the URL-aware `TopicClassifier` and `FormatClassifier` (24 labels each,
gte-base-en-v1.5 backbone, max_length 512) label every
document; softmax confidences are stored.
7. **Marginal-uniform selection** — the per-FORMAT and per-TOPIC row totals are
equalized as far as pool supply allows: water-filled marginal targets per
axis (labels whose entire eligible pool is below the common level contribute
everything they have; all other labels get an equal share), reconciled at
the topic × format cell level by an exact LP (HiGHS) minimizing total L1
deviation from both axes' targets subject to per-cell pool capacities, down
to 500,000 rows; within-cell choice is `random`
(seeded). Achieved marginals ship in `reports/selection_report.json`
(`achieved_marginals`). Note the marginals are as-uniform-as-feasible, not
exactly uniform: scarce labels are supply-limited, and residual joint
infeasibility (a label's supply concentrated in saturated labels of the
other axis) is split across axes by the LP.
Before allocation, eligibility filters exclude non-prose and corrupted
rows: dropped topics ['Adult'], dropped formats ['Truncated', 'Content Listing', 'Structured Data'],
`language_score >= 0.925`, and `tokens_per_char` in
[0.13, 0.3]. Formats in {'Spam / Ads': 0.01} are
deterministically downsampled to the given keep-fraction (the `Spam / Ads`
label was measured ~96% machine-generated junk in a manual audit; a 1%
remnant is retained deliberately). Cross-year hygiene: rows whose exact text
appears in the other published cc-re year are excluded per
`cross_year_exclude` ({2021: 2020}), so the two years share no
identical documents and can serve as leakage-free train/val splits.
Seeded and reproducible; see `reports/selection_report.json` for the full
funnel, filter exclusion counts, and per-cell counts.
## Test-set decontamination
On 2026-09-19, 248 of the 500,000 selected rows were removed because they overlap the
held-out human benchmark
[`rounaksaha12/ai-det-test-human-refined`](https://huggingface.co/datasets/rounaksaha12/ai-det-test-human-refined)
(1,689 FineWeb documents, 2013–2020 crawls), leaving **499,752 rows**. Every row was compared
with both the benchmark's `text_refined` and `text_original` on distinct word 8-grams of the
lowercased, NFKC-normalised `\w+` token stream, and removed if any of:
- its URL equals a benchmark URL (scheme, `www.`, fragment and trailing slash ignored);
- it shares **≥ 25 distinct 8-grams** with a single benchmark document (a verbatim passage of ~32+ words);
- **≥ 5%** of its 8-grams occur in a single benchmark document, or ≥ 5% of a benchmark document's 8-grams occur in it.
This is deliberately much stricter than near-duplicate detection: besides re-crawled copies
of benchmark pages it removes pages that only share a template, a long quoted passage
(scripture, statutes, licences) or a site-wide footer with a benchmark document. After
removal, no remaining row shares more than 24 8-grams or 5% containment with any benchmark
document. Removed rows, the rule that fired and the matched benchmark `doc_id` are listed in
`reports/test_decontamination_removed.csv`. The Pipeline description, the statistics below and the
other files under `reports/` describe the corpus as selected, before this removal
(a 0.050% change).
## Schema
| column | type | description |
|---|---|---|
| `boiler_lines_removed` | int32 | Lines removed by the deterministic page-furniture scrubber (0 = untouched) |
| `crawl` | string | CommonCrawl dump id, e.g. `CC-MAIN-2020-24` |
| `date` | string | Page fetch time (WARC-Date, ISO 8601) |
| `dclm_score` | float32 | DCLM fastText (`fasttext-oh-eli5`) `__label__hq` probability |
| `eflaw_readability` | — | |
| `format` | string | WebOrganizer format label (24-way) |
| `format_prob` | float32 | Format classifier softmax confidence |
| `id` | string | Stable unique id: `<crawl>/<warc-file#record>` |
| `language_score` | float32 | fastText lid.176 P(en); kept only if ≥ 0.65 |
| `n_emails` | int32 | Count of email addresses in `text` (FineWeb PII regex); text is NOT masked |
| `n_ips` | int32 | Count of public IPv4 addresses in `text` (FineWeb PII regex); text is NOT masked |
| `text` | string | Extracted clean text (trafilatura; never LLM-generated or rewritten) |
| `tokens_per_char` | float32 | GneissWeb extreme-token stat: tokens / chars (GPT-2) |
| `topic` | string | WebOrganizer topic label (24-way) |
| `topic_prob` | float32 | Topic classifier softmax confidence |
| `ufw_score` | float32 | Ultra-FineWeb-en fastText quality score (P(pos)) |
| `url` | string | Source page URL (WARC-Target-URI) |
| `word_count` | int32 | Whitespace word count |
## Statistics
### Overview
| Statistic | Value |
|---|---|
| Rows | 499,752 |
| Parquet shards | 1 |
| Total words | 389,643,384 |
| Total text characters | 2,278,657,811 |
| Crawls | 9 |
| Fetch-date range | 2021-01-15T13:41:43Z → 2021-12-09T09:04:59Z |
### Distributions
| Metric | Mean | Median | p5 | p95 | Min | Max |
|---|---|---|---|---|---|---|
| Words per document | 779.3 | 444 | 97 | 2,350 | 50 | 97,179 |
| Characters per document | 4,557 | 2,605 | 562 | 1.371e+04 | 224 | 543,799 |
| Ultra-FineWeb quality score | 0.151 | 0.02891 | 0.0003666 | 0.8197 | 0 | 1 |
### Rows per crawl
| Crawl | Rows | Share |
|---|---|---|
| CC-MAIN-2021-04 | 53,799 | 10.76% |
| CC-MAIN-2021-10 | 54,494 | 10.90% |
| CC-MAIN-2021-17 | 64,380 | 12.88% |
| CC-MAIN-2021-21 | 52,561 | 10.51% |
| CC-MAIN-2021-25 | 48,741 | 9.75% |
| CC-MAIN-2021-31 | 61,034 | 12.21% |
| CC-MAIN-2021-39 | 53,974 | 10.79% |
| CC-MAIN-2021-43 | 62,652 | 12.53% |
| CC-MAIN-2021-49 | 48,365 | 9.67% |
### Topics
| Topic | Rows | Share |
|---|---|---|
| Sports & Fitness | 21,788 | 4.36% |
| Travel | 21,777 | 4.36% |
| Health | 21,773 | 4.35% |
| Entertainment | 21,771 | 4.35% |
| Crime & Law | 21,761 | 4.35% |
| Food & Dining | 21,746 | 4.35% |
| Industrial | 21,745 | 4.35% |
| Social Life | 21,744 | 4.35% |
| Games | 21,744 | 4.35% |
| Religion | 21,740 | 4.35% |
| Fashion & Beauty | 21,739 | 4.35% |
| History | 21,737 | 4.35% |
| Home & Hobbies | 21,736 | 4.35% |
| Hardware | 21,736 | 4.35% |
| Science & Tech. | 21,733 | 4.35% |
| Education & Jobs | 21,732 | 4.35% |
| Literature | 21,726 | 4.35% |
| Finance & Business | 21,725 | 4.34% |
| Art & Design | 21,724 | 4.34% |
| Transportation | 21,720 | 4.34% |
| Politics | 21,719 | 4.34% |
| Software Dev. | 21,698 | 4.34% |
| Software | 21,686 | 4.34% |
### Formats
| Format | Rows | Share |
|---|---|---|
| Listicle | 28,832 | 5.77% |
| Personal Blog | 28,814 | 5.76% |
| Audio Transcript | 28,811 | 5.76% |
| Tutorial | 28,801 | 5.76% |
| News Article | 28,795 | 5.76% |
| Nonfiction Writing | 28,794 | 5.76% |
| About (Org.) | 28,789 | 5.76% |
| News (Org.) | 28,777 | 5.76% |
| Academic Writing | 28,769 | 5.75% |
| Product Page | 28,768 | 5.75% |
| Creative Writing | 28,767 | 5.75% |
| Knowledge Article | 28,756 | 5.75% |
| User Review | 28,738 | 5.75% |
| Comment Section | 28,689 | 5.74% |
| About (Pers.) | 26,970 | 5.39% |
| Customer Support | 21,590 | 4.32% |
| Q&A Forum | 20,971 | 4.19% |
| FAQ | 15,652 | 3.13% |
| Legal Notices | 8,876 | 1.78% |
| Documentation | 2,537 | 0.51% |
| Spam / Ads | 504 | 0.10% |
### Topic × format cells
Non-empty cells: **349** (of 24 × 24 = 576 possible). Largest cell: Literature × Creative Writing (15,772 rows); smallest non-empty cell: Software Dev. × Spam / Ads (1 rows).
Top 30 cells:
| Topic | Format | Rows |
|---|---|---|
| Literature | Creative Writing | 15,772 |
| Food & Dining | Tutorial | 9,815 |
| Industrial | Product Page | 9,683 |
| Entertainment | User Review | 9,258 |
| Art & Design | Product Page | 8,943 |
| Travel | Personal Blog | 8,889 |
| Politics | News (Org.) | 8,465 |
| Science & Tech. | Nonfiction Writing | 8,221 |
| Home & Hobbies | Listicle | 8,141 |
| Crime & Law | Knowledge Article | 7,743 |
| Science & Tech. | Academic Writing | 6,977 |
| Education & Jobs | About (Org.) | 6,641 |
| Games | Comment Section | 6,371 |
| Fashion & Beauty | Personal Blog | 6,162 |
| Sports & Fitness | News Article | 5,850 |
| History | Knowledge Article | 5,749 |
| Politics | Audio Transcript | 5,624 |
| Software Dev. | Personal Blog | 5,543 |
| Hardware | Product Page | 5,497 |
| Travel | Listicle | 5,426 |
| Social Life | Nonfiction Writing | 5,415 |
| History | Nonfiction Writing | 5,365 |
| Hardware | News Article | 5,235 |
| Transportation | Comment Section | 5,074 |
| Software | Tutorial | 5,045 |
| Religion | Knowledge Article | 4,861 |
| Games | Personal Blog | 4,827 |
| Hardware | Comment Section | 4,506 |
| Education & Jobs | About (Pers.) | 4,337 |
| Finance & Business | Customer Support | 4,215 |
## Known limitations (measured, from manual audits)
Rates from hand-read random samples (n=100–120) and full-corpus scans; details in
`reports/audit_post_remediation.md`:
| Limitation | Measured rate | Note |
|---|---|---|
| Pre-LLM machine text (spinners, raw MT, doorway/template pages) | ~5% of rows (CI 0.7–9.3) | not concentrated in any filterable label |
| Content-farm / SEO filler (human-typed, formulaic) | ~11% | possible home of undetectable pre-2022 neural text |
| Page-furniture residue (bylines, widgets, notices) | ~1 in 4 rows has some | scrubber is precision-first, not exhaustive |
| Extraction damage (pipe residue, dropped lists, merged words) | 2.8% / ~9% / ~10% | inherent to HTML→text; not remediable without re-extraction |
| Scraped/republished third-party content | ~12% | `url`/`date` are not reliable provenance for these |
| Scrubber over-removal (real lines lost) | ~0.1% of rows | rows with `boiler_lines_removed >= 2` are the risk set |
| Low-confidence format labels | `format_prob < 0.5` on ~10% | filter on `format_prob` before conditioning on `format` |
Also note: `word_count` and all scores (`language_score`, `ufw_score`,
`dclm_score`, `tokens_per_char`, `eflaw_readability`) were computed on the
**pre-scrub** text; rows with `boiler_lines_removed > 0` (~5.5%) are slightly
shorter than `word_count` claims.
## Provenance, limitations, and bias
- **Source**: [CommonCrawl](https://commoncrawl.org) 2021 crawls, fetched from
`https://data.commoncrawl.org`. Use of the underlying data is subject to the
[CommonCrawl Terms of Use](https://commoncrawl.org/terms-of-use).
- **Extraction bias**: text is trafilatura-extracted with
`favour_precision=True`; most boilerplate, navigation, and comments are
removed (extraction + C4 line rules + the deterministic scrubber), but a
minority of rows retain some page-furniture residue, and extraction can
damage formatting (lost lists, table→pipe residue). Detectors trained on this
corpus should compare against AI text formatted the same way (plain extracted
text, no HTML).
- **Selection bias**: English only (lid.176 ≥ 0.65), quality
floors as above, and topic × format rebalancing — the corpus is *not* a
natural sample of the 2021 web. Cells that are near-empty on the real web
(e.g. Adult × Academic Writing) remain small; see the cell table above and
`reports/selection_report.json`.
- **Residual contamination**: pre-ChatGPT does not mean zero machine text —
2021 web pages can contain template-generated, machine-translated, or
spun/SEO text. The quality floors and junk fences remove most of it, but no
guarantee is absolute.
- **Content warning**: despite URL blocklists and quality filtering, web text
may contain offensive, inaccurate, or otherwise objectionable content, and
may mention personal data present on public 2021 web pages.
- **PII is deliberately NOT masked.** This corpus exists to train detectors
that distinguish human from AI text; masking emails/IPs with stock
replacement strings (as FineWeb does) would inject an "anonymization
artifact" that appears only in the human class — a spurious, learnable
shortcut — and would make the text something no human actually wrote. The
text is redistributed exactly as it appeared on the public 2021 web (as in
CommonCrawl itself). Per-row `n_emails` and `n_ips` columns count
FineWeb-definition PII hits (email regex; public IPv4) so downstream users
can filter or apply their own masking if their use case requires it.
- **Takedown**: to report content (including personal data) for removal, open a
discussion on this repo.
## License
The curation code and this compilation are released under
[ODC-By 1.0](https://opendatacommons.org/licenses/by/1-0/) (like FineWeb); use
of the underlying content remains subject to the
[CommonCrawl Terms of Use](https://commoncrawl.org/terms-of-use).
## Citations
This dataset composes methods from the following works — please cite them when
using it:
```bibtex
@inproceedings{penedo2024fineweb,
title = {The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scale},
author = {Penedo, Guilherme and Kydl{\'i}{\v{c}}ek, Hynek and Ben allal, Loubna and Lozhkov, Anton and Mitchell, Margaret and Raffel, Colin and Von Werra, Leandro and Wolf, Thomas},
booktitle = {NeurIPS Datasets and Benchmarks},
year = {2024},
url = {https://arxiv.org/abs/2406.17557}
}
@article{wang2025ultrafineweb,
title = {Ultra-FineWeb: Efficient Data Filtering and Verification for High-Quality LLM Training Data},
author = {Wang, Yudong and Sun, Zixuan and others},
journal = {arXiv preprint arXiv:2505.05427},
year = {2025},
url = {https://arxiv.org/abs/2505.05427}
}
@article{gneissweb2025,
title = {GneissWeb: Preparing High Quality Data for LLMs at Scale},
author = {Gohari, Hajar Emami and Kadhe, Swanand Ravindra and others},
journal = {arXiv preprint arXiv:2502.14907},
year = {2025},
url = {https://arxiv.org/abs/2502.14907}
}
@inproceedings{wettig2025weborganizer,
title = {Organize the Web: Constructing Domains Enhances Pre-Training Data Curation},
author = {Wettig, Alexander and Lo, Kyle and Min, Sewon and Hajishirzi, Hannaneh and Chen, Danqi and Soldaini, Luca},
booktitle = {ICML},
year = {2025},
url = {https://arxiv.org/abs/2502.10341}
}
```
Built with [datatrove](https://github.com/huggingface/datatrove). Data from
[CommonCrawl](https://commoncrawl.org). Published 2026-08-31.