NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Weakly Supervised Text Classification using Supervision Signals from a Language Model

Ziqian Zeng, Weimin Ni, Tianqing Fang, Xiang Li, Xinran Zhao, Yangqiu Song

Abstract

Text classification typically requires extensive human-labeled datasets, which are often costly or unavailable. This paper presents a novel weakly supervised framework that leverages the internal world knowledge of Masked Language Models (MLMs) to generate descriptive supervision signals. By querying an MLM with cloze-style prompts, the system extracts conceptually relevant keywords that inform a latent variable model, the Word Distribution learner and Document Classifier (WDDC). This approach bridges the semantic gap between raw text and target categories without manual annotation. Experimental results on standard benchmarks show that our method outperforms existing weakly supervised baselines by up to 4%, significantly narrowing the gap with fully supervised models.

Introduction

Deep learning has revolutionized text classification, achieving high accuracy across various domains. However, these models are notoriously "data-hungry," often requiring thousands of manually annotated examples to perform reliably. In many real-world scenarios, obtaining such labels is either prohibitively expensive or practically impossible.

Existing "weakly supervised" methods attempt to mitigate this by using a small set of seed keywords or label names to identify related terms within a corpus. However, these extractive methods are limited to words explicitly present in the text. This paper addresses a critical gap: leveraging the vast, internal "world knowledge" of pre-trained language models (like BERT) to provide richer, more semantic supervision without any manual labeling.

The WDDC Framework

The authors propose a two-stage framework that moves beyond simple keyword matching to generative supervision.

Overview of the WDDC framework, illustrating the flow from document input to signal generation and final classification.

1. Supervision Signal Generation

Instead of searching for keywords within the document, the framework appends a cloze-style prompt to the text: `[CLS] + Document + This article is talking about [MASK].

  • [SEP]. A pre-trained Masked Language Model (MLM) is then used to predict the top $k$ words for the[MASK]` token.

These generated words (e.g., "astronomy," "physics") act as high-level summaries of the document's topic. This is a key innovation: the MLM can predict "tennis" for an article even if that specific word never appears, simply by recognizing related entities like "Federer" or "Wimbledon."

2. The WDDC Model

The generated signals are fed into the Word Distribution learner and Document Classifier (WDDC), a latent variable model designed to learn without explicit labels. It treats the document's category ($C$) as a hidden (latent) variable and consists of two primary components:

  • Word Distribution Learner: Learns the probability of a signal word appearing given a specific category ($p(w|c)$).
  • Document Classifier: Learns to predict the category given the document text ($q(c|x)$).

These components are trained simultaneously by maximizing the Evidence Lower Bound (ELBO) of the log-likelihood of the generated signal words. This iterative process allows the model to refine its understanding of what a category "looks like" in terms of both document content and summary vocabulary. To maintain signal quality, the authors include a filtering step to remove "non-discriminated" words—common terms that appear across multiple categories and provide little discriminative power.

Experimental Evaluation

The method was evaluated on three standard text classification benchmarks: AGNews (news articles), 20Newsgroups (newsgroup posts), and UCINews (web-aggregated news).

Key Results

  • State-of-the-Art Performance: WDDC-MLM consistently outperformed strong weakly supervised baselines, including LOTClass and WeSTClass.
  • Accuracy Gains: The model demonstrated significant improvements: 2% on AGNews, 4% on 20Newsgroups, and 3% on UCINews over the best-performing baselines.
  • Generative vs. Extractive: Comparing signals generated by the MLM (WDDC-MLM) against those extracted directly from the document (WDDC-Doc) revealed that generation provides a more diverse and conceptually relevant vocabulary for training.

Discussion and Conclusion

The core insight of this work is that MLMs can function as zero-shot summarizers, bridging the gap between specific documents and general category concepts. While the model significantly narrows the performance gap with fully supervised systems, some limitations remain. Ambiguity in non-disjoint categories (e.g., "Science" vs. "Technology") can lead to confusing signals, and the model's performance can be sensitive to the specific prompt used.

Future work may involve automated prompt tuning to further optimize knowledge extraction. Nonetheless, WDDC represents a major step forward in making high-performance text classification accessible in low-resource and unlabeled environments.

Summary updated

BibTeX
@inproceedings{zeng2022weakly,
  author = {Ziqian Zeng and Weimin Ni and Tianqing Fang and Xiang Li and Xinran Zhao and Yangqiu Song},
  title = {{Weakly Supervised Text Classification using Supervision Signals from a Language Model}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.findings-naacl.176},
}
Figure