Improving Sequential Query Recommendation with Immediate User Feedback

Shameem Ahamed Puthiya Parambath, Christos Anagnostopoulos, Roderick Murray-SmitharXiv 2022 · DOI

Introduction

In complex research tasks, a user's intent is rarely static; it evolves with every search result viewed and every link clicked. Traditional query recommendation systems typically rely on static "sequence-to-sequence" models, such as LSTMs or Transformers, trained on vast historical logs. While powerful, these models are often "resource-hungry" and struggle to adapt to immediate user feedback. If a user ignores a recommendation, a standard Transformer cannot adjust its strategy in real-time; it simply continues following its pre-trained patterns.

To address this, we introduce TEF (Transformer-based Experts and Feedback), a novel framework that bridges the gap between the predictive power of Transformers and the real-time adaptivity of Multi-Armed Bandits (MAB).

The TEF Framework

TEF extends the Exp3 (Exponential-weight algorithm for Exploration and Exploitation) bandit algorithm to the domain of open-ended search queries. The framework operates through four key components:

  1. Ensemble of Experts: Instead of a single model, TEF utilizes an ensemble of diverse Transformer-based "experts" (e.g., GPT-2, BERT, CTRL).
  2. Dynamic Candidate Sets: At each step, TEF probes these experts for their top predictions based on the current context. This creates a dynamic candidate set, solving the "infinite arms" problem of traditional MABs by focusing only on the most probable next queries.
  3. Probabilistic Selection: Recommendations are presented to the user based on a probability distribution derived from weights maintained for each query and expert.
  4. Real-Time Feedback Loop: When a user accepts a recommendation, the system receives a reward. An exponential weighting scheme then updates the weights of the queries and experts, allowing the system to "learn" the user's specific intent during the session.
Comparison of query predictions from two different model experts within the TEF framework.

As shown in the figure above, different experts within the ensemble can produce distinct sets of recommendations for the same context. Model 1 focuses on profitability and purchasing decisions, while Model 2 suggests queries related to insurance amounts and disability. TEF's bandit layer acts as a manager, determining which expert's perspective is most relevant to the user's current behavior.

Experimental Evaluation

The framework was evaluated using a large-scale query log from an online literature discovery service, comprising approximately 1.1 million queries across 159,000 sessions. To simulate user behavior in an offline setting, the researchers used the BLEU score as a proxy for clicks. If a recommended query shared significant word overlap (BLEU > 0.5) with the user's actual subsequent query, it was treated as a successful "click" (reward = 1).

Key Insights and Results

  • Causal vs. Masked Modeling: A significant finding was that Causal Language Modeling (CLM)—like GPT-2—outperforms Masked Language Modeling (MLM)—like BERT—for query recommendation. Search is inherently sequential; models that predict the "next" token align more naturally with user behavior than those designed to "fill in the blanks."
  • Regret Reduction: TEF significantly reduced "per-round regret" compared to using any single Transformer model in isolation. This demonstrates that the ensemble approach, combined with real-time feedback, more closely approximates an optimal recommendation strategy.
  • Scalability: Despite the dynamic nature of the candidate sets, the number of queries stabilized quickly (averaging around 23), ensuring the system remains computationally efficient for real-time applications.
  • Pre-training Advantage: While fine-tuning pre-trained models yielded the best performance, TEF was robust enough that even experts trained from scratch outperformed standard static baselines.

Conclusion and Future Work

TEF demonstrates that combining the deep contextual understanding of Transformers with the adaptive learning of Multi-Armed Bandits creates a more responsive and effective query recommendation system. Future research will explore more nuanced reward structures beyond binary clicks and investigate "deep bandits" to incorporate non-linear reward patterns, further refining the system's ability to capture complex user intent.

Summary updated

BibTeX
@misc{parambath2022improving,
  author = {Shameem Ahamed Puthiya Parambath and Christos Anagnostopoulos and Roderick Murray-Smith},
  title = {{Improving Sequential Query Recommendation with Immediate User Feedback}},
  year = {2022},
  eprint = {2205.06297},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.06297},
}
Figure