betaFeedback

WorksComputer Science

Standardized Tolerance for Adaptive Reuse and Repair: A Method for HNSW Migration Under Embedding Model Change Scenarios

Abstract

When an embedding model changes, the same collection is re-encoded, and its vector index must be adapted to the new embedding space. Because the source and target vectors represent the same objects, suitable connections in the source index can be reused. We propose STARR (Standardized Tolerance for Adaptive Reuse and Repair) to migrate HNSW indexes after an embedding model change. STARR compares standardized edge lengths over the same source neighbor lists in both embedding spaces and uses the correlation between their distance profiles to set the allowable increase in standardized edge length. It reconnects affected vertices by searching the partially migrated graph and shares the resulting candidates with their neighbors. We bound edge rejection under local distance distortion, characterize migration work, and prove that a final repair pass makes every vertex reachable from the entry point at the base layer while respecting degree limits. Single-threaded experiments on MS MARCO, Wikipedia, and CC3M, each with one million objects, show that STARR achieves 5.25–44.54×\times construction speedups over Fresh and migrates faster than both DGM variants on all 15 selected transitions. Recall@10 remains within one percentage point of Fresh in 10 cases, and query throughput exceeds DGM-Local in 14 cases. Parameter sweeps on three transitions further demonstrate favorable migration-time–recall tradeoffs beyond the default settings. Across all 240 directed transitions among 16 MS MARCO models, STARR achieves a median construction speedup of 16.71×\times with a median recall loss of 1.0 percentage point.

Introduction

The growing demand for semantic retrieval has spurred extensive research into vector similarity search, which captures semantic similarity through distance-based neighborhood relationships in embedding spaces. Embedding models map multi-modal data, such as text, images, and audio, to dense, high-dimensional vectors, often yielding large vector collections. Efficient indexes are therefore essential for supporting vector similarity search at scale. In particular, graph-based vector indexes have attracted considerable attention for their strong empirical search performance [1, 13, 15].

This work was supported by the China Postdoctoral Science Foundation (Grant No. 2025M781464), and the Natural Science Foundation of Hebei Province of China (Grant No. F2026210032).

Recent research has devoted considerable effort to maintaining graph-based vector indexes in dynamic settings [8, 10, 11], primarily focusing on the insertion, deletion, or update of individual vectors [5, 9, 21]. These operations, however, address only one aspect of index maintenance. Because vectors are derived from the underlying multi-modal objects through embedding models, an update to an individual vector must originate from an update to its underlying object. Another important source of change is the change of embedding models, a common occurrence in real-world applications driven by version upgrades, changes in model size, or adaptation to new tasks [16, 20, 22].

Such embedding model changes can transform the entire vector dataset even when the underlying objects remain unchanged [3, 7, 14], requiring the index to adapt to a new similarity structure residing in an entirely new embedding space. This dataset-wide transformation presents a distinct maintenance challenge: techniques designed for individual vector updates do not directly address the problem of adapting the index to an entirely new vector dataset.

A straightforward solution is to rebuild the index from scratch on the new vectors, but this is prohibitively expensive, as graph construction is well known to be costly [17, 18]. Rebuilding also overlooks a potential opportunity: although a change of embedding model produces two distinct sets of vectors, each vector in the old dataset has a counterpart in the new dataset derived from the same underlying object. Because embeddings encode semantic relationships among these objects [6], objects whose embeddings are close in the old space are likely to remain close in the new space. Therefore, an edge in the old index may still be useful for linking the corresponding vectors in the new index. This intuition motivates our central hypothesis: reusing suitable parts of the old graph-structured index can reduce the cost of constructing an index for the new vectors.

To examine how well an old graph supports search after a model change, we conduct a direct-reuse experiment on one million MS MARCO objects. We fix GTE-large as the target model and use old indexes built with four different embedding models. Direct Reuse replaces each node’s vector with its new counterpart while preserving identical edges. We compare its Recall@10 with Fresh, an index built from scratch on the new vectors, using the same query set and search parameters. Table I shows that Fresh achieves 99.8% recall, whereas Direct Reuse’s recall ranges from 75.5% to 99.4%. Thus, an old graph can retain some of its search capability on the new vectors, but its suitability varies across model pairs, and copying all connections can cause substantial recall loss. This motivates identifying and retaining useful connections and repairing those that no longer suit the target space, to achieve search quality close to Fresh while avoiding a complete index rebuild.

Source modelFreshDirect Reuse
BGE-large-en-v1.599.899.4
Contriever99.896.8
MPNet-base99.886.1
MiniLM-L6-H38499.875.5

Table I. Recall@10 (%) on MS MARCO with one million objects and GTE-large as the target model.

Problem and Challenges

We now examine the task in greater detail. Let XX and YY be vector datasets generated from the same set of underlying objects OO by different embedding models MXM_X and MYM_Y, respectively. Given an existing graph-structured index GXG_X over XX, our goal is to construct a graph-structured index GYG_Y over YY by reusing suitable connections from GXG_X and repairing those that no longer support effective search in the new embedding space. This task is called index migration [4].

Our preliminary experiments (Table I) suggest that index migration involves two central decisions: which edges of the source index to retain, and how to add new edges so that the target index achieves search performance comparable to that of an index built from scratch. Addressing these decisions presents four key challenges.

First, deciding whether to retain an edge (i,j)(i,j) from GXG_X requires determining whether its endpoints remain near neighbors in the target embedding space. However, this neighborhood information must be obtained before an index over YY is available, creating a circular dependency between neighborhood determination and index construction.

Second, the old and new vector datasets may differ in dimension and distance scale, so raw distances cannot be directly compared across the two spaces. Transferring neighborhood information therefore requires non-trivial techniques that account for these differences.

Third, any practical migration must be remarkably faster than rebuilding the index from scratch. For example, exhaustively testing all vector pairs to detect neighborhood changes would cost O(n2)O(n^2) time which defeats the purpose of migration and is prohibitive for large-scale datasets.

Fourth, the migrated index must deliver query performance comparable to that of a freshly built index. Achieving construction savings while preserving query performance is essential to the practical value of index migration.

Figure 1. The idea of reuse-and-repair

Approach and Contributions

To address these challenges, we develop the following strategy based on the idea of reuse-and-repair.

First, we screen the old index GXG_X using a novel criterion that distinguishes stable edges to retain from unstable edges to modify. This process requires no index over the new vector dataset YY, addressing the first challenge.

Second, the criterion is based on standardized distances, computed from the mean and variance of each node’s neighbor distance list. This normalization accounts for differences in dimension and distance scale across embedding spaces, addressing the second challenge. Both criterion evaluation and edge screening operate within local neighbor lists, avoiding exhaustive pairwise comparisons and quadratic cost, thereby addressing the third challenge.

Third, after a partial new index is obtained by screening and reusing the old index, we improve the new index through a reconnection stage, a local refinement pass, and a reachability repair stage. Together, these steps improve index quality and query performance, addressing the fourth challenge.

In summary, this paper makes the following contributions.

  1. We propose a lightweight neighborhood similarity metric that can be evaluated before the target index is built, allowing the identification of reusable edges without quadratic cost.

  2. We develop an HNSW migration method that combines local edge screening, selective reconnection, candidate sharing, and reachability repair, which significantly reduces construction overhead compared to rebuilding from scratch.

  3. We analyze the time complexity of our method based on the careful inspection of the screening rules and repair process.

  4. We evaluate our method on various datasets against recent baseline methods. Across 15 transitions spanning different types of model change, STARR migrates faster than baselines and achieves 5.25–44.54× construction speedups over Fresh, with Recall@10 within one percentage point of Fresh in 10 cases. We further evaluate all 240 directed model transitions against Fresh to examine performance across embedding-model pairs. Parameter sweeps and recall–throughput curves compare migration and query efficiency at comparable recall, while ablations quantify the effects of individual components on migration cost, recall, and reachability.

The rest of the paper is organized as follows. § 3 introduces the preliminaries. § 4 proposes the method for migration. Section IV gives theoretical analysis of our method. Section V describes the experimental results. Section VI reviews related work. Section VII concludes this paper.

Preliminaries

Objects, embeddings, and nearest neighbors

We place our research problem under the following setting. Let O={oi}i=1n\mathcal{O} = \{o_i\}_{i=1}^{n} be a nonempty set of underlying objects, with identifier set V={1,…,n}\mathcal{V} = \{1,\ldots,n\}. The old model MXM_X maps oio_i to xi∈RdXx_i \in\mathbb{R}^{d_X}, and the new model MYM_Y maps it to yi∈RdYy_i \in\mathbb{R}^{d_Y}. We write the corresponding vector datasets as X=(xi)i=1nX = (x_i)_{i=1}^{n} and Y=(yi)i=1nY = (y_i)_{i=1}^{n}, and call them the source and target vector datasets, respectively. Their dimensions may differ, but the identifier ii records the correspondence between representations.

