Learning Robust Representations of Text

Yitong Li, Trevor Cohn, Timothy Baldwin

Abstract

Deep learning models for Natural Language Processing (NLP) often exhibit brittleness when encountering real-world noise or domain shifts. This paper proposes a novel regularization technique that minimizes the sensitivity of the loss function relative to hidden representations. This "Robust Regularization" approach encourages the model to learn more stable features, leading to significant performance improvements over standard baselines and dropout techniques on both corrupted datasets and out-of-domain tasks.

Introduction

While state-of-the-art deep learning models excel on clean, curated datasets, their performance frequently degrades when faced with "noisy" inputs such as typos, slang, or adversarial perturbations. This vulnerability is largely attributed to the linear nature of neural networks, where small input changes can trigger disproportionately large swings in output. In the discrete domain of NLP, generalizing across different text styles (e.g., from movie reviews to product reviews) remains a significant challenge.

Methodology: Robust Regularization

Inspired by contractive auto-encoders, the authors introduce a regularization term that stabilizes model predictions by ensuring the loss function remains "flat" in the vicinity of the learned hidden features. The modified loss function $\mathcal{L}$ is defined as:

$$\mathcal{L} = L + \lambda \cdot \left\| \frac{\partial L}{\partial h} \right\|_2$$

where $L$ is the standard loss, $h$ represents the hidden layer activations, and $\lambda$ is a hyperparameter controlling the regularization strength. By penalizing the norm of the gradient of the loss with respect to the hidden representation, the model is forced to find solutions insensitive to small perturbations in the feature space. Although this requires computing second-order derivatives, the computational overhead remains manageable.

Experimental Setup

The method was evaluated using a Convolutional Neural Network (CNN) architecture on four sentiment analysis benchmarks:

  1. MR: Movie Review polarity dataset.
  2. Subj: Subjectivity dataset.
  3. CR: Customer Review dataset.
  4. SST: Stanford Sentiment Treebank.

To simulate real-world noise, the researchers applied word-level dropout, replacing words with a sentinel symbol at rates of 10%, 20%, and 30%.

Results and Key Insights

Performance Under Noise

The Robust Regularization method consistently outperformed baseline CNNs and models using only dropout. In 15 out of 16 noise scenarios tested, the proposed method achieved the highest accuracy. Notably, the combination of dropout and robust regularization often yielded the best results in high-noise environments, suggesting that the two techniques are complementary: dropout prevents co-adaptation by randomly breaking connections, while robust regularization smooths the network's sensitivity mathematically.

Performance comparison on MR and Subj datasets across varying word dropout rates (α) and regularization parameters.

Cross-Domain Generalization

A key finding is that robustness to noise correlates with better domain adaptation. When trained on movie reviews (MR) and tested on product reviews (CR), the robustly regularized model achieved an accuracy of 72.0%, a significant improvement over the 67.5% baseline. This suggests that the learned "robust" features are more universal and less tied to domain-specific idiosyncrasies.

Cross-domain classification accuracy for MR and CR datasets.

Computational Efficiency

Despite the complexity of second-order derivatives, training remains efficient. On a standard two-core CPU, robust training took approximately 35–40 minutes, compared to 30 minutes for the baseline model.

Limitations and Future Work

Current evaluations are limited to CNN architectures and sentiment classification tasks. Future research should explore the effectiveness of this regularization on sequence models like LSTMs or Transformers. Additionally, investigating more sophisticated forms of linguistic noise—such as synonym substitution or syntactic variations—could provide deeper insights into the model's resilience.

Summary updated

BibTeX
@inproceedings{li2016learning,
  author = {Yitong Li and Trevor Cohn and Timothy Baldwin},
  title = {{Learning Robust Representations of Text}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2016},
  doi = {10.18653/v1/d16-1207},
}
Figure