fSEAD: A Composable FPGA-based Streaming Ensemble Anomaly Detection Library

Binglei Lou, David Boland, Philip H. W. LeongACM Transactions on Reconfigurable Technology and Systems 2022 · DOI · arXiv

TL;DR

This paper introduces fSEAD, a novel FPGA-based library for streaming anomaly detection that leverages partial reconfiguration to create highly composable and scalable ensembles of anomaly detectors. It achieves significant speedups (3x-8x) over CPU implementations by enabling flexible, runtime adaptation of detection strategies.

What Problem Does This Paper Address?

Anomaly detection is crucial for identifying unusual patterns in data, with applications ranging from fraud detection to system monitoring. While software-based anomaly detection libraries exist, they often struggle with the real-time performance demands of streaming data due to sequential processing limitations. Implementing these detectors on hardware like FPGAs offers potential for higher performance, but existing FPGA solutions are typically rigid, single-algorithm designs. This paper addresses the need for a flexible, scalable, and high-performance FPGA-based solution that can dynamically adapt to changing data streams and detection requirements by composing multiple anomaly detection algorithms.

Methods

The core of fSEAD is a flexible computing architecture built around partially reconfigurable regions (pblocks). These pblocks are designed using High-Level Synthesis (HLS) and can implement multiple instances of anomaly detection algorithms. The library supports three state-of-the-art streaming anomaly detection algorithms: Loda (histogram-based), RS-Hash (randomized subspace hashing), and xStream (density-based).

Key methodological contributions include:

  • Composable Infrastructure: Pblocks are interconnected using AXI switches, allowing for arbitrary composition and dynamic routing of data at runtime.
  • Dynamic Function eXchange (DFX): This Xilinx technology enables runtime modification of the FPGA design, allowing for on-the-fly switching of anomaly detectors and ensemble configurations without recompilation.
  • HLS Module Generator (fSEAD_gen): A Python-based tool that generates HLS-compatible C code for anomaly detectors, facilitating the creation of custom IP cores.
  • AXI4-Stream and AXI-Lite Interfaces: Standardized interfaces for efficient data transfer and control between pblocks and the host system.

Datasets

The paper evaluates fSEAD using four publicly available datasets:

  • Cardio: A smaller dataset with a high anomaly percentage.
  • Shuttle: A medium-sized dataset.
  • SMTP-3: A large dataset with a very low anomaly percentage.
  • HTTP-3: A large dataset with a low anomaly percentage.

These datasets are commonly used in anomaly detection research and are derived from sources like the KDD-cup 99 dataset.

Key Insights and Ideas

  • Composability is Key: The ability to dynamically combine different anomaly detectors and their instances within pblocks is crucial for achieving both high accuracy and efficient resource utilization on FPGAs.
  • Runtime Adaptability Matters: DFX allows fSEAD to adapt to changing environmental conditions or evolving anomaly patterns without requiring a full hardware re-design, a significant advantage for streaming applications.
  • FPGA vs. CPU Trade-offs: While FPGAs offer substantial speedups, the overhead of data transfer between the host and the FPGA can become a bottleneck for smaller datasets. fSEAD is optimized for large datasets where its parallel processing capabilities truly shine.
  • Ensemble Benefits: Increasing the number of sub-detectors in an ensemble generally leads to improved AUC (accuracy) and reduced variance, making the detection more reliable.

Key Results

  • Speedup: fSEAD achieves speedups ranging from 3x to 8x compared to multi-threaded CPU implementations across the tested datasets and detectors. The highest speedup (8.26x) was observed with xStream on the HTTP-3 dataset.
  • Accuracy: The FPGA and CPU implementations achieve very similar anomaly detection accuracy (AUC scores), indicating that the fixed-point arithmetic used in the FPGA does not significantly compromise performance.
  • Resource Utilization: The architecture effectively utilizes FPGA resources, with homogeneous ensembles of detectors achieving 80%-90% logic use on the ZCU111 board.
  • Scalability: The throughput of detectors scales linearly with resource utilization within a single pblock, allowing for quick estimation of potential ensemble configurations.
  • Power Efficiency: The fSEAD system demonstrates significantly lower dynamic power consumption (5.232 Watts) compared to the CPU implementation (43.33 Watts).

Limitations and Future Work

  • Dataset Dependence: The optimal combination of detectors and their parameters is dataset-dependent, and finding the best combination is beyond the scope of this paper.
  • Partial Reconfiguration Overhead: While DFX enables runtime changes, partial reconfiguration itself incurs a latency cost (around 580-610 ms per pblock), which is managed by performing these updates when the system is idle.
  • Future Work:
    • Develop module generators that can automatically create optimized HLS directives and detector parameters (e.g., ensemble size).
  • Support a wider range of anomaly detection methods to enrich the library.
  • Extend the composable architecture to other applications like classification and regression tasks.

Summary updated

Abstract

Machine learning ensembles combine multiple base models to produce a more accurate output. They can be applied to a range of machine learning problems, including anomaly detection. In this article, we investigate how to maximize the composability and scalability of an FPGA-based streaming ensemble anomaly detector (fSEAD). To achieve this, we propose a flexible computing architecture consisting of multiple partially reconfigurable regions, pblocks, which each implement anomaly detectors. Our proof-of-concept design supports three state-of-the-art anomaly detection algorithms: Loda, RS-Hash, and xStream. Each algorithm is scalable, meaning multiple instances can be placed within a pblock to improve performance. Moreover, fSEAD is implemented using High-level synthesis (HLS), meaning further custom anomaly detectors can be supported. Pblocks are interconnected via an AXI-switch, enabling them to be composed in an arbitrary fashion before combining and merging results at runtime to create an ensemble that maximizes the use of FPGA resources and accuracy. Through utilizing reconfigurable Dynamic Function eXchange (DFX), the detector can be modified at runtime to adapt to changing environmental conditions. We compare fSEAD to an equivalent central processing unit (CPU) implementation using four standard datasets, with speedups ranging from 3× to 8×.
BibTeX
@article{lou2022fsead,
  author = {Binglei Lou and David Boland and Philip H. W. Leong},
  title = {{fSEAD: A Composable FPGA-based Streaming Ensemble Anomaly Detection Library}},
  journal = {ACM Transactions on Reconfigurable Technology and Systems},
  year = {2022},
  doi = {10.1145/3568992},
}
Figure