Shift-Aware Hybrid Retrieval: Routing Each Query Word to the Channel That Still Means What It Says

Search systems in technical fields usually combine two kinds of matching. Keyword matching (BM25, which scores documents by weighted exact word overlap) is reliable on part numbers, dates and jargon. Dense retrieval, which compresses text into a single vector and ranks by vector similarity, catches paraphrases. Hybrid systems add the two scores with one fixed weight for every query. This note targets one failure of that fixed weight. Some ordinary words change meaning inside a domain: "yield" in finance, "RF" in an intensive-care note (renal or respiratory failure, not radio frequency), "cell" in biology. A general-purpose dense encoder places these words near their everyday meaning and pulls the whole query vector toward the wrong neighbourhood. An exact keyword match on the same word is safe, because inside a finance collection "yield" almost only occurs in its finance sense.

We propose to measure, before any retrieval and without relevance labels, how far each vocabulary word's meaning has drifted between general text and the target collection. Each query word's contribution is then shifted toward the keyword channel in proportion to that drift, and the word is down-weighted inside the dense query. The claim is narrow and testable. Across domain benchmarks, the gains over a well-tuned static hybrid should come mostly from queries whose key terms are common but shifted. That is exactly the case that rarity statistics (inverse document frequency, IDF) and query-level fusion weights cannot see.

Core Claim and What Is New

Three lines of prior work surround this idea without doing it. First, fixed-weight hybrids: Domain-specific Question Answering with Hybrid Search adds a BM25 boost with a single scalar to fine-tuned dense scores for Adobe support search, and the TREC product-search overview OVERVIEW OF THE TREC 2023 PRODUCT PRODUCT SEARCH TRACK reports a SPLADE+BM25 fusion run as the top system. Both apply one weight regardless of which words the query contains. Second, learned but coarse gates: Distributed representation and one-hot representation fusion with gated network for clinical semantic textual similarity learns a sigmoid gate between clinical BERT and one-hot features. That gate is computed per sentence pair, not per word, and is evaluated on similarity scoring, not retrieval.

The third line is evidence that meaning drift is the mechanism. It motivates the proposal, but it has never been wired into fusion. Exploiting Task-Oriented Resources to Learn Word Embeddings for Clinical Abbreviation Expansion shows general PubMed embeddings expand ICU abbreviations with only 28.06% accuracy, against 82.27% for task-enriched embeddings. That is direct evidence that word-level drift wrecks general vector spaces.

Our contribution differs from all three in three ways. The fusion weight is per word. It is driven by a label-free drift estimate computed from domain-specific word embeddings. It is explicitly separated from rarity. The domain-specific word embeddings play a measuring role here: they calibrate the fusion, and they are not themselves the retriever.

Research Program

Drift estimate. We train static skip-gram embeddings on the target collection and compare them with embeddings trained on a general corpus of matched size. For each word $t$ frequent enough in both corpora, drift is

$$\mathrm{shift}(t) = 1 - \frac{|N_k^{\mathrm{dom}}(t) \cap N_k^{\mathrm{gen}}(t)|}{k},$$

where $N_k^{\mathrm{dom}}(t)$ and $N_k^{\mathrm{gen}}(t)$ are the $k$ nearest neighbours of $t$ in the domain and general spaces. Comparing neighbour sets avoids having to align the two spaces. As a second estimator we will average a general contextual encoder's token vectors over domain and general occurrences. This checks whether the static estimate misses context-dependent drift. Words below a frequency floor get no drift score and fall back to IDF. The abbreviation study above attributes 54% of errors to rare terms, so we do not trust neighbour sets for rare words.

Fusion. For query $q$ and document $d$ we score

$$s(q,d) = \beta\, s_{\mathrm{dense}}(\tilde q, d) + \sum_{t \in q} g\big(\mathrm{shift}(t), \mathrm{idf}(t)\big)\, \mathrm{bm25}_t(q,d).$$

Here $s_{\mathrm{dense}}$ is the dense inner product and $\mathrm{bm25}_t$ is word $t$'s BM25 term contribution. The weight $g$ is a two-feature logistic function with three parameters, and $\tilde q$ is the dense query encoded with high-drift words attenuated. Attenuation means scaling their token weights before pooling, or masking them above a threshold. Because $g$ and $\beta$ have only four parameters in total, they can be fit on the small development splits these benchmarks provide. That keeps the method in the few-label regime where the fine-tuning literature warns of brittleness (Back to Basics: A Simple Recipe for Improving Out-of-Domain Retrieval in Dense Encoders).

Analysis. For every benchmark we will stratify test queries by "shift mass," the maximum drift over query words whose IDF lies below the collection median. The central prediction is that the improvement concentrates in the high-shift, low-IDF stratum. We will also measure overlap between the two channels' top-ranked lists, following the Ratio of Complementarity of On Complementarity Objectives for Hybrid Retrieval. That paper found jointly trained dense models mimic BM25 on general web data. We ask whether this redundancy concentrates on shifted words in technical domains.

Baselines

The naive reference points are BM25 alone and a general dense encoder alone, run on identical collections and query splits. On TREC 2023 Product Search, BM25 reports NDCG@10 of 0.6540 (OVERVIEW OF THE TREC 2023 PRODUCT PRODUCT SEARCH TRACK).

