Efficient query recommendations in the long tail via center-piece subgraphs

Francesco Bonchi, Raffaele Perego, Fabrizio Silvestri, Hossein Vahabi, Rossano VenturiniSIGIR 2012

Introduction: The Long-Tail Challenge

Modern search engines rely heavily on user behavior logs to provide query recommendations. By analyzing common transitions between searches, systems can suggest relevant follow-up queries. However, this "wisdom of the crowds" approach faces a significant hurdle: the "long tail." A vast majority of queries are unique or extremely rare, appearing only once or twice in logs. For these queries, traditional models like the Query Flow Graph (QFG) fail to provide any suggestions because no prior transition data exists.

Query frequency distributions in MSN and Yahoo datasets, illustrating the prevalence of low-frequency queries in the long tail.

The Term-Query Graph (TQGraph)

To address this coverage gap, this paper proposes a transition from query-centric to term-centric modeling. The authors introduce the TQGraph (Term-Query Graph), a bipartite-style graph containing two types of nodes: Terms and Queries.

  • Term-Query Arcs: Link a term to every query in which it appears.
  • Query-Query Arcs: Link queries based on historical user transitions.

By decomposing queries into their constituent terms, the system can generate recommendations for "never-before-seen" queries as long as the individual words have been encountered previously. This shift increases query coverage from approximately 73% to over 99%.

Algorithmic Framework: RWR and Hadamard Product

The core recommendation engine utilizes Random Walk with Restart (RWR). When a user enters a multi-term query, the system initiates independent random walks starting from each term node in the TQGraph. These walks identify queries that are topologically "close" to the input terms.

The critical innovation lies in how these independent results are aggregated. Instead of simple addition, the authors employ the Hadamard product (component-wise multiplication) of the probability vectors. This mathematical operation acts as a logical "AND," ensuring that the highest-ranked suggestions are those strongly associated with all terms in the original query. This effectively identifies the "center-piece" of the subgraph related to the user's intent.

Optimization and Real-Time Scalability

Providing recommendations in a production environment requires millisecond latency. To achieve this, the TQGraph is implemented as an inverted index, similar to the architecture used for document retrieval. Three primary optimization techniques are applied:

  1. Pruning: Only the top-$p$ most likely queries for each term are stored.
  2. Bucketing: Probabilities are grouped into discrete ranges to facilitate compression.
  3. Lossy Compression: Using Elias’ Delta coding, the index size is reduced by approximately 80%.
Impact of pruning threshold on recommendation dissimilarity for MSN and Yahoo query logs across different restart probabilities.

As shown in the pruning analysis, increasing the threshold $p$ rapidly decreases the dissimilarity between the pruned and full models, allowing for significant space savings with minimal loss in recommendation quality.

Key Results and Evaluation

The system was evaluated using massive datasets from Yahoo! (600 million queries) and MSN (15 million queries), alongside the TREC Web Diversification benchmark.

  • Coverage: The TQGraph achieved 99% coverage, significantly outperforming the state-of-the-art QFG, which failed on nearly 30% of the workload.
  • Quality: User studies confirmed that TQGraph recommendations were more useful, particularly for rare and "dangling" queries that lack outgoing links in traditional graphs.
  • Efficiency: The compressed index, combined with a term-level LRU cache, achieved a 95% hit ratio with a modest memory footprint, proving its viability for high-traffic search engines.

Conclusion

By leveraging term-level relationships and optimized graph traversal, the TQGraph provides a robust solution for long-tail query recommendations. Future work includes incorporating term weighting (e.g., TF-IDF) to better handle descriptive versus common terms and integrating semantic embeddings to further enhance coverage for truly novel vocabulary.

Summary updated

BibTeX
@inproceedings{bonchi2012efficient,
  author = {Francesco Bonchi and Raffaele Perego and Fabrizio Silvestri and Hossein Vahabi and Rossano Venturini},
  title = {{Efficient query recommendations in the long tail via center-piece subgraphs}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2012},
  doi = {10.1145/2348283.2348332},
}
Figure