Manuscript Offprint
arXiv:2610.17431VeriRouter: Towards Verifiable LLM Routing
Abstract
Large language model (LLM) routers are increasingly deployed to optimize quality, latency, and cost through dynamic model selection and request rewriting. However, a compromised router can cause ineligible selection on the control plane, unendorsed rewriting or unfaithful relay on the data plane, undermining LLM routing integrity. We present VERIROUTER, a verifiable LLM routing framework. Under an endorsed public context binding a private semantic index and rewrite banks, VERIROUTER combines ZK proofs with a provider-issued serving certificate to establish integrity across both planes while keeping the router's private routing assets hidden from clients. For model selection, we design an efficient ZK proof for semantic search. For rewriting, local checks enforce message preservation and additions from committed banks. On real-world workloads, VERIROUTER's model-selection and rewrite proofs average 21.92 s and 4.24 s, yielding and speedups over the fastest completing baselines. Relative to serving without verification, VERIROUTER adds only 4.08 s under per-turn selection and 0.11 s under session-pinned selection.
1 Introduction
LLM routing service. As large language models (LLMs) become more capable but increasingly heterogeneous in quality, latency, and cost, LLM routing services have seen growing adoption [7, 25, 27, 42, 58, 68, 72, 74, 81]. These platforms provide a unified interface to multiple models and select different models for different queries [2, 32, 71, 82]. They offer broader model availability through a single API [58, 72, 74, 81], reduce cost by matching model capability to query difficulty [7, 25, 27, 42, 68], and support practical features such as prompt optimization [67, 80]. OpenRouter, one of the largest LLM routing platforms, reports over 300T monthly tokens, more than 10M users, and over 500 models [72], illustrating the broad real-world adoption of LLM routing.
Router workflow. An LLM routing service involves clients C, an LLM router R, and external model providers P offer-

Figure 1: LLM routing workflow and integrity risks. The router R selects a model on the control plane, then rewrites and forwards the request and relays the response on the data plane. An untrusted router can cause ineligible selection, unendorsed rewrite, or unfaithful relay.
ing a pool of LLM models. As shown in Fig. 1, R mediates three steps. ① Model selection. On the control plane, it selects an eligible model, often through semantic search on its semantic index. ② Request rewriting. On the data plane, it forms the model-received request, possibly adding endorsed router-supplied content such as hidden system instructions or provider-specific formatting, and forwards it to the selected model's provider. ③ Response relay. The provider returns a response, which R relays to C on the data plane.
Integrity without disclosure. The same architecture that makes routing useful, however, also makes it opaque. Because the semantic index and router-supplied content are private, the router hides its model-selection and request-rewriting processes from clients. This allows a compromised router to deviate at each step in Fig. 1. ① Ineligible selection. On the control plane, it can route the illustrated medical request to an ineligible cheaper model while claiming specialist service. ② Unendorsed rewrite. Before inference on the data plane, it can remove a client directive or insert unendorsed instructions or other content, analogous to deployment-side prompt injection [21, 55–57, 87]. ③ Unfaithful relay. After inference, it can alter the response or attribute a cheaper model’s output to a premium model [18, 104]. A client receiving a problematic response cannot tell whether it reflects router misconduct or the serving model’s ordinary behavior or limitations. This uncertainty weakens reputational deterrence and lets a paid router reduce upstream costs while charging for the advertised service or favor affiliated models or sponsored content.
Limitations of existing approaches. A provider-issued serving certificate [15, 23] can address unfaithful relay by binding a response to the provider. However, it cannot establish selected-model eligibility or endorsed rewriting. Verifying these two properties without revealing the router's private data to the client calls for zero-knowledge (ZK) proofs. Recent advances have substantially improved general-purpose ZK proofs [10, 28, 30, 37], but directly proving routing execution remains too expensive. For semantic-search selection, the proof must certify its data-dependent traversal over a private semantic index. In our baselines, SP1 [89], the SOTA general-purpose zero-knowledge virtual machine (zkVM), takes 228.2–706.8 min, while the generic implementation by Jolt [4] and direct Plonky2 [101] exhaust 256 GiB of memory even at the smallest evaluated search-trace size. Request rewriting poses a separate challenge: its proof relation must cover common rewrites while hiding router-supplied content. Even after fixing this relation, proving the full request-assembly, hashing, and bank-lookup program takes 4.9–8.3 min in Jolt and 13.7–20.2 min in SP1. These costs are prohibitive for online routing.
Our building blocks: ZK data structures. Our starting point is that the major cost of proving LLM routing comes not from the search logic but from the mutable data structure it runs on. The search maintains a priority queue, and a general-purpose prover certifies it by replaying every operation along with the queue state it produces, so the circuit carries the entire history of a structure the verifier never needs to see. We observe that the queue state is more than the verifier needs: what must be established is only that the claimed sequence of removals is the one a valid queue would have produced. A trace of insertions and removals, together with a claimed final content, describes a valid priority queue if and only if 1) every inserted item is accounted for exactly once, 2) each item is removed only while it outranks everything then present, and 3) the final content is ordered by priority (Thm. 2). The first condition is a multiset equality and the third a local comparison; the second is the only global one, and we discharge it by observing that it is exactly the condition a monotone stack certifies. We therefore develop ZK checkers for both structures, each with constraint count linear in the trace length. On a 100K-operation trace, our checker takes 65.70 s versus SP1's 56.9 min, a 52.0× speedup.
VERIROUTER framework. Building on these ZK data structures, we present VERIROUTER, an extremely practical framework for verifiable LLM routing under an endorsed public context binding a committed semantic index and rewrite banks. In this context, it combines ZK proofs with a serving certificate, to establish integrity across both planes while keeping the committed index and rewrite-bank contents private from the client. ① For the control plane, we design a ZK proof for HNSW-based semantic search that establishes selected-model eligibility. ② For the data plane, the ZK rewrite proof preserves client messages and permits additions only from the context-bound banks and at allowed positions. ③ The provider-issued serving certificate authenticates the request processed by the selected model's provider and the response it returned, establishing faithful relay. In the end, the client checks the proofs together with the serving certificate, addressing the three deviations shown in Fig. 1.
Theorem 1 (Informal). Under standard security assumptions for cryptographic primitives, assuming a complete, knowledge-sound, and zero-knowledge argument system and honest, non-colluding model providers, VERIROUTER is a verifiable routing protocol in the sense of Def. 1: every supported honest serving event is accepted, and whenever a client accepts, the selected model is eligible under the applicable model-selection mode, the model received an endorsed rewrite of the client's request, and the response is that model's output on it. The cryptographic evidence reveals no additional information about the router's private data.
Evaluation. We evaluate VERIROUTER on real-world RouteLLM [68] and MT-Bench-101 multi-turn conversations [5]. Model-selection and rewrite proofs take 21.92 s and 4.24 s on average, yielding and speedups over the fastest completing general-purpose zkVM baseline. Serving certificates require only 3.84 ms on average. Compared with LLM routing without verification, the stronger per-turn selection mode adds 4.08 s (14.24%), while session-pinned selection amortizes one proof across the conversation and adds only 0.11 s (0.38%) per turn. It also scales to 10M-node semantic search graphs and 16K-capacity rewrite banks while keeping final proofs near 0.15 MiB.
• We present VERIROUTER, an extremely practical verifiable LLM routing framework that uses efficient ZK proofs and a serving certificate to establish integrity across planes while keeping the committed specifications private from clients.
• We offer ZK proofs for priority queues and monotone stacks. Both primitives are of independent interest given their widespread use across graph algorithms, scheduling, and stream processing.
• We implement and evaluate VERIROUTER on real-world workloads, showing practical proving costs (21.92 s for selection; 4.24 s for rewriting), low end-to-end overhead (4.08 s per-turn; 0.11 s session-pinned), and scalability to 10M-node graphs and 16K-entry rewrite banks.
2 Background
2.1 LLM Routing System
An LLM routing system comprises a client C, an LLM router R, and external model providers P that make a model pool M available [27, 42, 68, 84]. We focus on third-party routing deployments in which R operates independently of C and P.
Each model is offered by a provider . For a serving event, sends its request to , which selects a model under its model-selection strategy and may transform the request into a model-received request before forwarding it to . The provider performs inference and returns a response , which relays to .
Request API. At each interaction step, the client submits the current conversation to the router. We write the client request as , where is its message count and each chat message is .
Model-selection strategy. A router applies a model-selection strategy to choose which model serves each request. A common strategy uses semantic search: it embeds a client request and applies approximate-nearest-neighbor (ANN) search [45] to retrieve similar reference queries from a semantic index. The models associated with the retrieved references form the eligible model set. Hierarchical Navigable Small World (HNSW) [63] is a widely used ANN method (Appendix A.1). Formally, given an embedding encoder Encoder, a semantic index is with reference nodes. For each reference node , let denote its reference query. The reference table stores a reference vector derived deterministically from Encoder( ) and its associated model identifier mid( ). The graph table contains rows for the HNSW layers. For a client request , let and let score( ) denote the deterministic similarity score. The HNSW search over returns reference indices . Their associated models form the eligible set .
A fresh model-selection turn runs this semantic search and selects a model . Some routers further apply a learned selector within this set [68, 84]. In this work, we focus on the semantic search that defines model eligibility; an additional learned selector, when present, operates within the eligible set and can be verified separately [20, 79, 90, 98].
We consider two real-world selection regimes. Under per-turn model selection, every turn performs a fresh selection. Under session-pinned model selection, only the initial turn is fresh; subsequent turns reuse the accepted model . We represent the current turn by mode , as determined by the client-chosen selection regime. The selected serving model must satisfy
Request rewriting. In the simple case, . In practice, routers can add private router-supplied content, such as system messages, serialized tool specifications, and retrieval passages [67, 75, 80]. The rewrite relation T defines the permitted model-received requests, so . The router may select different content for each request from private rewrite banks, meaning banks of router-supplied content.
2.2 Digital Signature
A digital signature scheme allows a signer to authenticate a message in a publicly verifiable manner [64]. Under standard unforgeability, a valid signature lets a verifier detect modification of the signed message and attribute the signature to the holder of the secret key corresponding to the verification key [76]. A signature scheme is:
-
: key generation process that outputs secret/public key pair for security parameter .
-
: hash-then-sign digest of message , where is a cryptographic hash function that compresses the message into a fixed-length representation.
-
: signing process that generates a signature on digest under the secret key .
-
Verify : verification process that checks whether is a valid signature on digest under .
2.3 Zero-Knowledge Proofs
A zero-knowledge proof (ZKP) [8, 24, 34] lets a prover convince a verifier that a statement is true without revealing the private witness. Recent advances have made such proofs practical for general computations [3, 9, 10, 13, 28, 30, 33, 37, 38, 41, 43, 49, 61, 62, 73, 85, 94, 102], providing succinct proofs and efficient verification. VERIROUTER uses a non-interactive ZK argument system satisfying completeness, knowledge soundness, and zero knowledge. A circuit C checks whether a public input x and private witness w satisfy . The prover sends a single proof that a verifier can check without further interaction. The proving and verification interface is:
• generates a proof .
• ZKVerify(C; x; ) {accept, reject} verifies .
Lookup table and multiset equality. VERIROUTER builds on two well-studied and optimized ZK arguments: lookup (LUT) [29, 100] and multiset equality (MSetEq) [6, 26]:
-
LUT: given a witness query and a table over domain , the circuit LUT checks . The table can be public or private and bound by a public commitment. We use the standard batched form for multiple queries.
-
MSetEq: given two input sequences s and over domain S, the circuit MSetEq checks , where denotes equality as multisets.
Commit-and-prove. Commit-and-prove is a common ZK paradigm for proving relations over committed private val-ues [19]. The prover first publishes for private and fresh randomness , then proves that satisfies a relation without revealing it. The commitment hides and binds proofs to that value. VERIROUTER uses this computationally hiding and binding commitment scheme (Appendix A.2.3).
Recursive composition. Recursive composition lets an outer circuit verify independently generated subproofs, while hiding them from the final verifier [14, 17, 88, 101]. VERIROUTER generates the subproofs in parallel and aggregates them into the corresponding outer model-selection or rewrite proof.
3 Threat Model and Security Goals
Threat Model. The threat model comprises the client C, router R, and model providers P introduced in Sec. 2.1.
Router R. The LLM router R may be malicious and deviate arbitrarily during model selection, request rewriting, and response relay. Specifically, it may select an ineligible model on the control plane, or perform an unendorsed rewrite or unfaithful relay on the data plane, as introduced in Sec. 1. The router has two private assets: a semantic index I that determines model eligibility, and private rewrite banks underlying the rewrite relation T. A malicious router may thereby reduce upstream costs while charging for the advertised service, favor affiliated models, or insert sponsored content.
Client C. The client C is honest-but-curious. It follows the protocol but may try to reconstruct the router's semantic index and infer router-supplied content used in request rewriting.
Model providers P. Providers in P are independent and honest, but otherwise passive. They faithfully process the requests they receive and participate only through lightweight key registration and response signing to protect accurate model attribution and their reputation [15, 23, 36, 69, 104]. Sec. 6.3 confirms that this per-event participation is lightweight.
Assumption. We assume that the providers in P do not collude with R and that router-provider communication is authenticated and confidential. This setting captures third-party routing platforms that mediate between clients and independently operated model providers [58, 72, 74, 81].
Serving and Verification Workflow. We now formalize one routing event from context establishment to client verification, including the public context, workflow, public and private data, and the system-integrity condition.
Context. Before serving, R publishes values that bind it to its private semantic index I and the private rewrite banks underlying T without revealing them, and each provider publishes the verification key under which it signs responses. These values, together with the public parameters of the selection and rewrite specifications, form the public context ctx. An independent auditor with access to the private specifications reviews them offline and endorses ctx [83]. The client C obtains ctx over an authenticated channel, checks the endorsement, and verifies every subsequent response under it. Whether a specification constitutes an acceptable policy, and how an auditor establishes that, is orthogonal to the verification problem we study. Appendix A.6 discusses the mechanism. Sec. 5.1 instantiates ctx with commitments and a key registry.
Workflow. At session setup, C chooses per-turn or session-pinned selection, which determines mode for each turn. For each request , C samples a fresh rid and sends to R. R selects M, constructs , forwards to , and returns with serving evidence to C. C accepts only if the evidence is bound to rid and establishes the system-integrity condition below.
Public and private data. The public data comprise ctx and the public event data (rid, , M, Y), together with the selection mode mode and, on a pinned turn, the client-held . The public cryptographic inputs also include the request commitment, any reported lengths, and the proof shapes determined by the public capacities. The returned cryptographic material constitutes the evidence for the serving event. The private data comprise the semantic index, the search trace, the rewrite banks, and the model-received request . An execution is supported when its request, search trace, and rewrite workload fit the capacity bounds in ctx.
System integrity. A serving event satisfies system integrity if
The three conjuncts are exactly the integrity properties of Sec. 1: the first excludes ineligible selection on the control plane, the second excludes unendorsed rewriting, and the third excludes unfaithful relay. Note that is existentially quantified: the client learns only that some endorsed model-received request was processed by M to produce Y, not which one. Security goals. For one serving event, the client should be able to verify control-plane and data-plane integrity while keeping the router's private data confidential.
Definition 1 (Verifiable LLM routing). A routing protocol is verifiable under an endorsed public context ctx if it satisfies the following three properties.
• Completeness. For every supported honest serving event in either mode, C accepts the returned evidence.
• Soundness. Except with negligible probability, if C accepts for an rid under the applicable mode mode, then Eq. (2) holds under the semantic index I and rewrite relation T bound by ctx.
• Confidentiality. The returned evidence reveals no additional information about the private data beyond the public data and the fact that Eq. (2) holds.
Theorem 5 states that VERIROUTER satisfies Definition 1. Its soundness guarantee decomposes across the two planes: Theorem 3 establishes the first conjunct of Eq. (2), and Theorem 4 establishes the remaining two.
Scope. VERIROUTER certifies that each serving event conforms to the model-selection and rewrite specifications bound by the endorsed public context ctx. The suitability of semantic index and rewrite specifications is outside our scope and is instead reviewed offline by an independent auditor that endorses the context [83]. VERIROUTER also does not assess response safety or factual accuracy. The model and response are visible, and adaptive inference [92] from them is outside our scope. Sec. 7 discusses these boundaries further.
4 Efficient ZK Data Structures
This section presents ZK proofs for the two central data structures used by VERIROUTER: monotone stacks and priority queues. The priority-queue circuit applies the monotone-stack circuit to check temporal queue order. Throughout, each insertion defines a distinct item, even if values repeat.
4.1 ZK Proof for Monotone Stack
Monotone stack. Fix a strict total order and a private push sequence . Starting from an empty stack, the algorithm processes this sequence in order. Before pushing , it repeatedly pops the current top while . The resulting operation trace is , where denotes sequence concatenation. For each , contains the zero or more pops performed while processing , followed by its push. The vector records the number of pops before each push. Let list the items remaining after the trace. The proof certifies that is exactly the sequence produced by the rule above and that contains exactly the items remaining afterward.
Public and private data. The public parameters are . The three maxima bound pushes, per-push pops, and final items, with actual lengths hidden by padding.
The private witness is . Here , with , records the top before and after each event of . The table records the top immediately before each push, using the nonitem when the stack is empty. Proof statement. The proof establishes:
StackTransition(Trace , TopTrace, ParentMap)
StackAccounting(Trace , Final ).
(3)
StackTransition. This predicate certifies that the reported trace follows the pop-then-push rule and that TopTrace and ParentMap consistently record the resulting stack-top changes. For an empty push sequence, this predicate is vacuous. Otherwise, the initial top is , and consecutive trace
Public parameters:
.
Private witness:
.
Prover:
-
StackTransition. Enforce the local operation and top-transition checks and LUT( ) = 1, where
-
StackAccounting. Let and be the left and right multisets in Eq. (4). Enforce MSetEq( ) = 1.
-
Output. The circuit enforces both relations and the local checks, and outputs
.
Verifier: ZKVerify( ) {accept, reject}.
Figure 2: Protocol for the monotone-stack proof.
blocks share their boundary top. Each pop removes the recorded top , requires , and replaces the top by parent( ). After the last pop, the top is or fails the pop condition. This remaining top is recorded as parent( ), and the push makes the new top.
StackAccounting. This predicate certifies each pushed insertion appears exactly once, as a recorded pop or in Final :
Proof generation. Fig. 2 constructs the proof. Local constraints and the lookup establish StackTransition, while the multiset-equality check establishes StackAccounting.
4.2 ZK Proof for Priority Queue
Priority queue. Fix a strict total priority order , and write if and only if . Let , where each is either or for some item . Starting from an empty queue, the operations are processed in this order and every removes the highest-priority item currently in the queue. Let be the claimed final-queue sequence. The proof certifies that follows this rule and that lists exactly the remaining items.
Equivalent trace checker. Rather than materializing the queue after every operation, the checker uses an equivalent trace representation. It first encodes the operation order in position-annotated push and pop projections, then reduces queue validity to three conditions. To form the projections, assign each a positive integer operation position , where and the positions need not be consecutive. Splitting the annotated operations gives , . Here .

