IDEAS home Printed from https://ideas.repec.org/p/bca/bocawp/24-15.html
   My bibliography  Save this paper

Finding a Needle in a Haystack: A Machine Learning Framework for Anomaly Detection in Payment Systems

Author

Listed:
  • Ajit Desai
  • Anneke Kosse
  • Jacob Sharples

Abstract

We propose a flexible machine learning (ML) framework for real-time transaction monitoring in high-value payment systems (HVPS), which are a central piece of a country’s financial infrastructure. This framework can be used by system operators and overseers to detect anomalous transactions, which—if caused by a cyber attack or an operational outage and left undetected—could have serious implications for the HVPS, its participants and the financial system more broadly. Given the substantial volume of payments settled each day and the scarcity of actual anomalous transactions in HVPS, detecting anomalies resembles an attempt to find a needle in a haystack. Therefore, our framework uses a layered approach. In the first layer, a supervised ML algorithm is used to identify and separate “typical” payments from “unusual” payments. In the second layer, only the unusual payments are run through an unsupervised ML algorithm for anomaly detection. We test this framework using artificially manipulated transactions and payments data from the Canadian HVPS. The ML algorithm employed in the first layer achieves a detection rate of 93%, marking a significant improvement over commonly used econometric models. Moreover, the ML algorithm used in the second layer marks the artificially manipulated transactions as nearly twice as suspicious as the original transactions, proving its effectiveness.

