Self-Discriminative Learning for Unsupervised Document Embedding

Hong-You Chen, Chin-Hua Hu, Leila Wehbe, Shou-De Lin

Abstract

Unsupervised document embedding typically relies on predicting internal words, often ignoring inter-document relationships. We present Self-Discriminative Document Embedding (SDDE), a framework that learns representations by training a model to distinguish whether a specific sentence belongs to a given document. This discriminative approach produces more separable features, outperforming state-of-the-art models in text classification, particularly when labeled data is scarce.

Introduction

Most unsupervised document embedding methods, such as Doc2Vec or Paragraph Vectors, are built upon the distributional hypothesis: a document's meaning is captured by predicting its constituent words. However, this approach has significant limitations. First, it focuses on intra-document information, neglecting how documents differ from one another in the global embedding space. Second, word-level prediction can be overly rigid, penalizing semantic synonyms (e.g., "nice" vs. "good") and forcing the model to prioritize local syntax over high-level semantics.

Methodology: Self-Discriminative Learning

The proposed Self-Discriminative Document Embedding (SDDE) shifts the objective from word prediction to a discrimination task.

Discriminative Objective

Instead of predicting words, the model uses a discriminator to decide if a given sentence vector ($e_s$) belongs to a specific document vector ($d$). This self-supervision task encourages the model to learn features that distinguish a document from the rest of the corpus.

Hierarchical Representation and Dropout

A document is represented as the mean of its sentence embeddings, facilitating parallel processing of long texts. To ensure the model captures global information, sentence-level dropout is applied during training, where only a random subset of sentences is used to generate the document vector.

Training and Encoders

The model is trained using positive sentences (from the document) and negative sentences (sampled from other documents). The authors evaluated two encoder architectures: a simple word-averaging model (SDDE-AVG) and a Gated Recurrent Unit (SDDE-RNN).

Experimental Setup

The framework was evaluated on four standard benchmarks:

  • IMDB and Yelp Polarity: Binary sentiment analysis.
  • AG’s News: Four-class topic classification.
  • DBPedia: 14-class Wikipedia topic classification.

Key Results and Analysis

SDDE demonstrates superior performance across various metrics and settings.

Classification Performance

On the IMDB benchmark, SDDE-RNN achieved a 10.2% error rate, significantly better than Doc2VecC (11.7%) and PV-DBoW (12.0%). The advantage is even more pronounced in "weakly-supervised" scenarios. On AG's News with limited labels, SDDE achieved a 10.0% error rate, compared to 13.9% for Doc2VecC.

Visualizing Class Separation

t-SNE visualizations reveal that SDDE creates tighter, more distinct clusters than traditional methods. While other models often produce overlapping "blobs," SDDE's discriminative objective naturally spreads the embedding space, facilitating easier classification.

t-SNE comparison of document embeddings on the IMDB dataset.
t-SNE comparison of document embeddings on the AG's news dataset.

Quantitative analysis supports this: SDDE showed an "Intra vs. Inter-class similarity" separation of 0.61 on DBPedia, far exceeding Doc2VecC's 0.20.

Discussion and Future Work

A key insight is that operating at the sentence level provides a "semantic buffer," reducing noise from word-level fluctuations. Interestingly, while RNN encoders excel at sentiment tasks (IMDB), simpler word-averaging (SDDE-AVG) performs better on multi-class topic datasets like DBPedia, suggesting RNNs may struggle with multi-domain information without explicit supervision.

Future research will explore joint training, combining unsupervised embedding and supervised classification in a semi-supervised framework to further enhance performance.

Summary updated

BibTeX
@inproceedings{chen2019self,
  author = {Hong-You Chen and Chin-Hua Hu and Leila Wehbe and Shou-De Lin},
  title = {{Self-Discriminative Learning for Unsupervised Document Embedding}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/n19-1255},
}
Figure