Domain Adaptation for Sentiment Analysis Using Increased Intraclass Separation

Mohammad Rostami, Aram GalstyanarXiv 2021

Introduction

Cross-domain sentiment analysis remains a significant challenge in natural language processing. While models perform well when training and testing data come from the same distribution, they often struggle with "domain shift"—where the vocabulary used to express sentiment varies across contexts (e.g., "fascinating" for books vs. "tasty" for food). Unsupervised Domain Adaptation (UDA) aims to mitigate this by aligning source and target distributions in a shared latent space. However, standard alignment often fails to account for shifting decision boundaries. This paper introduces SAIM$^2$ (Sentiment Analysis using Increased-Margin Models), a method that artificially induces larger margins between classes to enhance robustness against domain shift.

Methodology: The SAIM$^2$ Framework

The core innovation of SAIM$^2$ is the use of a Gaussian Mixture Model (GMM) to create a geometric "buffer" in the embedding space. The process follows a four-step pipeline:

  1. Source Pre-training: An encoder maps input text into a latent space where classes are initially separated using labeled source data.
  2. GMM Estimation: The latent representations of the source data are modeled as a GMM. By utilizing the available source labels, the authors employ a closed-form Maximum A Posteriori (MAP) estimate, avoiding the computational overhead of iterative algorithms like Expectation-Maximization.
  3. Pseudo-Dataset Generation: High-confidence samples are drawn from the GMM to form a pseudo-dataset. This step effectively "pushes" class clusters further apart, increasing the intraclass margin.
  4. Target Alignment: The unlabeled target domain is aligned with this high-margin pseudo-dataset using Sliced Wasserstein Distance (SWD).
Overview of the SAIM$^2$ adaptation process, illustrating how GMM-based margin expansion mitigates domain shift.

Experimental Evaluation

The authors evaluated SAIM$^2$ on the Amazon Reviews benchmark, covering four domains: Books (B), DVD (D), Electronics (E), and Kitchen (K). The tasks involved binary sentiment classification across 12 cross-domain pairs.

Key Results

SAIM$^2$ achieved state-of-the-art performance across nearly all tasks. For instance, in the Electronics $\rightarrow$ Kitchen transfer task, accuracy improved from a source-only baseline of 85.6% to 89.2%, outperforming existing methods like Domain Separation Networks (DSN).

Ablation studies confirmed that the performance gain is primarily driven by the induced margins rather than the alignment metric alone. When the GMM pseudo-dataset step was removed, performance dropped significantly, proving that the "buffer" created by larger margins is essential for absorbing the impact of domain shift.

Conclusion

By treating margins as a geometric buffer, SAIM$^2$ provides a robust framework for unsupervised domain adaptation. The method's efficiency—stemming from closed-form GMM estimation and SWD—makes it a practical solution for real-world sentiment analysis tasks where target labels are unavailable. Future work may explore extending this approach to multi-class or fine-grained sentiment categories.

Summary updated

BibTeX
@misc{rostami2021domain,
  author = {Mohammad Rostami and Aram Galstyan},
  title = {{Domain Adaptation for Sentiment Analysis Using Increased Intraclass Separation}},
  year = {2021},
  eprint = {2107.01598},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.01598},
}
Figure