Dataset Viewer
Auto-converted to Parquet Duplicate
row_id
int64
user
int64
card_index
int8
card
int64
timestamp
timestamp[ms]
amount
float64
use_chip
string
mcc
int32
merchant_id
int64
merchant_city
string
merchant_state
string
errors
string
is_fraud
int8
scenario_id
int8
scenario
string
origin
string
split
string
episode
int32
is_probe
bool
0
0
0
0
2002-09-01T06:21:00
134.09
Swipe Transaction
5,300
3,527,213,246,127,877,000
La Verne
CA
0
0
legit
ibm
train
-1
false
1
0
0
0
2002-09-01T06:42:00
38.48
Swipe Transaction
5,411
-727,612,092,139,916,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
2
0
0
0
2002-09-02T06:22:00
120.34
Swipe Transaction
5,411
-727,612,092,139,916,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
3
0
0
0
2002-09-02T17:45:00
128.95
Swipe Transaction
5,651
3,414,527,459,579,107,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
4
0
0
0
2002-09-03T06:23:00
104.71
Swipe Transaction
5,912
5,817,218,446,178,736,000
La Verne
CA
0
0
legit
ibm
train
-1
false
5
0
0
0
2002-09-03T13:53:00
86.19
Swipe Transaction
5,970
-7,146,670,748,125,201,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
6
0
0
0
2002-09-04T05:51:00
93.84
Swipe Transaction
5,411
-727,612,092,139,916,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
7
0
0
0
2002-09-04T06:09:00
123.5
Swipe Transaction
5,411
-727,612,092,139,916,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
8
0
0
0
2002-09-05T06:14:00
61.72
Swipe Transaction
5,411
-727,612,092,139,916,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
9
0
0
0
2002-09-05T09:35:00
57.1
Swipe Transaction
7,538
4,055,257,078,481,059,000
La Verne
CA
0
0
legit
ibm
train
-1
false
10
0
0
0
2002-09-05T20:18:00
76.07
Swipe Transaction
5,814
-4,500,542,936,415,012,400
La Verne
CA
0
0
legit
ibm
train
-1
false
11
0
0
0
2002-09-05T20:41:00
53.91
Online Transaction
4,900
-9,092,677,072,201,095,000
ONLINE
0
0
legit
ibm
train
-1
false
12
0
0
0
2002-09-06T06:16:00
110.37
Swipe Transaction
5,541
2,027,553,650,310,142,700
Mira Loma
CA
0
0
legit
ibm
train
-1
false
13
0
0
0
2002-09-07T06:16:00
117.05
Swipe Transaction
5,411
-727,612,092,139,916,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
14
0
0
0
2002-09-07T06:34:00
45.3
Swipe Transaction
5,942
-5,475,680,618,560,174,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
15
0
0
0
2002-09-07T09:39:00
29.34
Swipe Transaction
7,538
4,055,257,078,481,059,000
La Verne
CA
0
0
legit
ibm
train
-1
false
16
0
0
0
2002-09-08T06:10:00
147.45
Swipe Transaction
5,912
-34,551,508,091,458,520
La Verne
CA
0
0
legit
ibm
train
-1
false
17
0
0
0
2002-09-08T06:38:00
27.75
Swipe Transaction
5,411
4,060,646,732,831,064,600
La Verne
CA
0
0
legit
ibm
train
-1
false
18
0
0
0
2002-09-08T13:48:00
76.57
Swipe Transaction
5,411
-727,612,092,139,916,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
19
0
0
0
2002-09-08T22:01:00
22.56
Swipe Transaction
7,832
-6,733,168,469,687,846,000
Mira Loma
CA
0
0
legit
ibm
train
-1
false
20
0
0
0
2002-09-09T06:54:00
37.5
Swipe Transaction
5,411
4,060,646,732,831,064,600
La Verne
CA
0
0
legit
ibm
train
-1
false
21
0
0
0
2002-09-09T09:40:00
65.5
Swipe Transaction
7,538
-3,345,936,507,911,876,600
La Verne
CA
Technical Glitch,
0
0
legit
ibm
train
-1
false
22
0
0
0
2002-09-09T13:19:00
56.42
Swipe Transaction
5,311
3,189,517,333,335,617,000
La Verne
CA
0
0
legit
ibm
train
-1
false
23
0
0
0
2002-09-09T13:31:00
2.71
Swipe Transaction
5,411
4,060,646,732,831,064,600
La Verne
CA
0
0
legit
ibm
train
-1
false
24
0
0
0
2002-09-09T20:02:00
144.9
Online Transaction
4,899
-8,338,381,919,281,017,000
ONLINE
0
0
legit
ibm
train
-1
false
25
0
0
0
2002-09-10T06:20:00
160
Swipe Transaction
4,829
-4,282,466,774,399,734,300
Mira Loma
CA
0
0
legit
ibm
train
-1
false
26
0
0
0
2002-09-10T06:22:00
102.18
Swipe Transaction
5,300
3,527,213,246,127,877,000
La Verne
CA
0
0
legit
ibm
train
-1
false
27
0
0
0
2002-09-10T06:31:00
36.73
Swipe Transaction
5,912
-34,551,508,091,458,520
La Verne
CA
0
0
legit
ibm
train
-1
false
28
0
0
0
2002-09-10T21:39:00
29.33
Swipe Transaction
7,832
-6,733,168,469,687,846,000
Mira Loma
CA
0
0
legit
ibm
train
-1
false
29
0
0
0
2002-09-11T06:28:00
162.39
Swipe Transaction
5,411
4,060,646,732,831,064,600
La Verne
CA
0
0
legit
ibm
train
-1
false
30
0
0
0
2002-09-11T06:33:00
34.4
Swipe Transaction
5,912
-34,551,508,091,458,520
La Verne
CA
0
0
legit
ibm
train
-1
false
31
0
0
0
2002-09-11T13:06:00
62.06
Swipe Transaction
5,541
2,027,553,650,310,142,700
Mira Loma
CA
0
0
legit
ibm
train
-1
false
32
0
0
0
2002-09-11T13:17:00
-99
Swipe Transaction
5,541
2,027,553,650,310,142,700
Mira Loma
CA
0
0
legit
ibm
train
-1
false
33
0
0
0
2002-09-11T13:23:00
99
Swipe Transaction
5,541
2,027,553,650,310,142,700
Mira Loma
CA
0
0
legit
ibm
train
-1
false
34
0
0
0
2002-09-11T19:30:00
80.18
Swipe Transaction
5,812
-1,605,794,445,852,049,400
La Verne
CA
0
0
legit
ibm
train
-1
false
35
0
0
0
2002-09-12T06:21:00
122.1
Swipe Transaction
5,411
4,060,646,732,831,064,600
La Verne
CA
Insufficient Balance,
0
0
legit
ibm
train
-1
false
36
0
0
0
2002-09-12T06:26:00
92.76
Swipe Transaction
5,411
4,060,646,732,831,064,600
La Verne
CA
0
0
legit
ibm
train
-1
false
37
0
0
0
2002-09-12T06:50:00
52.52
Swipe Transaction
5,411
4,060,646,732,831,064,600
La Verne
CA
0
0
legit
ibm
train
-1
false
38
0
0
0
2002-09-12T11:43:00
1.13
Swipe Transaction
5,499
6,666,504,894,937,430,000
La Verne
CA
0
0
legit
ibm
train
-1
false
39
0
0
0
2002-09-13T06:22:00
126.79
Swipe Transaction
5,300
1,913,477,460,590,765,800
La Verne
CA
0
0
legit
ibm
train
-1
false
40
0
0
0
2002-09-13T06:37:00
44.41
Swipe Transaction
5,912
-34,551,508,091,458,520
La Verne
CA
0
0
legit
ibm
train
-1
false
41
0
0
0
2002-09-14T06:09:00
164.37
Swipe Transaction
5,912
-34,551,508,091,458,520
La Verne
CA
0
0
legit
ibm
train
-1
false
42
0
0
0
2002-09-14T13:08:00
12.76
Swipe Transaction
5,814
-4,500,542,936,415,012,400
La Verne
CA
0
0
legit
ibm
train
-1
false
43
0
0
0
2002-09-15T05:34:00
109.94
Swipe Transaction
5,912
5,817,218,446,178,736,000
La Verne
CA
0
0
legit
ibm
train
-1
false
44
0
0
0
2002-09-15T06:18:00
126.29
Swipe Transaction
5,311
-245,178,307,025,547,040
La Verne
CA
0
0
legit
ibm
train
-1
false
45
0
0
0
2002-09-15T06:55:00
40.81
Swipe Transaction
5,411
4,060,646,732,831,064,600
La Verne
CA
0
0
legit
ibm
train
-1
false
46
0
0
0
2002-09-15T13:54:00
81.35
Swipe Transaction
5,719
-5,904,116,920,141,006,000
Diamond Bar
CA
0
0
legit
ibm
train
-1
false
47
0
0
0
2002-09-16T06:00:00
115.34
Swipe Transaction
5,300
3,527,213,246,127,877,000
La Verne
CA
0
0
legit
ibm
train
-1
false
48
0
0
0
2002-09-16T06:45:00
44.25
Swipe Transaction
5,411
4,060,646,732,831,064,600
La Verne
CA
0
0
legit
ibm
train
-1
false
49
0
0
0
2002-09-17T06:09:00
120.19
Swipe Transaction
5,912
-34,551,508,091,458,520
La Verne
CA
Insufficient Balance,
0
0
legit
ibm
train
-1
false
50
0
0
0
2002-09-17T06:24:00
159.72
Swipe Transaction
5,912
-34,551,508,091,458,520
La Verne
CA
0
0
legit
ibm
train
-1
false
51
0
0
0
2002-09-18T06:19:00
128.85
Swipe Transaction
5,300
3,527,213,246,127,877,000
La Verne
CA
0
0
legit
ibm
train
-1
false
52
0
0
0
2002-09-18T20:01:00
92.3
Swipe Transaction
5,814
-4,500,542,936,415,012,400
La Verne
CA
0
0
legit
ibm
train
-1
false
53
0
0
0
2002-09-19T06:25:00
168.11
Swipe Transaction
5,912
5,817,218,446,178,736,000
La Verne
CA
0
0
legit
ibm
train
-1
false
54
0
0
0
2002-09-19T09:42:00
53.09
Swipe Transaction
7,538
4,055,257,078,481,059,000
La Verne
CA
0
0
legit
ibm
train
-1
false
55
0
0
0
2002-09-20T06:01:00
104.77
Swipe Transaction
5,311
-245,178,307,025,547,040
La Verne
CA
Insufficient Balance,
0
0
legit
ibm
train
-1
false
56
0
0
0
2002-09-20T06:17:00
119.69
Swipe Transaction
5,311
-245,178,307,025,547,040
La Verne
CA
0
0
legit
ibm
train
-1
false
57
0
0
0
2002-09-21T06:27:00
145.5
Swipe Transaction
5,541
2,027,553,650,310,142,700
Mira Loma
CA
0
0
legit
ibm
train
-1
false
58
0
0
0
2002-09-21T06:47:00
48.34
Swipe Transaction
5,942
-5,475,680,618,560,174,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
59
0
0
0
2002-09-21T14:23:00
2.79
Swipe Transaction
5,411
-727,612,092,139,916,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
60
0
0
0
2002-09-22T06:50:00
47.51
Swipe Transaction
5,411
4,060,646,732,831,064,600
La Verne
CA
0
0
legit
ibm
train
-1
false
61
0
0
0
2002-09-22T09:29:00
51.98
Swipe Transaction
7,538
4,055,257,078,481,059,000
La Verne
CA
0
0
legit
ibm
train
-1
false
62
0
0
0
2002-09-22T09:37:00
82.9
Swipe Transaction
7,538
3,952,145,593,743,244,300
La Verne
CA
0
0
legit
ibm
train
-1
false
63
0
0
0
2002-09-22T20:16:00
76.37
Swipe Transaction
5,812
-5,023,497,618,971,073,000
Mira Loma
CA
0
0
legit
ibm
train
-1
false
64
0
0
0
2002-09-23T06:01:00
134.89
Swipe Transaction
5,300
3,527,213,246,127,877,000
La Verne
CA
0
0
legit
ibm
train
-1
false
65
0
0
0
2002-09-23T06:46:00
35.28
Swipe Transaction
5,912
-34,551,508,091,458,520
La Verne
CA
0
0
legit
ibm
train
-1
false
66
0
0
0
2002-09-23T20:26:00
80.65
Swipe Transaction
5,814
-4,500,542,936,415,012,400
La Verne
CA
0
0
legit
ibm
train
-1
false
67
0
0
0
2002-09-24T06:07:00
112.67
Swipe Transaction
5,300
3,527,213,246,127,877,000
La Verne
CA
0
0
legit
ibm
train
-1
false
68
0
0
0
2002-09-25T06:19:00
162.26
Swipe Transaction
5,912
5,817,218,446,178,736,000
La Verne
CA
0
0
legit
ibm
train
-1
false
69
0
0
0
2002-09-25T06:36:00
39.38
Swipe Transaction
5,411
-727,612,092,139,916,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
70
0
0
0
2002-09-25T13:01:00
55.76
Swipe Transaction
5,499
-1,288,082,279,022,882,000
La Verne
CA
0
0
legit
ibm
train
-1
false
71
0
0
0
2002-09-25T13:10:00
100
Swipe Transaction
5,499
-1,288,082,279,022,882,000
La Verne
CA
0
0
legit
ibm
train
-1
false
72
0
0
0
2002-09-25T13:14:00
-100
Swipe Transaction
5,499
-1,288,082,279,022,882,000
La Verne
CA
0
0
legit
ibm
train
-1
false
73
0
0
0
2002-09-26T06:25:00
93.37
Swipe Transaction
5,300
3,527,213,246,127,877,000
La Verne
CA
0
0
legit
ibm
train
-1
false
74
0
0
0
2002-09-27T06:21:00
199.71
Swipe Transaction
5,411
-727,612,092,139,916,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
75
0
0
0
2002-09-27T08:01:00
23.18
Swipe Transaction
5,411
4,060,646,732,831,064,600
La Verne
CA
0
0
legit
ibm
train
-1
false
76
0
0
0
2002-09-27T09:42:00
57.64
Swipe Transaction
7,538
4,055,257,078,481,059,000
La Verne
CA
0
0
legit
ibm
train
-1
false
77
0
0
0
2002-09-28T05:36:00
78.46
Swipe Transaction
5,411
4,060,646,732,831,064,600
La Verne
CA
0
0
legit
ibm
train
-1
false
78
0
0
0
2002-09-28T06:23:00
141.7
Swipe Transaction
5,912
5,817,218,446,178,736,000
La Verne
CA
0
0
legit
ibm
train
-1
false
79
0
0
0
2002-09-28T09:32:00
55.41
Swipe Transaction
7,538
4,055,257,078,481,059,000
La Verne
CA
0
0
legit
ibm
train
-1
false
80
0
0
0
2002-09-28T13:13:00
153.36
Swipe Transaction
4,900
7,945,328,079,774,551,000
La Verne
CA
0
0
legit
ibm
train
-1
false
81
0
0
0
2002-09-29T06:06:00
119.61
Swipe Transaction
5,912
5,817,218,446,178,736,000
La Verne
CA
Insufficient Balance,
0
0
legit
ibm
train
-1
false
82
0
0
0
2002-09-29T06:22:00
120.25
Swipe Transaction
5,912
5,817,218,446,178,736,000
La Verne
CA
Insufficient Balance,
0
0
legit
ibm
train
-1
false
83
0
0
0
2002-09-29T06:33:00
40.58
Swipe Transaction
5,912
5,817,218,446,178,736,000
La Verne
CA
0
0
legit
ibm
train
-1
false
84
0
0
0
2002-09-29T20:15:00
165.96
Swipe Transaction
4,814
838,425,044,734,233,100
Mira Loma
CA
0
0
legit
ibm
train
-1
false
85
0
0
0
2002-09-30T06:21:00
127.32
Online Transaction
5,311
-7,421,093,378,627,544,000
ONLINE
0
0
legit
ibm
train
-1
false
86
0
0
0
2002-09-30T06:57:00
38.13
Swipe Transaction
5,912
-34,551,508,091,458,520
La Verne
CA
0
0
legit
ibm
train
-1
false
87
0
0
0
2002-09-30T12:52:00
11.3
Swipe Transaction
5,541
2,027,553,650,310,142,700
Mira Loma
CA
0
0
legit
ibm
train
-1
false
88
0
0
0
2002-09-30T20:07:00
80.05
Swipe Transaction
5,814
-4,500,542,936,415,012,400
La Verne
CA
0
0
legit
ibm
train
-1
false
89
0
0
0
2002-10-01T06:15:00
119.73
Swipe Transaction
5,912
5,817,218,446,178,736,000
La Verne
CA
0
0
legit
ibm
train
-1
false
90
0
0
0
2002-10-01T06:56:00
30.9
Swipe Transaction
5,411
-727,612,092,139,916,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
91
0
0
0
2002-10-01T11:34:00
34.89
Swipe Transaction
5,300
3,527,213,246,127,877,000
La Verne
CA
0
0
legit
ibm
train
-1
false
92
0
0
0
2002-10-02T06:17:00
139.34
Swipe Transaction
5,541
2,027,553,650,310,142,700
Mira Loma
CA
0
0
legit
ibm
train
-1
false
93
0
0
0
2002-10-03T05:59:00
46.46
Swipe Transaction
5,411
4,060,646,732,831,064,600
La Verne
CA
0
0
legit
ibm
train
-1
false
94
0
0
0
2002-10-03T06:12:00
102.74
Swipe Transaction
5,411
-727,612,092,139,916,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
95
0
0
0
2002-10-03T06:50:00
36.44
Swipe Transaction
5,942
-5,475,680,618,560,174,000
Monterey Park
CA
0
0
legit
ibm
train
-1
false
96
0
0
0
2002-10-04T06:20:00
114.87
Swipe Transaction
5,300
3,527,213,246,127,877,000
La Verne
CA
0
0
legit
ibm
train
-1
false
97
0
0
0
2002-10-05T09:34:00
53.13
Swipe Transaction
7,538
-3,345,936,507,911,876,600
La Verne
CA
0
0
legit
ibm
train
-1
false
98
0
0
0
2002-10-05T10:38:00
16.87
Swipe Transaction
7,210
9,137,769,173,591,184,000
La Verne
CA
0
0
legit
ibm
train
-1
false
99
0
0
0
2002-10-06T06:14:00
139.39
Online Transaction
5,311
-7,421,093,378,627,544,000
ONLINE
0
0
legit
ibm
train
-1
false
End of preview. Expand in Data Studio

