Verification Bounds That Survive Streaming Deletes

Exact nearest-neighbor search over large collections of time series (and similar vector data) finds the right answer quickly and then spends most of its time proving it. Progressive search studies report that the exact match usually turns up within the first few leaf visits, and that the remaining 70–90% of the search goes to confirming that no unvisited part of the index holds anything closer (Data Series Progressive Similarity Search with Probabilistic Quality Guarantees, ProS). The cost of that proof depends almost entirely on how tight the index's per-partition distance lower bounds are. The indexes with the tightest bounds share two limits. They are data-adaptive trees, and they are built statically. LeaFi, which learns tighter bounds, says outright that supporting insertions is future work (LeaFi). Streaming workloads with both inserts and deletes are therefore stuck. They can rebuild often, fall back to a full scan, or accept loose bounds and pay heavily at verification time.

This note proposes an index for that setting, organized around a restriction taken from data-structure theory. Every update touches memory cells whose addresses depend only on the incoming point, not on what the index currently contains. We call such updates non-adaptive. Each cell's summary is also changed by a "memoryless" rule, meaning its new value depends only on its old value and the update. The key observation is that a lower bound built from per-cell running minima and maxima stays correct under deletions; it only becomes looser. Queries therefore never wait for maintenance. The research question is how much verification cost this restriction adds, and where that cost comes from. We split the cost into two parts: the partition is frozen rather than data-adaptive, and deletions leave bounds stale. We then test whether a small amount of background re-tightening closes the gap to rebuilt adaptive indexes at a fraction of the update cost.

Core Claim

Treat exact k-nearest-neighbor search as a two-round procedure. The first round has fixed addresses: it reads a contiguous array of per-cell summaries and the query's own cell, which yields a best-so-far distance $d$. The second round fetches, in one parallel batch, every cell whose lower bound falls below $d$. Verification cost is then exactly

$$V(q) = \big|\{c : \mathrm{LB}_c(q) < d^*(q)\}\big|,$$

the number of cells $c$ whose lower bound $\mathrm{LB}_c(q)$ for query $q$ is smaller than the true k-th nearest-neighbor distance $d^*(q)$. The quantity $V(q)$ is determined by the bounds alone, and the bounds are set by the update rule.

The structure has three parts. Cell addresses come from a quantization of the series summary that is chosen from a data sample at initialization and then frozen. This is allowed under the non-adaptive definition, because addresses may depend on preprocessing and initial randomness. Each cell stores a count and per-segment min/max envelopes, and insertions update the envelopes with max/min, which is memoryless. Deletions only decrement the count and tombstone the raw series. Because an envelope only ever widens, it remains a valid bound, and queries never pay a "flush" before answering.

We claim that, on the standard data-series benchmarks under sliding-window workloads, this design keeps most of the pruning of statically built adaptive indexes. We further claim that the loss splits cleanly into a partition term and a staleness term, and that a background re-sealing policy triggered by deletions can drive the staleness term close to zero.

How This Relates to Prior Work

The theory papers constrain the design more than they supply methods. Larsen, Nelson and Nguyen prove that non-adaptive turnstile sketches, which are small-space summaries under increments and decrements, need update time around $\log n / \log(eS/t_u)$ for point and norm queries (Time lower bounds for nonadaptive turnstile streaming algorithms). Brody and Larsen show polynomial lower bounds for non-adaptive and memoryless dynamic structures on indexing and set disjointness (Adapt or Die). Neither result rules out our design, because we store the raw data and only the bounding summaries are memoryless. They do warn that memoryless structures can be hopeless for some query types. Whether nearest-neighbor verification falls in the easy regime is therefore an empirical question, and we test it rather than assume it.

The dictionary work of Larsen, Pagh, Persiano, Pitassi, Yeo and Zamir (Optimal Non-Adaptive Cell Probe Dictionaries and Hashing) motivates the hardware argument: fixed addresses let all probes go out in one parallel round. Alman and Yu (Faster Update Time for Turnstile Streaming Algorithms) break the non-adaptive barrier with batched, state-dependent updates, but queries must first flush the batch, at an additive $O(\log^{1.582} n)$ cost. Our background re-sealing is also controlled adaptivity. The difference is that stale envelopes are still sound bounds, so re-sealing sits off the query path instead of before it.

On the verification side, Hercules (Hercules Against Data Series Similarity Search) is the closest relative. It already switches to a skip-sequential scan when pruning is weak, which resembles our second round. It is, however, a statically built tree with data-adaptive splits, and it supports neither deletions nor turnstile updates. DumpyOS (DumpyOS) packs leaves for I/O efficiency and targets approximate accuracy. LeaFi tightens bounds with learned per-leaf models, but only statically and under a memory budget.

