NagaYu/crowd-anonymity-sets
Crowd — anonymity-set sizes for attribute combinations Read this first This dataset describes nobody. Every row is generated from a probability model over attribute values built from published aggregate statistics. There is no person in it, no record to link, and no index that could be searched for an individual. The prose is synthetic. The label is a head-count, not an identity. Each row's target is log10(number of people in the reference population matching… See the full description on the dataset page: https://huggingface.co/datasets/NagaYu/crowd-anonymity-sets.
Crowd — anonymity-set sizes for attribute combinations
## Read this first This dataset describes nobody. Every row is generated from a probability model over attribute values built from published aggregate statistics. There is no person in it, no record to link, and no index that could be searched for an individual. The prose is synthetic. The label is a head-count, not an identity. Each row's target is log10(number of people in the reference population matching this combination of attributes). The dataset exists to train a model that says how many people a description could be, never which person it is. Counts are censored at a reporting floor of 5. Any combination matching fewer than five people is labelled "at most five" rather than with its exact value. A dataset that taught a model to distinguish "one person" from "two people" would be training a re-identification oracle. It does not support a claim of anonymity. Information usable for re-identification is unbounded in principle. Models trained here estimate and prioritise; they do not certify.What this is
Pairs of (natural-language description, exactly-computed anonymity-set size).
{
"text": "都内で四十代前半の男性が子どもの心臓を診る医師として働いている。この道15年。",
"evidence": {"region": "region:jp-13", "age": "age:40-44", "sex": "sex:male",
"occupation": "occupation:physician_pediatric_cardiac_surgery",
"experience": "experience:11-15"},
"log10_count": 1.52,
"log10_count_independent": -0.06,
"independence_error_log10": 1.58,
"log10_sigma": 0.46,
"below_floor": false,
"euphemism_fraction": 0.8,
"profile": "journalism",
"sampling": "rarity_tilted"
}The label is not annotated, crowdsourced or estimated. It is computed by exact belief propagation over a tree-structured log-linear model fitted to published marginals — see How the label is computed below.
Why it exists
Text anonymisation today offers two options. Delete every named entity, which is cheap and destroys the document. Or ask a large language model to rewrite it, which works and does not fit on a phone. Both skip the question that actually determines risk: how many people does this description fit?
Answering that needs supervision that did not exist: descriptions paired with their true anonymity-set size. This dataset is that supervision.
Fields
Splits
Splits are made on a hash of the attribute combination, not of the text. A random split would put "42歳の男性医師、東京" in train and "四十代前半の男性の医師、都内" in test, and the reported test error would be measuring paraphrase memorisation. Splitting on the combination means the test set contains crowds the model has never been told the size of.
euphemism_probe holds matched pairs: the same attribute combination rendered once plainly and once obliquely, sharing a pair_id. The difference in a model's prediction between the two halves is a direct measurement of register robustness with the confound held fixed.
How the label is computed
The reference population is a tree-structured log-linear model over ten attribute families:
p(x) ∝ Π_i φ_i(x_i) · Π_(i,j)∈E λ_ij(x_i, x_j), E a forestφ_iare fitted by iterative proportional fitting (raking) so that every one-way marginal of the model reproduces its published counterpart to 1e-7. This is the same construction statistical agencies use for disclosure control.λ_ijencode published two-way dependencies (a 22-year-old is not a consultant surgeon; nurses are overwhelmingly female on the register; foreign residents concentrate in three prefectures).- Because
Eis a forest, the partition function and every conditional count are computable exactly by one sum-product sweep. No sampling, no variational approximation. A count takes ~0.1 ms.
Ten families, with generalisation lattices: age (5-year bands → decades → coarse), sex, region (47 prefectures → 8 blocks → country), locality, occupation (6 levels deep, from 小児心臓外科医 up to 専門的・技術的職業), education, household, nationality, condition (including rare diseases), experience.
What the independence assumption costs
Every row carries independence_error_log10. Over the corpus the mean absolute error of the naive product-of-marginals assumption is 0.38 log10 (a factor of 2.4), and the worst case exceeds 13 orders of magnitude. Any tool that multiplies marginals is making an error of that size silently.
Sampling
Roughly 55% of rows are drawn from the natural population distribution and 45% are rarity-tilted: the long-tailed families (occupation, condition, region) are resampled uniformly over their leaves. Every row records which.
Why: sampling only from the population distribution produces a corpus whose median document already hides in a crowd of ~10⁶, where every masking decision is trivial. The tilted fraction fills the 10⁰–10⁴ range where the decisions actually happen. The label stays exact either way — the counting engine does not care how the combination was chosen — so this changes coverage, not correctness. Report natural-distribution and tail performance separately.
Resulting coverage (250k rows): every decade from 10⁰ to 10⁸ holds between 0.6k and 51k documents; 13.6% of rows sit at or below the reporting floor.
Registers
Every attribute is realised sometimes plainly and sometimes obliquely:
Predicate-form euphemisms (「持病がある」,「仕事をしていない」) appear as whole clauses with no noun for an entity tagger to latch onto — the hardest case, and the one a corpus of noun phrases would miss entirely.
Limitations — read before quoting a number
- The reference bundle is a research fixture. Its figures are transcribed from published Japanese statistics and tagged
published/approximate/derived/illustrativeper entry. Rows taggedapproximateare believed to match the published series but have not been re-verified against the primary table; interaction magnitudes taggedillustrativeare qualitative modelling choices, not measurements. Do not cite the absolute numbers. Re-runscripts/fetch_reference.pyagainst authoritative extracts (the e-Stat table ids are in the script) before using this for a real disclosure decision. - The text is synthetic and template-generated. Vocabulary and syntax are narrower than real clinical or legal prose. Use
TABor another real benchmark for span-level evaluation; this corpus is for the combination-risk task, which no span-annotated corpus supplies. - Closed-world extraction. The generator and the shipped extractor share the reference bundle's surface lists. Any round-trip accuracy measured on this corpus is a coverage measurement, not a robustness measurement. This is the main reason to train a model on the text rather than rely on the lexicon.
- One value per family. A person may hold several diagnoses; the model carries the most disclosive one. Multi-morbid descriptions are therefore over-estimated — Crowd will think the crowd is larger than it is.
- National, time-averaged marginals. No migration, no cohort effects, no sub-prefecture geography.
- Japan only. The lattices, the surfaces and the statistics are Japanese. The bundle format is general; another country needs its own.
- Sensitive attributes are present (
condition,nationality) because they are genuine quasi-identifiers and omitting them would understate risk. They appear only as aggregate distributions.
Links
- Code, evaluation and figures: github.com/NagaYu/crowd
- Model trained on this dataset: NagaYu/crowd-anon-0.1b
Reproduction
python scripts/fetch_reference.py # compile the reference bundle from published figures
python scripts/build_dataset.py --n 250000 --out data/buildFully deterministic given --seed. No network access required.
Citation
@misc{crowd2026,
title = {Crowd: estimating anonymity-set size from attribute combinations},
year = {2026},
note = {Dataset and model. Reference statistics compiled from Japanese
government publications under 政府標準利用規約(第2.0版).}
}Source attribution for the reference statistics is required by their licence and is listed in the bundle's provenance block: 総務省統計局『令和2年国勢調査』・ 『労働力調査』, 厚生労働省『医師・歯科医師・薬剤師統計』・『衛生行政報告例』, 日本弁護士連合会ほか各士業団体, 日本臓器移植ネットワーク, 出入国在留管理庁 『在留外国人統計』.
