Datasets:
|
Download README.md from onlyaady/FinGuard-Privacy-Benchmark: direct link, hf CLI and curl.
- Browser
- Download file 8.78 kB
-
https://huggingface.co/datasets/onlyaady/FinGuard-Privacy-Benchmark/resolve/main/README.md
- Command line
-
hf download hf://datasets/onlyaady/FinGuard-Privacy-Benchmark/README.md
-
curl -L -o README.md https://huggingface.co/datasets/onlyaady/FinGuard-Privacy-Benchmark/resolve/main/README.md
8.78 kB
| license: cc-by-4.0 | |
| language: | |
| - en | |
| pretty_name: FinGuard-Privacy-Benchmark | |
| size_categories: | |
| - 1K<n<10K | |
| task_categories: | |
| - text-classification | |
| tags: | |
| - membership-inference | |
| - privacy | |
| - synthetic | |
| - banking | |
| - intent-classification | |
| - LiRA | |
| configs: | |
| - config_name: default | |
| default: true | |
| data_files: | |
| - split: train | |
| path: data/train.parquet | |
| - split: test | |
| path: data/test.parquet | |
| - config_name: full | |
| data_files: | |
| - split: train | |
| path: full/dataset_v2.parquet | |
| - config_name: seeds | |
| data_files: | |
| - split: train | |
| path: seeds/seeds_audited.parquet | |
| # FinGuard-Privacy-Benchmark | |
| A synthetic, privacy-flavoured **banking customer-support intent dataset** built to benchmark | |
| **membership inference attacks (MIA)** such as LiRA against fine-tuned text classifiers. | |
| - **9,120 messages, 57 intents, exactly 160 per intent.** | |
| - **Clean labels.** Every row was independently re-labelled by a secondary LLM; only rows where it agreed with the intended intent are kept. No label noise was injected on purpose. | |
| - **Fake personal details in ~35% of rows** (names, cities, amounts, dates, reference numbers, card digits, merchants). Everything is generated with Faker / an RNG. No real personal data. | |
| - **Messy, realistic text**: typos, slang, fragments, run-ons, plus a mix of clean rows. | |
| - **Pre-defined 1/3 – 2/3 split** for the MIA protocol: the *train* split (3,023 rows) is what a target model is trained on; the *test* split (6,097 rows) is held out and is the pool from which shadow models draw their random halves. | |
| ## Why this dataset exists | |
| MIA need a text-classification set that (1) is privacy-relevant, (2) has clean labels, and (3) is **provably absent from the pretraining data** of the model being attacked. Banking77 is the natural candidate but has been public since 2020 and is likely inside the pretraining corpora of modern encoders such as ModernBERT (whose pretraining data is undisclosed). So instead of using Banking77 directly we use it only as *grounding*, and train/attack on **freshly generated text**. | |
| ## How it was built | |
| 1. **Seed pool.** Banking77 (PolyAI, CC BY 4.0), train + test pooled: 13,083 utterances. | |
| 2. **Duplicate audit.** Strict normalisation (NFKC, casefold, alphanumerics only, so "top-up" = "top up") removes 68 rows in total, including three texts that appeared with conflicting labels (dropped entirely). An independent re-check against a second mirror (`mteb/banking77`) matched. Result: 13,015 unique seeds. | |
| 3. **Label-noise audit of the seeds.** Three independent detectors (cleanlab confident learning on MiniLM embeddings; logistic regression on bge-small embeddings; kNN voting), plus a model-free check for near-identical texts with different labels. 209 seeds (1.6%) are flagged by at least 2 of 3 detectors. Most flagged rows are genuinely ambiguous intent pairs (e.g. `top_up_reverted` vs `top_up_failed`), not typos. See `seeds/seeds_audited.parquet`. | |
| 4. **Clean pool and intent pruning.** Rows flagged by any detector or in a conflicting near-duplicate pair were dropped (13,015 → 12,360). Noise was concentrated in confusable intent families (transfers, top-ups, card delivery, identity verification, exchange rates), so 20 hub intents of the confusion graph were dropped, leaving 8,971 real rows over **57 intents** (`in_clean_pool=True` in the seeds file). These real rows are used only as few-shot examples for generation and as a held-out real-text check, and are **not** in the dataset. | |
| Dropped intents: `balance_not_updated_after_bank_transfer`, `topping_up_by_card`, `card_payment_fee_charged`, `supported_cards_and_currencies`, `transfer_not_received_by_recipient`, `card_arrival`, `card_payment_wrong_exchange_rate`, `card_payment_not_recognised`, `verify_my_identity`, `reverted_card_payment?`, `beneficiary_not_allowed`, `balance_not_updated_after_cheque_or_cash_deposit`, `declined_cash_withdrawal`, `exchange_via_app`, `order_physical_card`, `compromised_card`, `top_up_by_bank_transfer_charge`, `top_up_failed`, `get_disposable_virtual_card`, `getting_spare_card`. | |
| 5. **Generation.** `deepseek-flash` (DeepSeek-V4.1-Flash), reasoning off, few-shot with 6 real examples of the target intent, plus the names and one example of the 2 most confusable neighbouring intents as "do not write these". Two passes: a clean-style pass (~11k candidates) and a deliberately messy pass (~5k candidates). The model writes personal details only as placeholders (`{NAME}`, `{AMOUNT}`, `{CITY}`, `{DATE}`, `{REF}`, `{LAST4}`, `{MERCHANT}`). | |
| 6. **Post-processing.** 25% of the clean-pass rows get light typo/slang/punctuation perturbation; PII placeholders are injected (safe patterns only: name greeting, reference number, city, date) until ~32% of rows have some; placeholders are filled with fresh Faker/RNG values. | |
| 7. **Verification.** `deepseek-v4-pro` classifies every candidate among the 57 intents; a row survives only if it picks the intended one. Agreement on the 16,217 candidates: 99.0% (clean 99.5%, LLM-messy 99.6%, perturbed 96.5%). Calibration: the same verifier scores **93.2% on 400 held-out real Banking77 rows**, i.e. real text is much more ambiguous than the synthetic text. | |
| 8. **Deduplication and balancing.** Exact and near-duplicate (bge-small cosine ≥ 0.96 within an intent) removal, removal of anything ≥ 0.97 similar to any real Banking77 row, removal of degenerate generations (> 100 words), then balancing to 160 rows per intent (up to 64 messy-LLM rows per intent first, so the mix is ~40% messy). | |
| 9. **Split.** Stratified 1/3 train, 2/3 test per intent. Clusters of near-duplicates (cosine ≥ 0.95) are kept on the same side, so no near-duplicate pair crosses the split. | |
| All generation and verification code is in `scripts/` (API keys are read from the environment, none are stored here). | |
| ## Data fields | |
| `default` config (`train`, `test`): | |
| | field | type | description | | |
| |---|---|---| | |
| | `text` | string | the customer message, with fake personal details filled in | | |
| | `text_template` | string | same message with `{PLACEHOLDER}` slots, as generated | | |
| | `intent` | string | intent name (57 classes) | | |
| | `label` | int | integer id of the intent (sorted alphabetically, ASCII order) | | |
| | `has_pii` | bool | message contains fake personal details | | |
| | `pii_types` | list[string] | any of `name, amount, location, date, reference, card_digits, merchant` | | |
| | `noise_type` | string | `clean`, `perturbed` (programmatic typos) or `llm_noisy` (messy LLM pass) | | |
| `full` config: the same rows in one file with an extra `split` column (`train` / `test`). | |
| `seeds` config: the 13,015 deduplicated real Banking77 rows with the detector flags (`suspect_cleanlab`, `suspect_lr_bge`, `suspect_knn_bge`, `votes`, `suspect_consensus`, `in_clean_pool`), included to document the grounding. | |
| ## Statistics | |
| | | | | |
| |---|---| | |
| | rows | 9,120 (train 3,023 / test 6,097) | | |
| | intents | 57 × 160 rows | | |
| | `noise_type` | clean 4,043 · llm_noisy 3,637 · perturbed 1,440 | | |
| | rows with fake PII | 34.7% | | |
| | words per message | mean 16.3, median 14, p10 6, p90 31, max 80 | | |
| | bge-small + logistic regression, 5-fold CV accuracy | 97.8% (real Banking77 is about 93%) | | |
| ## Intended use | |
| Benchmarking membership inference attacks (LOSS, LiRA offline/online, etc.) and their ablations (number of shadow models, over/under-fitting, signal choice) on fine-tuned text classifiers, and studying how memorisation depends on personal-detail content and text noise. | |
| ## Limitations and caveats | |
| - **Same-family bias.** The generator and the verifier are both DeepSeek models, so shared stylistic and semantic biases can pass verification. | |
| - **Synthetic messiness ≠ real messiness.** Typos and slang are LLM- or rule-generated; some injected personal details read slightly oddly (e.g. a city name in a sentence that does not need one). | |
| - **Clean labels by design.** Label-noise/mislabelled-record analyses can only use the real seed file, not this dataset. | |
| - **Not a privacy guarantee.** All personal details are fake, but generated text may resemble real messages. Do not treat the data as a source of real customer behaviour. | |
| - **Pretraining contamination.** The messages were generated in September 2026 and cannot appear in the pretraining data of models released before that (e.g. ModernBERT, BERT, RoBERTa). Once this dataset is public, models trained afterwards may see it; use models that predate the release when you need the non-contamination property. | |
| ## Licence and attribution | |
| CC BY 4.0. The seed rows in `seeds/` and the few-shot grounding come from **Banking77** (Casanueva et al., 2020, *Efficient Intent Detection with Dual Sentence Encoders*), released under CC BY 4.0. Synthetic text was produced with DeepSeek models; check the provider's terms for downstream use of generated outputs. |