Weakly-Supervised Deep Learning for Domain Invariant Sentiment Classification

Pratik Kayal, Mayank Singh, Pawan Goyal · DOI

Abstract

Sentiment analysis models frequently struggle when applied to new domains due to shifts in linguistic context and vocabulary. This paper proposes a two-stage training strategy that leverages large-scale weakly labeled data (WLD) alongside small-scale fully labeled data (FLD) to develop domain-invariant models. By pre-training on noisy star-rating data and fine-tuning on verified sentences, the researchers demonstrate a "lift-and-shift" capability where models perform effectively on unseen target domains. Experiments with BERT and ELMo architectures reveal that transformer-based models achieve significant performance gains, often matching the accuracy of domain-specific models.

Introduction

Sentiment analysis is a critical task in natural language processing, yet models are notoriously brittle when moved between domains. For example, a model trained on movie reviews may fail to correctly classify a "warm" laptop as negative, as the term "warm" carries positive connotations in social contexts but negative ones in hardware performance.

Traditional domain adaptation techniques often require access to target domain data during training, which is impractical for many niche applications. This research addresses the challenge of Domain Invariant Sentiment Classification, aiming to create models that can be "lifted" from a source domain and "shifted" to any unknown target domain without prior exposure to that target's specific data.

Methods

The authors propose a two-stage training procedure designed to leverage the strengths of different data types:

  1. Stage 1: Weakly Supervised Pre-training: The model is first trained on a large Weakly Labeled Dataset (WLD) from the source domain. These labels are "weak" because they are derived automatically from user star ratings (e.g., 1-2 stars = negative, 4-5 stars = positive). This stage uses a low learning rate for a few iterations to capture broad sentiment signals.
  2. Stage 2: Fully Supervised Fine-tuning: The model is then trained on a smaller Fully Labeled Dataset (FLD)—manually verified sentences—from the same source domain. This stage uses a higher learning rate to sharpen the model’s accuracy.

The researchers tested this approach using two state-of-the-art architectures: BERT (Bidirectional Encoder Representations from Transformers) and ELMo (Embeddings from Language Models).

Datasets

The study utilized two categories of datasets to balance scale and precision. The Weakly Labeled Datasets (WLD) provide the volume necessary for initial signal capture, while the Fully Labeled Datasets (FLD) provide the high-quality ground truth needed for refinement.

Table 1: Overview of Weakly Labeled (WLD) and Fully Labeled (FLD) datasets used in the study.

The WLD includes massive collections from Amazon, Yelp, and IMDB. The FLD covers a broader range of domains, including Weather and Scientific citations, to test the limits of cross-domain generalization.

Key Results

The quantitative results, particularly for the BERT-based models, demonstrate the effectiveness of the two-stage approach. BERT significantly outperformed ELMo in cross-domain tasks, suggesting that transformer-based models generate more robust, generalizable embeddings.

Table 2: Cross-domain performance (Accuracy and F1) for BERT-based models using the proposed two-stage training strategy.

Key findings include:

  • Cross-Domain Parity: In several cases, the proposed "lift-and-shift" model performed at par with models trained and tested on the same domain. For example, the ACAD-AWLD model (trained on Amazon Cell data) achieved 90.50% accuracy on its own domain and maintained high scores (up to 94.00%) when shifted to the Amazon Laptop domain (ADLD).
  • Significant Gains: Using the two-stage approach on BERT led to transfer results that were often 4-6% higher than standard baselines.
  • The Necessity of Two Stages: Training only on WLD produced the worst results, confirming that while weak signals are useful for initialization, high-quality manual labels are still essential for final performance.
  • ELMo's Struggle: ELMo-based models showed poor generalization, often failing to transfer effectively even with the two-stage training, highlighting the importance of the underlying architecture in domain adaptation.

Limitations and Future Work

The authors noted that transfer performance drops when the source and target domains are highly dissimilar. For instance, transferring between "Scientific reviews" and "Weather reviews" remained a significant challenge due to the vast difference in linguistic style and vocabulary.

Future work could explore combining various weakly labeled domains during the pre-training phase to create an even more "universal" sentiment encoder. Additionally, investigating why specific domains (like Scientific citations) are more resistant to transfer could lead to more specialized adaptation techniques. Applying this two-stage logic to other NLP tasks beyond sentiment classification, such as intent detection or emotion recognition, remains a promising avenue for research.

Summary updated

BibTeX
@inproceedings{kayal2019weakly,
  author = {Pratik Kayal and Mayank Singh and Pawan Goyal},
  title = {{Weakly-Supervised Deep Learning for Domain Invariant Sentiment Classification}},
  booktitle = {COMAD/CODS},
  year = {2019},
  doi = {10.1145/3371158.3371194},
}
Figure