Optimizing Transformer Neural Network for Real-Time Outlier Detection on FPGAs
Abstract
In this work, we explore how the inference time of a Transformer Neural Network can be efficiently optimized with applications to real-time anomaly detection in financial time series. The financial time series are price series such as asset prices. Unfortunately, the data is often with errors or outliers that make the downstream data processing tasks useless, unstable or even harmful. Moreover, the amount of financial time-series data has been significantly increasing. Hence, there is a need for better data-cleaning methods in terms of accuracy and in terms of processing speed. Transformers as a neural network architecture have achieved superior performances in many tasks such as Natural Language Processing and Computer Vision. Time series modelling and especially anomaly detection tasks can benefit from the features of transformers architecture in multiple ways, including the capacity to capture long-range dependencies and interactions. Increasingly powerful hardware, such as field-programmable gate arrays (FPGAs), have seen increasing usage in recent years due to their reconfigurability and high performance. They can be efficiently utilized to speed up the computations of the Transformer architecture. We explore different Transformer architectures for time series modelling and how they can be efficiently implemented on an FPGA board (PYNQ-Z2). In particular, we examine the application of Transformers to detect anomalies in time series and we show how they can be efficiently implemented on an FPGA board to minimize latency. The code is available at https://github.com/thxi/iclthesis
Create a lesson
Metadata
- Categories
- cs.LG, cs.AI, cs.AR, cs.DC, cs.PF, stat.CO
- Journal
- The Journal of FinTech, Vol. 5, No. 1, 2550001 (2025)
Related papers
An adaptive multi-fuzzy logic model for diagnosing transformer faults using dynamic weight optimization
Shared title terminologycs.LGKim-Anh Nguyen, Huy Hoang Le, Ba Tu Phung
QuantFlow: A Federated Mamba-Based Post-Transformer Foundation Model for Time-Series Forecasting
Shared title terminologycs.LGShah Nawaz Haider, Steve Austin, Arnab Barua et al.
WeCon: An Efficient Weight-Conditioned Neural Solver for Multi-Objective Combinatorial Optimization Problems
Shared title terminologycs.LGXuan Wu, Jinbiao Chen, Yang Li et al.
Hidden Boundary Motion in Transformer Optimization: Function-Space Orthogonalization of Affine Weight and Bias Updates
Shared title terminologycs.LGZhang Gongyue, Sheng Yixuan, Liu donghan et al.
Optimization of time-consuming experimental conditions using pseudo-experimental data guided by adaptive polynomial regression
Shared title terminologycs.LGHirotaka Sugawara, Yujin Taguchi, Kei Minagawa et al.
Energy Manifold Natural Gradient Descent: Riemannian Optimization for Neural PDE Solvers
Shared title terminologycs.LGZhangyong Liang, Huanhuan Gao