Block-wise Partitioning for Extreme Multi-label Classification

Yuefeng Liang, Cho-Jui Hsieh, Thomas C. M. LeearXiv 2018

Abstract

Extreme Multi-label Classification (XMC) involves assigning a small subset of relevant labels to an instance from a pool containing hundreds of thousands or millions of candidates. The primary bottleneck in XMC is the computational cost of prediction, which often scales linearly with the number of labels. This paper presents Block-wise Partitioning (BP), a pretreatment framework that clusters instances and labels into optimized, nearly block-diagonal structures. By allowing label clusters to overlap, BP ensures that popular labels remain accessible across multiple blocks while niche labels are localized. Our evaluation across five benchmark datasets demonstrates that BP can accelerate state-of-the-art XMC classifiers by up to 2,780x with negligible loss in precision.

1. The Challenge of Extreme Classification

In XMC, the goal is to learn a classifier that maps an input feature vector to a subset of labels from a massive label space $\mathcal{Y} = \{1, \dots, m\}$. Applications range from product recommendation to document tagging. As $m$ grows to the millions, standard "one-vs-all" approaches become computationally prohibitive for real-time inference.

Sparsity pattern of a typical XMC instance-label matrix, illustrating the potential for block-wise reorganization.

Existing acceleration techniques, such as label filters or low-rank embeddings, often struggle with "tail labels"—rare tags that are frequently discarded by aggressive pruning. The challenge lies in reducing the search space without sacrificing the model's ability to predict these infrequent but informative labels.

2. Block-wise Partitioning (BP) Methodology

The proposed BP method is a "pretreatment" step designed to be compatible with any base XMC classifier. The core objective is to partition the instance-label matrix into $q$ blocks such that most relevant labels for a given instance cluster are contained within a corresponding label cluster.

2.1 Partitioning Strategy

Unlike traditional clustering, BP employs a hybrid approach:

  • Disjoint Instance Clusters: Each training instance is assigned to exactly one of $q$ clusters.
  • Overlapping Label Clusters: Labels can belong to multiple clusters. This is crucial for "head labels" (popular tags) that appear across diverse instance groups.
The BP pipeline: (Left) Label frequency matrix across instance clusters. (Right) Iterative selection of label sets to maximize coverage while maintaining efficiency.

2.2 Optimization Objective

The partitioning is formulated as a discrete optimization problem. The goal is to maximize coverage (the number of relevant labels captured within the blocks) while minimizing a penalty on the total size of the label clusters to ensure efficiency. The authors use an $L_2$ penalty on the label cluster sizes to prevent any single cluster from becoming too large, which would slow down prediction.

3. Optimization via Alternating Minimization

Since the joint optimization over instance and label assignments is non-convex, the authors employ an alternating minimization strategy:

  1. Label Cluster Selection: Given fixed instance clusters, the optimal label sets are chosen based on their frequency within those clusters.
  2. Instance Cluster Selection: Given fixed label sets, instances are reassigned to the cluster that best covers their ground-truth labels.

At test time, an instance is first mapped to a cluster using a lightweight classifier (e.g., LIBLINEAR). The heavy-duty XMC model then only performs prediction over the restricted label set associated with that cluster.

4. Performance and Empirical Results

The authors evaluated BP on five standard benchmarks from the Extreme Classification Repository, including Wiki10-31K and Amazon-670K.

4.1 Speedup and Accuracy

The results are transformative for prediction latency. On the Amazon-670K dataset, BP achieved a 2,780x speedup for the LEML algorithm. For PD-Sparse on Wiki10-31K, a 209x speedup was observed with a minimal 0.33% drop in Precision@1.

4.2 Impact on Low-Rank Models

A notable finding is that BP can actually improve the accuracy of low-rank methods like LEML. By partitioning the global label matrix into local blocks, the method reinforces the low-rank assumption within each block, leading to better local approximations than a single global low-rank model could achieve.

5. Conclusion

Block-wise Partitioning offers a scalable solution to the computational hurdles of XMC. By intelligently organizing the data into overlapping blocks, it allows for massive gains in prediction speed without the typical accuracy trade-offs seen in label filtering. Future work may explore overlapping instance clusters to further refine the partitioning and handle instances that naturally sit at the intersection of multiple categories.

Summary updated

BibTeX
@misc{liang2018block,
  author = {Yuefeng Liang and Cho-Jui Hsieh and Thomas C. M. Lee},
  title = {{Block-wise Partitioning for Extreme Multi-label Classification}},
  year = {2018},
  eprint = {1811.01305},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.01305},
}
Figure