EpiphanyTech commited on
Commit
e2b06ae
·
verified ·
1 Parent(s): efa55c2

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +456 -0
README.md ADDED
@@ -0,0 +1,456 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: cc-by-4.0
5
+ task_categories:
6
+ - tabular-classification
7
+ - time-series-forecasting
8
+ size_categories:
9
+ - 1M<n<10M
10
+ tags:
11
+ - fraud-detection
12
+ - payments
13
+ - synthetic
14
+ - SEPA
15
+ - anomaly-detection
16
+ - finance
17
+ - tabular
18
+ pretty_name: SynSEPA — Synthetic SEPA Instant Payment Fraud Dataset
19
+
20
+ configs:
21
+ - config_name: default
22
+ data_files:
23
+ - split: transactions
24
+ path: data/synsep_full_dataset.csv
25
+ - split: accounts
26
+ path: data/accounts.csv
27
+
28
+ dataset_info:
29
+ description: >
30
+ SynSEPA is a synthetic SEPA Instant Credit Transfer dataset containing 1.84M
31
+ transactions across 10,000 accounts, with 4 APP fraud typologies injected
32
+ following EPC 2025 definitions. Calibrated against EBA-ECB 2025 fraud statistics.
33
+ features:
34
+ - name: transaction_id
35
+ dtype: string
36
+ - name: account_id
37
+ dtype: string
38
+ - name: persona
39
+ dtype: string
40
+ - name: timestamp
41
+ dtype: string
42
+ - name: sender_iban
43
+ dtype: string
44
+ - name: beneficiary_iban
45
+ dtype: string
46
+ - name: beneficiary_country
47
+ dtype: string
48
+ - name: country_type
49
+ dtype: string
50
+ - name: amount
51
+ dtype: float64
52
+ - name: remittance_category
53
+ dtype: string
54
+ - name: remittance_text
55
+ dtype: string
56
+ - name: hour_of_day
57
+ dtype: int64
58
+ - name: day_of_week
59
+ dtype: int64
60
+ - name: is_weekend
61
+ dtype: int64
62
+ - name: time_since_last_txn
63
+ dtype: float64
64
+ - name: is_new_beneficiary
65
+ dtype: int64
66
+ - name: is_fraud
67
+ dtype: int64
68
+ - name: fraud_type
69
+ dtype: string
70
+ splits:
71
+ - name: transactions
72
+ num_examples: 1839560
73
+ - name: accounts
74
+ num_examples: 10000
75
+ ---
76
+
77
+ # SynSEPA: A Synthetic SEPA Instant Payment Dataset for APP Fraud Detection Research
78
+
79
+ [![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)
80
+ [![Paper: SEPAGen](https://img.shields.io/badge/Paper-SEPAGen-blue)]()
81
+ [![Fraud Rate: 0.39%](https://img.shields.io/badge/Fraud%20Rate-0.39%25-red)]()
82
+ [![Transactions: 1.84M](https://img.shields.io/badge/Transactions-1.84M-green)]()
83
+
84
+ ---
85
+
86
+ ## Overview
87
+
88
+ **SynSEPA** is the first publicly available synthetic dataset specifically designed for
89
+ Authorised Push Payment (APP) fraud detection in SEPA Instant Credit Transfer payments.
90
+
91
+ No public SEPA fraud dataset previously existed. SynSEPA fills this gap by providing
92
+ a large-scale, statistically calibrated synthetic dataset grounded in official EU
93
+ regulatory statistics from the EBA-ECB 2025 Payment Fraud Report and the EPC 2025
94
+ Payment Threats and Fraud Trends Report.
95
+
96
+ The dataset is released as part of the **SEPAGen** research project:
97
+ *"Transformer-Based Generative Anomaly Detection for APP Fraud in SEPA Instant Payments"*
98
+
99
+ ---
100
+
101
+ ## Why SynSEPA?
102
+
103
+ ### The Problem
104
+ - SEPA Instant payments settle in **under 10 seconds** and are **irreversible**
105
+ - APP fraud — where victims are manipulated into authorising payments — caused
106
+ **€2.5 billion in EU losses in 2024** (EBA-ECB 2025), up 24% YoY
107
+ - **No public SEPA fraud dataset** existed for training or benchmarking ML models
108
+ - Real SEPA fraud data is proprietary, privacy-sensitive, and inaccessible to researchers
109
+
110
+ ### The Solution
111
+ SynSEPA generates realistic SEPA payment sequences with:
112
+ - **4 APP fraud typologies** as defined by the EPC 2025 report
113
+ - **4 customer personas** representing the EU retail banking population
114
+ - **Statistical calibration** against EBA-ECB 2025 fraud report benchmarks
115
+ - **Sequential structure** enabling sequence-based generative model training
116
+
117
+ ---
118
+
119
+ ## Dataset Statistics
120
+
121
+ | Property | Value |
122
+ |---|---|
123
+ | Total transactions | 1,839,560 |
124
+ | Normal transactions | 1,832,448 (99.61%) |
125
+ | Fraud transactions | 7,112 (0.39%) |
126
+ | Unique accounts | 10,000 |
127
+ | Simulation period | January – December 2024 |
128
+ | Countries covered | 10 EU/EEA countries |
129
+ | Avg transactions per account | 184 |
130
+ | Min transactions per account | 69 |
131
+
132
+ ### Fraud Breakdown
133
+
134
+ | Typology | Transactions | Victims | Avg Txns/Victim |
135
+ |---|---|---|---|
136
+ | Romance Scam | 4,232 | 720 | 5.9 |
137
+ | Bank Impersonation | 1,440 | 1,440 | 1.0 |
138
+ | Invoice / Mandate Fraud | 900 | 900 | 1.0 |
139
+ | CEO / BEC Fraud | 540 | 540 | 1.0 |
140
+ | **Total** | **7,112** | **3,600** | **1.98** |
141
+
142
+ ### Account Personas
143
+
144
+ | Persona | Accounts | % | Fraud Targets |
145
+ |---|---|---|---|
146
+ | Regular Employee | 5,054 | 50.5% | Impersonation, Romance |
147
+ | Student | 1,972 | 19.7% | Romance, Impersonation |
148
+ | Retiree | 1,519 | 15.2% | Impersonation, Romance |
149
+ | Small Business | 1,455 | 14.5% | Invoice, CEO |
150
+
151
+ ---
152
+
153
+ ## File Structure
154
+
155
+ ```
156
+ synsep-dataset/
157
+ ├── data/
158
+ │ ├── synsep_full_dataset.csv ← Main dataset (1.84M transactions, ~298 MB)
159
+ │ └── accounts.csv ← Account metadata (10,000 accounts, ~3.9 MB)
160
+ ├── code/
161
+ │ ├── generate/ ← Scripts to regenerate the dataset from scratch
162
+ │ └── examples/
163
+ │ └── sample_baseline.py ← Quick start: Isolation Forest baseline
164
+ ├── README.md ← This file
165
+ └── dataset-metadata.json ← Kaggle dataset metadata
166
+ ```
167
+
168
+ ---
169
+
170
+ ## Quick Start
171
+
172
+ ```bash
173
+ pip install pandas scikit-learn matplotlib numpy
174
+ python code/examples/sample_baseline.py
175
+ ```
176
+
177
+ This runs an Isolation Forest baseline on the dataset and prints AUROC, PR-AUC,
178
+ and a classification report at 1% FPR — a useful starting benchmark.
179
+
180
+ ---
181
+
182
+ ## Schema — synsep_full_dataset.csv
183
+
184
+ ### Core SEPA Fields
185
+
186
+ | Column | Type | Description | Example |
187
+ |---|---|---|---|
188
+ | `transaction_id` | string | Unique transaction ID | TXN_00000001 |
189
+ | `account_id` | string | Sender account ID | ACC_000042 |
190
+ | `persona` | string | Account type | employee |
191
+ | `timestamp` | datetime | Transaction datetime | 2024-03-15 14:23:01 |
192
+ | `sender_iban` | string | Sender IBAN (synthetic) | DE89370400440532013000 |
193
+ | `beneficiary_iban` | string | Beneficiary IBAN (synthetic) | FR7630006000011234 |
194
+ | `beneficiary_country` | string | Beneficiary country code | FR |
195
+ | `amount` | float | Transaction amount (EUR) | 245.50 |
196
+ | `remittance_category` | string | Payment category | grocery |
197
+ | `remittance_text` | string | Payment reference text | Rent Mar 2024 |
198
+
199
+ ### Engineered Features
200
+
201
+ | Column | Type | Description | Example |
202
+ |---|---|---|---|
203
+ | `country_type` | string | domestic / eu_cross_border / non_eu | domestic |
204
+ | `hour_of_day` | int | Hour of transaction (0-23) | 14 |
205
+ | `day_of_week` | int | Day of week (0=Monday, 6=Sunday) | 2 |
206
+ | `is_weekend` | int | Weekend flag (0/1) | 0 |
207
+ | `time_since_last_txn` | float | Seconds since previous transaction | 86400.0 |
208
+ | `is_new_beneficiary` | int | New IBAN never seen before (0/1) | 0 |
209
+
210
+ ### Labels (for evaluation only — never used in unsupervised training)
211
+
212
+ | Column | Type | Description | Values |
213
+ |---|---|---|---|
214
+ | `is_fraud` | int | Fraud label | 0 = normal, 1 = fraud |
215
+ | `fraud_type` | string | Fraud typology | none / impersonation / invoice / romance / ceo |
216
+
217
+ ---
218
+
219
+ ## Schema — accounts.csv
220
+
221
+ | Column | Type | Description |
222
+ |---|---|---|
223
+ | `account_id` | string | Unique account ID |
224
+ | `persona` | string | Account type (employee/student/retiree/business) |
225
+ | `home_country` | string | Sender's home country |
226
+ | `sender_iban` | string | Account IBAN |
227
+ | `txn_per_month_min/max` | int | Transaction frequency range |
228
+ | `typical_amount` | float | Typical transaction amount |
229
+ | `foreign_txn_prob` | float | Cross-border transaction probability |
230
+ | `fraud_target_types` | JSON | Which fraud typologies target this account |
231
+ | `known_beneficiaries` | JSON | List of regular beneficiary IBANs |
232
+
233
+ ---
234
+
235
+ ## APP Fraud Typologies in SynSEPA
236
+
237
+ ### Why these four typologies?
238
+
239
+ The four fraud types in SynSEPA were selected directly from the **EPC 2025 Payment
240
+ Threats and Fraud Trends Report** (EPC162-24 v2.0), which is the authoritative
241
+ classification of APP fraud in the SEPA ecosystem published by the European Payments
242
+ Council. These are not hypothetical categories — they represent the dominant, documented
243
+ patterns of Authorised Push Payment fraud occurring across EU/EEA markets today.
244
+
245
+ The selection criteria were:
246
+
247
+ 1. **Coverage of the victim population** — the four typologies together target all four
248
+ account personas in SynSEPA (retail employees, students, retirees, and small
249
+ businesses), ensuring the dataset is not biased toward a single demographic.
250
+
251
+ 2. **Diversity of behavioural signatures** — each typology produces a distinct statistical
252
+ footprint in the transaction data (amount level, timing, beneficiary geography,
253
+ sequence length), making the dataset useful for evaluating whether a model can
254
+ distinguish between fundamentally different fraud mechanisms rather than just
255
+ detecting one kind of outlier.
256
+
257
+ 3. **Relevance to SEPA Instant specifically** — typologies were chosen where the
258
+ irrevocability and speed of SEPA Instant payments are part of the fraud mechanism
259
+ itself (e.g. impersonation fraudsters urgently pressure victims to transfer before
260
+ the bank can intervene; romance scammers exploit the ease of cross-border SEPA
261
+ transfers). Typologies that primarily exploit card networks or slower payment rails
262
+ were excluded.
263
+
264
+ 4. **Volume calibration against EBA-ECB 2025** — victim counts and fraud volumes per
265
+ typology were set to reflect the proportions reported in the EBA-ECB 2025 Joint
266
+ Report on Payment Fraud, so the dataset mirrors the real EU fraud landscape.
267
+
268
+ ### Typology Details
269
+
270
+ #### 1. Bank / Authority Impersonation
271
+ Fraudster poses as the victim's bank fraud team or a law enforcement agency, creating
272
+ urgency around a supposed security threat. Victim is convinced to transfer funds to a
273
+ "safe account" controlled by the fraudster.
274
+
275
+ - **Target personas:** Employees, Retirees, Students
276
+ - **Behavioural signature:** Single large transaction (3–10× the victim's normal amount),
277
+ new domestic IBAN never seen in history, urgent remittance text ("safe account transfer",
278
+ "security hold"), sent shortly after the last normal transaction
279
+ - **Why hard to detect:** Amount is large but the IBAN is domestic, and the timing follows
280
+ a normal inter-transaction gap — it does not look like an unusual payment channel
281
+
282
+ #### 2. Invoice / Mandate Fraud
283
+ Fraudster intercepts a legitimate supplier invoice (via email compromise or postal
284
+ interception) and replaces the beneficiary IBAN with one they control. The victim
285
+ pays what they believe is a routine business invoice.
286
+
287
+ - **Target personas:** Small Business only
288
+ - **Behavioural signature:** Amount closely mirrors the victim's typical supplier payment
289
+ (deliberately subtle), new IBAN despite a familiar-looking remittance reference,
290
+ business accounts only
291
+ - **Why hard to detect:** This is the most subtle typology — the amount is not anomalous,
292
+ the remittance text looks normal, and only the IBAN is new. A purely amount-based
293
+ detector will miss it entirely.
294
+
295
+ #### 3. Romance Scam
296
+ Fraudster cultivates a fake online relationship over weeks or months, then gradually
297
+ requests money under emotional pretexts (medical emergency, travel costs, investment
298
+ opportunity).
299
+
300
+ - **Target personas:** Employees, Students, Retirees
301
+ - **Behavioural signature:** 4–8 escalating payments to the same foreign IBAN over a
302
+ 5–12 week period, emotional or personal remittance text, cross-border destination
303
+ - **Why hard to detect:** Each individual payment may not look anomalous in isolation —
304
+ it is the multi-week sequence of escalating payments to the same new foreign IBAN that
305
+ constitutes the fraud signal. This typology tests whether a model can detect
306
+ account-level behavioural drift over time.
307
+
308
+ #### 4. CEO / Business Email Compromise (BEC)
309
+ Fraudster impersonates a company's CEO or senior executive via email and instructs a
310
+ finance employee to make an urgent, confidential international transfer.
311
+
312
+ - **Target personas:** Small Business only
313
+ - **Behavioural signature:** Large amount, new non-EU IBAN, Friday afternoon timing
314
+ (when management is less available to verify), confidential remittance text
315
+ - **Why hard to detect:** The payment instruction appears to come from internal authority.
316
+ The fraud signal is in the combination of a large non-EU transfer on a Friday with a
317
+ new IBAN — no single feature is sufficient.
318
+
319
+ ---
320
+
321
+ ## Generation Methodology
322
+
323
+ SynSEPA was generated using a 3-step pipeline (code in `code/generate/`):
324
+
325
+ ### Step 1 — Account Generation
326
+ 10,000 synthetic accounts assigned to one of 4 personas. Each account receives:
327
+ - A syntactically correct IBAN for their home country
328
+ - Behavioural parameters (frequency, amount ranges, active hours)
329
+ - A list of 5-20 known beneficiary IBANs
330
+
331
+ ### Step 2 — Normal Transaction Generation
332
+ 12 months (Jan-Dec 2024) of transaction history per account, with:
333
+ - Transaction frequency sampled from persona distribution
334
+ - Timestamps weighted by persona's active hours and day-of-week patterns
335
+ - Beneficiaries drawn 80% from known list, 20% new
336
+ - Remittance categories and text sampled from persona's profile
337
+ - All engineered features computed (time_since_last_txn, is_new_beneficiary, etc.)
338
+
339
+ ### Step 3 — Fraud Injection
340
+ APP fraud transactions injected following EPC 2025 typology signatures:
341
+ - Victim accounts selected by eligible persona type
342
+ - Fraud transaction parameters derived from victim's normal history
343
+ - Romance scam sequences span 4-8 payments over 5-12 week periods
344
+
345
+ ---
346
+
347
+ ## Statistical Calibration
348
+
349
+ SynSEPA is calibrated against the following EBA-ECB 2025 benchmarks:
350
+
351
+ | Metric | EBA Benchmark | SynSEPA | Status |
352
+ |---|---|---|---|
353
+ | Fraud rate (volume) | ~0.200% | 0.387% | Within range |
354
+ | Cross-border rate (normal) | ~11% | 11.1% | Matches |
355
+ | Weekend transaction rate | <25% | 19.8% | Passes |
356
+ | Business hours concentration | >60% | 89.1% | Passes |
357
+ | Fraud cross-border rate | > normal | 96.4% vs 11.1% | Correct |
358
+
359
+ > Note: Fraud rate (0.387%) exceeds EBA's 0.200% volume benchmark primarily
360
+ > because romance scams generate multiple transactions per victim (avg 5.9).
361
+ > This reflects the multi-event nature of romance fraud as documented by the EPC.
362
+
363
+ ---
364
+
365
+ ## Validation Results
366
+
367
+ SynSEPA passed **41 of 42** automated validation checks covering:
368
+ - Basic dataset composition and size
369
+ - Fraud typology distribution
370
+ - Persona behavioural profiles
371
+ - Temporal patterns (hours, weekdays, time between transactions)
372
+ - Fraud typology signature verification
373
+ - Cross-border transaction rates
374
+ - Sequence integrity (ordering per account)
375
+ - Amount distribution shape
376
+
377
+ ---
378
+
379
+ ## Intended Uses
380
+
381
+ Appropriate uses:
382
+ - Training and evaluating unsupervised or transformer based anomaly detection models
383
+ - Benchmarking generative models (VAE, GAN, Transformer, Diffusion) on tabular fraud data
384
+ - Sequence modelling research for financial fraud
385
+ - Academic research in payment fraud detection
386
+ - Developing and testing fraud detection pipelines without real customer data
387
+
388
+ Inappropriate uses:
389
+ - Training models intended for production deployment without further validation on real data
390
+ - Any use involving real customer data or real SEPA infrastructure
391
+ - Commercial fraud detection products without disclosure of synthetic data origin
392
+
393
+ ---
394
+
395
+ ## Limitations
396
+
397
+ 1. **Synthetic data gap** — All data is synthetic. Real fraud patterns may have
398
+ nuances not captured in EPC typology descriptions.
399
+
400
+ 2. **No device/session signals** — Real APP fraud detection also uses device
401
+ fingerprints, session behaviour, and browser signals. SynSEPA covers only
402
+ transaction-level signals.
403
+
404
+ 3. **Simplified IBAN structure** — IBANs are syntactically correct but do not
405
+ pass Mod-97 checksum validation.
406
+
407
+ 4. **Single year** — Covers January-December 2024 only. Seasonal effects beyond
408
+ this period are not represented.
409
+
410
+ 5. **Retiree cross-border rate** — Marginally exceeds 10% target (achieved 10.3%)
411
+ — a minor calibration artefact with no material impact on model training.
412
+
413
+ ---
414
+
415
+ ## Citation
416
+
417
+ If you use SynSEPA in your research, please cite:
418
+
419
+ ```bibtex
420
+ @dataset{synsep2025,
421
+ title = {SynSEPA: A Synthetic SEPA Instant Payment Dataset
422
+ for APP Fraud Detection Research},
423
+ author = {Bajaj, Gaurav},
424
+ year = {2026},
425
+ publisher = {Kaggle / HuggingFace},
426
+ note = {Generated as part of the SEPAGen project.
427
+ Calibrated against EBA-ECB 2025 Payment Fraud Report.}
428
+ }
429
+ ```
430
+
431
+ ---
432
+
433
+ ## References
434
+
435
+ 1. EBA-ECB (2025). *Joint Report on Payment Fraud*. European Banking Authority /
436
+ European Central Bank. December 2025.
437
+
438
+ 2. EPC (2025). *Payment Threats and Fraud Trends Report* (EPC162-24 v2.0).
439
+ European Payments Council. November 2025.
440
+
441
+ 3. Lopez-Rojas, E. (2017). *Synthetic Financial Datasets for Fraud Detection*
442
+ (PaySim). Kaggle.
443
+
444
+ ---
445
+
446
+ ## License
447
+
448
+ This dataset is released under the
449
+ [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/)
450
+ license. You are free to share and adapt the dataset for any purpose, provided
451
+ appropriate credit is given.
452
+
453
+ ---
454
+
455
+ *SynSEPA was generated entirely from synthetic data. No real customer data,
456
+ real SEPA transactions, or real bank records were used in its creation.*