betaFeedback

WorksMathematics

Quickest Change Detection with Diffusion-Integrated Scores

Abstract

Classical CUSUM relies on the log-likelihood ratio of the underlying distributions, which cannot generally be computed from finite pre- and post-change samples alone. We propose diffusion-integrated score CUSUM (DI-SCUSUM), a training-free detector. We add Gaussian noise to the samples to form two smooth density estimates and calculate their Hyvärinen scores exactly, without training a score network. For each incoming observation, we sample a diffusion time, perturb the observation, and use the importance-weighted score difference as an increment in the DI-SCUSUM recursion. Under the assumption that observations follow the fixed empirical distributions, the post-change mean increment is proportional to the Kullback-Leibler (KL) divergence from the smoothed post-change to the smoothed pre-change empirical distribution. We establish exponential false-alarm scaling and a first-order delay bound that, for a fixed threshold and increment scaling, is inversely proportional to the KL divergence. In the calibrated anisotropic Gaussian simulation, DI-SCUSUM nearly matches likelihood-ratio CUSUM and reduces the measured detection delay by about 91% relative to score-based CUSUM. On MNIST and Oxford-IIIT Pet, DI-SCUSUM also has lower empirical conditional detection delay than SCUSUM at comparable false-alarm levels.

Introduction

Quickest change detection (QCD) seeks to identify an unknown distributional change with minimal delay subject to false-alarm control. When the pre- and post-change densities are known, CUSUM

[14, 16] accumulates log-likelihood-ratio evidence and provides the classical benchmark. We consider the sample-based setting, where finite samples from each distribution are collected separately from the monitored stream. The underlying log-likelihood ratio is unavailable, so a sequential procedure must extract computable evidence of a distributional change from each new observation. In a CUSUM recursion, the evidence should have a negative mean before the change to prevent sustained accumulation and a positive mean afterward to drive the statistic toward the alarm threshold.

Likelihood-ratio CUSUM is the classical QCD benchmark, with false-alarm and delay guarantees for known distributional models [14, 11, 12, 15, 16, 10]. When likelihoods are unavailable, LPA-CUSUM estimates log-partition ratios for unnormalized models [1], while the Scan BB-statistic and CALM use kernel comparisons to detect changes from samples [2] (Li et al. 2019). SCUSUM replaces log-likelihood ratios with normalization-invariant Hyvärinen-score differences [7] (), Wu et al. 2023); its mean evidence depends on single-scale Fisher divergence. Denoising score matching has also been used to learn score functions for CUSUM-based change detection [28]. Matrix-weighted score methods modify the score geometry for hypothesis testing and change-point detection [13]. Diffusion models instead provide scores across noise levels [22, 9] (), Ho et al. 2020), and Gaussian-smoothed empirical distributions admit closed-form scores [19]. A central question is how to integrate score evidence across Gaussian smoothing scales so that the resulting mean increments recover directed KL divergences and support sequential change-detection guarantees.

We therefore propose diffusion-integrated score CUSUM (DI-SCUSUM), a training-free procedure that combines score evidence across Gaussian smoothing scales to detect distributional changes using pre- and post-change samples. Gaussian smoothing converts the pre- and post-change samples into two smooth densities with closed-form Hyvärinen scores. For each incoming observation, we sample a diffusion time, add Gaussian noise at the corresponding scale, and compute the score difference. We weight the score difference by the inverse of the diffusion-time sampling density and accumulate the resulting increments using CUSUM. When observations follow distinct fixed empirical distributions, the relative de Bruijn identity [20, 21] links the mean increments to directed KL divergences between their Gaussian-smoothed versions, giving a negative mean before the change and a positive mean afterward. This connection supports the false-alarm and detection-delay guarantees.

Contributions. Our contributions are: (1) A sample-based procedure for sequential change detection using closed-form Hyvärinen scores and an unbiased importance-sampling estimate for the diffusion-time integral of their difference. (2) Directed KL identities for the mean increments under fixed empirical plug-in models, with exponential false-alarm scaling and first-order delay bounds under the stated assumptions. (3) A finite-window information identity and an anisotropic Gaussian analysis showing when integration recovers information lost by single-scale SCUSUM. (4) A diffusion-time sampling density that minimizes the post-change increment’s second moment, with Monte Carlo, quadrature, and Rao–Blackwellized implementations [17, 4], and an evaluation of the quadrature implementation on Gaussian and image data.

Methodology

QCD monitors a data stream for an unknown transition from a pre-change to a post-change regime and seeks to raise an alarm quickly subject to false-alarm control. Figure 1(a) illustrates this objective: the change occurs at ν\nu, the nonnegative statistic ZnZ_n crosses the threshold at the alarm time TT, and the delay counts the observations from XνX_\nu through XTX_T, inclusive: T−ν+1T-\nu+1. Increasing the threshold reduces false alarms but generally increases detection delay.

DI-SCUSUM change detection and construction

Figure 1. DI-SCUSUM. (a) The change begins at XνX_\nu; delay counts post-change observations through the alarm. Accumulated evidence crosses τ\tau and triggers an alarm. (b) Pre- and post-change samples define Gaussian-smoothed models. Each new observation is perturbed at a sampled diffusion time; the resulting score difference is importance-weighted and accumulated by CUSUM to detect a distributional change.

Figure 1(b) shows how DI-SCUSUM turns each observation into evidence of a distributional change. We first collect pre- and post-change samples separately from the monitored stream and Gaussian-smooth them to obtain two density estimates with closed-form Hyvärinen scores. For each new observation, we sample a diffusion time, add Gaussian noise at the corresponding scale, and compare the two scores. We weight the score difference to account for the sampled time and accumulate it using the reflected CUSUM recursion. Negative mean evidence before the change opposes accumulation, while positive mean evidence afterward drives the statistic toward the alarm threshold.

We keep the pre- and post-change sample sets fixed throughout the analysis; all theoretical expectations are taken conditional on these sets.

Change Model and Gaussian Smoothing

Let X1,X2,…∈RdX_1, X_2, \ldots\in\mathbb{R}^d be independent observations and let Fn=σ(Xk,tk,Wk:1≤k≤n)\mathcal{F}_n = \sigma(X_k, t_k, W_k : 1 \le k \le n) include the observations and the independent auxiliary draws used by Algorithm 1. Let ν≥1\nu\ge1 index the first post-change observation (with ν=1\nu= 1 denoting an immediate change).

We assume

X1,…,Xν−1∼i.i.d.P∞,Xν,Xν+1,…∼i.i.d.P1,X_1,\ldots,X_{\nu-1}\mathrel{\mathop{\sim}^{\mathrm{i.i.d.}}}P_\infty,\qquad X_\nu,X_{\nu+1},\ldots\mathrel{\mathop{\sim}^{\mathrm{i.i.d.}}}P_1,

where P∞P_\infty and P1P_1 denote the pre- and post-change probability distributions. Expectations under no change and a change at ν\nu are denoted by E∞\mathbb{E}_\infty and Eν\mathbb{E}_\nu. The alarm time TT is a stopping time with respect to Fn\mathcal{F}_n: the decision uses only observations and auxiliary draws available by time nn. We measure the false alarms by the average run length

ARL⁡(T)=E∞[T]\operatorname{ARL}(T)=\mathbb{E}_\infty[T]

and measure the worst-case conditional mean delay by Pollak’s criterion [15]

CADD⁡(T)=sup⁡ν≥1Eν[T−ν+1∣T≥ν].\operatorname{CADD}(T)=\sup_{\nu\ge1}\mathbb{E}_\nu[T-\nu+1\mid T\ge\nu].

Given a target γ>1\gamma>1, we minimize CADD⁡\operatorname{CADD} subject to ARL⁡(T)≥γ\operatorname{ARL}(T)\ge\gamma, requiring an average of at least γ\gamma observations before an alarm under no change. Larger γ\gamma therefore requires less frequent false alarms [14, 11, 12].

Let U={ui}i=1N0\mathcal{U}=\{u_i\}_{i=1}^{N_0} and V={vj}j=1N1\mathcal{V}=\{v_j\}_{j=1}^{N_1} be the pre- and post-change reference sets, of sizes N0=∣U∣N_0=|\mathcal{U}| and N1=∣V∣N_1=|\mathcal{V}|, respectively. They define empirical measures

P^0=1N0∑i=1N0δui,Q^0=1N1∑j=1N1δvj,\widehat{P}^{0}=\frac{1}{N_0}\sum_{i=1}^{N_0}\delta_{u_i},\qquad\widehat{Q}^{0}=\frac{1}{N_1}\sum_{j=1}^{N_1}\delta_{v_j},

where δx(A)=1{x∈A}\delta_x(A)=\mathbf{1}_{\{x\in A\}} for every measurable set A⊆RdA\subseteq\mathbb{R}^d, and xx is an observed sample uiu_i or vjv_j. For the theoretical plug-in analysis, we assume P∞=P^0P_\infty=\widehat{P}^{0} and P1=Q^0P_1=\widehat{Q}^{0}, so observations follow the fixed empirical distributions. For probability distributions PP and QQ with densities pp and qq, we use the standard definition

KL⁡(P∥Q)=EX∼P[log⁡p(X)q(X)].\operatorname{KL}(P\Vert Q)=\mathbb{E}_{X\sim P}\left[\log\frac{p(X)}{q(X)}\right].

KL divergence is infinite if PP assigns positive probability to a set that QQ assigns zero probability. Independent empirical measures from continuous distributions almost surely have disjoint supports, making both directed KL divergences infinite even without an underlying change.

To give the two probability distributions positive common support, fix a base scale ε>0\varepsilon>0 and add independent Gaussian noise:

P^ε=P^0∗N(0,2εId),Q^ε=Q^0∗N(0,2εId),\widehat{P}^{\varepsilon}=\widehat{P}^{0}*\mathcal{N}(0,2\varepsilon I_d),\qquad\widehat{Q}^{\varepsilon}=\widehat{Q}^{0}*\mathcal{N}(0,2\varepsilon I_d),

where ∗* denotes convolution and IdI_d is the d×dd\times d identity. Each convolution is a finite Gaussian mixture and therefore has a positive smooth density on Rd\mathbb{R}^d; its Gaussian tails also make both directed KL divergences finite.

Gaussian tails also make both directed KL divergences finite.

For an additional diffusion time t≥0t\ge0, convolve both probability distributions with N(0,2tId)\mathcal{N}(0,2tI_d). Gaussian covariances add, giving the total scale ht=ε+th_t=\varepsilon+t and hence

P^∞,tε=P^ε∗N(0,2tId)=P^0∗N(0,2htId),\widehat{P}^{\varepsilon}_{\infty,t}=\widehat{P}^{\varepsilon}*\mathcal{N}(0,2tI_d)=\widehat{P}^{0}*\mathcal{N}(0,2h_tI_d),
P^1,tε=Q^ε∗N(0,2tId)=Q^0∗N(0,2htId).(1)\widehat{P}^{\varepsilon}_{1,t}=\widehat{Q}^{\varepsilon}*\mathcal{N}(0,2tI_d)=\widehat{Q}^{0}*\mathcal{N}(0,2h_tI_d). \tag*{(1)}

Both ε\varepsilon and tt are Gaussian smoothing parameters. The fixed ε>0\varepsilon>0 makes the empirical models smooth and their KL divergences finite. Varying t≥0t\ge0 then lets us compare them across smoothing scales. Using ε\varepsilon alone would give only one scale; integrating over tt connects the score evidence to KL divergence. Appendix § 8.§ 1 gives further details.

Because the Gaussian kernel is positive and infinitely differentiable, each density p^r,tε\widehat{p}^{\varepsilon}_{r,t}, where r=∞r=\infty denotes the pre-change model and r=1r=1 the post-change model, in (1) is positive and smooth. Moreover, the Gaussian kernel, and hence each finite mixture, satisfies the classical heat equation

∂tp^r,tε(y)=Δyp^r,tε(y),Δy=∑m=1d∂2∂ym2.\partial_t\widehat{p}^{\varepsilon}_{r,t}(y)=\Delta_y\widehat{p}^{\varepsilon}_{r,t}(y),\qquad\Delta_y=\sum_{m=1}^{d}\frac{\partial^2}{\partial y_m^2}.