CardHistory-Fraud: card fraud that hides in the history

An open card-fraud benchmark where most fraud can only be found in a card's history. It builds on IBM's 24 million simulated card transactions (TabFormer) and adds seven fraud patterns, legit look-alikes that resemble fraud (trips, new subscriptions), and a bank that reacts to fraud: it blocks the card, declines the fraudster's next attempts and issues a new card. Card-fraud practitioners reviewed the data, and its fraud follows the numbers they gave from their own cases.

Transactions 24,937,300 (1991–2020)
Cardholders / cards 2,000 / 6,139
Fraud 105,740 transactions (0.42%), of which 29,520 are IBM's original fraud
Test period July 2018 to March 2020: 3,004,926 transactions on 5,205 cards
Fraud counted in the headline result 4,952 test-period frauds (the fraud we added, without attempts on a blocked card)

Why this benchmark

Fraud models are moving from hand-made features to models that read a card's raw transaction history. To compare such models openly, you need public data where the history matters. Of the open card datasets, IBM's TabFormer is the only one with card-by-card histories, fraud labels, real card-payment fields and scale. Its own fraud is too easy, though: in the test years, 96% of it happens abroad, so one field gives it away. Real card fraud hides in the history: a purchase at a gas station is ordinary, but not when the card was swiped 100 km away while its owner pays by chip at home, or when it follows three declined $1 test payments. This benchmark adds fraud like that.

