Introduction
Deep Learning (DL) has traditionally flourished in "batch" environments, where models are trained on static, large-scale datasets. However, real-world applications such as fraud detection, financial market analysis, and IoT monitoring generate data as a continuous, high-velocity stream. This paper summarizes a retrospective on the ECML PKDD 2023 tutorial, which explores the transition from batch to online deep learning. We introduce Deep-River, a library designed to integrate the streaming capabilities of River with the architectural flexibility of PyTorch, while addressing the unique constraints of real-time data processing.
The Online Deep Learning Paradigm
Online learning requires models to process instances sequentially, often under strict time and memory constraints. Unlike batch learning, where a model can iterate over the same data multiple times, streaming models must learn from each instance exactly once. This paradigm faces three major hurdles: concept drift, where data patterns change over time; resource constraints, necessitating efficient per-instance processing; and a software gap, as most DL frameworks are optimized for high-throughput batching rather than low-latency single-instance updates.
Deep-River: Bridging the Gap
To address the software gap, the authors developed Deep-River. This library acts as a wrapper for PyTorch, allowing neural networks to adhere to the River API (using methods like learn_one and predict_one). This integration enables the use of sophisticated neural architectures within established streaming pipelines. Beyond basic classification, the tutorial highlights applications in fairness-aware stream learning—using algorithms like the Fairness Aware Hoeffding Tree (FAHT)—and anomaly detection via incremental Autoencoders.
Key Insights: The GPU Paradox and Model Complexity
A central finding of the tutorial is the "GPU Paradox." While GPUs are essential for batch DL, they often become a bottleneck in online learning. Because streaming models typically process data with a batch size of 1, the overhead of transferring a single instance to the GPU memory frequently exceeds the actual computation time. Empirical tests show that CPUs are significantly faster for standard streaming networks.
Furthermore, the research suggests that "smaller is often better" in a streaming context. While deeper architectures are preferred in batch settings, smaller networks tend to converge faster on new data concepts, making them more resilient to concept drift.
Results and Conclusion
The efficacy of these methods was demonstrated on several benchmarks. In a credit card fraud detection task, a Deep-River Autoencoder achieved an F1 Score of 46.67%, more than doubling the 22.73% score of traditional Half-Space Trees. Runtime analysis on the Insects dataset confirmed that an Intel i5 CPU outperformed an RTX 3090 GPU until hidden layer sizes reached an impractical 1024 units.
While online learning for high-dimensional data like video remains a challenge often requiring offline pre-training, the Deep-River ecosystem provides a robust foundation for real-time deep learning. Future work will focus on expanding support for complex architectures while maintaining the efficiency required for true stream processing.
Summary updated