Abstract
Online learning on graph streams faces significant challenges due to memory constraints and concept drift. Traditional kernel methods operate in the dual space, maintaining a set of support vectors that can grow uncontrollably. This study investigates the effectiveness of shifting to the primal feature space for modern graph kernels. By evaluating state-of-the-art algorithms on large-scale chemical and image datasets, we demonstrate that primal-space learning is not only computationally superior but also achieves higher classification accuracy under strict memory budgets.
Introduction
Online learning is essential for processing massive data streams where storing the entire dataset is impossible. In domains like chemical informatics or network security, data often arrives as graphs. Two major hurdles exist for these streams: memory constraints, requiring algorithms to operate within a fixed budget, and concept drift, where underlying patterns change over time. Traditionally, kernel methods handle these by keeping a subset of past examples (support vectors). However, as the stream grows, the number of support vectors needed often exceeds the memory budget, leading to performance degradation.
Methodology
This study compares three algorithmic frameworks for online graph classification:
- Dual Approach (Algorithm 1): The classic method that stores a set of actual graphs and uses a kernel function to compare new inputs to this set. When the budget is full, an entire graph must be discarded.
- Mixed Approach (Algorithm 2): A hybrid that stores graphs as sparse feature vectors but manages them as a set of examples.
- Primal Approach (Algorithm 3): This approach maintains a single weight vector $w$ in the feature space. Instead of discarding whole graphs, it prunes individual features based on their importance.
To manage the memory budget, several pruning strategies were tested, including removing the oldest entries, removing entries with the least absolute weight ($\tau$), and a novel Incremental F-score policy that tracks statistical relevance on-the-fly.
The Feature Space Challenge
Modern graph kernels, such as the Weisfeiler-Lehman or NSPDK kernels, produce explicit feature spaces. While these spaces are sparse, the number of potential features can be immense, necessitating efficient pruning strategies.
As shown in the figure above, the number of features generated by kernels like NSPDK grows exponentially with the complexity parameter $h$. This explosion highlights why granular pruning in the primal space—discarding specific non-informative features rather than entire graphs—is a more efficient way to utilize a fixed memory budget.
Experimental Results
Speed and Efficiency
The Primal algorithm demonstrated an efficiency gap of several orders of magnitude. On the Chemical dataset (164,558 graphs) with a 50k budget, the Primal approach processed examples in approximately 0.006 seconds. In contrast, the Dual approach required between 0.05 and 0.39 seconds per example and failed to complete within 48 hours for more complex kernel configurations. The Dual approach slows down quadratically as the budget increases, while the Primal approach remains linear.
Classification Accuracy
Under strict memory budgets (e.g., 10,000 units), the Primal approach consistently outperformed the Dual approach in terms of Area Under the ROC Curve (AUROC). The "weight" policy (removing features with the smallest absolute weights) emerged as the most effective strategy for maintaining model quality in the Primal space.
Conclusion
This research challenges the conventional reliance on dual-space support vector machines for online kernel learning. For graph kernels with explicit, computable feature maps, working directly in the primal space offers a significant advantage. It allows for more granular memory management and provides the computational speed necessary for high-velocity data streams. Future work will explore the specific budget thresholds where the dual approach might regain an advantage and how different dataset characteristics influence feature sparsity.
Summary updated