IDEAS home Printed from
   My bibliography  Save this paper

Shallow or deep? Detecting anomalous flows in the Canadian Automated Clearing and Settlement System using an autoencoder


  • Leonard Sabetti
  • Ronald Heijmans


Financial market infrastructures and their participants play a crucial role in the economy. Financial or operational challenges faced by one participant can have contagion effects and pose risks to the broader financial system. Our paper applies (deep) neural networks (autoencoder) to detect anomalous flows from payments data in the Canadian Automated Clearing and Settlement System (ACSS) similar to Triepels et al. (2018). We evaluate several neural network architecture setups based on the size and number of hidden layers, as well as differing activation functions dependent on how the input data was normalized. As the Canadian financial system has not faced bank runs in recent memory, we train the models on Å“normal data and evaluate out-of-sample using test data based on historical anomalies as well as simulated bank runs. Our out-of-sample simulations demonstrate the autoencoders performance in different scenarios, and results suggest that the autoencoder detects anomalous payment flows reasonably well. Our work highlights the challenges and trade-offs in employing a workhorse deep-learning model in an operational context and raises policy questions around how such outlier signals can be used by the system operator in complying with the prominent payment systems guidelines and by financial stability experts in assessing the impact on the financial system of a financial institution that shows extreme behaviour.Â

