CoolFace
Datasetpublic

flwrlabs/fed-fraud-paysim-banks

Dataset Card for fed-fraud-paysim-banks This dataset originates from purulalwani/Synthetic-Financial-Datasets-For-Fraud-Detection, a Hugging Face version of the PaySim-style synthetic mobile-money fraud detection dataset. This derived version creates a federated, bank-partitioned fraud detection dataset by assigning originator accounts to one of five banks and preserving each account within a single bank partition. Dataset Details Dataset Description… See the full description on the dataset page: https://huggingface.co/datasets/flwrlabs/fed-fraud-paysim-banks.

sourceHugging Facecc-by-4.0updated 1mo agoView on Hugging Face
0likes134downloads
Dataset Card

Dataset Card for fed-fraud-paysim-banks

This dataset originates from `purulalwani/Synthetic-Financial-Datasets-For-Fraud-Detection`, a Hugging Face version of the PaySim-style synthetic mobile-money fraud detection dataset. This derived version creates a federated, bank-partitioned fraud detection dataset by assigning originator accounts to one of five banks and preserving each account within a single bank partition.

Dataset Details

Dataset Description

Each sample represents a synthetic financial transaction. The original PaySim-style fields are retained and a new BankID column is added to identify the federated client/bank assignment.

The dataset is intended for experiments in federated learning, non-IID data partitioning, financial fraud detection, and binary classification. The isFraud column is the primary label, where 1 indicates a fraudulent transaction and 0 indicates a non-fraudulent transaction.

  • —Repository: flwrlabs/fed-fraud-paysim-banks
  • —Source dataset: purulalwani/Synthetic-Financial-Datasets-For-Fraud-Detection
  • —Domain: Synthetic financial transactions / fraud detection
  • —Task: Binary classification
  • —Label column: isFraud
  • —Federated partition column: BankID
  • —Number of clients/banks: 5
  • —Splits: train, test
  • —Language: Not applicable; the dataset is tabular

Dataset Sources

Uses

Direct Use

This dataset can be used to train and evaluate binary fraud detection models in both centralized and federated settings. In federated experiments, BankID can be used as the client identifier to simulate data held by five separate banks.

Out-of-Scope Use

This dataset is synthetic and should not be treated as a replacement for real-world fraud data in production risk systems. It should not be used to make decisions about real customers, accounts, or transactions.

Dataset Structure

Data Instances

A typical row contains transaction metadata, account identifiers, source and destination balances, fraud labels, and a federated bank assignment.

json
{
  "step": 1,
  "type": "PAYMENT",
  "amount": 9839.64,
  "nameOrig": "C1231006815",
  "oldbalanceOrg": 170136.0,
  "newbalanceOrig": 160296.36,
  "nameDest": "M1979787155",
  "oldbalanceDest": 0.0,
  "newbalanceDest": 0.0,
  "isFraud": 0,
  "isFlaggedFraud": 0,
  "BankID": 0
}

Data Fields

FieldTypeDescription
stepint64Time step of the transaction in the PaySim simulation.
typestringTransaction type, such as PAYMENT, TRANSFER, CASH_OUT, DEBIT, or CASH_IN.
amountfloat64Transaction amount.
nameOrigstringOriginating customer/account identifier.
oldbalanceOrgfloat64Originator balance before the transaction.
newbalanceOrigfloat64Originator balance after the transaction.
nameDeststringDestination customer/account or merchant identifier.
oldbalanceDestfloat64Destination balance before the transaction.
newbalanceDestfloat64Destination balance after the transaction.
isFraudint64Binary fraud label. 1 means fraudulent; 0 means non-fraudulent.
isFlaggedFraudint64Binary indicator from the original PaySim-style rule-based flag.
BankIDint64Federated client/bank assignment. Values range from 0 to 4.

Data Splits

The dataset contains two global splits:

SplitDescription
trainCombined training transactions from all five banks.
testCombined test transactions from all five banks.

The split is created independently for each bank using a stratified procedure: approximately 10% of fraudulent transactions and 10% of non-fraudulent transactions from each bank are assigned to the global test split, with the remaining rows assigned to train.

Dataset Creation

Source Data

The source dataset is downloaded from purulalwani/Synthetic-Financial-Datasets-For-Fraud-Detection using the Hugging Face datasets library. The source dataset contains PaySim-style synthetic mobile-money transactions with fraud labels.

Federated Bank Assignment

The derived dataset first builds account-level statistics using nameOrig. Each originator account is assigned to exactly one bank, ensuring that all transactions from the same originator remain within the same federated client.