The expression ∂2/∂ym2\partial^2/\partial y_m^2 is a differentiation operator: applied to a function, it gives its second derivative in coordinate ymy_m. The Laplacian Δy\Delta_y sums these derivatives across coordinates and measures the local spatial curvature of the density with respect to the observation yy; the equation states that increasing diffusion time smooths the density according to that curvature [22, 9] (), Ho et al. 2020). Because both empirical models follow this same evolution, their fixed-time Fisher divergences can later be integrated into a KL divergence. Appendix § 8.§ 2 verifies the heat equation directly. We next compare the two Hyvärinen scores at each smoothing scale to obtain evidence of a change; integrating that evidence across scales will give the KL-based mean increments.

Closed-Form Score from Samples

Section 2.1 provides two positive, smooth reference densities at every diffusion time tt: p^∞,tε\widehat{p}^{\varepsilon}_{\infty,t} for the pre-change regime and p^1,tε\widehat{p}^{\varepsilon}_{1,t} for the post-change regime. We now use the difference between their Hyvärinen scores as evidence for sequential change detection. At each fixed tt, the evidence is computable from the sample sets and has a negative pre-change mean and a positive post-change mean when the two smoothed empirical distributions differ.

For a positive twice differentiable density pp, let sp(y)=∇log⁡p(y)s_p(y) = \nabla\log p(y) denote its score and define the Hyvärinen score

SH(y;p)=12∥sp(y)∥2+Δlog⁡p(y).S_H(y;p) = \frac{1}{2}\lVert s_p(y)\rVert^2 + \Delta\log p(y).

Both terms depend only on derivatives of log⁡p\log p. Consequently, SH(y;p)S_H(y;p) is unchanged if pp is multiplied by an unknown positive normalizing constant, which makes it suitable for comparing unnormalized models [7] (), Wu et al. 2023).

The sign of the resulting comparison follows from the Hyvärinen score-matching identity. For positive normalized densities pp and qq, let PP and QQ denote their corresponding probability distributions. The Fisher divergence from PP to QQ is

DF(P∥Q)=EY∼P[∥sp(Y)−sq(Y)∥2],(2)D_F(P\mathbin{\|}Q) = \mathbb{E}_{Y\sim P}\left[\lVert s_p(Y)-s_q(Y)\rVert^2\right], \tag*{(2)}

where EY∼P\mathbb{E}_{Y\sim P} denotes expectation when YY is drawn from PP. Under the usual integration-by-parts conditions, the Hyvärinen score-matching identity states that

EY∼P[SH(Y;q)−SH(Y;p)]=12DF(P∥Q)≥0.(3)\mathbb{E}_{Y\sim P}\left[S_H(Y;q)-S_H(Y;p)\right] = \frac{1}{2}D_F(P\mathbin{\|}Q) \geq0. \tag*{(3)}

Appendix § 8.§ 3 gives a short derivation.

We therefore define the fixed-time evidence as

Δt(Y)=SH(Y;p^∞,tε)−SH(Y;p^1,tε).(4)\Delta_t(Y) = S_H(Y;\widehat{p}^{\varepsilon}_{\infty,t}) - S_H(Y;\widehat{p}^{\varepsilon}_{1,t}). \tag*{(4)}

The order of subtraction is important. If Y∼P^∞,tεY\sim\widehat{P}^{\varepsilon}_{\infty,t}, then (3) gives

E∞[Δt(Y)]=−12DF(P^∞,tε∥P^1,tε)≤0.\mathbb{E}_{\infty}[\Delta_t(Y)] = -\frac{1}{2}D_F(\widehat{P}^{\varepsilon}_{\infty,t}\mathbin{\|}\widehat{P}^{\varepsilon}_{1,t}) \leq0.

If Y∼P^1,tεY\sim\widehat{P}^{\varepsilon}_{1,t}, exchanging the two models gives

E1[Δt(Y)]=12DF(P^1,tε∥P^∞,tε)≥0.\mathbb{E}_{1}[\Delta_t(Y)] = \frac{1}{2}D_F(\widehat{P}^{\varepsilon}_{1,t}\mathbin{\|}\widehat{P}^{\varepsilon}_{\infty,t}) \geq0.

Thus Δt\Delta_t has a nonpositive mean before the change and a nonnegative mean afterward, with strict signs when the two smoothed distributions differ. These signs allow CUSUM to accumulate evidence of a change.

Because the smoothed densities are finite Gaussian mixtures, their Hyvärinen scores can be computed exactly from weighted moments of the pre- and post-change samples, without training a score network. For either reference set Rr\mathcal{R}_r, put h=ε+th=\varepsilon+t and

αj(y)=e−∥y−rj∥2/(4h)∑ℓe−∥y−rℓ∥2/(4h),k(y)=∑jαj(y)rj,\alpha_j(y)=\frac{e^{-\lVert y-r_j\rVert^2/(4h)}}{\sum_{\ell}e^{-\lVert y-r_\ell\rVert^2/(4h)}},\qquad k(y)=\sum_j\alpha_j(y)r_j,

and

V(y)=∑jαj(y)∥rj−k(y)∥2.V(y)=\sum_j\alpha_j(y)\lVert r_j-k(y)\rVert^2.

The exact formula used for the score comparisons is

SH(y;p^r,tε)=∥k(y)−y∥2+2V(y)8h2−d2h.S_H(y;\widehat{p}^{\varepsilon}_{r,t})= \frac{\lVert k(y)-y\rVert^2+2V(y)}{8h^2}-\frac{d}{2h}.

Appendix A.4 derives these formulas. We next combine the resulting score differences across diffusion times to construct the sequential stopping rule.

The DI-SCUSUM Stopping Rule

To combine the evidence Δt\Delta_t across diffusion times without evaluating every scale, DI-SCUSUM samples one time for each observation. Importance weighting then gives an unbiased estimate of the time integral of the noise-averaged score evidence. Choose a density ff on [0,∞)[0,\infty) with f(t)>0f(t)>0 for all t≥0t\geq0, so every positive-time interval has nonzero sampling probability. For each observation XnX_n, draw tn∼ft_n\sim f and Wn∼N(0,Id)W_n\sim\mathcal{N}(0,I_d) independently of each other, the data stream, and all previous auxiliary draws, and define

Yn=Xn+2(ε+tn)Wn.(5)Y_n=X_n+\sqrt{2(\varepsilon+t_n)}W_n. \tag*{(5)}

The variance in this perturbation is chosen to match the same effective scale htn=ε+tnh_{t_n}=\varepsilon+t_n in (1). For the empirical plug-in analysis, we set P∞=P^∞0P_{\infty}=\widehat{P}^{0}_{\infty} and P1=Q^00P_1=\widehat{Q}^{0}_0. Conditional on tn=tt_n=t, (5) therefore gives Yn∼P^∞,tεY_n\sim\widehat{P}^{\varepsilon}_{\infty,t} before the change and Yn∼P^1,tεY_n\sim\widehat{P}^{\varepsilon}_{1,t} afterward. The fixed-time drift identities then apply to (tn,Yn)(t_n,Y_n).

We now turn the single sampled diffusion time into an estimate of the full time integral. For a multiplier λ>0\lambda>0, define

znDI=2λf(tn)Δtn(Yn).(6)z_n^{\mathrm{DI}}=\frac{2\lambda}{f(t_n)}\Delta_{t_n}(Y_n). \tag*{(6)}

where

Δtn(Yn)=SH(Yn;p^∞,tnε)−SH(Yn;p^1,tnε).\Delta_{t_n}(Y_n)=S_H(Y_n;\widehat{p}^{\varepsilon}_{\infty,t_n})-S_H(Y_n;\widehat{p}^{\varepsilon}_{1,t_n}).

The factor 1/f(tn)1/f(t_n) gives more weight to diffusion times that are sampled less often, so the average increment accounts for the full time integral rather than favoring frequently sampled scales. Assume ∫0∞ErX[W∣Gt(X,W)] dt<∞\int_0^\infty\mathbb{E}_r^X[W\mid G_t(X,W)]\,\mathrm{d}t<\infty in both regimes, with GtG_t defined in Section 2.5. Changing ff preserves the mean but affects increment variability and false-alarm calibration. The multiplier λ>0\lambda>0 sets the overall size of the increments.

DI-SCUSUM initializes Z0=0Z_0=0 and updates the reflected CUSUM statistic as

Zn=max⁡{0,Zn−1+znDI}.(7)Z_n=\max\{0,Z_{n-1}+z_n^{\mathrm{DI}}\}. \tag*{(7)}

The procedure raises an alarm at

TDI=inf⁡{n≥1:Zn≥τ},(8)T_{\mathrm{DI}}=\inf\{n\geq1:Z_n\geq\tau\}, \tag*{(8)}

where τ>0\tau>0 is the alarm threshold. The maximum resets the statistic to zero whenever the accumulated evidence becomes negative; positive increments can raise the statistic to τ\tau. Larger thresholds reduce false alarms but increase detection delay.

Algorithm 1 summarizes the online updates. Appendix A.4 gives the closed-form scores.

Algorithm 1 DI-SCUSUM stopping rule

Require: Reference sets U,V\mathcal{U}, \mathcal{V}; base scale ε>0\varepsilon> 0; time density ff; multiplier λ>0\lambda> 0; threshold τ>0\tau> 0

  1. Initialize Z0←0Z_0 \leftarrow0

  2. for n=1,2,…n = 1, 2, \ldots do

  3. Observe XnX_n; sample tn∼ft_n \sim f and Wn∼N(0,Id)W_n \sim\mathcal{N}(0, I_d)

  4. Set Yn←Xn+2(ε+tn)WnY_n \leftarrow X_n + \sqrt{2(\varepsilon+ t_n)}W_n

  5. Evaluate the score difference Δtn(Yn)\Delta_{t_n}(Y_n)

  6. znDI←2λf(tn)Δtn(Yn)z_n^{\mathrm{DI}} \leftarrow\frac{2\lambda}{f(t_n)}\Delta_{t_n}(Y_n) as in (6)

  7. Zn←max⁡{0,Zn−1+znDI}Z_n \leftarrow\max\{0, Z_{n-1} + z_n^{\mathrm{DI}}\} as in (7)

  8. if Zn≥τZ_n \ge\tau then

  9. return TDI=nT_{\mathrm{DI}} = n

Sequential Guarantees

The relative de Bruijn identity below relates the integrated score evidence to KL divergence along the common Gaussian heat flow [20, 21].

Lemma 1 (Relative de Bruijn identity along a common heat flow). Let Pt,QtP_t, Q_t have positive smooth densities satisfying ∂tpt=Δpt\partial_t p_t = \Delta p_t and ∂tqt=Δqt\partial_t q_t = \Delta q_t. Under conditions that justify differentiation and integration by parts,

ddtKL⁡(Pt∥Qt)=−DF(Pt∥Qt).(9)\frac{d}{dt}\operatorname{KL}(P_t\|Q_t) = -D_F(P_t\|Q_t). \tag*{(9)}

Consequently, for 0≤a<b0 \le a < b,

∫abDF(Pt∥Qt) dt=KL⁡(Pa∥Qa)−KL⁡(Pb∥Qb).\int_a^b D_F(P_t\|Q_t)\,\mathrm{d}t = \operatorname{KL}(P_a\|Q_a) - \operatorname{KL}(P_b\|Q_b).

If the terminal KL divergence tends to zero, the integral over (0,∞)(0,\infty) equals KL⁡(P0∥Q0)\operatorname{KL}(P_0\|Q_0).

Appendix A.5 proves the lemma. For distinct Gaussian-smoothed empirical models, the terminal KL divergence vanishes, so the time integral recovers the initial KL divergence. Let Er\mathbb{E}^{r} denote expectation over an observation from regime r∈{∞,1}r \in\{\infty,1\}, and let Et,W\mathbb{E}^{t,W} denote expectation over the independent auxiliary draws (tn,Wn)(t_n,W_n). Combining (3), (6), and (9) gives

μ∞:=E∞X[Et,W[znDI∣Xn]]=−λKL⁡(P~ε∥Q~ε)<0,μ1:=E1X[Et,W[znDI∣Xn]]=λKL⁡(Q~ε∥P~ε)>0.(10)\begin{aligned} \mu_{\infty} &:= \mathbb{E}^{X}_{\infty}\left[\mathbb{E}^{t,W}\left[z_n^{\mathrm{DI}}\mid X_n\right]\right] = -\lambda\operatorname{KL}(\widetilde{P}^{\varepsilon}\|\widetilde{Q}^{\varepsilon}) < 0,\\ \mu_1 &:= \mathbb{E}^{X}_{1}\left[\mathbb{E}^{t,W}\left[z_n^{\mathrm{DI}}\mid X_n\right]\right] = \lambda\operatorname{KL}(\widetilde{Q}^{\varepsilon}\|\widetilde{P}^{\varepsilon}) > 0. \tag*{(10)} \end{aligned}

