New method · Computer vision
RELAY keeps image search working while a large gallery is re-encoded
The method trains a new search encoder to work with old images, then trains new image vectors to work with that encoder. Across three upgrades, it improves untouched-gallery Recall@1 by 8.66--10.23 percentage points; its refined final results come within 0.97 points of joint training.
In brief
- RELAY trains the query side first, then freezes it while training the document side, so one query encoder can search a gallery containing both old and new vectors.
- On untouched galleries, RELAY improves Recall@1 by 8.66--10.23 percentage points over the original systems.
- For direct re-encoding, RELAY ranks first in the two Qwen-to-Qwen upgrades and second in the CLIP-to-Qwen upgrade, under both native and calibrated scoring.
- After query refinement, final Recall@1 is within 0.97 percentage points of joint training across the three upgrades.
- Score calibration can reduce mixed-gallery drops, but the main comparisons use one run per method and upgrade, and deployed search costs were not measured.
The background
A search system turns a text query and each image into number patterns, then ranks images by how well the patterns match. Recall@1 measures how often the correct image is ranked first. In a large gallery, replacing every image's stored pattern at once may take too long, so old and new patterns can coexist during an upgrade.
COCO and Flickr30K are image-and-caption datasets used to test whether a system can find the image described by a caption. Flickr30K contains photos with human-written descriptions, making it possible to check whether the matching image rises to the top of the search results. [s1, s2]12
The paper's key complication is that old and new image patterns can have different score scales. Even if each version ranks its own images well, one version may receive larger scores and crowd out relevant results from the other. Isotonic regression is a way to fit a score adjustment that never reverses the score order within a version. [s3]3
What the researchers did
RELAY proceeds in stages. First it trains a new query encoder to find images using the old stored vectors. It then freezes that query encoder and trains a new document encoder to work with it, so the same query can search old and new vectors while images are replaced.
The query stage can use a learned projection to help match the old vectors. The new document encoder instead uses the first part of its output, sized to match the gallery's existing vectors. After every image has been re-encoded, an optional refinement stage removes the query projection and trains the query against the new vectors already in storage.
The researchers tested three upgrades on COCO and Flickr30K: Qwen 2B to Qwen 2B, CLIP to Qwen 2B, and Qwen 2B to Qwen 8B. They measured Recall@1 as more of the gallery was replaced, and also tested a version of score calibration that adjusts old and new scores separately while keeping the image vectors fixed.
What they found
On the untouched gallery, RELAY raises Recall@1 by 8.66--10.23 percentage points over the original systems. During direct re-encoding, it ranks first in both Qwen-to-Qwen upgrades and second in the CLIP-to-Qwen upgrade, both with native scores and with calibrated scores.
The CLIP-to-Qwen upgrade is a clear weak spot for direct backfill: RELAY ranks second rather than first in the paper's direct re-encoding comparisons. For example, the authors describe a severe early drop for the BT² baseline: after only 10% of the gallery is re-encoded, its Recall@1 is 13.81% with native scores, while calibration on the same features gives 61.42%.
With image vectors held fixed, calibration raises re-encoding AUC in 33 of 39 method-and-upgrade comparisons. For RELAY, the authors report that calibration raises the sampled minimum in CLIP-to-Qwen from 36.60% to 58.99%; in Qwen 2B to 8B, the sampled minimum changes from 69.58% to 69.53%, so calibration does not improve every case.
After query refinement, RELAY's final Recall@1 is within 0.97 percentage points of Joint, the paper's jointly trained reference. In the Qwen 2B-to-2B setting, however, the P000 variant finishes slightly higher than P100, showing that the learned query projection does not improve every final result.
Of 14 head-to-head comparisons the paper prints, 8 favour its own contribution, 3 go against it and 3 are level.
- Compared with P110, 4 results: 4 favour the paper, 0 go against it.
- Compared with 4800 steps, single schedule, 2 results: 0 favour the paper, 0 go against it and 2 are level.
- Compared with mapped Joint, 2 results: 1 favours the paper, 1 goes against it.
- Compared with original system, 2 results: 1 favours the paper, 1 goes against it.
| What was measured | Result | Compared with | Difference |
|---|---|---|---|
| RELAY | |||
| improvement in Recall@1 over original systems on untouched galleries across three upgradesRange across three text-to-image retrieval upgrades on COCO and Flickr30K. | 8.66 percentage points | original systems | |
| maximum reported gap in final Recall@1 from Joint across three upgradesAfter query refinement. | 0.97 percentage points | Joint | |
| Joint | |||
| development-set Recall@1, 2B → 2BAveraged equally across COCO and Flickr30K. | 74.54 % | 4800 steps, single schedule: 73.93 | +0.61 |
| development-set Recall@1, CLIP → 2BAveraged equally across COCO and Flickr30K. | 73.71 % | 4800 steps, single schedule: 73.24 | +0.47 |
| P100 | |||
| raw backfill AUC, 2B-to-2BTEST; fixed query and direct re-encoding. | 71.74 % | P000: 71.11 | +0.63 |
| raw backfill AUC, CLIP-to-2BTEST; fixed query and direct re-encoding. | 49.22 % | P110: 43.39 | +5.83 |
| final Recall@1, CLIP-to-2BTEST after query refinement. | 72.18 % | P110: 71.72 | +0.46 |
| raw backfill AUC, 2B-to-8BTEST; fixed query and direct re-encoding. | 70.92 % | P110: 59.09 | +11.83 |
| final Recall@1, 2B-to-8BTEST after query refinement. | 75.57 % | P110: 74.44 | +1.13 |
| training GPU-hour reduction relative to Joint, 2B-to-2BEight GPUs; includes three RELAY stages. | 15.3 % | Joint | |
| training GPU-hour reduction relative to Joint, CLIP-to-2BEight GPUs; includes three RELAY stages. | 29.7 % | Joint | |
| P000 | |||
| final Recall@1, 2B-to-2BTEST. | 73.85 % | P100: 73.46 | +0.39Goes against the paper |
Show 17 more results
| What was measured | Result | Compared with | Difference |
|---|---|---|---|
| P100 | |||
| training GPU-hour reduction relative to Joint, 2B-to-8BEight GPUs; includes three RELAY stages. | 34.0 % | Joint | |
| minimum sampled Recall@1 across seven fractionsTEST macro Recall@1; native scores. | 36.60 % | original system: 50.09 | -13.49Goes against the paper |
| minimum sampled Recall@1 across seven fractionsTEST macro Recall@1; calibrated scores. | 58.99 % | original system: 50.09 | +8.90 |
| RELAY minus mapped Joint | |||
| difference in native AUC with fixed queryTEST; both arms use Q1 throughout. | -11.50 points | mapped Joint | Goes against the paper |
| difference in calibrated AUC with fixed queryTEST; both arms use Q1 throughout. | 1.01 points | mapped Joint | |
| per-version score calibration | |||
| method-upgrade pairs with increased re-encoding AUCAcross direct and conversion-first methods and three upgrades. | 33 pairs | ||
| direct method-upgrade cases with increased re-encoding AUCFixed features; direct re-encoding. | 24 cases | ||
| RELAY P100 | |||
| change in re-encoding AUC with calibration, 2B-to-2BSame features; TEST. | 0.49 points | native scoring | |
| change in re-encoding AUC with calibration, CLIP-to-QwenSame features; TEST. | 13.05 points | native scoring | |
| change in re-encoding AUC with calibration, 2B-to-8BSame features; TEST. | 0.21 points | native scoring | |
| backfill AUC on COCO test set, native → calibratedR@1 AUC; same features. | 37.66 % | calibrated P100: 48.21 | -10.55 |
| Recall@1 after refinement, seed 43TEST macro R@1. | 71.98 % | MCT | |
| RELAY minus MCT | |||
| mean native AUC difference across three paired training seeds2B-to-8B upgrade. · SD 0.37 across three paired differences | 0.06 points | MCT | |
| RELAY / mapped Joint | |||
| native AUC with fixed queryPaired table cell; TEST. | 49.22 % | mapped Joint: 60.72 | -11.50Goes against the paper |
| calibrated AUC with fixed queryPaired table cell; TEST. | 62.27 % | mapped Joint: 61.26 | +1.01 |
| RELAY minus RACT | |||
| calibrated AUC difference for original replacement orderTraining seed 42; TEST. | 1.90 percentage points | RACT | |
| Joint | |||
| development-set Recall@1, 2B → 2BAveraged equally across COCO and Flickr30K. | 74.23 % | 2880 steps, single schedule: 74.54 | -0.31 |
What to be careful about
The main comparison table reports one run per method and upgrade. Some additional comparisons repeat training or vary the replacement order, but the paper does not report statistical significance tests for the main results.
Calibration is fitted using sampled positives and negatives, and the paper says that this sampling ratio does not represent the true rate of relevant images in a real gallery. The results therefore show changes in ranking on this evaluation, not calibrated real-world probabilities.
The paper reports training GPU-hours, but not full production costs such as document encoding time, index updates, search latency, or maintenance. It also notes that approximate search may miss candidates, and that those effects were not measured.
Who can use it
RELAY is aimed at teams that must upgrade a retrieval system while a large image gallery is still in use. The method lets the upgraded query encoder serve during backfill, then allows an optional query refinement after the new image vectors are in place. The paper does not establish a production latency or memory advantage.
Terms explained
- Query encoder
- The part of the search system that turns a text request into a vector used to find matching images.
- Document encoder
- The part that turns each stored image into a vector that can be searched.
- Backfill
- The gradual replacement of old stored image vectors with new ones.
- Recall@1
- The share of searches for which the correct image is ranked first.
- AUC
- Here, a summary of retrieval performance across the measured stages of gallery replacement.
- Score calibration
- Adjusting scores from different document versions so they can be compared more fairly.
- Isotonic regression
- A way to fit a score adjustment that moves in only one direction as the original score rises.
- Projection
- A learned transformation that changes a vector's coordinates to help it fit a different representation space.
- COCO
- A dataset of images with captions and other annotations, used here to test image search.
- Flickr30K
- A dataset of photographs with human-written captions, used here to test image search.
Explained in full on this site: LoRA.
Questions this paper answers
How does RELAY update a retrieval system while its image gallery is still being re-encoded?
It first adapts a new query encoder to the old gallery. It then freezes that query encoder while training new image vectors, so one query can search both old and new vectors during replacement.
How well does RELAY perform on untouched image galleries?
Across the three upgrades, the paper reports that RELAY improves Recall@1 by 8.66--10.23 percentage points over the original systems.
Does RELAY lead every direct re-encoding comparison?
No. It ranks first in the two Qwen-to-Qwen upgrades, but second in the CLIP-to-Qwen upgrade under both native and calibrated scoring.
Can score calibration reduce retrieval drops during gallery backfill?
Often, yes. With image vectors fixed, calibration raises re-encoding AUC in 33 of 39 method-and-upgrade comparisons, though it does not improve every result.
How close is RELAY to joint training after the gallery upgrade?
After query refinement, its final Recall@1 is within 0.97 percentage points of the jointly trained reference across the three upgrades.
The paper in detail
Everything below is recorded from the paper and matched against its text.
What the paper claims, in its own terms
- Shown
RELAY uses one fixed query vector to score old and new document versions during backfill.
Holds when: During the direct re-encoding pass.
- Shown
RELAY improves untouched-gallery Recall@1 over original systems across the three upgrades.
Holds when: Three text-to-image upgrades on COCO and Flickr30K.
- Shown
RELAY ranks first in both Qwen-to-Qwen direct re-encoding AUC comparisons and second in CLIP-to-Qwen under both scoring protocols.
Holds when: Direct re-encoding; native and matched calibrated scores.
- Shown
Per-version score calibration can reduce mixed-gallery Recall@1 drops without changing the underlying features.
Holds when: Embeddings held fixed.
- Shown
After query refinement, RELAY's final Recall@1 is within 0.97 percentage points of Joint across the three upgrades.
Holds when: After full re-encoding and optional query refinement.
The method, step by step
- Adapt a query encoder to the old gallery using the retrieval objective and, in P100, a learned query projection.
- Freeze the complete adapted query function and train the new document encoder against it.
- Replace gallery vectors incrementally with new document vectors while using the same query encoder for both versions.
- Optionally remove the query projection and refine the query encoder against the fixed, fully re-encoded gallery.
- Optionally fit one isotonic score map per document version on development data and apply the maps during mixed-gallery retrieval.
New in this paper
- A query-first schedule that trains the document encoder against the deployed, frozen query function.
- A temporary query projection and comparison of document output projections under the same frozen query.
- A fixed-feature evaluation of per-version score calibration during mixed-gallery backfill.
Taken from earlier work
- The paired query-to-document contrastive retrieval objective follows standard retrieval training and Matryoshka prefix training.
- Low-rank adaptation uses LoRA over frozen backbones.
- Score calibration uses isotonic regression.
Assumptions
- The original documents are accessible for RELAY's direct re-encoding path.
- The shared retrieval dimension is the prefix dimension used to match old and new vectors.
- The gallery has a fixed replacement order, and each document has one active vector at a time.
- Score maps are fitted on development samples and document version labels are available at inference.
Terms as the paper defines them
- progress variable p
- The fraction of the document gallery that has been replaced by new vectors.
- AUC
- The area under retrieval performance over measured fractions, computed by trapezoidal integration.
- stop-gradient operator
- An operator that holds the opposite serving function fixed during a training stage.
- score calibration
- A version-specific monotone score transformation that changes cross-version comparisons while preserving each version's internal ordering.
- projection mask
- A three-bit designation indicating whether the role trained in each stage uses a learned output projection.
Methods, datasets and ideas it names
- temporary query projectionMethod · Introduced here
A learned projection used by the adapted query during retrieval against the old gallery and retained through backfill in P100.
- isotonic regressionMethod · Used
A method used to fit a separate monotone score map for each document version.
- COCODataset · Used
An image-caption dataset used in the retrieval evaluation.
- Flickr30KDataset · Used
An image-caption dataset used in the retrieval evaluation.
- query adaptationMethod · Introduced here
The first RELAY stage trains the new query encoder to retrieve old document vectors.
- document adaptationMethod · Introduced here
The second RELAY stage trains the new document encoder against the frozen adapted query function.
- query refinementMethod · Introduced here
An optional stage that removes the query projection and trains the query encoder against frozen new document vectors.
- retrieval objectiveMethod · Used
A query-to-document contrastive loss averaged over selected embedding dimensions.
- Matryoshka trainingMethod · Used
The paper uses a retrieval objective that evaluates normalized embedding prefixes, following this training approach.
- score calibrationMethod · Introduced here
Per-version monotone score maps adjust cross-version scores while retaining within-version rankings.
- Recall@1Measure · Studied
The retrieval metric reported at gallery-migration fractions and final endpoints.
- backfill AUCMeasure · Studied
The area under retrieval performance over the measured gallery-update fractions.
- backfillOther · Studied
The process in which new document vectors gradually replace old vectors in the gallery.
- replacement fractionMeasure · Used
The fraction of gallery documents replaced by new vectors during backfill.
- shared retrieval dimensionMeasure · Used
The common embedding dimension used to score query and document vectors in each upgrade.
- Qwen3-VL-Embedding 2BTool · Used
A source or target embedding model in the evaluated upgrades.
- CLIP ViT-L/14Tool · Used
A source embedding model in the CLIP-to-Qwen upgrade.
- Qwen3-VL-Embedding 8BTool · Used
A target embedding model in the Qwen 2B-to-8B upgrade.
- LoRAMethod · Used
Low-rank adapters trained independently for the query and document roles while the backbone is frozen.
- W_QOther · Introduced here
A learned query projection that maps the target query embedding into the old document space.
- P000Method · Compared against
A projection-mask variant using LoRA without learned output projections.
- P111Method · Compared against
A projection-mask variant retaining learned output projections on each trained side.
- P100Method · Compared against
A projection-mask variant that uses a learned query projection through backfill and fixed prefixes for the document and refined query.
- P110Method · Compared against
A projection-mask variant that removes the query projection during refinement and retains a learned document projection.
- text-to-image retrievalObject of study · Studied
Retrieval of images in response to caption queries.
- conversion-first migrationMethod · Compared against
A migration path that first converts stored vectors and then re-encodes source documents.
- BT²Method · Compared against
A compatible-training baseline evaluated with 32 additional dimensions.
- JointMethod · Compared against
A reference recipe that updates query and document roles simultaneously.
- development setDataset · Used
The set used for model selection and fitting score-calibration maps.
Limits the authors state
- The main results use one training seed and one primary replacement order, with selected additional repeats and order-sensitivity checks.
- Approximate-search candidate recall, latency, updates, and maintenance cost are not measured.
- Phase-specific AUCs do not provide an equal-time comparison; relevant deployment timings are not reported.
- The score-calibration sampling ratio does not represent the true relevance prevalence of a real gallery.
- The split-overlap checks do not rule out public images having appeared in backbone pretraining.
- Reported GPU-hour savings concern training; production backfill, index maintenance, and online serving costs are outside the totals.
How the evidence was gathered
- Samples or repeats
- The main table reports one run per method and upgrade; RELAY/MCT or RELAY/RACT paired training repeats include seeds 42, 43, and 44 for selected comparisons. Replacement-order analysis evaluates six orders. Gallery curves use seven fractions: 0, 0.1, 0.25, 0.5, 0.75, 0.9, and 1.
- Uncertainty reported
- For some results
- Significance tested
- No
- Notes
- Some paired comparisons report sample standard deviations across three paired differences; the primary method table has one run per method and upgrade, and no significance tests are reported.
Code and data
- Code from the authors: no link printed
- Data: no link printed
- Model: no link printed
Questions the paper leaves open
- How do calibrated retrieval and filtering perform in deployed approximate indexes once candidate recall, latency, updates, and maintenance costs are included?
- What are the elapsed-time tradeoffs after measuring vector conversion, document encoding, and index updates at each migration fraction?
Sources
- 1COCO - Common Objects in Contextcocodataset.org
- 2Flickr30k · Computer Vision Onlinecomputervisiononline.com
- 3Isotonic Regression Calibration - TEA Techniquesalan-turing-institute.github.io
Paper details
- Title
- RELAY: Learning Compatible Representations One Encoder at a Time
- Authors
- Yu Wang, Chuan Qin, Qiang Zhang
- Published
- 24 November 2026
- Version read
- v1
- Field
- Computer vision
- arXiv
- 2611.31882
This explanation was written for this site from the paper's own source. 94 passages and figures recorded from the paper were matched against its own text; 20 that could not be matched were left off this page. It does not judge whether the paper is right, and most papers on arXiv have not been peer reviewed. Read the paper before relying on a result.