Abstract
To retrieve more relevant, appropriate and useful documents given a query, finding clues about that query through the text is crucial. Recent deep learning models regard the task as a term-level matching problem, which seeks exact or similar query patterns in the document. However, we argue that they are inherently based on local interactions and do not generalise to ubiquitous, non-consecutive contextual relationships. In this work, we propose a novel relevance matching model based on graph neural networks to leverage the document-level word relationships for ad-hoc retrieval. In addition to the local interactions, we explicitly incorporate all contexts of a term through the graph-of-word text format. Matching patterns can be revealed accordingly to provide a more accurate relevance score. Our approach significantly outperforms strong baselines on two ad-hoc benchmarks. We also experimentally compare our model with BERT and show our advantages on long documents.
Introduction
In ad-hoc information retrieval, the primary challenge is ranking a vast collection of documents by their relevance to a specific user query. Traditional neural matching models, such as DRMM or PACRR, typically treat document text as a linear sequence. While effective for local patterns, this approach struggles to capture long-distance, non-consecutive relationships between words. For instance, in a search for "melanoma treatment," the relevant terms might be separated by several paragraphs, a gap that local sequence models often fail to bridge. Furthermore, state-of-the-art models like BERT are constrained by fixed input lengths (e.g., 512 tokens), necessitating truncation or passage splitting that further severs global context. This paper introduces the Graph-based Relevance Matching Model (GRMM) to address these limitations by explicitly modeling document-level word dependencies.
Methodology
The core innovation of GRMM is the transformation of linear text into a graph-of-word structure, allowing for the propagation of matching signals across the entire document.
Graph Construction and Neighborhoods
In the GRMM framework, each unique word in a document is represented as a node. Edges are established between words that co-occur within a predefined sliding window, capturing the local topological structure of the text. This representation allows the model to identify "bridge" words that connect distant query terms.
As shown in the figure above, a word like $w_3$ ("melanoma") can be linked to $w_1$ ("Carrillo") and $w_2$ ("ocular") through 1-hop and 2-hop relationships, even if they do not appear immediately adjacent in the text.
Interaction-based Node Features and GNN
Unlike standard models that use semantic word embeddings, GRMM initializes node features using query-document interaction signals. Each node's feature vector represents its cosine similarity to every word in the search query.
A Gated Recurrent Unit (GRU)-like Graph Neural Network (GNN) then propagates these signals. By aggregating information from multi-hop neighbors, the model can synthesize a global relevance score that accounts for non-local interactions. Finally, a $k$-max-pooling strategy and an Inverse Document Frequency (IDF) gating network are used to produce the final ranking score, ensuring the model remains robust across varying document lengths.
Experimental Results
The model was evaluated on two major benchmarks: Robust04 (news articles, avg. 460 words) and ClueWeb09-B (webpages, avg. 1506 words).
- Performance on Long Documents: GRMM demonstrated significant gains on the ClueWeb09-B dataset, achieving an nDCG@20 of 0.310. This represents a 14.4% improvement over the best non-BERT baseline and even surpasses BERT-MaxP (0.293), which suffers from context loss due to document chunking.
- Performance on Short Documents: On Robust04, GRMM achieved an nDCG@20 of 0.449. While slightly behind BERT-MaxP (0.469)—likely due to BERT's extensive pre-training on formal text—it significantly outperformed traditional BM25 and other local-interaction models.
- Ablation Study: Removing the graph structure led to a performance drop of 2-3 points, confirming that the document's topological structure is vital for capturing relevance.
Discussion and Future Work
The success of GRMM highlights that graphs are a natural way to bridge distant concepts in text. By focusing on interaction signals rather than pure semantics, the model learns specific relevance patterns that are often missed by general-purpose language models.
However, the current approach relies on a simple co-occurrence window for graph construction, which may introduce noise. Future work could involve using syntactic dependency parsing for more precise edge creation or integrating external knowledge graphs to provide structured real-world context during the matching process. Additionally, training on large-scale click logs could further refine the model's ability to handle diverse query types.
Summary updated