IP Library Granted Patent US 12,373,670
Granted Patent B2
US 12,373,670 · App. 18/637,142 · Granted Jul 29, 2025

Interleaved sequence recurrent neural networks for fraud detection

Inventors: Bernardo José Amaral Nunes de Almeida Branco (Lisbon, PT); Pedro Caldeira Abreu (London, GB); Ana Sofia Leal Gomes (Lisbon, PT); Mariana S. C. Almeida (Lisbon, PT); João Tiago Barriga Negra Ascensão (Lisbon, PT); Pedro Gustavo Santos Rodrigues Bizarro (Lisbon, PT)
Assignee: Feedzai—Consultadoria e Inovação Tecnológica, S.A.
G06N3/045G06F7/08G06F16/2379G06F16/27G06N3/042G06N3/044G06N3/063G06N3/08G06Q20/4016G06Q20/409G06Q40/12
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,373,670
App. No.
18/637,142
Granted
Jul 29, 2025
Kind
B2
Abstract

A process for handling interleaved sequences using RNNs includes receiving data of a first transaction, retrieving a first state (e.g., a default or a saved RNN state for an entity associated with the first transaction), and determining a new second state and a prediction result using the first state and an input data based on the first transaction. The process includes updating the saved RNN state for the entity to be the second state. The process includes receiving data of a second transaction, where the second transaction is associated with the same entity as the first transaction. The process unloops an RNN associated with the saved RNN state including by: retrieving the second state, determining a new third state and a prediction result using the second state and an input data based the second transaction, and updating the saved RNN state for the entity to be the third state.

Claims (86)

1. A method, comprising:

receiving data of a first transaction;

retrieving a first state;

providing the retrieved first state and an input data based on the first transaction to a machine learning trained recurrent neural network model to determine a second state including by:

transforming an input vector into a new vector, and

representing the new vector in a space to feed at least one layer of the recurrent neural network model;

determining a prediction result associated with a fraud threat of the first transaction using at least (i) the first state and (ii) the input data based on the first transaction;

updating a saved recurrent neural network state for an entity associated with the first transaction to be the second state;

receiving data of a second transaction, wherein the second transaction is associated with the entity; and

unlooping a neural network associated with the saved recurrent neural network state including by:

retrieving the second state;

providing the second state and an input data based on the second transaction to the machine learning trained recurrent neural network model to determine a third state;

determining a prediction result associated with a fraud threat of the second transaction using at least (i) the second state and (ii) the input data based on the second transaction, wherein the second transaction is approved based at least in part on a determination that the prediction result associated with the fraud threat of the second transaction is below a threshold; and

updating the saved recurrent neural network state for the entity to be the third state.

2. The method of claim 1 , wherein:

the first transaction and the second transaction are included in an interleaved sequence of transactions; and

the interleaved sequence of transactions includes transactions received in an order in which adjacent transactions are not necessarily associated with a same entity.

3. The method of claim 2 , wherein the interleaved sequence of transactions includes:

an initial transaction received at a first time, the initial transaction being associated with a first entity;

a middle transaction received at a second time after the first time, the middle transaction being associated with a second entity different from the first entity; and

a later transaction received at a third time after the second time, the later transaction being associated with the first entity.

4. The method of claim 2 , further comprising:

receiving data of a third transaction, wherein the third transaction is associated with an entity different from the first transaction, and the third transaction is included in the interleaved sequence of transactions;

retrieving a first state that is a saved recurrent neural network state for the entity associated with the third transaction;

providing the retrieved first state and an input data based on data of the third transaction to a machine learning trained recurrent neural network model to determine a new second state;

determining a prediction result associated with a fraud threat of the third transaction using at least (i) the second state and (ii) the input data based on the third transaction; and

updating the saved recurrent neural network state for the entity associated with the third transaction to be the second state.

5. The method of claim 1 , wherein the saved recurrent neural network state for an entity associated with the first transaction is retrieved from at least one of: gated recurrent unit (GRU) cell or a Long Short-Term Memory (LSTM) cell.