Figure 3: Priority-queue trace representation and conditions of Theorem 2. Position labels are omitted. Here denotes , and indexes its latest preceding lower-priority item.
For the checker, Final must list the claimed remaining items in decreasing priority. Let . Appending Final to the popped items forms OutSeq = , where for , Final , and .
For every , introduce an insertion-position annotation . Define
where is larger than every finite operation position. Set and OutPos[0] = 0. For each , let be the largest such that , or 0 if no such index exists. Thus is the latest preceding lower-priority item of , with used when none exists.
Fig. 3 summarizes this representation and the three conditions characterized in the theorem below.
Theorem 2 (Equivalent checker for priority queues). For the projections and OutSeq above, Trace is valid and Final is the decreasing-priority listing of exactly its remaining items if and only if there exist annotations satisfying:
(i) Queue accounting:
(ii) Temporal queue order:
(iii) Final-sequence order:
The proof is deferred to Appendix A.4.2.
Public and private data. Define iff . The public parameters are , where contains the public parameters of the monotone-stack checker defined as in Sec. 4.1 under . Here bounds finite operation positions, and the three length bounds constrain the two projections and Final .
Public parameters:
.
Private witness:
.
Prover:
-
TraceConsistency. Enforce its local range, order, and pop-prefix checks. Let and be the left and right multisets in Eq. (9). Enforce MSetEq( ) = 1.
-
QueueAccounting. Let and be the left and right multisets in Eq. (5). Enforce MSetEq( ) = 1.
-
QueueOrder. Enforce inside , sharing its OutSeq and ParentMap wires. Form
.
Enforce LUT( ) = 1 and locally check ParentOutPos[r] < InPos[r] < OutPos[r] for every r.
-
FinalSequenceOrder. Enforce Eq. (7) locally.
-
Output. The circuit enforces the inlined stack, lookup, and multiset-equality checks in Steps 1–4, and outputs
.
Verifier: ZKVerify( ) {accept, reject}.
Figure 4: Protocol for the priority-queue proof.
Let and . For each , let ParentOutPos[r] be the removal position of its latest preceding lower-priority item, and let ParentOutPos = (ParentOutPos[r]){r \in [N{\text{out}}]}. The private witness is
The witness instantiates the monotone-stack checker with PushSeq = OutSeq and order , and contains ParentMap . Thus, the in-lined constraint verifies that each parent( ) is the latest preceding lower-priority item of , or if none exists, as detailed in QueueOrder below. Proof statement. The proof establishes:
TraceConsistency(OpPos, PushTrace, PopTrace, OutSeq)
^ QueueAccounting(PushTrace, OutSeq, InPos)
^ QueueOrder(OutSeq, InPos, ParentOutPos, )
^ FinalSequenceOrder(Final ).
(8)
The first predicate checks trace formation, while the remaining predicates capture the conditions of Theorem 2:
TraceConsistency. This predicate binds the projections to one operation order. It range-checks every enabled finite position, enforces and , verifies that both projections are position-ordered, and binds to the prefix of OutSeq. It also requires
QueueAccounting. This predicate certifies that every pushed insertion appears exactly once in OutSeq as in Eq. (5).
QueueOrder. For each , the inclined monotone-stack constraint identifies its latest preceding lower-priority item parent( ) = , with when . The circuit then forms an item-to-removal-position table containing and every . Looking up (parent( ), ParentOutPos[r]) in this table binds ParentOutPos[r] = OutPos[p_r]. Finally, the circuit enforces ParentOutPos[r] < InPos[r] < OutPos[r], thereby establishing Eq. (6).
FinalSequenceOrder. This predicate certifies that Final is in decreasing priority order by enforcing Eq. (7).
Proof generation. Fig. 4 constructs the proof for Eq. (8) using the inclined monotone-stack checker, two multiset-equality checks, the removal-position lookup, and local constraints.
Both checkers have linear constraint complexity in their total padded workloads. Appendix A.3 gives the analysis.
5 VERIROUTER
This section constructs VERIROUTER to realize the security goals in Sec. 3. We first instantiate the endorsed public context, then present the protocols for both planes.
5.1 Initialization
The protocol fixes a ZK-friendly hash , from which it builds content and complete-message digests and the structured request hash ReqHash (detailed in Appendix A.2.1). It also fixes a signature hash for authenticated messages. Initialization includes:
• Semantic index. Using fresh and , the router publishes , where and . The public parameters fix the search configuration and supported circuit capacities.
• Rewrite banks. The router maintains two private banks underlying the rewrite relation T: complete messages in an endorsed message bank MsgBank and content fragments in an endorsed fragment bank FragBank. Using fresh and , it publishes , where and . The public parameters fix the public rewrite structure and capacity bounds.
• Provider keys. For every offered model M, its provider holds a signing key and registers the corresponding verification key in the authenticated registry Reg. The client later uses this registry to authenticate the serving certificate for the model.