What is inside

Fraud patterns we added (every transaction the fraudster makes is fraud, test payments included):

Pattern (scenario) What happens Transactions Test-period transactions
card-testing burst 3–7 tiny online payments ($0.10–3) minutes apart, about 60% declined, then a purchase 6,025 801
distributed testing: probe / purchase a few tiny test payments at small online shops over 1–3 days; 60% of the cards are used later 3,064 / 780 380 / 94
network testing wave: probe / purchase 20–60 cards tested at one small online shop within hours; 34% are used later 12,158 / 2,149 1,043 / 191
stolen card near home: a $5–30 first purchase, then $100–500 and growing, at shops where goods resell 6,440 866
counterfeit card a cloned card, mostly swiped, used for days in towns the owner never visits, while the owner keeps shopping 5,499 782
breached merchant a card used at a breached shop is misused weeks to months later 3,443 418
fraudulent recurring charge a fraudster's subscription that keeps charging the card, even after it is replaced 3,111 377
attempt on a blocked card the fraudster's attempts after the bank blocked the card, declined 33,551 3,811

IBM's original fraud (29,520 transactions, scenario "IBM's original fraud") stays in the data, labelled as fraud. Models may train on it like on any other fraud (ours did: it is 25,896 of the 92,822 fraud transactions in the training split). It is not counted when the benchmark's result is computed on the test period (below): there, 96% of it is a purchase abroad, so one field finds it.

