Exploring Asymmetric Encoder-Decoder Structure for Context-based Sentence Representation Learning

Shuai Tang, Hailin Jin, Chen Fang, Zhaowen Wang, Virginia R. de Sa

TL;DR

This paper introduces an asymmetric RNN-CNN encoder-decoder model for unsupervised sentence representation learning. By using a non-autoregressive CNN decoder and other efficiency-boosting techniques, they achieve faster training and competitive performance on downstream NLP tasks compared to existing methods.

What Problem Does This Paper Address?

Learning effective vector representations for sentences is crucial for many Natural Language Processing (NLP) tasks. Traditional methods often rely on complex, autoregressive models (like RNNs) for both encoding and decoding sentences. While these models can capture rich contextual information, they are computationally expensive and slow to train. The authors aim to address this by exploring whether a simpler, non-autoregressive approach can achieve comparable or better results in terms of both performance and efficiency for sentence representation learning.

Methods

The core of the proposed model is an asymmetric encoder-decoder structure.

  • Encoder: A bi-directional Gated Recurrent Unit (GRU) is used to process the input sentence and generate a fixed-dimension vector representation.
  • Representation: This vector is formed by concatenating the outputs of global mean-pooling and global max-pooling over the encoder's hidden states.
  • Decoder: Instead of a traditional autoregressive decoder (which predicts words one by one), they employ a non-autoregressive Convolutional Neural Network (CNN). This CNN decoder reconstructs a fixed-length window of subsequent words all at once. This design choice significantly speeds up training.
  • Training Objective: The model is trained to maximize the likelihood of reconstructing the target sequence of words, using a cross-entropy loss.
  • Other Techniques:
    • Tying Word Embeddings: The word embedding layer in the encoder is shared with the word prediction layer in the decoder to reduce parameters and potentially prevent overfitting.
  • Pretrained Embeddings: Word embeddings are initialized with pre-trained vectors (like word2vec or GloVe) to leverage existing linguistic knowledge.

Datasets

  • Training: The models were trained on two large unlabelled corpora:
  • BookCorpus
    • Amazon Book Review dataset (a larger subset than BookCorpus)
  • Evaluation: The learned sentence representations were evaluated on a variety of downstream NLP tasks, including:
  • Semantic relatedness (SICK-R, SICK-E)
    • Paraphrase detection (MSRP)
    • Question-type classification (TREC)
    • Sentiment analysis (MR, SST, CR, SUBJ, MPQA)
    • Semantic textual similarity (STS14)
    • Natural Language Inference (SNLI)

Key Insights and Ideas

  • Autoregressive Decoders are Not Essential: The paper provides strong experimental evidence that an autoregressive decoder is not necessary for learning good sentence representations. This is a significant finding, as autoregressive models are a bottleneck in training speed.
  • Predict-All-Words Decoders are Competitive: Their non-autoregressive, "predict-all-words" CNN decoder performs comparably to autoregressive decoders, while being much faster.
  • Asymmetry is Key for Efficiency: The asymmetric design (RNN encoder, CNN decoder) combined with predicting a fixed window of subsequent words, rather than entire sentences, dramatically reduces training time.
  • Mean+Max Pooling Boosts Transferability: Concatenating global mean and max pooling outputs for sentence representation leads to better transferability than using only max pooling.
  • Encoder Dimensionality Matters More: Increasing the dimensionality of the RNN encoder yields greater performance improvements than increasing the decoder's complexity.

Key Results

  • The proposed RNN-CNN model achieves competitive performance on various downstream NLP tasks, often matching or exceeding existing unsupervised methods.
  • The model is significantly faster to train than comparable autoregressive models. For instance, their "small RNN-CNN" model runs roughly three times faster than their implemented skip-thoughts model on the same GPU.
  • On the SNLI dataset, their "large RNN-CNN" model achieves an accuracy of 85.2% (Table 3), comparable to skip-thoughts (81.5%) but with much less training time.
  • Table 4 shows that their model generally outperforms other asymmetric models (like CNN-LSTM) and symmetric models (RNN-RNN) with similar or larger encoder sizes.

Limitations and Future Work

  • Hyperparameter Tuning: While they explored hyperparameters, the paper notes that further optimization might yield marginal gains, but at the cost of training efficiency.
  • Future Work: The authors suggest exploring how to further maximize the utility of context information and designing even simpler architectures to leverage this information effectively. They also mention the potential for combining their approach with costly human labeling to make NLP systems more efficient and cost-effective.

Summary updated

BibTeX
@misc{tang2017exploring,
  author = {Shuai Tang and Hailin Jin and Chen Fang and Zhaowen Wang and Virginia R. de Sa},
  title = {{Exploring Asymmetric Encoder-Decoder Structure for Context-based Sentence Representation Learning}},
  year = {2017},
  eprint = {1710.10380},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1710.10380},
}
Figure