Copula: Sound Sharing of Stochastic Nodes Across Runs of Agentic Systems
Abstract
Agentic systems chain model and non-model calls, and are rerun after edits, as replicates and comparisons, concurrently and after crashes. We model a run as a DAG whose nodes are these calls. Because runs repeat, nodes meet the same inputs again, and caching could save their tokens, compute and time. But many nodes are random, and storing one output per input turns repeated calls into copies, while voting and replicates need them independent. Recent LLM caches therefore number repeated calls: the k-th identical call within a run reads the k-th stored sample, drawn only if missing. Repeated calls stay independent, but a replicate meant to be averaged rereads earlier runs' samples instead of drawing fresh ones. They also number only model calls, so a random non-model call upstream changes every downstream request, and costly ones, such as code execution, web APIs and simulators, rerun. Key observation: sharing a node's sample never changes the distribution any one run sees, only the correlation between runs. Whether runs share is thus an experimental-design choice set by how outputs are used: sharing is a pure saving for a run whose output is not combined with other runs', usually lowers the variance of the difference between compared runs, such as an edit and its base, and raises the variance of the mean of replicates. Based on this principle, Copula supports making full use of the cache to reduce computations and allowing the variance of nodes to adapt to the purpose of their running results. Replicated A/B tests reach the precision of independent runs at 0.51-0.59 of the CPU and tokens; prompt optimizers keep held-out quality equivalent at 0.42-0.69 of the task model's GPU cost. Synthetic-data pipeline edits cost 0.39-0.49 of a full rerun's tokens and return 2.8 times sooner; a code-repair agent's edits cost 0.34 of the tokens and 0.39 of the sandbox CPU; no quality loss is significant.
Create a lesson
Metadata
- Categories
- cs.DC, cs.AI
Related papers
HPC Navigator: A Researcher's App for Using Shared GPU Clusters with AI Agents
Shared title terminologycs.DCSebastian Haan
ModelLess: A Serverless System for Multi-Tier LLM Inference on Shared GPUs
Shared title terminologycs.DCDing Shi, Wei Wu, Jiayuan Chen et al.
AeroPoint: Agentic AI for Intent-Driven Point Cloud Inspection in UAV-Edge Systems
Shared title terminologycs.DCReza Farahani, Zoha Azimi, Naser Hossein Motlagh et al.
ForkTide: Lineage-Aware Placement for Branching Code-Agent Sandboxes
Shared title terminologycs.DCQibin Gu
Multi-Tier Autonomic Resource Orchestration Framework for Dynamic Service Elasticity across Federated Cloud Environments
Shared title terminologycs.DCNitin Sikri
When Should a Delegated Wallet Send Its Second Payment? Measuring EIP-7702 In-Flight Limits Across Ethereum Clients
Shared title terminologycs.DCSuhua Wang, Ruixin Yu, Zifan Wang et al.