Legit look-alikes (legit transactions that resemble fraud): trips abroad (263,797 transactions; 33,839 in the test period), domestic trips (446,047; 58,182) and new subscriptions (114,217; 15,111). Trips take real travel time and time zones into account, and some include a hotel charge, taxi rides or a booking made before the trip.

The bank reacts. Every fraud episode gets a time when the bank notices it (hours for a stolen card, days to weeks for fraud found on the statement). The bank then blocks the card, declines the fraudster's next attempts (2–10 after a stolen or counterfeit card) with codes such as "Card Blocked," or "Do Not Honor,", and the owner gets a new card after a median of 4.9 days. Until then the owner's own purchases do not happen, except subscriptions and online shops that keep the card on file. In total: 12,585 blocks. The bank also reissues 10% of the cards exposed in a breach (20–90 days after the breach), and rarely declines a legit purchase (0.1%), which the owner usually retries.

Files

File What it is
data/part-00.parquet … part-12.parquet every transaction, in the order models read them (card, then time); read them as one table
episodes.parquet one row per added fraud episode: episode, card, kind, compromised_at, stolen_at
reissues.parquet cards the bank reissued after a breach: card, exposed_at, new_card_active_at
LICENSE, NOTICE the licence (Apache 2.0, copyright Toloka AI BV) and the attribution notices: what we changed in IBM's data and where the city coordinates come from
FINGERPRINT.json counts per split and pattern, library versions, settings, and sha256 hashes to check a rebuild
baselines/ the baselines: their test and validation scores, the transformer weights and the XGBoost model (below)
import pandas as pd
df = pd.read_parquet("data/")                      # or polars: pl.read_parquet("data/*.parquet")
test = df[df["split"] == "test"]

