arXiv:2610.38404cs.DBOct 2026

Manuscript Offprint

arXiv:2610.38404

CoWalk: Cooperative Walks for Agentic Batch Queries on Disk-Resident Graphs

Qiao Liang, Zhiguang Chen, Yue Yu, Nong Xiao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Workloads such as query rewriting, deep research and group-relative policy optimization (GRPO) issue batches of semantically related vector queries. Existing disk-resident approximate nearest neighbor (ANN) systems process these queries independently. On three workloads, 31 to 67 percent of the I/Os of a batch fetch a page that another query of the batch has already fetched. A page cache shared by the batch removes these I/Os, yet it makes a single-thread search only 1.1 to 1.2× faster, because the search time goes to distance computation and the cache does not change the walk of any query. We present CoWalk, which runs the queries of a batch as cooperating walks on one thread. Every query keeps its own candidate list, a page is read once per batch, and the full-precision vector on every fetched page is ranked by every query of the batch. A query therefore reaches the target recall with a shorter candidate list, which computes fewer distances and issues fewer I/Os. At recall@10 of 0.95, CoWalk answers a batch on one thread 1.6 to 1.9× faster than the fastest per-query baseline and issues 2.8 to 6.9× fewer I/Os. On a server it serves 3.0 to 6.9× the throughput of that baseline at a similar batch latency.

1 Introduction

Modern LLM agents now issue batches of semantically related vector queries. Query rewriting sends N paraphrases of a question in parallel [17, 32] (Figure 1). Deep-research agents decompose a task into concurrent retrieval sub-tasks.

Anthropic’s Research system spins up 3–5 subagents in parallel and the subagents use 3+ tools in parallel [2], and ParallelSearch [37] trains the agent with RL to decompose a question and issue the sub-queries concurrently. Post-training algorithms such as GRPO [28], applied to search agents [12], sample multiple rollouts from the same prompt and produce semantically related searches. HQI [20] reports that Apple’s vector search workloads often need to be processed in a batch setting.

In all of these patterns the batch members come from one intent and share semantic substance. We measure this on three workloads, deep research (OpenResearcher [16]), conversational Q&A (QuAC+CANARD [5, 7]), and narrative reading comprehension (NarrativeQA [15]). Figure 2 shows that mean intra-batch cosine distance on these workloads is 2.4×2.4\times, 2.1×2.1\times, and 1.3×1.3\times tighter than random query pairs respectively.

Existing disk-resident ANN systems process every query on its own. Queries that are close search the same part of the index, so a batch reads the same data from SSD again and again. With per-query PipeANN [11] at recall@10 of 0.95, 67%, 31%, and 38% of the I/Os of a batch on the three workloads fetch a page that a batch-mate already fetched (Sec. 2.3). A cluster-based index such as SPANN [4] repeats 27% to 68% of its cluster I/Os on the same batches.

A cluster index knows its clusters before the first I/O and could deduplicate them across the batch, but it reads every full-precision vector of a cluster it probes. A graph index reads one node at a time and selects it by a compressed distance held in memory. Even if every query stops as early as the ground truth allows and the batch removes every

Figure

Figure 1. An LLM rewriter expands one user intent into a batch of paraphrased queries that cluster within a small region of embedding space (OpenResearcher trajectory 38476, B=8).

Figure

Figure 2. Pairwise cosine distance between queries of the same batch and between random query pairs.

repeated cluster, a cluster index reads 5.0 to 7.2× the data that per-query PipeANN reads without any deduplication (Sec. 2.4). We therefore build on a graph index.

On a graph index the direct fix is a page cache shared by the batch. We build this baseline and call it GLRU. It removes nearly all repeated I/Os, yet on one thread it is only 1.1 to 1.2× faster than PipeANN (Sec. 2.5). On one thread a search spends its time computing PQ and exact distances, because with up to 32 I/Os in flight per query its I/Os complete while it computes. A cache removes I/Os but leaves the computation unchanged. A cached page serves only the queries whose walks ask for it, although the full-precision vector on it is a candidate result for every batch-mate. When every query walks with a short candidate list, 29 to 48% of the true neighbors that its own walk misses lie on pages that a batch-mate read. GLRU never ranks these pages for that query, so it needs the same candidate list length LL as PipeANN and computes as much.

We present CoWalk, which runs the BB queries of a batch as cooperating walks on one thread (Sec. 3). Every query keeps its own candidate list and selects its own next nodes, as a per-query search does. The walks cooperate in three ways. A page is read once per batch. When a page arrives, CoWalk computes the exact distance from its node to every query of the batch, and at the end every query ranks all nodes the batch read. A query therefore reaches the target recall with a smaller candidate list, fewer I/Os, and less computation. A single PipeANN query with 4 I/Os in flight waits for I/Os 54 to 73% of its time. One CoWalk thread keeps the I/Os of all BB walks in flight and processes whichever page completes first, so 4 I/Os in flight per query keep it computing. CoWalk does not share graph neighbors across queries. PQ-scoring a fetched node's neighbors for the whole batch makes a batch 1.3 to 2.4× slower on one thread (Sec. 5.3).

We evaluate CoWalk on the three workloads against PipeANN and GLRU. On one thread at recall@10 of 0.95, CoWalk answers a batch 1.9×, 1.8×, and 1.6× faster than PipeANN and 1.8×, 1.8×, and 1.6× faster than GLRU. It issues 2.8 to 6.9× fewer I/Os than PipeANN. On a server, with every system at its knee thread count and each CoWalk batch on several threads, CoWalk serves 3.0 to 6.9× its throughput

and 2.0 to 3.0× its queries per dollar while keeping the batch latency at 0.74 to 1.08× that of PipeANN.

Contributions. This paper makes four contributions.

  • We characterize agent batch retrieval on three workloads. We quantify the intra-batch similarity and the repeated I/Os it causes on both graph and cluster disk indexes, and we show why a graph index is the better base for batches (Sec. 2).
  • We show that a batch-scoped page cache removes the repeated I/Os but leaves most of the latency, and we identify what it leaves unused (Sec. 2.5).
  • We design CoWalk, which runs a batch as cooperating walks on one thread that share pages and exact distances while every query keeps its own candidate list (Sec. 3).
  • We evaluate CoWalk on three workloads, reaching 1.6 to 1.9× lower latency than PipeANN at recall 0.95, and we measure how much each form of cooperation and each rejected design alternative contributes (Sec. 5).

The source code of CoWalk is available at https://github.com/OhhhhPi/SWARM.

References (12)