Modern particle detectors record without stopping. In a time projection chamber, a gas or liquid volume where ionization electrons drift slowly toward a readout plane, charge from dozens of successive collisions is in flight at once. Its electronics, thresholds and accumulated ion clouds also carry traces of earlier activity into later readout. Fast machine-learning simulators of detectors, however, are trained and tested on single isolated events. Simulating a long continuous stream with one model call over the whole stream is expensive. Cutting the stream into independent pieces leaves seams wherever the detector "remembers" across a cut. We propose to simulate long readout streams window by window. Each window is generated conditioned on a short overlap with the previous one, and the overlap length is set by a measured quantity: how fast the detector's output forgets a perturbation at an earlier time. Effects too slow to forget within any reasonable overlap are handed forward as a small summary state.
The idea borrows its logic from temporal decomposition in optimization. Exponential Decay in the Sensitivity Analysis of Nonlinear Dynamic Programming proves that, under controllability conditions, the effect of a perturbation at time $i$ on the optimal solution at time $k$ decays like $\rho^{|k-i|}$, independent of horizon length. That result justifies solving short overlapping windows instead of the whole horizon. Detectors have an analogous physical forgetting: drift time spans, electronic shaping tails, afterpulsing. Where the analogy breaks, as with slowly accumulating space charge, the optimization literature also supplies the fix. Approximate Dynamic Programming for Storage Problems decouples long problems by carrying a low-dimensional linking state, storage level, from stage to stage.
Core Claim
A fast generative surrogate for continuous detector readout can be made to cost linear time in stream length and to extrapolate to streams far longer than those seen in training, with no loss of fidelity relative to a full-context model. This requires two things. The overlap context must be at least the detector's measured memory length. Effects with memory longer than any practical window must be carried across windows as an explicit compressed state rather than left to the context.
The memory length is something we estimate rather than tune. Suppose the reference simulator satisfies $\|\partial y_k/\partial e_i\| \le C\rho^{|k-i|}$, where $y_k$ is the digitized readout in time bin $k$, $e_i$ is the energy deposited at time $i$, and $C$ and $\rho\in(0,1)$ are fitted constants. Then truncating the context to $L$ bins introduces an error of at most order $C\rho^{L}/(1-\rho)$, which is the sum of the geometric tail beyond the cut. Reaching a tolerance $\epsilon$ therefore requires
$$ L \;\ge\; \frac{\log\!\big(C/(\epsilon(1-\rho))\big)}{\log(1/\rho)}. $$
The prediction is falsifiable. Fidelity should saturate once $L$ passes this value and degrade sharply below it. Components whose fitted $\rho$ is close to 1 are exactly the ones that must move into the carried state.
Relation to Prior Work
Prior work plays three roles here.
Some of it motivates the gap. Generative models for fast cluster simulations in the TPC for the ALICE experiment generates 159 spacepoints per isolated track with convolutional and recurrent adversarial networks. Its sequence index is position along the chamber, not physical time, and it never sees pileup. It also reports a median error of 82.72 mm against a 1.12 mm GEANT3 resolution, a warning that naive sequence generation can be badly imprecise. TPCpp-10M provides ten million Pythia 8 plus Geant4 collisions in the sPHENIX chamber, but as separate events. Waveform Simulation in PandaX-4T assembles long xenon-detector waveforms by stitching calibration pulses and 2-millisecond empirical noise blocks. It is the closest thing to temporal decomposition in this literature, but its cuts are hand-placed and come with no bound on seam error. The authors also report a mismatch in the hit-pattern observable $F_{S2}^{\text{maxq}}$, which is the kind of failure that static stitching invites.
Some of it supplies the generator. Fast, accurate, and precise detector simulation with vision transformers pairs transformers with conditional flow matching, a generator that learns a continuous transport from noise to data. It reaches high calorimeter fidelity at 22 to 125 ms per shower. CaloChallenge 2022 supplies both the evaluation culture, a trained classifier separating real from generated samples (AUC near 0.5 to 0.6 for the best models), and the warning that some one-pass models blow up in memory at high granularity. Both papers treat each shower as a closed unit. We reuse their generator family and their metric, applied to windows of a stream.
Some of it supplies the decomposition logic. Rolling-horizon methods such as Learning-Guided Rolling Horizon Optimization for Long-Horizon Flexible Job-Shop Scheduling commit near-term decisions while keeping a look-ahead buffer. Multistage Knapsack removes boundary bias by averaging over randomly shifted block boundaries. We adopt the shifting idea so that seams never fall at fixed phases relative to the bunch-crossing clock. That matters because time-aggregated calibration histograms would otherwise inherit periodic artifacts.
The same theory also constrains the design. Na et al.'s decay guarantee fails in weakly controllable regimes. The detector analogue is a slowly integrating quantity, and that is why the carried state is part of the design rather than an afterthought.
Research Program
We first build a reference continuous-readout simulator that serves as ground truth. Collisions from TPCpp-10M are placed on a bunch-crossing timeline at a configurable rate. Their ionization is drifted with diffusion and summed linearly, then passed through deliberately nonlinear readout stages: electronic shaping, ADC saturation, threshold-based zero suppression with baseline restoration, and a space-charge distortion fed by accumulated slow ions. A second, smaller testbed follows the PandaX-4T recipe. It produces long xenon waveforms in which large S2 signals trigger delayed electron trains and PMT afterpulses, giving history-dependent noise. We cannot access real PandaX-4T data, so this testbed is synthetic, and we say so.
Second, we measure memory. We use paired simulations with shared random numbers: an event is inserted or removed at time $i$, and we record the change in output statistics at every later time. Fitting $C$ and $\rho$ per readout stage yields an empirical memory map. We expect shaping and zero suppression to have short memory, drift spans to have medium memory, and space charge to have $\rho$ near 1.
Third, we build the surrogate in a deliberately modest form. The linear charge sum is computed exactly by overlay, since summing ionization is cheap and correct. A flow-matching transformer then generates only the nonlinear readout for a window of $W$ bins. It is conditioned on the overlaid charge in the window, the last $L$ bins of its own previous output, and a carried state $s$. The carried state is a low-dimensional summary, for instance a coarse space-charge map, updated by a small learned recurrence from window to window. Window offsets are randomized per stream. Training uses short streams only.
Baselines
The naive reference is linear overlay followed by digitization of each event in isolation. That means simulating every collision's readout separately and adding the results, which is what pipelines built on isolated-event datasets such as TPCpp-10M implicitly do. It costs nothing extra and is exact wherever the readout is linear. Its failures therefore measure how much the nonlinear history effects matter at all.
The second baseline is independent chunking: the same windowed generator with zero context and no carried state, which mirrors the static block stitching of Waveform Simulation in PandaX-4T.
The strongest competitor is a full-context model. This is the same flow-matching transformer from Fast, accurate, and precise detector simulation with vision transformers, attending over the entire training-length stream, with parameter count, training data, GPU-hour budget and hyperparameter search budget matched to our model. It is strongest because it can in principle learn any memory, short or long. Its weaknesses are cost and the need to extrapolate to stream lengths never seen in training.
No reported result was found on Lacuna for any surrogate on continuous multi-event detector streams. The nearest reported numbers are per-shower: classifier AUC near 0.5 to 0.6 for the best CaloChallenge models (CaloChallenge 2022) and 22 to 125 ms per shower for flow matching (Fast, accurate, and precise detector simulation with vision transformers). We treat these as scale references, not as targets on our task.
Beating the full-context model means one of two outcomes. The first is matching its stream-level classifier AUC within 0.02 at training length while running in linear time. The second is staying within that margin at ten times training length, where we expect the full-context model to degrade.
Two ablations isolate the key ingredients. The first sweeps $L$ around the predicted memory length to test whether fidelity saturates where the formula says it should. The second removes the carried state to test whether slow effects need it.
Why not just…?
Why not just overlay isolated events? For the charge itself, overlay is exact, which is why our design keeps it. The threat is real: if the nonlinear stages turn out to matter little at realistic occupancies, overlay alone wins. The first experiment settles this directly by measuring a classifier AUC for overlay against the reference at several collision rates. If that AUC stays near 0.5 everywhere, we will report that the decomposition is unnecessary for this readout chain.
Why not just run one long-context model over the whole stream? Attention cost grows quadratically with stream length. The model must also handle lengths it never trained on, a regime the CaloChallenge results on memory growth at high dimension (CaloChallenge 2022) give reason to distrust. The length-extrapolation experiment compares the two models head to head at matched budget.
Why not just chunk the stream into independent pieces, as PandaX-4T does with noise blocks? Independent chunks cannot represent the delayed electron trains or saturation recovery that start before a cut. The $F_{S2}^{\text{maxq}}$ mismatch reported in Waveform Simulation in PandaX-4T is consistent with stitching losing such correlations. The zero-context ablation measures this as excess discrepancy concentrated near seams.
Why not just run the full Monte Carlo on more hardware? ALICE alone already needed the equivalent of over 540,000 CPU devices in 2023 (ExpertSim), and Geant4 takes about 10 seconds per shower. Continuous pileup multiplies this cost, so the full simulation remains our ground truth but cannot be the production tool.
Proposed Experiments
The decisive checks are four. First, the memory map must show finite decay for shaping and suppression and near-unit $\rho$ for space charge. If every stage decays fast, the carried state is unnecessary and the proposal shrinks to rolling windows. Second, the $L$ sweep must show fidelity saturating within a factor of two of the formula's predicted $L$. Third, a seam test computes the classifier AUC and the occupancy residuals as a function of position within the window. A good model shows no rise near window edges, and randomized offsets should flatten any residual periodicity in time-aggregated histograms. Fourth, a downstream check runs track finding with TPCpp-10M's double-majority matching on generated and reference streams. We compare efficiency and fake rate at rates up to the highest occupancy the reference simulator can afford. Wall-clock time versus stream length, out to ten times training length, completes the comparison.
References
- Exponential Decay in the Sensitivity Analysis of Nonlinear Dynamic Programming
- Approximate Dynamic Programming for Storage Problems
- Generative models for fast cluster simulations in the TPC for the ALICE experiment
- TPCpp-10M: Simulated proton-proton collisions in a Time Projection Chamber for AI Foundation Models
- Waveform Simulation in PandaX-4T
- Fast, accurate, and precise detector simulation with vision transformers
- CaloChallenge 2022: A Community Challenge for Fast Calorimeter Simulation
- Learning-Guided Rolling Horizon Optimization for Long-Horizon Flexible Job-Shop Scheduling
- Multistage Knapsack
- ExpertSim: Fast Particle Detector Simulation Using Mixture-of-Generative-Experts