For identifiers i,j∈Vi, j \in\mathcal{V}, define DX(i,j)=∥xi−xj∥2D_X(i,j) = \lVert x_i - x_j \rVert_2, DY(i,j)=∥yi−yj∥2D_Y(i,j) = \lVert y_i - y_j \rVert_2. A query object qq has source representation qXq_X and target representation qYq_Y. Its distances to indexed objects are DX(q,i)=∥qX−xi∥2D_X(q,i) = \lVert q_X - x_i \rVert_2, DY(q,i)=∥qY−yi∥2D_Y(q,i) = \lVert q_Y - y_i \rVert_2.

For A∈{X,Y}A \in\{X,Y\}, the kk-nearest neighbors of qAq_A in AA, are the kk vectors in AA with minimum distances to qAq_A under DAD_A. Let KA(q)K_A(q) be the identifiers of the kk vectors, and let rq,jAr^{A}_{q,j} be the jj-th smallest distance. We use a fixed identifier order to break ties on distance values.

Approximate kk nearest-neighbor (ANN) search instead finds a set of size kk that may not equal to KA(q)K_A(q), but with as much overlap as possible. The recall, which will be used in the experiments (Equation (21)), is used to measure the quality of the approximate nearest neighbor set.

HNSW index

ANN search is usually supported by index structures. This paper focuses on HNSW index.

An HNSW index is a hierarchy of directed graphs {GAh}=(Vh,EAh)\{G_A^h\} = (\mathcal{V}_h, E_A^h), h=0,…,Hh = 0,\ldots,H, where HH is the maximum level, and A∈{X,Y}A \in\{X,Y\} denotes the embedding space. Each vertex ii has a nonnegative integer height hi≤Hh_i \le H and belongs to layers 0,…,hi0,\ldots,h_i. The level-0 layer, or the base layer, has V0=V\mathcal{V}_0 = \mathcal{V}, and Vh={i:hi≥h}\mathcal{V}_h = \{i : h_i \ge h\}. The entry point e∈VHe \in\mathcal{V}_H is the designated starting vertex for hierarchical search. The adjacency list NAh(i)N_A^h(i) contains the outgoing neighbors of ii at layer hh. The outgoing degree is denoted as ∣NAh(i)∣\lvert N_A^h(i)\rvert.

HNSW constructs the index incrementally, assigning each new vertex ii a random height hih_i. Starting from ee, it descends greedily through layers above hih_i, repeatedly moving to a closer neighbor and using the closest vertex found as the next layer’s entry point. From layer min⁡{H,hi}\min\{H,h_i\} to layer 0, it searches for candidates with width efConstruction, selects up to MM neighbors using a diversity heuristic, and adds outgoing and reverse connections. The heuristic can reject a candidate that is closer to an already selected neighbor than to the vertex being connected, avoiding redundant connections. Lists exceeding their capacities are pruned using this heuristic. Higher layers contain exponentially fewer vertices, forming a sparse navigation structure, while the base layer contains all vertices for finer local exploration. The outgoing-list capacities used here are C0=2MC_0 = 2M and Ch=MC_h = M for h>0h > 0, with common upper bound C=2MC = 2M; these limits do not bound incoming degree. Queries exploit this hierarchy by descending greedily from the top-layer entry point to approach the query’s neighborhood. At the base layer, best-first search expands the closest pending vertex and maintains a bounded set of promising candidates, from which the closest kk are returned as approximate nearest neighbors. Query width efSearch controls the retained candidate set, trading query cost for search accuracy [12].

The migration task

We now define the migration task to tackle in this paper.

Input: source and target vector sets XX and YY, together with the source HNSW index GXG_X.

Output: an HNSW index GYG_Y for ANN search on YY.

Requirements: Migration should be substantially faster than rebuilding the index from scratch and should yield query performance comparable to that of a freshly built index.

Method description

Given source and target vectors for the same objects, and a source HNSW index, our method STARR, standing for Standardized Tolerance for Adaptive Reuse and Repair, constructs the target index in three stages. The overall algorithm is given in Algorithm 1.

First, we screen source edges by comparing local distance relationships in the two embedding spaces using the same source neighbor lists. We retain edges for which these relationships change only slightly and mark vertices for repair if they lose any outgoing edges or have empty neighbor lists.

Next, we search the current target graph for candidate neighbors and use them to reconnect vertices in the repair set. We also share these candidates with nearby vertices, allowing vertices outside the repair set to gain connections. When the repair set is small, selected reverse connections are added to retained edges before reconnection.

Finally, we check base-layer reachability from the entry point and add bridges to unreached portions of the graph to ensure the full graph reachability.

By reusing source connections and the search routes of the source index, the method concentrates reconnection searches on affected vertices to reduce construction cost while improving search quality of the migrated target index.

Initializing the Target Index

To initialize the target index, we allocate the vertex storage with target vector dimension dYd_Y, preserving each vertex’s height hih_i, and write the corresponding target vectors yiy_i. The vertex count, entry point ee, maximum level HH, and neighbor-list capacities retain their source settings, while every neighbor list is initialized as empty. The initialized target index therefore contains all target vectors and preserves the source index’s object correspondence and layer membership, but has no edges. The next stage examines source edges and adds only those satisfying the reuse criterion to the target index.

Algorithm 1: HNSW index migration

Input: Source index GXG_X over XX; target vectors YY; tolerance τ\tau; search width BB

Output: Target index GYG_Y

  1. Initialize GYG_Y with YY, source metadata, and empty lists

  2. U←∅U \leftarrow\emptyset

  3. foreach i∈Vi \in\mathcal{V} and h=0,…,hih = 0,\ldots,h_i do

  4. NYh(i)←SihN_Y^h(i) \leftarrow S_i^h using Eq. (7)

  5. if Sih≠NXh(i)S_i^h \ne N_X^h(i) or (Sih=∅(S_i^h = \emptyset and n>1)n > 1) then

  6. U←U∪{i}U \leftarrow U \cup\{i\}

  7. if ∣U∣(C0+1)<n|U|(C_0+1) < n then

  8. Batch stable reverse connections (Section III-C)

  9. foreach i∈Ui \in U in decreasing height, then increasing ID do

  10. Ci←Reconnect⁡(GY,i,B)C_i \leftarrow\operatorname{Reconnect}(G_Y,i,B) (Section III-D)

  11. foreach v∈NY0(i)v \in N_Y^0(i) with ∣NY0(v)∣<C0|N_Y^0(v)| < C_0 do

  12. A←Ci∖({v}∪NY0(v))A \leftarrow C_i \setminus(\{v\} \cup N_Y^0(v))

  13. if A≠∅A \ne\emptyset then

  14. Append arg⁡min⁡c∈ADY(v,c)\arg\min_{c\in A}D_Y(v,c) to NY0(v)N_Y^0(v)

  15. Repair entry-point reachability (Section III-F)

  16. return GYG_Y

Detecting Reusable Edges

Throughout migration, NXh(i)N_X^h(i) denotes the fixed source neighbor list, while NYh(i)N_Y^h(i) denotes the current target neighbor list. We assess each source edge by the length change relative to the other edges in the same neighbor list. Since the source and target spaces may differ in dimension and distance scale, we compare standardized distances rather than raw edge lengths. For each nonempty source list NXh(i)N_X^h(i) and A∈{X,Y}A \in\{X,Y\}, the mean and variance of the distances are

μi,hA=1∣NXh(i)∣∑j∈NXh(i)DA(i,j),(1)\mu_{i,h}^{A}=\frac{1}{|N_X^h(i)|}\sum_{j\in N_X^h(i)}D_A(i,j), \tag*{(1)}
(σi,hA)2=1∣NXh(i)∣∑j∈NXh(i)(DA(i,j)−μi,hA)2.(2)(\sigma_{i,h}^{A})^2=\frac{1}{|N_X^h(i)|}\sum_{j\in N_X^h(i)}(D_A(i,j)-\mu_{i,h}^{A})^2. \tag*{(2)}

We call {DA(i,j)∣j∈NXh(i)}\{D_A(i,j)\mid j\in N_X^h(i)\} the distance profile in space AA. Each edge length is standardized as

