多智能体大语言模型系统中并发异常的可验证检测与预防
Verified Detection and Prevention of Concurrency Anomalies in Multi-Agent Large Language Model Systems
AI总结:
针对多智能体LLM系统,形式化四种并发异常并建立一致性层级,通过Verus验证检测器正确性,并在Rust运行时中实现预防。
摘要:
多智能体LLM系统通过内存存储、向量索引和工具注册表共享状态。我们将这种共享建模为在确定性生成语义(持久化执行引擎通过确定性重放强制执行的机制)下的长期读-生成-写操作,并在TLA+中形式化了四种并发异常:陈旧生成、幻影工具、因果级联和工具效应重排序,它们是经典隔离异常的结构类比,每种都有TLC反例。这些异常上的排除格是平凡的;贡献在于机械验证了其中一条最大链$L_0 \subsetneq \cdots \subsetneq L_4$的可实现性和严格分离,据我们所知,这是此类运行时第一个机器检查的一致性层级。通过274个Verus义务(零假设、零接受;信任基础:两个结构公理和一个互斥对应关系)的开发,证明了检测器相对于规范的正确性和完备性,以及每个运行时对应的避免集。三个部署的Rust运行时实现了L0-L1(悲观锁、可序列化快照隔离、默认SI),每个都针对陈旧生成进行了验证并细化到其状态机;L2-L4通过执行模式验证,并具有无依赖的预防孪生(A3、A6、A2:0/1000对比1000/1000),L2在三个模型家族上实时运行(A3在所有120个撤回会话中均被预防)。我们复现了字节跳动deer-flow中的静默丢失更新,将其修复形式化为已验证的$L_0 \to L_1$细化,并在LangGraph的ToolNode上展示了未修改输出中的工具效应重排序,通过L3提交顺序序列器消除。已验证的检测器、细化和可实现性工件是贡献;现象和格是经典的。
英文摘要:
Multi-agent LLM systems share state through memory stores, vector indices, and tool registries. We model such sharing as long-running read-generate-write operations under deterministic-generation semantics -- the regime durable-execution engines enforce by deterministic replay -- and formalize four concurrency anomalies in TLA+: stale-generation, phantom-tool, causal-cascade, and tool-effect reordering, structural analogues of classical isolation anomalies, each with a TLC counter-example. The exclusion lattice over these anomalies is trivial; the contribution is the mechanically verified realizability and strict separation of one maximal chain within it, $L_0 \subsetneq \cdots \subsetneq L_4$, to our knowledge the first machine-checked consistency hierarchy for such runtimes. A development of 274 Verus obligations (zero assume, zero admit; trust base: two structural axioms and a mutex correspondence) proves the detectors sound and complete against the specifications and each runtime its avoidance set. Three deployed Rust runtimes realize L0-L1 (pessimistic locking, serializable snapshot isolation, default-SI), each verified against stale-generation and refined to its state machine; L2-L4 are exec-mode-verified with dependency-free prevention twins (A3, A6, A2: 0/1000 versus 1000/1000), and L2 is run live across three model families (A3 prevented in all 120 retracted sessions). We reproduce a silent lost update in ByteDance's deer-flow, formalizing its fix as a verified $L_0 \to L_1$ refinement, and exhibit tool-effect reordering in LangGraph's ToolNode on unmodified output, removed by an L3 commit-order sequencer. The verified detector, refinements, and realizability artifacts are the contribution; the phenomena and lattice are classical.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。