Columns

Column Type Meaning
row_id int64 position in the dataset's order (card, then time); score files use it
user, card_index, card int IBM's cardholder and card; card = user * 10 + card_index. A replaced card keeps its card id (one account)
timestamp timestamp local date and time of the transaction, to the minute (no time zone, as in IBM's data)
amount float amount in $; negative = refund
use_chip string "Chip Transaction", "Swipe Transaction" or "Online Transaction"
mcc int32 merchant category code
merchant_id int64 IBM's anonymous merchant id ("Merchant Name" in IBM's file)
merchant_city, merchant_state string place; for purchases abroad the state is the country; online purchases have the city " ONLINE" (as in IBM's file) and an empty state
errors string error or decline code(s) of the attempt, in IBM's format with a trailing comma, e.g. "Bad CVV," or "Card Blocked,"; empty = no error
is_fraud int8 1 = fraud
scenario_id, scenario int8, string the pattern or look-alike the transaction belongs to (0 = ordinary legit; table above)
origin string ibm (IBM's row as it is), ibm_moved_by_trip (IBM's row whose place a trip changed), ibm_retimed_after_trip (IBM's row moved later because the traveller was not back yet), ibm_declined_by_bank (IBM's row declined because the card was blocked), added (added by the generator)
split string train, validation or test (below)
episode int32 id of the added fraud episode the row belongs to (episodes.parquet); −1 = none
is_probe bool a fraudster's small test payment

Splits

  • train: every transaction before 2018, plus January–June 2018 for 80% of the cards (21,766,782 transactions).
  • validation: January–June 2018 for the other 20% of the cards (786 cards, 165,592 transactions). Use it to pick models and to fix an alert line in advance.
  • test: every transaction from July 2018 to March 2020 (3,004,926 transactions on 5,205 cards). A model scores each test transaction from that card's preceding history (the training years included).

How to evaluate

A model gives every test transaction a score (a number; higher = more suspicious). The benchmark's result is fraud caught: the share of the test period's fraud the model catches when its alerts hold at most 5 legit transactions per caught fraud. Each model gets its own alert line: sort the test transactions by the model's score, highest first, and walk down the list while the alerts contain at most 5 legit transactions for every caught fraud. Equal scores are never split. Legit transactions are every test row with is_fraud = 0, look-alikes included. IBM's original fraud is taken out of the list before this: it counts neither as fraud (caught or missed) nor as a false alarm. The views below differ in which fraud counts.

View Fraud that counts
headline the fraud we added, without the attempts on a blocked card (the bank has already stopped them); IBM's original fraud left out
without probes the headline without the test payments of distributed testing and network waves
with blocked-card attempts the headline plus the attempts on a blocked card
rarer fraud the headline at 2 false alarms per caught fraud
alert line fixed in advance the alert line set on the validation set, then applied to the test period
python evaluate.py --data <dataset folder> --scores run1.parquet run2.parquet run3.parquet --dev-scores dev1.parquet dev2.parquet dev3.parquet

A scores file has one row per transaction: row_id and score (higher = more suspicious). evaluate.py is in the code repository (https://github.com/Toloka/CardHistory-Fraud).

Baselines (fraud caught, %; transformers: mean of 3 training runs):

Model Headline Without probes With blocked-card attempts Rarer fraud Alert line fixed in advance
Teacher 5M: transformer that reads the card's last 128 transactions, no hand-made features 85.0 75.3 93.6 78.8 84.1
Student 2.6M: the teacher cut to 3 of its 6 layers, distilled 85.0 75.0 93.7 78.8 84.2
Student 0.4M: 3 layers × 96, distilled 83.6 73.1 93.0 77.1 82.7
Student 0.4M trained on the labels alone 79.7 67.1 91.1 73.2 78.1
XGBoost with 46 hand-made features 76.1 60.4 90.7 68.2 74.7

Teacher 5M has 6 layers of width 256; Student 2.6M is Teacher 5M with its layers 0, 1 and 5, distilled from it; Student 0.4M has 3 layers of width 96 (the names count the parameters outside the embedding tables). All three read the card's last 128 transactions as they are, with no hand-made features; the students learn from Teacher 5M seed 0.

The files behind this table are in baselines/: the test and validation scores of every model and seed (baselines/scores/, row_id and score; evaluate.py on them gives the table exactly), the weights of the 12 transformers (baselines/weights/*.safetensors, with each model's configuration and training recipe in the file's metadata) and the XGBoost model (baselines/weights/xgboost-geo.json). The code to prepare the inputs, score, and retrain every model is in the code repository (https://github.com/Toloka/CardHistory-Fraud).

How it was built

The generator (generator/ in the code repository) reads IBM's card_transaction.v1.csv and adds the patterns, look-alikes and the bank's reaction from fixed random seeds. IBM's rows keep their values, labels and quirks, and change only where an added event requires it: a trip moves the owner's purchases to the places he visits (274,110 rows, origin ibm_moved_by_trip), a purchase may wait until the traveller is back (5,383 rows), and while a blocked card waits for its replacement the owner's own purchases do not happen (85,938 IBM rows removed) or are declined (14,105 rows). Every setting is listed, with what it means, in PARAMS and BANK in generator/build.py.

python generator/make_dataset.py --ibm-csv card_transaction.v1.csv --out dataset/

The build takes about 10 minutes and under 8 GB of memory. With the library versions in FINGERPRINT.json (Python 3.13, NumPy 2.5.3, Polars 1.36.1, PyArrow 26.0.0) it gives exactly this dataset: compare sha256_core_arrays in your FINGERPRINT.json with ours. Other NumPy versions may draw different random numbers. To make your own variant (rarer fraud, other patterns, a different bank), change PARAMS or BANK.

Reviewed by card-fraud practitioners

Card-fraud practitioners from fraud operations and investigations reviewed an earlier build in two steps: a blind check (card histories to mark as fraud or legit, without knowing what was added) and a review of every assumption behind the data. Their clearest request was a bank that reacts to fraud. This release implements their main requests, and we checked each one against their numbers on the built data:

They asked for What the data does Measured on this build
A bank that reacts blocks the card, declines the fraudster's next attempts, issues a new card 12,585 blocks; a new card after a median of 4.9 days
Realistic travel door-to-door travel time and time zones on trips no impossible moves on trips (0 of 78,790 city changes)
One labelling rule every transaction the fraudster makes is fraud, test payments included no unlabelled test payments
Counterfeit vs stolen cards counterfeit cards mostly swiped, stolen cards mostly used with the chip 73% swiped (their range: 60–90%); 76% chip (70–80%)
Realistic card testing $0.10–3, minutes apart, about 60% declined 2.0 minutes apart; 59% declined
Fraud that keeps its own hours more online fraud at night 24.9% of online fraud at night (their range: 20–30%)
Stolen cards that spend like thieves near home, a small first purchase, then large and growing amounts 22 km from home (median); amounts grow in 98%

Known simplifications and limitations

  • Synthetic data. The legit spending is IBM's simulation and the fraud is added. It follows published fraud patterns and the practitioners' numbers, but absolute numbers will differ on a real portfolio.
  • IBM's base-data quirks are kept, for example hotels in unexpected cities, refunds recorded before the purchase, and moves between distant cities that no traveller could make (in IBM's own rows; none on the added trips).
  • Labels are complete and immediate. In a bank they arrive days to months later, and small or declined attempts often stay unlabelled.
  • More fraud than in reality: 0.42% of transactions, against under 0.1% in real portfolios. The "rarer fraud" view helps.
  • Signals a bank has but the data lacks: cash-machine, crypto or gift-card cash-outs (IBM's data has no such merchants), devices, IP addresses, 3-D Secure checks, logins and contact changes. A breached merchant is visible only across cards.
  • Some patterns are small or regular on purpose: one purchase per breached card, testing waves of 20–60 cards.

Licence and attribution

Copyright 2026 Toloka AI BV, released under the Apache License 2.0. The dataset builds on IBM's TabFormer data (https://github.com/IBM/TabFormer), which IBM released under the Apache License 2.0: it keeps the transactions of IBM's card_transaction.v1.csv and changes them as described in "How it was built" (every row's origin says whether and how). It is not affiliated with or endorsed by IBM. The city coordinates the generator uses for travel times come from GeoNames (https://www.geonames.org, CC BY 4.0) for cities outside the US and from the zipcodes package (MIT licence; ZIP-code centres from public sources) for US cities. The NOTICE file lists the changes and sources in full.

Authors

  • Igor Tica: generator, models, experiments
  • Oleg Zubkov: project lead, expert review design and analysis, writing

Citation

If you use this dataset, please cite:

@misc{cardhistoryfraud2026,
  title  = {CardHistory-Fraud: card fraud that hides in the history},
  author = {Tica, Igor and Zubkov, Oleg},
  year   = {2026},
  note   = {Toloka},
  url    = {https://huggingface.co/datasets/toloka/CardHistory-Fraud}
}

IBM's TabFormer: Padhi et al., Tabular Transformers for Modeling Multivariate Time Series, ICASSP 2021 (arXiv:2011.01843); Altman, Synthesizing Credit Card Transactions (arXiv:1910.03033).

Downloads last month
33

Papers for toloka/CardHistory-Fraud