Appendix A.6 gives the conditioning argument.

False-alarm control requires more than a negative mean increment. The condition E∞[eznDI]≤1\mathbb{E}_{\infty}[e^{z_n^{\mathrm{DI}}}] \le1 ensures that the exponential of the cumulative, unreflected evidence does not increase in conditional expectation under no change, allowing threshold-crossing probabilities to be bounded. The next lemma gives conditions on the increment distribution under which λ\lambda can enforce this inequality or normalize the expectation to one.

Lemma 2 (Admissible Scaling and Cramér Root). Fix ε\varepsilon, ff, and the reference sets. Let Un=2Δtn(Yn)/f(tn)U_n = 2\Delta_{t_n}(Y_n)/f(t_n), so znDI=λUnz_n^{\mathrm{DI}} = \lambda U_n, and write M(s)=E∞[esUn]M(s) = \mathbb{E}_{\infty}[e^{sU_n}]. Suppose E∞∣Un∣<∞\mathbb{E}_{\infty}|U_n| < \infty, P~ε≠Q~ε\widetilde{P}^{\varepsilon} \ne\widetilde{Q}^{\varepsilon}, and the KL drift identity (10) holds.

  1. If M(η)<∞M(\eta) < \infty for some η>0\eta> 0, then M(λ)<1M(\lambda) < 1 for all sufficiently small λ>0\lambda> 0.

  2. If 1<M(b)<∞1 < M(b) < \infty for some b>0b > 0, there is a unique λ⋆∈(0,b)\lambda_{\star} \in(0,b) with M(λ⋆)=1M(\lambda_{\star}) = 1, and M(λ)≤1⟺0<λ≤λ⋆(λ>0)M(\lambda) \le1 \Longleftrightarrow0 < \lambda\le\lambda_{\star}\quad(\lambda> 0).

For every λ>0\lambda> 0, the increment λUn\lambda U_n has positive Cramér root θλ,ε=λ⋆/λ\theta_{\lambda,\varepsilon} = \lambda_{\star}/\lambda, with a finite moment-generating function in a neighborhood of this root.

Thus λ=λ⋆\lambda= \lambda_{\star} gives unit Cramér root, whereas a smaller admissible multiplier gives a strict exponential-moment inequality. The moment conditions concern the full importance-weighted increment; negative drift alone does not imply them. Appendix A.7 gives the proof.

The multiplier rescales the evidence rather than changing the observations used by the procedure. For the same observations and auxiliary draws, multiplying every increment by λ>0\lambda> 0 also multiplies the reflected statistic by λ\lambda. Thus a threshold τ\tau with multiplier λ\lambda is equivalent to a threshold τ/λ\tau/\lambda with multiplier one: T(λ)(τ)=T(1)(τ/λ)T^{(\lambda)}(\tau) = T^{(1)}(\tau/\lambda). If only the multiplier changes from λ\lambda to λ′\lambda', rescaling the threshold from τ\tau to (λ′/λ)τ(\lambda'/\lambda)\tau preserves every alarm time and requires no new threshold simulations.

For the sequential analysis, assume the increments are i.i.d. and non-arithmetic. Before the change, assume their moment-generating function is finite near the positive Cramér root θλ,ε\theta_{\lambda,\varepsilon} defined by E∞X,t,W[eθλ,εznDI]=1\mathbb{E}_{\infty}^{X,t,W}[e^{\theta_{\lambda,\varepsilon}z_n^{\mathrm{DI}}}] = 1. After the change, assume a finite second moment, a finite mean overshoot bound COSC_{\mathrm{OS}}, and a finite expected downward excursion,

Cmin⁡′=E1[−inf⁡m≥0∑k=1mzkDI]<∞.C_{\min}' = \mathbb{E}_1\left[-\inf_{m\ge0}\sum_{k=1}^{m}z_k^{\mathrm{DI}}\right] < \infty.

The constant COSC_{\mathrm{OS}} bounds, uniformly over τ>0\tau> 0, the expected amount by which the unreflected post-change random walk exceeds τ\tau at its first crossing. Both COSC_{\mathrm{OS}} and Cmin⁡C_{\min} are independent of τ\tau. These are standard renewal conditions for CUSUM-type procedures [11, 12] (), Wu et al. 2023).

Under these assumptions, the increment distribution determines how the threshold controls false alarms and detection delay. The following theorem gives the pre-change average run length.

Theorem 1 (False-alarm scaling). Under the pre-change conditions above, as τ→∞\tau\to\infty,

log⁡ARL⁡(TDI)=log⁡E∞[TDI]=θλ,ετ+O(1).(11)\log\operatorname{ARL}(T_{\mathrm{DI}})=\log\mathbb{E}_{\infty}[T_{\mathrm{DI}}]=\theta_{\lambda,\varepsilon}\tau+O(1). \tag*{(11)}

Consequently, a target ARL ≈γ\approx\gamma has the leading-order calibration τ≈log⁡(γ)/θλ,ε\tau\approx\log(\gamma)/\theta_{\lambda,\varepsilon}.

A proof is given in Appendix § 8.8.

The false-alarm theorem calibrates τ\tau, but it does not state how quickly a change is detected. After the change, the positive mean μ1=λKL⁡(Q^ε∥P^ε)\mu_1=\lambda\operatorname{KL}(\widehat{Q}_{\varepsilon}\mathbin{\|}\widehat{P}_{\varepsilon}) from (10) drives the statistic toward the calibrated threshold. The next theorem bounds the resulting detection delay.

Theorem 2 (Conditional detection delay). Under the post-change conditions above,

τ−Cmin⁡μ1≤CADD⁡(TDI)=E1[TDI]≤τ+Cosμ1(12)\frac{\tau-C_{\min}}{\mu_1}\leq\operatorname{CADD}(T_{\mathrm{DI}})=\mathbb{E}_1[T_{\mathrm{DI}}]\leq\frac{\tau+C_{\mathrm{os}}}{\mu_1} \tag*{(12)}
CADD⁡(TDI)=τλKL⁡(Q^ε∥P^ε)+O(1).(13)\operatorname{CADD}(T_{\mathrm{DI}})=\frac{\tau}{\lambda\operatorname{KL}(\widehat{Q}_{\varepsilon}\mathbin{\|}\widehat{P}_{\varepsilon})}+O(1). \tag*{(13)}

A proof is given in Appendix § 8.9. At ν=1\nu=1, Z0=0Z_0=0 and TT counts the post-change observations through the alarm; this case attains CADD for the reflected recursion.

The two theorems separate calibration from detection: the pre-change Cramér root governs false alarms, while the forward KL divergence governs the first-order delay. Combining them at a matched target ARL ≈γ\approx\gamma gives

CADD⁡(TDI)=log⁡γθλ,ελKL⁡(Q^ε∥P^ε)+O(1),\operatorname{CADD}(T_{\mathrm{DI}})=\frac{\log\gamma}{\theta_{\lambda,\varepsilon}\lambda\operatorname{KL}(\widehat{Q}_{\varepsilon}\mathbin{\|}\widehat{P}_{\varepsilon})}+O(1),

which also shows why drift comparisons are meaningful only after false-alarm calibration.

Finally, the base smoothing parameter ε\varepsilon creates a genuine statistical tradeoff. It is needed to turn the empirical measures into positive probability distributions with finite KL divergence, but additional smoothing also removes information. Applying the same heat-flow identity with ε\varepsilon as the smoothing variable gives

ddεKL⁡(Q^ε∥P^ε)=−DF(Q^ε∥P^ε)≤0.\frac{d}{d\varepsilon}\operatorname{KL}(\widehat{Q}_{\varepsilon}\mathbin{\|}\widehat{P}_{\varepsilon})=-D_F(\widehat{Q}_{\varepsilon}\mathbin{\|}\widehat{P}_{\varepsilon})\leq0.

Thus increasing ε\varepsilon improves regularity and numerical stability but can reduce the KL information available for detection. The drift identities in (10) and the guarantees in Theorems 1 and 2 are conditional on the fixed reference sets and the exact empirical plug-in model.

The sampling density ff can reduce the variability of the increments by allocating more draws to suitable diffusion times. Define

Gt(X,W)=2Δt(X+2(ε+t)W).G_t(X,W)=2\Delta_t\left(X+\sqrt{2(\varepsilon+t)}W\right).

The density that minimizes the post-change second moment is

f∗(t)∝E1[Gt(X,W)2].f^*(t)\propto\sqrt{\mathbb{E}_1[G_t(X,W)^2]}.

provided its normalizing integral is finite (Proposition 3; proof in Appendix § 8.10). In practice, the second moment can be estimated on a pilot grid. Averaging MM independent time-noise draws for each observation preserves the mean and divides the conditional sampling variance by MM, when finite, at the cost of MM score comparisons. This reduces fluctuations caused by the auxiliary draws.

Rao–Blackwellization instead removes the noise-sampling variance by averaging over WW conditional on the observation [17, 4]:

G‾t(X)=E[Gt(X,W)∣X].\overline{G}_t(X)=\mathbb{E}[G_t(X,W)\mid X].

A quadrature rule with times tℓt_\ell and weights wℓw_\ell then approximates the remaining time integral by

z^nRB=λ∑ℓ=1LwℓG‾tℓ(Xn).\widehat{z}^{\mathrm{RB}}_n=\lambda\sum_{\ell=1}^{L}w_\ell\overline{G}_{t_\ell}(X_n).

Monte Carlo is unbiased under integrability; quadrature removes time-sampling variance but introduces truncation and discretization error.

For a target ARL γ\gamma, the theoretical approximation τ≈log⁡(γ)/θλ,ε\tau\approx\log(\gamma)/\theta_{\lambda,\varepsilon} supplies an initial threshold. We simulate no-change streams and refine the threshold by bisection until the empirical ARL matches the target. Calibration is repeated when ε\varepsilon, ff, or the estimator changes; changing only λ\lambda requires the same proportional change in τ\tau. Exact score evaluation costs O((N0+N1)d)O((N_0+N_1)d) per diffusion time. Appendix § 8.11 gives further implementation and approximation details.

Estimation and Calibration

The mean increment does not depend on ff, but its variance does. We next choose how to estimate the diffusion integral and calibrate the alarm threshold.

Benefits of Diffusion Integration

Section 2 established the validity of the integrated detector. We now isolate why integration can retain information that a single-scale score statistic loses.

Information Carried by Different Diffusion Times

For smooth population probability distributions P∞P_\infty and P1P_1, set ε=0\varepsilon= 0 and evolve both under the common heat flow

P∞,t=P∞∗N(0,2tId),P1,t=P1∗N(0,2tId).P_{\infty,t}=P_\infty* \mathcal{N}(0,2tI_d), \qquad P_{1,t}=P_1 * \mathcal{N}(0,2tI_d).

Assume that KL⁡(P1∥P∞)<∞\operatorname{KL}(P_1\mathbin\Vert P_\infty)<\infty and that the densities satisfy the positivity and regularity conditions of Lemma 1. Define a(t)=DF(P1,t∥P∞,t)a(t)=D_F(P_{1,t}\mathbin\Vert P_{\infty,t}). Then a(t)/2a(t)/2 is the mean post-change score evidence at time tt, while

∫0∞a(t) dt=KL⁡(P1∥P∞)\int_0^\infty a(t)\,\mathrm{d}t=\operatorname{KL}(P_1\mathbin\Vert P_\infty)

whenever the terminal KL divergence vanishes. SCUSUM [Wu et al. (2023)] uses the score difference at t=0t=0, whereas DI-SCUSUM estimates the integral of score differences across diffusion times.

Proposition 1 (Information in a finite diffusion window). For every T>0T>0,

∫0Ta(t) dt=KL⁡(P1∥P∞)−KL⁡(P1,T∥P∞,T).\int_0^T a(t)\,\mathrm{d}t=\operatorname{KL}(P_1\mathbin\Vert P_\infty)-\operatorname{KL}(P_{1,T}\mathbin\Vert P_{\infty,T}).

If KL⁡(P1∥P∞)>0\operatorname{KL}(P_1\mathbin\Vert P_\infty)>0, the fraction recovered by times up to TT is

R(T)=∫0Ta(t) dtKL⁡(P1∥P∞)=1−KL⁡(P1,T∥P∞,T)KL⁡(P1∥P∞).R(T)=\frac{\int_0^T a(t)\,\mathrm{d}t}{\operatorname{KL}(P_1\mathbin\Vert P_\infty)}=1-\frac{\operatorname{KL}(P_{1,T}\mathbin\Vert P_{\infty,T})}{\operatorname{KL}(P_1\mathbin\Vert P_\infty)}.

