Skip to main content
QUICK REVIEW

[Paper Review] Knowledge Distillation for BERT Unsupervised Domain Adaptation

Minho Ryu, Kichun Lee|arXiv (Cornell University)|Oct 22, 2020
Topic ModelingComputer Science9 citations
TL;DR

This paper proposes Adversarial Adaptation with Distillation (AAD), a novel unsupervised domain adaptation method for BERT that combines adversarial domain adaptation (ADDA) with knowledge distillation to mitigate catastrophic forgetting. By initializing the target BERT with a fine-tuned source model and applying distillation with a temperature-controlled soft label loss, AAD achieves state-of-the-art performance on 30 cross-domain sentiment classification tasks, outperforming baseline methods by an average of 1.6% accuracy with improved stability.

ABSTRACT

A pre-trained language model, BERT, has brought significant performance improvements across a range of natural language processing tasks. Since the model is trained on a large corpus of diverse topics, it shows robust performance for domain shift problems in which data distributions at training (source data) and testing (target data) differ while sharing similarities. Despite its great improvements compared to previous models, it still suffers from performance degradation due to domain shifts. To mitigate such problems, we propose a simple but effective unsupervised domain adaptation method, adversarial adaptation with distillation (AAD), which combines the adversarial discriminative domain adaptation (ADDA) framework with knowledge distillation. We evaluate our approach in the task of cross-domain sentiment classification on 30 domain pairs, advancing the state-of-the-art performance for unsupervised domain adaptation in text sentiment classification.

Motivation & Objective

  • To address performance degradation in BERT models due to domain shifts between source and target domains.
  • To overcome catastrophic forgetting in unsupervised domain adaptation when applying the ADDA framework to large pre-trained models like BERT.
  • To improve domain adaptation stability and performance by integrating knowledge distillation into the adversarial adaptation pipeline.
  • To investigate the impact of temperature hyperparameter in knowledge distillation on model generalization and robustness.

Proposed method

  • Adapt the ADDA framework to BERT by initializing the target encoder with the fine-tuned source encoder weights.
  • Perform adversarial training between the target encoder and a domain discriminator to minimize domain discrepancy.
  • Apply knowledge distillation using soft labels from the source model to regularize the target model’s predictions.
  • Use a temperature-scaled cross-entropy loss to soften the probability distributions during distillation, preserving class information.
  • Train the target BERT and classifier jointly with a combined loss: adversarial domain loss and distillation loss.
  • Optimize the target model using a two-stage process: adversarial domain alignment followed by distillation-based regularization.

Experimental results

Research questions

  • RQ1Can knowledge distillation effectively prevent catastrophic forgetting when adapting BERT to a new domain without labeled target data?
  • RQ2How does the temperature hyperparameter in knowledge distillation affect the performance and stability of the adapted BERT model?
  • RQ3Does combining adversarial domain adaptation with knowledge distillation yield better performance than existing unsupervised domain adaptation methods on BERT-based sentiment classification?
  • RQ4Is the proposed method more stable across diverse domain pairs compared to baseline methods?

Key findings

  • AAD significantly outperforms the baseline on 21 out of 30 cross-domain sentiment classification pairs, achieving an average accuracy gain of 1.6%.
  • The method demonstrates superior stability, with consistently lower standard deviation across experiments compared to other methods.
  • Knowledge distillation with a temperature of 20 yields the best performance, while higher temperatures (e.g., 50) degrade performance due to excessive softening of label information.
  • The supervised fine-tuning baseline is outperformed by knowledge distillation across all temperature values except t=1, indicating distillation’s regularization benefit.
  • Existing methods like DDC and DANN perform worse than the baseline on average, highlighting limitations of applying standard domain adaptation to BERT.
  • The deep CORAL method performs better than DDC and DANN but still lags behind AAD by 1.1% on average.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.