---
title: 'AnchorQE: A Training-Free Query Expansion Method'
url: https://www.emergentmind.com/topics/anchorqe
type: topic
---

# AnchorQE: A Training-Free Query Expansion Method

AnchorQE is a training-free method for integrating large-language-model-generated query expansions into frozen dense retrievers. It separately encodes the original query and one or more expansions, interpolates their normalized representations with an explicit expansion-weight parameter, and submits a single resulting vector to the unchanged dense index. Its principal contribution is to treat query expansion as both a generation problem and an integration problem: the original query remains a geometric anchor, while expansion influence is controlled according to retrieval strength and consistency with evidence retrieved by the original query [2608.25521].

## 1. Problem setting and motivation

A dense retriever maps a query and document into a shared vector space. For an original query $q$ and document $d$, the frozen encoders produce

$$
\mathbf q=\operatorname{normalize}(E_q(q)),\qquad
\mathbf d=\operatorname{normalize}(E_d(d)),
$$

and retrieval ranks documents by

$$
s(q,d)=\mathbf q^\top\mathbf d.
$$

The document embeddings and index are fixed. An LLM generates an expansion

$$
z=G(q),
$$

where $G$ includes the LLM, prompting, and decoding procedure. The central integration problem is to determine how $q$ and $z$ should be transformed into the vector submitted to the retriever.

Query expansions can contain hallucinated entities, irrelevant details, excessive specificity, or information inconsistent with the original query. With a frozen retriever, these errors cannot be corrected through retriever fine-tuning and may shift the query vector toward an inappropriate region of the embedding space. Preliminary experiments reported performance changes relative to the dense-retrieval baseline of $+1.52$ points on TREC 2019, $-2.92$ on TREC 2020, $-4.13$ on LoTTE Search, $-4.53$ on LoTTE Forum, and a substantial negative change on BEIR-14 when conventional integration methods were used.

Existing methods generally integrate expansions in one of three ways:

- **Expansion-only encoding**: discards the original query and retrieves using the expansion representation. This gives the generated text uncontrolled authority.
- **Text-level concatenation and re-encoding**: combines the query and expansion before encoding. Their relative influence is then determined indirectly by tokenization, sequence order, attention patterns, pooling, sequence length, truncation, separator choice, and query repetition.
- **Separate score fusion**: retrieves independently with the original query and expansion, then combines document scores. This exposes expansion trust but requires multiple index requests and candidate-list merging.

AnchorQE changes the integration level from text space to vector space. It preserves the original query explicitly and provides a direct geometric control over the expansion’s contribution.

## 2. AnchorQE representation and scoring

Suppose the generator produces $N$ expansions $z_1,\ldots,z_N$. AnchorQE encodes the original query and each expansion independently with the query encoder:

$$
\mathbf q=\operatorname{normalize}(E_q(q)),
\qquad
\mathbf z_i=\operatorname{normalize}(E_q(z_i)).
$$

The expansion vectors are combined into a mixture

$$
\mathbf m=\sum_{i=1}^{N}\pi_i\mathbf z_i,
\qquad
\pi_i\geq 0,\qquad
\sum_{i=1}^{N}\pi_i=1.
$$

The final query vector is

$$
\widehat{\mathbf q}_{\alpha}
=
\operatorname{normalize}
\left((1-\alpha)\mathbf q+\alpha\mathbf m\right),
\qquad
0\leq\alpha\leq1.
$$

Here, $\alpha$ is the total weight assigned to generated evidence, while $1-\alpha$ is the weight assigned to the original query. For a single expansion,

$$
\widehat{\mathbf q}_{\alpha}
=
\operatorname{normalize}
\left((1-\alpha)\mathbf q+\alpha\mathbf z\right).
$$

The resulting vector is submitted to the unchanged dense index:

$$
s_{\alpha}(d)=\widehat{\mathbf q}_{\alpha}^{\top}\mathbf d.
$$

The limiting cases are:

- $\alpha=0$: ordinary dense retrieval;
- $\alpha=1$: expansion-mixture retrieval;
- $0<\alpha<1$: explicitly anchored interpolation;
- no expansion: ordinary dense retrieval.