Hence R(T)R(T) is exactly the fraction of forward KL information recovered by the window [0,T][0,T]. Appendix § 8.12 gives the proof and interpretation; ff affects estimation variance but not R(T)R(T).

Remark 1 (Anisotropic Gaussian comparison). Let P∞=N(θ0,Σ)P_\infty=\mathcal{N}(\theta_0,\Sigma) and P1=N(θ1,Σ)P_1=\mathcal{N}(\theta_1,\Sigma), with Σ≻0\Sigma\succ0 and a nonzero mean shift δ=θ1−θ0\delta=\theta_1-\theta_0. Define A=δ⊤Σ−2δA=\delta^\top\Sigma^{-2}\delta and B=δ⊤Σ−3δB=\delta^\top\Sigma^{-3}\delta. After scaling each method so that E∞[ez]=1\mathbb{E}_\infty[e^z]=1, the post-change mean increments are

ICUSUM=12δ⊤Σ−1δ,ISCUSUM=A22B≤ICUSUM.I_{\mathrm{CUSUM}}=\frac{1}{2}\delta^\top\Sigma^{-1}\delta,\qquad I_{\mathrm{SCUSUM}}=\frac{A^2}{2B}\leq I_{\mathrm{CUSUM}}.

Likelihood-ratio CUSUM weights covariance eigendirections by inverse variance; SCUSUM uses inverse variance squared. A scalar multiplier cannot align these weights when the shift spans directions with different variances, giving a strict inequality. Equality holds when all directions carrying the shift have the same variance.

Integration recovers the likelihood-ratio weights. For Dt(y)=SH(y;p∞,t)−SH(y;p1,t)D_t(y)=S_H(y;p_{\infty,t})-S_H(y;p_{1,t}) and Yt=X+2t WY_t=X+\sqrt{2t}\,W,

EW[2∫0∞Dt(Yt) dt∣X]=log⁡p1(X)p∞(X).\mathbb{E}_W\left[2\int_0^\infty D_t(Y_t)\,\mathrm{d}t\mathrel{\bigg|}X\right]=\log\frac{p_1(X)}{p_\infty(X)}.

Thus the ideal integrated increment equals the log-likelihood ratio, giving IDI=ICUSUMI_{\mathrm{DI}}=I_{\mathrm{CUSUM}}. Appendix § 8.13 gives the derivation; § 4 tests this comparison.

The Gaussian identity assumes exact noise averaging and integration over all diffusion times; finite numerical implementations approximate it. Adaptive weights across times change the target evidence and require separate calibration (Appendix § 8.14).

Experiments

We first test whether diffusion integration recovers likelihood-ratio CUSUM performance in an anisotropic Gaussian model, then compare sample-based methods on MNIST and Oxford-IIIT Pet streams (Figure 2). Thresholds are calibrated under no change before evaluating detection delay.

Detection delay plots for anisotropic Gaussian, MNIST 3 → 5, and Oxford-IIIT Pet

Figure 2. (a) Anisotropic Gaussian. (b) MNIST 3 → 5. (c) Oxford-IIIT Pet. Figure 2: Detection delay versus nominal ARL target. (a) Gaussian CDD500,H\mathrm{CDD}_{500,H}; (b,c) image delay with conditional 95% Monte Carlo intervals. Attained ARLs are audited in the text. Delays count observations through the alarm; kernel methods start from initialized pre-change windows.

Anisotropic Gaussian Diagnostic

Setup and Methods. The pre- and post-change means are θ0=(0,0)⊤\theta_0=(0,0)^\top and θ1=(0.1,10)⊤\theta_1=(0.1,10)^\top, with common covariance Σ=diag⁡(0.1,10)\Sigma=\operatorname{diag}(0.1,10). After normalizing both methods so that E∞[ez]=1\mathbb{E}_\infty[e^z]=1, SCUSUM’s post-change mean increment is 0.198020.19802, or 3.92%3.92\% of likelihood-ratio CUSUM’s 5.055.05 (Remark 1). We compare likelihood-ratio CUSUM, SCUSUM, Rao–Blackwellized DI-SCUSUM-quad, and DI-SCUSUM-exact, whose increment equals the Gaussian log-likelihood ratio. With ε=0\varepsilon=0, quadrature uses 128 log-spaced times in [10−5,104][10^{-5},10^4]. Its coefficients (5.02128,0.0501986)(5.02128,0.0501986) approximate the exact (5,0.05)(5,0.05) with relative errors 0.426%0.426\% and 0.397%0.397\%, providing a numerical check independent of the delay estimates. Appendix § 8.11 gives the weights and thresholds.

Calibration and Delay. Each threshold is calibrated separately at γ∈{500,1000,2000}\gamma\in\{500,1000,2000\} using 2,048 no-change streams, bracket expansion, and 14 bisection steps. With horizon H=6000H=6000, the calibration quantity is ARL⁡H=E∞[min⁡{T,H}]\operatorname{ARL}_H=\mathbb{E}_\infty[\min\{T,H\}], a lower bound on uncensored ARL. Paths without an alarm are censored at HH. Using 4,096 new streams with change time ν=500\nu=500, we estimate

CDD⁡500,H(T)=E500[min⁡{T,H}−499∣T≥500].\operatorname{CDD}_{500,H}(T)=\mathbb{E}_{500}[\min\{T,H\}-499\mid T\geq500].

Conditioning excludes alarms before the change; subtracting ν−1=499\nu-1=499 counts post-change observations through the alarm. This horizon-censored fixed-change delay approximates its uncensored counterpart when post-change censoring is negligible and does not estimate Pollak’s supremum over change times.

For CUSUM-type methods, calibration and reporting share a pre-change increment pool. Delay is measured from ν=1\nu= 1 and counts observations through the alarm, attaining CADD under i.i.d. increments. Kernel methods instead start from initialized pre-change windows. The 95% Monte Carlo intervals condition on the datasets, references, and simulation pools.

Results. Censored no-change means are within 4.43% of their targets. Both integrated variants closely track CUSUM in Figure 2(a), with maximum absolute delay differences of 0.054 observations for quadrature and 0.028 for exact integration. DI-SCUSUM-quad reduces fixed-change delay relative to SCUSUM by about 91%, consistent with the predicted information recovery under comparable finite-horizon calibration.

Sample-Based Image Experiments

Setup and Methods. MNIST [26] uses digit 3 → 5, 12-dimensional PCA fitted on training pixels, and 600 reference images per class. Oxford-IIIT Pet [27] uses cats → dogs, frozen ImageNet-pretrained ResNet-18 features [24] (), He et al. 2016), L2 normalization, and PCA fitted on trainval, with 450 reference images per class. Methods share the 12-dimensional features and source reference partition within each study.

Both studies compare diagonal-Gaussian CUSUM, Gaussian-KDE CUSUM, SCUSUM, and DI-SCUSUM-quad with 20 time nodes and antithetic noise. MNIST also includes CALM-MMD and the Scan BB-statistic, using 25-observation windows and reference median-distance RBF bandwidths. CALM uses an ARL-corrected time-varying schedule; Scan BB uses a calibrated constant threshold.

Calibration and Delay. Targets are γ∈{250,500,1000,2000}\gamma\in\{250, 500, 1000, 2000\}; reference models and drift corrections use training data only. Calibration, ARL reporting, and delay evaluation each use 8,192 independent paths from fixed empirical populations.

Results. On MNIST, the 5% target-error and pairwise-ARL audit, with censoring below 1%, passes for all six methods at targets 250 and 1000. At 500 and 2000, maximum target errors are 5.50% and 7.65%, and pairwise spreads are 6.25% and 8.88%; these points do not support strict six-method comparisons. DI-SCUSUM-quad and SCUSUM pass their pairwise audit at all four targets: ARL gaps are at most 3.76%, and CADD reductions are 39.5–42.7%. DI-SCUSUM-quad remains close to KDE-CUSUM; kernel delays are substantially larger at the two fully audited targets.

On Oxford-IIIT Pet, all methods pass the 99% lower-confidence-bound audit for ARL ≥γ\ge\gamma. DI-SCUSUM-quad reduces CADD relative to SCUSUM by 6.3–12.6%, with ARL gaps below 4.3%, and remains close to KDE-CUSUM. At γ=2000\gamma= 2000, diagonal-Gaussian CUSUM attains empirical ARL 3709; Figure 2(c) plots nominal targets; comparisons must account for the attained ARLs.

Comparison Scope. Likelihood and score methods use both pre- and post-change samples, whereas kernel methods use only pre-change samples and update 25-observation windows. Their delay differences therefore reflect the available information, window initialization, and detection statistic. The MNIST kernel comparison does not isolate diffusion integration as the sole source of improvement. The DI-SCUSUM-quad–SCUSUM comparison tests integration more directly: both share the representation, reference models, and reflected recursion, with thresholds calibrated separately on no-change paths.

AI use statement

In this work, we used ChatGPT and Codex (OpenAI) as supporting tools during manuscript revision. Editorial assistance included improving grammar, wording, clarity, flow, and presentation of author-provided text, formatting figures and references, and checking literature and citations. The tools also supported the review and refinement of mathematical derivations and proof explanations, diagnostic numerical checks of identities, and interpretation of existing experimental results. The diagnostic checks did not generate the reported detection experiments. The authors retain responsibility for evaluating AI-assisted suggestions and for the final content of the paper, including its text, mathematical claims, proofs, code, citations, and experimental results.

Supplementary Materials

Proofs

Parameter Roles

The parameters ε\varepsilon and tt therefore serve two different purposes. The base scale ε\varepsilon is applied once to replace the two discrete empirical measures by smooth distributions with common support. Starting from these fixed reference models, varying tt produces increasingly smoothed views of the same two distributions. At small tt, the score contrast remains sensitive to local differences near the reference samples. As tt increases, the added noise variance 2t2t increases and both distributions become smoother. Because the same Gaussian smoothing is applied to both distributions, their KL divergence decreases and tends to zero as t→∞t \to\infty; it does not diverge. Large tt therefore contributes coarser but progressively weaker evidence. DI-SCUSUM integrates the score contrast over the full path, combining the informative contributions across scales rather than selecting one smoothing level in advance.

The four tuning quantities should be kept conceptually separate. The base scale ε\varepsilon changes the two empirical plug-in probability distributions themselves by setting the minimum amount of Gaussian smoothing. The density ff does not change those probability distributions; it determines which diffusion times are sampled more often and therefore affects the variance of the integral estimator. The multiplier λ\lambda rescales every increment, while τ\tau determines how much accumulated evidence is required before stopping. In particular, changing ff is an estimation choice, whereas changing ε\varepsilon changes the statistical problem being detected.

Small ε\varepsilon keeps the smoothed probability distributions close to their empirical measures but yields sharper scores and potentially large KL values when supports differ; large ε\varepsilon improves numerical stability while attenuating distributional differences. The time density ff changes the variance, not the target integral, provided it has adequate support.

Gaussian-Mixture Heat-Flow Calculation

Proof. By convolution with the empirical measures,

p^∞,tε(y)=1N0∑i=1N0φht(y−ui),\widehat{p}^{\varepsilon}_{\infty,t}(y) = \frac{1}{N_0}\sum_{i=1}^{N_0}\varphi_{h_t}(y-u_i),
p^1,tε(y)=1N1∑j=1N1φht(y−vj),\widehat{p}^{\varepsilon}_{1,t}(y) = \frac{1}{N_1}\sum_{j=1}^{N_1}\varphi_{h_t}(y-v_j),

where, for s>0s > 0,

φs(x)=(4πs)−d/2exp⁡(−∥x∥24s).\varphi_s(x) = (4\pi s)^{-d/2}\exp\left(-\frac{\lVert x\rVert^2}{4s}\right).

Direct differentiation gives

∂sφs(x)=(−d2s+∥x∥24s2)φs(x).\partial_s\varphi_s(x) = \left(-\frac{d}{2s}+\frac{\lVert x\rVert^2}{4s^2}\right)\varphi_s(x).

Moreover,

∇φs(x)=−x2sφs(x),Δφs(x)=(−d2s+∥x∥24s2)φs(x).\nabla\varphi_s(x) = -\frac{x}{2s}\varphi_s(x), \qquad\Delta\varphi_s(x) = \left(-\frac{d}{2s}+\frac{\lVert x\rVert^2}{4s^2}\right)\varphi_s(x).

