An empirical study on budget-aware online kernel algorithms for streams of graphs

Giovanni Da San Martino, Nicolò Navarin, Alessandro Sperduti · DOI

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:

  1. 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.
  2. Mixed Approach (Algorithm 2): A hybrid that stores graphs as sparse feature vectors but manages them as a set of examples.
  3. 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.

Growth of generated features for different graph kernels as the parameter h increases.

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

Abstract

Kernel methods are considered as an effective technique for on-line learning. Many approaches have been developed for compactly representing the dual solution of a kernel method when the problem imposes memory constraints. However, in the literature no work is specifically tailored to streams of graphs. Motivated by the fact that the size of the feature space representation of many state-of-the-art graph kernels is relatively small and thus it is explicitly computable, we study whether executing kernel algorithms in the feature space can be more effective than the classical dual approach. We study three different algorithms and various strategies for managing the budget. Efficiency and efficacy of the proposed approaches are experimentally assessed on relatively large graph streams exhibiting concept drift. It turns out that, when strict memory budget constraints have to be enforced, working in feature space, given the current state-of-the-art on graph kernels, is more than a viable alternative to dual approaches, both in terms of speed and classification performance.
BibTeX
@article{martino2016empirical,
  author = {Giovanni Da San Martino and Nicolò Navarin and Alessandro Sperduti},
  title = {{An empirical study on budget-aware online kernel algorithms for streams of graphs}},
  journal = {Neurocomputing},
  year = {2016},
  doi = {10.1016/j.neucom.2016.07.029},
}
Figure