Suggested Citation

  • Ajit Desai & Anneke Kosse & Jacob Sharples, 2024. "Finding a Needle in a Haystack: A Machine Learning Framework for Anomaly Detection in Payment Systems," Staff Working Papers 24-15, Bank of Canada.
  • Handle: RePEc:bca:bocawp:24-15
    as

    Download full text from publisher

    File URL: https://www.bankofcanada.ca/2024/05/staff-working-paper-2024-15/
    File Function: Abstract
    Download Restriction: no

    File URL: https://www.bankofcanada.ca/wp-content/uploads/2024/05/swp2024-15.pdf
    File Function: Full text
    Download Restriction: no
    ---><---

    Other versions of this item:

    References listed on IDEAS

    as
    1. Martin, Antoine & McAndrews, James, 2008. "Liquidity-saving mechanisms," Journal of Monetary Economics, Elsevier, vol. 55(3), pages 554-567, April.
    2. Martin J. Osborne & Ariel Rubinstein, 1994. "A Course in Game Theory," MIT Press Books, The MIT Press, edition 1, volume 1, number 0262650401, April.
    3. Bech, Morten L. & Garratt, Rod, 2003. "The intraday liquidity management game," Journal of Economic Theory, Elsevier, vol. 109(2), pages 198-219, April.
    4. Christopher Becher & Marco Galbiati & Merxe Tudela, 2008. "The timing and funding of CHAPS sterling payments," Economic Policy Review, Federal Reserve Bank of New York, vol. 14(Sep), pages 113-133.
    5. James Chapman & Jonathan Chiu & Sajjad Jafri & Héctor Pérez Saiz, 2015. "Public Policy Objectives and the Next Generation of CPA Systems: An Analytical Framework," Discussion Papers 15-6, Bank of Canada.
    6. Alexander Chaudhry & Anneke Kosse & Karen Sondergard, 2021. "Behaviour in the Canadian large-value payment system: COVID-19 vs. the global financial crisis," Staff Analytical Notes 2021-7, Bank of Canada.
    7. Arévalo, Franklim & Barucca, Paolo & Téllez-León, Isela-Elizabeth & Rodríguez, William & Gage, Gerardo & Morales, Raúl, 2022. "Identifying clusters of anomalous payments in the salvadorian payment system," Latin American Journal of Central Banking (previously Monetaria), Elsevier, vol. 3(1).
    8. Docherty, Peter & Wang, Gehong, 2010. "Using synthetic data to evaluate the impact of RTGS on systemic risk in the Australian payments system," Journal of Financial Stability, Elsevier, vol. 6(2), pages 103-117, June.
    9. León, Carlos, 2020. "Detecting anomalous payments networks: A dimensionality-reduction approach," Latin American Journal of Central Banking (previously Monetaria), Elsevier, vol. 1(1).
    10. Luis Gerardo Gage & Raúl Morales-Resendiz & John Arroyo & Jeniffer Rubio & Paolo Barucca, 2022. "Classifying payment patterns with artificial neural networks: an autoencoder approach," IFC Bulletins chapters, in: Bank for International Settlements (ed.), Machine learning in central banking, volume 57, Bank for International Settlements.
    11. Morten L. Bech & Rodney J. Garratt, 2012. "Illiquidity in the Interbank Payment System Following Wide-Scale Disruptions," Journal of Money, Credit and Banking, Blackwell Publishing, vol. 44(5), pages 903-929, August.
    12. León, Carlos & Barucca, Paolo & Acero, Oscar & Gage, Gerardo & Ortega, Fabio, 2020. "Pattern recognition of financial institutions’ payment behavior," Latin American Journal of Central Banking (previously Monetaria), Elsevier, vol. 1(1).
    13. Christopher McMahon & Donald McGillivray & Ajit Desai & Francisco Rivadeneyra & Jean-Paul Lam & Thomas Lo & Danica Marsden & Vladimir Skavysh, 2022. "Improving the Efficiency of Payments Systems Using Quantum Computing," Staff Working Papers 22-53, Bank of Canada.
    14. Ajit Desai & Zhentong Lu & Hiru Rodrigo & Jacob Sharples & Phoebe Tian & Nellie Zhang, 2023. "From LVTS to Lynx: Quantitative Assessment of Payment System Transition," Staff Working Papers 23-24, Bank of Canada.
    15. Sabetti, Leonard & Heijmans, Ronald, 2021. "Shallow or deep? Training an autoencoder to detect anomalous flows in a retail payment system," Latin American Journal of Central Banking (previously Monetaria), Elsevier, vol. 2(2).
    16. Flood, Mark D. & Lemieux, Victoria L. & Varga, Margaret & William Wong, B.L., 2016. "The application of visual analytics to financial stability monitoring," Journal of Financial Stability, Elsevier, vol. 27(C), pages 180-197.
    17. Anneke Kosse & Zhentong Lu, 2022. "Transmission of Cyber Risk Through the Canadian Wholesale Payment System," Staff Working Papers 22-23, Bank of Canada.
    18. James, Robert & Leung, Henry & Prokhorov, Artem, 2023. "A machine learning attack on illegal trading," Journal of Banking & Finance, Elsevier, vol. 148(C).
    19. Pablo S. Castro & Ajit Desai & Han Du & Rodney Garratt & Francisco Rivadeneyra, 2021. "Estimating Policy Functions in Payments Systems Using Reinforcement Learning," Staff Working Papers 21-7, Bank of Canada.
    20. Nellie Zhang, 2015. "Changes in Payment Timing in Canada’s Large Value Transfer System," Staff Working Papers 15-20, Bank of Canada.
    21. James J. McAndrews & Samira Rajan, 2000. "The timing and funding of Fedwire funds transfers," Economic Policy Review, Federal Reserve Bank of New York, issue Jul, pages 17-32.
    22. Neville Arjani & Ronald Heijmans, 2020. "Is there anybody out there? Detecting operational outages from LVTS transaction data," Working Papers 683, DNB.
    23. Biliana Alexandrova Kabadjova & Anton Badev & Saulo Benchimol Bastos & Evangelos Benos & Freddy Cepeda- Lopéz & James Chapman & Martin Diehl & Ioana Duca-Radu & Rodney Garratt & Ronald Heijmans & Anne, 2023. "Intraday liquidity around the world," BIS Working Papers 1089, Bank for International Settlements.
    24. Desai, Ajit & Lu, Zhentong & Rodrigo, Hiru & Sharples, Jacob & Tian, Phoebe & Zhang, Nellie, 2023. "From LVTS to Lynx: Quantitative assessment of payment system transition in Canada," Journal of Payments Strategy & Systems, Henry Stewart Publications, vol. 17(3), pages 291-314, September.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Irving Fisher Committee, 2024. "Granular data: new horizons and challenges," IFC Bulletins, Bank for International Settlements, number 61.
    2. Jan Paulick & Ron Berndsen & Martin Diehl & Ronald Heijmans, 2024. "No more tears without tiers? The impact of indirect settlement on liquidity use in TARGET2," Empirica, Springer;Austrian Institute for Economic Research;Austrian Economic Association, vol. 51(2), pages 425-458, May.
    3. Biliana Alexandrova Kabadjova & Anton Badev & Saulo Benchimol Bastos & Evangelos Benos & Freddy Cepeda- Lopéz & James Chapman & Martin Diehl & Ioana Duca-Radu & Rodney Garratt & Ronald Heijmans & Anne, 2023. "Intraday liquidity around the world," BIS Working Papers 1089, Bank for International Settlements.
    4. Merrouche, Ouarda & Schanz, Jochen, 2010. "Banks' intraday liquidity management during operational outages: Theory and evidence from the UK payment system," Journal of Banking & Finance, Elsevier, vol. 34(2), pages 314-323, February.
    5. De Caux, Robert & Brede, Markus & McGroarty, Frank, 2016. "Payment prioritisation and liquidity risk in collateralised interbank payment systems," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 41(C), pages 139-150.
    6. Francisco Rivadeneyra & Nellie Zhang, 2022. "Payment Coordination and Liquidity Efficiency in the New Canadian Wholesale Payments System," Discussion Papers 2022-3, Bank of Canada.
    7. Sabetti, Leonard & Heijmans, Ronald, 2021. "Shallow or deep? Training an autoencoder to detect anomalous flows in a retail payment system," Latin American Journal of Central Banking (previously Monetaria), Elsevier, vol. 2(2).
    8. Constanza Martínez & Freddy Cepeda, 2015. "Reaction Functions of the Participants in Colombia’s Large-value Payment System," Borradores de Economia 12651, Banco de la Republica.
    9. Morten L. Bech & Antoine Martin & James J. McAndrews, 2012. "Settlement liquidity and monetary policy implementation—lessons from the financial crisis," Economic Policy Review, Federal Reserve Bank of New York, vol. 18(Mar), pages 3-20.
    10. Huberto M. Ennis & John A. Weinberg, 2007. "Interest on reserves and daylight credit," Economic Quarterly, Federal Reserve Bank of Richmond, vol. 93(Spr), pages 111-142.
    11. Joaquín Bernal R. & Freddy Cepeda L. & Fabio Ortega C, 2011. "Cuantificación de la contribución de las fuentes de liquidez en el Sistema de Pagos de Alto Valor en Colombia: una aproximación preliminar," Borradores de Economia 9197, Banco de la Republica.
    12. Angelo Baglioni & Andrea Monticini, 2013. "Why Does the Interest Rate Decline Over the Day? Evidence from the Liquidity Crisis," Journal of Financial Services Research, Springer;Western Finance Association, vol. 44(2), pages 175-186, October.
    13. James T. E. Chapman & Ajit Desai, 2023. "Macroeconomic Predictions Using Payments Data and Machine Learning," Forecasting, MDPI, vol. 5(4), pages 1-32, November.
    14. Clara Machado & Carlos León & Miguel Sarmiento & Freddy Cepeda & Orlando Chipatecua & Jorge Cely, 2011. "Riesgo Sistémico Y Estabilidad Del Sistema De Pagos De Alto Valor En Colombia: Análisis Bajo," Revista ESPE - Ensayos sobre Política Económica, Banco de la Republica de Colombia, vol. 29(65), pages 106-175, June.
    15. Alexandrova-Kabadjova Biliana & Solís-Robleda Francisco, 2013. "Managing Intraday Liquidity: The Mexican Experience," Working Papers 2013-01, Banco de México.
    16. Ball, Alan & Denbee, Edward & Manning, Mark & Wetherilt, Anne, 2011. "Financial Stability Paper No 11: Intraday Liquidity - Risk and Regulation," Bank of England Financial Stability Papers 11, Bank of England.
    17. León, Carlos & Barucca, Paolo & Acero, Oscar & Gage, Gerardo & Ortega, Fabio, 2020. "Pattern recognition of financial institutions’ payment behavior," Latin American Journal of Central Banking (previously Monetaria), Elsevier, vol. 1(1).
    18. Shaun Byck & Ronald Heijmans, 2020. "How much liquidity would a liquidity-saving mechanism save if a liquidity-saving mechanism could save liquidity? A simulation approach for Canada's large-value payment system Shaun Byck," Working Papers 682, DNB.
    19. Nellen, Thomas, 2019. "Intraday liquidity facilities, late settlement fee and coordination," Journal of Banking & Finance, Elsevier, vol. 106(C), pages 124-131.
    20. Foote, Elizabeth, 2014. "Information asymmetries and spillover risk in settlement systems," Journal of Banking & Finance, Elsevier, vol. 42(C), pages 179-190.

    More about this item

    Keywords

    Digital currencies and fintech; Financial institutions; Financial services; Financial system regulation and policies; Payment clearing and settlement systems;
    All these keywords.

    JEL classification:

    • C45 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods: Special Topics - - - Neural Networks and Related Topics
    • C55 - Mathematical and Quantitative Methods - - Econometric Modeling - - - Large Data Sets: Modeling and Analysis
    • D83 - Microeconomics - - Information, Knowledge, and Uncertainty - - - Search; Learning; Information and Knowledge; Communication; Belief; Unawareness
    • E42 - Macroeconomics and Monetary Economics - - Money and Interest Rates - - - Monetary Sytsems; Standards; Regimes; Government and the Monetary System

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:bca:bocawp:24-15. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: the person in charge (email available below). General contact details of provider: https://edirc.repec.org/data/bocgvca.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.