Hence ∂sφs=Δφs\partial_s\varphi_s = \Delta\varphi_s. Since ht=ε+th_t = \varepsilon+ t, differentiation with respect to tt is the same as differentiation with respect to hth_t; finite sums commute with both operators. Therefore both smoothed empirical densities satisfy the heat equation ∂tp^r,tε=Δp^r,tε\partial_t\widehat{p}^{\varepsilon}_{r,t} = \Delta\widehat{p}^{\varepsilon}_{r,t} for r∈{∞,1}r \in\{\infty,1\}.

Hyvärinen Score-Matching Identity

Proof. Write sp=∇log⁡ps_p = \nabla\log p and sq=∇log⁡qs_q = \nabla\log q. By definition,

EP[SH(Y;q)−SH(Y;p)]=∫Rdp(y){12∥sq(y)∥2−12∥sp(y)∥2} dy+∫Rdp(y){Δlog⁡q(y)−Δlog⁡p(y)} dy.\mathbb{E}_P\left[S_H(Y;q)-S_H(Y;p)\right] = \int_{\mathbb{R}^d} p(y)\left\{\frac{1}{2}\lVert s_q(y)\rVert^2-\frac{1}{2}\lVert s_p(y)\rVert^2\right\}\,dy + \int_{\mathbb{R}^d}p(y)\{\Delta\log q(y)-\Delta\log p(y)\}\,dy.

Integration by parts gives

∫Rdp Δlog⁡q dy=−∫Rd⟨∇p,∇log⁡q⟩ dy=−∫Rdp⟨sp,sq⟩ dy,\int_{\mathbb{R}^d}p\,\Delta\log q\,dy=-\int_{\mathbb{R}^d}\langle\nabla p,\nabla\log q\rangle\,dy=-\int_{\mathbb{R}^d}p\langle s_p,s_q\rangle\,dy,

and, similarly,

∫Rdp Δlog⁡p dy=−∫Rdp∥sp∥2 dy.\int_{\mathbb{R}^d}p\,\Delta\log p\,dy=-\int_{\mathbb{R}^d}p\lVert s_p\rVert^2\,dy.

Substitution yields

EP[SH(Y;q)−SH(Y;p)]=12EP∥sq(Y)∥2−12EP∥sp(Y)∥2−EP⟨sp(Y),sq(Y)⟩+EP∥sp(Y)∥2=12EP∥sp(Y)−sq(Y)∥2=12DF(P∥Q).\begin{aligned} \mathbb{E}_P\left[S_H(Y;q)-S_H(Y;p)\right] &=\frac{1}{2}\mathbb{E}_P\lVert s_q(Y)\rVert^2-\frac{1}{2}\mathbb{E}_P\lVert s_p(Y)\rVert^2\\ &\quad-\mathbb{E}_P\langle s_p(Y),s_q(Y)\rangle+\mathbb{E}_P\lVert s_p(Y)\rVert^2\\ &=\frac{1}{2}\mathbb{E}_P\lVert s_p(Y)-s_q(Y)\rVert^2\\ &=\frac{1}{2}D_F(P\mathbin\Vert Q). \end{aligned}

The equivalent identity follows by multiplying both sides by −1-1.

Closed-Form Gaussian-Mixture Score Formulas

For the pre-change reference set U\mathcal{U}, define

αi∞,ε(y;t)=exp⁡(−∥y−ui∥2/(4ht))∑ℓ=1N0exp⁡(−∥y−uℓ∥2/(4ht)),kt∞,ε(y)=∑i=1N0αi∞,ε(y;t)ui,Vt∞,ε(y)=∑i=1N0αi∞,ε(y;t)∥ui−kt∞,ε(y)∥2.(14)\begin{aligned} \alpha_i^{\infty,\varepsilon}(y;t)&=\frac{\exp\left(-\lVert y-u_i\rVert^2/(4h_t)\right)}{\sum_{\ell=1}^{N_0}\exp\left(-\lVert y-u_\ell\rVert^2/(4h_t)\right)},\\ k_t^{\infty,\varepsilon}(y)&=\sum_{i=1}^{N_0}\alpha_i^{\infty,\varepsilon}(y;t)u_i,\\ V_t^{\infty,\varepsilon}(y)&=\sum_{i=1}^{N_0}\alpha_i^{\infty,\varepsilon}(y;t)\lVert u_i-k_t^{\infty,\varepsilon}(y)\rVert^2. \tag*{(14)} \end{aligned}

The post-change quantities αj1,ε\alpha_j^{1,\varepsilon}, kt1,εk_t^{1,\varepsilon}, and Vt1,εV_t^{1,\varepsilon} are defined analogously using V\mathcal{V}.

Proposition 2 (Gaussian-mixture score identities). For r∈{∞,1}r\in\{\infty,1\}, t≥0t\ge0, and y∈Rdy\in\mathbb{R}^d,

∇log⁡p^r,tε(y)=ktr,ε(y)−y2ht,(15)\nabla\log\widehat{p}_{r,t}^{\varepsilon}(y)=\frac{k_t^{r,\varepsilon}(y)-y}{2h_t}, \tag*{(15)}
div⁡ktr,ε(y)=Vtr,ε(y)2ht,(16)\operatorname{div}k_t^{r,\varepsilon}(y)=\frac{V_t^{r,\varepsilon}(y)}{2h_t}, \tag*{(16)}
SH(y;p^r,tε)=∥ktr,ε(y)−y∥2+2Vtr,ε(y)8ht2−d2ht.(17)S_H(y;\widehat{p}_{r,t}^{\varepsilon})=\frac{\lVert k_t^{r,\varepsilon}(y)-y\rVert^2+2V_t^{r,\varepsilon}(y)}{8h_t^2}-\frac{d}{2h_t}. \tag*{(17)}

Consequently, both terms in Δt(y)\Delta_t(y) can be evaluated exactly from the corresponding reference set in O(Nrd)O(N_r d) operations.

Proof. Diffusion score. For the pre-change density,

p^∞,tε(y)=1N0∑i=1N0(4π(ε+t))−d/2exp⁡(−∥y−ui∥24(ε+t)).\widehat{p}_{\infty,t}^{\varepsilon}(y)=\frac{1}{N_0}\sum_{i=1}^{N_0}(4\pi(\varepsilon+t))^{-d/2}\exp\left(-\frac{\lVert y-u_i\rVert^2}{4(\varepsilon+t)}\right).

Differentiating gives

∇p~∞,tε(y)=1N0∑i=1N0φε+t(y−ui)(−y−ui2(ε+t)).\nabla\widetilde{p}_{\infty,t}^{\varepsilon}(y)=\frac{1}{N_0}\sum_{i=1}^{N_0}\varphi_{\varepsilon+t}(y-u_i)\left(-\frac{y-u_i}{2(\varepsilon+t)}\right).

Dividing by p~∞,tε(y)\widetilde{p}_{\infty,t}^{\varepsilon}(y) yields

∇log⁡p~∞,tε(y)=∑i=1N0αi∞,ε(y;t)ui−y2(ε+t)=kt∞,ε(y)−y2(ε+t).\nabla\log\widetilde{p}_{\infty,t}^{\varepsilon}(y)=\sum_{i=1}^{N_0}\alpha_i^{\infty,\varepsilon}(y;t)\frac{u_i-y}{2(\varepsilon+t)} =\frac{k_t^{\infty,\varepsilon}(y)-y}{2(\varepsilon+t)}.

The proof for p~1,tε\widetilde{p}_{1,t}^{\varepsilon} is identical.

Barycentric divergence. We prove the pre-change identity; the post-change identity is identical. Let h=ε+th=\varepsilon+t and k(y)=kt∞,ε(y)k(y)=k_t^{\infty,\varepsilon}(y). For notational convenience, write αi(y)=αi∞,ε(y;t)\alpha_i(y)=\alpha_i^{\infty,\varepsilon}(y;t). Then

αi(y)=exp⁡(−∥y−ui∥2/(4h))∑ℓ=1N0exp⁡(−∥y−uℓ∥2/(4h)).\alpha_i(y)=\frac{\exp\left(-\lVert y-u_i\rVert^2/(4h)\right)}{\sum_{\ell=1}^{N_0}\exp\left(-\lVert y-u_\ell\rVert^2/(4h)\right)}.

For r∈{1,…,d}r\in\{1,\ldots,d\},

∂∂yrlog⁡αi(y)=−yr−ui,r2h+∑ℓ=1N0αℓ(y)yr−uℓ,r2h=ui,r−kr(y)2h.\frac{\partial}{\partial y_r}\log\alpha_i(y)=-\frac{y_r-u_{i,r}}{2h}+\sum_{\ell=1}^{N_0}\alpha_\ell(y)\frac{y_r-u_{\ell,r}}{2h} =\frac{u_{i,r}-k_r(y)}{2h}.

Thus

∂∂yrαi(y)=αi(y)ui,r−kr(y)2h.\frac{\partial}{\partial y_r}\alpha_i(y)=\alpha_i(y)\frac{u_{i,r}-k_r(y)}{2h}.

Since kr(y)=∑i=1N0αi(y)ui,rk_r(y)=\sum_{i=1}^{N_0}\alpha_i(y)u_{i,r},

∂∂yrkr(y)=∑i=1N0ui,r∂∂yrαi(y)=12h∑i=1N0αi(y)ui,r(ui,r−kr(y)).\frac{\partial}{\partial y_r}k_r(y)=\sum_{i=1}^{N_0}u_{i,r}\frac{\partial}{\partial y_r}\alpha_i(y) =\frac{1}{2h}\sum_{i=1}^{N_0}\alpha_i(y)u_{i,r}(u_{i,r}-k_r(y)).

Because ∑i=1N0αi(y)(ui,r−kr(y))=0\sum_{i=1}^{N_0}\alpha_i(y)(u_{i,r}-k_r(y))=0, we may subtract kr(y)k_r(y) from the first factor ui,ru_{i,r} to obtain

∂∂yrkr(y)=12h∑i=1N0αi(y)(ui,r−kr(y))2.\frac{\partial}{\partial y_r}k_r(y)=\frac{1}{2h}\sum_{i=1}^{N_0}\alpha_i(y)(u_{i,r}-k_r(y))^2.

Summing over r=1,…,dr=1,\ldots,d gives the desired divergence formula.

Hyvärinen score. For the pre-change probability distribution,

st∞,ε(y):=∇log⁡p~∞,tε(y)=kt∞,ε(y)−y2(ε+t).s_t^{\infty,\varepsilon}(y):=\nabla\log\widetilde{p}_{\infty,t}^{\varepsilon}(y)=\frac{k_t^{\infty,\varepsilon}(y)-y}{2(\varepsilon+t)}.

Therefore,

12∥st∞,ε(y)∥2=∥kt∞,ε(y)−y∥28(ε+t)2.\frac{1}{2}\left\lVert s_t^{\infty,\varepsilon}(y)\right\rVert^2=\frac{\left\lVert k_t^{\infty,\varepsilon}(y)-y\right\rVert^2}{8(\varepsilon+t)^2}.

Moreover,

div⁡st∞,ε(y)=div⁡kt∞,ε(y)2(ε+t)−div⁡y2(ε+t)=div⁡kt∞,ε(y)2(ε+t)−d2(ε+t).\operatorname{div}s_t^{\infty,\varepsilon}(y)=\frac{\operatorname{div}k_t^{\infty,\varepsilon}(y)}{2(\varepsilon+t)}-\frac{\operatorname{div}y}{2(\varepsilon+t)} =\frac{\operatorname{div}k_t^{\infty,\varepsilon}(y)}{2(\varepsilon+t)}-\frac{d}{2(\varepsilon+t)}.

Since

SH(y;r)=12∥∇log⁡r(y)∥2+div⁡(∇log⁡r(y)),S_H(y;r)=\frac{1}{2}\|\nabla\log r(y)\|^2+\operatorname{div}(\nabla\log r(y)),

the first formula follows. The proof for the post-change probability distribution is identical.

Proof of Lemma 1

Proof. Differentiating the relative entropy gives

ddtKL⁡(Pt∥Qt)=ddt∫Rdptlog⁡ptqt dy=∫Rd(∂tpt)log⁡ptqt dy+∫Rdpt(∂tptpt−∂tqtqt) dy.\frac{d}{dt}\operatorname{KL}(P_t\mathbin\Vert Q_t)=\frac{d}{dt}\int_{\mathbb{R}^d}p_t\log\frac{p_t}{q_t}\,dy =\int_{\mathbb{R}^d}(\partial_t p_t)\log\frac{p_t}{q_t}\,dy +\int_{\mathbb{R}^d}p_t\left(\frac{\partial_t p_t}{p_t}-\frac{\partial_t q_t}{q_t}\right)\,dy.