The strongest existing competitor is a static hybrid with its single weight tuned per dataset on the same development split our gate uses. We will run it with both BM25 and SPLADE as the sparse channel. The SPLADE+BM25 fusion is the reported top system on TREC Product Search at NDCG@10 0.7505 (OVERVIEW OF THE TREC 2023 PRODUCT PRODUCT SEARCH TRACK). On BEIR, the combination of LENS lexicon embeddings with dense embeddings reports average nDCG@10 of 63.00 (Enhancing Lexicon-Based Text Embeddings with Large Language Models). We will report our method both on top of a comparable backbone and against this published figure. We found no reported per-dataset hybrid result on Lacuna for FiQA-2018, NFCorpus, or SciFact, so we will compute those baselines ourselves. For UDA FinHybrid and ClimRetrieve we found no reported hybrid retrieval result on Lacuna. The only numbers there are end-to-end QA scores and a dense F1 near 0.18 on ClimRetrieve (ClimRetrieve: A Benchmarking Dataset for Information Retrieval from Corporate Climate Disclosures).

Beating the static hybrid means a statistically significant gain in average nDCG@10 across domain datasets, under a paired permutation test over queries. The gain must be larger in the high-shift stratum than elsewhere, and there must be no significant loss on low-shift queries.

Three further baselines test whether a simpler fusion rule would do as well. First, a query-level gate that uses the same features aggregated per query, in the spirit of the sentence-level gate of Distributed representation and one-hot representation fusion with gated network for clinical semantic textual similarity. Second, an IDF-only per-word gate. Third, a randomly permuted drift score with the same distribution.

Adapted-dense variants also get their own baselines. We apply LoRA tuning with in-batch negatives (Back to Basics: A Simple Recipe for Improving Out-of-Domain Retrieval in Dense Encoders), the closed-form DREditor edit (DREditor: An Time-efficient Approach for Building a Domain-specific Dense Retrieval Model), and Search-Adaptor (Search-Adaptor: Embedding Customization for Information Retrieval). Each adapted encoder is then combined in a tuned static hybrid. All of these use the same training pairs and the same development tuning budget.

The key ablation separates the two ingredients: sparse-side reweighting alone versus dense-side attenuation alone.

Why not just…?

Why not just use IDF, since shifted words are probably rare domain jargon? This is the most serious threat. If drift largely tracks rarity, the IDF-only gate will match us. Our argument is that the damaging cases are frequent words like "yield," "cell" or "RF," which have low IDF inside the collection and so get little BM25 weight exactly when the dense channel is most misled. We will report the correlation between drift and IDF on each collection. If the IDF-only gate equals ours in the high-shift stratum, we will conclude that drift adds nothing and report that.

Why not just adapt the dense encoder to the domain and keep a static hybrid? Adaptation may well move "yield" to its finance neighbourhood and remove the problem. DREditor reports a 7.43% improvement over backbone dense retrievers on FiQA, NFCorpus and SciFact (DREditor: An Time-efficient Approach for Building a Domain-specific Dense Retrieval Model). Against this, adaptation with few labels is brittle: hard negatives cut out-of-domain performance by up to 10.7% (Back to Basics: A Simple Recipe for Improving Out-of-Domain Retrieval in Dense Encoders), and naive tuning degraded large models on product search. We will test directly whether the gate still adds on top of each adapted encoder. If its gain disappears after adaptation, the honest conclusion is that the gate is a cheap substitute for adaptation, useful when the encoder is a frozen API, rather than a complement to it.

Why not just learn a per-query fusion weight? A query-level gate can learn "trust BM25 on finance queries." It cannot separate the shifted word from the unshifted words in the same query, which is what dense-side attenuation needs. The query-level gate baseline, which uses identical features and an identical tuning budget, settles this.

Why not just use learned sparse retrieval such as SPLADE? SPLADE expands queries with related words predicted by a general language model, so drift may corrupt its expansions too: "yield" may be expanded toward "harvest." We therefore apply the gate to SPLADE's expansion terms as well, and report whether suppressing expansions of high-drift words helps.

Proposed Experiments

We will evaluate on the domain subsets of BEIR (BEIR: A Heterogeneous Benchmark for Zero-shot Evaluation of Information Retrieval Models): FiQA-2018, NFCorpus, SciFact, TREC-COVID, and Climate-FEVER. We add TREC 2023 Product Search, the retrieval stage of UDA FinHybrid (UDA: A Benchmark Suite for Retrieval Augmented Generation in Real-World Document Analysis), and ClimRetrieve. Metrics are nDCG@10 and Recall@100, plus retrieval F1 on ClimRetrieve to match its reporting.

We add one targeted diagnostic. Annotators flag, on a sample of queries per dataset, whether the query's decisive word carries a domain-specific sense. This lets us check that the drift estimate agrees with humans. We will report precision of the top-drift words against these flags.

The decisive checks are four. The gain over the tuned static hybrid must be significant and concentrated in the high-shift, low-IDF stratum. It must beat the IDF-only gate and the permuted-drift control in that stratum. It must survive on top of at least one adapted dense encoder, or be reported as a substitute for adaptation if it does not. And channel overlap must fall on high-shift queries. If the gains appear uniformly across strata, or the IDF-only gate matches them, the drift mechanism is refuted even if the average number goes up.