Monitoring a power plant, a server farm, or a water network means watching dozens of correlated sensor channels and raising an alarm as soon as the system's behavior changes, while rarely raising false alarms. Statisticians know the best achievable trade-off for simple data. When observations are independent and both the before-change and after-change distributions are known, the delay to detection grows like the logarithm of the mean time between false alarms, divided by how far apart the two distributions are. Real sensor data breaks every assumption behind that result: channels are coupled, readings are autocorrelated, the noise is not Gaussian, and the after-change behavior is unknown. Deep sequence models handle this messiness well. Detectors built on them, however, use heuristic alarm rules with no false-alarm guarantee and no account of how close they come to the best possible delay.
We propose to join the two through one transform. We train a causal neural model of the normal system that predicts the full conditional distribution of the next multivariate observation. We then push each new observation through that model's conditional cumulative distribution function, channel by channel. This is the Rosenblatt transform: an exact map that sends any correctly modeled dependent process to independent, uniformly distributed residuals. After this step the hard null hypothesis ("the system is still normal") becomes a trivially simple one ("these residuals are i.i.d. uniform"). That turns a dependent, non-Gaussian monitoring problem into one where test-by-betting detectors have exact false-alarm control. The bettor can still use lagged residuals, so changes in dynamics are not thrown away. The core claim is that this whitened betting detector achieves detection delay close to $\log(ARL_0)/(I - c)$. Here $ARL_0$ is the average run length to false alarm, $I$ is the per-step conditional Kullback-Leibler (KL) divergence rate between post-change and pre-change dynamics, and $c$ is an explicit penalty that grows with how badly the learned model is calibrated on normal data.
Core Claim
Write $x_t \in \mathbb{R}^p$ for the observation at time $t$ and $\hat F_j(\cdot \mid x_{<t}, x_{t,<j})$ for the learned model's conditional distribution function of channel $j$, given the past and the earlier channels at time $t$. The whitened residual is
$$u_{t,j} = \hat F_j(x_{t,j} \mid x_{<t},\, x_{t,1:j-1}), \qquad j = 1,\dots,p.$$
If the model equals the true pre-change law, the vectors $u_t$ are exactly i.i.d. uniform on $[0,1]^p$, however strong the temporal and cross-channel dependence in $x_t$. Any bounded betting strategy that is chosen using only past residuals then yields a nonnegative martingale under the null. A Shiryaev-Roberts or CUSUM-style restart of such martingales gives $ARL_0 \ge e^{b}$ for threshold $b$ with no mixing assumptions at all.
The learned model is never exactly right. We therefore discount each bet's wealth factor by $1+\lambda\varepsilon$, where $\lambda$ bounds the bet size and $\varepsilon$ bounds the per-step deviation of the true residual law from uniform. We estimate $\varepsilon$ with a confidence bound on held-out nominal data, in the spirit of the reference-set bounds of conditional conformal martingales. The two claims we aim to prove and test are these. First, false-alarm control survives misspecification at the cost of the discount. Second, the delay obeys a misspecification-adjusted speed limit,
$$\text{EDD} \approx \frac{\log ARL_0}{I_u - c(\varepsilon)},$$
where $I_u$ is the conditional KL rate of the post-change residual process against uniform and $c(\varepsilon) = O(\varepsilon)$ is the discount. The form comes from the standard argument that log-wealth drifts upward at rate $I_u$ minus the online bettor's per-step regret, which vanishes, minus the discount. By the chain rule for KL, $I_u$ equals the raw-data conditional KL rate $I$ when the residual bettor may condition on lagged residuals. Whitening is therefore lossless in the first-order sense. It is lossy only if the bettor ignores residual dynamics. We will prove this and also measure it.
Relation to Prior Work
Three papers motivate the gap by establishing asymptotic optimality under assumptions real streams violate. Asymptotically optimal sequential change detection for bounded means builds a mixture e-detector that attains $\log\gamma/\mathrm{KL}_{\inf}$ for i.i.d. data on $[0,1]$. Quickest Change Detection for Unnormalized Statistical Models attains optimality without partition functions via Hyvärinen scores, again for i.i.d. data. High-Dimensional Sequential Change Detection shows that Ledoit-Wolf shrinkage minimizes worst-case delay when dimension grows with the estimation window, but only for temporally independent Gaussian vectors. Our transform is designed to manufacture exactly the i.i.d. setting these methods need. We will reuse their machinery as the betting layer: bounded-mean e-detectors on residual coordinates, and shrinkage covariance estimates of normal-scored residuals.
Two papers attack dependence directly, and they constrain our design. Quickest Change Detection in Autoregressive Models proves Lorden-optimality for a linear Gaussian AR disturbance appearing in white noise. It also shows that ignoring dependence ("Stationary CuSum") costs substantial delay. That result tells us the bettor must condition on residual history. Model-Free Change Point Detection for Mixing Processes proves $ARL\sim e^b$ and delay $\sim b$ for kernel MMD-CUSUM under mixing, but it pays a dependence penalty in its concentration bounds and loses sensitivity in high dimension. We avoid mixing arguments entirely: the whitened null is exactly i.i.d. In exchange, we take on a misspecification term that we must bound honestly.
The closest existing method is Cluster-Aware Causal Mixer for Online Anomaly Detection in Multivariate Time Series (CCM-TAD). It uses a causally masked MLP-Mixer, maps scalar reconstruction errors to empirical p-values on validation data, and accumulates evidence heuristically. Its p-values are marginal in two senses: they summarize all channels into one error, and they are not conditioned on the past. Under autocorrelation they are therefore not independent under the null, which is why no $ARL_0$ guarantee follows. We keep its causal backbone and its channel grouping as the predictor. We replace its scoring with a vector-valued conditional transform plus a formal martingale. Testing For Distribution Shifts with Conditional Conformal Test Martingales supplies the idea of a fixed reference set with confidence bounds for estimation error. We borrow that idea to bound $\varepsilon$, but CCTMs assume exchangeable data, which time series are not.
Optimal Online Change Detection via Random Fourier Features supplies the dyadic grid of candidate change times that keeps a window-free detector at $O(\log n)$ cost. We use the same grid for the bettor's post-change estimates. Finally, TimeSeAD constrains our evaluation: point-adjusted F1 lets random noise score near 90%, and SWaT, WADI, SMAP and MSL carry positional and distribution-shift biases. SMD is the cleanest real benchmark available here.
Research Program
The predictor is a causal sequence model with CCM-TAD-style masked temporal mixing. Its heads output per-channel conditional distributions, using quantile or mixture-of-logistics heads under a fixed channel ordering, so the Rosenblatt transform can be computed in one forward pass. It is trained on nominal data only. A disjoint nominal segment is held out to estimate the calibration error $\varepsilon$ through an anytime-valid upper confidence bound on the deviation of residual statistics from their uniform expectations.
The bettor works on normal scores $z_t = \Phi^{-1}(u_t)$, which are i.i.d. $\mathcal{N}(0, I_p)$ under the null. It bets with a clipped log-likelihood ratio of a small Gaussian vector-autoregressive alternative on $z_t$, with mean, lag matrix and Ledoit-Wolf-shrunk covariance fit on dyadic windows of recent residuals. A second bounded component uses random features to catch non-Gaussian residual shapes. Bet sizes are learned by Online Newton Step, as in CCTMs. All alternatives are predictable, so validity rests only on the null being uniform.
On the theory side, we will prove three things. First, the discounted detector satisfies $ARL_0 \ge e^{b}$ whenever the true residual law is within $\varepsilon$ of uniform in the bounded-test sense. Second, the delay is upper bounded by $b/(I_u - c(\varepsilon))$ plus a regret term that is sublinear in $b$. Third, $I_u = I$ when the alternative family is rich enough over residual lags. We will also characterize the loss when the bettor ignores lags: it then sees only the KL of the stationary residual marginal.
Baselines
The naive reference is a set of per-channel univariate CUSUMs on standardized raw readings, with a union-bound threshold correction. Unsupervised Change Point Detection in Multivariate Time Series reports that such aggregated one-dimensional statistics fail entirely under pure covariance shifts. We expect it to set the floor, and we include it to show the size of the multivariate gain.
The strongest classical competitor is linear whitening: fit a Gaussian vector autoregression on nominal data and run a shrinkage GLR CuSum on its innovations, following High-Dimensional Sequential Change Detection. On near-Gaussian, near-linear data this should match our method. It matters because it isolates whether the neural conditional model earns its cost. To compare fairly, it gets the same nominal training data, the same held-out calibration segment for threshold setting, and the same grid search over window lengths.
The strongest nonparametric competitor is MMD-CUSUM from Model-Free Change Point Detection for Mixing Processes, alongside Online RFF-MMD from Optimal Online Change Detection via Random Fourier Features. Both run on lag-embedded raw vectors with bandwidth tuned on the nominal segment.
The strongest deep competitor is CCM-TAD, run with its released configuration and given the same total GPU-hour tuning budget as our predictor. On anomaly benchmarks its reported gains are relative ones: F1 improvements of 8.71% on WADI and 8.65% on PSM over the next-best models. On SMD the file gives no absolute CCM-TAD number; the best absolute figure is PUAD's 96.16% F1 from Prototype-oriented unsupervised anomaly detection for multivariate time series. That number was not reported under TimeSeAD's recall-consistent protocol, so we will rerun both methods ourselves rather than compare against it.
No reported result for detection delay at a fixed $ARL_0$ was found on Lacuna for any of these methods on SMD, PSM or HASC. Delay at a matched false-alarm rate is the quantity we care about, so we will generate all baseline delay curves ourselves. "Beating" a baseline means lower mean detection delay at every matched empirical $ARL_0$ on nominal segments, with nonoverlapping bootstrap intervals.
Three ablations isolate the key ingredients. The first replaces the vector Rosenblatt residual with CCM-TAD's scalar reconstruction-error p-value, which tests whether conditioning and vector structure matter. The second removes lagged residuals from the bettor, which tests the predicted loss from ignoring residual dynamics. The third sets the discount $c$ to zero, which tests whether calibration-aware discounting is what keeps false alarms controlled.
Why not just…?
Why not just whiten with a vector autoregression and run Gaussian CuSum? This is the real threat. If the data are close to linear and Gaussian, our method reduces to it plus overhead. The theory says our advantage is exactly the gap between the true conditional KL rate and the part a Gaussian linear model captures. The synthetic grid varies innovation tail weight and dynamic nonlinearity independently to locate where that gap opens. If it does not open on SMD or HASC, we will report that linear whitening suffices for those systems.
Why not just run kernel MMD-CUSUM or Online RFF-MMD on lag-embedded raw data? These methods need no model, and Model-Free Change Point Detection for Mixing Processes does give them false-alarm scaling under dependence. However, their thresholds carry mixing-dependent slack. That paper also notes that kernel tests lose sensitivity to fine cross-channel changes as dimension grows. The comparison at matched empirical $ARL_0$ on 38-channel SMD and on synthetic covariance-only shifts will show whether that loss is practically large.
Why not just turn CCM-TAD's p-values into a conformal martingale? That would be cheaper, and it is our first ablation. Its scalar p-values remain autocorrelated under the null, so exchangeability fails and the false-alarm guarantee does not hold. We will measure the empirical $ARL_0$ inflation this causes on long nominal SMD segments.
Proposed Experiments
Synthetic studies come first, because there the true conditional KL rate is computable. We simulate nonlinear vector autoregressions in $p \in \{4, 20, 100\}$ with Gaussian and Student-t innovations, and with three change types: innovation law only, dynamics only, and cross-channel coupling only. We also include the 4D pairwise-interaction exponential family from the SCUSUM paper, extended with temporal dependence. For each setting we plot detection delay against $\log ARL_0$ and compare the slope with $1/(I - c)$.
On real data we use SMD as the primary benchmark, with PSM secondary. WADI and SWaT are reported with TimeSeAD's caveats. For each dataset we measure the empirical false-alarm rate on long nominal stretches and the event-level detection delay on labeled anomalies, using TimeSeAD's recall-consistent metric without point adjustment. For genuine change-point streams we use HASC and Bee Dance. On Bee Dance the offline HDBSCAN-plus-MDL method reports F1 of 64.5 against BOCPDMS at 35.6; that offline number is a ceiling reference, not a fair online competitor.
Three decisive checks follow. First, on long nominal segments, the discounted detector's empirical $ARL_0$ must meet $e^{b}$ while the undiscounted and scalar-p-value variants violate it. Second, on synthetic dynamics-only changes, removing residual lags must raise delay by the predicted factor, confirming that whitening is lossless only with a history-aware bettor. Third, on heavy-tailed nonlinear settings and on SMD, delay at matched $ARL_0$ must fall below linear whitening and MMD-CUSUM. If it does not, the neural conditional model is not worth its cost.
References
- Asymptotically optimal sequential change detection for bounded means
- Quickest Change Detection for Unnormalized Statistical Models
- High-Dimensional Sequential Change Detection
- Quickest Change Detection in Autoregressive Models
- Model-Free Change Point Detection for Mixing Processes
- Cluster-Aware Causal Mixer for Online Anomaly Detection in Multivariate Time Series
- Testing For Distribution Shifts with Conditional Conformal Test Martingales
- Optimal Online Change Detection via Random Fourier Features
- TimeSeAD: Benchmarking Deep Multivariate Time-Series Anomaly Detection
- Unsupervised Change Point Detection in Multivariate Time Series
- Prototype-oriented unsupervised anomaly detection for multivariate time series