Figure 5: Composition of the model-selection proof on a fresh-selection turn. The aggregation circuit verifies the subproofs, equates their values that bind the score table, links the upper-layer output to the level-0 input, and produces .
These values instantiate the public context from Sec. 3 as
5.2 Control-plane Integrity
Recall the model-selection condition defined in Sec. 2.1. On a fresh-selection turn, requires . We construct the model-selection proof to certify this condition. We first describe the committed semantic index, then construct score-opening, upper-layer, and level-0 efSearch subproofs , , and . The aggregation circuit verifies and links them. Fig. 5 summarizes the subproofs and their shared interfaces.
5.2.1 Committed semantic index
As initialized in Sec. 5.1, commits to reference rows and graph rows from Sec. 2.1. Here lists the real neighbors in stored order, and the public bound fixes the padded row width. Whenever a subproof uses a reference tuple or neighbor list, it authenticates the corresponding row against or .
5.2.2 Score-opening proof
The same node score may be consumed multiple times during semantic search. The score-opening proof therefore certifies each required score once and makes the score table available to the traversal subproofs through a private shared interface.
Proof statement. For a public capacity bound, the prover forms a canonical private score table : its active rows have unique node identifiers in increasing order, and its unused rows use fixed padding. Let . For every active row , the circuit authenticates against and checks . It exposes an internal digest that binds the table across the three subproofs and remains private in the final model-selection aggregation proof.
Parallelization. Computing many high-dimensional scores against the same query is a major circuit cost. We therefore design a parallel dot-product gate that shares one copy of the query coordinates across several node-score computations in each gate row. Relative to a generic formula-gate realization, this reduces score-computation rows by about 64%. Appendix A.2.4 gives the concrete construction.
The upper-layer and level-0 efSearch subproofs bind every consumed score to the same private . Both traversals prefer a larger certified score and retain the first encountered node on a tie. Appendix A.2.5 gives the exact comparison encoding.
5.2.3 Upper-layer proof
Let be the entry node at the highest layer . The upper-layer proof certifies the greedy traversal from to the level-0 entry. At each step, the traversal moves to the best neighbor only if it outranks the current node, or otherwise retains the current node and descends. The node retained after layer 1 becomes the level-0 entry. Alg. 1 gives this procedure.
Proof statement. The private witness is a sequence padded to the public step bound . For some , steps are enabled and the remaining slots are disabled. Step records the current layer and node , the real neighbors , the claimed best node , and a bit indicating descent after this step. The circuit checks:
(i) Authentication. Every traversed neighbor list is authenticated against , and required scores are bound to .
(ii) Greedy traversal. Each enabled step scans and then and retains the first maximum score. The circuit checks this value as , sets , and, for , enforces the layer transition.
(iii) Boundary conditions. Every enabled step satisfies , and the first starts at . Let be the last enabled step. The circuit requires , , and , and sets .
5.2.4 Level-0 efSearch proof
The level-0 proof certifies the top-k output of efSearch starting from and the selected-model membership condition . The search maintains a candidate queue , a working queue of capacity , and a visited set. Each round expands the best candidate and stops when no remaining candidate can improve (Alg. 2).
Rather than replaying the queue states, the prover supplies push and pop projections of C and W. It validates both queues with the priority-queue checker from Sec. 4.2, then enforces equivalent cross-queue and stopping conditions below.
Proof statement. The circuit certifies three conditions:
(i) Queue-trace validity. The circuit inlines the priority-queue checker from Sec. 4.2 for both queues, treating C as a max-priority queue and W as a min-priority queue under the search key. To enforce capacity ef, W starts with ef sentinels below all real nodes. Each update pushes a real node and pops the minimum, either discarding the new node or replacing a sentinel or the current worst node. Thus, W retains the best nodes seen so far up to capacity, matching the conditional insertion in Alg. 2.
(ii) Cross-queue consistency. Individually valid queue traces must also describe the same search execution. Let be the public padded length. To link the traces, the circuit uses the working-queue update sequence . The sequence starts with and then follows pop order, with each popped node contributing its padded neighbor list. The value reserves row 's position in the operation order as in Sec. 4.2 and serves as 's tie-breaking position when enabled. The bit selects the first-visit rows that form the real-node work-push sequence , while further selects from them the candidate-push sequence . Repeated and padding rows have . As described below, the circuit checks this relation in three steps:
First, node-order authentication binds the node sequence in UpdSeq_W to candidate expansion. The first row has . For each node popped from C, the next fixed-width block of values is its padded level-0 neighbor row authenticated against . The blocks follow pop order, and unused blocks are padding. Thus, the sequence contains the entry followed by authenticated neighbor identifiers in C pop order.
Second, the first-visit filter implements the visited set. The circuit checks a copy of sorted by node and original row index. A multiset-equality check binds the copies, and adjacent sorted rows enable only the earliest row of each real node. Hence, exactly when is real and has not appeared earlier. For each enabled row, the circuit looks up the unique active row for , binds its score to , and performs the W push-pop using .
Third, the admission filter links W admissions to C pushes. For each enabled row i, let be the node immediately popped by its update. The circuit sets exactly when and , meaning that remains in W. It then forms the push trace of : . Thus, C receives exactly the admitted nodes with the same positions and order.
(iii) Stopping rule. The terminal state represents either an empty-C stop or a threshold stop just before its final pop, where W is full and the best node in C is worse than the worst node in W. To avoid scanning the live W, the circuit permits an equivalent output-preserving suffix and checks each round locally. In any full-W round with an admission, the first admission evicts exactly the round-start worst node because preceding rows were rejected. The circuit requires the popped candidate to be no worse than this eviction. A below-threshold round therefore admits no update, leaves W unchanged, and pushes no candidate. Since the popped candidate was the C maximum, every later candidate is no better, so the suffix is inert and can be removed to obtain an equivalent stopped execution with the same final W.
The ordered real portion of the certified final W determines , which is the in Sec. 2.1 and the circuit checks for some . Together, these checks produce . Appendix A.2.5 gives the detailed constraints, and Appendix A.4.3 proves correctness.
The router R generates the three subproofs in parallel. Aggregation binds them to the same , , , and internal score-table hash . It also equates 's output with 's input. The resulting establishes , or equivalently, . Appendix A.2.6 gives the detailed protocol. On the other hand, a pinned turn requires no new . The client instead performs a pinned-model check, requiring for the model retained from the session's initial accepted fresh-selection turn. Thus, the model-selection proof on a fresh-selection turn and the pinned-model check on a pinned turn both establish the corresponding condition in Eq. (1).
Theorem 3 (Control-plane integrity). Under collision-resistant hashing, computationally binding commitments, and a complete and knowledge-sound argument system (Sec. 2.3), the control-plane verification satisfies:
(i) Completeness. For every supported honest serving event, holds and the corresponding control-plane verification accepts.
(ii) Soundness. Except with negligible probability, every accepted verification establishes , where I is bound by the endorsed public context and is the client-held session state when mode = pinned.
5.3 Data-plane Integrity
This subsection constructs the rewrite proof and serving certificate SC for the data plane. Both use a shared hiding commitment to the model-received request. We present the certificate first to authenticate , then the proof to certify that the committed request satisfies the rewrite relation.
5.3.1 Serving certificate
Using the signature interface from Sec. 2.2, the serving certificate authenticates a provider response and binds it to the request received by the model. For each event, the router R samples and sets . Here ReqHash binds the messages in order, including their roles and contents, as detailed in Appendix A.2.1. The router R sends to . The provider recomputes , evaluates , and constructs the certificate below.
Gap message bank MsgBank
Fragment bank FragBank
system: Follow the clinical safety policy
system: Retrieved context is “..., rest and hydration may help.”
wrap( )
user: Briefly, How can I ease a tension headache? Use bullets.
Figure 6: Endorsed rewrite example. The complete messages in are selected from MsgBank, while the prefix and suffix fragments in are selected from FragBank.
For verification, the client C obtains , checks , recomputes from Eq. (11), and accepts only if rid equals the identifier issued for this request and .
5.3.2 ZK rewrite proof
The rewrite proof establishes the request relation in Sec. 2.1 for variable-length requests. It preserves client messages and reduces validation of router-supplied content to local placement checks and committed lookups. We first formalize the relation and then describe the proof statement.
Rewrite relation. Routers commonly assemble model requests by adding complete messages, such as system instructions or retrieval context, or attaching prompt-formatting fragments around existing content [67, 75, 80]. Fig. 6 instantiates both forms around one client message. Let with . A request in preserves these messages in order, inserts messages before, between, or after them, and may prepend or append fragments to each client-message content. Formally,
where each , for , contains at most messages drawn from MsgBank. Each entry contains a role and content, allowing request-dependent selection of messages such as system instructions or retrieval context.
The wrapper preserves both fields of , and permits authenticated fragments around the content. Thus is
For each and , denotes the fragments placed on that side of message , where . All selected fragments Fragments = must belong to FragBank. The relation constrains placement and bank membership, allowing different system prompts, retrieval passages, and provider formats. Eqs. (12) and (13) also preserve every original role and content, thereby excluding common rewrite-relation violations, including message deletion, replacement, and reordering.
Proof statement. The rewrite proof checks the endorsed rewriting against the same authenticated by the serving certificate. The public inputs are , , , , and . The private witness contains , the selected additions, and their bank-opening and hashing data. The circuit enforces:
RequestCommitment( )
RequestCommitment checks , while LayoutConsistency enforces Eqs. (12) and (13). Gapln and Fragln authenticate each selected addition against the corresponding commitment through committed lookups.
Digest reuse. To avoid rehashing complete inserted messages, we commit their digests rather than raw bytes under . After Gapln authenticates an entry, RequestCommitment reuses the digest in ReqHash. instead binds fragment digests only for membership checks, and each selected fragment must still be combined with the original content and hashed to obtain the digest of . Appendix A.2.1 gives the details.
To support variable-length requests, the router partitions the client messages into consecutive ranges and proves them in parallel. Each leaf checks the predicates above for its range and advances a running request-hash state. Using recursive composition (Sec. 2.3), the aggregation circuit verifies the leaf proofs, checks their ranges, and enforces agreement between adjacent boundary values and the final commitment . This produces . Appendix A.2.7 gives the detailed protocol.
The client C verifies and SC with the same . The rewrite proof certifies the rewrite relation, while the certificate authenticates the provider's response for that request. Together they establish endorsed rewriting and faithful relay, the latter two conditions of Eq. (2).
Theorem 4 (Data-plane integrity). Under the trust model in Sec. 3, collision-resistant hashing, computationally binding commitments, EUF-CMA signatures, and a complete and knowledge-sound argument system (Sec. 2.3), the rewrite proof and serving certificate satisfy:
(i) Completeness. For any supported honest execution with an endorsed rewrite, the rewrite proof and serving certificate are accepted.
(ii) Soundness. Except with negligible probability, whenever the client accepts a serving certificate SC and rewrite proof bound to the same request commitment, the serving event identified by rid satisfies for some .
Appendix A.5.5 gives the proof.
Overall, Appendix A.2.8 gives the complete VERIROUTER protocol. The theorem below states its integrity guarantee.
Theorem 5 (End-to-end security of VERIROUTER). Under the trust model in Sec. 3, collision-resistant hashes, computationally binding and hiding commitments, EUF-CMA signatures, and a complete, knowledge-sound, and zero-knowledge argument system (Sec. 2.3), VERIROUTER satisfies Def. 1:
(i) Completeness. For every supported honest serving event in either mode, the client accepts the returned evidence.
(ii) Soundness. Except with negligible probability, if the client accepts a serving event under the applicable model-selection mode mode, then the system-integrity condition in Eq. (2) holds under the endorsed public context ctx.
(iii) Confidentiality. The returned cryptographic evidence reveals no additional information about the router’s private data beyond the public protocol inputs and outputs and the fact that Eq. (2) holds.
Appendix A.5.6 gives the proof.
6 Evaluation
6.1 Experimental Setup
Implementation. We implement VERIROUTER in Rust using Plonky2 [101]. The semantic index uses standard 16-bit affine quantization [46]. Appendix A.7 reports a routing-quality ablation against floating-point search. We instantiate with Poseidon [35], with SHA-256 [77], and provider signatures with Ed25519 [16]. The model-selection subproofs and rewrite leaf proofs are generated in parallel before their respective aggregation steps. All measurements enable zero-knowledge mode. All experiments are conducted on an Alibaba Cloud ecs.r9ae.8xlarge with 32 vCPUs and 256 GiB of memory. We use 32 threads by default. Runs exceeding the host-memory limit are reported as OOM.
Baselines. We compare VERIROUTER with two general-purpose zkVMs, SP1 [89] and Jolt [4]. They prove the same quantized semantic search, rewrite, and binary-heap relations by executing the corresponding guest programs directly. We run SP1 in compressed mode, which compresses its sharded execution into one proof, and report each system's client-facing serialized proof for a fair comparison of proof size and verification cost. We additionally implement direct Plonky2 replay for model selection and the priority-queue checker to isolate the benefits of control-plane specializations.
Datasets. We evaluate VERIROUTER on real-world semantic-search and conversational workloads. For the control plane, the public RouteLLM corpus [68] provides 55,361 1,536-dimensional training embeddings and 1,531 disjoint test
Table 1: Control-plane model-selection cost. Best completing results are in bold. VERIROUTER reduces average proving time by over SP1, while Jolt and direct Plonky2 replay exceed 256 GiB of memory.
| Method | Proving time | Verification time | Proof size | Peak RSS | ||
|---|---|---|---|---|---|---|
| 512 | 2,048 | SP1 | 228.2 min | 36.99 ms | 1.21 MiB | 171.4 GiB |
| Jolt | OOM | - | - | >256 GiB | ||
| Direct Plonky2 | OOM | - | - | >256 GiB | ||
| VERIROUTER | 9.41 s | 4.89 ms | 0.15 MiB | 11.5 GiB | ||
| 4,096 | SP1 | 230.2 min | 37.16 ms | 1.21 MiB | 154.3 GiB | |
| Jolt | OOM | - | - | >256 GiB | ||
| Direct Plonky2 | OOM | - | - | >256 GiB | ||
| VERIROUTER | 12.18 s | 4.86 ms | 0.15 MiB | 15.6 GiB | ||
| 1,024 | 2,048 | SP1 | 385.7 min | 37.05 ms | 1.21 MiB | 175.4 GiB |
| Jolt | OOM | - | - | >256 GiB | ||
| Direct Plonky2 | OOM | - | - | >256 GiB | ||
| VERIROUTER | 15.07 s | 4.86 ms | 0.15 MiB | 19.9 GiB | ||
| 4,096 | SP1 | 387.9 min | 37.01 ms | 1.21 MiB | 171.8 GiB | |
| Jolt | OOM | - | - | >256 GiB | ||
| Direct Plonky2 | OOM | - | - | >256 GiB | ||
| VERIROUTER | 17.78 s | 4.85 ms | 0.15 MiB | 24.3 GiB | ||
| 2,048 | 2,048 | SP1 | 700.3 min | 37.09 ms | 1.21 MiB | 179.1 GiB |
| Jolt | OOM | - | - | >256 GiB | ||
| Direct Plonky2 | OOM | - | - | >256 GiB | ||
| VERIROUTER | 30.60 s | 4.87 ms | 0.15 MiB | 34.7 GiB | ||
| 4,096 | SP1 | 702.8 min | 37.53 ms | 1.21 MiB | 176.1 GiB | |
| Jolt | OOM | - | - | >256 GiB | ||
| Direct Plonky2 | OOM | - | - | >256 GiB | ||
| VERIROUTER | 31.46 s | 4.89 ms | 0.15 MiB | 40.3 GiB | ||
| 8,192 | SP1 | 706.8 min | 37.20 ms | 1.21 MiB | 176.2 GiB | |
| Jolt | OOM | - | - | >256 GiB | ||
| Direct Plonky2 | OOM | - | - | >256 GiB | ||
| VERIROUTER | 36.92 s | 4.88 ms | 0.15 MiB | 47.3 GiB | ||
| Average | SP1 | 477.4 min | 37.15 ms | 1.21 MiB | 172.0 GiB | |
| Jolt | OOM | - | - | >256 GiB | ||
| Direct Plonky2 | OOM | - | - | >256 GiB | ||
| VERIROUTER | 21.92 s | 4.87 ms | 0.15 MiB | 27.7 GiB |
queries. For the data plane and end-to-end evaluation, MT-Bench-101 [5] provides 1,388 multi-turn conversations and 4,208 turns across 13 task types. To construct realistic rewrite banks, we use GPT-5.4 [70] offline to populate MsgBank and FragBank with reusable messages and fragments.
6.2 RQ1: Control-Plane Performance
We evaluate control-plane performance at three levels: the model-selection proof, subproofs, and the standalone priority-queue checker. VERIROUTER's model-selection proof is faster than SP1, while its priority-queue checker is faster than the fastest completing baseline.
Model-selection proof. Tab. 1 reports the overall cost of the model-selection proof. The 1,531 search traces span seven sizes, specified by score-table size and the length of the working-queue update sequence. Across these sizes, VERIROUTER's proving time is 9.41–36.92 s and 21.92 s on average, whereas SP1 takes 228.2–706.8 min and 477.4 min on average. SP1's default prover uses sharded execution and recursive compression to complete all sizes, but remains slow. Jolt and direct Plonky2 replay instead exceed the 256 GiB limit after running for several minutes even at the smallest size. VERIROUTER also reduces verification time, proof size, and peak memory. Average verification takes

Figure 7: Isolated model-selection component proving time. Color denotes , and hatching denotes . The score-opening proof generally dominates.
4.87 ms rather than SP1's 37.15 ms, proof size is 0.15 MiB rather than 1.21 MiB, and average peak memory is 27.7 GiB rather than 172.0 GiB.
Within VERIROUTER, at fixed , quadrupling raises overall proving time from 9.41 to 30.60 s (3.25×); at fixed , quadrupling raises it only from 30.60 to 36.92 s (1.21×). Thus, overall proving time is more sensitive to . The component measurements below help explain this difference. Verification time and proof size remain nearly constant.
Subproof breakdown. To isolate costs, we run each subproof separately with the full prover thread pool. Fig. 7 shows that the score-opening proof is the largest component in all but one size, taking 6.85–29.10 s. The level-0 efSearch proof takes 3.52–14.43 s and is nearly tied with the score-opening proof only at , while the upper-layer proof and aggregation proof remain below 1 s. Thus authenticated high-dimensional scoring, even with the 64%-row-reducing gate, determines most end-to-end time. Our specialized checks, on the other hand, keep traversal proof efficient without hitting a memory barrier.
Standalone priority-queue checker. We further isolate the priority-queue checker (Sec. 4.2) used by level-0 efSearch by comparing it on operation traces with queue replay in baselines. Tab. 2 shows Jolt and direct Plonky2 reach OOM at 100K and 5K operations, respectively. SP1 completes every size using sharded execution and recursive compression, but takes approximately longer than our checker on average. These results demonstrate the benefit of replacing mutable-queue replay with our trace checker.
Table 2: Standalone priority-queue proving cost on operation traces. Best completing results are in bold. Our checker is faster than the fastest completing replay baseline.
| #Operations | SP1 | Jolt | Direct Plonky2 | Ours |
|---|---|---|---|---|
| 1,000 | 1.1 min | 25.89 s | 29.52 s | 0.95 s |
| 5,000 | 3.4 min | 1.3 min | OOM | 3.68 s |
| 10,000 | 6.2 min | 2.4 min | OOM | 7.33 s |
| 50,000 | 28.7 min | 9.2 min | OOM | 32.30 s |
| 100,000 | 56.9 min | OOM | OOM | 65.70 s |
Table 3: Rewrite-proof cost. Best completing results are in bold. VERIROUTER reduces average proving time by over Jolt, the fastest general-purpose baseline.
| Message size | Method | Proving time | Verification time | Proof size | Peak RSS |
|---|---|---|---|---|---|
| 256 B | SP1 | 13.7 min | 36.7 ms | 1.21 MiB | 138.2 GiB |
| Jolt | 4.9 min | 264.9 ms | 0.09 MiB | 105.4 GiB | |
| VERIROUTER | 2.26 s | 4.55 ms | 0.14 MiB | 5.4 GiB | |
| 512 B | SP1 | 16.9 min | 36.6 ms | 1.21 MiB | 139.6 GiB |
| Jolt | 7.0 min | 271.3 ms | 0.09 MiB | 175.0 GiB | |
| VERIROUTER | 2.72 s | 4.63 ms | 0.14 MiB | 5.3 GiB | |
| 1 KiB | SP1 | 17.4 min | 36.7 ms | 1.21 MiB | 141.3 GiB |
| Jolt | 7.0 min | 272.1 ms | 0.09 MiB | 171.1 GiB | |
| VERIROUTER | 3.94 s | 4.58 ms | 0.14 MiB | 8.3 GiB | |
| 2 KiB | SP1 | 19.7 min | 36.8 ms | 1.21 MiB | 150.7 GiB |
| Jolt | 8.3 min | 271.3 ms | 0.10 MiB | 189.8 GiB | |
| VERIROUTER | 4.23 s | 4.57 ms | 0.14 MiB | 8.0 GiB | |
| 4 KiB | SP1 | 20.2 min | 36.8 ms | 1.21 MiB | 122.1 GiB |
| Jolt | 8.3 min | 274.9 ms | 0.10 MiB | 173.8 GiB | |
| VERIROUTER | 8.06 s | 4.57 ms | 0.14 MiB | 8.5 GiB | |
| Average | SP1 | 17.6 min | 36.70 ms | 1.21 MiB | 138.4 GiB |
| Jolt | 7.1 min | 270.89 ms | 0.09 MiB | 163.0 GiB | |
| VERIROUTER | 4.24 s | 4.58 ms | 0.14 MiB | 7.1 GiB |
6.3 RQ2: Data-Plane Performance
We evaluate data-plane performance by comparing our rewrite proof with general-purpose baselines and measuring serving-certificate costs. Overall, VERIROUTER's rewrite proof is faster on average than Jolt, the fastest completing baseline, and provider-side certificate generation averages only 3.84 ms, which is lightweight. Throughout the data-plane experiments, message size is the maximum client-message content length in .
Rewrite proof. Tab. 3 shows that VERIROUTER generates a rewrite proof in 2.26–8.06 s, compared with 4.9–8.3 min for Jolt and 13.7–20.2 min for SP1. Jolt's proofs are 0.04–0.05 MiB smaller than VERIROUTER's 0.14 MiB proofs, but require longer proving and longer verification on average. By avoiding general-purpose execution traces, VERIROUTER reduces average peak memory to 7.1 GiB, while Jolt and SP1 use and as much. Increasing message size from 256 B to 4 KiB raises VERIROUTER's proving time by only , while its verification time remains about 4.6 ms and its proof size remains 0.14 MiB.
Serving certificate. Across all message sizes, Tab. 4 reports 3.46–4.15 ms for provider generation and 2.46–2.49 ms for client verification, averaging 3.84 ms and 2.47 ms, respec-
Table 4: Serving-certificate cost. Provider generation remains below 4.2 ms, and every certificate is only 0.145 KiB.
| Message size | Provider generation | Client verification | Certificate size |
|---|---|---|---|
| 256 B | 3.46 ms | 2.46 ms | 0.145 KiB |
| 512 B | 3.65 ms | 2.48 ms | |
| 1 KiB | 3.94 ms | 2.46 ms | |
| 2 KiB | 4.15 ms | 2.47 ms | |
| 4 KiB | 3.99 ms | 2.49 ms | |
| Average | 3.84 ms | 2.47 ms |

