Accurate use of label dependency in multi-label text classification through the lens of causality

Caoyun Fan, Wenqing Chen, Jidong Tian, Yitian Li, Hao He, Yaohui Jin

Introduction

Multi-Label Text Classification (MLTC) is a fundamental task in natural language processing where a single document is assigned multiple relevant labels from a predefined set. A critical challenge in MLTC is effectively leveraging label dependencies—the statistical relationships between tags (e.g., an article tagged with "Sports" is highly likely to also be tagged with "World Cup"). While existing models attempt to exploit these dependencies to improve performance, they often fall into the trap of "correlation shortcuts." These models frequently predict labels based on other labels rather than the actual textual evidence, leading to systematic biases.

This paper introduces the CounterFactual Text Classifier (CFTC), a novel framework that applies causal inference to identify and mitigate these shortcuts, ensuring that label dependencies are used accurately and grounded in the source text.

The Problem: Correlation vs. Causality

In traditional MLTC models, label dependencies are often treated as simple statistical correlations. This leads to two primary issues:

  1. Exposure Bias: During sequential prediction, a single incorrect early prediction can cascade, as the model relies on its own previous (wrong) outputs to predict subsequent labels.
  2. Stereotype Bias: Models tend to over-predict common label pairs found in the training data while ignoring rare but correct combinations, effectively "guessing" based on frequency rather than analyzing the specific document.

The authors argue that models become "lazy," relying on the high-frequency co-occurrence of labels as a shortcut to minimize loss, which undermines the model's robustness on out-of-distribution or rare label sets.

The CounterFactual Text Classifier (CFTC)

The CFTC framework addresses these biases through a "predict-then-modify" architecture designed to separate textual evidence from label-based shortcuts.

1. Predict-then-Modify Backbone

The architecture begins by generating an initial prediction based solely on the text features. This initial state is then passed to a Graph Convolutional Network (GCN), which extracts "Label Information" (LI) using a pre-calculated label co-occurrence matrix. Finally, an attention mechanism fuses the original text features with the LI to produce the final classification. This separation ensures that the model explicitly identifies what information comes from the text versus what comes from label relationships.

2. Counterfactual De-biasing

The core innovation of CFTC is the application of causal inference to de-bias predictions. The authors ask a counterfactual question: "What would the model predict if it only had access to label correlations and no textual input?"

By calculating this "Intervention" state—essentially the model's stereotypical guess—the framework can subtract this bias from the "Observation" state (the full prediction). The resulting de-biased output represents the causal relationship between the text and the labels, forcing the model to only confirm label dependencies that are actually supported by the document content.

3. Mask Mechanism (MM)

To prevent the model from over-relying on the LI during the training phase, the authors implement a Mask Mechanism. By randomly masking or flipping labels in the initial prediction, the model is forced to maintain a high degree of attention on the textual features to resolve uncertainties, preventing the GCN from becoming a crutch.

Experimental Results

The CFTC was evaluated on three benchmark datasets: AAPD (Arxiv Academic Paper Dataset), RCV1 (Reuters Corpus Volume I), and Reuters-21578.

Performance Gains

CFTC consistently outperformed state-of-the-art baselines, including BERT-based models and specialized label-dependency architectures like SGM and LBA. Notably, on the AAPD dataset, the CFTC (using a BERT encoder) achieved a 3.5% improvement in Hamming Loss over the strongest baseline.

Robustness to Rare Combinations

Case studies demonstrated that while standard models often failed when presented with rare label combinations (due to stereotype bias), CFTC correctly identified them. By subtracting the "stereotypical" tendency, the model became more sensitive to the unique textual cues that signal unusual label pairings.

Architecture Agnostic

The framework proved to be encoder-agnostic, showing significant performance boosts whether paired with a simple BiLSTM or a sophisticated BERT encoder. This suggests that the de-biasing logic is a fundamental improvement to the MLTC task structure rather than a specific architectural tweak.

Conclusion

The CounterFactual Text Classifier (CFTC) represents a significant step forward in making MLTC models more reliable. By treating label dependency through the lens of causality rather than simple correlation, the framework effectively penalizes "guessing" and rewards predictions grounded in textual evidence. While the approach introduces some computational overhead due to its multi-pass nature, its ability to handle rare label combinations and reduce exposure bias makes it a robust solution for complex classification tasks.

Summary updated

BibTeX
@article{fan2023accurate,
  author = {Caoyun Fan and Wenqing Chen and Jidong Tian and Yitian Li and Hao He and Yaohui Jin},
  title = {{Accurate use of label dependency in multi-label text classification through the lens of causality}},
  journal = {Applied Intelligence},
  year = {2023},
  doi = {10.1007/s10489-023-04623-3},
}
Figure