The expansions are encoded with $E_q$ by default because they are treated as query-side retrieval evidence. An ablation comparing $E_q$ and $E_d$ for HyDE and Query2Doc found absolute differences of at most $0.0038$, with the better choice varying by benchmark.

When multiple expansions disagree, their mixture may partially cancel or shrink. This limits the collective ability of inconsistent expansions to displace the original query representation.

## 3. Mathematical properties

### Equivalence to weighted score fusion

Under a shared dense representation space and raw dot-product scoring, AnchorQE is ranking-equivalent to weighted CombSUM. If

$$
(1-\alpha)\mathbf q+\alpha\mathbf m\neq\mathbf0,
$$

then

$$
\widehat{\mathbf q}_{\alpha}^{\top}\mathbf d
=
\frac{
(1-\alpha)\mathbf q^\top\mathbf d+
\alpha\sum_i\pi_i\mathbf z_i^\top\mathbf d
}{
\left\|(1-\alpha)\mathbf q+\alpha\mathbf m\right\|
}.
$$

The denominator is independent of $d$ and therefore does not affect document ordering. AnchorQE consequently produces the same full-corpus ordering as weighted CombSUM with weights

$$
(1-\alpha,\alpha\pi_1,\ldots,\alpha\pi_N).
$$

This is a ranking equivalence rather than equality of calibrated scores. It does not automatically extend to sparse–dense hybrid retrieval, nonlinear fusion, stream-specific score normalization, or independently truncated approximate-nearest-neighbor candidate lists.

AnchorQE obtains this linear fusion objective in one vector and one index request, whereas conventional score fusion requires independent retrieval and result merging.

### Angular influence bound

Let

$$
\phi_\alpha=\angle(\mathbf q,\widehat{\mathbf q}_{\alpha}).
$$

For $0\leq\alpha<1/2$, AnchorQE satisfies the content-independent bound

$$
\phi_\alpha
\leq
\arcsin\left(\frac{\alpha}{1-\alpha}\right).
$$

At $\alpha=0.10$, the final vector can move by at most $6.38^\circ$ from the original-query vector, regardless of the expansion.

The bound constrains expansion influence but does not guarantee expansion correctness. For two documents with original-query margin

$$
m_q=\mathbf q^\top(\mathbf d_i-\mathbf d_j)
$$

and expansion margin

$$
m_z=\mathbf z^\top(\mathbf d_i-\mathbf d_j),
$$

the interpolated ordering is determined by

$$
(1-\alpha)m_q+\alpha m_z.
$$

If $m_q>0$ and $m_z<0$, the expansion reverses the ordering only when

$$
|m_z|>
\frac{1-\alpha}{\alpha}m_q.
$$

At $\alpha=0.10$, an opposing expansion must express a preference more than nine times as strong as the original query’s preference to reverse that pairwise ordering.

## 4. Stream-Calibrated AnchorQE

The principal adaptive variant, SC-AnchorQE, estimates $\alpha$ without relevance labels. It uses a small initial portion of an unlabeled query stream to assess two properties of the expansion strategy:

1. its retrieval strength when used independently;
2. its consistency with documents retrieved by the original query.

The reported prefix size is

$$
B=8.
$$

The prefix queries are used only for calibration, removed from evaluation, and followed by evaluation with a frozen $\alpha$ on the remaining suffix.

For each calibration query $i$, SC-AnchorQE:

1. encodes the original query $\mathbf q_i$ and expansion $\mathbf z_i$;
2. retrieves the top document with each representation;
3. retrieves the original query’s top-10 document set $D^q_{i,10}$;
4. computes average retrieval-strength and support statistics.

Using $[x]_+=\max(x,0)$, the top-1 strengths are

$$
s_{q,1}
=
\frac1B\sum_i
\left[\mathbf q_i^\top\mathbf d^q_{i,1}\right]_+,
$$

$$
s_{z,1}
=
\frac1B\sum_i
\left[\mathbf z_i^\top\mathbf d^z_{i,1}\right]_+.
$$

The relative top-1 strength of the expansion is

$$
r_{\mathrm{top1}}
=
\frac{s_{z,1}}{s_{q,1}+s_{z,1}}.
$$

The support statistics measure similarity to documents already retrieved by the original query:

$$
s_{q,\mathrm{sup}}
=
\frac1B\sum_i
\left[
\frac1{10}
\sum_{\mathbf d\in D^q_{i,10}}
\mathbf q_i^\top\mathbf d
\right]_+,
$$

$$
s_{z,\mathrm{sup}}
=
\frac1B\sum_i
\left[
\frac1{10}
\sum_{\mathbf d\in D^q_{i,10}}
\mathbf z_i^\top\mathbf d
\right]_+.
$$

The support ratio is

$$
r_{\mathrm{sup}}
=
\frac{s_{z,\mathrm{sup}}}
{s_{q,\mathrm{sup}}+s_{z,\mathrm{sup}}}.
$$

SC-AnchorQE then sets

$$
\alpha_{\mathrm{stream}}
=
r_{\mathrm{top1}}r_{\mathrm{sup}}.
$$

The product is conjunctive. An expansion receives high trust only when it is strong as a retrieval representation and consistent with evidence supported by the original query. An expansion that is strong but inconsistent, or consistent but weak, receives limited influence.

Calibration requires two probe retrievals per prefix query: one for the original query and one for the expansion. After calibration, each future query requires one AnchorQE retrieval request. Generation remains the dominant practical cost.

## 5. Experimental evaluation

AnchorQE was evaluated on 18 benchmark streams grouped into:

- TREC-DL 2019;
- TREC-DL 2020;
- LoTTE Search;
- LoTTE Forum;
- BEIR-14.

The metrics are nDCG@10 for TREC-DL and BEIR, and Success@5 for LoTTE. Queries are averaged within collections and then macro-averaged over LoTTE domains or BEIR datasets.

The principal retriever is BGE-large-en-v1.5. Transfer experiments use GTE-large-en-v1.5 and Qwen3-Embedding-0.6B. Document embeddings, indexes, query prefixes, and model parameters remain frozen.

The primary generator is Qwen3-8B with greedy decoding, seed 42, disabled thinking, and a maximum of 128 new tokens. The evaluated expansion types are:

- HyDE hypothetical documents;
- Query2Doc pseudo-documents;
- Q2E keywords and related terms;
- chain-of-thought-derived terms.

Generator transfer uses Qwen3-1.7B and Llama-3.1-8B-Instruct. The transfer matrix contains nine generator–retriever configurations.

Baselines include the original dense-retrieval baseline, published integration procedures, development-tuned text re-encoding, fixed-factor AnchorQE with $\alpha=.15$, QuDAR fusion baselines, weighted CombSUM, trust-matched RRF, and anchored max.

### Fixed-factor results

With the same saved expansions and frozen BGE retriever, conventional integration methods fell below the dense-retrieval baseline in 16 of 20 QE-strategy–benchmark comparisons. Fixed-factor AnchorQE was best within each QE block in all 20 comparisons.

| Strategy | TREC19 | TREC20 | LoTTE Search | LoTTE Forum | BEIR-14 |
|---|---:|---:|---:|---:|---:|
| DR baseline | .6765 | .7056 | .7780 | .7470 | .5387 |
| HyDE AnchorQE | .7154 | .7303 | .7913 | .7573 | .5486 |
| Query2Doc AnchorQE | .7300 | .7299 | .7924 | .7569 | .5472 |
| Q2E AnchorQE | .7236 | .7117 | .7853 | .7519 | .5437 |
| CoT terms AnchorQE | .7248 | .7161 | .7863 | .7542 | .5437 |

The largest relative improvement over corresponding conventional integration was 12.89% for CoT terms on BEIR-14. On the 14 individual BEIR collections, fixed-factor AnchorQE improved over published integration in 53 of 56 strategy–collection comparisons and over tuned text re-encoding in all 56 comparisons.

### SC-AnchorQE results

With eight unlabeled calibration queries, SC-AnchorQE outperformed the corresponding published integration in all 20 strategy–benchmark comparisons.

| Strategy | TREC19 | TREC20 | Search | Forum | BEIR-14 |
|---|---:|---:|---:|---:|---:|
| HyDE | .7346 (+.0518) | .7292 (+.0215) | .7981 (+.0187) | .7612 (+.0408) | .5523 (+.0358) |
| Query2Doc | .7560 (+.0354) | .7340 (+.0125) | .7975 (+.0235) | .7592 (+.0427) | .5498 (+.0385) |
| Q2E | .7319 (+.0259) | .6973 (+.0398) | .7863 (+.0412) | .7545 (+.0416) | .5468 (+.0524) |
| CoT terms | .7354 (+.0552) | .7074 (+.0543) | .7897 (+.0624) | .7538 (+.0521) | .5465 (+.0618) |

