Learning to Match using Local and Distributed Representations of Text for Web Search

Fernando Diaz, Bhaskar Mitra, Fernando Diaz 0001, Nick Craswell

Abstract

Models such as latent semantic analysis and those based on neural embeddings learn distributed representations of text, and match the query against the document in the latent semantic space. In traditional information retrieval models, on the other hand, terms have discrete or local representations, and the relevance of a document is determined by the exact matches of query terms in the body text. We hypothesize that matching with distributed representations complements matching with traditional local representations, and that a combination of the two is favorable. We propose a novel document ranking model composed of two separate deep neural networks, one that matches the query and the document using a local representation, and another that matches the query and the document using learned distributed representations. The two networks are jointly trained as part of a single neural network. We show that this combination or 'duet' performs significantly better than either neural network individually on a Web page ranking task, and also significantly outperforms traditional baselines and other recently proposed models based on neural networks.

Introduction

In web search, a long-standing tension exists between two fundamental ways of matching queries to documents. Traditional models, such as BM25, rely on Exact Matching (Local), looking for specific terms within a document. This is essential for rare terms or unique identifiers where synonyms are insufficient. Conversely, modern neural models focus on Semantic Matching (Distributed), projecting text into a latent space where semantically related terms (e.g., "Obama" and "President") are positioned closely together, addressing the "vocabulary mismatch" problem.

While semantic models are powerful, they often struggle to outperform traditional baselines on long-form web text. The "duet" architecture bridges this gap by jointly training two specialized neural networks to leverage the strengths of both matching styles for ad-hoc retrieval.

The Duet Architecture

The Duet model consists of two parallel deep neural networks whose outputs are summed to produce a final relevance score. This joint training allows the components to learn complementary features.

The Duet architecture combines a local model (left) focusing on exact term matches and a distributed model (right) learning semantic embeddings.
  • The Local Model: This sub-network ignores semantic meaning and focuses on term positions. It takes an interaction matrix—a binary grid indicating exact matches between query and document terms—as input. A Convolutional Neural Network (CNN) scans this grid to identify patterns like term proximity and ordering.
  • The Distributed Model: This sub-network learns semantic representations. To handle out-of-vocabulary words, it utilizes character n-graphs (trigraphs). It projects queries and documents into a 300-dimensional embedding space, using CNNs and max-pooling to capture context before calculating similarity via a Hadamard product.

Experimental Setup and Results

The model was evaluated using large-scale Bing search logs, comprising approximately 200,000 queries. Performance was measured using Normalized Discounted Cumulative Gain (NDCG), a standard metric for ranking quality.

Key findings include:

  • Superiority: On a weighted test set of frequent queries, the Duet model achieved an NDCG@1 of 32.2, significantly outperforming neural baselines like CDSSM (27.3) and non-neural models like DM (24.7).
  • Complementarity: The local model excels at handling rare terms and exact phrases, while the distributed model is stronger for popular queries with well-learned semantic relationships.
Performance breakdown by query length shows that the Duet model consistently outperforms individual local and distributed components across all query lengths.

As shown in the performance breakdown, the local model's effectiveness increases with query length, likely due to the increased probability of meaningful exact-match patterns. The distributed model remains relatively stable but is particularly valuable for shorter queries where semantic intent is harder to capture through exact matches alone. The Duet model maintains a clear lead across the entire spectrum.

Conclusion

The Duet model demonstrates that exact matches still matter in the age of deep learning. By treating local and distributed representations as complementary rather than mutually exclusive, the architecture achieves state-of-the-art results on web-scale ranking tasks. Future work may involve scaling to even larger datasets to further refine the distributed model and exploring more complex interaction features to enhance the local component's sensitivity to document structure.

Summary updated

BibTeX
@inproceedings{diaz2016learning,
  author = {Fernando Diaz and Bhaskar Mitra and Fernando Diaz and Nick Craswell},
  title = {{Learning to Match using Local and Distributed Representations of Text for Web Search}},
  booktitle = {The Web Conference},
  year = {2016},
}
Figure