CanFraudBench / README.md
CrillyPienaah's picture
Add CanFraudBench Track A dataset (LFS) and card
30bc4fb
|
Raw
History Blame Contribute Delete
6.47 kB
metadata
license: cc-by-4.0
task_categories:
  - tabular-classification
language:
  - en
tags:
  - fraud-detection
  - synthetic-identity
  - model-risk-management
  - osfi-e23
  - responsible-ai
  - canada
  - financial-services
pretty_name: CanFraudBench  Track A (Synthetic Identity)
size_categories:
  - 10K<n<100K

CanFraudBench — Track A (Synthetic Identity)

A public, reproducible benchmark for synthetic-identity fraud detection in a Canadian financial-onboarding context — where every metric maps to OSFI Guideline E-23 model-risk expectations.

This is the Track A (synthetic identity) dataset of CanFraudBench. The full benchmark, including the metrics library, the OSFI E-23 governance mapping, the Track B document/presentation-attack harness, the leaderboard, and reference baselines, lives in the code repository:

➡️ Code & full benchmark: https://github.com/CrillyPienaah/canfraudbench


Why this exists

OSFI Guideline E-23 (Model Risk Management) takes effect 1 May 2027 and applies to all models at all federally regulated financial institutions, including AI/ML and third-party models. Yet there is no public Canadian benchmark for identity-fraud detection — the strong open corpora that exist (MIDV-2020, SIDTD, IDNet) are all US/European and none is framed against Canadian regulatory expectations.

CanFraudBench fills that gap, and adds what a pure-ML leaderboard lacks: every score is paired with the E-23 evidence dimension it speaks to (discrimination, calibration, stability/drift, fairness, explainability). A submission produces a validation evidence pack, not just an AUC.

The benchmark's core lesson: the reference baseline scores 0.969 AUC and still FAILS overall, because its Adverse Impact Ratio (0.59) breaches the four-fifths fairness rule. Discrimination without governance is not a passing model.


What's in this dataset

A reproducible, fully synthetic set of Canadian onboarding applications. No real person's data is present. (See Privacy & Ethics below.)

Records 20,000
Legitimate 16,000
Fraud 4,000 (20%)
Seed 23 (deterministic)
Format JSON Lines (.jsonl)

Fraud typology breakdown

Fraud labels are grounded in documented synthetic-identity typologies so that performance can be sliced by fraud type (not just an aggregate AUC):

Typology Count Description
fabricated 1,200 Wholly invented identity; no real underlying person
blended 1,200 "Frankenstein" — real structural identifier + fabricated name/DOB
file_aged 800 Thin file artificially aged (nominee/piggyback tradelines)
linked_cluster 600 Member of an application cluster (device/address reuse)
inconsistent 200 Internally contradictory fields a univariate rule would miss
legitimate 16,000 Internally consistent legitimate applicant

Record schema

Each line is a JSON object:

{
  "id": "can_0000001",
  "raw": { "first_name": "...", "last_name": "...", "dob": "...",
           "address": {...}, "sin": "...", "...": "..." },
  "features": {
    "f_sin_luhn_valid": 0,
    "f_name_struct_anomaly": 0.0,
    "f_dob_doc_inconsistency": 0.0,
    "f_tenure_vs_age_gap": 0.0,
    "f_cluster_link_score": 0.0,
    "f_field_entropy": 0.51,
    "f_thin_file": 0,
    "f_province_group": 0
  },
  "protected_group": 0,
  "typology": "legitimate",
  "label": 0
}

features is a ready-to-use numeric vector; raw is provided for anyone who wants to engineer their own features. protected_group is a synthetic region grouping included solely so fairness metrics (Adverse Impact Ratio, equal opportunity) are computable — it encodes no real demographic fact.


Usage

import json, urllib.request

URL = "https://huggingface.co/datasets/CrillyPienaah/CanFraudBench/resolve/main/canfraudbench_synthid_n20000_seed23.jsonl"
records = [json.loads(l) for l in urllib.request.urlopen(URL)]

X = [list(r["features"].values()) for r in records]
y = [r["label"] for r in records]
groups = [r["protected_group"] for r in records]
# ... train your model, then evaluate with the CanFraudBench metrics + E-23
#     governance mapping from the code repo to produce an evidence pack.

To reproduce this exact file from scratch:

git clone https://github.com/CrillyPienaah/canfraudbench
cd canfraudbench
python -m canfraudbench.synthid.generate --n 20000 --seed 23 --out data/synthid/

The seed makes generation deterministic — the regenerated file matches this one.


Submitting to the leaderboard

CanFraudBench is submission-by-protocol: you run the evaluation harness on your own model and submit the produced evidence pack (metrics, never raw data). Rankings sort by E-23 status first, then mean per-typology recall, then AUC — a high-AUC model that fails a governance dimension does not outrank a governable one. See the code repo for the submission protocol.


Privacy & Ethics

  • Fully synthetic. Names are sampled from generic token lists, not registries. Addresses use real province/city labels with fictitious civic numbers and documentation-style postal codes.
  • No real Social Insurance Numbers. Most records carry numbers that deliberately fail the Luhn checksum so they can never collide with an issued SIN; the blended typology uses a Luhn-valid-but-fictitious, overwhelmingly unassigned number to exercise checksum-aware detectors. These are test fixtures, not PII.
  • Honest scope. This v0.1 generator is a typology-grounded simulator, not a differential-privacy mechanism trained on real data — because it never touches real data, a DP guarantee would be vacuous. This is stated plainly rather than overclaimed. See docs/DATA_ETHICS.md in the code repo.
  • Not affiliated with or endorsed by OSFI. The benchmark maps to the public E-23 guideline; it is not approved by any regulator and is decision-support, not regulatory advice.

License

CC BY 4.0 for this generated dataset. Benchmark code is Apache-2.0.

Citation

@misc{canfraudbench2026,
  title  = {CanFraudBench: A Canadian Identity-Fraud Benchmark with OSFI E-23 Governance Mapping},
  author = {Pienaah, Christopher},
  year   = {2026},
  url    = {https://github.com/CrillyPienaah/canfraudbench}
}