Predictive Indexing for Fast Search

Sharad Goel, John Langford, Alexander L. StrehlNeurIPS 2008

Predictive Indexing accelerates large-scale search by pre-computing result lists based on their expected scores across a distribution of future queries. By shifting the heavy computational lifting of complex machine-learning models to an offline stage, it enables high-quality, real-time ranking for internet advertising and nearest-neighbor search—tasks where traditional indexing methods often fall short.

The Extreme Speed Constraint

Modern web search and advertising face a massive "extreme speed constraint." When a user submits a query, a system often has less than 100 milliseconds to find the best match among billions of candidates.

While machine learning has produced highly accurate scoring functions, these models are often too computationally expensive to run on every possible result at runtime. Traditional solutions like inverted indices (which map keywords to documents) only work if the scoring rule is "sparse"—meaning most features have zero impact on the score. However, modern ML models are often "dense," where almost every feature of a page or ad contributes to the final score. This makes standard techniques intractable. The core question is: How can we use complex, dense scoring rules while still meeting the millisecond-latency requirements of the modern web?

Predictive Indexing

To solve this, the authors introduce Predictive Indexing, a framework that optimizes the search index based on the empirical distribution of queries rather than being query-agnostic.

  1. Query Categorization: Queries are grouped into potentially overlapping sets. For example, one set might be "all queries containing the word 'France'."
  2. Expected Scoring: For each set, the system calculates the expected score of every result (web page or ad) across all queries in that set.
  3. Pre-computed Lists: The system builds a predictive index consisting of sorted lists for each query set. These lists contain results ranked by their expected performance for that specific category of query.
  4. Anytime Retrieval: At runtime, when a query arrives, the algorithm identifies which sets the query belongs to and scans the top of the corresponding pre-sorted lists. Because it is an "anytime" algorithm, it can be halted the moment the computational budget (e.g., 50ms) is exhausted, returning the best candidates found so far.

This differs from standard approaches like Fagin’s Threshold Algorithm, which projects scores onto individual coordinates without considering how those coordinates actually behave in real-world query distributions. Furthermore, Predictive Indexing allows the system to "infer" relevance. If a query contains "France," the system can suggest a "car rental" page even if that page lacks the word "France," simply because those two often score highly together in the training data.

Experimental Results

The researchers evaluated their approach on two distinct tasks: Internet Advertising and Approximate Nearest Neighbor (ANN) search.

Internet Advertising

Using a proprietary Yahoo! dataset containing logs of 5 million events, the system matched ~650,000 ads to ~500,000 distinct web pages using a linear scoring rule with roughly 1 million features.

Comparison of Serving Algorithms in Advertising

Predictive Indexing significantly outperformed the "Halted Threshold Algorithm" (Halted TA). It achieved high accuracy even when evaluating only 0.05% of the potential results. Interestingly, sorting lists by Expected Discounted Cumulative Gain (PI-DCG)—a measure that rewards having high-quality results near the top—performed better than simply using the average score (PI-AVG). The implementation was highly efficient, handling 500 full evaluations in roughly 50ms.

The method was also tested on four public datasets (MNIST, Corel, Pendigits, Optdigits). The method worked exceptionally well even when query sets were defined using random projections, suggesting the framework is robust even with "naive" categorizations.

LSH vs. Predictive Indexing

In over 300 trials across the four datasets, Predictive Indexing consistently outperformed Locality Sensitive Hashing (LSH). As shown in the scatter plot across all datasets, Predictive Indexing generally achieved a better (lower) rank for the true nearest neighbors compared to LSH. The performance gap was most noticeable when the computational budget was very tight.

Limitations and Future Work

While powerful, Predictive Indexing has a few limitations:

  • Distribution Shift: The method relies on the query distribution remaining relatively stable. If user behavior changes drastically, the pre-computed lists may become stale and lose accuracy.
  • Initial Categorization: Defining the initial query sets is a critical and potentially difficult step, though experiments with random projections suggest some flexibility.
  • Scaling the Index: The memory overhead is manageable, requiring about twice the RAM of the raw data. However, a 2x multiplier on a multi-petabyte search index is still a significant infrastructure cost. Future work could explore more aggressive compression of the predictive lists.

Summary updated

BibTeX
@inproceedings{goel2008predictive,
  author = {Sharad Goel and John Langford and Alexander L. Strehl},
  title = {{Predictive Indexing for Fast Search}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2008},
  url = {https://openreview.net/forum?id=Hy4MqOZOWB},
}
Figure