MATCH: Metadata-Aware Text Classification in A Large Hierarchy

Yu Zhang, Zhihong Shen, Yuxiao Dong, Kuansan Wang, Jiawei Han · DOI

Abstract

Large-scale multi-label text classification (LMTC) is a critical task in managing the explosion of digital documents. While traditional methods focus primarily on text content, real-world documents are often accompanied by rich metadata and organized into deep label hierarchies. We introduce MATCH, an end-to-end framework designed to integrate these auxiliary signals. MATCH employs metadata-aware embedding pre-training, a specialized multi-CLS Transformer encoder, and hypernymy-based regularization. Evaluations on the Microsoft Academic Graph and PubMed datasets demonstrate that MATCH significantly outperforms existing state-of-the-art models by treating metadata as first-class citizens.

1. Introduction

In modern information systems, the challenge of categorizing millions of documents into tens of thousands of labels is immense. Standard approaches often treat this as a text-only problem, analyzing titles and abstracts in isolation. However, documents exist within a rich context of metadata—including authors, publication venues, and citation networks—and are typically categorized within structured hierarchies where labels have inherent parent-child relationships (e.g., "Glaucoma" as a sub-type of "Eye Diseases").

Example of document metadata (venue, authors, references) and the associated label hierarchy used in the MATCH framework.

Existing models frequently overlook these signals or utilize them in a disjointed manner. MATCH (Metadata-Aware Text Classification in A Large Hierarchy) addresses this gap by jointly modeling metadata and respecting the logical structure of label hierarchies during training.

2. Methodology

The MATCH framework is composed of three synergistic components designed to capture the interplay between text, metadata, and hierarchy.

The complete MATCH pipeline, illustrating the flow from metadata-aware pre-training to Transformer encoding and hierarchical regularization.

2.1 Metadata-Aware Embedding Pre-training

To provide a strong foundation, MATCH begins with a pre-training phase that maps words, metadata (authors, venues, references), and labels into a shared latent space. Using a margin-based ranking loss on a hypersphere, the model ensures that related entities—such as a paper and its specific publication venue—are positioned closely together. This step acts as a "warm start," significantly accelerating the speed at which the model converges during the main training phase.

2.2 Transformer-based Encoding

The core of the model is a Transformer encoder. Unlike standard implementations, MATCH concatenates multiple [CLS] tokens with metadata and word tokens in the input sequence. The use of multiple [CLS] tokens allows the model to capture the nuanced, high-dimensional information necessary to distinguish between thousands of possible labels, which a single aggregate vector might fail to represent.

2.3 Hypernymy Regularization

To handle the hierarchy, MATCH applies two forms of regularization:

  • Parameter Space: This encourages the weight vectors of child labels to remain similar to those of their parent labels.
  • Output Space: Based on the Distributional Inclusion Hypothesis (DIH), this introduces an asymmetric penalty. If the model assigns a high probability to a child label (e.g., "Crawling") but a low probability to its parent (e.g., "World Wide Web"), the loss function penalizes this logical inconsistency. This acknowledges that hierarchy is an inclusion relationship rather than just a similarity relationship.

3. Experimental Evaluation

The model was evaluated on two massive, real-world datasets:

  • MAG-CS: A subset of the Microsoft Academic Graph (Computer Science), containing ~705,000 documents and 15,809 labels.
  • PubMed: A collection of biomedical abstracts with ~898,000 documents and 17,693 MeSH terms. Both datasets feature deep hierarchies (up to 15 layers) and extensive metadata.

4. Results and Discussion

MATCH consistently outperformed state-of-the-art baselines, including AttentionXML and XML-CNN, across all metrics (P@k and NDCG@k). On the MAG-CS dataset, MATCH achieved a P@1 of 0.9190, compared to 0.9035 for AttentionXML.

4.1 The Power of Metadata

Ablation studies revealed that publication venue is often the strongest indicator of a paper's topic. Qualitative case studies showed that MATCH could correctly identify labels like "Information Retrieval" simply by "knowing" the paper was published at the SIGIR conference, even when the word "retrieval" never appeared in the text.

4.2 Hierarchical Insights

The researchers found that "blind" versions of the model (MATCH-NoMetadata or MATCH-NoHierarchy) performed significantly worse, proving that both signals are essential. The use of DIH-based asymmetric regularization proved superior to standard symmetric similarity measures, confirming the importance of modeling the inclusion logic of hierarchies.

5. Conclusion

MATCH demonstrates that integrating metadata and hierarchical structures leads to significant gains in text classification accuracy. While metadata can occasionally be noisy, its role as an "ego network" for documents provides vital context that text alone cannot provide. Future research directions include developing methods to automatically select the most topic-indicative metadata and exploring more complex architectures to handle the different modalities of metadata, such as explicit citation graphs.

Summary updated

BibTeX
@inproceedings{zhang2021match,
  author = {Yu Zhang and Zhihong Shen and Yuxiao Dong and Kuansan Wang and Jiawei Han},
  title = {{MATCH: Metadata-Aware Text Classification in A Large Hierarchy}},
  booktitle = {The Web Conference},
  year = {2021},
  doi = {10.1145/3442381.3449979},
}
Figure