Classification over Clustering: Augmenting Text Representation with Clusters Helps!

Xiaoye Tan, Rui Yan, Chongyang Tao, Mingrui Wu

TL;DR

The LSCR (Latent Semantic Clustering Representation) framework improves text classification by grouping words into "latent semantic clusters" before making a decision. By mimicking how humans categorize information into topics, the model creates a more structured, interpretable, and high-performing representation of text compared to standard neural networks.

What Problem Does This Paper Address?

In traditional Natural Language Processing (NLP), we often represent text as a sequence of individual words or a single aggregated vector. While models like Recurrent Neural Networks (RNNs) and Convolutional Neural Networks (CNNs) are great at capturing context or local patterns, they often lack a sense of semantic segmentation.

When a human reads a paragraph to classify it as "Science" or "Business," we don't just look at words one by one; we intuitively group related terms. For example, seeing "internet," "wireless," and "Linux" together signals a specific domain. Existing attention mechanisms help identify important words, but they don't explicitly group words with similar semantics to strengthen the overall signal. The authors aim to bridge this gap by moving from word-level representations to cluster-level representations.

Methods

The authors propose the Latent Semantic Clustering Representation (LSCR) framework, which consists of four main stages:

  1. Encoding Layer: Words are converted into embeddings (GloVe) and passed through a bi-directional LSTM to capture contextual information.
  2. Semantics Clustering Layer: This is the core innovation. Instead of a single pooling operation, an MLP assigns each word a probability of belonging to one of $m$ latent clusters. A "cluster vector" is then calculated as the weighted sum of the words assigned to it.
  3. Aggregation Layer: Not all clusters are useful for every task. The model uses a gating mechanism (similar to those in LSTMs) to dynamically filter out redundant or irrelevant clusters before concatenating them into a final text representation.
  4. Regularization: To ensure the clusters are meaningful, the authors introduce two specific constraints:
  5. Word-level entropy: Forces words to belong to one (or very few) clusters rather than being spread thinly across all of them.
  6. Class-level regularization: Encourages the distribution of clusters to be distinct for different categories (e.g., the "Science" class should look different in cluster-space than the "Sports" class).

Datasets

The model was evaluated on five standard benchmarks covering topic classification, sentiment analysis, and ontology classification:

  • AGNews: Topic classification (4 classes).
  • DBPedia: Ontology classification (14 classes).
  • Yahoo! Answers: Topic classification (10 classes).
  • Yelp P. (Polarity): Binary sentiment analysis.
  • Yelp F. (Full): Fine-grained sentiment analysis (1-5 stars).

Key Insights and Ideas

  • Clusters as Topics: Visualization via heatmaps revealed that the model naturally learned to separate "meaningless" stop words (like "the," "a," "for") into one cluster while grouping domain-specific terms (like "oil," "prices," "stocks") into others.
  • The Power of Sparsity: By forcing words into specific clusters (via entropy regularization), the model avoids the "blurry" representations common in soft-attention mechanisms, leading to sharper, more interpretable features.
  • Length Matters: The researchers found that LSCR performs significantly better on longer texts. This makes sense: the more words you have, the more "raw material" there is to cluster, allowing the model to build a more robust topical profile.
  • Interpretability: Unlike many "black box" neural models, LSCR provides a clear window into why it made a choice by showing which semantic clusters were most active for a given document.

Key Results

LSCR achieved competitive or state-of-the-art (SOTA) results across all benchmarks:

  • Significant Gains: It improved SOTA performance by 1.0% on Yahoo! Answers and a substantial 2.5% on Yelp Full.
  • Efficiency: Despite its complexity, the model is relatively "shallow" compared to deep CNNs but outperformed them on several tasks.
  • Robustness: It consistently beat traditional baselines (TF-IDF, FastText) and more complex attention-based models (LEAM, Self-Attentive) by a large margin.

Limitations and Future Work

While the results are promising, the authors note a few areas for growth:

  • Granularity: The current model clusters individual words. The authors suggest that clustering phrases or n-grams might capture even richer semantic meaning.
  • Encoder Flexibility: The study primarily used bi-LSTMs as the base encoder. Future work could explore using Transformers (like BERT) as the underlying encoding layer to see if the clustering benefit holds.
  • Task Expansion: The paper focuses on classification; testing this clustering approach on other NLP tasks like summarization or translation remains an open challenge.

Summary updated

BibTeX
@inproceedings{tan2019classification,
  author = {Xiaoye Tan and Rui Yan and Chongyang Tao and Mingrui Wu},
  title = {{Classification over Clustering: Augmenting Text Representation with Clusters Helps!}},
  booktitle = {NLPCC},
  year = {2019},
  doi = {10.1007/978-3-030-32236-6\_3},
}

Loading related content...

Figure