Labels in Extremes: How Well Calibrated are Extreme Multi-label Classifiers?

Nasib Ullah, Erik Schultheis, Jinbin Zhang, Rohit BabbararXiv 2024 · DOI

Introduction

Extreme Multi-label Classification (XMLC) involves assigning the most relevant labels to an instance from a massive label space, often containing millions of possibilities. Applications range from product recommendation on e-commerce platforms to tagging vast repositories of documents. Historically, the XMLC community has focused almost exclusively on ranking accuracy—ensuring the correct labels appear in the top-$k$ results (e.g., Precision@k).

However, as these models move into critical domains like medical diagnosis or financial forecasting, the reliability of the predicted probabilities becomes paramount. A model is considered well-calibrated if a predicted probability of 70% translates to a 70% actual frequency of the positive class. This paper provides the first systematic study of probability calibration in the extreme multi-label setting.

The Challenge of Calibration in XMLC

Standard calibration metrics, such as the Expected Calibration Error (ECE), are ill-suited for XMLC. In a space with millions of labels, the vast majority are "easy negatives." A model can achieve a deceptively low global ECE simply by being confident that most labels do not apply.

To address this, the authors propose ECE@k, a metric that evaluates calibration only for the top-$k$ predicted labels. This ensures the evaluation focuses on the labels the model deems most relevant, where accurate confidence scores are most needed.

Model Personalities and the Calibration Gap

The study evaluates nine state-of-the-art models across linear, tree-based, and deep learning architectures. The findings reveal that most standard XMLC models are poorly calibrated out of the box.

Reliability diagrams for various XMLC models showing significant underconfidence across different architectures.

Different architectures exhibit distinct "personalities" in their miscalibration. For instance, linear models like DiSMEC and tree-based models like PLT tend to be underconfident, meaning their predicted probabilities are lower than the actual frequency of positives. Conversely, some transformer-based models tend toward overconfidence. These systematic biases highlight that raw scores from XMLC models cannot be treated as reliable probabilities without further processing.

Achieving Near-Perfect Calibration

The researchers demonstrate that calibration can be significantly improved using "cheap" post-training methods, specifically Isotonic Regression. This technique learns a monotonic mapping from raw model scores to calibrated probabilities.

Crucially, because isotonic regression is a monotonic transformation, it preserves the relative ordering of labels. This means the model's ranking performance (Precision@k, nDCG) remains entirely unchanged while its calibration improves dramatically.

Reliability diagram after post-hoc calibration using isotonic regression, showing near-perfect alignment with the ideal diagonal.

Key Results and Impact

The application of isotonic regression reduced ECE@k from double-digit percentages (often 13-32%) to near zero (frequently <0.1%) across a wide variety of models and datasets.

Key takeaways from the experimental results include:

  • Isotonic vs. Platt Scaling: Isotonic regression generally outperformed Platt scaling, as its non-parametric nature better handles the complex score distributions found in extreme datasets.
  • Computational Efficiency: The calibration step is highly efficient, requiring only a few minutes even for datasets with millions of labels.
  • The Sparsity Penalty: Calibration remains more challenging for "tail labels" with very few training examples, as the lack of data makes it harder for the model to learn accurate confidence intervals.

Conclusion

This research highlights a critical but often overlooked aspect of Extreme Multi-label Classification. By shifting focus from pure ranking to include probability calibration, the authors provide a pathway for making XMLC models more reliable for real-world decision-making. The discovery that near-perfect calibration can be achieved as a "free" post-processing step—without sacrificing ranking accuracy—makes it a highly practical recommendation for practitioners in the field.

Summary updated

BibTeX
@misc{ullah2024labels,
  author = {Nasib Ullah and Erik Schultheis and Jinbin Zhang and Rohit Babbar},
  title = {{Labels in Extremes: How Well Calibrated are Extreme Multi-label Classifiers?}},
  year = {2024},
  eprint = {2411.04276},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.04276},
}
Figure