Adapting to the Shifting Intent of Search Queries

Umar Syed, Aleksandrs Slivkins, Nina Mishra

Abstract

Search engine queries often undergo sudden shifts in user intent, rendering static ranking models ineffective. This paper introduces Bandit with Classifier (BWC), a meta-algorithm that pairs a multi-armed bandit with an online classifier to detect and adapt to these shifts in real-time. By leveraging contextual signals to trigger algorithm restarts, BWC achieves a logarithmic regret bound, offering a significant theoretical and practical improvement over traditional non-stationary bandit approaches that typically suffer from sub-linear regret.

Introduction

Modern search engines rely on ranking functions to deliver relevant results. However, user intent is highly volatile; a query like "tomato" may typically lead to culinary pages, but during a salmonella outbreak, users prioritize news reports. These "intent-shifting" queries account for approximately 50% of search traffic.

Traditional machine learning models struggle with this volatility. Stationary bandits (e.g., UCB1) assume a static environment and react too slowly to shifts. Conversely, non-stationary bandits (e.g., EXP3.S) can adapt but incur high "regret"—the cumulative cost of sub-optimal choices—which grows at a rate of $\sqrt{T}$. BWC addresses this by using context not to determine the best result directly, but to identify when the underlying intent has changed.

The BWC Framework

The BWC meta-algorithm consists of two primary components: a Classifier and a Bandit Subroutine. These components operate in a continuous feedback loop to manage the exploration-exploitation trade-off in a dynamic environment.

The feedback loop between the bandit and classifier components in BWC.
  1. The Classifier: This component monitors context features such as query volume, abandonment rates, and news mentions. Its primary role is to predict the occurrence of an "event" (an intent shift).
  2. The Bandit Subroutine: BWC utilizes a modified UCB1 algorithm. When the classifier predicts an event, the bandit is "restarted," allowing it to quickly explore and identify the new optimal search result.
  3. Self-Labeling Feedback: A core innovation of BWC is its ability to learn without human-labeled data. After a predicted event, the bandit monitors the results; if the "best" result did not actually change, it flags a "false positive" to the classifier. This allows the classifier to refine its predictive model online.

To ensure robustness, the authors define a "Safe Classifier" (SafeCl), which is mathematically constrained to minimize false negatives, ensuring that real intent shifts are rarely missed.

Theoretical Performance

The authors provide a rigorous theoretical analysis of BWC, proving that it achieves a regret bound of $O((k + d_{\mathcal{F}}) \frac{n}{\Delta} \log T)$. This is the first algorithm to achieve logarithmic regret in an event-based non-stationary setting.

Summary of notation used in the regret bound analysis.

As shown in the notation table above, the regret is scaled by the number of events ($k$) and the complexity of the classifier's concept class ($d_{\mathcal{F}}$). This demonstrates that by using context to trigger restarts, systems can avoid the $\Omega(\sqrt{T})$ regret penalty inherent in context-agnostic non-stationary algorithms.

Experimental Evaluation

Due to the constraints of live search traffic, the algorithm was evaluated using synthetic data simulating 100 queries across 3 million impressions. Each query featured five potential results, with 10% of queries designated as "intent-shifting."

Key findings include:

  • Superiority over Baselines: BWC significantly outperformed standard UCB1 and EXP3.S in dynamic scenarios.
  • Oracle Proximity: The algorithm's performance closely tracked that of an "Oracle"—an ideal model with perfect knowledge of every intent shift.
  • Dimensional Robustness: Despite theoretical concerns regarding high-dimensional context, experiments showed BWC remained effective even when monitoring over 40 context features.

Conclusion

BWC represents a paradigm shift in handling non-stationary search intent. By treating context as a trigger for algorithmic resets rather than a direct feature for ranking, BWC achieves high adaptation speeds with minimal regret. Future work will focus on relaxing the "Safe Classifier" constraints and validating the framework on live, large-scale search engine logs.

Summary updated

BibTeX
@inproceedings{syed2009adapting,
  author = {Umar Syed and Aleksandrs Slivkins and Nina Mishra},
  title = {{Adapting to the Shifting Intent of Search Queries}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2009},
  url = {https://openreview.net/forum?id=HJWthd-d-r},
}
Figure