Introduction
Community Question Answering (CQA) platforms, such as Quora and Stack Overflow, rely on automated systems to identify relevant answers from large candidate pools. This task is complicated by two primary challenges: the lexical gap and extreme label imbalance. The lexical gap occurs when relevant answers use different terminology than the question (e.g., "dog kennels" vs. "boarding pets"). Conversely, irrelevant answers may share many keywords but fail to address the core query. Furthermore, datasets like SemEval 2017 exhibit severe imbalance, with only 2.8% of candidates being relevant. Standard training with random negative sampling often fails to provide the "hard" negatives necessary for the model to learn subtle semantic distinctions.
Methodology
To address these issues, this work proposes a framework combining adversarial training with a multi-scale matching architecture.
Adversarial Training Strategy
The framework employs a minimax game between a Generator ($G$) and a Discriminator ($D$). The Generator's objective is to select the most "challenging" negative samples from a pool of irrelevant answers to fool the Discriminator. The Discriminator, which serves as the final CQA selection model, learns to distinguish between true relevant answers and these hard negatives. Because selecting discrete text samples is non-differentiable, the Generator is trained using the REINFORCE algorithm, receiving rewards based on the Discriminator's feedback.
Multi-Scale Matching
To bridge the lexical gap, the model utilizes a Convolutional Neural Network (CNN) to extract hierarchical representations of both questions and answers at different granularities:
- Scale 0: Individual word embeddings.
- Scale 1: Local context (e.g., short phrases).
- Scale 2+: Broader semantic context.
The model exhaustively matches these representations across different scales, allowing it to capture correlations between individual words and larger phrases, as illustrated in the architecture below.
Experimental Results
The model was evaluated on the SemEval 2016 and 2017 (Task 3, Subtask C) benchmarks. The 2017 dataset is particularly challenging due to its high label imbalance.
As shown in the results table below, the adversarial training framework significantly outperforms baseline methods. On the SemEval 2017 dataset, the Multi-scale model alone achieved a Mean Average Precision (MAP) of 14.80. Integrating adversarial training (Ours multi+adversarial, D) increased the MAP to 17.91, representing a substantial relative improvement and achieving state-of-the-art performance.
On the SemEval 2016 dataset, the model achieved a MAP of 53.38. Notably, it ranked first among all methods that do not incorporate external "meta-information" (such as user reputation or thread position), demonstrating the strength of the text-based matching approach.
Conclusion
This paper demonstrates that adversarial training effectively serves as an automated "hard negative miner," forcing the model to distinguish between highly similar relevant and irrelevant answers. When combined with multi-scale matching, which captures semantic relationships at various granularities, the approach achieves superior performance on competitive CQA benchmarks. Future work may address the stability of GAN training for discrete text and the integration of non-textual metadata.
Summary updated