LdSM: Logarithm-depth Streaming Multi-label Decision Trees

Maryam Majzoubi, Anna ChoromanskaAISTATS 2020

Abstract

Extreme Multi-label Classification (XMC) involves assigning a small subset of labels from a massive pool to a given data point. Traditional methods often struggle with scalability or the trade-off between tree depth and classification accuracy. This paper introduces LdSM (Logarithm-depth Streaming Multi-label Decision Trees), an algorithm that constructs balanced, shallow trees by optimizing a novel objective function. LdSM penalizes redundant paths while rewarding class purity, achieving state-of-the-art prediction speeds and competitive accuracy on large-scale benchmarks.

Introduction

In modern machine learning, we frequently encounter tasks where a single instance—such as a news article or a product—must be tagged with a few relevant labels from a pool of thousands or millions. This is known as Extreme Multi-label Classification (XMC). The traditional One-Against-All (OAA) approach, which trains a separate classifier for every label, is computationally unfeasible at this scale. While tree-based models offer a solution by reducing prediction complexity to logarithmic time ($O(\log K)$), they face significant challenges: path ambiguity (deciding which branch a multi-labeled example should follow) and the difficulty of maintaining tree balance without sacrificing class purity.

The LdSM Framework

LdSM addresses these issues by building trees top-down in a streaming, node-by-node fashion. The core innovation is a multi-part objective function ($J$) optimized at every node split to ensure the tree remains both shallow and accurate.

The LdSM objective function J, which balances tree depth, class integrity, and multi-path redundancy.

The objective function $J$ is composed of three key terms:

  • Balancing Term: Forces the tree to split data evenly between children, ensuring the depth stays logarithmic.
  • Class Integrity Term: Encourages examples with the same labels to stay together in the same partition.
  • Multi-way Penalty: This "secret sauce" allows an example to be sent to multiple children to accommodate multiple labels but adds a cost for doing so, preventing the tree from becoming an unmanageable thicket.

Theoretical and Practical Insights

The authors provide a "Boosting Theorem" for multi-label trees, proving that overall classification error decreases monotonically as the tree grows, provided each node split is even slightly better than random. Empirically, LdSM trees consistently maintain a depth between $\log_M K$ and $3\log_M K$, making them exceptionally efficient for real-time prediction.

Experimental Results

LdSM was evaluated on seven standard XMC benchmarks, including small-scale datasets like Bibtex and large-scale ones like Amazon-670k.

Prediction Speed

LdSM is remarkably fast. By maintaining shallow trees and controlled redundancy, it achieves state-of-the-art inference times.

Comparison of prediction times (ms) per example across various XMC benchmarks. LdSM (rightmost column) consistently shows the lowest latency.

On the Delicious dataset, LdSM achieved a prediction time of 0.014 ms per example, significantly faster than competitors like FastXML (0.27 ms) or PFastreXML (0.37 ms).

Accuracy

LdSM consistently matched or outperformed other purely tree-based methods across all metrics, including Precision@k and nDCG. While OAA methods like Parabel are often accuracy leaders, LdSM proved to be a formidable competitor, even outperforming Parabel on specific tail-label metrics (Propensity Scored Precision) for several datasets.

Conclusion and Limitations

LdSM provides a robust framework for scalable XMC. However, like most methods in this field, it faces challenges with "tail labels"—labels that appear very rarely in the training set. On the largest datasets, a separate re-ranking step was required to maintain high accuracy for these rare labels. Additionally, the objective function relies on hyperparameters ($\lambda_1, \lambda_2$) that require careful tuning. Future work may explore truly one-pass online versions of the algorithm.

Summary updated

BibTeX
@inproceedings{majzoubi2020ldsm,
  author = {Maryam Majzoubi and Anna Choromanska},
  title = {{LdSM: Logarithm-depth Streaming Multi-label Decision Trees}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2020},
}
Figure