A Hassle-Free Unsupervised Domain Adaptation Method Using Instance Similarity Features

Jianfei Yu, Jing Jiang

Abstract

Unsupervised domain adaptation (UDA) typically requires complex algorithmic frameworks to bridge the gap between source and target distributions. We present a "hassle-free" method that utilizes Instance Similarity Features (ISF)—new features derived from the similarity to random target-domain instances. This approach is computationally efficient, easy to implement, and consistently outperforms established baselines like Structural Correspondence Learning (SCL) across diverse NLP tasks, including spam filtering, named entity recognition, and relation extraction.

Introduction

Machine learning models often suffer from performance degradation when the training (source) domain differs from the deployment (target) domain. While supervised adaptation can often be addressed with simple feature augmentation, unsupervised domain adaptation (UDA) usually necessitates complex methods like deep autoencoders or Structural Correspondence Learning (SCL). These methods are often difficult to tune and computationally expensive. This paper introduces a "frustratingly easy" alternative for UDA that practitioners can implement with minimal effort.

Methodology: Instance Similarity Features (ISF)

The core of the proposed method is the generation of Instance Similarity Features (ISF). The process involves four simple steps:

  1. Exemplar Selection: Randomly select $K$ unlabeled instances from the target domain and normalize them to create exemplar vectors.
  2. Similarity Computation: For every instance in both source and target sets, compute its similarity (e.g., dot product) to each of the $K$ exemplars.
  3. Feature Augmentation: Append the resulting $K$-dimensional similarity vector to the original feature set.
  4. Model Training: Train a standard classifier (e.g., Logistic Regression with $L_2$ regularization) on the augmented source data.

Unlike SCL, which requires identifying "pivot features" and performing Singular Value Decomposition (SVD), ISF relies on basic linear algebra and random sampling.

Key Insights

The effectiveness of ISF stems from its ability to "couple" source and target features. By using target-domain exemplars, the model learns correlations between source-specific features and target-domain structures. Mathematically, this forces the classifier to operate within the target domain's feature subspace, reducing reliance on source-specific noise.

Analysis of domain separation error and target error ($\hat{\epsilon}_t$) showing ISF's effectiveness in bridging domains.

The authors found that random sampling of exemplars is sufficient, and $L_2$ regularization is critical for shifting model weights from sparse original features to dense similarity features. As shown in the analysis above, ISF significantly reduces the domain separation error compared to using original features alone.

Results

ISF consistently outperformed the "Naive" (source-only) baseline and the industry-standard SCL across all evaluated tasks: personalized spam filtering (ECML/PKDD 2006), named entity recognition (BioCreAtIvE), and relation extraction (ACE2005).

Comprehensive performance comparison of ISF against Naive, Common, and SCL baselines across Spam, NER, and Relation Extraction tasks.

In spam filtering, ISF achieved an average accuracy of 79.1%, significantly higher than the Naive baseline (73.5%) and SCL (74.7%). It also outperformed PCA (74.5%), suggesting that local instance similarities are more informative than global variance for adaptation. In NER and Relation Extraction, ISF showed statistically significant improvements in F1 scores. Notably, ISF is significantly faster than SCL or PCA-based methods due to the absence of expensive matrix factorizations.

Conclusion and Future Work

ISF provides a simple yet powerful tool for UDA. While effective, the method requires tuning the number of exemplars ($K$). Future research could explore alternative similarity metrics, such as RBF kernels, and provide more formal theoretical bounds on error reduction. Despite these areas for growth, ISF represents a highly practical solution for real-world domain adaptation challenges.

Summary updated

BibTeX
@inproceedings{yu2015hassle,
  author = {Jianfei Yu and Jing Jiang},
  title = {{A Hassle-Free Unsupervised Domain Adaptation Method Using Instance Similarity Features}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2015},
  doi = {10.3115/v1/p15-2028},
}
Figure