Personalized Language Model for Query Auto-Completion

Aaron Jaech, Mari Ostendorf

Abstract

Query auto-completion is a search engine feature whereby the system suggests completed queries as the user types. Recently, the use of a recurrent neural network language model was suggested as a method of generating query completions. We show how an adaptable language model can be used to generate personalized completions and how the model can use online updating to make predictions for users not seen during training. The personalized predictions are significantly better than a baseline that uses no user information.

Introduction

Query Auto-Completion (QAC) is a critical component of modern search interfaces, helping users formulate queries more efficiently. The standard approach, Most Popular Completion (MPC), ranks suggestions based on global frequency. However, MPC suffers from two primary limitations: it cannot handle "cold start" prefixes (those not seen in training) and it fails to account for individual user preferences. While character-level Recurrent Neural Networks (RNNs) can address the cold start problem by generating text, personalizing these models at scale remains a challenge.

Methodology: The FactorCell Architecture

The authors propose a character-level Long Short-Term Memory (LSTM) network that incorporates user-specific information via latent embeddings. They evaluate three primary architectures:

  1. Unadapted LM: A baseline LSTM that treats all users identically.
  2. ConcatCell: A common personalization technique where user embeddings are concatenated with the input at each time step, effectively acting as a bias shift.
  3. FactorCell: The primary innovation of this work. Instead of a simple bias shift, FactorCell uses user embeddings to transform the recurrent weight matrices. By applying a low-rank adaptation $W' = W + A$ (where $A$ is derived from the user embedding), the model can more deeply adapt its internal transitions to a user's specific linguistic patterns.

Online Updating

To handle users not present in the training set, the system employs online updating. When a new user interacts with the search engine, the model initializes a generic embedding. After each query, the system performs a single step of backpropagation to update only that user's embedding vector. This allows the model to "learn" user preferences in real-time without the prohibitive cost of retraining the entire network.

Experimental Evaluation

The models were tested using the AOL Query dataset, comprising 12 million queries from 173,000 users. To test generalization, 30,000 users were held out for the evaluation phase. Performance was measured using Mean Reciprocal Rank (MRR), where a higher score indicates the correct completion appeared higher in the suggestion list.

MRR results for different model sizes across Seen, Unseen, and All prefixes.

As shown in the table above, the FactorCell architecture consistently outperforms both the Unadapted baseline and the ConcatCell approach across all categories. Notably, in the "Large" (B) model configuration, FactorCell achieved an MRR of 0.335 on seen prefixes, significantly higher than the MPC baseline of 0.292.

The "Warm Start" Effect

A key finding is that the benefits of personalization accumulate as the system gathers more data about a specific user. This "warm start" advantage is visualized by tracking the relative improvement over time.

Relative improvement in MRR over an unadapted model as a function of the number of queries seen for a user.

The FactorCell model shows a steady increase in relative improvement as the number of queries per user grows, demonstrating its ability to effectively capture and utilize long-term user context. While FactorCell is more complex than ConcatCell, it is computationally efficient for production because the adapted weight matrix only needs to be computed once per query.

Conclusion

Personalizing query auto-completion through weight-transforming architectures like FactorCell provides a significant accuracy boost over traditional and non-personalized neural methods. By combining character-level generation with real-time user embedding updates, the system achieves high-quality, semantically coherent suggestions that adapt to individual user needs. Future work may involve incorporating temporal context and optimizing performance for users with very limited search histories.

Summary updated

BibTeX
@inproceedings{jaech2018personalized,
  author = {Aaron Jaech and Mari Ostendorf},
  title = {{Personalized Language Model for Query Auto-Completion}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2018},
  url = {https://openreview.net/forum?id=H1NpOsxOWr},
}
Figure