Abstract
Recent methods for knowledge grounded dialogs generate responses by incorporating information from an external textual document. These methods do not require the exact document to be known during training and rely on the use of a retrieval system to fetch relevant documents from a large index. The documents used to generate the responses are modeled as latent variables whose prior probabilities need to be estimated. Models such as RAG, marginalize the document probabilities over the documents retrieved from the index to define the log-likelihood loss function which is optimized end-to-end. In this paper, we develop a variational approach to the above technique wherein, we instead maximize the Evidence Lower bound (ELBO). Using a collection of three publicly available open-conversation datasets, we demonstrate how the posterior distribution, which has information from the ground-truth response, allows for a better approximation of the objective function during training. To overcome the challenges associated with sampling over a large knowledge collection, we develop an efficient approach to approximate the ELBO. To the best of our knowledge, we are the first to apply variational training for open-scale unsupervised knowledge grounded dialog systems.
Introduction
In Knowledge-Grounded Dialog (KGD), an AI system must generate responses by synthesizing conversation history with information from a massive external document collection, such as Wikipedia. A significant challenge in training these systems is that the specific document used by a human speaker is often unknown.
Existing frameworks like Retrieval-Augmented Generation (RAG) utilize a "prior" retriever to estimate which documents are relevant based solely on the conversation context. However, because this retriever is "blind" to the target response during training, it frequently selects irrelevant documents. This weak training signal often leads the model to ignore external knowledge and instead rely on internal parameter memorization, resulting in hallucinations and factual errors.
Proposed Method: VRAG
To address these limitations, we introduce VRAG (Variational Retrieval-Augmented Generation). This framework treats document selection as a latent variable and optimizes the Evidence Lower Bound (ELBO) through variational inference.
The key technical innovations of VRAG include:
- The Document Posterior: Unlike standard RAG, VRAG introduces a secondary "posterior" retriever used exclusively during training. This retriever considers both the conversation context and the ground-truth response, providing a significantly stronger signal for identifying relevant documents.
- Guided Learning: The posterior distribution acts as a teacher, guiding the prior retriever via KL divergence to improve its accuracy.
- Efficient Approximation: Summing probabilities over millions of documents is computationally prohibitive. We approximate the ELBO by considering only the "top-k" documents identified through efficient Maximum Inner Product Search (MIPS).
- End-to-End Optimization: VRAG allows the retriever's query encoders to evolve alongside the response generator, creating a virtuous cycle where improved retrieval leads to better generation, and vice versa.
Experimental Setup
We evaluated VRAG on four diverse open-domain conversation settings:
- OR-QuAC: A large-scale retrieval adaptation of the Question Answering in Context dataset.
- DSTC9: A task-oriented dataset using FAQ collections for hotel and restaurant information.
- DoQA: Open-ended dialogs across domains like cooking and travel.
- OR-QuAC-QA: A non-contextual version of OR-QuAC for pure question-answering evaluation.
Key Results
VRAG consistently outperformed vanilla RAG and standard pipeline baselines (DPR + GPT2) across all retrieval and generation metrics.
As shown in the results table, VRAG achieved a Recall@1 of 73.3% on the DSTC9 dataset, significantly outperforming RAG (69.4%) and the off-the-shelf DPR retriever (13.2%). In terms of generation quality, VRAG showed substantial gains in BLEU scores. For instance, on OR-QuAC, VRAG achieved a BLEU-4 of 7.58, a 28% improvement over RAG’s 5.94.
Furthermore, VRAG dominated in "penalized BLEU" (BP) metrics, which assign a score of zero if the incorrect document is retrieved. This confirms that the model is successfully identifying the correct source material rather than simply generating plausible-sounding text from its internal weights.
Conclusion
By allowing the model to "peek" at the correct response during training via a posterior retriever, VRAG effectively mitigates the memorization issues common in unsupervised knowledge-grounded systems. Our results demonstrate that variational training provides a superior approximation of the objective function, leading to more accurate retrieval and higher-quality response generation. Future work may explore applying this variational approach to other complex tasks involving massive action spaces, such as large-scale reinforcement learning.
Summary updated