Accounts are grouped into three buckets before assignment:

  • —fraud_accounts: accounts with one or more fraudulent transactions
  • —active_nonfraud: non-fraudulent accounts with at least two transactions
  • —light_nonfraud: non-fraudulent accounts with a single transaction

The assignment uses hard quotas to create five non-IID banks with different overall sizes, fraud prevalence, and active non-fraud account distributions.

Non-IID Configuration

The export script uses the following proportions:

QuantityBank 0Bank 1Bank 2Bank 3Bank 4
Target row share0.240.210.200.180.17
Target fraud-row share0.170.190.200.210.23
Target active non-fraud row share0.190.200.200.210.20

This creates a moderate non-IID setting: banks differ in size and fraud prevalence while all banks retain both fraudulent and non-fraudulent samples.

Train/Test Split

For each bank, transactions are split into train and test sets using class-aware stratification on isFraud.

Loading the Dataset

python
from datasets import load_dataset

# Load the full dataset
ds = load_dataset("flwrlabs/fed-fraud-paysim-banks")

train = ds["train"]
test = ds["test"]

# Example: select one federated client/bank
bank_0_train = train.filter(lambda row: row["BankID"] == 0)
bank_0_test = test.filter(lambda row: row["BankID"] == 0)

Federated Learning Usage

In federated learning experiments, use BankID as the client partition key:

python
from flwr_datasets import FederatedDataset
from flwr_datasets.partitioner import NaturalIdPartitioner

fds = FederatedDataset(
    dataset="flwrlabs/fed-fraud-paysim-banks",
    partitioners={"train": NaturalIdPartitioner(partition_by="BankID")},
)
partition = fds.load_partition(partition_id=0)

Considerations for Using the Data

Bias, Risks, and Limitations

  • —The dataset is synthetic and may not capture the full complexity of real financial fraud patterns.
  • —Fraud labels and transaction dynamics come from a simulation, not from real customer behavior.
  • —The bank partitions are artificially constructed and should be interpreted as experimental federated clients, not real institutions.
  • —Models trained on this dataset may not generalize to real-world financial data without careful validation.

Privacy

The dataset is synthetic and uses artificial account identifiers. However, users should still avoid treating the identifiers as meaningful customer identities.

Citation

If you use this dataset, please cite the original PaySim-style dataset/source. If you're using this dataset with Flower, please also cite the relevant Flower papers:

bibtex
@misc{synthetic_financial_fraud_detection,
  author = {Lalwani, Puru},
  title  = {{Synthetic Financial Datasets for Fraud Detection}},
  year   = {2024},
  url    = {https://huggingface.co/datasets/purulalwani/Synthetic-Financial-Datasets-For-Fraud-Detection}
}
bibtex
@article{DBLP:journals/corr/abs-2007-14390,
  author       = {Daniel J. Beutel and
                  Taner Topal and
                  Akhil Mathur and
                  Xinchi Qiu and
                  Titouan Parcollet and
                  Nicholas D. Lane},
  title        = {Flower: {A} Friendly Federated Learning Research Framework},
  journal      = {CoRR},
  volume       = {abs/2007.14390},
  year         = {2020},
  url          = {https://arxiv.org/abs/2007.14390},
  eprinttype    = {arXiv},
  eprint       = {2007.14390},
  timestamp    = {Mon, 03 Aug 2020 14:32:13 +0200},
  biburl       = {https://dblp.org/rec/journals/corr/abs-2007-14390.bib},
  bibsource    = {dblp computer science bibliography, https://dblp.org}
}
bibtex
@misc{gao2026flowerhub,
  title        = {Flower Hub: A Reproducible Benchmarking Platform for Federated Learning in Simulation and Deployment},
  author       = {Yan Gao and
                  Mohammad Naseri and
                  Javier Fernandez-Marques and
                  Dimitris Stripelis and
                  Lorenzo Sani and
                  Davide Eynard and
                  Fan Zhang and
                  Hong Jia and
                  Ting Dang and
                  D. B. Emerson and
                  Fatemeh Tavakoli and
                  Ole Werger and
                  Lars Wulfert and
                  Petros Demetrakopoulos and
                  Sofia Tsekeridou and
                  InSeo Song and
                  KangYoon Lee and
                  Honghao Li and
                  Lingjuan Lyu and
                  John P Dickerson and
                  Daniel Janes Beutel and
                  Nicholas D. Lane},
  year         = {2026},
  eprint       = {2608.25114},
  archivePrefix = {arXiv},
  primaryClass = {cs.LG},
  doi          = {10.48550/arXiv.2608.25114},
  url          = {https://arxiv.org/abs/2608.25114}
}

Dataset Card Contact

In case of any doubts, please contact Flower Labs.