Suggested Citation

  • Leonard Sabetti & Ronald Heijmans, 2020. "Shallow or deep? Detecting anomalous flows in the Canadian Automated Clearing and Settlement System using an autoencoder," Working Papers 681, DNB.
  • Handle: RePEc:dnb:dnbwpp:681

    Download full text from publisher

    File URL:
    Download Restriction: no

    References listed on IDEAS

    1. Chakraborty, Chiranjit & Joseph, Andreas, 2017. "Machine learning at central banks," Bank of England working papers 674, Bank of England.
    2. Avdjiev, S. & Giudici, P. & Spelta, A., 2019. "Measuring contagion risk in international banking," Journal of Financial Stability, Elsevier, vol. 42(C), pages 36-51.
    3. Fuchun Li & Héctor Pérez Saiz, 2016. "Measuring Systemic Risk Across Financial Market Infrastructures," Staff Working Papers 16-10, Bank of Canada.
    4. Richard Heuver & Ron TriepelsTriepels, 2019. "Liquidity stress detection in the European banking sector," DNB Working Papers 642, Netherlands Central Bank, Research Department.
    5. Ronald Heijmans & Richard Heuver, 2011. "Is this bank ill? The diagnosis of doctor TARGET2," DNB Working Papers 316, Netherlands Central Bank, Research Department.
    6. Li, Fuchun & Perez-Saiz, Hector, 2018. "Measuring systemic risk across financial market infrastructures," Journal of Financial Stability, Elsevier, vol. 34(C), pages 1-11.
    7. Boyd, John H. & De Nicolò, Gianni & Rodionova, Tatiana, 2019. "Banking crises and crisis dating: Disentangling shocks and policy responses," Journal of Financial Stability, Elsevier, vol. 41(C), pages 45-54.
    8. Beutel, Johannes & List, Sophia & von Schweinitz, Gregor, 2019. "Does machine learning help us predict banking crises?," Journal of Financial Stability, Elsevier, vol. 45(C).
    Full references (including those not matched with items on IDEAS)


    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.

    Cited by:

    1. 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.
    2. 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).
    3. Irving Fisher Committee, 2022. "Machine learning in central banking," IFC Bulletins, Bank for International Settlements, number 57.

    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. 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).
    2. Biswas, Swarnava S. & Gómez, Fabiana, 2018. "Contagion through common borrowers," Journal of Financial Stability, Elsevier, vol. 39(C), pages 125-132.
    3. Ronald Heijmans & Chen Zhou, 2019. "Outlier detection in TARGET2 risk indicators," DNB Working Papers 624, Netherlands Central Bank, Research Department.
    4. Radoslav Raykov, 2021. "Systemic Risk and Portfolio Diversification: Evidence from the Futures Market," Staff Working Papers 21-50, Bank of Canada.
    5. Chau, Michael & Lin, Chih-Yung & Lin, Tse-Chun, 2020. "Wisdom of crowds before the 2007–2009 global financial crisis," Journal of Financial Stability, Elsevier, vol. 48(C).
    6. Bitetto, Alessandro & Cerchiello, Paola & Mertzanis, Charilaos, 2023. "On the efficient synthesis of short financial time series: A Dynamic Factor Model approach," Finance Research Letters, Elsevier, vol. 53(C).
    7. Truong, Chi & Sheen, Jeffrey & Trück, Stefan & Villafuerte, James, 2022. "Early warning systems using dynamic factor models: An application to Asian economies," Journal of Financial Stability, Elsevier, vol. 58(C).
    8. Qian, Qian & Yang, Yang & Gu, Jing & Feng, Hairong, 2019. "Information authenticity, spreading willingness and credit risk contagion – A dual-layer network perspective," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 536(C).
    9. repec:zbw:bofitp:2019_008 is not listed on IDEAS
    10. Chen, Qihao & Huang, Zhuo & Liang, Fang, 2023. "Measuring systemic risk with high-frequency data: A realized GARCH approach," Finance Research Letters, Elsevier, vol. 54(C).
    11. Frame, W. Scott & Mihov, Atanas & Sanz, Leandro, 2020. "Foreign Investment, Regulatory Arbitrage, and the Risk of U.S. Banking Organizations," Journal of Financial and Quantitative Analysis, Cambridge University Press, vol. 55(3), pages 955-988, May.
    12. Joseph, Andreas & Vasios, Michalis, 2022. "OTC Microstructure in a period of stress: A Multi-layered network approach," Journal of Banking & Finance, Elsevier, vol. 138(C).
    13. Hartwig, Benny & Meinerding, Christoph & Schüler, Yves S., 2021. "Identifying indicators of systemic risk," Journal of International Economics, Elsevier, vol. 132(C).
    14. Bakkar, Yassine & De Jonghe, Olivier & Tarazi, Amine, 2023. "Does banks’ systemic importance affect their capital structure and balance sheet adjustment processes?," Journal of Banking & Finance, Elsevier, vol. 151(C).
    15. Funke, Michael & Tsang, Andrew, 2019. "The direction and intensity of China's monetary policy conduct: A dynamic factor modelling approach," BOFIT Discussion Papers 8/2019, Bank of Finland Institute for Emerging Economies (BOFIT).
    16. Li, Fei & Kang, Hao & Xu, Jingfeng, 2022. "Financial stability and network complexity: A random matrix approach," International Review of Economics & Finance, Elsevier, vol. 80(C), pages 177-185.
    17. Polyzos, Stathis & Samitas, Aristeidis & Kampouris, Ilias, 2021. "Economic stimulus through bank regulation: Government responses to the COVID-19 crisis," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 75(C).
    18. Tsang, Andrew, 2021. "Uncovering Heterogeneous Regional Impacts of Chinese Monetary Policy," MPRA Paper 110703, University Library of Munich, Germany.
    19. Ahelegbey, Daniel Felix & Giudici, Paolo & Hashem, Shatha Qamhieh, 2021. "Network VAR models to measure financial contagion," The North American Journal of Economics and Finance, Elsevier, vol. 55(C).
    20. James Chapman & Ajit Desai, 2021. "Using Payments Data to Nowcast Macroeconomic Variables During the Onset of COVID-19," Staff Working Papers 21-2, Bank of Canada.
    21. Wang, Wei & Xu, Huifu & Ma, Tiejun, 2023. "Optimal scenario-dependent multivariate shortfall risk measure and its application in risk capital allocation," European Journal of Operational Research, Elsevier, vol. 306(1), pages 322-347.

    More about this item


    Anomaly Detection; Autoencoder; Neural Network; Articial intelligence; ACSS; Financial Market Infrastructure; Retail Payments;
    All these keywords.

    JEL classification:

    • C45 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods: Special Topics - - - Neural Networks and Related Topics
    • E42 - Macroeconomics and Monetary Economics - - Money and Interest Rates - - - Monetary Sytsems; Standards; Regimes; Government and the Monetary System
    • E58 - Macroeconomics and Monetary Economics - - Monetary Policy, Central Banking, and the Supply of Money and Credit - - - Central Banks and Their Policies

    NEP fields

    This paper has been announced in the following NEP Reports:


    Access and download statistics


    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:dnb:dnbwpp:681. 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: DNB (email available below). General contact details of provider: .

    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.