Virtual-Clock Replay for Reproducible Computation-Aware Latency

Streaming AI systems, such as simultaneous speech translators and models that adapt themselves during deployment, are increasingly judged by wall-clock latency: the real time from when input arrives to when the hardware actually emits an answer. This is the right thing to measure. It is also nearly impossible to reproduce. The number depends on the GPU or CPU, on background load, and on scheduling noise, and containers do not remove that dependence. Containers pin software, not speed. A further problem runs deeper. In a live stream, a slow model sees more audio pile up before its next decision, so its outputs change with its speed, and translation quality becomes hardware-dependent too.

We propose to evaluate streaming models on a virtual clock. The real model runs deterministically inside a pinned container. Time, however, is not read from the host. It advances according to a calibrated cost model of how long each call takes on a named target machine, and each simulated delay feeds back into how much input the model sees at its next step. The result is a pair of numbers, latency and quality, that any lab can rerun bit-for-bit for "an RTX 4080" or "a Raspberry Pi 5". The pair should match what a live run on that machine would have produced, within a measured error.

Core Claim

Computation-aware latency can be made reproducible by splitting it into two parts. One is a deterministic closed-loop execution: the model's decisions given the input available at each simulated moment. The other is a portable, versioned cost profile per model and hardware pair. Concretely, if decision step $k$ needs input up to position $x_k$, then the simulated finish time is

$$ t_{k} = \max\big(t_{k-1},\ a(x_k)\big) + c_h(z_k) + \epsilon_k . $$

Here $a(x_k)$ is the physical arrival time of that input. $c_h(z_k)$ is the calibrated cost on hardware $h$ of a call with workload features $z_k$, which include new frames, encoder state length, emitted tokens, and gradient steps for adaptation. $\epsilon_k$ is jitter resampled from the profile's measured residuals under a fixed seed. The $\max$ term is exactly the overlap logic of CA*, which showed that input acquisition and computation run concurrently and that only the excess compute should accumulate as a buffer. What we add is closure: the next input $x_{k+1}$ is chosen by the model's own policy given $t_k$. A backlog therefore changes what the model reads, not just when its output appears.

The claim that could be wrong is this: closed-loop virtual-clock replay reproduces live CA* latency, live quality, and the method rankings that live evaluation produces, while plain containerized live measurement does not reproduce across machines or labs.

Positioning

The motivating evidence comes from the latency side. How "Real" is Your Real-Time Simultaneous Speech-to-Text Translation System? surveyed 110 papers and found that about 92% use human-segmented sentences and only 20 evaluate continuous audio. Tempora measured test-time adaptation under physical deadlines on an RTX 4080 and a Raspberry Pi 5. It found that offline rankings invert: CMF won 10 of 15 ImageNet-C corruptions offline but lost in 87.9% of temporal evaluations. Both papers show that hardware time matters. Neither makes it reproducible, since Tempora runs on bare metal with no environment manifest. CA* supplies the accounting we reuse, but it assumes measured timings are trustworthy and replays them open-loop. SimulMT to SimulST and Lookahead When It Matters constrain the design. The first shows that encoder recomputation grows with context. The second shows that adaptive lookahead causes backlogs that cascade across chunks. Together they mean a cost model must depend on per-call workload, not on a constant.

The environment side supplies the containment machinery. Bencher packages benchmarks as containerized gRPC services, but it treats evaluations as timeless oracles. We keep its service split, with the model under test in one container and the clock and stream driver in another, and we make time a first-class, versioned input. SciAgent's audit harness contributes append-only provenance logs, which we adopt for recording every simulated call. The Agentic Benchmark Checklist warns that containerized benchmarks still fail validity through trivial baselines and state leakage. That is why a do-nothing and a static reference sit in every comparison below. The closest system-level work, Huber et al.'s Kafka-based end-to-end evaluation, measures real multi-session latency, including roughly two seconds of extra cost for cascades. It gives up reproducibility in exchange, and it serves as our live-truth reference rather than as a competitor.

Research Program

We will build three pieces. The first is a stream driver that feeds continuous, unsegmented audio or image streams according to a physical arrival schedule $a(\cdot)$. The second is a model container exposing a single "step" call that returns outputs plus the workload features $z_k$. The third is a profiler that, inside the same pinned container on target hardware $h$, runs a calibration workload. The calibration workload is a fixed sweep of $z$ values drawn from held-out streams, not the evaluation streams. The profiler fits $c_h$ as a small regression over $z$ and stores the residual distribution. The profile is a shareable artifact tagged with the container digest, driver version, and hardware identifier.