Router w/o Veri
Added by VeriRouter
Figure 8: Average per-turn serving latency across MT-Bench-101 task types. VERIROUTER adds 4.08 s (14.24%) with per-turn model selection and 0.11 s (0.38%) with session-pinned model selection.
tively. This low provider cost makes lightweight participation practical for protecting model attribution and reputation [23, 104], consistent with Sec. 3.
6.4 RQ3: End-to-End Performance
We evaluate end-to-end user-visible serving latency and client verification under per-turn and session-pinned model selection. The added latency is only 4.08 s and 0.11 s, respectively. Serving latency. Fig. 8 shows that overlapping proof generation with inference hides most proof-generation time in both modes. Relative to serving without VERIROUTER, which averages 28.68 s per turn, per-turn model selection averages 32.77 s, adding 4.08 s (14.24%) while hiding 83.92% of proof-generation time. Session-pinned selection amortizes one model-selection proof across the dialogue and averages 28.79 s per turn, adding 0.11 s (0.38%) while hiding 98.75% of proof-generation time. The task-type breakdown also shows the latency stress case, as shorter inference exposes more of the proof path and yields higher relative overhead. Client verification. Client verification averages 11.91 ms for a fresh selection, covering both ZK proofs and the serving certificate, and 7.04 ms on later session-pinned turns.
6.5 RQ4: Scalability
We evaluate scalability with graph size on the control plane and with rewrite-bank capacity and rewrite bounds on the data plane. Proving remains stable for graphs up to 10M nodes and banks up to 16K entries. Increasing the rewrite bounds adds cost only when it expands byte-level fragment processing, while final aggregation proofs remain about 0.15 MiB.
Model-selection proof. Fig. 9 shows that model-selection proving remains stable at each size as the graph grows to 10M nodes. For (512,2,048), proving changes from 9.23 to 9.35 s between 10K and 10M nodes. For (2,048, 8,192), it remains within 36.03–37.27 s between 50K and 10M nodes. This stability follows because each proof authenticates a bounded search trace rather than scanning the full graph. Across the trace sizes, the proving-time differences are driven mainly by , consistent with Fig. 7. Every model-selection aggregation proof remains 0.15 MiB. Capacities of rewrite banks. Fig. 10 shows that rewrite proving remains stable as either bank grows from 64 to 16K entries. Across message sizes, the endpoint change is at most 1.04 s for and 0.51 s for . This stability follows because the bank-membership checks in Sec. 5.3.2 authenticate only selected entries instead of processing an entire bank. The rewrite proof remains about 0.15 MiB throughout. Rewrite insertion bounds. Fig. 11 evaluates scalability under the two rewrite bounds and . The results reflect the two hashing paths in our rewrite proof. Across message sizes, increasing leaves average proving time essentially unchanged because each complete inserted message contributes an authenticated bank digest directly to the ordered fold of ReqHash. By contrast, increasing from 1 to 8 raises average proving time from 6.33 to 15.57 s because a fragment forms part of and must be hashed with the original content to derive the wrapped-message digest. Since consecutive content on the same side can be concatenated and committed as one fragment, eight independent fragments per side is already a generous practical bound. Recursive aggregation keeps the rewrite aggregation proof about 0.15 MiB.
7 Discussion and Related Work
Guarantee and scope. VERIROUTER certifies that model selection and request rewriting conform to the semantic index and rewrite banks committed in the public context ctx, but does not assess their policy quality. An independent auditor with access to the private specifications can validate and endorse these policies [83], e.g., ensuring that rewrite banks exclude disallowed sponsored content as in Fig. 1. The current relation covers common additive rewrites, while model-generated rewrites can be handled by composing VERIROUTER with verifiable inference proofs [20, 79, 90]. Updates to the semantic index or rewrite banks, including new

512 1,024 2,048
|UpdSeqw| 2,048 4,096 8,192
Figure 9: Scalability of model-selection proof with the number of graph nodes. Color denotes , while line style denotes . At each size, proving time and proof size remain stable as the graph grows to 10M nodes.

Message size 256 B 512 B 1 KiB 2 KiB 4 KiB
Figure 10: Scalability of rewrite proof with the capacity of rewrite banks and . Proving time and proof size remain stable.
references or retrieval content, can be incorporated through an updated public context. Inference from repeated outputs [92] and hiding client requests [1, 22, 44, 60] are complementary concerns. Further discussion is provided in Appendix A.6. Provider participation. Providers only register keys and sign responses (Tab. 4). Faithful relay assumes router–provider non-collusion, motivated in the third-party setting (Sec. 2.1) by independent providers’ reputational incentives to sign only actual serving events [23, 104]. Joint control of R and instead requires an independent trust anchor such as remote attestation, trusted execution environment (TEE)-backed auditing, or ZK-verifiable inference [20, 39, 47, 79, 83, 90].
Zero-knowledge proofs and verifiable ML. General-purpose ZK systems certify programs by replaying control flow [28, 41, 94], whereas VERIROUTER uses specialized routing proofs. ZK techniques for machine learning