Since ∫Rd∂tpt dy=0\int_{\mathbb{R}^d}\partial_t p_t\,dy=0, the heat equations imply

ddtKL⁡(Pt∥Qt)=∫Rd(Δpt)log⁡ptqt dy−∫RdptΔqtqt dy.\frac{d}{dt}\operatorname{KL}(P_t\mathbin\Vert Q_t)=\int_{\mathbb{R}^d}(\Delta p_t)\log\frac{p_t}{q_t}\,dy-\int_{\mathbb{R}^d}p_t\frac{\Delta q_t}{q_t}\,dy.

Integration by parts in the first term gives

∫Rd(Δpt)log⁡ptqt dy=−∫Rdpt⟨∇log⁡pt,∇log⁡ptqt⟩ dy.\int_{\mathbb{R}^d}(\Delta p_t)\log\frac{p_t}{q_t}\,dy=-\int_{\mathbb{R}^d}p_t\left\langle\nabla\log p_t,\nabla\log\frac{p_t}{q_t}\right\rangle\,dy.

For the second term, use

Δqtqt=Δlog⁡qt+∥∇log⁡qt∥2\frac{\Delta q_t}{q_t}=\Delta\log q_t+\|\nabla\log q_t\|^2

and

∫RdptΔlog⁡qt dy=−∫Rdpt⟨∇log⁡pt,∇log⁡qt⟩ dy.\int_{\mathbb{R}^d}p_t\Delta\log q_t\,dy=-\int_{\mathbb{R}^d}p_t\langle\nabla\log p_t,\nabla\log q_t\rangle\,dy.

Combining these identities yields

ddtKL⁡(Pt∥Qt)=−∫Rdpt∥∇log⁡pt−∇log⁡qt∥2 dy=−DF(Pt∥Qt).\frac{d}{dt}\operatorname{KL}(P_t\mathbin\Vert Q_t)=-\int_{\mathbb{R}^d}p_t\|\nabla\log p_t-\nabla\log q_t\|^2\,dy =-D_F(P_t\mathbin\Vert Q_t).

Integrating from 00 to RR gives

∫0RDF(Pt∥Qt) dt=KL⁡(P0∥Q0)−KL⁡(PR∥QR).\int_0^R D_F(P_t\mathbin\Vert Q_t)\,dt=\operatorname{KL}(P_0\mathbin\Vert Q_0)-\operatorname{KL}(P_R\mathbin\Vert Q_R).

Letting R→∞R\to\infty and using KL⁡(PR∥QR)→0\operatorname{KL}(P_R\mathbin\Vert Q_R)\to0 proves the result.

Proof of the KL Drift Identities

Proof. Condition on the sampled diffusion time tt. Under the post-change empirical model, X∼Q^00X\sim\widehat{Q}_0^0, and therefore

Y∣t=X+2(ε+t)W∼P^1,tε.Y\mid t=X+\sqrt{2(\varepsilon+t)}W\sim\widehat{P}_{1,t}^{\varepsilon}.

By the Hyvärinen-score identity,

EY∼P^1,tε[SH(Y;p^∞,tε)−SH(Y;p^1,tε)]=12DF(P^1,tε∥P^∞,tε).\mathbb{E}_{Y\sim\widehat{P}^{\varepsilon}_{1,t}}\left[S_H(Y;\widehat{p}^{\varepsilon}_{\infty,t})-S_H(Y;\widehat{p}^{\varepsilon}_{1,t})\right] =\frac{1}{2}D_F\left(\widehat{P}^{\varepsilon}_{1,t}\mathbin{\|}\widehat{P}^{\varepsilon}_{\infty,t}\right).

Consequently,

E1[zλ,εDI]=∫0∞2λf(t)12DF(P^1,tε∥P^∞,tε)f(t) dt=λ∫0∞DF(P^1,tε∥P^∞,tε) dt.\mathbb{E}_1\left[z^{\mathrm{DI}}_{\lambda,\varepsilon}\right] =\int_0^\infty\frac{2\lambda}{f(t)}\frac{1}{2}D_F\left(\widehat{P}^{\varepsilon}_{1,t}\mathbin{\|}\widehat{P}^{\varepsilon}_{\infty,t}\right)f(t)\,dt =\lambda\int_0^\infty D_F\left(\widehat{P}^{\varepsilon}_{1,t}\mathbin{\|}\widehat{P}^{\varepsilon}_{\infty,t}\right)\,dt.

The heat-flow KL dissipation identity gives

∫0∞DF(P^1,tε∥P^∞,tε) dt=KL⁡(Q^ε∥P^ε).\int_0^\infty D_F\left(\widehat{P}^{\varepsilon}_{1,t}\mathbin{\|}\widehat{P}^{\varepsilon}_{\infty,t}\right)\,dt =\operatorname{KL}\left(\widehat{Q}^{\varepsilon}\mathbin{\|}\widehat{P}^{\varepsilon}\right).

Here the limiting KL divergence is zero because the two Gaussian mixtures have the same increasing covariance scale and finite-support mixing measures. Hence

E1[zλ,εDI]=λKL⁡(Q^ε∥P^ε).\mathbb{E}_1\left[z^{\mathrm{DI}}_{\lambda,\varepsilon}\right] =\lambda\operatorname{KL}\left(\widehat{Q}^{\varepsilon}\mathbin{\|}\widehat{P}^{\varepsilon}\right).

Under the pre-change empirical model, Y∣t∼P^∞,tεY\mid t\sim\widehat{P}^{\varepsilon}_{\infty,t}. The Hyvärinen-score identity now gives

EY∼P^∞,tε[SH(Y;p^∞,tε)−SH(Y;p^1,tε)]=−12DF(P^∞,tε∥P^1,tε).\mathbb{E}_{Y\sim\widehat{P}^{\varepsilon}_{\infty,t}}\left[S_H(Y;\widehat{p}^{\varepsilon}_{\infty,t})-S_H(Y;\widehat{p}^{\varepsilon}_{1,t})\right] =-\frac{1}{2}D_F\left(\widehat{P}^{\varepsilon}_{\infty,t}\mathbin{\|}\widehat{P}^{\varepsilon}_{1,t}\right).

Averaging over tt and applying the heat-flow identity yields

E∞[zλ,εDI]=−λ∫0∞DF(P^∞,tε∥P^1,tε) dt=−λKL⁡(P^ε∥Q^ε).\mathbb{E}_{\infty}\left[z^{\mathrm{DI}}_{\lambda,\varepsilon}\right] =-\lambda\int_0^\infty D_F\left(\widehat{P}^{\varepsilon}_{\infty,t}\mathbin{\|}\widehat{P}^{\varepsilon}_{1,t}\right)\,dt =-\lambda\operatorname{KL}\left(\widehat{P}^{\varepsilon}\mathbin{\|}\widehat{Q}^{\varepsilon}\right).

Proof of Lemma 2

Proof. By (10),

E∞Un=−KL⁡(P^ε∥Q^ε)<0.\mathbb{E}_{\infty}U_n=-\operatorname{KL}\left(\widehat{P}^{\varepsilon}\mathbin{\|}\widehat{Q}^{\varepsilon}\right)<0.

If M(η)<∞M(\eta)<\infty, dominated convergence gives the right derivative M′(0+)=E∞Un<0M'(0+)=\mathbb{E}_{\infty}U_n<0. Indeed, for 0<s≤η/20<s\leq\eta/2, the absolute difference quotient ∣(esUn−1)/s∣\lvert(e^{sU_n}-1)/s\rvert is bounded by ∣Un∣\lvert U_n\rvert on {Un<0}\{U_n<0\} and by UneηUn/2U_ne^{\eta U_n/2} on {Un≥0}\{U_n\geq0\}; both are integrable. Since M(0)=1M(0)=1, this proves part 1.

For part 2, M(b)<∞M(b)<\infty ensures continuity on [0,b][0,b]. Moreover, MM is strictly convex on its finite domain because P∞(Un≠0)>0\mathbb{P}_{\infty}(U_n\ne0)>0. Part 1 gives M(s)<1M(s)<1 for small s>0s>0, whereas M(b)>1M(b)>1. Continuity yields a root λ⋆∈(0,b)\lambda_\star\in(0,b). Strict convexity gives M(s)<1M(s)<1 for 0<s<λ⋆0<s<\lambda_\star and M(s)>1M(s)>1 for s>λ⋆s>\lambda_\star wherever M(s)M(s) is finite; outside that domain M(s)=∞M(s)=\infty. This proves uniqueness and the stated admissible interval.

Finally,

E∞[eθznDI]=M(θλ),\mathbb{E}_{\infty}\left[e^{\theta z^{\mathrm{DI}}_n}\right]=M(\theta\lambda),

so the positive root is λ⋆/λ\lambda_\star/\lambda. Because λ⋆<b\lambda_\star<b, the moment-generating function is finite in a neighborhood of this root. Induction in the reflected recursion gives Zn(λ)=λZn(1)Z_n^{(\lambda)}=\lambda Z_n^{(1)}, proving the stated stopping-time identity.

Proof of Theorem 1

Proof. Let

Sn=∑k=1nzk,S_n=\sum_{k=1}^{n}z_k,

where the zkz_k are independent copies of zλ,εDIz_{\lambda,\varepsilon}^{\mathrm{DI}} under P∞\mathbb{P}_{\infty}. By the pre-change condition of Theorem 1,

Mn:=exp⁡(θλ,εSn)M_n:=\exp(\theta_{\lambda,\varepsilon}S_n)

is a nonnegative martingale under P∞\mathbb{P}_{\infty}. The reflected CUSUM statistic has the representation

Zn=Sn−min⁡0≤k≤nSk.Z_n=S_n-\min_{0\leq k\leq n}S_k.

Thus a crossing of ZnZ_n above τ\tau occurs when an excursion of the negative-drift random walk exceeds height τ\tau. The Cramér–Lundberg estimate for the ascending ladder-height process gives

P∞(one excursion exceeds τ)≍Cλ,εexp⁡(−θλ,ετ)\mathbb{P}_{\infty}(\text{one excursion exceeds }\tau)\asymp C_{\lambda,\varepsilon}\exp(-\theta_{\lambda,\varepsilon}\tau)

for some constant Cλ,ε>0C_{\lambda,\varepsilon}>0. The excursions are regenerative at returns of the reflected process to zero. Consequently, the expected number of excursions before a false alarm grows on the order of exp⁡(θλ,ετ)\exp(\theta_{\lambda,\varepsilon}\tau). The finite mean cycle length and renewal constants contribute only a multiplicative constant, giving log⁡E∞[TDI]=θλ,ετ+O(1)\log\mathbb{E}_{\infty}[T_{\mathrm{DI}}]=\theta_{\lambda,\varepsilon}\tau+O(1).

Proof of Theorem 2

Proof. Conditional on no alarm before a change at time ν\nu, the state satisfies 0≤Zν−1<τ0\leq Z_{\nu-1}<\tau. Couple two post-change recursions by giving them the same increments. The recursion z↦max⁡{0,z+x}z\mapsto\max\{0,z+x\} is nondecreasing in zz, so the time needed to reach τ\tau is nonincreasing in the starting state. The conditional delay for any ν\nu is therefore at most the delay from Z0=0Z_0=0. When ν=1\nu=1, the procedure starts from Z0=0Z_0=0, and hence

CADD⁡(TDI)=E1[TDI].\operatorname{CADD}(T_{\mathrm{DI}})=\mathbb{E}_1[T_{\mathrm{DI}}].

After the change, let

zk=zλ,ε,kDI,Sn=∑k=1nzk.z_k=z_{\lambda,\varepsilon,k}^{\mathrm{DI}},\qquad S_n=\sum_{k=1}^{n}z_k.

The KL drift identity gives

μ1=λKL⁡(Q^ε∥P^ε)>0.\mu_1=\lambda\operatorname{KL}\left(\widehat{Q}^{\varepsilon}\mathbin{\|}\widehat{P}^{\varepsilon}\right)>0.

For the reflected recursion started at Z0=0Z_0=0,

Zn=Sn−min⁡0≤k≤nSk≥Sn.Z_n=S_n-\min_{0\leq k\leq n}S_k\geq S_n.

Therefore the reflected statistic crosses τ\tau no later than the unreflected random walk, so

TDI≤Hτ.T_{\mathrm{DI}}\leq H_\tau.

Wald’s identity and the bounded mean overshoot give

