NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Consumer-Time Validity in Stateful AI Runtimes: Verifying Recovered State and Deferred Authority

Guijia Zhang, Huihao Jing, Bing Li, Shing-Chi Cheung, Harry Yang, Ziqi ZhangarXiv 2026

It’s late, you’re tired, and you’ve probably spent the day wrestling with an LLM that occasionally forgets what it was doing. But have you ever wondered if your AI runtime is accidentally handing your private data to another user because it "forgot" a failure occurred?

This paper dives into a subtle but dangerous class of bugs in stateful AI systems—the kind where the system records a failure in one place but forgets to tell the "consumer" of that data later on.

TL;DR

Just because an AI system records that a task failed or was canceled doesn't mean the next component in the pipeline won't accidentally use the leftover "garbage" state. This paper introduces Consumer-Time Validity, a framework for ensuring that stateful AI runtimes verify data and permissions at the exact moment they are used, preventing data leaks and unauthorized actions.

What Problem Does This Paper Address?

Modern AI "agents" and serving engines (like vLLM) are fast because they are stateful. They reuse a "KV cache" (essentially the LLM's short-term memory) and deferred permissions to avoid redoing expensive work.

The problem is a classic "Time-of-Check to Time-of-Use" (TOCTOU) gap. Imagine User A starts loading a massive prompt, but the connection drops halfway through. The system records the failure. However, the "index" (the map of the memory) might still think those memory blocks are valid. When User B arrives, the system sees a "cache hit" in those same blocks and accidentally lets User B read User A’s partial data.

The schematic shows how an interrupted load or a stale grant leads to "wrong-target" calls or silent overwrites.

The authors found that in systems like vLLM with LMCache, this isn't just a theory—it happens consistently, leading to "wrong-target" tool calls where one user’s session triggers actions meant for another.

Methods

The authors propose a three-step solution:

  1. Consumer-Bound Recovery Contracts: They formalize what a consumer must check before touching state. This includes Exclusion (don't use revoked/unwritten data), Retention (keep the good stuff), and Completion (ensure the task actually finished).
  2. Admissible Witnesses: They define what counts as "good evidence" for validity. Crucially, they argue that simply checking if the LLM's output "looks right" is a terrible test because of numerical drift (more on that below). Instead, they use scheduler metadata and "allocation generations" (think of these as version numbers for memory blocks).
  3. Offline Trace Verifier: They built a GPU-free tool that audits execution logs to see if these contracts were violated.
  4. Boundary Repairs: They implemented specific fixes in five different AI systems to ensure that when a failure happens, the "poisoned" state is actually evicted or the device is properly rewound.

Datasets

The researchers didn't use a standard text dataset; instead, they evaluated Stateful AI Runtimes as their "subjects." These included:

  • vLLM + LMCache (Serving engine)
  • SGLang (Structured LLM execution)
  • Google ADK (Agent Development Kit)
  • ChatGLM2 (A popular open-source model stack)
  • DSH Approval Runtime (A multi-session agent system)

They tested these against a "frozen GPU matrix"—a suite of 42 different fault scenarios (like interrupted loads and preempted tasks) to see if their verifier could catch the resulting errors.

Key Insights and Ideas

  • The "Numerical Drift" Trap: You might think you can verify a system by checking if the output matches a "perfect" run. The authors show this is impossible. Because of how GPUs handle math (specifically BF16 batching), two identical, bug-free runs can diverge by the 30th token just because of how the math was grouped. You can't use output equality as a security oracle.
  • State vs. Authority: Validity comes in two flavors. State Validity is about the data (is this KV cache entry mine and is it complete?). Authority Freshness is about permissions (is this "write" grant still valid, or has the file changed since I got permission?).
Table 2: State validity and authority freshness differ in what the consumer must check. Both instances ask the consumer to re-establish at use what an upstream record asserted at issue.
  • Fail-Closed Isolation: The authors argue for a "fail-closed" approach. If the system can't prove the state is valid (a "missing witness"), it must refuse to proceed rather than assuming everything is fine.

Key Results

  • Vulnerability Confirmed: In 10 out of 10 test runs on unpatched vLLM, an interrupted load allowed a second user to generate a valid tool call naming the first user—a clear isolation failure.
  • Verifier Accuracy: Their offline verifier correctly identified the outcome in 42 out of 42 complex GPU fault scenarios.
  • Repair Sufficiency: Their "allocation-aware" repair fixed all 7 triggered fault types they identified, whereas existing community patches only fixed 2 out of 7.
  • Low Overhead: The verification hooks are lightweight, costing only about 25.7 microseconds per step on the CPU.

Limitations and Future Work

  • Scope: The theory currently focuses on the consumers they studied (schedulers, exporters, dispatchers). It doesn't yet provide a "universal" monitor for every possible AI runtime.
  • Metadata Exposure: For this to work, a runtime must be willing to expose its internal "identities" (like allocation epochs). If a provider hides its scheduler logic, external verification becomes much harder.
  • Asynchronous Gaps: The current experiments don't measure validity over the entire duration of a long asynchronous read, which remains a potential area for future design improvements.

Summary updated

BibTeX
@misc{zhang2026consumer,
  author = {Guijia Zhang and Huihao Jing and Bing Li and Shing-Chi Cheung and Harry Yang and Ziqi Zhang},
  title = {{Consumer-Time Validity in Stateful AI Runtimes: Verifying Recovered State and Deferred Authority}},
  year = {2026},
  eprint = {2611.29004},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.29004},
}
Figure