TL;DR
This paper introduces the Weight-Median Sketch (WM-Sketch), a novel memory-efficient technique for learning linear classifiers from streaming data. It allows for the recovery of important model weights, enabling applications like feature selection and data explanation, while outperforming existing methods in memory-accuracy trade-offs.
What Problem Does This Paper Address?
Modern applications, from mobile devices to network infrastructure, increasingly require machine learning models that can learn from continuously arriving data streams. However, high-dimensional feature spaces can quickly overwhelm limited memory resources, making it impossible to store the full model. Existing sketching techniques, designed for tasks like finding frequent items, are insufficient because they don't prioritize features that are most discriminative of different data classes, which is crucial for learning effective classifiers. This paper tackles the challenge of building compressed linear classifiers for streaming data that not only use minimal memory but also allow for the retrieval of the most influential features.
Methods
The core contribution is the Weight-Median Sketch (WM-Sketch). It builds upon the Count-Sketch data structure, which is known for its ability to estimate item frequencies in streams. However, instead of sketching counts, the WM-Sketch sketches gradient updates to the model parameters. This allows it to learn a compressed representation of a linear classifier. A key innovation is its ability to support the approximate recovery of the most heavily-weighted features in the classifier, which are often the most discriminative. The paper also introduces an optimized variant, the Active-Set Weight-Median Sketch (AWM-Sketch), which uses a min-heap to track the most important features, further improving accuracy. Theoretical analysis provides guarantees on the recovery error, and empirical evaluations demonstrate its effectiveness.
Datasets
The authors evaluated their methods on several standard binary classification datasets:
- Reuters RCV1: A widely used text classification dataset.
- Malicious URLs: A dataset for identifying malicious URLs.
- Algebra dataset: From the KDD Cup 2010 large-scale data mining competition.
They also used datasets specific to applications discussed in the paper:
- FEC candidate disbursements: For streaming explanation.
- Anonymized passive traffic trace dataset: For network monitoring (relative deltoids).
- Newswire corpus: For streaming pointwise mutual information estimation.
Key Insights and Ideas
- Discriminative features over frequent features: The paper highlights that for classification tasks, identifying features that distinguish between classes is more important than simply identifying features that appear frequently.
- Interpretability without accuracy loss: The WM-Sketch provides a compressed model that allows for the identification of important features (interpretability), and surprisingly, the AWM-Sketch variant often improves classification accuracy compared to feature hashing, which prioritizes memory efficiency over interpretability.
- Leveraging Count-Sketch for gradients: Adapting the Count-Sketch structure to sketch gradient updates is a clever way to compress the learning process for linear models.
- Active set for improved accuracy: The AWM-Sketch's heuristic of maintaining the most important features in an "active set" (heap) and lazily updating the sketch significantly boosts recovery accuracy.
Key Results
- The AWM-Sketch consistently achieved lower recovery error for top-K weights compared to baselines like Space Saving and Probabilistic Truncation across multiple datasets and memory budgets.
- In terms of classification error rate, the AWM-Sketch outperformed feature hashing by a noticeable margin (0.5-3.7% on RCV1, 0.1-0.4% on URL, 0.2-0.5% on KDDA), especially at smaller memory budgets.
- The WM-Sketch and AWM-Sketch demonstrated their utility in streaming explanation, network monitoring (relative deltoids), and streaming pointwise mutual information estimation, outperforming or matching existing methods while using significantly less memory.
- The theoretical analysis provides sub-linear space guarantees for learning linear classifiers, meaning the memory required grows much slower than the number of features.
Limitations and Future Work
- Adversarial orderings: The theoretical analysis for the online setting relies on the assumption of uniformly random permutations of data points. The authors note that adversarial orderings could lead to higher error accumulation, and this is an area for future work.
- Multiclass classification: While the paper suggests a straightforward extension for multiclass classification (maintaining multiple WM-Sketches), this can become computationally expensive for a large number of classes.
- Per-feature learning rates: The paper raises the open question of whether per-feature learning rates, which can improve performance, are worth the associated memory cost in a streaming setting.
- Hash function independence: The implementation uses 3-wise independent hash functions, while the theoretical analysis relies on O(log(d/δ))-wise independence. The authors note that they did not observe significant performance degradation in experiments, but this could be an area for further investigation.
Summary updated