μ1E1[Hτ]=E1[SHτ]=τ+E1[SHτ−τ]≤τ+Cos.\begin{aligned} \mu_1\mathbb{E}_1[H_\tau]&=\mathbb{E}_1[S_{H_\tau}]\\ &=\tau+\mathbb{E}_1[S_{H_\tau}-\tau]\\ &\leq\tau+C_{\mathrm{os}}. \end{aligned}

Hence

E1[TDI]≤τ+Cosμ1.\mathbb{E}_1[T_{\mathrm{DI}}]\leq\frac{\tau+C_{\mathrm{os}}}{\mu_1}.

For the matching lower bound, write

T=TDI.T = T_{\mathrm{DI}}.

At the stopping time,

ST=ZT+min⁡0≤k≤TSk≥τ+inf⁡n≥0Sn.\begin{aligned} S_T &= Z_T + \min_{0 \le k \le T} S_k \\ &\ge\tau+ \inf_{n \ge0} S_n. \end{aligned}

Since the upper bound above implies E1[T]<∞\mathbb{E}_1[T] < \infty, Wald’s identity applies and yields

μ1E1[T]=E1[ST]≥τ−Cmin⁡.\mu_1 \mathbb{E}_1[T] = \mathbb{E}_1[S_T] \ge\tau- C_{\min}.

Combining the two bounds and substituting the value of μ1\mu_1 proves the result.

Time-Density Optimization and Monte Carlo Estimation

Although ff does not change the mean increment, it controls the estimator’s second moment. Let XX follow the post-change plug-in probability distribution, let W∼N(0,Id)W \sim\mathcal{N}(0, I_d) be independent of XX, and define

Yt=X+2(ϵ+t)W.Y_t = X + \sqrt{2(\epsilon+ t)}W.

With

Gt(X,W)=2{SH(Yt;p~∞,tϵ)−SH(Yt;p~1,tϵ)},G_t(X,W) = 2\{S_H(Y_t;\widetilde{p}_{\infty,t}^{\epsilon}) - S_H(Y_t;\widetilde{p}_{1,t}^{\epsilon})\},

write

m2(t)=E1[Gt(X,W)2].m_2(t) = \mathbb{E}_1[G_t(X,W)^2].

The optimal importance-sampling density is determined by the following second-moment calculation.

Proposition 3 (Second-moment-optimal time density). Assume 0<∫0∞m2(t) dt<∞0 < \int_0^\infty\sqrt{m_2(t)}\,dt < \infty. Among all admissible densities ff, the post-change second moment of the increment satisfies

E1[(znDI)2]=λ2∫0∞m2(t)f(t) dt≥λ2(∫0∞m2(t) dt)2.(18)\mathbb{E}_1[(z_n^{\mathrm{DI}})^2] = \lambda^2 \int_0^\infty\frac{m_2(t)}{f(t)}\,dt \ge\lambda^2 \left(\int_0^\infty\sqrt{m_2(t)}\,dt\right)^2. \tag*{(18)}

Equality holds for

f⋆(t)=m2(t)∫0∞m2(s) ds.f^\star(t) = \frac{\sqrt{m_2(t)}}{\int_0^\infty\sqrt{m_2(s)}\,ds}.

Thus f⋆f^\star samples times in proportion to their root second moment; in practice, m2m_2 can be estimated on a pilot grid. The one-sample increment in § 2.3 is the least expensive Monte Carlo estimator. With a larger per-observation budget, one may average MM independent time–noise pairs,

z^n,MMC=λM∑m=1MGtn,m(Xn,Wn,m)f(tn,m).\widehat{z}_{n,M}^{\mathrm{MC}} = \frac{\lambda}{M} \sum_{m=1}^{M} \frac{G_{t_{n,m}}(X_n,W_{n,m})}{f(t_{n,m})}.

Proof. Cauchy–Schwarz applied to m2(t)/f(t)\sqrt{m_2(t)/f(t)} and f(t)\sqrt{f(t)} gives

(∫0∞m2(t) dt)2≤(∫0∞m2(t)f(t) dt)(∫0∞f(t) dt).\left(\int_0^\infty\sqrt{m_2(t)}\,dt\right)^2 \le\left(\int_0^\infty\frac{m_2(t)}{f(t)}\,dt\right)\left(\int_0^\infty f(t)\,dt\right).

The last factor is one, and equality requires f(t)∝m2(t)f(t) \propto\sqrt{m_2(t)}.

Additional Computation and Approximation Details

Gaussian Diagnostic Implementation. For diagonal variances σi\sigma_i, the Rao–Blackwellized increment is

zquad(X)=∑i=1d{(Xi−θ0,i)2−(Xi−θ1,i)2}qi,qi=∑ℓ=1128wℓ(σi+2tℓ)2.z^{\mathrm{quad}}(X)=\sum_{i=1}^{d}\left\{(X_i-\theta_{0,i})^2-(X_i-\theta_{1,i})^2\right\}q_i,\qquad q_i=\sum_{\ell=1}^{128}\frac{w_\ell}{(\sigma_i+2t_\ell)^2}.

For the log-spaced grid in [10−5,104][10^{-5},10^4], weights are w1=t2−t1w_1=t_2-t_1, w128=t128−t127w_{128}=t_{128}-t_{127}, and wℓ=(tℓ+1−tℓ−1)/2w_\ell=(t_{\ell+1}-t_{\ell-1})/2 at interior nodes. The coefficients (5.02128, 0.0501986) have relative errors 0.426% and 0.397% against the exact (5, 0.05). Calibration uses bracket expansion and 14 bisection steps; the fixed-change delay estimates retain 1,507–3,317 paths without a prior alarm. The run uses seed 123, 32-bit PyTorch arithmetic, and an NVIDIA RTX PRO 6000 Blackwell GPU. Table 1 lists thresholds.

Method50010002000
CUSUM4.30375.02345.8452
SCUSUM3.91314.59865.3257
DI-SCUSUM-quad4.32675.09425.8760
DI-SCUSUM-exact4.28915.05225.8115

Table 1. Thresholds used in the anisotropic Gaussian simulation.

Gaussian Diagnostic Interpretation. The Gaussian panel reports the four methods at the same nominal ARL targets, with horizon-censored delay values read directly from the plotted points. CUSUM and DI-SCUSUM-exact coincide analytically; DI-SCUSUM-quad follows closely, with residual error from quadrature. SCUSUM is slower in this example because its score difference weights covariance directions by inverse variance squared, whereas the log-likelihood ratio uses inverse variance. Thus the panel checks the numerical identity and predicted information gap without a second table.

Pilot Time-Density Selection and Monte Carlo. The optimal density f∗(t)∝m2(t)f^*(t) \propto\sqrt{m_2(t)} depends on a post-change second moment that is usually unavailable in closed form. It can be estimated offline by simulating from the post-change reference model over a pilot grid of diffusion times, smoothing the resulting moment estimates, and normalizing their square roots. A simpler alternative is to choose a parametric family for ff and minimize the estimated second moment within that family. Averaging MM independently sampled time–noise pairs retains the same target as the one-pair estimator and reduces the conditional Monte Carlo variance at a proportional increase in score evaluations.

Rao–Blackwellization and Quadrature. Replacing Gt(X,W)G_t(X,W) by G‾t(X)=E[Gt(X,W)∣X]\overline{G}_t(X)=\mathbb{E}[G_t(X,W)\mid X] removes the auxiliary-noise variance without changing the conditional target. A deterministic quadrature rule can then approximate the remaining time integral. Unlike Monte Carlo, quadrature has no time-sampling variance, but its finite nodes introduce discretization error and, on an unbounded domain, truncation error. The finite window identity below quantifies the information omitted by truncation; the remaining discretization error depends on the smoothness of t↦G‾t(X)t\mapsto\overline{G}_t(X) and on the chosen rule.

Threshold Calibration. For a target ARL =γ=\gamma, the renewal approximation τ0=log⁡(γ)/θλ,ε\tau_0=\log(\gamma)/\theta_{\lambda,\varepsilon} provides an initial threshold. Finite-threshold overshoot and the complete increment distribution affect the realized ARL, so we simulate no-change streams, enlarge a threshold bracket until it contains the target, and refine it by bisection. The procedure must be repeated when ε\varepsilon, ff, the number of Monte Carlo samples, or the quadrature rule changes. If only the multiplier changes from λ\lambda to λ′\lambda', the threshold changes exactly from τ\tau to (λ′/λ)τ(\lambda'/\lambda)\tau, without further simulation. Detector comparisons are made only after calibration to comparable false-alarm levels.

Finite Diffusion Window. If the time density is supported on 0≤a<b<∞0\leq a<b<\infty, the post-change drift is

λ∫abDF(P^1,t∥P^∞,t) dt=λ[KL⁡(P^1,a∥P^∞,a)−KL⁡(P^1,b∥P^∞,b)].\lambda\int_a^b D_F(\widehat{P}_{1,t}\Vert\widehat{P}_{\infty,t})\,dt=\lambda\left[\operatorname{KL}(\widehat{P}_{1,a}\Vert\widehat{P}_{\infty,a})-\operatorname{KL}(\widehat{P}_{1,b}\Vert\widehat{P}_{\infty,b})\right].

Thus truncation preserves a valid score statistic but replaces the full KL information by its decrease over the chosen window.

Computational Cost and Local Mixture Approximations. Exact evaluation of both barycentric maps and local variances costs O((N0+N1)d)O((N_0+N_1)d) per diffusion time, and hence O(M(N0+N1)d)O(M(N_0+N_1)d) for MM sampled times or quadrature nodes. When ht=ε+th_t=\varepsilon+t is small or moderate, the softmax weights decay exponentially in squared distance. One may therefore retain the KK nearest reference points, optionally augmented by LL random points from the remainder. This reduces cost but introduces pointwise error governed by the omitted softmax mass and sample geometry; its sequential effect is not covered by the present theory. At larger hth_t, the weights spread more broadly and the retained neighborhood must grow.

Additional Barycentric Smoothing. For perturbations ξ1,…,ξM\xi_1,\ldots,\xi_M and σ≥0\sigma\ge0, one may replace ktr,εk_t^{r,\varepsilon} by

k~t,σr,ε(y)=1M∑m=1Mktr,ε(y+σξm),st,σr,ε(y)=k~t,σr,ε(y)−y2ht.\widetilde{k}_{t,\sigma}^{r,\varepsilon}(y)=\frac{1}{M}\sum_{m=1}^{M}k_t^{r,\varepsilon}(y+\sigma\xi_m),\qquad s_{t,\sigma}^{r,\varepsilon}(y)=\frac{\widetilde{k}_{t,\sigma}^{r,\varepsilon}(y)-y}{2h_t}.

At σ=0\sigma=0 this is the exact empirical diffusion score. For fixed perturbations the smoothed field is conservative in the Gaussian-mixture setting, but the induced surrogate densities do not generally follow a common heat flow as tt varies. The KL drift identity therefore applies directly only to the unsmoothed construction.

Details for Proposition 1

Applying Lemma 1 to (P1,t,P∞,t)(P_{1,t},P_{\infty,t}) over [0,T][0,T] gives

∫0TDF(P1,t∥P∞,t) dt=KL⁡(P1∥P∞)−KL⁡(P1,T∥P∞,T).\int_0^T D_F(P_{1,t}\Vert P_{\infty,t})\,\mathrm{d}t=\operatorname{KL}(P_1\Vert P_\infty)-\operatorname{KL}(P_{1,T}\Vert P_{\infty,T}).

This proves the first identity. Dividing by the positive initial KL divergence gives the formula for R(T)R(T).

The function R(T)R(T) is a cumulative information curve. If it approaches one quickly, a short diffusion window captures most of the forward KL information; if it grows slowly, later diffusion times carry a non-negligible fraction. The sampling density ff controls how the integral is estimated but cannot change this curve. This identity compares information targets; a sequential delay comparison additionally requires equal false-alarm calibration, as imposed in Remark 1 and § 4.

Details for Remark 1

Derivation. Let m=(θ0+θ1)/2m=(\theta_0+\theta_1)/2 and define

A=δTΣ−2δ,B=δTΣ−3δ.A=\delta^\mathsf{T}\Sigma^{-2}\delta,\qquad B=\delta^\mathsf{T}\Sigma^{-3}\delta.

The SCUSUM score difference is SH(X;p∞)−SH(X;p1)=δTΣ−2(X−m)S_H(X;p_\infty)-S_H(X;p_1)=\delta^\mathsf{T}\Sigma^{-2}(X-m). It has mean −A/2-A/2 and variance BB under P∞P_\infty, and mean A/2A/2 under P1P_1. For the scaled increment z=λδTΣ−2(X−m)z=\lambda\delta^\mathsf{T}\Sigma^{-2}(X-m),

