Introduction
Community Question Answering (CQA) platforms like StackExchange rely heavily on identifying duplicate questions to provide immediate answers and maintain content quality. However, training effective detection models requires vast amounts of labeled data, which new or niche communities often lack. While models can be trained on large, established forums and transferred to smaller ones, "domain shift"—differences in technical jargon and posting styles—frequently degrades performance. This paper addresses this "cold-start" problem by introducing Adversarial Domain Adaptation (ADA), a framework that enables models to learn domain-invariant representations by leveraging labeled data from a source forum to improve performance on an unlabeled target forum.
Methodology
The proposed ADA framework consists of three integrated components designed to extract features that are useful for duplicate detection but agnostic to specific forum characteristics.
- Question Encoder: A bi-directional LSTM converts question text into dense vector representations. This encoder is shared across both source and target domains.
- Similarity Function: The model calculates the likelihood of two questions being duplicates. The authors found that using cosine similarity with a pairwise hinge loss significantly outperformed standard cross-entropy approaches, as hinge loss is more robust to the "noisy" negatives common in CQA datasets.
- Adversarial Domain Adaptation (ADA): A domain classifier attempts to identify whether a question vector originates from the source or target domain. Simultaneously, the encoder is trained to "fool" this classifier. This minimax game forces the encoder to discard domain-specific jargon and focus on the underlying structural features of duplicate questions. The authors utilized Wasserstein distance-based adaptation, which proved 17 times more stable than standard classification-based methods.
Experimental Results
The model was evaluated using datasets from StackExchange (AskUbuntu, SuperUser, Apple, Android), Sprint FAQ, and Quora. The results demonstrate that adversarial training consistently improves cross-domain performance.
Key Findings
- Performance Gains: The ADA model achieved an average relative improvement of 5.6% over direct transfer baselines across StackExchange pairs, reaching up to 14% in specific cases. Notably, it frequently outperformed the standard unsupervised BM25 algorithm.
- Domain Similarity Correlation: The success of adaptation is highly correlated with n-gram overlap. When forums share significant vocabulary (e.g., AskUbuntu and Android), the performance boost is most pronounced.
- The Pivot Effect: Interestingly, adversarial training on a third "pivot" domain can improve performance on a target domain even if that target was never seen during training. This suggests the adversarial process acts as a powerful regularizer, encouraging the learning of more general features.
Discussion and Future Work
While ADA provides significant benefits, its effectiveness is limited by the "domain gap"; transferring knowledge between highly dissimilar domains (e.g., general Quora questions to technical Sprint FAQs) remains challenging. Furthermore, the authors observed that standard attention mechanisms can actually hinder adaptation by focusing on domain-specific keywords. Future research will explore "source-pivot-target" transfer strategies and the development of domain-invariant attention mechanisms to further bridge the gap between disparate online communities.
Summary updated