wildclean / README.md
ricalanis's picture
card: maintenance section, scorer version pin (edda8b3, NaN-fix 34e5c63), RAI/datasheet fields + contamination probe
b9a92e0 verified
|
Raw
History Blame Contribute Delete
14.4 kB
---
pretty_name: WildClean
license: other
license_name: multiple
license_link: "https://huggingface.co/datasets/ricalanis/wildclean#licensing--attribution-per-subset"
task_categories:
- other
language:
- en
tags:
- data-cleaning
- tabular
- benchmark
- error-correction
- data-quality
size_categories:
- 100K<n<1M
configs:
- config_name: pairs-hospital-dirty
data_files: pairs/hospital/dirty.csv
- config_name: pairs-hospital-clean
data_files: pairs/hospital/clean.csv
---
# WildClean
**WildClean** is a tabular *cleaning* benchmark with **damage** and **silent-edit** accounting — to our knowledge the first cleaning benchmark whose protocol charges systems for the clean cells they corrupt and for unattributed edits, not only for the errors they fix (a verified gap in the existing error-detection/repair benchmark literature, where recall-style scoring rewards over-correction).
It packages three complementary suites plus the entity vocabularies used by the reference system:
1. **Paired repair benchmark — 42 dirty/clean table pairs** (`pairs/` + `loaders.py`). Cell-aligned real-error and injected-error pairs spanning health, beverages, travel, citations, entertainment, open-government, and web-table entity domains. 33 pairs are redistributed here; the remaining 9 (unlicensed / research-only origins) are materialized locally by `loaders.py` from their original sources.
2. **Wild behavioral suite — 35 real-world tables, no gold required** (results in `results/wild_bench.json`; tables fetched by the repo). Audits what a shipped pipeline *does*: plan schema validity, cells changed, review flags (abstentions), PII flagging, silent-edit attribution, runtime — plus seeded inject-recovery on each table's own content.
3. **Clean-lake trust audit — N=239 GitTables tables** (`gittables250/`, 250 pairs shipped; 239 pass the load/shape gate and are scored). Real heterogeneous GitHub tables with injected typos: the at-scale test that a cleaner stays schema-valid, attributes every edit, and does not damage clean data it was never tuned on.
The release also ships `vocabs/` — 10 permissively-licensed entity-alias vocabularies (cities, companies, drugs, airports, jobs, research orgs, nicknames, music artists, web-table entities) harvested for grounded canonicalization, and `results/` — the frozen result JSONs behind the headline numbers.
## The protocol (precise definitions)
All three suites share one scoring contract, implemented in `eval/run_real_multi.py::score()` and `eval/wild_bench.py::behavioral()` of the companion repo. Cell comparison is *convention-normalized*: two values are **sem-equal** if they are numerically equal within tolerance OR equal after strip+casefold (`Birmingham` == `birmingham`), so systems are judged on restoring the right *value*, not a surface convention.
For each cell with dirty value `d`, gold value `g`, output value `o`:
- **error**: `d ≠ g` (a benchmark error). **changed**: `o ≠ d` (the system acted).
- **Churn-neutrality**: a change where `o` is sem-equal to the *input* `d` but does not exactly restore `g` (pure case/whitespace churn) counts as **nothing** — not a change, not a fix, not damage. Without this rule, bulk convention-rewrites of clean columns inflate precision.
- **fixed**: an error cell where the output exactly restores gold, or is sem-equal to gold *and* the system actually acted (an error left untouched is never a fix, even if sem-equal to gold).
- **Repair recall** = fixed / errors. **Repair precision** = good changes (changed ∧ sem-equal to gold) / all changes. **Repair F1** = their harmonic mean. Row-count-changing table ops are stripped before scoring so the output stays row-aligned with the reference (cell-level metric).
- **DAMAGE rate** = (clean cells the system changed to something *not* sem-equal to gold) / (all clean cells). This is the over-correction charge: a cleaner that "fixes" by bulldozing valid values pays for it explicitly.
- **SILENT-EDIT accounting** (behavioral audit): after applying the plan, every column whose values differ from the input must be attributable to a logged operation in the execution log (`changed_columns − logged_columns = silent edits`). A trustworthy cleaner reports **0** silent-edit columns — every diff cell traces to a declared op.
The wild suite additionally reports an **abstention** slice (trap values that must be left untouched vs. real typos that must be fixed) and per-error-type inject-recovery (typo / OCR / case / whitespace).
## Contents
```
pairs/<name>/{dirty.csv,clean.csv} 33 redistributable cell-aligned pairs
loaders.py downloads the other 9 pairs from their origins
gittables250/t{000..249}_{dirty,clean}.csv clean-lake trust-audit split
vocabs/*.jsonl 10 entity-alias vocabularies (one JSON object per line)
results/*.json frozen benchmark results (see headline numbers)
```
The 9 pairs materialized by `loaders.py` (not redistributed — no license or research-only at origin): `ed2_restaurants`, `cleanml_company`, `cleanml_movie`, `fodors_zagats`, `dblp_acm`, `dblp_scholar`, `gidcl_imdb`, `zeroed_billionaire`, `zeroed_tax100k`.
```bash
pip install pandas
python loaders.py # materializes all 9 into ./pairs/ → full 42-pair bench
```
## Licensing & attribution (per subset)
This dataset aggregates sources under different licenses; `license: other` at the top reflects that. Each subset below keeps its own license. **You must preserve attribution for the CC-BY components.**
### Benchmark pairs (`pairs/`)
| Subset | Dirs | Source | License | Attribution |
|---|---|---|---|---|
| Raha suite | `hospital`, `beers`, `flights`, `rayyan`, `movies_1` | [BigDaMa/raha](https://github.com/BigDaMa/raha) datasets | Apache-2.0 | Mahdavi et al., *Raha: A Configuration-Free Error Detection System* (SIGMOD 2019) |
| ToughTables | `tt_*` (8 dirs) | [ToughTables](https://zenodo.org/record/4246370) (SemTab 2T) | CC-BY-4.0 | Cutrona et al., *Tough Tables: Carefully Evaluating Entity Linking for Tabular Data* (ISWC 2020) — **attribution required** |
| DGov typos | `dgov_*` (20 dirs) | [LUH-DBS/Matelda](https://github.com/LUH-DBS/Matelda) `DGov_Typo` (real data.gov tables + injected typos) | Apache-2.0 | Matelda (LUH-DBS) |
### Clean-lake audit (`gittables250/`)
| Subset | Source | License | Attribution |
|---|---|---|---|
| GitTables-250 | [LUH-DBS/Matelda](https://github.com/LUH-DBS/Matelda) GitTables subsets (real GitHub tables + injected typos) | Apache-2.0 | Matelda (LUH-DBS); GitTables corpus: Hulsebos et al. |
### Vocabularies (`vocabs/`)
| File | Source | License |
|---|---|---|
| `toughtables_aliases.jsonl`, `toughtables_ref.jsonl` | ToughTables / SemTab 2T | CC-BY-4.0 (**attribution required**: Cutrona et al.) |
| `musicbrainz_hint_aliases.jsonl` | MusicBrainz database (core data) | CC0-1.0 |
| `rxnorm_aliases.jsonl` | RxNorm (U.S. National Library of Medicine) | US public domain (no UMLS-restricted content) |
| `openflights_airports.jsonl` | OpenFlights airports database | ODbL 1.0 / DbCL 1.0 |
| `nickname_aliases.jsonl` | name-nickname lookup (carltonnorthern/nicknames) | Apache-2.0 |
| `onet_jobtitle_aliases.jsonl` | O*NET (U.S. Dept. of Labor) | CC-BY-4.0 (**attribution required**: O*NET Resource Center) |
| `wikidata_company_aliases.jsonl` | Wikidata | CC0-1.0 |
| `geonames_city_aliases.jsonl` | GeoNames | CC-BY-4.0 (**attribution required**: geonames.org) |
| `ror_aliases.jsonl` | Research Organization Registry (ROR) | CC0-1.0 |
### Not redistributed (fetch via `loaders.py`)
| Subset | Origin | Status |
|---|---|---|
| `ed2_restaurants` | [BigDaMa/ExampleDrivenErrorDetection](https://github.com/BigDaMa/ExampleDrivenErrorDetection) | no license stated |
| `cleanml_company`, `cleanml_movie` | CleanML 2020 datasets | research use; redistribution unclear |
| `fodors_zagats`, `dblp_acm`, `dblp_scholar` | Magellan/DeepMatcher EM benchmarks (UW-Madison) | redistribution terms unclear |
| `gidcl_imdb` | SICS-FRC GIDCL | no license stated |
| `zeroed_billionaire`, `zeroed_tax100k` | WelkinNi/ZeroED | no license stated |
Two harvested vocabularies were additionally **excluded** from this release on license grounds: libpostal-derived aliases (license unclear for the extracted artifact) and CleanML-derived pairs (research-only origin). The `v6_paired_big.jsonl` training corpus is excluded because it is derived from mixed (including non-redistributable) sources.
## How to evaluate
Evaluation harnesses live in the companion repo ([ricalanis/scrubdata-hackathon](https://github.com/ricalanis/scrubdata-hackathon)); pairs are read from `data/real/<name>/{dirty,clean}.csv` (same layout as `pairs/`):
```bash
git clone https://github.com/ricalanis/scrubdata-hackathon && cd scrubdata-hackathon
# place pairs/* under data/real/ and gittables250/* under data/gittables250/
uv run python -m eval.paired_bench # 42-pair scorecard -> results/paired_bench.json
uv run python -m eval.wild_bench # wild behavioral suite -> results/wild_bench.json
uv run python -m eval.gittables_audit # N=239 clean-lake trust audit
uv run python -m eval.run_real_multi # north-star suite vs OpenRefine baselines
uv run python -m eval.radar_bench # RADAR artifact-type slice
```
To benchmark your own cleaner, implement `planner(df) -> plan` (or just produce a cleaned dataframe) and score it with `eval.run_real_multi.score(dirty, clean, cleaned)` — the function defines the entire metric contract above in ~40 lines.
**Scorer version:** the scoring contract (`eval/run_real_multi.py::score()` + `eval/metrics.py`) is pinned at companion-repo commit `edda8b3fa8b4eed9808bed546c0cd0eb405f651e`. One known scorer fix since the first frozen results: 3 cells in 1.79M held the literal string `Nan` (a first name), which parses to float NaN and compared unequal to itself; fixed in `eval/metrics.py` (commit `34e5c63`) with a regression test. Frozen JSONs produced before that fix differ from regenerated ones by less than 1e-4.
## Headline numbers (reference system, frozen in `results/`)
Reference system = the shipped deterministic grounded pipeline + fine-tuned Qwen3-4B planner of the ScrubData project (see paper). From `results/`:
- **Paired bench (42 pairs, `paired_bench.json`)**: macro repair F1 **0.343**, precision **0.576**, recall **0.308**, damage **0.023**; on the 35 never-trained-on pairs: F1 0.363, damage 0.022.
- **Wild suite (35 datasets, `wild_bench.json`)**: **35/35** valid plans, **0** datasets with silent edits, mean inject-recovery F1 0.207 (over the 34 injectable tables).
- **Clean-lake audit (`gittables_audit.json`)**: **239/239** valid plans, **0/239** tables with silent edits, 0 pipeline failures, macro damage 0.055.
- **Calibrated abstention gate (`union_gate_3seed.json`)**: selective prediction at τ=0.5 reaches precision **0.891 ± 0.012** at coverage **0.396 ± 0.025** (3 training seeds; best seed 0.905 @ 0.413).
- **Generalization curve (`generalization_*.json`)**: per-checkpoint held-out-source scores (flights, rayyan, ed2_restaurants) across the training roadmap.
- **RADAR slice (`radar_bench.json`)**: per-artifact-type F1/damage on RADAR-style artifacts — included for transparency: the deterministic pipeline scores 0 F1 there with low damage, i.e. it abstains rather than guesses.
## Intended use, sensitive information, and limitations
- **Intended use:** evaluating and benchmarking tabular data-cleaning / error-repair systems under the damage- and silent-edit-aware protocol above, and grounded canonicalization research using the entity-alias vocabularies. Not intended as a source of facts about the entities named in the tables, nor as training data for production PII systems.
- **Sensitive information:** all tables are public/open data (published benchmarks, data.gov tables, GitHub tables, open registries). PII-bearing benchmark columns (e.g., names, addresses, phone numbers in the hospital and restaurant tables) are synthetic or drawn from public records as published by the upstream benchmarks; no private data was collected for this release.
- **Limitations — legacy-public contamination:** long-published benchmark tables sit inside LLM pretraining corpora, so LLM-based cleaner scores on the legacy pairs may partly reflect memorization rather than cleaning skill. A verbatim-completion probe ([`results/contamination_probe.json`](results/contamination_probe.json); 30 rows, 5 given columns, 4 asked columns, exact-substring match) measured **25%** verbatim cell recall (30/120) on `hospital` (Raha, long public) vs **0%** (0/120) on a post-knowledge-cutoff wild-harvest table. The wild behavioral suite and the clean-lake audit are the mitigations: they use post-cutoff or low-prominence real tables and gold-free behavioral checks.
## Maintenance
- **Maintainer:** Ricardo Alanis ([@ricalanis](https://huggingface.co/ricalanis)).
- **Issue channel:** the [Discussions tab](https://huggingface.co/datasets/ricalanis/wildclean/discussions) of this dataset.
- **Versioning policy:** releases are marked with git tags on this dataset repo; frozen result JSONs in `results/` are never edited in place (regenerated results are added alongside, with the producing commit noted). The scorer is pinned by companion-repo commit hash (see *Scorer version* above); any change to the metric contract bumps the pinned hash and is noted here.
## Links
- **Repo (eval harnesses, training, paper source):** https://github.com/ricalanis/scrubdata-hackathon
- **Demo Space:** https://huggingface.co/spaces/build-small-hackathon/scrubdata
- **Models:** [ricalanis/scrubdata-qwen3-4b](https://huggingface.co/ricalanis/scrubdata-qwen3-4b) · [ricalanis/scrubdata-qwen3-4b-v6-q8](https://huggingface.co/ricalanis/scrubdata-qwen3-4b-v6-q8)
## Citation
```bibtex
@misc{alanis2026scrubdata,
title = {Small Fine-Tuned Planners with Execution-Verified Data and
Calibrated Abstention for Tabular Canonicalization},
author = {Alanis, Ricardo},
year = {2026},
note = {WildClean benchmark release},
url = {https://github.com/ricalanis/scrubdata-hackathon}
}
```
Please also cite the upstream sources you use (Raha, ToughTables, Matelda/GitTables, GeoNames, O*NET, MusicBrainz, Wikidata, ROR, OpenFlights, RxNorm) per the attribution table above.