The largest relative improvement over conventional integration was 13.03% for CoT terms on BEIR-14. Against the dense-retrieval baseline, SC-AnchorQE improved in 19 of 20 strategy–benchmark group comparisons and had positive query-level confidence intervals in 18 of 20 comparisons. Against fixed-factor AnchorQE with $\alpha=.15$, it improved in 17 of 20 group means.

Across nine generator–retriever configurations and five benchmark groups, SC-AnchorQE beat the dense-retrieval baseline in 44 of 45 comparisons and fixed-factor AnchorQE in 41 of 45. The smaller Qwen3-1.7B generator produced weaker expansions, indicating that integration can constrain harm but cannot recover information absent from the generator.

## 6. Ablations, efficiency, and limitations

### Calibration-rule ablations

The conjunctive product used by SC-AnchorQE performed best among the evaluated stream-level rules:

- product: 17 of 20 improvements over fixed AnchorQE;
- top-10 overlap: 15 of 20;
- RBO@10: 15 of 20;
- query–expansion cosine: 13 of 20;
- Jaccard: 12 of 20;
- minimum: 10 of 20;
- geometric mean: 9 of 20;
- arithmetic mean: 9 of 20.

Rules based on top-score advantage, entropy concentration, or coefficient-of-variation score dispersion improved zero of 20 comparisons and had negative median deltas. A per-query product improved 18 of 20 comparisons but required two probe retrievals for every future query, whereas the stream-level product required probes only during the prefix.

### Prefix-size sensitivity

SC-AnchorQE was stable across prefix sizes of 8, 16, and 32 queries. The largest spread across these settings was only $0.0027$.

### Expansion length

With a 64-token cap, fixed AnchorQE used $\alpha=.10$ and remained best across all five benchmark groups. With open-ended end-of-sequence termination, it used $\alpha=.15$ and again exceeded conventional integration approaches.

### Retrieval efficiency

With eight saved HyDE expansions and uniform weights, the reported index-side costs were:

| Method | Index requests | Latency per query |
|---|---:|---:|
| AnchorQE | 1 | $0.19$ ms |
| Weighted CombSUM | 9 | $4.33$ ms |
| Trust-matched RRF | 9 | $1.28$ ms |
| Anchored max | 9 | $4.96$ ms |

AnchorQE and weighted CombSUM had 0.9998 top-10 overlap, and their stored query vectors were numerically identical in the reported experiment.

### Limitations

AnchorQE relies on several assumptions and has corresponding limitations:

- **Stream stability**: SC-AnchorQE assumes that the initial unlabeled queries are representative of future queries. Distribution shifts can make the frozen stream-level $\alpha$ stale.
- **Global trust factor**: one $\alpha$ cannot adapt perfectly to every query. It may underweight unusually strong expansions or overtrust expansions that differ from the stream average.
- **Dependence on generation quality**: AnchorQE limits the damage caused by poor expansions but cannot create missing information.
- **Conservative movement**: a small $\alpha$ can prevent useful expansions from moving the query sufficiently, while a large $\alpha$ increases susceptibility to harmful expansions.
- **Conditional fusion equivalence**: the equivalence to CombSUM requires a shared dense representation space, raw dot products, and equivalent ranking conditions.
- **Calibration overhead**: the initial prefix requires probe retrievals, although future queries require only one index request.
- **No score calibration theory**: the method controls vector influence and ranking behavior but does not establish calibrated relevance probabilities.
- **Evaluation scope**: the prefix-to-suffix protocol is a no-lookahead simulation; broader studies are required under real traffic, nonstationary streams, and query-specific calibration.

AnchorQE therefore defines query expansion as a two-stage system: generation followed by explicit representation integration. Its characteristic mechanism is the preservation of the original query as an embedding-space anchor, combined with an adaptive expansion weight derived from retrieval strength and evidential consistency.

Source: https://www.emergentmind.com/topics/anchorqe