Datasets:
Professional dataset card: 5K synthetic fraud benchmark
#2
by arun-gharami - opened
README.md
CHANGED
|
@@ -1,76 +1,181 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
- name: transaction_id
|
| 6 |
-
dtype: string
|
| 7 |
-
- name: customer_id
|
| 8 |
-
dtype: string
|
| 9 |
-
- name: transaction_hour
|
| 10 |
-
dtype: int64
|
| 11 |
-
- name: account_age_days
|
| 12 |
-
dtype: int64
|
| 13 |
-
- name: previous_chargebacks
|
| 14 |
-
dtype: int64
|
| 15 |
-
- name: merchant_category
|
| 16 |
-
dtype: string
|
| 17 |
-
- name: transaction_country
|
| 18 |
-
dtype: string
|
| 19 |
-
- name: device_type
|
| 20 |
-
dtype: string
|
| 21 |
-
- name: is_international
|
| 22 |
-
dtype: int64
|
| 23 |
-
- name: is_high_risk_merchant
|
| 24 |
-
dtype: int64
|
| 25 |
-
- name: transaction_amount
|
| 26 |
-
dtype: float64
|
| 27 |
-
- name: transaction_velocity_1h
|
| 28 |
-
dtype: int64
|
| 29 |
-
- name: transaction_velocity_24h
|
| 30 |
-
dtype: int64
|
| 31 |
-
- name: avg_transaction_amount_30d
|
| 32 |
-
dtype: float64
|
| 33 |
-
- name: risk_label
|
| 34 |
-
dtype: int64
|
| 35 |
-
splits:
|
| 36 |
-
- name: train
|
| 37 |
-
num_bytes: 679378
|
| 38 |
-
num_examples: 5000
|
| 39 |
-
download_size: 171991
|
| 40 |
-
dataset_size: 679378
|
| 41 |
-
configs:
|
| 42 |
-
- config_name: default
|
| 43 |
-
data_files:
|
| 44 |
-
- split: train
|
| 45 |
-
path: data/train-*
|
| 46 |
-
---
|
| 47 |
task_categories:
|
| 48 |
- tabular-classification
|
| 49 |
tags:
|
| 50 |
- fraud-detection
|
|
|
|
|
|
|
| 51 |
- trustworthy-ai
|
| 52 |
-
-
|
| 53 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
---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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
-
|
| 76 |
-
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
task_categories:
|
| 6 |
- tabular-classification
|
| 7 |
tags:
|
| 8 |
- fraud-detection
|
| 9 |
+
- tabular
|
| 10 |
+
- financial
|
| 11 |
- trustworthy-ai
|
| 12 |
+
- responsible-ai
|
| 13 |
+
- explainable-ai
|
| 14 |
+
- xai
|
| 15 |
+
- synthetic-data
|
| 16 |
+
- lead-ai-labs
|
| 17 |
+
size_categories:
|
| 18 |
+
- 1K<n<10K
|
| 19 |
---
|
| 20 |
|
| 21 |
# Lead.AI Fraud Detection Dataset
|
| 22 |
|
| 23 |
+
**5,000-row synthetic tabular dataset for fraud detection research, XAI benchmarking, and predictive model training**
|
| 24 |
+
|
| 25 |
+
> Published by [Lead.AI Labs](https://www.lead-ai.us)
|
| 26 |
+
> Author: [Arun Kumar Gharami](https://huggingface.co/arun-gharami) | [Google Scholar](https://scholar.google.com/citations?user=uy4i5soAAAAJ&hl=en)
|
| 27 |
+
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
## Dataset Summary
|
| 31 |
+
|
| 32 |
+
This dataset contains 5,000 synthetic financial transactions labeled as fraud (1) or normal (0).
|
| 33 |
+
It was designed to support research and prototyping in explainable fraud detection, featuring
|
| 34 |
+
a balanced mix of behavioral, temporal, and merchant-level risk signals.
|
| 35 |
+
|
| 36 |
+
> ⚠️ **Synthetic Data Disclaimer:** This dataset is **entirely synthetic**. It was generated
|
| 37 |
+
> algorithmically to simulate plausible transaction fraud patterns for research and educational
|
| 38 |
+
> use. It contains **no real customer data, no real financial transactions, and no personally
|
| 39 |
+
> identifiable information (PII)**. It must not be treated as representative of any real-world
|
| 40 |
+
> fraud distribution.
|
| 41 |
+
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
## Supported Tasks
|
| 45 |
+
|
| 46 |
+
- Binary fraud classification (`risk_label`: 0 = normal, 1 = fraud)
|
| 47 |
+
- Explainable AI (XAI) feature attribution research
|
| 48 |
+
- Imbalanced classification benchmarking
|
| 49 |
+
- Financial risk signal analysis
|
| 50 |
+
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+
## Data Fields
|
| 54 |
+
|
| 55 |
+
| Field | Type | Description |
|
| 56 |
+
|-------|------|-------------|
|
| 57 |
+
| `transaction_id` | string | Unique transaction identifier |
|
| 58 |
+
| `customer_id` | string | Unique customer identifier |
|
| 59 |
+
| `transaction_amount` | float | Transaction value in currency units |
|
| 60 |
+
| `transaction_hour` | int | Hour of transaction (0–23) |
|
| 61 |
+
| `account_age_days` | int | Days since account creation |
|
| 62 |
+
| `previous_chargebacks` | int | Historical chargeback count |
|
| 63 |
+
| `merchant_category` | string | Merchant type (online_services, grocery, restaurant, electronics, travel, fuel, fashion) |
|
| 64 |
+
| `transaction_country` | string | Country code (US, UK, CA, AU, IN) |
|
| 65 |
+
| `device_type` | string | Device used (mobile, desktop, tablet) |
|
| 66 |
+
| `is_international` | int | 1 = international transaction |
|
| 67 |
+
| `is_high_risk_merchant` | int | 1 = high-risk merchant category |
|
| 68 |
+
| `transaction_velocity_1h` | int | Transaction count in last 1 hour |
|
| 69 |
+
| `transaction_velocity_24h` | int | Transaction count in last 24 hours |
|
| 70 |
+
| `avg_transaction_amount_30d` | float | 30-day average transaction amount |
|
| 71 |
+
| `risk_label` | int | **Target variable** — 0 = normal, 1 = fraud |
|
| 72 |
+
|
| 73 |
+
---
|
| 74 |
|
| 75 |
+
## Example Rows
|
| 76 |
+
|
| 77 |
+
| transaction_id | transaction_amount | transaction_hour | account_age_days | is_international | risk_label |
|
| 78 |
+
|----------------|-------------------|------------------|------------------|-----------------|------------|
|
| 79 |
+
| TXN0000047 | 922.01 | 1 | 12 | 1 | 1 (fraud) |
|
| 80 |
+
| TXN0000094 | 149.22 | 14 | 340 | 0 | 1 (fraud) |
|
| 81 |
+
| TXN0000099 | 70.30 | 9 | 892 | 0 | 1 (fraud) |
|
| 82 |
+
| TXN0001234 | 45.80 | 11 | 720 | 0 | 0 (normal) |
|
| 83 |
+
|
| 84 |
+
---
|
| 85 |
|
| 86 |
+
## How to Load
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
+
### With `datasets` (Hugging Face)
|
| 89 |
+
```python
|
| 90 |
+
from datasets import load_dataset
|
| 91 |
|
| 92 |
+
ds = load_dataset("arun-gharami/lead-ai-fraud-detection-dataset")
|
| 93 |
+
df = ds["train"].to_pandas()
|
| 94 |
+
print(df.head())
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
### With `pandas`
|
| 98 |
+
```python
|
| 99 |
+
import pandas as pd
|
| 100 |
+
|
| 101 |
+
url = "hf://datasets/arun-gharami/lead-ai-fraud-detection-dataset/data/train-00000-of-00001.parquet"
|
| 102 |
+
df = pd.read_parquet(url)
|
| 103 |
+
print(df.shape)
|
| 104 |
+
print(df["risk_label"].value_counts())
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
### With DuckDB (Parquet)
|
| 108 |
+
```python
|
| 109 |
+
import duckdb
|
| 110 |
+
|
| 111 |
+
result = duckdb.query("""
|
| 112 |
+
SELECT risk_label, COUNT(*) as count, AVG(transaction_amount) as avg_amount
|
| 113 |
+
FROM read_parquet('hf://datasets/arun-gharami/lead-ai-fraud-detection-dataset/data/train-00000-of-00001.parquet')
|
| 114 |
+
GROUP BY risk_label
|
| 115 |
+
""").df()
|
| 116 |
+
print(result)
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
---
|
| 120 |
|
| 121 |
+
## Dataset Splits
|
| 122 |
+
|
| 123 |
+
| Split | Rows |
|
| 124 |
+
|-------|------|
|
| 125 |
+
| train | 5,000 |
|
| 126 |
+
|
| 127 |
+
---
|
| 128 |
+
|
| 129 |
+
## Intended Use
|
| 130 |
+
|
| 131 |
+
- Training and evaluating fraud detection classifiers
|
| 132 |
+
- XAI research: SHAP, LIME, feature attribution on tabular financial data
|
| 133 |
+
- Academic benchmarking and reproducibility studies
|
| 134 |
+
- Prototyping fraud detection dashboards and APIs
|
| 135 |
+
|
| 136 |
+
## Non-Intended Use
|
| 137 |
+
|
| 138 |
+
- Training production fraud systems deployed on real customer data
|
| 139 |
+
- Academic claims about real-world fraud rates or distributions
|
| 140 |
+
- Any use involving actual customer financial data
|
| 141 |
+
|
| 142 |
+
---
|
| 143 |
+
|
| 144 |
+
## Bias and Fairness Note
|
| 145 |
+
|
| 146 |
+
This dataset was synthetically generated and may encode assumptions about the relationship
|
| 147 |
+
between demographic signals (country, device type) and fraud likelihood that do not reflect
|
| 148 |
+
real-world distributions. Users should audit for proxy discrimination before using any
|
| 149 |
+
model trained on this data in a context involving real individuals.
|
| 150 |
+
|
| 151 |
+
---
|
| 152 |
+
|
| 153 |
+
## Privacy Note
|
| 154 |
+
|
| 155 |
+
This dataset contains **no real PII**. All transaction IDs, customer IDs, amounts, and
|
| 156 |
+
behavioral features are synthetically generated.
|
| 157 |
+
|
| 158 |
+
---
|
| 159 |
+
|
| 160 |
+
## Citation
|
| 161 |
+
|
| 162 |
+
```bibtex
|
| 163 |
+
@misc{gharami2024frauddataset,
|
| 164 |
+
author = {Arun Kumar Gharami},
|
| 165 |
+
title = {Lead.AI Fraud Detection Dataset: Synthetic Tabular Benchmark for XAI Research},
|
| 166 |
+
year = {2024},
|
| 167 |
+
publisher = {Hugging Face},
|
| 168 |
+
howpublished = {\url{https://huggingface.co/datasets/arun-gharami/lead-ai-fraud-detection-dataset}}
|
| 169 |
+
}
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
+
---
|
| 173 |
+
|
| 174 |
+
## License
|
| 175 |
+
|
| 176 |
+
Apache 2.0
|
| 177 |
+
|
| 178 |
+
---
|
| 179 |
|
| 180 |
+
*Lead.AI Labs — Trustworthy AI Systems for Practical Business Intelligence*
|
| 181 |
+
[lead-ai.us](https://www.lead-ai.us) · [GitHub](https://github.com/Arungharami) · [LinkedIn](https://www.linkedin.com/in/arunkgharami)
|