Meta-LMTC: Meta-Learning for Large-Scale Multi-Label Text Classification

Ran Wang, Xi'ao Su, Siyu Long, Xinyu Dai, Shujian Huang, Jiajun Chen

Abstract

Large-Scale Multi-Label Text Classification (LMTC) faces a significant challenge in the form of a "long-tailed" label distribution, where the majority of labels have very few or no training examples. We present Meta-LMTC, the first framework to apply optimization-based meta-learning to this problem. By utilizing a novel hybrid task sampling strategy that balances document-level and label-level diversity, Meta-LMTC enables models to generalize from minimal data. Our approach significantly outperforms state-of-the-art methods on rare (few-shot) and unseen (zero-shot) labels across medical and legal benchmarks, while also improving performance on frequent labels.

Introduction

In Large-Scale Multi-Label Text Classification (LMTC), models are tasked with assigning multiple relevant tags to a document from a pool of thousands of potential labels. Applications range from tagging Wikipedia articles to assigning ICD-9 diagnostic codes to hospital discharge summaries.

The primary obstacle in LMTC is the long-tailed distribution: a small number of "head" labels appear in thousands of documents, while the vast majority of "tail" labels appear only a handful of times or not at all in the training set. While current state-of-the-art methods attempt to bridge this gap using prior knowledge—such as label text descriptions or hierarchical relationships—they do not explicitly teach the model how to learn from limited data. Meta-LMTC addresses this by extracting "meta-knowledge" about the learning process itself from the dataset.

Methodology: The META-LMTC Framework

Optimization-based Meta-Learning

Meta-LMTC is built on the foundations of Model-Agnostic Meta-Learning (MAML). The objective is to find a parameter initialization that allows the model to adapt to a new task with just one or two steps of gradient descent. This "learning to learn" capability is particularly crucial for tail labels where data is scarce.

Hybrid Task Sampling Strategy

The core innovation of Meta-LMTC is its Task Sampling Strategy. To effectively train a meta-learner, one must simulate "mini-tasks" that mirror the difficult scenarios encountered at test time. The authors identified two primary sampling methods, each with distinct trade-offs:

  1. Instance-based sampling: Randomly selects documents. While realistic, this method is heavily biased toward frequent "head" labels.
  2. Label-based sampling: Selects a label first, then a document containing it. This ensures representation for rare labels but can lead to overfitting on specific document styles.
The Meta-LMTC framework simulates tasks by sampling support and query sets to mimic the long-tail challenges of the full LMTC task.

To resolve this, the authors proposed a hybrid strategy controlled by a hyperparameter $p$. The model stochastically chooses between instance-based and label-based sampling for each task. This creates a training environment that is both "faithful" (containing a mix of few-shot and zero-shot scenarios) and "diverse" (covering both rare labels and varied document contexts).

Experimental Setup

The framework was evaluated on two major LMTC benchmarks:

  • MIMIC-III: A medical dataset (~58k documents, ~7,000 labels) consisting of hospital discharge summaries.
  • EURLEX57K: A legal dataset (~57k documents, ~4,000 labels) containing European Union legislative concepts.

Labels were categorized into frequent, few-shot (typically ≤5 or 50 samples), and zero-shot (0 training samples) to rigorously test the model's versatility across the entire distribution.

Key Results and Insights

Performance Gains

Meta-LMTC was integrated into several strong baseline architectures, including CNNs, RCNNs, and the graph-based AGRU-KAMG. On the MIMIC-III dataset, Meta-LMTC improved the state-of-the-art model's performance on few-shot labels by 13.1% (Recall@10) and on zero-shot labels by 26.2% (Recall@10).

Quantitative results on the EURLEX57K dataset demonstrate that adding META-LMTC consistently improves performance across frequent, few-shot, and zero-shot labels.

As shown in the EURLEX57K results, the framework consistently boosts the Harmonic Average of metrics, indicating that the model is not simply trading off head-label accuracy for tail-label accuracy. In fact, Meta-LMTC improved performance on frequent labels as well, suggesting that a meta-learning initialization is more robust overall.

Model-Agnostic Nature

To demonstrate the framework's flexibility, the researchers applied the meta-learning phase to a DistilBERT model. Despite the inherent power of Transformer-based models, Meta-LMTC provided a significant performance boost, confirming that the framework can enhance a wide variety of underlying architectures.

Discussion and Limitations

The "Faithful Task" Requirement

A key insight from the study is that standard meta-learning often fails in multi-label settings because it ignores the coexistence of few-shot and zero-shot labels within the same document. By forcing the model to handle these overlapping scenarios during training, it becomes significantly more resilient.

Limitations

  • Computational Overhead: Meta-learning is computationally intensive. Training the DistilBERT variant required approximately 2.5 days on high-end hardware.
  • Label Descriptions: The model's zero-shot performance relies heavily on the quality of label text descriptions. Cryptic or missing label names would likely lead to performance degradation.

Conclusion

Meta-LMTC provides a powerful solution to the long-tail problem in large-scale classification by teaching models how to learn from sparse data. Future work will explore Generalized Zero-Shot Learning (GZSL), where models must distinguish between seen and unseen labels in more complex, open-world environments.

Summary updated

BibTeX
@inproceedings{wang2021meta,
  author = {Ran Wang and Xi'ao Su and Siyu Long and Xinyu Dai and Shujian Huang and Jiajun Chen},
  title = {{Meta-LMTC: Meta-Learning for Large-Scale Multi-Label Text Classification}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.679},
}
Figure