SSMBA: Self-Supervised Manifold Based Data Augmentation for Improving Out-of-Domain Robustness

Nathan Ng, Kyunghyun Cho, Marzyeh Ghassemi · DOI

TL;DR

This paper introduces SSMBA, a novel self-supervised data augmentation technique that generates synthetic training examples by moving along the data manifold. SSMBA significantly improves out-of-domain (OOD) robustness across various NLP tasks, outperforming existing methods without requiring task-specific knowledge.

What Problem Does This Paper Address?

Machine learning models often struggle to generalize to data that differs from their training distribution, a phenomenon known as out-of-domain (OOD) generalization. This is a critical issue in real-world applications where data distributions can shift over time or vary across different sources. Data augmentation is a common strategy to combat this by artificially expanding the training set. However, in domains like natural language, it's challenging to create new, realistic examples that stay "on the manifold" of the true data distribution, meaning they preserve meaning and linguistic structure. Existing methods often rely on hand-crafted heuristics or external resources, limiting their applicability.

Methods

SSMBA tackles the OOD generalization problem by leveraging the manifold assumption, which posits that high-dimensional data often lies on a lower-dimensional manifold. The core idea is to generate synthetic data points that are close to the original data points on this manifold.

The method works in two steps:

  1. Corruption: A corruption function q stochastically perturbs an input x (e.g., a sentence) to create x', moving it off the data manifold. For NLP, this is achieved using Masked Language Models (MLMs), where a percentage of tokens are masked, replaced with random tokens, or left unchanged.
  2. Reconstruction: A reconstruction function r then takes the corrupted input x' and reconstructs it to x̂, projecting it back onto the data manifold. This reconstruction is also performed using MLMs (specifically, pre-trained BERT models).

By using a pair of corruption and reconstruction functions, SSMBA generates synthetic examples that are linguistically plausible and lie within the manifold neighborhood of the original data. The generated synthetic examples are then added to the training set, and the model is retrained. Crucially, SSMBA is self-supervised, meaning it doesn't require additional labeled data for augmentation and can be applied to any supervised NLP task.

Datasets

The authors evaluated SSMBA on a diverse set of 9 datasets across three NLP tasks:

  • Sentiment Analysis:
    • Amazon Review Dataset (AR-Clothing, AR-Full)
    • SST2 (movie reviews)
    • IMDb (movie reviews)
    • Yelp Review Dataset (restaurant reviews)
  • Natural Language Inference (NLI):
    • MNLI (Multi-Genre Natural Language Inference)
    • ANLI (Adversarial NLI) - treated as three separate domains (R1, R2, R3)
  • Machine Translation (MT):
    • IWSLT14 German-English (de→en)
    • OPUS (German-English, de→en) - used for OOD evaluation with diverse domains
    • German-Romansh (de→rm) - a low-resource language

Key Insights and Ideas

  • Manifold-based augmentation is effective for NLP: The paper demonstrates that moving along the data manifold, even in the complex domain of natural language, is a powerful strategy for improving OOD robustness.
  • MLMs as Denoising Autoencoders: The authors cleverly repurpose pre-trained MLMs as both corruption and reconstruction functions, aligning with the denoising autoencoder paradigm for manifold learning.
  • Task-agnostic and knowledge-free: A significant advantage of SSMBA is its applicability to any supervised NLP task without needing task-specific heuristics or external knowledge bases.
  • Robustness to hyperparameters: SSMBA shows remarkable robustness to variations in training set size, reconstruction model capacity, and corruption amount, making it practical to implement.
  • Unrestricted sampling is key: The experiments suggest that allowing the reconstruction function to explore the full probability distribution (unrestricted sampling) yields the best OOD performance, indicating that exploring broader manifold regions is beneficial.

Key Results

SSMBA consistently outperformed baseline models and other data augmentation methods on both in-domain (ID) and out-of-domain (OOD) performance across all tested tasks and datasets.

  • Sentiment Analysis: Achieved gains of up to 0.8% accuracy on OOD Amazon reviews and improved ID performance by 0.8% for RNN models.
  • Natural Language Inference: Showed significant improvements, including 1.8% accuracy on OOD MNLI and a substantial 6% improvement on ID data for the challenging ANLI dataset.
  • Machine Translation: Achieved 1.4 BLEU on in-domain IWSLT14 German-English and notable OOD improvements on other MT tasks.
  • Training Set Size: SSMBA provided OOD performance gains even with very small training sets (as few as 24 examples).
  • Reconstruction Model: Performance was similar across different sizes of RoBERTa models, suggesting that even smaller models can be effective.

Limitations and Future Work

  • Labeling Method: While SSMBA generally improves performance, the choice of labeling method for synthetic data can impact results. Soft labeling generally performed better than preserving the original label, especially when the labeling model was well-trained. However, in some cases (like ANLI), even a poorly performing labeling model still yielded improvements.
  • Future Work: The authors suggest exploring SSMBA for the target side manifold in structured prediction tasks and applying it to other natural language tasks and settings where data augmentation is challenging. They also mention investigating different corruption and reconstruction functions.

Summary updated

BibTeX
@inproceedings{ng2020ssmba,
  author = {Nathan Ng and Kyunghyun Cho and Marzyeh Ghassemi},
  title = {{SSMBA: Self-Supervised Manifold Based Data Augmentation for Improving Out-of-Domain Robustness}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.97},
}
Figure