Introduction
Answer retrieval (AR) is a critical component of modern question-answering systems, tasked with identifying the most relevant response from a vast candidate pool. Traditional approaches often rely on dual-encoder architectures that map questions and answers into a shared vector space. However, these models frequently struggle with the "semantic gap"—the phenomenon where a question and its corresponding answer share few overlapping terms. This paper, presented at ACL 2020, introduces Cross-VAEs, a novel framework that leverages generative modeling to bridge this gap by enforcing cross-reconstruction between questions and answers.
The Semantic Gap in Answer Retrieval
Standard dual-encoder models (or Siamese networks) learn representations by maximizing the similarity between aligned question-answer pairs. While effective, the matching signal can be "weak" because it doesn't explicitly model the underlying generative relationship between a query and its response. Previous research explored Dual-VAEs to improve text representations through self-reconstruction (reconstructing a question from itself). While this enhances language understanding, it fails to capture the specific semantic alignment necessary for retrieval.
Proposed Method: Cross-Variational Autoencoders
The core innovation of this work is the Cross-Variational Autoencoder (Cross-VAE). Unlike standard VAEs that reconstruct an input from its own latent representation, Cross-VAEs "cross" the generative paths:
- Question-to-Answer Generation: The question encoder generates a latent variable $z_q$, which the answer decoder then uses to generate the target answer text.
- Answer-to-Question Generation: Conversely, the answer encoder produces $z_a$, and the question decoder attempts to reconstruct the original question.
By forcing the model to generate the "partner" text, the latent embeddings are pressured to encode the deep semantic information required to bridge the gap between a query and its response. The architecture utilizes Gated Recurrent Units (GRUs) with multi-hop self-attention for encoding and standard GRUs for decoding. The joint objective function optimizes a combination of cross-reconstruction loss, KL-divergence for latent space regularization, and a standard matching loss.
Experimental Evaluation
The authors evaluated Cross-VAEs on the SQuAD 1.1 dataset, adapted for sentence-level answer retrieval. The dataset consists of approximately 79,500 training pairs and 10,500 test pairs. Performance was measured using Mean Reciprocal Rank (MRR) and Recall@K (R@1, R@5).
Key Results
The Cross-VAE model demonstrated superior performance over several strong baselines, including BERT-based models and Google’s Universal Sentence Encoder (USE-QA).
As shown in the results table, Cross-VAEs achieved an MRR of 62.29 and an R@1 of 55.60, outperforming the state-of-the-art USE-QA by 1.06% and 2.44%, respectively. The gains were even more pronounced in "one-to-many" scenarios—where a single answer corresponds to multiple questions—suggesting that the generative task helps the model cluster related questions more effectively in the latent space.
Insights and Discussion
The success of Cross-VAEs highlights several key insights:
- Generation as a Strong Alignment Signal: The requirement to generate text is a more demanding task than simple vector matching, forcing the model to learn richer semantic representations.
- Latent Space Regularization: The VAE framework ensures a continuous and smooth embedding space, which is essential for robust retrieval performance.
- Visual Evidence: Dimensionality reduction (SVD) of the embeddings revealed that Cross-VAEs produce tighter clusters for questions sharing the same answer compared to baseline models like USE-QA.
Conclusion and Future Work
Cross-VAEs represent a significant step forward in bridging the semantic gap for answer retrieval. While the generative decoders add computational overhead during training, they are discarded during inference, maintaining the efficiency of dual-encoder retrieval. Future research could extend this "cross-reconstruction" paradigm to document-level retrieval or explore its utility in cross-lingual tasks where semantic alignment is even more challenging.
Summary updated