Distance Based Source Domain Selection for Sentiment Classification

Lex Razoux Schultz, Marco Loog, Peyman Mohajerin EsfahaniarXiv 2018

Introduction

Sentiment classification (SC) has become a cornerstone of natural language processing, yet it remains highly sensitive to domain shift. A model trained on movie reviews often fails when deployed on tweets or product descriptions because the vocabulary and stylistic expressions of sentiment vary significantly across contexts. This "domain transfer problem" is typically addressed through domain adaptation, but a more fundamental question often precedes adaptation: given a library of labeled source domains, which one should be used to train the model for an unlabeled target domain?

Without target labels, calculating cross-domain error directly is impossible. This paper introduces CMEK, an unsupervised source domain selection model designed to predict transferability by measuring the statistical distance between word distributions.

The CMEK Framework

CMEK (Chi-square, MMD, EMD, KLD) operates on the premise that the marginal distributions of features—specifically word frequencies in a bag-of-words model—can serve as a proxy for predicting classification performance. The model calculates a learned linear combination of four distinct statistical distance measures:

  1. Chi-square divergence (Chi2)
  2. Maximum Mean Discrepancy (MMD)
  3. Earth Mover’s Distance (EMD)
  4. Kullback-Leibler Divergence (KLD)

In addition to these distances, CMEK incorporates the inner-domain classification error (the source domain's performance on its own validation data) and a constant offset. To determine the optimal weights for these metrics, the authors employ a leave-one-out proxy method using available labeled source domains. Once trained, the model can predict the cross-domain error for any unseen target domain and select the optimal source data for training.

Experimental Methodology

The effectiveness of CMEK was evaluated across three distinct scenarios to test robustness:

  • Homogeneous Datasets: Utilizing 20 corpora from the DRANZIERA benchmark (Amazon product reviews), where domains differ only by product category (e.g., Books vs. Electronics).
  • Heterogeneous Datasets: A diverse collection of 13 corpora, including movie reviews, tweets, and venue reviews, featuring significant variations in document length, size, and topic.
  • Adaptive Learning: A benchmark of four Amazon categories used to test CMEK's synergy with advanced techniques like Domain-Adversarial Neural Networks (DANN) and marginalized Stacked Denoising Auto-encoders (mSDA).

Key Insights

The Sufficiency of Marginal Distributions

While sentiment is inherently tied to the joint distribution of words and labels, the authors demonstrate that measuring the distance between marginal distributions (individual word frequencies) is highly effective for predicting transferability. This simplifies the selection process significantly, as it does not require complex semantic modeling or target labels.

The "More Data" Fallacy

A common heuristic in machine learning is that more data leads to better generalization. However, this study reveals that in highly heterogeneous environments, training on all available source domains can actually degrade performance. "Bad" source domains—those with high statistical distance from the target—introduce noise that outweighs the benefit of additional samples. CMEK allows for the selection of a high-quality subset, often outperforming brute-force aggregation.

Results

CMEK demonstrated a robust ability to identify high-performing source domains and avoid poor ones:

  • Homogeneous Data: CMEK selected the absolute best source domain 60% of the time, compared to a 5.3% success rate for random selection. The average absolute cross-domain error dropped to 0.144 (vs. 0.191 for random).
  • Heterogeneous Data: It identified the best source 38.5% of the time (vs. 8.3% random). Crucially, CMEK had a very low probability (0% to 15%) of picking one of the five worst domains, whereas random selection picked a poor domain up to 41% of the time.
  • Adaptive Learning Synergy: When paired with DANN, CMEK successfully identified the optimal source domain 100% of the time in the adaptive test set, pushing the error down to 0.152.

Limitations and Future Directions

Despite its success, CMEK faces computational challenges. The calculation of Earth Mover’s Distance (EMD) is resource-intensive, requiring the authors to truncate the feature space to the 1,000 most frequent words. Furthermore, the reliance on a bag-of-words representation ignores the nuances of word order and deeper semantic context.

Future research may explore using sentiment-specific lexicons to calculate distances, focusing only on words with high emotional valence. Additionally, the authors suggest that CMEK could be evolved from a "hard selection" tool into an importance-sampling framework, where source domains are weighted continuously during the training process based on their predicted transferability.

Summary updated

BibTeX
@misc{schultz2018distance,
  author = {Lex Razoux Schultz and Marco Loog and Peyman Mohajerin Esfahani},
  title = {{Distance Based Source Domain Selection for Sentiment Classification}},
  year = {2018},
  eprint = {1808.09271},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1808.09271},
}
Figure