6. The method of claim 1 , wherein data of the first transaction includes at least one of: a numerical field, a categorical field, a timestamp field, or an entity identification field.

7. The method of claim 1 , wherein the first state includes an encoding of transactions associated with the entity associated with the first transaction.

8. The method of claim 1 , further comprising batch processing transactions including by continuously and concurrently reading batches from at least one database and inserting the batch processing transactions into a queue for processing.

9. The method of claim 8 , wherein the batch processing is performed in offline training.

10. The method of claim 8 , further comprising:

building a first database of entities meeting a first criterion;

building a second database of entities meeting a second criterion; and

building a validation dataset using a representative sample of entities from the first database and the second database during a validation period arranged in descending order in number of transactions.

11. The method of claim 10 , wherein the first criterion includes containing at least one fraudulent transaction and the second criterion is not containing any fraudulent transactions.

12. The method of claim 10 , wherein building the validation dataset includes using a parameter defining a proportion of information to use from the first database and the second database in response to a determination that there is class imbalance between the first database and the second database.

13. The method of claim 10 , wherein the representative sample of entities includes a random sample.

14. The method of claim 1 , further comprising:

in response to a transaction being a scorable instance, performing a forward pass and a backward pass; and

in response to a transaction being a non-scorable instance, performing a forward pass without a backward pass.

15. The method of claim 1 , further comprising performing a batch inference process including by:

obtaining a current state for a given card identifier; and

obtaining a new state for the card identifier and a score for a respective transaction.

16. The method of claim 1 , wherein further comprising, prior to retrieving a first state that is a saved recurrent neural network state for an entity associated with the first transaction, pre-processing the input data based on data of the first transaction.

17. The method of claim 16 , wherein the pre-processing includes at least one of:

creating at least one of a time feature or an entity-related feature;

fitting transformer objects for normalization, bucketing, and indexing;

applying transformers to training, validation, and test datasets;

creating a list of chronologically-sorted sequences of transactions based at least in part on the training, validation, and test datasets;

removing those sequences of transactions that do not contain any transaction in a period of interest; and

storing the sequences of transactions.

18. A system, comprising:

a processor configured to:

receive data of a first transaction;

retrieve a first state;

provide the retrieved first state and an input data based on the first transaction to a machine learning trained recurrent neural network model to determine a second state including by:

transforming an input vector into a new vector, and

representing the new vector in a space to feed at least one layer of the recurrent neural network model;

determine a prediction result associated with a fraud threat of the first transaction using at least (i) the first state and (ii) the input data based on the first transaction;

update a saved recurrent neural network state for an entity associated with the first transaction to be the second state;

receive data of a second transaction, wherein the second transaction is associated with the entity; and

unloop a neural network associated with the saved recurrent neural network state including by:

retrieving the second state;

providing the second state and an input data based on the second transaction to the machine learning trained recurrent neural network model to determine a third state;

determining a prediction result associated with a fraud threat of the second transaction using at least (i) the second state and (ii) the input data based on the second transaction, wherein the second transaction is approved based at least in part on a determination that the prediction result associated with the fraud threat of the second transaction is below a threshold; and

updating the saved recurrent neural network state for the entity to be the third state.

19. The system of claim 18 , wherein:

each subset is stored in a separate database;

a test dataset is used to pick a model; and

the test dataset includes a representative sample of entities from a first database and a second database arranged in descending order in number of transactions.

20. A computer program product embodied in a non-transitory computer readable medium and comprising computer instructions for:

receiving data of a first transaction;

retrieving a first state;

providing the retrieved first state and an input data based on the first transaction to a machine learning trained recurrent neural network model to determine a second state including by:

transforming an input vector into a new vector, and

representing the new vector in a space to feed at least one layer of the recurrent neural network model;

determining a prediction result associated with a fraud threat of the first transaction using at least (i) the first state and (ii) the input data based on the first transaction;

updating a saved recurrent neural network state for an entity associated with the first transaction to be the second state;

