[Paper Review] Unsupervised Domain Adaptation of Contextual Embeddings for Low-Resource Duplicate Question Detection
This paper proposes a two-stage unsupervised domain adaptation method for BERT to improve low-resource duplicate question detection (DQD) in StackExchange forums. First, BERT is adapted to target domains using self-supervised pretraining on unlabeled forum data; then, it is fine-tuned on limited labeled DQD data. The method significantly boosts performance, especially with minimal labeled data, and outperforms standard BERT and baseline models.
Answering questions is a primary goal of many conversational systems or search products. While most current systems have focused on answering questions against structured databases or curated knowledge graphs, on-line community forums or frequently asked questions (FAQ) lists offer an alternative source of information for question answering systems. Automatic duplicate question detection (DQD) is the key technology need for question answering systems to utilize existing online forums like StackExchange. Existing annotations of duplicate questions in such forums are community-driven, making them sparse or even completely missing for many domains. Therefore, it is important to transfer knowledge from related domains and tasks. Recently, contextual embedding models such as BERT have been outperforming many baselines by transferring self-supervised information to downstream tasks. In this paper, we apply BERT to DQD and advance it by unsupervised adaptation to StackExchange domains using self-supervised learning. We show the effectiveness of this adaptation for low-resource settings, where little or no training data is available from the target domain. Our analysis reveals that unsupervised BERT domain adaptation on even small amounts of data boosts the performance of BERT.
Motivation & Objective
- To address the challenge of low-resource duplicate question detection (DQD) in community forums like StackExchange, where labeled data is sparse or absent.
- To improve the generalization of BERT for DQD by adapting it to domain-specific language patterns using unlabeled forum data.
- To investigate whether unsupervised domain adaptation on small amounts of target-domain data can enhance DQD performance.
- To evaluate the effectiveness of domain adaptation across both within-domain and cross-domain settings, including non-similar domains like Quora and Academia.
- To understand the impact of differing labeling functions (e.g., Quora vs. SE) on domain adaptation and model generalization.
Proposed method
- Fine-tune BERT on unlabeled data from target StackExchange domains using masked language modeling and next sentence prediction—self-supervised objectives—before downstream task fine-tuning.
- Apply a two-stage process: (1) unsupervised domain adaptation on target-domain text, (2) supervised fine-tuning on labeled DQD pairs.
- Use domain-specific unlabeled data from StackExchange to adapt BERT, even with as little as a few hundred to a few thousand sentences.
- Compare performance using frozen versus fine-tuned BERT parameters when transferring from source domains with different labeling functions (e.g., Quora).
- Train a DQD model using cross-entropy loss on labeled question pairs after domain adaptation.
- Evaluate on five StackExchange domains and two external datasets (Quora, Academia), assessing performance via F1 and AUC metrics.
Experimental results
Research questions
- RQ1Can unsupervised domain adaptation of BERT on small amounts of unlabeled forum data improve DQD performance in low-resource settings?
- RQ2How does unsupervised BERT adaptation affect DQD performance when transferring from a source domain with a different labeling function (e.g., Quora) to a target domain (e.g., AskUbuntu)?
- RQ3Does domain adaptation on a large number of diverse StackExchange domains improve generalization to new target domains?
- RQ4Is fine-tuning BERT parameters after adaptation always better than freezing them, especially when source and target domains differ in labeling strategy?
- RQ5How does the performance of domain-adapted BERT compare to standard BERT and prior LSTM-based baselines in low-resource DQD scenarios?
Key findings
- Unsupervised domain adaptation of BERT on even small amounts of unlabeled target-domain data (e.g., a few thousand sentences) significantly improves DQD performance, especially in low-resource settings.
- Fine-tuning the adapted BERT on labeled DQD data yields substantially better results than using standard BERT, which performs poorly on low-resource domains.
- When transferring from Quora (which uses high-lexical-overlap negative pairs) to AskUbuntu, freezing BERT parameters after adaptation yields better performance than fine-tuning, indicating distributional mismatch due to differing labeling functions.
- Adapting BERT on a large number of diverse StackExchange domains improves performance across multiple target domains, suggesting broad domain generalization.
- Performance from adapting BERT on Academia (a non-computer-science domain) is only slightly worse than using the more topically similar SuperUser domain (F1: 0.854 vs. 0.870), showing robustness to topical differences when labeling functions are similar.
- The combination of unsupervised domain adaptation followed by supervised fine-tuning reduces the need for large labeled DQD datasets, making the method highly effective for low-resource applications.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.