PERL: Pivot-based Domain Adaptation for Pre-trained Deep Contextualized Embedding Models

Eyal Ben-David, Carmel Rabinovitz, Roi Reichart

Abstract

Unsupervised Domain Adaptation (UDA) is a critical challenge in NLP, where models often fail when applied to domains different from their training data. We present PERL (Pivot-based Encoder Representation of Language), a novel framework that integrates the extensive knowledge of pre-trained models like BERT with traditional pivot-based domain adaptation. By refining BERT’s masking objective to focus on domain-invariant "pivot" features, PERL achieves state-of-the-art performance across 22 sentiment classification tasks. Our results demonstrate that PERL is not only more accurate but also significantly more stable and parameter-efficient than standard fine-tuning approaches.

Introduction

Deep learning models, while powerful, are often "brittle," showing significant performance degradation when shifted from a source domain (e.g., book reviews) to a target domain (e.g., electronics reviews). This is largely due to the change in "pivotal" features—words that are highly predictive of a label but vary in frequency or usage across domains.

Unsupervised Domain Adaptation (UDA) attempts to bridge this gap using labeled source data and unlabeled data from both domains. Traditional pivot-based methods identify shared features but lack the deep contextual knowledge of modern pre-trained models. Conversely, models like BERT possess massive general-purpose knowledge but lack explicit mechanisms for domain alignment. PERL addresses this by combining the strengths of both paradigms.

Methodology: The PERL Pipeline

The PERL framework consists of a three-stage process designed to align feature spaces while leveraging pre-trained weights.

The three-stage PERL pipeline: (a) standard pre-training, (b) pivot-based fine-tuning on unlabeled data, and (c) task-specific training on labeled source data.
  1. Pre-training: The process begins with a standard, massively pre-trained model such as BERT.
  2. Pivot-based Fine-tuning: This is the core innovation. Instead of standard Masked Language Modeling (MLM), PERL uses a pivot-based MLM. The model identifies "pivots"—unigrams or bigrams frequent in both domains and highly predictive of the task label in the source domain. During fine-tuning on unlabeled data, the model is trained to predict whether a masked token is a specific pivot or a non-pivot. This forces the encoder to learn representations that map domain-specific "non-pivots" to domain-invariant "pivots."
  3. Supervised Task Training: Finally, a classification head (e.g., a CNN or FC layer) is trained on the labeled source domain data while keeping the PERL encoder frozen.

An extension, R-PERL (Regularized PERL), further improves performance by using the pre-trained embedding matrix to ensure that semantically similar pivots (e.g., "excellent" and "superb") are treated similarly by the model.

Experimental Setup

The authors evaluated PERL across a comprehensive suite of 22 cross-domain and 6 in-domain sentiment classification setups. These included:

  • Legacy Product Reviews: Cross-domain shifts between Books (B), DVDs (D), Electronics (E), and Kitchen (K) appliances.
  • Airline Reviews (A): A service-oriented domain representing a significant shift from product reviews.
  • IMDB Movie Reviews (I): Used for both cross-domain (e.g., IMDB to Electronics) and in-domain evaluations.

Key Results

PERL and R-PERL consistently outperformed strong baselines, including standard fine-tuned BERT and previous state-of-the-art pivot-based models like HATN and PBLM-Max.

Performance comparison of PERL and R-PERL against baselines across various domain adaptation tasks.

Key findings include:

  • Superior Accuracy: R-PERL achieved an average accuracy of 87.5% on legacy product benchmarks, significantly higher than fine-tuned BERT (84.1%).
  • Robustness to Domain Shift: In the challenging "Product to Airline" shift, R-PERL maintained high performance (~84%) while other baselines saw dramatic drops.
  • Stability and Efficiency: PERL is less sensitive to hyperparameter choices than standard BERT fine-tuning. Additionally, a 10-layer PERL model often outperformed a full 12-layer BERT model, indicating high parameter efficiency.
  • In-Domain Gains: Even without a domain shift, PERL acts as a powerful regularizer. On IMDB data with limited labels (100 sentences), PERL showed a 7.5% absolute gain over standard fine-tuning.

Conclusion and Future Work

PERL successfully bridges the gap between massive pre-trained models and domain-specific adaptation. By focusing on "pivotal" features, it creates a more robust and transferable representation. Future work will explore extending this logic to more complex structured tasks like Named Entity Recognition (NER) or dependency parsing, as well as automating the pivot selection process to further enhance adaptability.

Summary updated

BibTeX
@article{bendavid2020perl,
  author = {Eyal Ben-David and Carmel Rabinovitz and Roi Reichart},
  title = {{PERL: Pivot-based Domain Adaptation for Pre-trained Deep Contextualized Embedding Models}},
  journal = {Trans. Assoc. Comput. Linguistics},
  year = {2020},
  doi = {10.1162/tacl\_a\_00328},
}
Figure