receiving data of a second transaction, wherein the second transaction is associated with the entity; and

unlooping a neural network associated with the saved recurrent neural network state including by:

retrieving the second state;

providing the second state and an input data based on the second transaction to the machine learning trained recurrent neural network model to determine a third state;

determining a prediction result associated with a fraud threat of the second transaction using at least (i) the second state and (ii) the input data based on the second transaction, wherein the second transaction is approved based at least in part on a determination that the prediction result associated with the fraud threat of the second transaction is below a threshold; and

updating the saved recurrent neural network state for the entity to be the third state.

Continuity (3)
Continuation 17174046 · Feb 11, 2021
Provisional Application 62975614 · Feb 12, 2020
Related Publication 20240303468A1 · Sep 12, 2024
References Cited (61)
US 6330546B1 · Gopinathan · 2001 [cited by examiner]
US 9747288B1 · Beckford · 2017 [cited by examiner]
US 10482466B1 · Walters · 2019 [cited by examiner]
US 10990645B1 · Shi · 2021 [cited by applicant]
US 11282077B2 · Fenton · 2022 [cited by examiner]
US 11290452B2 · Leddy, III · 2022 [cited by examiner]
US 11410047B2 · Ben Kimon · 2022 [cited by examiner]
US 11423143B1 · Lin · 2022 [cited by examiner]
US 11431741B1 · Lin · 2022 [cited by examiner]
US 11451670B2 · Ahmadi · 2022 [cited by examiner]
US 20010037321A1 · Fishman · 2001 [cited by examiner]
US 20030062411A1 · Chung · 2003 [cited by applicant]
US 20030208439A1 · Rast · 2003 [cited by examiner]
US 20040088298A1 · Zou · 2004 [cited by examiner]
US 20070204033A1 · Bookbinder · 2007 [cited by examiner]
US 20130110766A1 · Promhouse · 2013 [cited by examiner]
US 20140105488A1 · Geng · 2014 [cited by applicant]
US 20160012135A1 · Wang · 2016 [cited by applicant]
US 20170011085A1 · Douros · 2017 [cited by examiner]
US 20170230404A1 · Ramos de Araujo · 2017 [cited by examiner]
US 20180075082A1 · Sawhney · 2018 [cited by examiner]
US 20210192524A1 · Saleh · 2021 [cited by examiner]
US 20210200955A1 · Ben Kimon · 2021 [cited by examiner]
US 20220383168A1 · Wang · 2022 [cited by applicant]
Abdallah et al., Fraud Detection System: A Survey, Journal of Network and Computer Applications 68 (2016) 90-113, Apr. 13, 2016. [cited by applicant]
Ando et al., Detecting Fraudulent Behavior Using Recurrent Neural Networks, Computer Security Symposium 2016, Oct. 11-13, 2016, pp. 805-810. [cited by applicant]
Arun Mannaly, HaloDB, A Fast, Log Structured Key-Value Store, 2018. [cited by applicant]
Author Unknown, Third Party Submission, Jan. 5, 2022. [cited by applicant]
Bahnsen et al., Feature Engineering Strategies for Credit Card Fraud Detection, Expert Systems with Applications 51 (2016) 134-142. [cited by applicant]
Benard Jacobus Wiese, Credit Card Transactions, Fraud Detection, and Machine Learning: Modelling Time with LSTM Recurrent Neural Networks, Aug. 2007. [cited by applicant]
Bhattacharyya et al., Data Mining for Credit Card Fraud: A Comparative Study, Decision Support Systems 50 (2011) 602-613, Aug. 18, 2010. [cited by applicant]
Bolton et al., Statistical Fraud Detection: A Review, Statistical Science, 2002, vol. 17, No. 3, 235-255. [cited by applicant]
Brebisson et al., Artificial Neural Networks Applied to Taxi Destination Predication, Sep. 21, 2015. [cited by applicant]
Chen et al., XGBoost: A Scalable Tree Boosting System, KDD '16, Aug. 13-17, 2016, 785-794, San Francisco, CA, USA. [cited by applicant]
Cho et al., Learning Phrase Representations Using RNN Encoder-Decoder for Statistical Machine Translation, Sep. 3, 2014. [cited by applicant]
Facebook, Welcome to RocksDB, Jun. 13, 2020. [cited by applicant]
Feedzai, This is a Story about What Happens when Deep Learning and Fraud Detection Come Together. <hubs.ly/H0l5jqwO>. Oct. 5, 2019. [cited by applicant]
Google, Data Preparation and Feature Engineering in ML, Jul. 11, 2019. [cited by applicant]
Guo et al., Neural Data Mining for Credit Fraud Detection, Proceedings of the Seventh International Conference on Machine Learning and Cybernetics, Kunming, Jul. 12-15, 2008. [cited by applicant]
Hochreiter et al., Long Short-Term Memory, Neural Computation 9(8):1735-1780, 1997. [cited by applicant]
Howard Chu, MDB: A Memory-Mapped Database and Backend for OpenLDAP, Symas Corp., OpenLDAP Project, 2011. [cited by applicant]
Jason Brownlee, A Gentle Introduction to RNN Unrolling, Machine Learning Mastery, Sep. 6, 2017. [cited by applicant]
Johannes Jurgovsky, Context-Aware Credit Card Fraud Detection, Sep. 2019. [cited by applicant]
Jurgovsky et al., Sequence Classification for Credit-card Fraud Detection, Expert Systems with Applications 100 (2018) 234-245, Jan. 23, 2018. [cited by applicant]
Ke et al., LightGBM: A Highly Efficient Gradient Boosting Decision Tree, 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. [cited by applicant]
Lecun et el., Deep Learning, ResearchGate, Nature, vol. 521, May 28, 2015, pp. 436-444. [cited by applicant]
Li et al., A Time Attention based Fraud Transaction Detection Framework, Mar. 27, 2020, pp. 1-7. [cited by applicant]
Li et al., Transaction Fraud Detection Using GRU-centered Sandwich-structured Model, 2017. [cited by applicant]
Li et al., Transaction Fraud Detection Using GRU-centered Sandwich-structured Model, May 2018. [cited by applicant]
Long et al., Fully Convolutional Networks for Semantic Segmentation, Mar. 8, 2015. [cited by applicant]
Nic Watson, Universal Python Binding for the LMDB “Lightning” Database, 2011. [cited by applicant]
Nilson, Card Fraud Losses Reach $27.85 Billion, Posted Nov. 18, 2019, Issue 1164, Nov. 2019. [cited by applicant]
Oneil et al., The Log-Structured Merge-Tree (LSM-Tree), Acta Inf. 33, 4 (1996), pp. 351-385. [cited by applicant]
Pedro Abreu, Casting Deep Learning Nets on Financial Crime, from <https://feedzai.com/blog/casting-deep-nets-on-financial-crime/>, Sep. 2019. [cited by applicant]
Pedro Caldeira Abreu, Casting Deep Nets on Financial Crime, Jan. 16, 2019. [cited by applicant]
Pedro Caldeira Abreu, Images 1-1 through 3-6, Jan. 16, 2019. [cited by applicant]
Pinto et al., Automatic Model Monitoring for Data Streams, KDD-ADF-2019—Aug. 5, 2019, Aug. 12, 2019. [cited by applicant]
Rumelhart et al., Learning Representations by Back-Propagating Errors, Nature 323, 6088 (1986), 533-536. [cited by applicant]
Schmidhuber et al., Deep Learning in Neural Networks: An Overview, Oct. 8, 2014, pp. 1-88. [cited by applicant]
Tensorflow, Model Optimization, Jan. 11, 2021. [cited by applicant]
Whitrow et al., Transaction Aggregation as a Strategy for Credit Card Fraud Detection, 2009, Data Mining and Knowledge Discovery 18 (Feb. 2009), pp. 30-55. [cited by applicant]