Abstract
This paper introduces a reinforcement learning (RL) framework that trains an agent to "rewrite" search queries to maximize the number of relevant documents returned. By treating the search engine as a black box and using document recall as a reward signal, the system learns to bridge the vocabulary gap between user queries and indexed information. Experimental results across three diverse datasets demonstrate that RL-based reformulators significantly outperform traditional heuristics and supervised learning baselines.
Introduction
Search engines excel at finding documents containing exact keyword matches. However, they frequently struggle with "vocabulary mismatch"—where the terminology in a relevant document differs from the user's query (e.g., searching for "heart attack" when the document uses "myocardial infarction").
Traditional solutions like Pseudo Relevance Feedback (PRF) expand queries using terms from initial results based on fixed heuristics. These methods lack the ability to discern if added terms truly improve retrieval for a specific task. This paper frames query reformulation as a reinforcement learning problem, allowing a system to learn through trial and error which terms optimize retrieval performance.
Methodology
The authors propose a neural network-based Reformulator acting as an RL agent. The search engine is treated as a "black box" environment; the agent only observes the results returned without needing internal access to the engine's ranking logic.
The agent receives an original query ($q_0$) and a pool of candidate terms from the documents initially retrieved ($D_0$). It then selects a subset of these terms to form a reformulated query ($q'$). The model is trained using the REINFORCE algorithm, where the reward is defined as Recall@K—the percentage of ground-truth relevant documents found in the top $K$ results.
Several architectures were evaluated, including Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs). A sequential variant, RL-RNN-SEQ, uses an LSTM to select terms one by one, effectively managing query length and redundancy.
Datasets
The model was evaluated on three distinct retrieval tasks:
- TREC-CAR: Finding specific paragraphs within Wikipedia articles based on section headings.
- Jeopardy: A question-answering task where clues serve as queries to retrieve corresponding Wikipedia articles.
- MS Academic (MSA): A newly introduced dataset consisting of hundreds of thousands of academic paper titles (queries) and their citations (relevant documents).
Results and Analysis
The RL-based reformulators consistently outperformed both raw search engine results and standard PRF baselines, showing a 5-20% relative improvement in recall across all datasets.
Key Insights
- RL vs. Supervised Learning: The RL approach proved superior to supervised learning (SL) variants. While SL models are trained on proxy tasks (predicting if a term is "good"), RL agents are optimized directly for the end-to-end retrieval metric.
- Task-Specific Adaptation: The model learns distinct strategies per dataset. For Jeopardy, it prioritizes proper nouns, whereas for academic citations, it adapts to technical nomenclature.
- Efficiency: The sequential model (RL-RNN-SEQ) produced queries 3x shorter than standard RL models without sacrificing performance, making it highly practical for real-world deployment.
- The Oracle Gap: Despite strong performance, a significant gap remains between current models and the "RL-Oracle" (the theoretical upper bound). This suggests substantial room for improvement in how agents explore the query space.
Limitations and Future Work
Training these models is computationally intensive, often requiring 8-10 days on a single GPU. Furthermore, the current agent is limited to terms found in the initial search results. Future research could explore allowing the model to generate entirely new terms from a global vocabulary or incorporating multi-modal inputs to further bridge the vocabulary gap.
Summary updated