Research Program

We will build the index in C++ on the storage and vectorized-distance code paths used by the data-series baselines, and study three questions.

The first question is how much the frozen partition costs. We will compare frozen-grid cells whose envelopes are recomputed exactly against a data-adaptive EAPCA tree (the piecewise-constant summaries with per-node variance that DSTree and Hercules use), with the cell count matched. This isolates the partition term of the loss.

The second question is how much staleness costs, and how fast it grows with the fraction of deleted points. For each cell we will measure the envelope's excess width over the true envelope of the live points. We will then relate the growth of $V(q)$ to the deletion rate under sliding-window workloads with window sizes from 10% to 100% of the collection.

The third question is what the cheapest re-sealing policy is. A cell is re-sealed, meaning its envelope is recomputed from live points, once its deletion counter passes a threshold $\tau$. We will sweep $\tau$ and report the Pareto curve of update throughput against verification cost. We will also study distribution drift: when the frozen grid falls out of date, cell occupancy becomes skewed, and we will measure when a full re-partition becomes necessary.

A modest analytic piece accompanies the experiments. It gives a cost model for $V(q)$ in terms of envelope excess width, from which the re-sealing threshold can be predicted. This is a design tool, not a new lower bound.

Baselines

The naive reference is a parallel sequential scan with tombstoned deletes (PSCAN as used in Hercules). Its updates are trivially cheap and it verifies by reading everything. Our index must beat it on query latency at every deletion rate while staying within a small constant factor of its update throughput.

The strongest existing exact method is Hercules. The comparison will be fair: it runs on the same machine, thread count, and memory budget, and it is rebuilt periodically over the live window, with the rebuild cost charged to the update stream. On static workloads Hercules reports being "1.3x to 9.4x faster than the best existing competitors (DSTree* and ParIS+)". No reported result was found on Lacuna for Hercules, or any data-series index, under streaming deletions, so we establish that number ourselves. Beating Hercules means lower total cost per unit of work (update cost plus query cost) at a matched exact answer, for update-to-query ratios above some crossover that we report. On purely static workloads we expect to lose modestly and will report by how much.

For bound tightness we will run LeaFi statically as a ceiling. It reports that traditional bounds pruned "only 23% of nodes" on Astro, against 90% with learned filters, and up to a 32x speedup. We do not expect to match that. The point is to locate our pruning ratio between those two figures.

The ablation that isolates the key ingredient keeps the frozen grid but re-seals synchronously on every delete, so envelopes are always exact. Comparing it with the lazy version measures exactly what memorylessness costs and saves.

Why not just…?

Why not just rebuild Hercules or DSTree in batches, LSM-style? This is the real threat. If rebuild cost amortizes well, a log-structured stack of static adaptive indexes may dominate. Our experiments settle it by sweeping the update-to-query ratio and the window size. We will say plainly if the crossover lies at impractically high update rates. We also expect a merged stack to pay extra verification, because each level must be checked, and we measure that directly through $V(q)$.

Why not just stop early with probabilistic guarantees, as ProS does? ProS reports time savings "up to 95%" with 95% confidence that error stays below 1%, but it gives up exactness, and the file notes that it degrades when bounds are loose. Our target is workloads that need exact answers. A probabilistic stopping rule can also be layered on top of our second round, and we will report that combination.

Why not just scan? Scanning suits update-heavy workloads, but Hercules shows scans losing to good indexes at scale, and LeaFi shows pruning worth an order of magnitude. The naive baseline above measures where scanning wins.

Proposed Experiments

We will use Seismic (100M series), SALD (200M), Deep (267M descriptors), Astro, and Rand random walks at 10M–100M. Each is replayed as a sliding-window stream of inserts and deletes, because the file lists no dynamic benchmark. Metrics are exact 10-NN query latency, the fraction of query time spent on verification, pruning ratio and $V(q)$, update throughput, and memory.

Three checks are decisive. The first is whether the lazy-envelope index keeps a pruning ratio within a small margin of the exactly re-sealed ablation at deletion fractions up to 50%. The second is whether the partition term or the staleness term dominates the gap to Hercules. If the partition term dominates, the non-adaptive constraint is the real cost, and learned or re-partitioned grids become the next step. The third is the crossover update-to-query ratio at which total cost beats periodically rebuilt Hercules. If no such ratio exists at realistic update rates, the proposal fails, and we will report that outcome.