Nonstationary data stream classification with online active learning and siamese neural networks

Kleanthis Malialis, Christos G. Panayiotou, Marios M. PolycarpouNeurocomputing 2022 · OpenReview

TL;DR

This paper introduces ActiSiamese, a novel algorithm for classifying data streams that are constantly changing (nonstationary) and have uneven class distributions (imbalanced). It combines online active learning with Siamese neural networks and a multi-queue memory to efficiently learn from limited labeled data, outperforming existing methods on various challenging datasets.

What Problem Does This Paper Address?

The paper tackles the growing challenge of analyzing data streams in real-time, which are becoming ubiquitous in applications like monitoring systems, fraud detection, and personalized recommendations. These streams often present several difficulties:

  • Real-time learning: Data arrives sequentially, and models need to adapt on-the-fly without retraining from scratch.
  • Limited ground truth: Obtaining labels for every data point can be expensive or impossible.
  • Nonstationary data: The underlying data distribution can change over time (concept drift), making static models obsolete.
  • Imbalanced data: Some classes appear much more frequently than others, making it hard for models to learn minority classes.
  • Memory constraints: Storing the entire data stream is often infeasible.

Existing methods struggle to address all these issues simultaneously, especially the combination of nonstationarity and severe class imbalance.

Methods

The core contribution is the ActiSiamese algorithm, which synergistically combines several techniques:

  • Online Active Learning: Instead of passively receiving labels, ActiSiamese intelligently queries a human expert for labels of the most informative instances. It introduces a novel density-based active learning strategy that considers similarity in the latent space (learned representations) rather than the raw input space. This is a departure from traditional uncertainty-based strategies.
  • Siamese Neural Networks: These networks, consisting of two identical "twin" neural networks, are used to learn a robust representation (encoding) of the data. The key idea is that the distance between these learned representations in the latent space reflects the similarity between data points. This is particularly effective for learning from few examples.
  • Multi-Queue Memory: To handle concept drift, ActiSiamese employs a memory structure composed of multiple First-In-First-Out (FIFO) queues, one for each class. This allows the model to retain information about past concepts while gradually "forgetting" obsolete ones as new data arrives. This memory is crucial for adapting to changing data distributions.
  • Ensembling (ActiSiamese-WM): An ensemble version of ActiSiamese is also proposed, which combines multiple ActiSiamese classifiers to further improve robustness.

Datasets

The authors evaluated ActiSiamese on a comprehensive set of datasets:

  • Synthetic Datasets:
    • Sea: Originally binary, extended to 10 classes. Used to test stationary, prior drift, and posterior drift scenarios with varying imbalance.
  • Circles: Two features, 10 classes. Used to test different drift types and imbalance levels.
  • Blobs: Three features, 12 classes. Used to test drift and imbalance.
  • Two Patterns: Simulated time series with step patterns.
  • Moving Squares: Moving distributions with direction changes.
  • Interchanging RBF: Gaussians that change positions.
  • Real-world Datasets:
    • Gestures: Electromyography data for gesture classification.
  • MNIST: Handwritten digit recognition (high dimensionality).
  • Forest: Cartographic data for forest cover type prediction.
  • Keystroke: Typing rhythm data for user identification.
  • UWave Gesture Library Z: Accelerometer data for gesture recognition.
  • Insects: Laser sensor data for insect species classification (known to be nonstationary).

Key Insights and Ideas

  • Latent Space Similarity for Active Learning: Using similarity in the learned latent space (Siamese network's output) for active learning queries is more effective than using raw input space similarity, especially in high-dimensional or complex data.
  • Multi-Queue Memory for Drift: The multi-queue memory is a simple yet effective mechanism for handling concept drift by retaining past information and gradually discarding outdated concepts.
  • Siamese Networks for Few-Shot Learning in Streams: Siamese networks are well-suited for online learning scenarios where labeled data is scarce, enabling effective learning even with low active learning budgets.
  • Robustness to Budget and Drift: ActiSiamese demonstrates remarkable robustness to variations in the active learning budget and different types of concept drift, outperforming methods that are sensitive to these factors.
  • Synergy of Components: The combination of online active learning, Siamese networks, and multi-queue memory creates a powerful system that addresses multiple challenges of data stream classification simultaneously.

Key Results

  • Outperforms State-of-the-Art: ActiSiamese consistently outperforms baseline and state-of-the-art algorithms across various synthetic and real-world datasets, especially under challenging conditions like severe class imbalance and concept drift.
  • Effective with Low Budgets: The algorithm performs well even with very small active learning budgets (e.g., 1% of data labeled), making it practical for real-world applications.
  • Faster Learning: ActiSiamese often exhibits a superior learning speed compared to other memory-based methods, reaching high performance levels earlier in the stream.
  • Memory Benefits: The multi-queue memory provides a significant performance advantage over one-pass learners (like RVUS) in most scenarios.
  • Ensembling Gains: Ensemble versions (ActiSiamese-WM) generally provide a small but consistent performance improvement.
  • Specific Performance: For example, in the "sea" dataset with abrupt drift, ActiSiamese shows a much smaller performance decline than RVUS when the budget is reduced. In the "Gestures" and "Keystroke" real-world datasets, ActiSiamese and ActiSiamese-WM significantly outperform other methods.

Limitations and Future Work

  • Not One-Pass Learning: While ActiSiamese uses a fixed amount of memory, it is not strictly a one-pass learner as it stores previously labeled data in its queues. The authors acknowledge that true one-pass learning (discarding data after processing) is an ideal property.
  • Semi-Supervised Learning: Active learning inherently ignores unlabeled data. Future work could explore combining ActiSiamese with semi-supervised learning techniques to leverage all available data.
  • Explicit Drift Detection: ActiSiamese handles drift implicitly through incremental learning and its memory. Explicit drift detection mechanisms (e.g., statistical tests) could potentially lead to faster adaptation or better reaction to drift.
  • UWave Gestures Exception: The paper notes that ActiSiamese performed worse on the UWave Gestures dataset, indicating it's not a universal solution.

Summary updated

BibTeX
@inproceedings{malialis2022nonstationary,
  author = {Kleanthis Malialis and Christos G. Panayiotou and Marios M. Polycarpou},
  title = {{Nonstationary data stream classification with online active learning and siamese neural networks}},
  booktitle = {Neurocomputing},
  year = {2022},
  url = {https://openreview.net/forum?id=YOWthJiqv4},
}
Figure