Evaluation then runs anywhere, on any machine, with the virtual clock. For adaptation methods, $z$ includes forward and backward passes, so Tempora's three utility types can be computed from simulated timestamps: hard deadlines, patience decay, and cumulative compute budgets.

We will also analyze where the approach breaks. Likely failure points are thermal throttling on the Pi, contention between concurrent sessions, and GPU asynchrony that makes per-call cost non-additive. For contention we will test an extension in which $c_h$ takes the number of active sessions as a feature. As a side result, profiling the same workload in and out of the container quantifies container overhead on CA* buffers, a question the file shows nobody has measured.

Baselines

The naive reference is computation-unaware Average Lagging with zero inference time, as reported by toolkits like ESPnet-ST-v2. It is included to show how far rankings move once computation is counted.

The strongest existing method is containerized live CA. The same models run in the same pinned image on each physical target machine, with CPU pinning, background load controlled, and the median over repeated runs. This is what a careful practitioner would do today. We will give it the same streams, the same hardware, and a matched wall-clock budget: the virtual clock's profiling time plus replay time will equal the time the live baseline may spend on repeated runs. The best evidence that CA is accurate on a single machine is its reported figure on a 25-second stream: 26,311 ms, under 2% from actual finish time, versus 39,602 ms (46.6% error) for naive summation (CA*). To beat this baseline, the virtual clock must match live accuracy on the host where live runs are possible (within the run-to-run spread of live CA*), and it must show clearly lower spread across labs and repeated sessions.

The key ablation is open-loop replay. We record live per-call timings once and add them to a fixed schedule of decisions, as CA* does, without feeding delays back into what the model reads. If open-loop replay predicts live quality and latency as well as closed-loop replay does, the feedback ingredient is unnecessary and the contribution reduces to packaging.

A second ablation replaces $c_h(z)$ with a constant per-call mean. This isolates the need for a workload-dependent cost model.

Why not just…?

Why not just run live inside a pinned container and report medians? This is the real threat. On a single machine it may be as accurate as our method and simpler. It does not let a lab without a Raspberry Pi 5 reproduce Pi-5 results, and it gives no seed-level determinism. We will settle the question empirically. Two independent hosts of the same hardware class will run both methods, and we will compare the spread of CA* and of utility-based rankings across hosts. If the spread of containerized live medians is already below the virtual clock's prediction error, we will narrow our claim to portability across hardware one does not own.

Why not just count FLOPs or algorithmic steps? These proxies are deterministic but predict the wrong winners. Tempora's CMF, which leads offline, loses 87.9% of timed evaluations, and gradient-free methods win on the edge CPU (Tempora). We include FLOP-weighted cost as a degenerate $c_h$ and report its rank agreement with live runs.

Why not just inject sleep delays offline? Fixed delays ignore two things: cost that depends on input, which produces lookahead-driven backlogs (Lookahead When It Matters), and the feedback from delay into what the model reads next. The constant-cost ablation and the open-loop ablation test exactly these two omissions.

Proposed Experiments

For speech, we will use MuST-C English–German with talks concatenated into continuous streams, following the critique in the "How Real" survey. Systems will be ESPnet-ST-v2 simultaneous models, a cascade, and an adaptive-lookahead variant. We will report BLEU, CA, and AL on an RTX 4080 and on a CPU-only host. The reference point on the algorithmic metric is ESPnet-ST-v2's reported 28.5 BLEU at 2.3 s average lagging. We found no Lacuna result reporting CA for continuous MuST-C streams on either device, so we will produce one.

For adaptation, we will use ImageNet-C with AdaBN, NEO, CMF, and a non-adapting model on an RTX 4080 and a Raspberry Pi 5, scored under Tempora's three utility types.

The primary metrics are four. The first is the virtual clock's relative error against live CA* and against live utility. The second is the BLEU difference between closed-loop replay and live runs. The third is Kendall rank correlation between virtual-clock and live method rankings. The fourth is cross-host variance.

The decisive check has three conditions. First, closed-loop replay must reproduce Tempora-style rank reversals and the live latency of backlogged systems within the live baseline's own run-to-run spread. Second, open-loop replay must measurably fail on streams where backlog occurs. Third, profiles must be calibrated only on held-out workloads. If all three hold, closed-loop replay is a reproducible substitute for live timing. If open-loop replay is equally good, the feedback claim fails. If containerized live medians match across hosts, the reproducibility claim collapses to hardware portability.