--- license: apache-2.0 language: - en task_categories: - tabular-classification tags: - fraud-detection - tabular - financial - trustworthy-ai - responsible-ai - explainable-ai - xai - synthetic-data - lead-ai-labs size_categories: - 1K Published by [Lead.AI Labs](https://www.lead-ai.us) > Author: [Arun Kumar Gharami](https://huggingface.co/arun-gharami) | [Google Scholar](https://scholar.google.com/citations?user=uy4i5soAAAAJ&hl=en) --- ## Dataset Summary This dataset contains 5,000 synthetic financial transactions labeled as fraud (1) or normal (0). It was designed to support research and prototyping in explainable fraud detection, featuring a balanced mix of behavioral, temporal, and merchant-level risk signals. > ⚠️ **Synthetic Data Disclaimer:** This dataset is **entirely synthetic**. It was generated > algorithmically to simulate plausible transaction fraud patterns for research and educational > use. It contains **no real customer data, no real financial transactions, and no personally > identifiable information (PII)**. It must not be treated as representative of any real-world > fraud distribution. --- ## Supported Tasks - Binary fraud classification (`risk_label`: 0 = normal, 1 = fraud) - Explainable AI (XAI) feature attribution research - Imbalanced classification benchmarking - Financial risk signal analysis --- ## Data Fields | Field | Type | Description | |-------|------|-------------| | `transaction_id` | string | Unique transaction identifier | | `customer_id` | string | Unique customer identifier | | `transaction_amount` | float | Transaction value in currency units | | `transaction_hour` | int | Hour of transaction (0–23) | | `account_age_days` | int | Days since account creation | | `previous_chargebacks` | int | Historical chargeback count | | `merchant_category` | string | Merchant type (online_services, grocery, restaurant, electronics, travel, fuel, fashion) | | `transaction_country` | string | Country code (US, UK, CA, AU, IN) | | `device_type` | string | Device used (mobile, desktop, tablet) | | `is_international` | int | 1 = international transaction | | `is_high_risk_merchant` | int | 1 = high-risk merchant category | | `transaction_velocity_1h` | int | Transaction count in last 1 hour | | `transaction_velocity_24h` | int | Transaction count in last 24 hours | | `avg_transaction_amount_30d` | float | 30-day average transaction amount | | `risk_label` | int | **Target variable** — 0 = normal, 1 = fraud | --- ## Example Rows | transaction_id | transaction_amount | transaction_hour | account_age_days | is_international | risk_label | |----------------|-------------------|------------------|------------------|-----------------|------------| | TXN0000047 | 922.01 | 1 | 12 | 1 | 1 (fraud) | | TXN0000094 | 149.22 | 14 | 340 | 0 | 1 (fraud) | | TXN0000099 | 70.30 | 9 | 892 | 0 | 1 (fraud) | | TXN0001234 | 45.80 | 11 | 720 | 0 | 0 (normal) | --- ## How to Load ### With `datasets` (Hugging Face) ```python from datasets import load_dataset ds = load_dataset("arun-gharami/lead-ai-fraud-detection-dataset") df = ds["train"].to_pandas() print(df.head()) ``` ### With `pandas` ```python import pandas as pd url = "hf://datasets/arun-gharami/lead-ai-fraud-detection-dataset/data/train-00000-of-00001.parquet" df = pd.read_parquet(url) print(df.shape) print(df["risk_label"].value_counts()) ``` ### With DuckDB (Parquet) ```python import duckdb result = duckdb.query(""" SELECT risk_label, COUNT(*) as count, AVG(transaction_amount) as avg_amount FROM read_parquet('hf://datasets/arun-gharami/lead-ai-fraud-detection-dataset/data/train-00000-of-00001.parquet') GROUP BY risk_label """).df() print(result) ``` --- ## Dataset Splits | Split | Rows | |-------|------| | train | 5,000 | --- ## Intended Use - Training and evaluating fraud detection classifiers - XAI research: SHAP, LIME, feature attribution on tabular financial data - Academic benchmarking and reproducibility studies - Prototyping fraud detection dashboards and APIs ## Non-Intended Use - Training production fraud systems deployed on real customer data - Academic claims about real-world fraud rates or distributions - Any use involving actual customer financial data --- ## Bias and Fairness Note This dataset was synthetically generated and may encode assumptions about the relationship between demographic signals (country, device type) and fraud likelihood that do not reflect real-world distributions. Users should audit for proxy discrimination before using any model trained on this data in a context involving real individuals. --- ## Privacy Note This dataset contains **no real PII**. All transaction IDs, customer IDs, amounts, and behavioral features are synthetically generated. --- ## Citation ```bibtex @misc{gharami2024frauddataset, author = {Arun Kumar Gharami}, title = {Lead.AI Fraud Detection Dataset: Synthetic Tabular Benchmark for XAI Research}, year = {2024}, publisher = {Hugging Face}, howpublished = {\url{https://huggingface.co/datasets/arun-gharami/lead-ai-fraud-detection-dataset}} } ``` --- ## License Apache 2.0 --- *Lead.AI Labs — Trustworthy AI Systems for Practical Business Intelligence* [lead-ai.us](https://www.lead-ai.us) · [GitHub](https://github.com/Arungharami) · [LinkedIn](https://www.linkedin.com/in/arunkgharami)