E∞[esz]=exp⁡(−sλA2+s2λ2B2).\mathbb{E}_\infty[e^{sz}]=\exp\left(-\frac{s\lambda A}{2}+\frac{s^2\lambda^2B}{2}\right).

Its positive Cramér root is A/(λB)A/(\lambda B). Choosing the usual unit-root normalization gives λ=A/B\lambda=A/B, so the post-change mean is ISCUSUM=λA/2=A2/(2B)I_{\mathrm{SCUSUM}}=\lambda A/2=A^2/(2B). Let Σvi=σivi\Sigma v_i=\sigma_i v_i and write

δ=∑i=1dcivi.\delta=\sum_{i=1}^{d}c_i v_i.

Then, for r∈{1,2,3}r\in\{1,2,3\},

δTΣ−rδ=∑i=1dci2σir.\delta^\mathsf{T}\Sigma^{-r}\delta=\sum_{i=1}^{d}\frac{c_i^2}{\sigma_i^r}.

Therefore,

ISCUSUMICUSUM=(∑ici2/σi2)2(∑ici2/σi3)(∑ici2/σi).\frac{I_{\mathrm{SCUSUM}}}{I_{\mathrm{CUSUM}}}= \frac{\left(\sum_i c_i^2/\sigma_i^2\right)^2} {\left(\sum_i c_i^2/\sigma_i^3\right)\left(\sum_i c_i^2/\sigma_i\right)}.

Apply Cauchy–Schwarz to

ai=∣ci∣σi3/2,bi=∣ci∣σi1/2.a_i = \frac{|c_i|}{\sigma_i^{3/2}}, \qquad b_i = \frac{|c_i|}{\sigma_i^{1/2}}.

It gives

(∑ici2σi2)2=(∑iaibi)2≤(∑ici2σi3)(∑ici2σi).\begin{aligned} \left(\sum_i \frac{c_i^2}{\sigma_i^2}\right)^2 = \left(\sum_i a_i b_i\right)^2 \\ &\leq\left(\sum_i \frac{c_i^2}{\sigma_i^3}\right)\left(\sum_i \frac{c_i^2}{\sigma_i}\right). \end{aligned}

Equality holds exactly when 1/σi1/\sigma_i is constant on the active set {i:ci≠0}\{i : c_i \ne0\}.

For the ideal DI-SCUSUM identity, set Ct=Σ+2tIdC_t = \Sigma+ 2tI_d and m=(θ0+θ1)/2m = (\theta_0+\theta_1)/2. Twice the Hyvärinen-score difference at time tt is

2{SH(y;p∞,t)−SH(y;p1,t)}=2δTCt−2(y−m).2\{S_H(y;p_{\infty,t})-S_H(y;p_{1,t})\}=2\delta^\mathsf{T}C_t^{-2}(y-m).

Averaging over Y=X+2t WY=X+\sqrt{2t}\,W conditional on XX replaces YY by XX. Since

2∫0∞(Σ+2tId)−2 dt=Σ−1,2\int_0^\infty(\Sigma+2tI_d)^{-2}\,\mathrm{d}t=\Sigma^{-1},

the fully integrated Rao–Blackwellized increment is

δTΣ−1(X−m)=log⁡p1(X)p∞(X).\delta^\mathsf{T}\Sigma^{-1}(X-m)=\log\frac{p_1(X)}{p_\infty(X)}.

It therefore has the same information number as likelihood-ratio CUSUM.

Geometric Interpretation. In the eigenbasis of Σ\Sigma, likelihood-ratio CUSUM weights the component cic_i by 1/σi1/\sigma_i, whereas the zero-time score difference weights it by 1/σi21/\sigma_i^2. The Cramér multiplier is scalar, so it can align these weights only when all eigendirections carrying the shift have the same variance. Along the heat flow, the directional weight becomes (σi+2t)−2(\sigma_i+2t)^{-2}. Its integral is 1/(2σi)1/(2\sigma_i), which restores the inverse-variance geometry direction by direction. This is why ideal DI-SCUSUM matches likelihood-ratio CUSUM in this Gaussian model while SCUSUM can be strictly less informative.

Adaptive Weighting across Diffusion Times

Remark 2 (Adaptive weighting across diffusion times). Unlike the sampling density ff, which changes only estimator variance, an offline linear combination of zero-time and Rao–Blackwellized diffusion features changes the target evidence. For example, with fixed quadrature times t1,…,tLt_1,\ldots,t_L, one may define

znad=a0Δ0(Xn)+∑ℓ=1LaℓG‾tℓ(Xn),aℓ≥0,z_n^{\mathrm{ad}}=a_0\Delta_0(X_n)+\sum_{\ell=1}^{L}a_\ell\overline{G}_{t_\ell}(X_n),\qquad a_\ell\geq0,

where G‾t\overline{G}_t is the Rao–Blackwellized contrast. If θ(a)>0\theta(a)>0 solves E∞[eθ(a)znad]=1\mathbb{E}_\infty[e^{\theta(a)z_n^{\mathrm{ad}}}]=1, then θ(a)znad\theta(a)z_n^{\mathrm{ad}} has unit pre-change Cramér-root normalization. The weights and normalization must be estimated and fixed before monitoring; because they change the target integral, the KL guarantees of Theorems 1 and 2 do not follow automatically. The construction below gives an example; its empirical evaluation is left to future work.

Choose diffusion times t1,…,tL>0t_1,\ldots,t_L>0 and form

Φ(x)=(ϕ0(x),G‾t1(x),…,G‾tL(x))T,G‾t(x)=EW[Gt(x,W)∣X=x],\Phi(x)=(\phi_0(x),\overline{G}_{t_1}(x),\ldots,\overline{G}_{t_L}(x))^\mathsf{T},\qquad\overline{G}_t(x)=\mathbb{E}_W[G_t(x,W)\mid X=x],

where ϕ0\phi_0 is the zero-time SCUSUM evidence. Let μ^∞\widehat{\mu}_\infty and μ^1\widehat{\mu}_1 be the feature means estimated from the two reference models, and let Σ^Φ\widehat{\Sigma}_\Phi be their pooled covariance. For ρ>0\rho>0, define

β^=(Σ^Φ+ρI)−1(μ^1−μ^∞),b^=−12β^T(μ^∞+μ^1).(19)\widehat{\beta}=(\widehat{\Sigma}_\Phi+\rho I)^{-1}(\widehat{\mu}_1-\widehat{\mu}_\infty),\qquad\widehat{b}=-\frac{1}{2}\widehat{\beta}^{\mathsf{T}}(\widehat{\mu}_\infty+\widehat{\mu}_1). \tag*{(19)}

The raw evidence is gAW(x)=β^⊤Φ(x)+b^g_{\mathrm{AW}}(x)=\widehat{\boldsymbol{\beta}}^{\top}\boldsymbol{\Phi}(x)+\widehat b. The Fisher direction favors features with large estimated mean separation relative to their covariance, while the intercept centers the fitted class means at

∓12β^⊤(μ^1−μ^∞).\mp\frac{1}{2}\widehat{\boldsymbol{\beta}}^{\top}(\widehat{\boldsymbol{\mu}}_1-\widehat{\boldsymbol{\mu}}_\infty).

Thus the fitted pre- and post-change means have the intended signs whenever the estimated feature means differ. By comparison, finite-window quadrature fixes the coefficients of GtℓG_{t\ell} at their numerical integration weights; it does not estimate a discriminant direction.

If the pre-change moment-generating function is finite near the origin and admits κAW>0\kappa_{\mathrm{AW}}>0 satisfying

E∞[eκAWgAW(X)]=1,\mathbb{E}_\infty\left[e^{\kappa_{\mathrm{AW}}g_{\mathrm{AW}}(X)}\right]=1,

then the unit-root-normalized increment and stopping rule are

znAW=κAWgAW(Xn),ZnAW=max⁡{0,Zn−1AW+znAW},z_n^{\mathrm{AW}}=\kappa_{\mathrm{AW}}g_{\mathrm{AW}}(X_n),\qquad Z_n^{\mathrm{AW}}=\max\{0,Z_{n-1}^{\mathrm{AW}}+z_n^{\mathrm{AW}}\},
TAW=inf⁡{n≥1:ZnAW≥τ}.T_{\mathrm{AW}}=\inf\{n\geq1:Z_n^{\mathrm{AW}}\geq\tau\}.

All feature weights, the intercept, and the Cramér root must be estimated offline and fixed before monitoring. Because they are learned rather than specified by the heat-flow integral, the resulting statistic requires its own false-alarm calibration and does not automatically satisfy the KL drift identities of DI-SCUSUM.

References

  1. [1]A. Adibi, S. Kulkarni, H. V. Poor, T. Banerjee, and V. Tarokh (2026). Asymptotically optimal change detection for unnormalized pre- and post-change distributions. Sequential Analysis, 45(2):321–346.arxiv.org/abs/2410.14615
  2. [2]O. Cobb, A. Van Looveren, and J. Klaise (2022). Sequential multivariate change detection with calibrated and memoryless false detection rates. In Proceedings of the 25th International Conference on Artificial Intelligence and Statistics, PMLR 151:226–239.arxiv.org/abs/2108.00883
  3. [4]D. Blackwell (1947). Conditional expectation and unbiased sequential estimation. Annals of Mathematical Statistics, 18(1):105–110.DOI
  4. [7]A. Hyvärinen (2005). Estimation of non-normalized statistical models by score matching. Journal of Machine Learning Research, 6:695–709.DOI
  5. [9]T. Karras, M. Aittala, T. Aila, and S. Laine (2022). Elucidating the design space of diffusion-based generative models. In Advances in Neural Information Processing Systems.arxiv.org/abs/2206.00364
  6. [10]L. Lai, H. V. Poor, Y. Xin, and G. Georgiadis (2011). Quickest search over multiple sequences. IEEE Transactions on Information Theory, 57(8):5375–5386.DOI
  7. [11]G. Lorden (1971). Procedures for reacting to a change in distribution. Annals of Mathematical Statistics, 42(6):1897–1908.DOI
  8. [12]G. V. Moustakides (1986). Optimal stopping times for detecting changes in distributions. Annals of Statistics, 14(4):1379–1387.DOI
  9. [13]S. Moushegian, T. Banerjee, and V. Tarokh (2025). Diffusion-based hypothesis testing and change-point detection. arXiv preprint arXiv:2506.16089.arxiv.org/abs/2506.16089
  10. [14]E. S. Page (1954). Continuous inspection schemes. Biometrika, 41(1/2):100–115.DOI
  11. [15]M. Pollak (1985). Optimal detection of a change in distribution. Annals of Statistics, 13(1):206–227.
  12. [16]H. V. Poor and O. Hadjiliadis (2008). Quickest Detection. Cambridge University Press, Cambridge, UK.DOI
  13. [17]C. R. Rao (1945). Information and the accuracy attainable in the estimation of statistical parameters. Bulletin of the Calcutta Mathematical Society, 37:81–91.
  14. [19]C. Scarvelis, H. Sáez de Ocariz Borde, and J. Solomon (2025). Closed-form diffusion models. Transactions on Machine Learning Research.arxiv.org/abs/2310.12395
  15. [20]A. J. Stam (1959). Some inequalities satisfied by the quantities of information of Fisher and Shannon. Information and Control, 2(2):101–112.
  16. [21]I. Valero-Torànzo, S. Zozor, and J.-M. Brossier (2018). Generalization of the de Bruijn identity to general φ-entropies and φ-Fisher informations. IEEE Transactions on Information Theory, 64(10):6743–6758.
  17. [22]P. Vincent (2011). A connection between score matching and denoising autoencoders. Neural Computation, 23(7):1661–1674.DOI
  18. [24]J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei (2009). ImageNet: A large-scale hierarchical image database. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 248–255.
  19. [26]Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner (1998). Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324.
  20. [27]O. M. Parkhi, A. Vedaldi, A. Zisserman, and C. V. Jawahar (2012). Cats and dogs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3498–3505.
  21. [28]W. Zhou, L. Xie, Z. Peng, and S. Zhu (2025). Sequential change point detection via denoising score matching. arXiv preprint arXiv:2501.12667.arxiv.org/abs/2501.12667

Paper details

vlnc:W_m6btmpqn
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 5

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

ChatGPT, Codex

View statement
Looking for related papers…
Contents