zi,hA(j)={DA(i,j)−μi,hAσi,hA,σi,hA>0,0,σi,hA=0.(3)z_{i,h}^{A}(j)= \begin{cases} \frac{D_A(i,j)-\mu_{i,h}^{A}}{\sigma_{i,h}^{A}}, & \sigma_{i,h}^{A}>0,\\ 0, & \sigma_{i,h}^{A}=0. \end{cases} \tag*{(3)}

The resulting z-score describes the edge’s relative length within its local distance profile. The zero-variance convention covers singleton and constant-distance lists.

To adapt screening to the preservation of the local distance profile, we measure agreement between the source and target z-score lists:

ρi,h=1∣NXh(i)∣∑j∈NXh(i)zi,hX(j)zi,hY(j).(4)\rho_{i,h}=\frac{1}{|N_X^h(i)|}\sum_{j\in N_X^h(i)}z_{i,h}^{X}(j)z_{i,h}^{Y}(j). \tag*{(4)}

When both variances are positive, ρi,h\rho_{i,h} is the Pearson correlation between the profiles. If either variance is zero, the convention above gives ρi,h=0\rho_{i,h}=0.

Given a tolerance parameter τ≥0\tau\ge0, we define the allowed increase in standardized edge length as

ti,h=τ×min⁡{1,max⁡{0,ρi,h}}.(5)t_{i,h}=\tau\times\min\{1,\max\{0,\rho_{i,h}\}\}. \tag*{(5)}

Algorithm 2: Adding stable reverse connections

Input: Screened target graph GYG_Y; rejected directions RhR^h

Output: Updated target adjacency lists; unchanged repair set

  1. Procedure BatchReverse(GY,{Rh}h=0H)(G_Y,\{R^h\}_{h=0}^{H})

  2. for h←0h \leftarrow0 to HH do

  3. Pv←∅P_v \leftarrow\emptyset for every v∈Vhv \in\mathcal{V}_h

  4. foreach i∈Vhi \in\mathcal{V}_h in increasing internal-ID order do

  5. foreach j∈NYh(i)j \in N_Y^h(i) do

  6. if i∉NYh(j)i \notin N_Y^h(j) and (j,i)∉Rh(j,i)\notin R^h then

  7. Append ii to PjP_j

  8. foreach v∈Vhv \in\mathcal{V}_h with Pv≠∅P_v \ne\emptyset do

  9. L←NYh(v)L \leftarrow N_Y^h(v) followed by PvP_v

  10. if ∣L∣>Ch|L| > C_h then

  11. L←DiversityPrune⁡(v,L,Ch)L \leftarrow\operatorname{DiversityPrune}(v,L,C_h)

  12. NYh(v)←LN_Y^h(v) \leftarrow L

This scales the threshold between zero and τ\tau: strong positive agreement permits a larger increase, while weaker agreement makes screening more restrictive. The change of standardized distance for an individual edge is

Δi,h(j)=zi,hY(j)−zi,hX(j).(6)\Delta_{i,h}(j)=z_{i,h}^{Y}(j)-z_{i,h}^{X}(j). \tag*{(6)}

We retain neighbors whose standardized edge lengths do not increase beyond this threshold:

Sih={j∈NXh(i):Δi,h(j)≤ti,h}.(7)S_i^h=\{j\in N_X^h(i):\Delta_{i,h}(j)\le t_{i,h}\}. \tag*{(7)}

The criterion is one-sided: an edge whose standardized length decreases is retained, while an increase is accepted only within the correlation-adjusted tolerance. It therefore distinguishes relative improvement from deterioration rather than treating both as distortion. All comparisons use existing source neighbor lists, so screening requires neither a target-space index nor an exhaustive comparison of all vector pairs. The resulting sets SihS_i^h identify the source directions selected for initial reuse.

Adding Stable Reverse Connections

Using the sets identified in Section III-B, we add each retained edge i→ji\rightarrow j, j∈Sihj\in S_i^h, to the target index at layer hh, without actually adding its reverse. Vertices that lose an outgoing edge at any layer, or have an empty neighbor list at an occupied layer when n>1n>1, form the repair set UU, with u=∣U∣u=|U|. It remains fixed throughout subsequent repair.

When the repair set is small, reconnection and candidate sharing may update only a limited portion of the base graph. We therefore first supplement retained edges with reverse connections if u(C0+1)<nu(C_0+1)<n. Here, C0+1C_0+1 bounds the number of base-layer slots that reconnection and sharing can update per repaired vertex: its own list and at most C0C_0 neighboring lists.

The reverse pass operates layer by layer. A retained edge i→ji\rightarrow j proposes j→ij\rightarrow i only if that direction is missing and was not explicitly rejected during screening. After collecting all proposals for a layer, we merge each recipient’s proposals with its current neighbors. We write the union directly if it fits within ChC_h; otherwise, we apply diversity pruning once before writing it. This batch update avoids repeated pruning and does not guarantee bidirectional connections. The resulting graph provides the search routes for reconnecting vertices in UU.

Search-Based Connection Repair

The preceding stages partially establish target index connections, but vertices in U\mathcal{U} may still lack suitable neighbors. We therefore use each vertex’s target vector as a query to search the current target graph and repair its connections.

For each i∈Ui \in\mathcal{U}, greedy search starts at ee and descends through layers above hih_i to find an entry close to yiy_i. We process layers hi,…,0h_i,\ldots,0 in descending order, so repaired upper-layer connections can guide subsequent searches. Before searching each layer, we use ii’s neighbor list NYh(i)N_Y^h(i) in the current target graph and an entry vertex to seed best-first search. At layer hih_i, the entry comes from the upper-layer greedy traversal; at each lower layer, it comes from neighbor selection at the preceding layer. The repair search width BB limits the retained set to at most BB candidate neighbors, excluding ii. All searches use the graph updated by earlier repairs.

We apply the HNSW diversity heuristic [12] to select neighbors from the candidate set, update ii’s outgoing connections, prune lists exceeding their capacities, and attempt reverse insertion into the selected neighbors’ lists. If the updated neighbor list for ii has free slots, we append missing neighbors from the saved list until all are restored or capacity is reached. Thus, restoration uses neighbors already present in the target graph immediately before this layer’s search, including connections retained or added by preceding operations.

This reconnection process updates an existing vertex’s connections while preserving its identifier and height. An edge rejected during screening may be rediscovered and inserted, as long as it is eligible for reconnection. The base-layer search candidates also support the candidate sharing described next.

Sharing Search Candidates

The preceding reconnection stage initiates searches only for vertices in U\mathcal{U}. However, a vertex that retains all its source edges may still lack useful neighbors in the target space. We therefore share repair search candidates with nearby vertices, allowing them to gain connections without launching independent searches, improving index quality at low cost.

For each repaired vertex ii, we save the candidate set CiC_i retained by its base-layer search before diversity pruning, with ∣Ci∣≤B|C_i| \le B. This set includes candidates that may subsequently be pruned from ii’s list. Local neighborhoods can overlap, making these candidates worth testing as neighbors of ii’s neighbors. For example, a candidate cc close to another neighbor vv may be considered redundant when selecting neighbors for ii, yet still provide a useful direct connection from vv.

After reconnecting ii at the base layer and restoring its pre-search neighbors, we examine its current neighbors v∈NY0(i)v \in N_Y^0(i). For each vv with spare capacity, we exclude vv itself and its existing neighbors from the shared candidates:

Ai,v=Ci∖({v}∪NY0(v)).(8)A_{i,v}=C_i\setminus\left(\{v\}\cup N_Y^0(v)\right). \tag*{(8)}

If Ai,vA_{i,v} is nonempty, we select the candidate ci,v∗c^*_{i,v} closest to vv in the target space,

ci,v∗=arg⁡min⁡c∈Ai,vDY(v,c)(9)c^*_{i,v}=\arg\min_{c\in A_{i,v}}D_Y(v,c) \tag*{(9)}

and add the directed edge v→ci,v∗v\to c^*_{i,v}.

Each recipient gains at most one edge per repaired vertex ii. We skip recipients whose lists are full or whose eligible candidate sets are empty. Sharing preserves existing edges and adds no reverse connection. By reusing search results, it extends connection updates beyond U\mathcal{U} without requiring a separate graph search for each recipient.

Ensuring Reachability from the Entry Point

Filtering and pruning can leave some vertices unreachable from the entry point ee. After reconnection and candidate sharing, we therefore check base-layer reachability and add bridges where needed.

We first perform a breadth-first traversal from ee, marking reached vertices and recording the edge that first discovers each vertex. These edges form a traversal tree and are protected during subsequent updates to preserve existing paths from the entry point. For each unreached vertex rr, a base-layer best-first search from ee with query yry_r finds reached vertices as candidate bridge sources, or anchors. We try them in increasing distance to rr. An anchor with a free slot accepts an edge to rr directly; a full anchor instead replaces its farthest outgoing non-tree edge. If none of the search candidates can accept a bridge, we scan the remaining reached vertices for a suitable anchor.

After adding a bridge, we include it in the traversal tree and resume traversal from rr to mark newly reached vertices. We repeat this process until every vertex is reachable from ee. All updates respect the base-layer neighbor capacity, while tree-edge protection preserves previously established paths.

Analysis

Throughout the analysis we use the following notation. There are n≥1n \ge1 paired objects with Euclidean distances DX(i,j)D_X(i,j) and DY(i,j)D_Y(i,j) in dimensions dXd_X and dYd_Y. The source list NXh(i)N_X^h(i) contains outgoing neighbors at layer hh; vertex ii occupies layers 0,…,hi0,\ldots,h_i. Layer 0 contains every vertex. The entry point is ee, and outgoing capacities satisfy 1≤Ch≤C1 \le C_h \le C. The repair set U\mathcal{U} is fixed after screening, with u=∣U∣u=|\mathcal{U}|.

Algorithm 3: Ensuring Reachability from the Entry Point

Input: Current target graph G_Y; entry point e; width B
Output: Every vertex reachable from e at layer 0, within capacity

1  Procedure EnsureReachable (G_Y, B)
2      Run base-layer BFS from e; let R be the reached vertices
       and T their parent-discovery tree edges
3      foreach r ∈ V in increasing internal-ID order do
4          if r ∉ R then
5              Search layer 0 from e with query y_r and width B
6              Choose the closest returned anchor a with a free slot
               or an outgoing edge outside T
7              if no such anchor was returned then
8                  Scan R in BFS discovery order for an anchor
                   satisfying the same condition
9              if |N_Y^0(a)| = C_0 then
10                 Remove a’s farthest outgoing edge outside T
11             Add a → r to G_Y and T, and add r to R
12             Resume BFS from r, extending R and protecting each
                new discovery edge in T

Local Screening and Repair Population

In this part we focus on the screening process on a local neighbor list of length ss. Based on the definition of distance profiles, standardized distance change Δj\Delta_j and tolerance tt, let

α=s−1∣{j:Δj>t}∣(10)\alpha=s^{-1}|\{j:\Delta_j>t\}| \tag*{(10)}

which is the rejected fraction of the screening process.

First, if the distances are positively affinely transformed, i.e., there exists γ>0\gamma>0 and δ\delta such that DY(i,j)=γDX(i,j)+δD_Y(i,j)=\gamma D_X(i,j)+\delta for each jj, the standardized distance profiles are identical and all neighbors survive. We then give a bound on α\alpha as follows.

Lemma IV.1 (Score identities and rejected-edge bound). Let χA=1{σA>0}\chi_A=\mathbf{1}\{\sigma_A>0\}. For every nonempty list,

s−1∑jΔj=0,v:=s−1∑jΔj2=χX+χY−2ρ.(11)s^{-1}\sum_j\Delta_j=0,\qquad v:=s^{-1}\sum_j\Delta_j^2=\chi_X+\chi_Y-2\rho. \tag*{(11)}

If v=0v=0, no edge is rejected. If t>0t>0,

α≤vv+t2=2(1−ρ)2(1−ρ)+τ2ρ2.(12)\alpha\le\frac{v}{v+t^2}=\frac{2(1-\rho)}{2(1-\rho)+\tau^2\rho^2}. \tag*{(12)}

If t=0<vt=0<v, the bound α≤1\alpha\le1 remains valid.

Proof. Standardization gives, including the zero-variance case,

s−1∑jzjA=0,s−1∑j(zjA)2=χA.(13)s^{-1}\sum_j z_j^A=0,\qquad s^{-1}\sum_j(z_j^A)^2=\chi_A. \tag*{(13)}

Hence s−1∑jΔj=0s^{-1}\sum_j\Delta_j=0, and expanding the square yields

v=s−1∑j(zjY−zjX)2=χY+χX−2ρ.(14)v=s^{-1}\sum_j(z_j^Y-z_j^X)^2=\chi_Y+\chi_X-2\rho. \tag*{(14)}

If v=0v=0, every Δj=0≤t\Delta_j=0\le t, so all edges survive. For t>0t>0, let ZZ be a uniformly chosen Δj\Delta_j; then EZ=0\mathbb{E}Z=0, EZ2=v\mathbb{E}Z^2=v, and α=Pr⁡(Z>t)\alpha=\Pr(Z>t). For any b≥0b\ge0,

α≤E[(Z+b)2](t+b)2=v+b2(t+b)2.(15)\alpha\le\frac{\mathbb{E}[(Z+b)^2]}{(t+b)^2}=\frac{v+b^2}{(t+b)^2}. \tag*{(15)}

Taking b=v/tb=v/t gives α≤v/(v+t2)\alpha\le v/(v+t^2). Since t>0t>0 implies ρ>0\rho>0 and χX=χY=1\chi_X=\chi_Y=1, substituting v=2(1−ρ)v=2(1-\rho) and t=τρt=\tau\rho proves (12). The case t=0<vt=0<v follows from α≤1\alpha\le1.

As a side note, singleton lists always survive, and no nonempty list can become empty under exact screening, since its score changes sum to zero.

Theorem IV.1 (Listwise screening stability). Consider a source neighbor list of node ii with σX>0\sigma_X>0. Suppose for every entry of this list there are constants 0<ℓ≤L0<\ell\le L satisfying

ℓDX(i,j)≤DY(i,j)≤LDX(i,j)(16)\ell D_X(i,j)\le D_Y(i,j)\le L D_X(i,j) \tag*{(16)}

Set ε=L−ℓL+ℓ\varepsilon=\frac{L-\ell}{L+\ell}, r=ε1+(μX/σX)2r=\varepsilon\sqrt{1+(\mu_X/\sigma_X)^2}. If r<1r<1, then σY>0\sigma_Y>0 and ρ≥ρ∗:=1−r2\rho\ge\rho_*:=\sqrt{1-r^2}. For τ>0\tau>0, the rejected fraction satisfies

α≤2(1−ρ∗)2(1−ρ∗)+τ2ρ∗2.(17)\alpha\le\frac{2(1-\rho_*)}{2(1-\rho_*)+\tau^2\rho_*^2}. \tag*{(17)}

For τ≥0\tau\ge0, a sufficient condition for every edge to survive is

2s(1−ρ∗)≤τρ∗.(18)\sqrt{2s(1-\rho_*)}\le\tau\rho_*. \tag*{(18)}

Proof. Let aa and cc be the old and new distance vectors of the source list. Let γ=(L+ℓ)/2\gamma=(L+\ell)/2 and write c/γ=a+ec/\gamma=a+e; then (16) gives ∣ej∣≤εaj|e_j|\le\varepsilon a_j. Let PP subtract the list mean and use ∥w∥rms=s−1∑jwj2\lVert w\rVert_{\mathrm{rms}}=s^{-1}\sum_jw_j^2. For x=Pax=Pa, f=Pef=Pe, and y=Pc/γ=x+fy=Pc/\gamma=x+f,

∥f∥rms≤ε∥a∥rms=εμX2+σX2=r∥x∥rms.\lVert f\rVert_{\mathrm{rms}}\le\varepsilon\lVert a\rVert_{\mathrm{rms}}=\varepsilon\sqrt{\mu_X^2+\sigma_X^2}=r\lVert x\rVert_{\mathrm{rms}}.

Since r<1r<1, y≠0y\ne0, so σY>0\sigma_Y>0 and ρ\rho is the cosine between xx and yy. Decompose f/∥x∥rms=βx/∥x∥rms+gf/\lVert x\rVert_{\mathrm{rms}}=\beta x/\lVert x\rVert_{\mathrm{rms}}+g, where g⊥xg\perp x. Then β2+∥g∥rms2≤r2\beta^2+\lVert g\rVert_{\mathrm{rms}}^2\le r^2 and

ρ=1+β(1+β)2+∥g∥rms2≥1+β1+2β+r2≥1−r2=ρ∗.(19)\rho=\frac{1+\beta}{\sqrt{(1+\beta)^2+\lVert g\rVert_{\mathrm{rms}}^2}} \ge\frac{1+\beta}{\sqrt{1+2\beta+r^2}}\ge\sqrt{1-r^2}=\rho_*. \tag*{(19)}

The last inequality follows from (β+r2)2≥0(\beta+r^2)^2\ge0 and 1+β>01+\beta>0. For τ>0\tau>0, the bound in (12) decreases for 0<ρ≤10<\rho\le1, giving (17). Finally, (11) gives ∣Δj∣≤s v≤2s(1−ρ∗)\lvert\Delta_j\rvert\le\sqrt{s\,v}\le\sqrt{2s(1-\rho_*)}. Under (18), this is at most τρ∗≤τρ=t\tau\rho_*\le\tau\rho=t, so every edge survives.

From rejected edges to repaired vertices.

Lemma IV.2. Let RR count rejected directed edges across all layers. For n>1n>1, let z0z_0 count vertices with an originally empty list at an occupied layer; set z0=0z_0=0 for n=1n=1. By the definition of the repair set UU, we can bound u=∣U∣u=|U| by

u≤min⁡{n,z0+R},R≤∑i,hsi,hαi,hub.(20)u\le\min\{n,z_0+R\},\qquad R\le\sum_{i,h}s_{i,h}\alpha_{i,h}^{\mathrm{ub}}. \tag*{(20)}

Set αub=0\alpha^{\mathrm{ub}}=0 when v=0v=0; otherwise use (17) only if τ>0\tau>0 and r<1r<1, and use 11 in all remaining cases.

Proof. Every vertex in UU either contributes to z0z_0 or is the tail of a rejected edge, so u≤min⁡{n,z0+R}u\le\min\{n,z_0+R\}. The second inequality follows by summing αi,h≤αi,hub\alpha_{i,h}\le\alpha_{i,h}^{\mathrm{ub}}, weighted by si,hs_{i,h}, over the nonempty lists.

Capacity-Preserving Reachability

Section IV-B bounded how many vertices end up in the repair set UU. The next result is a structural guarantee about that procedure’s output: whatever size UU turns out to have, repair leaves the base layer connected from the entry point, without ever asking any vertex to hold more outgoing edges than its capacity allows.

Proposition IV.1 (Rooted reachability). Let R0R_0 be the base-layer vertices reachable from ee before reachability repair. Protecting traversal-tree edges and attaching unreached vertices through free or unprotected slots terminates with every vertex reachable from ee, respects outgoing capacities, and adds at most n−∣R0∣n-|R_0| bridges.

Proof. Maintain a protected spanning out-tree TT of the reached set RR, initially R0R_0. Since protected edges are never removed, all vertices in RR remain reachable from ee. If R≠VR\ne V, any leaf of TT has no protected outgoing edge. Its capacity is at least 11, so it has either a free slot or an unprotected edge that can be replaced by a bridge to an unreached vertex. Thus the fallback scan always finds an eligible anchor if the search does not. Adding and protecting the bridge, then extending TT by traversal from its endpoint, preserves capacities and existing protected paths while increasing ∣R∣|R| by at least one. At most n−∣R0∣n-|R_0| bridges suffice to reach every vertex.

Total Time Complexity

Theorem IV.2. Let M≥1M \ge1 be the HNSW neighbor parameter, yielding neighbor list capacity 2M2M at the base layer and MM at higher layers. Let the maximum height of HNSW be H=max⁡ihiH=\max_i h_i. Let Λ=∑i(hi+1)\Lambda=\sum_i(h_i+1), m=∑i,h∣NhX(i)∣≤CΛm=\sum_{i,h}|N_h^X(i)|\le C\Lambda. Let UU be the repair set, u=∣U∣u=|U|, and A=∑i∈U(hi+1)A=\sum_{i\in U}(h_i+1). Let B≥MB\ge M be the search width. Assume that MM and BB are fixed, Λ=O(n)\Lambda=O(n), and A=O(H+1+uℓ(n))A=O(H+1+u\ell(n)). The last condition holds whenever H=O(ℓ(n))H=O(\ell(n)). Denote ℓ(x)=log⁡2(2+x)\ell(x)=\log_2(2+x).

Let r0r_0 be the number of vertices reachable from the entry point in the base layer immediately before reachability repair. If reachability repair inserts bb bridges, take any integer bˉ\bar b with b≤bˉ≤n−r0b\le\bar b\le n-r_0, and set

Jbˉ=bˉ(2n−bˉ−1)2.J_{\bar b}=\frac{\bar b(2n-\bar b-1)}{2}.

For these counts, the worst-case migration time satisfies

Tmig=O(n(dX+dY)+n[H+1+ℓ(n)]+(un+Jbˉ)(dY+ℓ(n))).T_{\mathrm{mig}}=O\left(n(d_X+d_Y)+n[H+1+\ell(n)]+(un+J_{\bar b})(d_Y+\ell(n))\right).

Proof. Initialization and screening. Validating and copying the target vectors costs O(ndY)O(nd_Y), and initializing the inherited neighbor lists costs O(Λ)O(\Lambda) for fixed MM. The number mm of directed source edges is at most 2MΛ=O(n)2M\Lambda=O(n). Screening evaluates the source and target distances on those edges and computes list statistics and retention decisions in linear time in the number of entries. It flags vertices that lose an outgoing edge or have an empty occupied source list when n>1n>1. These operations cost O(Λ+m(dX+dY))O(\Lambda+m(d_X+d_Y)) in total, so the initialization and screening cost is O(n(dX+dY))O(n(d_X+d_Y)).

Batch reversal and scheduling. The batch reversal scans all nn identifiers at every layer and makes at most one reverse proposal per retained edge. The merged pools contain at most 2m2m entries in total because the retained lists and the reverse proposals each contribute at most mm. An overflowing pool of size ss takes O(s[dY+ℓ(n)])O(s[d_Y+\ell(n)]) time to score and prune. Each candidate is compared against at most 2M2M selected neighbors, and its heap operations cost O(ℓ(n))O(\ell(n)) because s=O(n)s=O(n). Membership and rejection checks take constant time per retained edge. Building the rejection hash sets costs O(H+1+m)O(H+1+m). The reversal cost is therefore O(n(H+1)+n[dY+ℓ(n)])O(n(H+1)+n[d_Y+\ell(n)]). Forming the repair list and scanning its uu entries at each height costs O(n+u(H+1))O(n+u(H+1)). Together these stages add O(n[H+1+ℓ(n)])O(n[H+1+\ell(n)]) beyond the O(ndY)O(nd_Y) already allowed in the first term.

Connection repair and sharing. Let nhn_h be the number of vertices occupying layer hh, so ∑h=0Hnh=Λ\sum_{h=0}^{H}n_h=\Lambda. Each flagged vertex uses greedy search at height one and one beam search at each occupied layer. Greedy search scans at most nhn_h distinct lists at layer hh. A beam call marks each discovered vertex once and expands it at most once. The fixed outgoing capacities give O(nh)O(n_h) distance evaluations and adjacency checks, including the seeds. The search makes O(nh)O(n_h) heap operations, each costing O(ℓ(n))O(\ell(n)) because at most nh≤nn_h\le n entries can be pending. With BB and MM fixed, selecting neighbors, updating their reverse lists, restoring saved entries, and sharing base-layer candidates take O(dY+1)O(d_Y+1) per repaired vertex-layer pair. Thus all repairs take O(uΛ[dY+ℓ(n)])=O(un[dY+ℓ(n)])O(u\Lambda[d_Y+\ell(n)])=O(un[d_Y+\ell(n)]).

Reachability repair. The initial breadth-first traversal and all resumed traversals take O(n)O(n) total time. By Proposition IV.1, each bridge increases the reached set, and b<n−r0b<n-r_0. Let rjr_j be the reached-set size before bridge jj. The reached set is closed under outgoing edges at that point, so a beam search from the entry point visits at most rjr_j vertices. Sorting the at most BB returned anchors takes constant time. The fallback scans at most rjr_j anchors, each with a list of bounded size. Search and attachment therefore cost O(rj[dY+ℓ(n)])O(r_j[d_Y+\ell(n)]) per bridge. The rjr_j are distinct positive integers less than nn, and the largest bˉ\bar b such integers sum to JbˉJ_{\bar b}. Hence the bridge work is O(Jbˉ[dY+ℓ(n)])O(J_{\bar b}[d_Y+\ell(n)]).

Experiments

Experimental Setup

  1. Datasets and model transitions: We evaluate HNSW migration on three datasets, each containing one million objects. MS MARCO [2] and Wikipedia use text embeddings, while CC3M uses image embeddings. For each transition, the source and target embeddings represent the same objects. Our main comparison includes five transitions per dataset, spanning fine-tuning, version updates, model scaling, and changes in model family or architecture. Table II lists these 15 transitions and their embedding dimensions. To examine performance across a broader range of model pairs, we also evaluate all A162A_{16}^{2} directed transitions among 16 models on MS MARCO.

  1. Compared methods: We compare STARR (code available [23]) with Fresh, DGM-Local, and DGM-Search [4]. Fresh builds a new HNSW index on the target embeddings. While both DGM variants reuse the source graph to construct the target index, DGM-Local obtains candidates through local graph expansion, and DGM-Search uses hop-bounded beam search. We adapt the public DGM implementation to the HNSW hierarchy, using the same degree limits and L2L2 distance metric as the other methods.

  1. Implementation and parameters: All experiments run on an Intel Core Ultra 7 265K server, compiled with -O2 and FP32 vectors using single-threaded C++17 implementations. Source and Fresh indexes use M=16M=16 and efConstruction = 200, with degree limits of 32 at the base layer and 16 at upper layers. Our default parameters are τ=2\tau=2 and B=16B=16. DGM-Local uses mean-centered position sign (MPS) screening with a candidate budget of 400. DGM-Search uses a beam capacity of 256 and a four-hop limit. Both DGM variants use α=1.1\alpha=1.1. We set efSearch = 200 for the main comparison and vary it on fixed indexes to compare recall and query throughput. We jointly vary τ\tau and BB in the sensitivity experiments.

Source modelTarget modeldX→dYd_X \to d_YScenario
MS MARCO and Wikipedia
BGE-base-v1.5BGE-base-v1.5-ft768→768768 \to768Fine-tuning
BGE-baseBGE-base-v1.5768→768768 \to768Version update
BGE-small-v1.5BGE-large-v1.5384→1024384 \to1024Scale up
MiniLM-L6-H384GTE-large384→1024384 \to1024Cross-family
MS MARCO only
BGE-large-v1.5GTE-large1024→10241024 \to1024Cross-family
Wikipedia only
E5-large-v2BGE-base-v1.51024→7681024 \to768Cross-family
CC3M
DINOv1-ViT-S/16DINOv1-ViT-B/16384→768384 \to768Scale up
DINOv1-ViT-B/16DINOv2-base768→768768 \to768Generation change
CLIP-ViT-L/14SigLIP-base768→768768 \to768Cross-family
SigLIP-baseCLIP-ViT-L/14768→768768 \to768Cross-family
DINOv1-ResNet50DINOv2-base2048→7682048 \to768Cross-architecture

Table II. Selected model transitions. BGE labels omit -en. The suffix ft denotes MS MARCO fine-tuning.

Evaluation protocol and metrics

All methods use the same 1,000 indexed objects as queries for each dataset, with self-matches included. We compute exact top-10 neighbors in the target embedding space as ground truth. For query set QQ, let Tk(q)T_k(q) and Ak(q)A_k(q) denote the exact and returned neighbor sets, respectively. Recall is

Recall⁡@k=1∣Q∣∑q∈Q∣Ak(q)∩Tk(q)∣k,(21)\operatorname{Recall}@k = \frac{1}{\lvert Q\rvert} \sum_{q \in Q} \frac{\lvert A_k(q) \cap T_k(q)\rvert}{k}, \tag*{(21)}

where k=10k = 10. We measure query throughput in queries per second (QPS) after warm-up. Recall–QPS curves report median QPS over five timed runs per configuration. We report target-index construction or migration time and define construction speedup as TFresh/TmethodT_{\mathrm{Fresh}}/T_{\mathrm{method}}. Migration time includes target-index initialization and graph migration. Source-index construction, embedding generation, disk I/O, and ground-truth computation are excluded. Construction and migration times are measured once per configuration.

Overall Performance

Figure 2 compares construction speedup, Recall@10, and QPS under single-threaded execution across 15 model transitions on the three datasets. The cases span both text and image embeddings, including updates within a model family and cross-family transitions. STARR has the lowest migration time in every case, achieving 5.25–44.54× speedups over Fresh. DGM-Local achieves 1.78–2.67× speedups, while DGM-Search takes longer than Fresh in 13 cases.

Figure 2. Performance on 15 model transitions. Dataset blocks are arranged by column, and rows show construction speedup over Fresh, Recall@10, and QPS at efSearch⁡=200\operatorname{efSearch}=200. Higher values are better for all three metrics. ft denotes fine-tuning.

On most transitions, STARR maintains recall close to Fresh and the two DGM variants. Recall@10 is within one percentage point of Fresh in 10 cases. For BGE-base to BGE-base-v1.5 on MS MARCO, both STARR and Fresh achieve 99.83% recall, with STARR achieving a 35.36× construction speedup. On Wikipedia, the same transition yields the largest speedup, 44.54×, with a recall loss of only 0.27 percentage points. These model-update cases show that migration can substantially reduce construction cost while preserving search quality close to that of a fresh index.

STARR also achieves higher recall than both DGM variants on several difficult transitions. For MiniLM to GTE-large, Recall@10 reaches 95.03% on MS MARCO and 96.76% on Wikipedia. These values exceed DGM-Local by 5.26 and 5.74 percentage points, and DGM-Search by 2.50 and 3.51 percentage points, respectively, while migration remains faster than either variant. On CC3M, DINOv1-ResNet50 to DINOv2-base likewise achieves higher recall than both DGM variants. A gap to Fresh remains in these cases, highlighting the remaining quality loss under the default settings.

For query throughput, STARR exceeds DGM-Local in 14 cases and matches or exceeds Fresh on some transitions. DGM-Search provides higher QPS than STARR in most cases, but also incurs substantially higher migration costs. STARR combines lower migration cost with competitive query throughput, although some difficult transitions incur a throughput loss relative to Fresh. For DINOv1-ResNet50 to DINOv2-base, for example, QPS decreases from approximately 1,713 to 1,100, alongside a 5.25× construction speedup.

Performance across parameter configurations

Figure 3 compares the construction–recall tradeoffs of the three migration methods on three representative transitions, using 1,000 queries and fixed efSearch=200efSearch=200. We evaluate 28 STARR, 15 DGM-Local, and 48 DGM-Search configurations per transition. The curves connect each method’s measured Pareto frontier, minimizing migration time and maximizing Recall@10. Representative configurations are shown to reduce clutter, with all frontier points and defaults retained.

Figure 3. Construction–recall tradeoffs under parameter sweeps on three model transitions, evaluated with 1,000 queries. Faint markers show representative configurations, and lines connect the nondominated configurations from each method’s full measured grid. Stars mark default configurations, and dark crosses show Fresh. The time axis is logarithmic.

STARR offers a favorable time–recall tradeoff across the scanned configurations. On MS MARCO, the fastest configurations reaching at least 95% recall take 142.35 seconds for STARR and 2,043.21 seconds for DGM-Search, a 14.35× difference. DGM-Local does not reach this threshold within the scanned grid. On Wikipedia, reaching at least 99.5% recall takes 21.72 seconds with STARR, compared with 110.11 and 110.33 seconds for DGM-Local and DGM-Search. On CC3M, STARR reaches 98.15% recall in 227.66 seconds, while neither DGM variant reaches 98% in the scan. STARR’s default configuration lies on the measured Pareto frontier at the low-cost end in all three transitions. Its advantage thus extends beyond the default comparison, while additional repair provides options for higher recall requirements.

Query Performance

Figure 4 compares query throughput across six transitions as efSearchefSearch varies on fixed indexes. For each recall threshold, we compare the highest measured QPS among the configurations that meet or exceed it.

Figure 4. Recall–QPS curves on six model transitions. Each curve connects 13 measured configurations in increasing efSearch order, from 10 to 1600, on a fixed index. Reported QPS is the median of five timed runs, plotted on a log scale. Stars mark efSearch = 200. Panels (a,b), (c,d), and (e,f) correspond to MS MARCO, Wikipedia, and CC3M, respectively.

For BGE version updates, relative query efficiency varies by dataset. At the 99% recall threshold on MS MARCO, STARR achieves approximately 4,487 QPS, outperforming all three baselines in query throughput. On Wikipedia, DGM-Search provides higher throughput for the same transition.

STARR’s advantage over the DGM variants is more pronounced on the difficult MiniLM-to-GTE-large transitions. At the 95% recall threshold, STARR achieves approximately 733 QPS on MS MARCO and 1,203 QPS on Wikipedia. These rates are 2.97× and 4.95× those of DGM-Local, and 3.99× and 4.50× those of DGM-Search, respectively. Thus, our migrated indexes require less query time to meet the same recall requirement on these transitions.

A similar advantage appears for DINOv1-ResNet50 to DINOv2-base on CC3M. At the 98% recall threshold, STARR achieves approximately 601 QPS, 2.36× that of DGM-Local. DGM-Search reaches a maximum recall of 96.99% within the tested range. Fresh still offers higher throughput on these difficult transitions, revealing a remaining query-performance gap on hard cross-architecture migrations.

Performance Across Model Transitions

We evaluate all A162A^{2}_{16} directed model transitions on MS MARCO. Figure 5 shows construction speedup and Recall@10 changes relative to Fresh. In both panels the rows are source models and columns are target models.

Figure 5. Migration performance across all 240 directed model transitions on MS MARCO with one million objects. Both panels use the same source-model rows, labeled at left, and target-model columns. Gray diagonal cells are unevaluated self-transitions. (a) Fresh construction time divided by migration time. (b) Recall@10 of STARR minus that of Fresh, in percentage points; orange indicates a decrease, white no change, and pale blue an increase. Selected extrema are annotated.

Migration is faster than Fresh in all 240 transitions, with construction speedups of 5.10–38.51× and a median of 16.71×. These savings do not always preserve recall close to that of Fresh. Recall@10 changes range from −8.6 to +0.4 percentage points, with a median of −1.0 percentage point. In 121 transitions, recall is within one percentage point of Fresh or higher; 19 transitions match or exceed Fresh. Thus, construction savings extend across the full matrix, whereas the resulting search quality depends on the model pair.

The heatmaps also show that both construction speedup and recall loss vary substantially across source models, even when the migration parameters are held fixed. For transitions starting from MiniLM-L6-H384 and MPNet-base, the median recall losses relative to Fresh are 5.9 and 3.9 percentage points, respectively. The corresponding median construction speedups are 6.60× and 8.29×. For transitions starting from BGE-large-v1.5, the median recall loss is only 0.3 percentage points, while the median construction speedup reaches 19.20×.

Reversing the migration direction can change performance outcome. Migrating from Contriever to Contriever-MS yields a 12.89× speedup, with Recall@10 of 99.5% compared with 99.1% for Fresh. The reverse transition achieves a 17.41× speedup, but recall decreases from 98.3% for Fresh to 96.1% after migration. Model transitions must therefore be evaluated directionally: performance in one direction does not determine performance in the reverse direction.

All transitions in this subsection use the same tolerance, τ=2\tau=2, which need not suit every model pair. When source and target models differ substantially in their semantic spaces and neighborhood structure, a permissive tolerance may retain too many edges that no longer suit the target space, reducing recall. For such transitions, we recommend a smaller τ\tau: stricter edge screening triggers more reconnection work, trading additional migration cost for higher recall. We examine this tradeoff further in the parameter sensitivity experiments.

Ablation Study

Table III compares STARR with six ablated variants on six transitions, using one million objects, 1,000 queries, τ=2\tau= 2, and B=16B = 16. We disable correlation scaling, restoration of pre-search neighbors, candidate sharing, reachability repair, or batch reverse insertion individually, and also disable sharing and reachability repair together, giving 42 configurations.

VariantMS MARCOWikipediaCC3M
BGE-base-en →\to BGE-base-en-v1.5MiniLM-L6-H384 →\to GTE-largeBGE-base-en →\to BGE-base-en-v1.5MiniLM-L6-H384 →\to GTE-largeDINOv1-ViT-B/16 →\to DINOv2-baseCLIP-ViT-L/14 →\to SigLIP-base
Time ↓\downarrowRecall ↑\uparrowTime ↓\downarrowRecall ↑\uparrowTime ↓\downarrowRecall ↑\uparrow
STARR23.2399.83154.6495.0317.5699.49
154.7396.76129.5196.74108.4298.58
w/o correlation scaling21.9399.8199.1989.2217.7999.39
108.8790.8870.0294.4755.4897.17
w/o neighbor restoration23.0599.8195.8990.3916.1399.39
93.1792.9082.5291.8273.2996.11
w/o candidate sharing23.0599.81120.8693.7416.1299.46
119.6295.33103.9596.2886.6598.31
w/o reachability repair23.0199.83154.1595.0317.2999.49
158.3296.75129.1796.72107.7598.54
w/o sharing + reachability22.7999.81120.4593.7315.5799.46
118.4895.32103.7696.2686.2098.28
w/o batch reverse insertion12.4499.84154.2895.0317.2399.49
157.9596.76129.2396.74108.2798.58

Table III. Ablations on one million objects per dataset with τ=2\tau= 2, B=16B = 16, and 1,000 queries. Time is migration time in seconds, and Recall is Recall@10 in percent. Each ablation disables the indicated component or components of STARR. Reachability refers to the final entry-point reachability repair.

Correlation scaling and neighbor restoration provide the largest recall gains on the difficult transitions. Removing correlation scaling lowers Recall@10 by 5.81 and 5.88 percentage points for MiniLM to GTE on MS MARCO and Wikipedia, respectively. On MS MARCO, migration time falls from 154.64 to 99.19 seconds, reflecting the cost of the additional repair induced by adaptive screening. Disabling neighbor restoration reduces recall by 4.64 percentage points on the same transition and by 4.92 points for DINOv1 to DINOv2 on CC3M. Both components have smaller recall effects on BGE version updates.

Candidate sharing improves recall across all six transitions, with gains ranging from 0.02 to 1.43 percentage points. For MiniLM to GTE on MS MARCO, disabling sharing reduces migration time from 154.64 to 120.86 seconds and recall from 95.03% to 93.74%. Sharing thus trades additional migration work for better search quality.

Reachability repair primarily improves structural coverage. Table IV shows that STARR reaches all one million vertices in every case, while disabling repair leaves 2–1,825 vertices unreachable. The corresponding recall loss is only 0–0.04 percentage points. Disabling sharing and repair together produces recall close to disabling sharing alone, but also leaves unreachable vertices. Recall therefore captures only part of the benefit of entry-point reachability repair.

DatasetTransitionSTARRw/o repair
MS MARCOBGE-base-en →\to BGE-base-en-v1.502
MiniLM-L6-H384 →\to GTE-large0305
WikipediaBGE-base-en →\to BGE-base-en-v1.5085
MiniLM-L6-H384 →\to GTE-large0222
CC3MDINOv1-ViT-B/16 →\to DINOv2-base0854
CLIP-ViT-L/14 →\to SigLIP-base01,825

Table IV. Vertices unreachable from the entry point after migration. STARR includes final reachability repair. The w/o repair variant disables this step.

Batch reverse insertion is triggered only for the MS MARCO BGE update among the six complete STARR configurations. Disabling it reduces migration time from 23.23 to 12.44 seconds, with essentially unchanged recall, 99.83% versus 99.84%. Recall is identical in the other five transitions, where the gate remains inactive. The Wikipedia BGE update also activates this pass when correlation scaling is disabled, showing that an ablation can change the execution of another component through the gate condition.

Parameter Sensitivity

Tolerance τ\tau and repair search width BB control STARR’s repair effort. A smaller τ\tau tightens edge screening, while a larger BB expands the repair search. The sweeps in Figure 3 combine τ∈{0,0.5,1,1.5,2,2.5,3}\tau\in\{0, 0.5, 1, 1.5, 2, 2.5, 3\} with B∈{16,32,64,128}B \in\{16, 32, 64, 128\}. For the DGM comparison, we scan DGM-Local’s candidate budget C∈{64,128,256,400,800}C \in\{64, 128, 256, 400, 800\} and DGM-Search’s beam capacity L∈{64,128,256,512}L \in\{64, 128, 256, 512\} and hop limit H∈{2,3,4,6}H \in\{2, 3, 4, 6\}. Both DGM methods use α∈{1.0,1.1,1.2}\alpha\in\{1.0, 1.1, 1.2\}.

For MiniLM to GTE-large on MS MARCO, stricter screening and wider repair search substantially improve recall. Moving from the default (τ,B)=(2,16)(\tau, B) = (2, 16) to (0,32)(0, 32) raises Recall@10 from 95.03% to 98.89%, with migration time increasing from 142.35 to 266.35 seconds. At (0,64)(0, 64), STARR reaches 99.46% recall in 499.18 seconds, versus Fresh at 99.89% in 922.23 seconds. Further increasing BB to 128 at τ=0\tau= 0 yields 99.76% recall in 952.26 seconds, slightly exceeding Fresh’s construction time. This illustrates the increasing cost of approaching Fresh recall. On CC3M, increasing BB from 16 to 64 at τ=2\tau= 2 raises recall from 96.74% to 98.15%, with migration time increasing from 117.76 to 324.71 seconds.

Sensitivity near the default depends on the transition. On Wikipedia, recall varies only from 99.43% to 99.51% for τ∈{1.5,2,2.5}\tau\in\{1.5, 2, 2.5\} at B=16B = 16. Over the same tolerance range, recall varies from 94.29% to 95.70% on MS MARCO and from 95.92% to 97.15% on CC3M. Thus, the default configuration provides an efficient starting point across the three transitions, while stricter screening or wider repair search is useful when a difficult transition requires higher recall.

Graph-based ANN indexing.

HNSW constructs a hierarchy of proximity graphs through incremental insertion, graph search, and diversity-based neighbor selection [12]. Subsequent work reduces graph construction cost through hardware and algorithmic improvements. CAGRA develops highly parallel graph construction and search for GPUs [13], while Flash uses compact vector codes to accelerate distance comparisons on modern CPUs [17]. Yang et al. revisit proximity-graph construction and introduce a construction framework with a new pruning strategy [18].

These approaches improve the construction process over supplied vectors. Our work examines an additional source of savings when an index already exists for another representation of the same objects: transferring suitable graph connections and concentrating searches on affected vertices.

Dynamic vector indexes.

Dynamic ANN methods maintain search structures as vectors arrive or are removed. GTI combines a tree with a lightweight graph to support efficient insertions and deletions [11]. Wolverine repairs monotonic search paths disrupted by deletions [10], and Greator localizes small-batch updates to reduce graph-maintenance I/O and redundant neighbor pruning [21]. CONDA uses connectivity-aware pruning, bidirectional link reinforcement, and lazy deletion to preserve search quality under continuous updates [9]. OdinANN directly inserts vectors into an on-disk graph to stabilize search performance during ingestion [5]. These methods share our interest in reusing an existing graph and repairing its connections. The migration setting introduces a different reuse decision: the object identifiers remain fixed, but a model change replaces the entire collection’s representations and can change their dimensionality. Processing these changes as individual deletions and insertions does not itself identify which source connections remain useful under target-space distances. Our screening rule makes this decision using paired local distance profiles before a target index is available.

Embedding compatibility and model upgrades.

Compatible representation learning addresses model changes at the representation level. Continual variants align new and historical gallery features [3], cross-modal variants project embeddings into legacy spaces [7], Drift-Adapter maps new queries into the old space [14], and Embedding-Converter converts embeddings between models [19]. Our setting assumes that target vectors are already available and addresses index construction under target-space distances. Representation conversion and index migration thus address different stages of a model upgrade.

Cross-model graph index migration

Gu et al. [4] studied the same index migration task and proposed the two DGM variants evaluated here. DGM-Local expands inherited neighborhoods to generate candidates for each vertex, then evaluates and prunes them in the target space. DGM-Search uses hop-bounded beam traversal to discover candidates for each vertex. By contrast, STARR compares standardized edge lengths across the two embedding spaces and uses the correlation of the paired profiles to set the retention threshold. A vertex enters the repair set if screening rejects any of its outgoing edges or if it has an empty list at an occupied layer. This confines reconnection searches to the flagged vertices, while candidate sharing can also update nearby vertices outside the repair set.

Conclusion

Useful neighborhood structure can survive an embedding-model change and reduce the cost of constructing the target index. STARR identifies reusable edges through standardized distance profiles and repairs affected neighborhoods to obtain a reachable HNSW graph. Experiments show substantial construction savings across model transitions, with recall close to that of Fresh in many cases. The parameter sweeps show that migration quality depends on the model pair and repair budget. Stricter screening and wider repair search can improve recall on difficult transitions at additional cost. Future work will focus on improving the navigability of migrated graphs and extending reuse and repair to other graph-based indexes.

References

  1. [1]I. Azizi, K. Echihabi, and T. Palpanas, “Graph-based vector search: An experimental evaluation of the state-of-the-art,” Proceedings of the ACM on Management of Data, vol. 3, no. 1, 2025, art. no. 43, 31 pages. [Online]. Available: https://doi.org/10.1145/3709693
  2. [2]P. Bajaj et al., “MS MARCO: A human generated Machine reading Comprehension dataset,” 2016, arXiv:1611.09268. [Online]. Available: https://arxiv.org/abs/1611.09268
  3. [3]Z. Cui, J. Zhou, X. Wang, M. Zhu, and Y. Peng, “Learning continual compatible representation for re-indexing free lifelong person re-identification,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2024, pp. 16614–16623. [Online]. Available: https://openaccess.thecvf.com/content/CVPR2024/html/Cui_Learning_Continual_Compatible_Representation_for_Re-indexing_Free_Lifelong_Person_Re-identification_CVPR_2024_paper.htmlDOI
  4. [4]B. Gu, X. Zhong, J. Jin, P. Cheng, W. Ni, H. Li, J. Song, and H. T. Shen, “Exploiting residual reachability for cross-model migration of graph-based indexes in approximate nearest neighbor search,” arXiv preprint arXiv:2609.23036, 2026.
  5. [5]H. Guo and Y. Lu, “OdinANN: Direct insert for consistently stable performance in billion-scale graph-based vector search,” in 24th USENIX Conference on File and Storage Technologies (FAST 26), 2026, pp. 133–147. [Online]. Available: https://www.usenix.org/conference/fast26/presentation/guo
  6. [6]M. Huh, B. Cheung, T. Wang, and P. Isola, “Position: The Platonic representation hypothesis,” in Proceedings of the 41st International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, vol. 235, 2024, pp. 20 617–20 642. [Online]. Available: https://proceedings.mlr.press/v235/huh24a.htmlarxiv.org/abs/2405.07987
  7. [7]Y. K. Jang and S.-N. Lim, “Towards cross-modal backward-compatible representation learning for vision-language models,” in Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2025, pp. 1783–1792. [Online]. Available: https://openaccess.thecvf.com/content/ICCV2025/html/Jang_Towards_Cross-modal_Backward-compatible_Representation_Learning_for_Vision-Language_Models_ICCV_2025_paper.htmlarxiv.org/abs/2405.14715
  8. [8]H. Jin, J. Lee, S. Piao, S. Seo, and S. Park, “PRO-HNSW: Proactive repair and optimization for high-performance dynamic HNSW indexes,” in 42nd IEEE International Conference on Data Engineering (ICDE 2026), 2026. [Online]. Available: https://icde2026.github.io/accepted-papers.htmlDOI
  9. [9]D. Lee and M.-S. Kim, “CONDA: A connectivity-aware dynamic index for approximate nearest neighbor search over evolving data,” Proceedings of the VLDB Endowment, vol. 19, no. 11, pp. 3357–3370, 2026. [Online]. Available: https://doi.org/10.14778/3836663.3836694
  10. [10]D. Liu, B. Zheng, Z. Yue, F. Ruan, X. Zhou, and C. S. Jensen, “Wolverine: Highly efficient monotonic search path repair for graph-based ANN index updates,” Proceedings of the VLDB Endowment, vol. 18, no. 7, pp. 2268–2280, 2025. [Online]. Available: https://doi.org/10.14778/3734839.3734860
  11. [11]R. Ma, Y. Zhu, B. Zheng, L. Chen, C. Ge, and Y. Gao, “GTI: Graph-based tree index with logarithm updates for nearest neighbor search in high-dimensional spaces,” Proceedings of the VLDB Endowment, vol. 18, no. 4, pp. 986–999, 2024. [Online]. Available: https://doi.org/10.14778/3717755.3717760
  12. [12]Y. A. Malkov and D. A. Yashunin, “Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs,” 2018, arXiv:1603.09320, version 4. [Online]. Available: https://arxiv.org/abs/1603.09320
  13. [13]H. Ootomo, A. Naruse, C. Nolet, R. Wang, T. Feher, and Y. Wang, “CAGRA: Highly parallel graph construction and approximate nearest neighbor search for GPUs,” in 2024 IEEE 40th International Conference on Data Engineering (ICDE), 2024, pp. 4236–4247. [Online]. Available: https://doi.org/10.1109/ICDE60146.2024.00233
  14. [14]H. Vejendla, “Drift-Adapter: A practical approach to near zero-downtime embedding model upgrades in vector databases,” in Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, 2025, pp. 15 938–15 949. [Online]. Available: https://doi.org/10.18653/v1/2025.emnlp-main.805
  15. [15]S. Voruganti and M. T. Özsu, “MIRAGE-ANNS: Mixed approach graph-based indexing for approximate nearest neighbor search,” Proceedings of the ACM on Management of Data, vol. 3, no. 3, 2025, art. no. 188, 27 pages. [Online]. Available: https://doi.org/10.1145/3725325
  16. [16]L. Wang, N. Yang, X. Huang, L. Yang, R. Majumder, and F. Wei, “Improving text embeddings with large language models,” in Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2024, pp. 11 897–11 916. [Online]. Available: https://doi.org/10.18653/v1/2024.acl-long.642
  17. [17]M. Wang, H. Wu, X. Ke, Y. Gao, Y. Zhu, and W. Zhou, “Accelerating graph indexing for ANNS on modern CPUs,” Proceedings of the ACM on Management of Data, vol. 3, no. 3, 2025, art. no. 123, 29 pages. [Online]. Available: https://doi.org/10.1145/3725250
  18. [18]S. Yang, J. Xie, Y. Liu, J. X. Yu, X. Gao, Q. Wang, Y. Peng, and J. Cui, “Revisiting the index construction of proximity graph-based approximate nearest neighbor search,” Proceedings of the VLDB Endowment, vol. 18, no. 6, pp. 1825–1838, 2025. [Online]. Available: https://doi.org/10.14778/3725688.3725709
  19. [19]J. Yoon and S. O. Arik, “Embedding-Converter: A unified framework for cross-model embedding transformation,” in Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2025, pp. 25 464–25 482. [Online]. Available: https://doi.org/10.18653/v1/2025.acl-long.1237
  20. [20]J. Yoon, R. Sinha, S. O. Arik, and T. Pfister, “Matryoshka-Adaptor: Unsupervised and supervised tuning for smaller embedding dimensions,” in Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, 2024, pp. 10 318–10 336. [Online]. Available: https://doi.org/10.18653/v1/2024.emnlp-main.576
  21. [21]S. Yu, S. Lin, S. Gong, Y. Xie, R. Liu, Y. Zhou, J. Sun, Y. Zhang, G. Li, and G. Yu, “A topology-aware localized update strategy for graph-based ANN index,” Proceedings of the VLDB Endowment, vol. 19, no. 3, pp. 495–508, 2025. [Online]. Available: https://doi.org/10.14778/3778092.3778108
  22. [22]Z. Zhang, Z. Liao, H. Yu, P. Di, and R. Wang, “ML-Embed: Inclusive and efficient embeddings for a multilingual world,” in Proceedings of the 43rd International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, vol. 306, 2026, pp. 157 026–157 063. [Online]. Available: https://proceedings.mlr.press/v306/zhang26dh.htmlarxiv.org/abs/2605.15081
  23. [23]C. Zhu and H. Ma, “STARR GitHub repository,” 2026. [Online]. Available: https://github.com/QuintAnt/STARR

Paper details

vlnc:W_a7z57wcr
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 7

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents