Pretrained Generalized Autoregressive Model with Adaptive Probabilistic Label Clusters for Extreme Multi-label Text Classification

Hui Ye, Zhiyu Chen, Da-Han Wang, Brian D. Davison

TL;DR

This paper introduces APLC-XLNet, a novel deep learning approach for Extreme Multi-label Text Classification (XMTC). It leverages the power of the XLNet pre-trained language model for text representation and introduces Adaptive Probabilistic Label Clusters (APLC) to efficiently handle the massive label spaces characteristic of XMTC, achieving state-of-the-art results on four benchmark datasets.

What Problem Does This Paper Address?

Extreme Multi-label Text Classification (XMTC) is a challenging task where each text instance needs to be tagged with the most relevant labels from an extremely large set of potential labels. This is common in real-world applications like document tagging, product categorization, and ad targeting, where the number of labels can range from thousands to millions. The core challenges in XMTC are:

  1. Effective Text Representation: Capturing the nuanced semantic and contextual information of text is crucial for accurate classification, especially when dealing with vast label spaces. Traditional methods like Bag-of-Words (BoW) often fall short.
  2. Efficient Handling of Extreme Label Spaces: The sheer number of labels makes traditional classification approaches computationally infeasible. Furthermore, label distributions in XMTC datasets often follow Zipf's Law, meaning a small fraction of labels accounts for most of the occurrences, creating an imbalance that needs to be managed efficiently.

Methods

The proposed APLC-XLNet model combines two key innovations:

  1. XLNet for Text Representation: The authors fine-tune the generalized autoregressive pre-trained language model, XLNet, to learn dense text representations. XLNet's permutation language modeling objective allows it to capture bidirectional contexts, making it a powerful tool for understanding text. The final hidden state of the [CLS] token from XLNet is used as the text representation. This leverages the knowledge gained from pre-training on massive text corpora.
  2. Adaptive Probabilistic Label Clusters (APLC): To address the computational burden of extreme label spaces, APLC is introduced. It's inspired by techniques like Adaptive Softmax and Hierarchical Softmax but adapted for the multi-label setting.
  3. Label Partitioning: The label set is partitioned into a "head cluster" (containing the most frequent labels) and several "tail clusters" (containing less frequent labels). This is motivated by Zipf's Law, where frequent labels are handled more directly.
  4. Adaptive Computation: When predicting, the model first checks the head cluster. If a label is not found there, it then checks the tail clusters. The computational cost is reduced because the tail clusters are accessed less frequently.
  5. Dimension Reduction: To further optimize efficiency, the dimensionality of the hidden state is reduced for tail clusters by a factor q (where q >= 1). This allows for a trade-off between model size, computation time, and prediction accuracy.
  6. Objective Function: The loss function is adapted to account for this clustered output layer, approximating the cross-entropy loss.

The overall architecture consists of the XLNet module, a fully connected hidden layer (which can act as a bottleneck layer for extreme label scenarios), and the APLC output layer.

Datasets

The authors evaluated their APLC-XLNet model on five benchmark datasets:

  • EURLex-4k
  • AmazonCat-13k
  • Wiki10-31k
  • Wiki-500k
  • Amazon-670k

These datasets represent a range of sizes and characteristics, with Wiki-500k and Amazon-670k being large-scale datasets. The paper notes that they used publicly available data for most, and obtained raw text for EURLex and Wiki-500k from public websites.

Key Insights and Ideas

  • XLNet's Power for XMTC: The paper demonstrates that fine-tuning a powerful pre-trained language model like XLNet is highly effective for learning rich text representations in XMTC, outperforming previous deep learning approaches.
  • APLC's Efficiency Gains: The Adaptive Probabilistic Label Clusters (APLC) approach is crucial for making XMTC computationally tractable. By intelligently grouping labels and reducing computation for less frequent ones, it significantly cuts down on model size and inference time.
  • Zipf's Law as an Opportunity: The inherent imbalance in label distributions (Zipf's Law) is not just a challenge but an opportunity that APLC exploits to its advantage.
  • Impact of Cluster Number and Partitioning: The ablation study reveals that the number of clusters and how labels are partitioned (more frequent labels in the head cluster) significantly impact performance, suggesting careful tuning is necessary. Too many clusters can sometimes hurt performance.

Key Results

  • State-of-the-Art Performance: APLC-XLNet achieved new state-of-the-art results on four out of the five benchmark datasets.
  • Outperforming Baselines: The model consistently outperformed various baselines, including embedding-based methods (SLEEC, AnnexML), tree-based methods (PfastreXML, Parabel, Bonsai), and other deep learning approaches (XML-CNN, AttentionXML).
  • Significant Improvements: For instance, on EURLex-4k, APLC-XLNet showed improvements of around 8-10% in P@1, P@3, and P@5 compared to AnnexML.
  • Efficiency Gains: Theoretical analysis and experimental results suggest that APLC significantly reduces model size and computational complexity compared to a standard linear output layer for extreme classification.

Limitations and Future Work

  • Impact of Cluster Number: The paper's ablation study suggests that the optimal number of clusters is dataset-dependent and that increasing the number of clusters beyond a certain point can degrade performance. The authors note that the degree of impact depends on the dataset's characteristics.
  • Label Partitioning Strategy: While placing more frequent labels in the head cluster generally improves performance, the optimal partitioning strategy might require further investigation.
  • Generalizability of APLC: The authors believe that APLC's ability to handle unbalanced class distributions makes it potentially applicable to other extreme classification tasks beyond text classification. They suggest that APLC could be a general output layer for such problems.
  • Further Model Exploration: While XLNet is used, future work could explore other advanced pre-trained language models.

Summary updated

BibTeX
@inproceedings{ye2020pretrained,
  author = {Hui Ye and Zhiyu Chen and Da-Han Wang and Brian D. Davison},
  title = {{Pretrained Generalized Autoregressive Model with Adaptive Probabilistic Label Clusters for Extreme Multi-label Text Classification}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
}
Figure