KATE: K-Competitive Autoencoder for Text

Yu Chen, Mohammed J. Zaki · DOI

Introduction

Representing textual data presents unique challenges for standard deep learning architectures. Unlike images, text is characterized by extreme high-dimensionality, sparsity, and a power-law distribution where a small subset of words appears frequently while the vast majority are rare. Traditional autoencoders (AEs) often struggle with these properties, frequently learning "trivial" representations that focus on non-informative, high-frequency words (e.g., "the", "and"). This results in "blurry" features where hidden neurons fail to capture the semantic nuances necessary for downstream tasks like classification or retrieval.

To address these limitations, we present KATE (K-competitive Autoencoder for TExt), a novel architecture that introduces a competitive learning mechanism to force hidden neurons to specialize, thereby producing more robust and discriminative text embeddings.

Methodology: The K-Competitive Layer

The core innovation of KATE is its k-competitive hidden layer, which replaces the standard activation step with a "k-winners-take-all" approach. This mechanism ensures that only the most relevant neurons for a given input are activated, preventing the "greedy" behavior where all neurons attempt to model the same frequent patterns.

The KATE architecture featuring the k-competitive layer with energy reallocation.

The training process follows a specific sequence:

  1. Initial Activation: Hidden layer activations are first calculated using a $tanh$ function.
  2. Competition: Neurons are partitioned into positive and negative groups. Only the top $k/2$ most positive and $k/2$ most negative neurons are designated as "winners."
  3. Energy Reallocation: Instead of simply discarding the "loser" neurons, KATE reallocates their total activation potential (energy) to the winners via an $\alpha$ amplification connection. This ensures that gradients continue to flow through the "loser" paths during backpropagation, mitigating the "dead neuron" problem.
  4. Sparsification: The loser neurons are set to zero, and the output layer (using a $sigmoid$ function with tied weights) attempts to reconstruct the original log-normalized word count vector.

This competition forces each neuron to become a specialist in recognizing specific, distinct semantic patterns. Notably, this competition is only required during training; once the model has converged, the specialized neurons can generate high-quality embeddings through a simple feedforward pass.

Experimental Evaluation

KATE was evaluated against a variety of baselines, including standard AEs, Variational Autoencoders (VAE), Word2Vec, and DocNADE, across four benchmark datasets: 20 Newsgroups, Reuters RCV1-v2, Wiki10+, and Movie Review Data (MRD).

Performance Metrics

  • Document Classification: On the 20 Newsgroups dataset, KATE achieved an accuracy of 74.4%, significantly outperforming VAE (72.4%) and DocNADE (71.4%).
  • Sentiment Analysis: In predicting numerical movie ratings (MRD), KATE reached an $r^2$ score of 0.463, whereas standard AEs failed to produce positive scores and Word2Vec achieved only 0.143.
  • Topic Orthogonality: Using Mean Squared Cosine Deviation (MSCD), KATE was shown to learn "topics" that are more distinct and less redundant than those produced by Latent Dirichlet Allocation (LDA).

Qualitative Analysis

The impact of the k-competitive layer is most visible when visualizing the learned document vectors. Compared to traditional methods, KATE produces much tighter and more distinct clusters for different document categories.

Visualization of document vectors using PCA (top) and t-SNE (bottom) across different models: (a) AE, (b) KSAE, (c) LDA, and (d) KATE.

As shown in the visualization, KATE (d) demonstrates superior separation of the 20 Newsgroups categories in both PCA and t-SNE projections compared to standard Autoencoders (a) or LDA (c). This confirms that the competitive mechanism successfully captures the underlying semantic structure of the text.

Conclusion

KATE provides a powerful yet simple modification to the autoencoder framework, specifically tailored for the sparse and high-dimensional nature of text. By fostering competition among neurons and reallocating energy to maintain gradient flow, KATE achieves state-of-the-art performance in various NLP tasks. Future work will explore deep, multi-layer competitive architectures and their scalability to massive web-scale datasets.

Summary updated

BibTeX
@inproceedings{chen2017kate,
  author = {Yu Chen and Mohammed J. Zaki},
  title = {{KATE: K-Competitive Autoencoder for Text}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2017},
  doi = {10.1145/3097983.3098017},
}
Figure