Towards Better Representations for Multi-Label Text Classification with Multi-granularity Information

FangFang Li, PuZhen Su, Junwen Duan, Weidong XiaoEMNLP 2023

Abstract

Multi-label text classification (MLTC) aims to assign multiple labels to a given text. Previous works have focused on text representation learning and label correlations modeling using pre-trained language models (PLMs). However, studies have shown that PLMs generate word frequency-oriented text representations, causing texts with different labels to be closely distributed in a narrow region, which is difficult to classify. To address this, we present a novel framework CL-MIL (Contrastive Learning-Multi-granularity Information Learning) to refine the text representation for MLTC task. We first use contrastive learning to generate uniform initial text representation and incorporate label frequency implicitly. Then, we design a multi-task learning module to integrate multi-granularity (diverse text-labels correlations, label-label relations and label frequency) information into text representations, enhancing their discriminative ability. Experimental results demonstrate the complementarity of the modules in CL-MIL, improving the quality of text representations and yielding stable and competitive improvements for MLTC.

Introduction

Multi-Label Text Classification (MLTC) is the task of assigning one or more relevant labels to a piece of text, such as tagging news articles or academic abstracts. While Pre-trained Language Models (PLMs) like BERT are standard for this task, they suffer from a phenomenon known as anisotropy. In an anisotropic embedding space, text representations collapse into a narrow "cone" because PLMs are often biased toward word frequency. This makes it difficult for a classifier to distinguish between labels, especially "tail labels" (rare categories) that lack abundant training data.

The CL-MIL Framework

The proposed CL-MIL framework addresses these challenges through two primary stages:

1. Contrastive Learning (CL) Module

To mitigate the "narrow cone" problem, the model employs contrastive learning. It identifies "target" samples (often those with low-frequency labels) and creates positive pairs using dropout-based data augmentation. Negative samples are identified as texts that share minimal label overlap with the target. By training the model to pull positive pairs together and push negative pairs apart, the embedding space becomes more uniform and discriminative.

2. Multi-granularity Information Learning (MIL) Module

The MIL module refines the representations by extracting information at different levels of granularity:

  • Dual-grained Interactive Learning (DIL): This captures both fine-grained correlations (token-level keywords) and coarse-grained correlations (global document themes) between text and labels.
  • Constraint Label Relations Learning (CLRL): This models explicit label interactions, categorizing pairs as "strongly related," "weakly related," or "irrelevant" based on co-occurrence and frequency.
The CL-MIL framework architecture, illustrating the integration of Contrastive Learning, Dual-grained Interactive Learning, and Constraint Label Relations Learning.

Experimental Results

The model was evaluated on two benchmarks: AAPD (Arxiv abstracts) and RCV1-V2 (Reuters news). CL-MIL outperformed several competitive baselines, including BERT and SGM.

  • Performance Metrics: On the AAPD dataset, CL-MIL achieved a Micro-F1 of 75.8, compared to BERT's 73.1. On RCV1-V2, it reached 88.9.
  • Recall Boost: A significant gain was observed in Recall, indicating the model's improved ability to identify all relevant labels for a given text.

Visualization using 3D PCA (Principal Component Analysis) confirms that CL-MIL successfully pushes "tail-group" labels away from the crowded center of the embedding space, making them more distinguishable for the classifier.

3D PCA visualization of text representations, showing the improved discriminative ability of the CL-MIL model (f) compared to the MIL variant without contrastive learning (e).

Conclusion

CL-MIL demonstrates that improving the geometric distribution of text representations is as crucial as semantic accuracy in MLTC. By combining contrastive learning with multi-level label information, the framework effectively handles the challenges of anisotropy and long-tail label distributions. Future work will explore scaling to extreme multi-label scenarios and handling longer document contexts.

Summary updated

BibTeX
@inproceedings{li2023towards,
  author = {FangFang Li and PuZhen Su and Junwen Duan and Weidong Xiao},
  title = {{Towards Better Representations for Multi-Label Text Classification with Multi-granularity Information}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=Q5nM3rpiVm},
}
Figure