Fast Multi-label Learning

Xiuwen Gong, Dong Yuan, Wei Bao

Introduction

Multi-label classification (MLC) is a fundamental task where each data instance is associated with multiple labels simultaneously. As datasets grow in both sample size and label dimensionality, traditional approaches face significant scaling challenges. Binary Relevance (BR) methods, while effective, scale linearly with the number of training samples, becoming prohibitively slow for massive datasets. Conversely, embedding methods that compress the label space often rely on solving complex, computationally intensive optimization problems, such as quadratic or semidefinite programming.

This paper proposes a high-speed alternative using stochastic sketching to compress large-scale datasets into manageable "sketches." By performing optimization on these condensed surrogates, the authors achieve training speeds orders of magnitude faster than state-of-the-art methods like SLEEC, without sacrificing significant accuracy.

Methodology: Stochastic Sketching

The core innovation lies in applying dimensionality reduction via sketching to the input feature space. Instead of training on the full input matrix $X \in \mathbb{R}^{n \times p}$, the data is multiplied by a random sketch matrix $S \in \mathbb{R}^{m \times n}$ (where $m \ll n$), resulting in a sketched matrix $\tilde{X} = SX$. This process preserves the essential geometric properties of the data while drastically reducing the computational footprint.

The authors explore two primary sketching strategies:

  1. Stochastic $\sigma$-Subgaussian Sketch: Utilizes random variables (e.g., Gaussian or Bernoulli). While theoretically robust, the dense matrix multiplication can be a bottleneck.
  2. Stochastic Walsh-Hadamard Sketch: Employs the Fast Walsh-Hadamard Transform (FWHT) to reduce the sketching cost from $O(npm)$ to $O(np \log m)$. This optimization significantly accelerates the preprocessing phase.

For prediction, the framework utilizes a k-Nearest Neighbor (kNN) classifier within the sketched embedding space, avoiding complex decoding procedures.

Theoretical Guarantees

A key strength of this approach is its mathematical rigor. The authors provide a $\delta$-optimality guarantee, proving that the solution derived from the sketched data is within a factor of $(1 \pm \delta)$ of the exact solution. Furthermore, they derive generalization error bounds for the sketch-based kNN model, demonstrating that the error converges predictably as the number of samples $n$ increases.

Empirical Evaluation

The proposed methods, SS+GAU (Gaussian) and SS+WH (Walsh-Hadamard), were evaluated against baselines including BR+LIB, BR+kNN, FastXML, and SLEEC across several benchmarks: Corel5k, NUS-WIDE (VLAD and BOW), and RCV1X.

Training Efficiency

The most striking result is the reduction in training time. As shown in the table below, the speedup on large datasets is substantial. For the RCV1X dataset, the state-of-the-art SLEEC method requires over 21 hours (78,441 seconds) to train. In contrast, the SS+WH method with a sketch size of $m=256$ completes training in under 50 seconds.

Table of training times (in seconds) across different datasets and methods.

Speed-Accuracy Tradeoff

The "sketch size" ($m$) serves as a tunable parameter to balance performance and efficiency. Increasing $m$ allows the model to approach the accuracy of the full-data solution at the cost of increased computation. Experimental results indicate that relatively small sketch sizes (e.g., 256 or 512) provide a favorable balance, often outperforming standard Binary Relevance baselines in terms of Hamming Loss.

Hamming Loss results vs. training time for SS+GAU and SS+WH methods, illustrating the convergence as training time (and sketch size) increases.

Conclusion

By leveraging stochastic sketching, this work demonstrates that it is possible to scale multi-label learning to massive datasets with minimal loss in accuracy. The Walsh-Hadamard variant, in particular, offers an exceptional speed-to-performance ratio, making it a highly practical choice for large-scale MLC applications. Future research may explore the integration of these sketching techniques with non-linear architectures and approximate nearest neighbor search to further enhance inference efficiency.

Summary updated

BibTeX
@inproceedings{gong2021fast,
  author = {Xiuwen Gong and Dong Yuan and Wei Bao},
  title = {{Fast Multi-label Learning}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.24963/ijcai.2021/335},
}
Figure