Abstract
Modern web search engines face a critical trade-off between retrieval efficiency and result relevance. This paper, presented at SIGIR 2018, proposes a Reinforcement Learning (RL) framework to optimize the initial "candidate generation" stage of the search pipeline. By replacing static, hand-crafted search strategies with a dynamic RL agent, the authors demonstrate a significant reduction in computational cost—accessing up to 22.7% fewer index blocks—while maintaining high search quality.
The Challenge of Static Match Planning
Web search engines like Bing utilize a "telescoping" architecture to handle billions of documents efficiently. This multi-stage process begins with Candidate Generation (L0), which quickly identifies a few hundred potentially relevant documents. Subsequent stages, such as Ranking (L1 and L2), apply increasingly complex machine learning models to refine the order of these candidates.
Traditionally, the L0 stage relies on "match plans"—fixed sequences of rules that dictate how to scan the document index (e.g., "search titles first, then body text"). However, these static plans are often suboptimal. A simple navigational query (e.g., "Facebook login") requires only a shallow scan, whereas a rare, complex query might necessitate a deep, expensive search. Static plans struggle to adapt to this diversity, often over-searching simple queries or under-searching complex ones.
Reinforcement Learning for Dynamic Retrieval
The researchers reformulated match planning as a sequential decision-making task suitable for Reinforcement Learning. Instead of a fixed script, an RL agent learns a policy to decide the next best action based on the current search state.
The RL Framework
- Actions: At any point, the agent can choose to apply one of $k$ match rules (targeting specific fields like URL or Title), reset the scan to the beginning of the index, or terminate the search and pass the current candidates to the next stage.
- State: The agent's decisions are based on the progress of the search, defined by the number of index blocks accessed and the number of matches found so far.
- Reward Function: The agent is rewarded for finding documents that the subsequent L1 ranker would deem relevant, while being penalized for the "cost" of retrieval (the number of index blocks accessed).
- Algorithm: The team employed table-based Q-learning, ensuring the model is computationally lightweight enough for the high-speed environment of a search engine.
Experimental Results
The RL policy was evaluated using real-world Bing query logs across two main categories: CAT1 (short, rare queries) and CAT2 (multi-term, high-frequency queries).
As shown in the results table, the RL approach yielded substantial efficiency gains. For CAT2 queries, the policy reduced index block access by 22.7% while slightly improving relevance (+0.2% NCG@100). For CAT1 queries, efficiency improved by 16-17%, though with a minor trade-off in relevance (a 1.8% to 6.2% drop). These results are particularly impressive as they were achieved against a production baseline that had been manually optimized by engineers over several years.
Conclusion and Future Directions
This research demonstrates that Reinforcement Learning can effectively manage the efficiency-relevance trade-off in large-scale search engines. By treating efficiency as a primary objective in the reward function, the authors showed that machine learning can reduce hardware costs and latency without sacrificing user experience.
Future work may involve moving beyond simple state spaces to "Deep RL" models that incorporate more complex features like query intent. Additionally, developing a generalized model that handles all query types without manual categorization remains a key area for exploration.
Summary updated