Message size 256 B 512 B 1 KiB 2 KiB 4 KiB
Figure 11: Scalability of rewrite proof with insertion bounds and . Proving time is stable with and scales predictably with , while the proof size remains 0.15 MiB.
(ZKML) and LLMs (ZKLLM) certify learned computation [20, 40, 54, 79, 90, 98], including full LLM inference and authenticated agent transcripts [31, 97]. Composing them with VERIROUTER can verify selector or provider inference. Verifiable ANN search. Prior graph-ANN verification schemes disclose query-specific index information to the client [59, 95]. Recent ZK techniques prove IVF-PQ [51, 78], whereas VERIROUTER certifies data-dependent traversal over a committed semantic-search graph.
LLM routing security. Prior work studies robust model selection [48,52,86,91,103], malicious API intermediaries [53], failure bounds under honest execution [93], and routing-input privacy under semi-honest secure multiparty computation (MPC) [99]. TEE-based gateway provenance attests routing and fallback constraints [96]. VERIROUTER instead makes LLM routing verifiable even when the router is untrusted.
8 Conclusion
We presented VERIROUTER, a verifiable LLM routing framework that establishes control-plane and data-plane integrity under an endorsed public context while hiding the router's private data. On real-world workloads, it adds only 4.08 s or 0.11 s to serving latency under per-turn or session-pinned selection, respectively.
References
[1] Yoshimasa Akimoto, Kazuto Fukuchi, Youhei Akimoto, and Jun Sakuma. Privformer: Privacy-preserving transformer with mpc. In 2023 IEEE 8th European Symposium on Security and Privacy (EuroS&P), pages 392–410. IEEE, 2023.
[2] Amazon Web Services, Inc. Understanding intelligent prompt routing in amazon bedrock. https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-routing.html, 2026. Amazon Bedrock Documentation, accessed 2026-03-12.
[3] Scott Ames, Carmit Hazay, Yuval Ishai, and Muthuramakrishnan Venkitasubramaniam. Ligero: Lightweight sublinear arguments without a trusted setup. In Proceedings of the 2017 acm sigsac conference on computer and communications security, pages 2087–2104, 2017.
[4] Arasu Arun, Srinath Setty, and Justin Thaler. Jolt: Snarks for virtual machines via lookups. In Annual International Conference on the Theory and Applications of Cryptographic Techniques, pages 3–33. Springer, 2024.
[5] Ge Bai, Jie Liu, Xingyuan Bu, Yancheng He, Jiaheng Liu, Zhanhui Zhou, Zhuoran Lin, Wenbo Su, Tiezheng
Ge, Bo Zheng, et al. Mt-bench-101: A fine-grained benchmark for evaluating large language models in multi-turn dialogues. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7421–7454, 2024.
[6] Stephanie Bayer and Jens Groth. Efficient zero-knowledge argument for correctness of a shuffle. In Annual International Conference on the Theory and Applications of Cryptographic Techniques, pages 263–280. Springer, 2012.
[7] Adarsh Prasad Behera, Jaya Prakash Champati, Roberto Morabito, Sasu Tarkoma, and James Gross. Towards efficient multi-llm inference: Characterization and analysis of llm routing and hierarchical techniques. arXiv preprint arXiv:2506.06579, 2025.
[8] Mihir Bellare and Shafi Goldwasser. New paradigms for digital signatures and message authentication based on non-interactive zero knowledge proofs. In Conference on the Theory and Application of Cryptology, pages 194–211. Springer, 1989.
[9] Eli Ben-Sasson, Alessandro Chiesa, Daniel Genkin, Eran Tromer, and Madars Virza. Snarks for c: Verifying program executions succinctly and in zero knowledge. In Annual cryptology conference, pages 90–108. Springer, 2013.
[10] Eli Ben-Sasson, Alessandro Chiesa, Eran Tromer, and Madars Virza. Succinct {Non-Interactive} zero knowledge for a von neumann architecture. In 23rd USENIX Security Symposium (USENIX Security 14), pages 781–796, 2014.
[11] Nir Bitansky, Ran Canetti, Alessandro Chiesa, and Eran Tromer. Recursive composition and bootstrapping for SNARKs and proof-carrying data. Cryptology ePrint Archive, Paper 2012/095, 2012. URL: https://eprint.iacr.org/2012/095.
[12] Alexander R. Block, Albert Garreta, Jonathan Katz, Justin Thaler, Pratyush Ranjan Tiwari, and Michał Zajac. Fiat-shamir security of FRI and related SNARKs. ASIACRYPT 2023, 2023. URL: https://www.pratyush.site/publication/fsfriplonk/fsfriplonk.pdf.
[13] Alexander R Block, Justin Holmgren, Alon Rosen, Ron D Rothblum, and Pratik Soni. Time-and space-efficient arguments from groups of unknown order. In Annual International Cryptology Conference, pages 123–152. Springer, 2021.
[14] Sean Bowe, Jack Grigg, and Daira Hopwood. Recursive proof composition without a trusted setup. Cryptology ePrint Archive, 2019.
[15] Gordon Brander. Llms break the internet. signing everything fixes it. https://newsletter.squishy.computer/p/llms-break-the-internet-signing-everything, 2023. Squishy Computer newsletter, accessed 2026-03-24.
[16] Jacqueline Brendel, Cas Cremers, Dennis Jackson, and Mang Zhao. The provable security of ed25519: theory and practice. In 2021 IEEE Symposium on Security and Privacy (SP), pages 1659–1676. IEEE, 2021.
[17] Benedikt Bünz, Alessandro Chiesa, Pratyush Mishra, and Nicholas Spooner. Recursive proof composition from accumulation schemes. In Theory of Cryptography Conference, pages 1–18. Springer, 2020.
[18] Will Cai, Tianneng Shi, Xuandong Zhao, and Dawn Song. Are you getting what you pay for? auditing model substitution in llm apis. arXiv preprint arXiv:2504.04715, 2025.
[19] Matteo Campanelli, Dario Fiore, and Anaïs Querol. Legosnark: Modular design and composition of succinct zero-knowledge proofs. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, pages 2075–2092, 2019.
[20] Bing-Jyue Chen, Suppakit Waiwitlikhit, Ion Stoica, and Daniel Kang. Zkml: An optimizing system for ml inference in zero-knowledge proofs. In Proceedings of the Nineteenth European Conference on Computer Systems, pages 560–574, 2024.
[21] Yulin Chen, Haoran Li, Yuan Sui, Yufei He, Yue Liu, Yangqiu Song, and Bryan Hooi. Can indirect prompt injection attacks be detected and removed? In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 18189–18206, 2025.
[22] Amrita Roy Chowdhury, David Glukhov, Divyam Anshumaan, Prasad Chalasani, Nicolas Papernot, Somesh Jha, and Mihir Bellare. Præempt: Sanitizing sensitive prompts for llms. arXiv preprint arXiv:2504.05147, 2025.
[23] Coalition for Content Provenance and Authenticity. C2pa technical specification, version 2.3. https://spec.c2pa.org/specifications/specifications/2.3/specs/C2PA_Specification.html, May 2025. Official specification, accessed 2026-03-24.
[24] Alfredo De Santis, Silvio Micali, and Giuseppe Persiano. Non-interactive zero-knowledge proof systems. In Conference on the Theory and Application of Cryptographic Techniques, pages 52–72. Springer, 1987.
[25] Dujian Ding, Ankur Mallick, Chi Wang, Robert Sim, Subhabrata Mukherjee, Victor Rühle, Laks VS Lakshmanan, and Ahmed Hassan Awadallah. Hybrid llm: Cost-efficient and quality-aware query routing. In The Twelfth International Conference on Learning Representations, 2024.
[26] Prastudy Fauzi, Helger Lipmaa, and Bingsheng Zhang. Efficient non-interactive zero knowledge arguments for set operations. In International Conference on Financial Cryptography and Data Security, pages 216–233. Springer, 2014.
[27] Tao Feng, Yanzhen Shen, and Jiaxuan You. Graphrouter: A graph-based router for llm selections. In The Thirteenth International Conference on Learning Representations, 2025.
[28] Nicholas Franzese, Jonathan Katz, Steve Lu, Rafail Ostrovsky, Xiao Wang, and Chenkai Weng. Constant-overhead zero-knowledge for ram programs. In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security, pages 178–191, 2021.
[29] Ariel Gabizon and Zachary J Williamson. plookup: A simplified polynomial protocol for lookup tables. Cryptology ePrint Archive, 2020.
[30] Ariel Gabizon, Zachary J Williamson, and Oana Ciobotaru. Plonk: Permutations over lagrange-bases for oecumenical noninteractive arguments of knowledge. Cryptology ePrint Archive, 2019.
[31] Nicolas Gailly, Ismael Hishon-Rezaizadeh, Tianyi Liu, Nicholas Mainardi, Dimitrios Papadopoulos, Charalampos Papamanthou, Christodoulos Pappas, Shravan Srinivasan, Zack Youell, and Yupeng Zhang. Deepprove: Verifiable end-to-end large language model inference. Cryptology ePrint Archive, 2026.
[32] LLM Gateway. Routing. https://docs.llmgateway.io/features/routing, 2026. LLMGateway Documentation, accessed 2026-03-12.
[33] Rosario Gennaro, Craig Gentry, Bryan Parno, and Mariana Raykova. Quadratic span programs and succinct nizks without pcps. In Annual international conference on the theory and applications of cryptographic techniques, pages 626–645. Springer, 2013.
[34] Oded Goldreich, Silvio Micali, and Avi Wigderson. Proofs that yield nothing but their validity or all languages in np have zero-knowledge proof systems. Journal of the ACM (JACM), 38(3):690–728, 1991.
[35] Lorenzo Grassi, Dmitry Khovratovich, Christian Rechberger, Arnab Roy, and Markus Schofnegger. Poseidon: A new hash function for {Zero-Knowledge} proof systems. In 30th USENIX Security Symposium (USENIX Security 21), pages 519–535, 2021.
[36] Bernard Grenat. Cryptographic signature of llm-generated texts: State, prospects, and limitations of the c2pa standard. https://bernard-grenat.medium.com/cryptographic-signature-of-llm-generated-texts-state-prospects-and-limitations-of-the-c2pa-45bdf56a82db, 2025. Medium blog post, accessed 2026-03-24.
[37] Jens Groth. On the size of pairing-based non-interactive arguments. In Annual international conference on the theory and applications of cryptographic techniques, pages 305–326. Springer, 2016.
[38] Paul Grubbs, Arasu Arun, Ye Zhang, Joseph Bonneau, and Michael Walfish. {Zero-Knowledge} middleboxes. In 31st USENIX Security Symposium (USENIX Security 22), pages 4255–4272, 2022.
[39] Yanpei Guo, Wenjie Qu, Linyu Wu, Shengfang Zhai, Lionel Z Wang, Ming Xu, Yue Liu, Binhang Yuan, Dawn Song, and Jiaheng Zhang. Immaculate: A practical llm auditing framework via verifiable computation. arXiv preprint arXiv:2602.22700, 2026.
[40] Meng Hao, Hanxiao Chen, Hongwei Li, Chenkai Weng, Yuan Zhang, Haomiao Yang, and Tianwei Zhang. Scalable zero-knowledge proofs for non-linear functions in machine learning. In 33rd USENIX Security Symposium (USENIX Security 24), pages 3819–3836, 2024.
[41] David Heath and Vladimir Kolesnikov. A 2.1 khz zero-knowledge processor with bubbleram. In Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security, pages 2055–2074, 2020.
[42] Qitian Jason Hu, Jacob Bieker, Xiuyu Li, Nan Jiang, Benjamin Keigwin, Gaurav Ranganath, Kurt Keutzer, and Shriyash Kaustubh Upadhyay. Routerbench: A benchmark for multi-llm routing system. arXiv preprint arXiv:2403.12031, 2024.
[43] Zhangxiang Hu, Payman Mohassel, and Mike Rosulek. Efficient zero-knowledge proofs of non-algebraic statements with sublinear amortized cost. In Annual Cryptology Conference, pages 150–169. Springer, 2015.
[44] Chung-ju Huang, Huiqiang Zhao, Yuanpeng He, Lijian Li, Wenpin Jiao, Zhi Jin, Peixuan Chen, and Leye Wang. Your inference request will become a black box: Confidential inference for cloud-based large language models. arXiv preprint arXiv:2603.00196, 2026.
[45] Piotr Indyk and Rajeev Motwani. Approximate nearest neighbors: towards removing the curse of dimensionality. In Proceedings of the thirtieth annual ACM symposium on Theory of computing, pages 604–613, 1998.
[46] Benoit Jacob, Skirmantas Kligys, Bo Chen, Menglong Zhu, Matthew Tang, Andrew Howard, Hartwig Adam, and Dmitry Kalenichenko. Quantization and training of neural networks for efficient integer-arithmetic-only inference. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2704–2713, 2018.
[47] Heng Jin, Chaoyu Zhang, Hexuan Yu, Shanghao Shi, Ning Zhang, Y Thomas Hou, and Wenjing Lou. Trusting what you cannot see: Auditable fine-tuning and inference for proprietary ai. arXiv preprint arXiv:2603.07466, 2026.
[48] Aly M Kassem, Bernhard Schölkopf, and Zhijing Jin. How robust are router-llms? analysis of the fragility of llm routing capabilities. In Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7496–7507, 2026.
[49] Evan Laufer, Alex Ozdemir, and Dan Boneh. zkpi: Proving lean theorems in zero-knowledge. In Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security, pages 4301–4315, 2024.
[50] Ben Laurie. Certificate transparency. Communications of the ACM, 57(10):40–46, 2014.
[51] Chenqi Lin, Yubo Cui, Zhelei Zhou, Cheng Hong, Yufei Wang, Zhaohui Chen, and Meng Li. Verirag: Efficient zero-knowledge proofs for verifiable retrieval-augmented generation. Cryptology ePrint Archive, 2026.
[52] Qiqi Lin, Xiaoyang Ji, Shengfang Zhai, Qingni Shen, Zhi Zhang, Yuejian Fang, and Yansong Gao. Life-cycle routing vulnerabilities of llm router. arXiv preprint arXiv:2503.08704, 2025.
[53] Hanzhi Liu, Chaofan Shou, Hongbo Wen, Yanju Chen, Ryan Jingyang Fang, and Yu Feng. Your agent is mine: Measuring malicious intermediary attacks on the llm supply chain. arXiv preprint arXiv:2604.08407, 2026.
[54] Tianyi Liu, Xiang Xie, and Yupeng Zhang. Zkcnn: Zero knowledge proofs for convolutional neural network predictions and accuracy. In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security, pages 2968–2985, 2021.
[55] Xiaogeng Liu, Zhiyuan Yu, Yizhe Zhang, Ning Zhang, and Chaowei Xiao. Automatic and universal prompt injection attacks against large language models. arXiv preprint arXiv:2403.04957, 2024.
[56] Yi Liu, Gelei Deng, Yuekang Li, Kailong Wang, Zihao Wang, Xiaofeng Wang, Tianwei Zhang, Yepang Liu, Haoyu Wang, Yan Zheng, et al. Prompt injection attack against llm-integrated applications. arXiv preprint arXiv:2306.05499, 2023.
[57] Yupei Liu, Yuqi Jia, Runpeng Geng, Jinyuan Jia, and Neil Zhenqiang Gong. Formalizing and benchmarking prompt injection attacks and defenses. In 33rd USENIX Security Symposium (USENIX Security 24), pages 1831–1847, 2024.
[58] LLM Gateway. LLM Gateway: Unified api for multiple llm providers. https://llmgateway.io, 2026. Accessed: 2026-04-29.
[59] Lingling Lu, Zhenyu Wen, Ye Yuan, Qinming He, Jianhai Chen, and Zhenguang Liu. Annproof: Building a verifiable and efficient outsourced approximate nearest neighbor search system on blockchain. Future Generation Computer Systems, 156:206–220, 2024.
[60] Wen-jie Lu, Zhicong Huang, Zhen Gu, Jingyu Li, Jian Liu, Cheng Hong, Kui Ren, Tao Wei, and WenGuang Chen. Bumblebee: Secure two-party inference framework for large transformers. Cryptology ePrint Archive, 2023.
[61] Daniel Luick, John C Kolesar, Timos Antonopoulos, William R Harris, James Parker, Ruzica Piskac, Eran Tromer, Xiao Wang, and Ning Luo. {ZKSMT}: A {VM} for proving {SMT} theorems in zero knowledge. In 33rd USENIX Security Symposium (USENIX Security 24), pages 3837–3845, 2024.
[62] Ning Luo, Timos Antonopoulos, William R Harris, Ruzica Piskac, Eran Tromer, and Xiao Wang. Proving unsat in zero knowledge. In Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security, pages 2203–2217, 2022.
[63] Yu A Malkov and Dmitry A Yashunin. Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs. IEEE transactions on pattern analysis and machine intelligence, 42(4):824–836, 2018.
[64] Alfred J Menezes, Paul C Van Oorschot, and Scott A Vanstone. Handbook of applied cryptography. CRC press, 2018.
[65] Ralph C Merkle. A certified digital signature. In Conference on the Theory and Application of Cryptology, pages 218–238. Springer, 1989.
[66] Andrew Miller, Michael Hicks, Jonathan Katz, and Elaine Shi. Authenticated data structures, generically. ACM SIGPLAN Notices, 49(1):411–423, 2014.
[67] Not Diamond. How prompt optimization works. https://docs.notdiamond.ai/docs/how-prompt-optimization-works, 2026. Accessed: 2026-04-26.
[68] Isaac Ong, Amjad Almahairi, Vincent Wu, Wei-Lin Chiang, Tianhao Wu, Joseph E Gonzalez, M Waleed Kadous, and Ion Stoica. Routellm: Learning to route llms from preference data. In The Thirteenth International Conference on Learning Representations, 2025.
[69] OpenAI. C2pa in chatgpt images. https://help.openai.com/articles/8912793-c2pa-in-chatgpt-images, 2024. OpenAI Help Center, accessed 2026-03-24.
[70] OpenAI. Introducing gpt-5.4. https://openai.com/index/introducing-gpt-5-4, 2026. accessed 2026-03-24.
[71] OpenRouter. Inc. Auto router. https://openrouter.ai/docs/guides/routing/routers/auto-router, 2026. OpenRouter Documentation, accessed 2026-03-12.
[72] OpenRouter, Inc. Openrouter. https://openrouter.ai, 2026. Accessed 2026-08-25.
[73] Bryan Parno, Jon Howell, Craig Gentry, and Mariana Raykova. Pinocchio: Nearly practical verifiable computation. Communications of the ACM, 59(2):103–112, 2016.
[74] Portkey, Inc. Portkey ai — production stack for gen-ai builders. https://portkey.ai, 2026. Accessed 2026-03-12.
[75] Portkey, Inc. Prompt engineering studio. https://portkey.ai/docs/product/prompt-engineering-studio, 2026. Portkey Documentation, accessed 2026-03-12.
[76] FIPS PUB. Digital signature standard (dss). Fips pub, pages 186–192, 2000.
[77] Fips Pub. Secure hash standard (shs). Fips pub, 180(4):2012, 2012.
[78] Zipeng Qiu, Wenjie Qu, Jiaheng Zhang, and Binhang Yuan. V3db: Audit-on-demand zero-knowledge proofs for verifiable vector search over committed snapshots. arXiv preprint arXiv:2603.03065, 2026.
[79] Wenjie Qu, Yijun Sun, Xuanming Liu, Tao Lu, Yanpei Guo, Kai Chen, and Jiaheng Zhang. {zkGPT}: An efficient non-interactive zero-knowledge proof framework for {LLM} inference. In 34th USENIX Security Symposium (USENIX Security 25), pages 2045–2063, 2025.
[80] Requesty Ltd. Prompt optimization. https://docs.requesty.ai/features/prompt-optimization, 2026. Requesty AI Documentation, accessed 2026-03-12.
[81] Requesty Ltd. Requesty: Unified llm gateway. https://www.requesty.ai, 2026. Accessed: 2026-04-29.
[82] Requesty Ltd. Smart routing. https://docs.requesty.ai/features/smart-routing, 2026. Requesty AI Documentation, accessed 2026-03-12.
[83] Christoph Schnabl, Daniel Hugenroth, Bill Marino, and Alastair R Beresford. Attestable audits: Verifiable ai safety benchmarks using trusted execution environments. arXiv preprint arXiv:2506.23706, 2025.
[84] Nima Seifi and Manish Chugh. Multi-LLM routing strategies for generative AI applications on AWS. https://aws.amazon.com/cn/blogs/machine-learning/multi-llm-routing-strategies-for-generative-ai-applications-on-aws/, 2025. Amazon Web Services Blog, published 2025-04-09, accessed 2026-03-12.
[85] Srinath Setty, Sebastian Angel, Trinabh Gupta, and Jonathan Lee. Proving the correct execution of concurrent services in zero-knowledge. In 13th USENIX Symposium on Operating Systems Design and Implementation (OSDI 18), pages 339–356, 2018.
[86] Avital Shafran, Roei Schuster, Thomas Ristenpart, and Vitaly Shmatikov. Rerouting llm routers. arXiv preprint arXiv:2501.01818, 2025.
[87] Jiawen Shi, Zenghui Yuan, Yinuo Liu, Yue Huang, Pan Zhou, Lichao Sun, and Neil Zhenqiang Gong. Optimization-based prompt injection attack to llm-as-a-judge. In Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security, pages 660–674, 2024.
[88] Shravan Srinivasan, Alexander Chepurnoy, Charalampos Papamanthou, Alin Tomescu, and Yupeng Zhang. Hyperproofs: Aggregating and maintaining proofs in vector commitments. In 31st USENIX Security Symposium (USENIX Security 22), pages 3001–3018, 2022.
[89] Succinct Labs. Sp1. https://github.com/succinctlabs/sp1, 2026. GitHub repository, accessed 2026-03-27.
[90] Haochen Sun, Jason Li, and Hongyang Zhang. zk-llm: Zero knowledge proofs for large language models. In Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security, pages 4405–4419, 2024.
[91] Haochun Tang, Yuliang Yan, Jiahua Lu, Huaxiao Liu, and Enyan Dai. Route to Rome attack: Directing llm routers to expensive models via adversarial suffix optimization. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 44333–44347, 2026.
[92] Florian Tramèr, Fan Zhang, Ari Juels, Michael K Reiter, and Thomas Ristenpart. Stealing machine learning models via prediction {APIs}. In 25th USENIX security symposium (USENIX Security 16), pages 601–618, 2016.
[93] Iqtedar Uddin and André Bauer. Conformal llm routing with distribution-free safety guarantees. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (ACL 2026), pages 791–799, 2026.
[94] Riad S Wahby, Srinath Setty, Max Howald, Zuocheng Ren, Andrew J Blumberg, and Michael Walfish. Efficient ram and control flow in verifiable outsourced computation. Cryptology ePrint Archive, 2014.
[95] Chenzhao Wang, Jilian Zhang, Xuyang Liu, Kaimin Wei, and Bingwen Feng. Verifiable graph-based approximate nearest neighbor search. In International Conference on Advanced Data Mining and Applications, pages 3–17. Springer, 2024.
[96] Fei Wang and Zebai Tian. Evidence-bound gateway-path provenance for third-party llm inference. arXiv preprint arXiv:2606.22560, 2026.
[97] Lizheng Wang, Hancheng Lou, Chongrong Li, Yu Yu, and Yuncong Hu. zkagent: Verifiable agent execution via one-shot complete llm inference proof. Cryptology ePrint Archive, 2026.
[98] Chenkai Weng, Kang Yang, Xiang Xie, Jonathan Katz, and Xiao Wang. Mystique: Efficient conversions for {Zero-Knowledge} proofs with applications to machine learning. In 30th USENIX Security Symposium (USENIX Security 21), pages 501–518, 2021.
[99] Xidong Wu, Yukuan Zhang, Yuqiong Ji, Reza Shirkavand, Qian Lou, and Shangqian Gao. Privacy-preserving llms routing. arXiv preprint arXiv:2604.15728, 2026.
[100] Arantxa Zapico, Vitalik Buterin, Dmitry Khovratovich, Mary Maller, Anca Nitulescu, and Mark Simkin. Caulk: Lookup arguments in sublinear time. In Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security, pages 3121–3134, 2022.
[101] Polygon Zero. Plonky2: Fast recursive arguments with PLONK and FRI. https://github.com/mir-protocol/plonky2/blob/main/plonky2/plonky2.pdf, 2022. Accessed 2026-03-12.
[102] Collin Zhang, Zachary DeStefano, Arasu Arun, Joseph Bonneau, Paul Grubbs, and Michael Walfish. Zombie: Middleboxes that {Don't} snoop. In 21st USENIX Symposium on Networked Systems Design and Implementation (NSDI 24), pages 1917–1936, 2024.
[103] Wenhui Zhang, Huiyu Xu, Zhibo Wang, Zhichao Li, Zeqing He, Xuelin Wei, and Kui Ren. Rerouteguard: Understanding and mitigating adversarial risks for llm routing. arXiv preprint arXiv:2601.21380, 2026.
[104] Yage Zhang, Yukun Jiang, Zeyuan Chen, Michael Backes, Xinyue Shen, and Yang Zhang. Real money, fake models: Deceptive model claims in shadow apis. arXiv preprint arXiv:2603.01919, 2026.
A Appendix
A.1 Algorithms of Semantic Search
Algs. 1 and 2 show upper-layer greedy descent and level-0 efSearch. Both rank a larger score first and retain the first encountered node on a tie, but they encode ties at different scopes. An upper-layer scan visits the current node and then its neighbors in stored order; its strict score comparison leaves the first maximum unchanged. At level 0, each node receives a persistent first-encounter position , and the search compares the lexicographic key . We use < and > under the applicable order in each algorithm.
A.2 Detailed ZK Protocols
A.2.1 Request Hash Instantiation
We instantiate the structured request hash ReqHash with Poseidon [35]. It hashes content bytes, binds each content digest to its message role and length, folds the message digests in request order, and binds the message count in a final hash. The ordered fold also supports composition over consecutive message ranges. All named hash contexts below use pairwise-distinct protocol-fixed domain separators. Roles, lengths, and bytes use fixed, injective field encodings.
Content digest. For a byte string ,
set and
Algorithm 1 Upper-layer greedy descent
Require: entry node at top layer , query embedding
1: cur
2: for do
3: while true do
4: best cur
5: stop 1 stop = 1 iff no improvement found
6: for u in the stored order of do
7: if u > best then
8: best u
9: stop 0
10: end if
11: end for
12: if stop = 1 then
13: break no improvement on layer , descend to layer
14: else
15: cur best advance to best neighbor and continue on layer
16: end if
17: end while
18: end for
19: return cur level-0 entry node: endpoint of upper-layer greedy descent
for , and define .
Message digest. For a message , define .
Ordered fold. Let IV be the protocol-fixed initial fold value. For a digest sequence and starting fold value , set and for , and define . A full request starts from . When consecutive message ranges are folded separately, each later range starts from the preceding range's output.
Final request hash. For a request , define
Rewrite-bank digests. The rewrite banks reuse these digest functions. The canonical message digest table contains for every complete message , and the canonical fragment digest table contains for every fragment . These digest tables instantiate the rewrite-bank commitments of Sec. 5.1. A committed lookup against authenticates , which the rewrite circuit places directly in the ordered message-digest sequence. For a selected fragment, the circuit recomputes from its bytes, authenticates it against , and reuses the bytes in .
Algorithm 2 Level-0 efSearch
Require: level-0 entry node , query embedding , beam width ef, output size k with
1: initialize visited set
2: initialize candidate queue max-heap by search key, PopMax returns the largest-key element
3: initialize working queue min-heap by search key, keeps the top-ef nodes
4: while do
5: cur C.PopMax()
6: if and cur < W.Worst() then
7: break best candidate is below working threshold, stop
8: end if
9: for u in the stored order of do
10: if then
11:
12: if or then
13: W.Push(u)
14: C.Push(u)
15: if then
16: W.PopMin() evict worst element to maintain capacity ef
17: end if
18: end if
19: end if
20: end for
21: end while
22: return the best k nodes in W
Lemma 1 (Request-hash collision resistance). If is collision resistant, then ReqHash is collision resistant for requests.
Proof. Suppose ReqHash(R) = ReqHash(R'). Unless some compared pair of calls already forms a collision, equality at the final call fixes the message count and final fold value. Working backward through the fold fixes every message digest, and working backward through each message and content hash fixes every role, content length, and byte. Hence , so distinct requests with the same hash yield a collision in .
The same backward argument, using the length-bound initialization , also shows that the fragment digest is collision resistant.
A.2.2 Table Digests
The approved profile fixes each table’s leaf encoding, hash functions, binary-tree height and padding, yielding [65, 66]. Internal nodes apply Poseidon to the concatenated child digests. Comparing two distinct fixed trees with the same root yields a hash collision. The profile records actual bank lengths, and enabled lookup indices are constrained to these ranges. We use these trees for the reference table, graph table and rewrite-bank digest tables.
The private per-request score table instead uses an internal full-table digest. Let be its public capacity and its -row serialization, with active rows in strictly increasing node-identifier order. Every remaining row equals the protocol-fixed inactive encoding , which is disjoint from every real score-table row. Define
Each model-selection subproof recomputes this digest from its private table copy, and aggregation requires the same in all three subproof statements. Collision resistance thereby binds the copies to one table, while the aggregation proof hides both the digest and the table.
A.2.3 Commitment Instantiation
We instantiate every commitment with . For a committed object A, let be its fixed-length digest: for a Merkle-authenticated table and when A is already a digest:
We encode injectively and sample as four fresh, independent, secret field elements, with entropy . Lemma 1, the fixed Merkle encoding and collision resistance make Eq. (17) computationally binding. We separately assume hiding in the joint ROM: for fresh commitments and queries, randomizer guessing contributes at most . VERIROUTER uses this construction for semantic tables, rewrite-bank digest tables and requests.
For queried entries Q of a committed table T, let . The witness contains , each queried row's leaf index, and its authentication path. The circuit enforces , which checks that every queried leaf has the requested row and reconstructs the same root, and that Eq. (17) yields .
A.2.4 Parallel Dot-product Gate
The score-opening subproof evaluates many high-dimensional node scores against one query. Our parallel dot-product gate shares the query coordinates across several node scores per row, reducing score-computation rows.
Score decomposition. Our implementation instantiates the deterministic score function from Sec. 2.1 with standard 16-bit affine quantization [46]. The public parameters fix the quantizer , its scale and zero point , and the score bias. The client computes and binds its digest in the verified statement. The score-opening circuit authenticates this . Each endorsed reference row stores
. Let be the embedding dimension. The certified score is
(18)
Because the query and zero point are the same for every node, the circuit computes the centered query coordinates and the query-only correction once. Eq. (18) then becomes for every node .
Gate organization. Each row processes coordinates for nodes, with one lane carrying each node's running sum. It stores the query coordinates once and, per lane, the node coordinates and incoming and outgoing sums. Thus it uses routed wires and quadratic equations for products.
The Plonky2 recursion configuration provides 80 routed wires. Maximizing subject to gives . Among the maximizing layouts, we choose because it uses the fewest lane constraints. One row therefore processes four nodes over 14 coordinates using 78 wires and four quadratic equations.
The circuit pads to its public size and groups its rows in fours. Let . For node group , lane contains node . For each dimension block , the gate enforces
Accumulator chaining. Consecutive gate rows process successive coordinate groups. Each lane starts with , and the circuit enforces for . After the final group, the circuit constrains to equal the row's activity bit and enforces . An inactive row is fixed to its padding value and requires no reference-table opening. Coordinates beyond are constrained to zero. The circuit range-checks and the resulting scores to 48 bits. Endorsement checks this coordinate range for the full reference table. Authenticated openings transfer it to each active . Setup requires and fixes bias = , so scores lie in without base-field wraparound and later comparisons use integer order.
Cost. For the padded score table , the dot-product body uses rows and adds one finalization row per four-node group for the active-row and final-score constraints. Thus the full parallel realization uses rows. Under the same 80-wire configuration, a generic Plonky2 formula gate checks 20 products per row, compared with 56 for our gate. At and , the generic realization uses 78,848 rows; our dot-product body uses 28,160 rows and its 256 finalization rows give 28,416 in total, a 64.0% reduction.
Gate correctness. For an active lane, unrolling Eq. (19) from its zero initial value and applying the chaining constraints gives . The final active-row constraint therefore gives , which is Eq. (18). The circuit authenticates the client-computed , constrains and , and authenticates each active . Thus sharing the query coordinates across lanes changes only the gate layout, not the certified score relation.
A.2.5 Level-0 efSearch Subproof Details
This subsection gives the trace layout and constraints by which certifies Alg. 2, organized around the three conditions in Sec. 5.2.4: queue-trace validity, cross-queue consistency, and the stopping rule and output.
Shared trace layout. Let be the public bound on candidate-expansion rounds and let be the public level-0 neighbor-row width. The padded trace length is , and the maximum reserved position in s operation order is . Let be the number of certified candidate pops, with and denoting the item and logical position of pop . As defined in Sec. 5.2.4, the padded UpdSeq_W has rows indexed by . Row is aligned with the node popped by its potential update. The sequence starts with and continues with the padded level-0 neighbor rows exposed by in this order. Inactive round blocks set , a protocol-fixed disabled node encoding disjoint from every real node identifier. Repeated nodes and padding remain in the sequence.
For and , let be the row index for neighbor position in round . The circuit assigns
(20)
Here is the position in s operation order reserved for row i. Only an admitted row uses it for an actual push. Rejected, repeated, padded, and inactive rows leave holes. All positions lie in and strictly increase with row order.
(i) Queue-trace validity. Let be a public upper bound on every encoded score. For every real queue item , let be its unique enabled row under the first-visit check below. Set and . Because the reserved positions strictly increase with row order, this key favors the first encounter on equal scores. The candidate checker packs this order using P as the position radix:
so its minimum is the largest-score, first-encountered candidate. For distinct sentinels , representing unused capacity, the working checker uses
(22)
so every unused sentinel has smaller than every real item and the minimum real item is the smallest-score, latest-encountered node. The instantiated priority relations are and . The circuit range-checks both packed keys. Setup admits only comparator parameters that preserve their integer order without field wraparound.
Every real queue item carries . We suppress the score and position in node notation when clear. The relation checks the position-annotated projections and . Its public push, pop, and final-sequence capacities are , , and , respectively.
Aligned W trace. The working trace first inserts the ef sentinels . Real identifiers, sentinels, , and have disjoint encodings, with disabled. Under , the generic checker pops the -minimum.
Every row retains and its reserved position . If , its remaining fields and aligned queue targets are fixed zeros and it contributes no operation. Let . The enabled item projection is 's real-node push sequence and hence its logical update sequence. After inserting each sentinel exactly once, the relation checks the complete position-annotated projections
(23)
The checker capacities are fixed in pp .
Inlined queue checkers. The circuit instantiates the generic checker from Sec. 4.2 for both C and W, with respective parameter-witness pairs and . Denote their certified final sequences by Final and Final . These sequences and the annotated traces are shared with , and the circuit enforces
Each real entry contains its identifier, score-table-bound score, and reserved position, with priority computed by Eq. (21) or Eq. (22).
(ii) Cross-queue consistency. First, node-order authentication binds the node sequence in UpdSeq_W to the C pop trace and the committed graph. For every , the circuit authenticates the padded row against and equates its p-th slot with . Together with , this makes every real node in UpdSeq_W either the initial entry or a neighbor of a node popped from C.
Second, the first-visit filter sorts a copy of by node and original row index and binds it by multiset equality. Adjacent-row checks mark only the earliest row of each real node, enforcing, for every ,
Whenever a row is enabled, the circuit binds to the node-and-score projection of the unique active row for in the level-0 subproof's padded score table and uses for its W update. Since is real and has no preceding row, Eq. (25) enables the first row and supplies the initial entry update. Thus, PushSeq_W is exactly the first-visit item sequence in row order.
Third, the admission filter links W admissions to candidate pushes. For every row, the circuit enforces
(26)
This reuses exactly the admitted rows in PushTrace_C with the same node, score-table-bound score, and reserved position. Let be the row indices assigned to round . Equations (20) and (26) place its admitted first visits in the positions following the round- pop.
(iii) Stopping rule. The entry update precedes all expansion rounds. For round , if the round has an admitted row, let . The circuit derives the one-hot first-admitted flag in UpdSeq_W row order and uses it to select . It enforces
When such a row exists, rows preceding in are rejected and leave W unchanged. By the capacity invariant, the first admission evicts a real item exactly when the round starts with ef real nodes, and that item is the round-start minimum. Equation (27) therefore checks the required threshold using this eviction. A round with no admitted row leaves W unchanged.
Let and be the real-node sets in Final and Final . The terminal check enforces
The sequence Final_W is certified by the W checker. Because every sentinel has smaller than every real node, the sentinels form a prefix. Let be the real-node
Public statement: .
Subproof witnesses: Each of , , and contains a private copy of and the openings and execution data required by its relation; also contains the two inclined queue-checker witnesses and the retained-row model-membership witness.
Prover:
- Subproofs. Generate
,
,
.
- Aggregation. Set
.
The aggregation circuit reconstructs the three statements from and , verifies exactly the three subproofs above, enforces Eq. (30), and outputs
.
Verifier: ZKVerify( ) {accept, reject}.
Figure 12: Protocol for the model-selection aggregation proof.
suffix. The final-sequence order gives . The circuit requires and enforces
Thus contains exactly the largest-key reference indices retained in the final . The circuit also enforces for some .
A.2.6 Model-selection Aggregation Protocol
Fig. 12 gives the model-selection protocol, which recursively aggregates the subproofs. The public statement is . Each subproof circuit privately receives its own copy of and exposes its digest only to the recursive parent. Let . The three subproof statements are
For recursive verification, the aggregation circuit is the parent and the proofs it verifies are its children. At circuit construction, the parent fixes each child's approved verifier data: circuit_digest identifies the child circuit, and constants_sigmas_cap authenticates its constant and permutation polynomials. The parent uses these fixed values to verify the child proof, binding it to the intended relation.
The score-opening subproof certifies by enforcing strictly increasing node-identifier order and fixed padding, authenticating every active row against , and computing its score. This performs each active row's high-dimensional score computation and reference-table opening once.
The traversal subproofs then reuse the certified scores through lower-cost table-consistency checks. Each traversal subproof represents every consumed score use by a tuple . It binds a sorted copy to all such tuples by multiset equality. For every adjacent pair of real-node tuples, the circuit enforces . Thus, all uses of the same node have the same score and model identifier. On each traversal's sorted copy, adjacent-row constraints mark the first tuple of every real-u run, retaining one representative solely for table accounting. Write Active( ) for the multiset of active rows. Let be the multiset of these representatives and let contain the remaining active rows. The circuit enforces
Eq. (31) matches each representative to its unique active row in , with accounting for the other rows. The repeated-use checks extend this binding to every occurrence. The level-0 subproof also binds its final top-k references to these tuples and enforces for at least one .
A.2.7 Rewrite Aggregation Protocol
Let . The public parameters fix a positive number of leaf-subproof slots, the maximum range width, the insertion bounds and , and all padding encodings. For a supported request, let and set exactly for the active prefix . The active slots have nonempty ranges that partition consecutively; every disabled slot has .
For a range , the private layout witness contains, in order, the enabled message-digest entries representing each , the enabled prefix and suffix fragment bytes around each for , and the entries representing only when . The relation DigestLayout enforces all message and fragment count bounds; preserves the role and original content of every ; recomputes each wrapped-message digest from its ordered prefix fragments, original content, and ordered suffix fragments; and forms in the exact order “ , , ,” followed by exactly for the last active range. It also derives and from exactly the enabled additions used in this sequence. Every disabled insertion slot has its fixed padding encoding and contributes to neither the digest sequence nor a lookup query. A disabled slot contributes the logical no-op , , and . Its proof slot contains a valid duplicate proof. Each active slot realizes the corresponding range of Eqs. (12) and (13).
Fig. 13 presents the aggregation relation in leaf order. The leaf proofs are combined through an aggregation tree. Each parent verifies its immediate child proofs using the fixed verifier data above, binds their bank commitments and request-randomizer digest, and joins consecutive message ranges and
Public statement: , where .
Prover:
- Leaf subproofs. For every active slot , let contain the selected additions and positions, the resulting digest sequence, and their bank openings. Let and be its input and output fold values, and let be its claimed digest count. Set
.
Let contain the enabled message digests and let . The leaf-subproof circuit enforces
DigestLayout ( )
.
(32)
These statement values remain internal to aggregation.
Generate
.
Fill each disabled proof slot with a valid duplicate. Its logical contribution is the no-op defined above.
- Aggregation. The aggregation circuit recursively verifies all leaf subproofs. Setting , it requires to select a nonempty prefix whose ranges consecutively partition the public and every remaining slot to contribute unchanged fold boundaries and zero count. It binds the shared subproof inputs to , chains their fold boundaries from , and, for fixed by , enforces
,
,
.
With , output
.
Verifier: .
Figure 13: Protocol for the rewrite aggregation proof.
matching request-hash/count boundaries. The trusted public circuit profile fixes this tree and a constant upper bound on its depth.
A.2.8 End-to-end Protocol
Fig. 14 gives the end-to-end protocol, which composes the model-selection proof, rewrite proof, and serving certificate by sharing M, , and rid across their checks. All structured inputs to use fixed, injective, length-delimited encodings. The client obtains the approved root verifier keys and circuit profile through the authenticated context. The figures name
Public context: ctx from Eq. (10).
Selection regime: At session setup, C chooses per-turn or session-pinned selection, which determines mode for each turn.
Request: C chooses a fresh rid and sends to R.
Serving and proof generation:
-
On a fresh-selection turn, R selects M; on a pinned turn, it reuses . It then constructs , samples fresh , sets , and forwards to .
-
On a fresh-selection turn, R runs the model-selection aggregation protocol in Fig. 12 to generate . On every turn, it runs the rewrite aggregation protocol in Fig. 13 to generate .
-
recomputes , evaluates , and returns and as defined in Eq. (11). R sends to C, omitting on pinned turns.
Client verification:
- Parse , obtain , require that rid equals the unused identifier issued for this request, check , and verify
.
-
Verify using the same and .
-
On a fresh-selection turn, derive and verify under the approved root key. Require the model identifier in the verified to equal M used in the serving-certificate check. On a pinned turn, instead require from the accepted initial fresh-selection turn.
-
Accept only if all checks required for mode accept. On the initial accepted turn of a session-pinned regime, set ; then mark rid completed.
Figure 14: End-to-end serving and verification protocol.
the bound query and request as and . The implementation represents them by client-computed digests binding the dimension/zero point and message count, respectively.
A.3 Constraint Complexity
This section analyzes the constraint complexity of the protocols.
All bounds below count constraints over the public padded capacities. Fixed-width local checks cost per processed entry, while a Merkle opening costs constraints linear in its tree height. The batched LUT and MSetEq arguments from Sec. 2.3 use constraints linear in their total table, query, or sequence lengths. Ordered copies are supplied as witnesses, bound by multiset equality, and checked locally, so they require no sorting network in the circuit.
Data-structure checkers. The stack checker processes padded event blocks and its final sequence. The priority-queue checker processes push/pop projections and an inclined stack trace over OutSeq. Let their total padded checker lengths be
In , and come from the inclined stack parameters .
For the stack checker, StackTransition applies a constant number of local constraints to each padded event. Its parent lookup has one table row per push and one query per push or pop, while StackAccounting compares the push sequence with the popped and final items. Each component therefore processes entries, giving constraints.
For the priority-queue checker, TraceConsistency scans OpPos and the push and pop projections, including their position multiset equality. QueueAccounting processes the push projection and OutSeq. QueueOrder adds the inclined stack checker, one removal-position lookup, and constant local inequalities per OutSeq item, while FinalSequenceOrder scans the final sequence once. All non-stack inputs have total length and are absorbed by ; its remaining term is exactly the padded inclined-stack length. Hence the checker uses constraints.
Model-selection proof. Let and be the reference-and graph-table Merkle heights. The padded score table has rows, and each reference vector has dimension . The upper-layer subproof has padded steps; writing , define its padded node workload as . At level 0, is the padded expansion bound and is the length of UpdSeq . Let and be the priority-queue checker lengths above instantiated for the two queues, and set . This includes the level-0 update rows and both inclined queue checkers. The filters and multiset-equality checks make only a constant number of linear passes over these rows.
The score-opening subproof computes and authenticates at most D-dimensional scores. Each traversal subproof makes another linear pass over the padded score table, absorbed by the same term. Upper-layer traversal opens at most one graph row per padded step, and level-0 traversal opens at most one per padded expansion. Let be the total cost of recursively verifying the three subproofs in aggregation, and write for the number of field elements in the public statement. The full model-selection proof therefore uses
Apart from recursive verification, this is linear in the displayed sum of padded score and traversal workloads. The full committed-index size enters only through the Merkle heights. Rewrite proof. Let be the total number of padded local rows processed across the rewrite leaf subproofs and their aggregation, excluding Merkle paths and recursive proof verification. It includes byte-hash steps, digest-layout and fold slots, selected-addition and range checks, and public-request bytes matched to subproof slices. Let OpenSlots and OpenSlots be the total padded message- and fragment-bank opening slots, with Merkle heights and . For leaf subproofs, let be the cost of recursively verifying one such subproof. The full rewrite proof uses
constraints. A complete inserted message contributes an authenticated digest and a fold slot but no byte hashing because the message bank supplies its digest. Fragment bytes contribute both the bank-digest and wrapped-message hash passes to . For fixed Merkle heights and recursive verifier, the bound is linear in . With binary Merkle banks, varying bank capacity affects it only through logarithmic Merkle heights.
A.4 Algorithmic Correctness
We prove the stack, priority-queue and level-0 efSearch characterizations with exact multiset equality.
A.4.1 Monotone-stack Checker Correctness
Theorem 6 (Equivalent checker for monotone-stack traces). For any strict total order , Eq. (3) holds if and only if is a valid monotone-stack execution on PushSeq and contains exactly the items remaining after that execution.
Proof. If , StackTransition is vacuous and StackAccounting holds exactly when is empty. This is precisely the empty monotone-stack execution. Assume below.
Necessity. Execute the monotone-stack algorithm and let be the stack after the -th event of , with denoting the stack before processing . Set , using for an empty stack. For every pushed item , set parent( ) to the top immediately before its push. A nonempty parent is therefore already on the stack when is pushed. A pop of then gives , , and . After the last pop, parent( ) = , this top is or fails the pop condition, and the push sets . The initial and boundary equalities are and . Hence StackTransition holds. Each insertion instance is popped once or remains in the final stack, so , establishing StackAccounting.
Sufficiency. Assume Eq. (3). Process the verified events in trace order and let denote the reconstructed stack after event of , with denoting the stack before processing . We maintain the invariant that is the first item of , or when it is empty, and that parent( ) is the next item below every in , or for its bottom item. The base case follows from . For a pop, popped removes the first item of the reconstructed stack, and is the first item of the remaining suffix. For a push of , parent( ) = links to the current top, and prepends it to the stack. Since each is a new insertion instance, this push cannot create a parent cycle. The equality carries this invariant to the next pushed item.
Every reported pop therefore removes the actual top and satisfies the pop condition. The final pre-push top is or fails that condition, so no required pop is omitted. Thus each , and hence , equals the monotone-stack execution of PushSeq. Finally, StackAccounting identifies with exactly the insertion instances not popped by this execution.
A.4.2 Priority-queue Checker Correctness
Parent-map property. The circuit represents the abstract value by a protocol-fixed sentinel larger than every enabled finite operation position. When the monotone stack scans OutSeq under , its map ParentMap satisfies parent( ) = , the latest preceding lower-priority item, or if no such index exists. Suppose . This item cannot have been popped before step , because the later item that popped it would itself be a later lower-priority predecessor of , contradicting the maximality of . Every item strictly between and that remains on the stack has higher priority than and is popped while processing , leaving on top. If , the same argument pops every remaining predecessor and leaves the stack empty.
Proof of Theorem 2. Necessity. Assume a valid execution and list its remaining items in decreasing priority as . Form OutSeq accordingly. For each , set to the position at which was pushed. Every pushed insertion instance is either popped once or remains in the final queue, so Eq. (5) holds. The order of gives Eq. (7).
Fix . Since an item must be inserted before it is removed, . If , then . Suppose . We have and . The item cannot be a final survivor. Otherwise would occur later in the final suffix, contradicting its decreasing-priority order. Hence . If , then also gives , so is live when the queue pops the lower-priority , contradicting priority-queue semantics. Equality is impossible because the assigned operation positions are distinct. Therefore , proving Eq. (6).
Sufficiency. Assume Eqs. (5)–(7). By the definition in Sec. 4.2, ordering the projection entries by position and discarding their labels gives . Eq. (5) associates each item in OutSeq with exactly one push. For each pop index , Eq. (6) gives , so is live when reported popped.
Suppose that a higher-priority item is also live at popPos_j. Then . The removal positions are increasing along the pop prefix and equal on the final suffix, so implies . Thus is an eligible index in the definition of , and maximality of gives . Monotonicity of removal positions then gives . Eq. (6) instead requires , a contradiction. Hence every pop removes the highest-priority live item.
After all operations, Eq. (5) makes exactly the un-popped items, and Eq. (7) orders them by decreasing priority. Therefore the trace and the claimed final sequence satisfy the theorem.
To apply this theorem to the circuit, observe that every witness satisfying Eq. (8) fixes one operation order through TraceConsistency. QueueAccounting and FinalSequenceOrder give Eqs. (5) and (7). Theorem 6 and the parent-map property above make parent( ) = , so the removal-position lookup and local inequalities give Eq. (6). Theorem 2 then gives a valid priority-queue trace and its exact decreasing-priority final sequence. Conversely, its necessity construction and the honest monotone-stack execution supply a satisfying witness for every such trace fitting the declared capacities.
A.4.3 Level-0 efSearch Constraint Correctness
Theorem 7 (Level-0 efSearch constraint correctness). Fix a graph, a score table and an entry node. With exact multiset equalities and lookups into this graph, the constraints in Appendix A.2.5 satisfy:
(i) Completeness. Every supported execution of Alg. 2 whose top-k output contains a node u with mid(u) = M supplies a satisfying assignment with that output.
(ii) Soundness. Every satisfying assignment describes an execution with these inputs. Its claimed set is the execution's top-k output and contains a node u with mid(u) = M.
Proof. (i) Queue-trace validity. The circuit enforces both checks in Eq. (24) on its queue variables and the node keys from its fixed score table. The priority-queue argument above therefore gives valid queue traces and exact final sequences under the two instantiated priority orders. It remains to show that the sentinel representation of W implements its capacity bound. For a real-node set A, let be its ef largest-key members, or all of A if . For each , let be the jth item of , let be its node component, and let be the real-node projection after the first j logical updates. Let be the unique enabled row projecting to . Then
(33)
We prove Eq. (33) by induction on . The base case is the sentinel-only initialization, whose real-node projection is empty. If , the minimum after insertion is a sentinel, so the new node remains. If , the update removes the minimum of . The inserted node is removed exactly when it is outside . This proves the capacity invariant and admission equivalence in Eq. (33), matching the conditional update in Alg. 2.
(ii) Cross-queue consistency. First, committed graph lookups bind the node sequence in UpdSeq to the entry node followed by the level-0 neighbor lists exposed in C pop order. Second, Eq. (25) makes PushSeq exactly the first-visit item sequence. Every enabled row uses its reserved as the node's persistent tie-breaking position. Equation (23) makes that row act on the W contents produced by its enabled predecessors.
Third, let and let be the admitted rows of UpdSeq_W. Since Eq. (26) directly reuses these rows as the candidate insertion projection,
Thus C receives exactly the admitted first visits in their original order and with the same reserved positions. Equation (20) places every round-a push after the pop that exposed its authenticated neighbor row and, when another certified round follows, before the next certified candidate pop. Starting from the entry push at position 1, induction on a therefore makes the candidate queue at the start of every round before the output-preserving suffix equal the queue obtained from the preceding rounds of Alg. 2. The stopping argument below handles any later certified suffix. Together, the authenticated neighbor openings, Eq. (25), Eq. (34), and the assigned operation positions for both queues reproduce the cross-queue operations and stable first-encounter priorities of every non-terminal algorithm round.
(iii) Stopping rule and output. Index the certified expansion rounds by . Let and be the candidate and retained real-node sets at the start of round , so , and, when , let . If round admits an update, every row before its first admitted row is rejected and leaves unchanged. By Eq. (33), that first admission evicts a real item if and only if . When real, the eviction has key . Equation (27) therefore enforces exactly when required. Hence, if , the round admits no update: and no new candidate is pushed. Therefore . Repeating this argument gives, for every subsequent nonempty round ,
(35)
Thus the suffix contains no admitted update and leaves W unchanged. Deleting it leaves the pre-pop configuration of round a. Appending the algorithm’s PopMax of and taking its stopping branch yields a valid execution with the same final W. Equation (28) is the equivalent pre-pop form of the algorithm’s stopping rule. If is nonempty, its largest-key item is the next candidate popped and immediately satisfies the stopping test.
Completeness. From an honest supported execution, form UpdSeq from the authenticated neighbor rows, assign its bits and positions as above, and prepend the ef sentinels. Parts (i)–(iii) show that these witnesses satisfy both queue relations, the cross-queue links, and the stopping checks, using empty terminal queues on exhaustion or the equivalent pre-pop queues on early stopping. Equation (29) and the model-membership constraint bind the claimed output, so the honest execution supplies a satisfying assignment.
Soundness. Consider a satisfying assignment to these constraints. Parts (i)–(iii) reconstruct an execution of Alg. 2 with the same final W, after deleting any below-threshold no-admission suffix. Equation (29) binds its returned top-k set, and the membership constraint binds one returned row's model identifier to M.
A.5 Cryptographic Security
We state the security preliminaries and then prove protocol security using Appendix A.4.
A.5.1 Security Preliminaries
To derive integrity from client acceptance, the reductions need concrete witnesses and commitment openings, together with bounds on the probability of accepting invalid checks. We specify the security experiment and the knowledge-soundness assumption, then establish the lemmas used for recursive extraction, recovery of endorsed data, and randomized multiset checks.
Security experiment. Fix an authenticated endorsed context and approved circuit profile. In the integrity experiment, the reduction retains the original tables/banks and their openings, simulates honest providers, and records each actual . The router adversary makes adaptive calls and wins if the client accepts for its current unused rid without a matching serving record, with an ineligible model, with an actual request outside , or with a response different from the recorded model output. Fresh turns verify the selection statement. Pinned turns use the initially accepted model.
Knowledge soundness. Our implementation uses ZK-enabled Plonky2 1.1.0 (PLONK + FRI) over Goldilocks/Poseidon with extension degree two. The ROM analysis of formalized Plonky2 establishes adaptive knowledge soundness [12]. We state the corresponding extraction assumption for the implemented circuit family using the auxiliary-input formulation of [11].
Assumption 1 (Knowledge soundness). The implemented proof system satisfies adaptive auxiliary-input knowledge soundness for every approved circuit, including the recursive verifier circuits. Specifically, for every approved circuit C and polynomial-size prover P, there exists a polynomial-size extractor such that, for every polynomial-length auxiliary input, when P produces an adaptively chosen public input x and proof , the extractor outputs a witness w with
Here means that w satisfies C with public input x. The extractor has access to P. Both share the public parameters, auxiliary input and random oracle. The auxiliary input may include the prover's and preceding extractors' coins. Provers, extractors and adversaries against the primitive assumptions may be nonuniform polynomial-size algorithms.
The auxiliary-input guarantee supports joint extraction from polynomially many proofs [11]. We use it to extract each level of the approved aggregation tree.
Lemma 2 (Joint extraction through the recursion tree). Fix an approved aggregation tree of constant depth and polynomial size, with the complete child verifier data fixed on each recursive edge. Under Assumption 1, every polynomial-size root prover has a polynomial-size extractor that obtains the root witness, all intermediate witnesses, child proofs and their public inputs, and all enabled leaf witnesses. These satisfy their approved circuits for the same root statement. Root acceptance with extraction failure has probability at most , where is the joint-extraction error at level .
Proof. Let extract and retain the root witness, containing child proofs and public inputs accepted under the approved keys. Let run and output these child instances. Joint knowledge extraction gives . Include 's coins in the common auxiliary input so that targets the same instances. Repeat at each level, retaining all witnesses. This is the level-by-level recursive-composition argument of [11], applied with the common random oracle in Assumption 1.
Parent constraints bind child statements to the selection query, context, score-table digest and traversal endpoint, and the rewrite bank commitments, request-randomizer digest, consecutive ranges and hash/count boundaries. Leaf witnesses provide bank indices, fragment bytes and other local data. Inlined checks use the parent's extracted witness. Disabled rewrite slots contribute no messages and preserve fold boundaries. Each level involves polynomially many child instances and polynomial-size extraction. The profile bounds the number of recursive layers by a constant independent of the security parameter (Appendix A.2.7). Composing the extractors across these layers therefore retains polynomial size. A union bound over levels gives .
Lemma 3 (Recovery of endorsed data). Given a valid extracted lookup witness for an accepted table commitment and the corresponding endorsed table and opening retained in the security experiment, a polynomial-size reduction recovers the endorsed row at the extracted index or outputs two distinct commitment openings or a hash collision. For MsgBank, the row identifies the complete retained message. Extracted fragment bytes equal the retained fragment unless a hash collision is found.
Proof. The extracted lookup provides opening the accepted table commitment. Compare it with the retained endorsed opening of that same commitment. If , these are two concrete openings to distinct digests, violating binding. Otherwise, compare the extracted Merkle path at its real leaf index with the retained tree. A differing row yields a Merkle-hash collision. If the row agrees, the index identifies the retained complete message or fragment. Different extracted fragment bytes with the same retained digest yield a collision in b. All comparisons and indexed reads take polynomial time. Thus the reduction recovers the data from the retained table, using the extracted index and bytes.
Lemma 4 (Error of randomized multiset checks). In the shared random-oracle model, consider the circuits' multiset tests indexed by . Each test binds its complete compared sequences before deriving two independent challenge pairs. For test j, let be its number of factors, its tuple width, and . With at most oracle queries, the probability that an unequal multiset passes both comparisons without a transcript-hash collision is at most
where and includes retries and extraction queries.
Proof. The Poseidon transcript fixes the capacities, seeds and complete compared sequences, including their order, activity bits and first-visit annotations, before generating challenges. Each test type has a distinct domain-separation tag. Repetitions use distinct tags or separate output coordinates, modeled as independent uniform outputs in the shared ROM.
Unequal multisets define a nonzero difference polynomial of total degree at most . The polynomial root bound gives error at most for one challenge pair and its square for two independent pairs. A union bound over tests and oracle queries gives the stated bound. The circuit compares products without division, so zero factors require no separate case. Substituting a sequence while preserving its bound transcript digest yields a hash collision.
The stack and priority-queue lemmas in Appendix A.4 apply to exact multiset equality. Lemma 4 bounds the failure of this condition in the extracted circuit witnesses. The security reductions add and to the relevant primitive-security advantages. Asymptotic security uses parameter families for which these quantities are negligible. Fixed implementation parameters give corresponding concrete bounds.
A.5.2 Proof of Control-plane Integrity
Proof of Theorem 3. Completeness. Consider first a fresh-selection turn. As specified in Fig. 14, client verification derives and using , while the score-opening circuit authenticates . For an honest supported execution, form by sorting the nodes scored by either traversal by identifier and padding to . Every active row opens against and satisfies . Applying Eq. (16) gives , so the score-opening subproof accepts. Give the same table to the two traversal subproofs. Their distinct consumed-row representatives together with the remaining active rows satisfy Eq. (31). The honest upper-layer trace satisfies the authenticated greedy transitions of Alg. 1 and outputs its level-0 endpoint. By Theorem 7, the honest level-0 trace then yields the algorithm's final retained set.
Let be the largest-key reference indices in that set. By Theorem 7 and Eq. (29), . Eligibility supplies a node satisfying
The level-0 subproof checks this witness directly. All three subproofs therefore accept, and proof-system completeness gives an accepting . On a pinned turn, an honest serving event has , so the pinned-model check accepts. Hence the corresponding control-plane verification accepts in either mode.
Soundness. Consider first an accepted fresh-selection turn in the security experiment of Appendix A.5.1. Suppose ZKVerify( ; ; ) = accept. Lemmas 2 and 4 give the three child proofs, their statements and satisfying witnesses with exact multiset equalities, outside their bounded failure events. Apply Lemma 3 to the extracted commitment openings and Merkle paths. Every opened reference or graph row then equals its retained endorsed row, except when the reduction outputs a binding violation or hash collision. Compare the three extracted score-table serializations under their common . A difference supplies a collision in Eq. (16). Otherwise they define one padded score table. The extracted score-opening witness therefore gives, for every active row,
For each traversal subproof, Eq. (31) binds every distinct consumed-row representative to an active row, while the repeated-use equality checks propagate that row's score and model identifier to every use of the same node. Hence both traversals use only the authenticated scores in Eq. (37).
Induction over the upper-layer steps using the authenticated stable-maximum and transition conditions in Sec. 5.2.3 yields the prescribed greedy descent and its level-0 entry . Theorem 7 and Eq. (29) then give . The level-0 subproof's retained-row consistency and model-membership constraint give Eq. (36), so
and therefore holds. On a pinned turn, accepted control-plane verification directly requires , where is the client-held state from the initial accepted fresh-selection turn; hence holds. Thus every accepted control-plane verification establishes .
A.5.3 Serving-certificate Correctness
Theorem 8 (Serving-certificate correctness). Assume the serving trust and key-registration model of Secs. 3 and 5.1, a signature scheme that is existentially unforgeable under chosen-message attack (EUF-CMA), and collision resistance of . Then the serving certificate satisfies:
(i) Completeness. Every certificate honestly generated for a serving event is accepted for its matching unused rid.
(ii) Soundness. Except with negligible probability, every accepted certificate for (rid, , Y, M) authenticates an event identified by rid for which there exist and satisfying
Proof. Completeness. For an honest event, computes Eq. (11). The client recomputes and , sets , and verifies . Signature correctness therefore implies acceptance for the matching fresh rid.
Soundness. The reduction simulates honest providers in the security experiment of Appendix A.5.1, retaining each serving call's request , randomizer , response and receipt. For a target provider key it obtains receipt signatures from the EUF-CMA signing oracle and records the queried digests. If an accepted digest was not queried, the signature is a forgery. Otherwise compare its receipt tuple and response with the matching log entry: a difference supplies a collision in the receipt or response hash. When they agree, the reduction reads from that entry, with and . The authenticated registry, signed model and current unused rid bind it to the accepted event.
A.5.4 Rewrite-proof Correctness
Theorem 9 (Rewrite-proof correctness). Under collision resistance of , computational binding of the commitments, proof-system completeness, and Assumption 1, the rewrite proof satisfies:
(i) Completeness. For every endorsed rewrite within the public bounds, an honestly generated is accepted.
(ii) Soundness. For every polynomial-size adversary A, there exists a polynomial-size extractor with access to A and the retained endorsed banks. The probability of an accepted proof without a recovered concrete request and commitment randomizer satisfying the following equality is negligible:
Proof. Completeness. Fix within the public bounds and let . Membership supplies the required layout and bank-opening witnesses. Partition the client-message indices among a nonempty prefix of the leaf-subproof slots. For each active slot , set to its digest subsequence, , and . Fill every remaining proof slot with a valid duplicate and give it unchanged logical fold boundaries and zero count. Every active leaf relation and disabled logical transition then holds, and Eq. (15) gives . Thus the aggregation relation holds for , and proof-system completeness yields an accepting .
Soundness. Apply Lemma 2 to this accepted root, obtaining and the connected parent and enabled leaf assignments. Read the leaves in consecutive range order. Their original-message hash/count boundaries connect to the client-pinned request, so their original messages equal unless the reduction obtains a request-hash collision.
Apply Lemma 3 to the retained banks and every extracted lookup. Each MsgBank index supplies the complete stored message, and each fragment witness supplies bytes matching its endorsed digest. The reduction therefore constructs the gap sequences and wrapped client messages, and concatenates them in the order of Eqs. (12) and (13), including the trailing gap exactly once. This gives a concrete . Its digests are exactly the extracted sequence . The connected fold/count boundaries and root commitment equation consequently give the opening of this root's . Failures produce an extraction failure, a binding violation, or an explicit hash collision, as above.
A.5.5 Proof of Data-plane Integrity
Proof of Theorem 4. Completeness. For an honest endorsed rewrite, sample fresh and set . The honest provider processes and constructs Eq. (11), which is accepted by Theorem 8. Since the same lies in , Theorem 9 gives an accepted under the same .
Soundness. For an accepted , the reduction reads from the matching honest-provider log (Appendix A.5.1 and Theorem 8). Here is the request actually received by M. The extractor of Theorem 9 obtains by recursive extraction and bank reconstruction, with . Client verification binds both to the same :
If , the reduction outputs these two concrete openings of , breaking computational binding. If the digests agree but , it outputs a request-hash collision under Lemma 1. Otherwise and the recorded response is . These failures have negligible probability under the stated assumptions.
A.5.6 Proof of End-to-end Security
Proof of Theorem 5. Completeness. Consider a supported honest event. On a fresh-selection turn, Theorems 3 and 4 give accepting and , respectively. Fig. 14 uses the same M in and , the same in and SC, and the client-issued rid in the certificate. Every client check therefore accepts. On a pinned turn, the honest router reuses , so the pinned-model check accepts, while Theorem 4 supplies an accepted rewrite proof and serving certificate for the current request.
Soundness. In the common security experiment of Appendix A.5.1, suppose the client accepts a fresh-selection turn. Except with negligible probability, Theorem 3 gives the first condition of Eq. (2), while Theorem 4 gives one satisfying its latter two conditions. The protocol verifies both statements with the same M, sets , and checks the certificate against the current rid. Hence all three conditions hold for the same serving event. On a pinned turn, acceptance requires , establishing the first condition, while Theorem 4 gives the latter two conditions for the current .
Confidentiality. Assume adaptive multi-theorem zero knowledge for the root proofs. Given the actual public context, request, selection mode, model identifier, response, commitments, reported lengths and proof shapes, the simulator replaces the fresh-turn selection proof and then the rewrite proof with simulations for their true public statements. In these two hybrids it preserves the commitments and serving receipt, using previously simulated proofs as auxiliary input. Zero knowledge makes each replacement computationally indistinguishable. A pinned turn has no new . Because is internal to recursive model-selection aggregation, this simulation also hides it and the private score table.
Computational hiding of the commitments in Appendix A.2.3 hides the semantic index and rewrite banks, while fresh makes hide the model-received request digest. Apart from the public response Y, the serving certificate depends on only through , since it signs . The simulation argument applies to the returned cryptographic evidence conditioned on the accepted public context ctx, including its public circuit configuration. It does not capture information inferred from deployment-level choices among public capacity configurations or from correlated system-level observables such as proof-generation latency. Hence, conditioned on the public data, the returned cryptographic evidence reveals no additional information about the router's private data beyond the public statements and the fact that the accepted relations hold.
A.6 Endorsement and Confidentiality Boundaries
Policy endorsement and context evolution. VERIROUTER proves conformance to the specifications committed in the public context ctx. Determining whether these specifications define an acceptable policy, and how they are audited, is outside our scope. One simple realization uses an independent auditor with access to the private semantic index and rewrite banks to validate policy-specific requirements, such as eligible-model assignments and the absence of disallowed sponsored content [83]. The auditor also verifies that the reviewed specifications and their commitment openings reproduce the commitments in ctx, then endorses the context by signing . This review checks the reference table's dimensions and 16-bit coordinate bounds, and approves the circuit profile and verifier keys used by the client. Such signed endorsements can be recorded in an append-only transparency log, following established designs in certificate, key, and software transparency [50]. When the semantic index, rewrite banks, or retrieval content changes, a new context can be audited, endorsed, and appended to the log. Clients can verify the auditor's signature and log inclusion, while consistency proofs bind successive log checkpoints to an append-only history. This mechanism remains orthogonal to VERIROUTER. The external auditor determines which contexts are endorsed, while VERIROUTER efficiently proves that each serving event conforms to the context accepted by the client.
Confidentiality boundaries. The confidentiality guarantee of VERIROUTER concerns the returned cryptographic evidence under the accepted public context ctx. Zero knowledge ensures that the model-selection and rewrite proofs reveal no additional information about their private witnesses beyond their public statements and the fact that the certified relations hold. Public parameters can nevertheless expose coarse information. In particular, fixes padded capacities such as the score-table and traversal bounds. If a deployment chooses among multiple public capacity buckets, the selected bucket reveals a coarse bound on the corresponding private workload. Proof-generation latency may provide an additional signal when it correlates with the selected capacity. Using a single fixed capacity eliminates leakage due to capacity selection at additional proving cost, while a small set of buckets provides an explicit efficiency–leakage tradeoff.
Beyond such capacity-related leakage, system-level observations may reveal additional information that is outside the cryptographic guarantee. Visible model identities, responses, and adaptively repeated queries may enable inference about the underlying routing policy. Such inference is complementary to VERIROUTER and can be studied or mitigated separately [92]. Likewise, VERIROUTER does not hide the client's request from the router. Confidential-request processing can be provided by complementary techniques [1, 22, 44, 60].
A.7 Fidelity of the Quantized Routing
VERIROUTER’s cryptographic guarantee is with respect to the committed 16-bit affine-quantized semantic index under its public search configuration. We separately evaluate whether choosing that quantized index materially changes the outputs of a floating-point semantic search. We compare floating-point and quantized semantic search result sets under three label spaces: retrieved node identifiers (IDs), model IDs, and model-tier IDs. Following RouteLLM [68], a tier ID groups concrete models into a coarser routing tier. For each query and label space, let and be the sets obtained by projecting the floating-point and quantized top-k outputs, respectively. We define overlap as and Jaccard similarity as , and report their averages over queries. Floating-point (FP) Top-1 Hit@k is the fraction of queries for which the floating-point top-ranked node’s label appears among the quantized top-k labels.
Tab. 5 shows high agreement between quantized and floating-point semantic search across all three label spaces. Even at the finest node-ID level, overlap remains between 89.11% and 90.25%. More importantly for the verification target, the eligible model set is highly stable: model-ID overlap ranges from 91.62% to 95.78%, and the model label of the floating-point top-ranked node appears among the quantized top-k labels for 92.16%–96.21% of queries. Agreement is stronger at the tier level, where overlap reaches 95.91%–99.52% and FP Top-1 Hit@k reaches 97.78%–100.00%. Thus, 16-bit quantization primarily perturbs individual retrieved references while largely preserving the eligible models associated with them.
Table 5: Routing-quality comparison of quantized and floating-point HNSW. We compare result sets after projection to node IDs, model IDs, and tier IDs; certification and deployment both use the quantized index. The results show high agreement across all label spaces.
| Label space | Metric | Top-5 | Top-10 | Top-20 | Top-50 |
|---|---|---|---|---|---|
| Node ID | Overlap | 89.71% | 90.12% | 90.25% | 89.11% |
| Jaccard | 87.95% | 87.97% | 87.83% | 85.10% | |
| FP Top-1 Hit@k | 91.64% | 91.70% | 93.21% | 93.21% | |
| Model ID | Overlap | 91.62% | 92.14% | 94.80% | 95.78% |
| Jaccard | 89.70% | 89.72% | 92.16% | 92.74% | |
| FP Top-1 Hit@k | 92.16% | 93.01% | 95.69% | 96.21% | |
| Tier ID | Overlap | 95.91% | 98.17% | 98.42% | 99.52% |
| Jaccard | 94.17% | 97.37% | 97.22% | 97.93% | |
| FP Top-1 Hit@k | 97.78% | 99.74% | 99.93% | 100.00% |