Introduction
Supermartingale certificates guarantee that probabilistic, potentially infinite-state systems satisfy temporal properties of their intended behaviour, making them a powerful tool for assuring sequential decision-making under uncertainty. Applications include the automated control of unmanned vehicles, manufacturing processes, and financial systems, where rigorous guarantees of safety and security are paramount. Supermartingale certificates are real-valued functions of system states whose expected values decrease along system executions in a manner determined by the specification of interest. They are the probabilistic analogues of Lyapunov and barrier functions in control systems [23 ] , and of inductive invariants and progress measures in software systems [14 , 10 ] . A supermartingale certificate reduces reasoning about a global temporal property of system behaviour—such as reachability, safety, reach-avoidance, stability, reactivity—to verifying a local expected-decrease condition at each individual step of the system.
The algorithmic construction of supermartingale certificates has traditionally relied on rigorous symbolic reasoning methods [29 , 11 ] , with more recent work turning to neural representations and certified learning-based approaches [1 , 24 , 39 , 27 ] . Yet, the formal guarantees provided by the existing methods are contingent on a given model of the world , fixed at design time. If the behaviour of the environment in which the controller is deployed deviates from this assumed model, the certificate may no longer satisfy the supermartingale conditions, invalidating its guarantees. Such deviations may arise, for example, from environmental changes, distribution shifts, or unmodelled physical conditions, and are commonly associated with what is known in control theory and robotics as the sim-to-real gap [21 , 38 ] (Tobin et al. 2017).
This raises a fundamental question: when the true environment is not fully known and can only be interacted with at runtime as a black box, how can we determine whether a certificate remains valid after deployment? This is the central question we address in this work: we propose for the first time a framework for the runtime monitoring of supermartingale certificates upon deployment. Given a supermartingale certificate computed at design time and a a black-box stochastic deployment environment, our method observes a single stream of system states, continually tests whether the supermartingale certificate satisfies its defining expected-decrease condition, and raises an alarm once it has gathered sufficient statistical evidence that the supermartingale certificate is invalid.
Runtime monitoring of a supermartingale certificate requires detecting violations from a single stream of observations. Because the environment is stochastic, an increase (resp. decrease) in the certificate value at any individual step does not necessarily indicate a violation (resp. satisfaction) of the expected-decrease condition. To address this challenge, our monitor accumulates statistical evidence over successive state observations, seeking to determine when the observed changes in certificate value become sufficiently inconsistent with the expected-decrease condition to signal a violation. This evidence is accumulated using a betting-based sequential testing method [31 , 34 ] . The monitor plays a betting game: it starts with an initial wealth and, for each pair of successive state observations, converts the change in certificate value into a normalised score and chooses a stake based on the observations seen so far. A positive score increases the monitor’s wealth, while a negative score decreases it, with the magnitude of either change determined by the chosen stake. Crucially, while the expected-decrease condition holds, no admissible betting strategy can increase the monitor’s wealth in expectation. Sustained wealth growth therefore constitutes statistical evidence against this condition. Once the wealth exceeds a threshold calibrated to control the false-alarm probability, the monitor signals a violation.
We implemented our method and evaluated betting strategies that either weight past observations uniformly or favour recent observations and those from nearby states across a wide range of benchmarks. Our results show that the framework effectively detects certificate violations under changes in deployment dynamics, and that exploiting temporal and spatial regularity in the betting strategy improves the detection of local violations.
Our contribution is threefold. First, we present the first framework for runtime verification of supermartingale certificates. Our framework is agnostic to the temporal property being certified, applies to both discrete- and continuous-time stochastic systems, and encompasses the existing supermartingale certificates (see § 2 ). Second, we introduce an algorithm for automatically constructing monitors based on betting games, with a user-specified bound on the false-alarm probability that holds uniformly over an unbounded monitoring horizon. This bound allows users to control the monitor’s conservativeness and avoid unnecessary intervention (see § 3 ). Finally, we empirically demonstrate the effectiveness of our method in detecting certificate violations under changed deployment dynamics (see § 4 ).
Runtime monitoring of supermartingale certificates
Markov Process We consider probabilistic systems modelled as Markov processes in either discrete or continuous time, over which supermartingale certificates are defined. We generically write T \mathbb{T} T for the time domain, with T = N 0 \mathbb{T} = \mathbb{N}_0 T = N 0 (the non-negative integers) in discrete time and T = R ≥ 0 \mathbb{T} = \mathbb{R}_{\geq0} T = R ≥ 0 (the non-negative reals) in continuous time, and take t = 0 t = 0 t = 0 as the initial time.
Let X = R d \mathcal{X} = \mathbb{R}^d X = R d be a Euclidean space, and ( X , F , P ) (\mathcal{X}, \mathcal{F}, \mathbb{P}) ( X , F , P ) be a probability space over X \mathcal{X} X . A property holds almost surely if it holds with probability one. Let ( G t ) t ∈ T (\mathcal{G}_t)_{t \in\mathbb{T}} ( G t ) t ∈ T be a filtration in this probability space. A stochastic process X = ( X t ) t ∈ T \mathbf{X} = (X_t)_{t \in\mathbb{T}} X = ( X t ) t ∈ T with respect to ( G t ) t ∈ T (\mathcal{G}_t)_{t \in\mathbb{T}} ( G t ) t ∈ T is an indexed family of random variables, with each X t X_t X t being G t \mathcal{G}_t G t -measurable. In the continuous-time setting, we also assume that X X X is right-continuous and that the filtration ( G t ) t ∈ T (\mathcal{G}_t)_{t\in\mathbb{T}} ( G t ) t ∈ T is complete and right-continuous. A (time-homogeneous) Markov process X = ( X t ) t ∈ T X=(X_t)_{t\in\mathbb{T}} X = ( X t ) t ∈ T is a stochastic process such that, for every measurable function f : X → R f:\mathcal{X}\to\mathbb{R} f : X → R and for every pair of time values t , s ∈ T t,s\in\mathbb{T} t , s ∈ T , we have E [ f ( X t + s ) ∣ G t ] = E [ f ( X t + s ) ∣ X t ] \mathbb{E}[f(X_{t+s})\mid\mathcal{G}_t]=\mathbb{E}[f(X_{t+s})\mid X_t] E [ f ( X t + s ) ∣ G t ] = E [ f ( X t + s ) ∣ X t ] .
Supermartingale Certificate A supermartingale certificate is a measurable function f : X → R f:\mathcal{X}\to\mathbb{R} f : X → R which satisfies a finite number of conditions of one of the following two types:
domain-bound condition. Given a domain S ⊆ X S\subseteq\mathcal{X} S ⊆ X and a bound interval [ l , u ] [l,u] [ l , u ] where l , u ∈ R ∪ { ± ∞ } l,u\in\mathbb{R}\cup\{\pm\infty\} l , u ∈ R ∪ { ± ∞ } , the ( S , [ l , u ] ) (S,[l,u]) ( S , [ l , u ]) -domain-bound condition specifies that, for all times t ∈ T t\in\mathbb{T} t ∈ T , we have f ( X t ) ∈ [ l , u ] f(X_t)\in[l,u] f ( X t ) ∈ [ l , u ] . Intuitively, this condition requires the value of f f f to lie within the interval [ l , u ] [l,u] [ l , u ] at all times, whenever the stochastic process value is in the domain set S S S .
expected-decrease condition. Given a domain S ⊆ X S\subseteq\mathcal{X} S ⊆ X and a measurable drift bound l : X → R l:\mathcal{X}\to\mathbb{R} l : X → R , zero outside S S S , the ( S , l ) (S,l) ( S , l ) -expected drift condition requires, for t ∈ T t\in\mathbb{T} t ∈ T and X t ∈ S X_t\in S X t ∈ S , a bound on
(discrete-time) the one-step expected decrease: E [ f ( X t + 1 ) ∣ X t ] − f ( X t ) ≤ l ( X t ) \mathbb{E}[f(X_{t+1})\mid X_t]-f(X_t)\le l(X_t) E [ f ( X t + 1 ) ∣ X t ] − f ( X t ) ≤ l ( X t ) ;
(continuous-time) the instantaneous drift: A f ( X t ) : = lim h ↓ 0 E [ f ( X t + h ) ∣ X t ] − f ( X t ) h ≤ l ( X t ) \mathcal{A}f(X_t):=\lim_{h\downarrow0}\frac{\mathbb{E}[f(X_{t+h})\mid X_t]-f(X_t)}{h}\le l(X_t) A f ( X t ) := lim h ↓ 0 h E [ f ( X t + h ) ∣ X t ] − f ( X t ) ≤ l ( X t ) .
Intuitively, this bounds the expected change per step, or the instantaneous drift rate, from above by l l l whenever the process is in S S S . The continuous-time setting requires additional regularity assumptions specified in Appendix § 8 .
These defining conditions subsume all classical supermartingale certificates for proving temporal properties in stochastic systems, such as ranking supermartingales ([10 ] ) for almost-sure reachability, stochastic barrier functions ([30 ] ) for probabilistic safety, reach-avoid supermartingales ([39 ] ) for probabilistic reach-avoidance, or Streett supermartingales ([2 , 3 ] ) or limit-deterministic Büchi supermartingales ([18 ] ) for general omega-regular specifications. Thus, we follow this unified presentation to design a runtime monitoring framework that applies to all these supermartingale certificates.
Example 1 (A robot climbing a hill). A robot starts at distance x 0 = 10 x_0=10 x 0 = 10 from its target. Each step moves it forwards by 0.01 or makes it slip backwards by the same distance. It stops upon reaching a distance in [ 0 , 1 ] [0,1] [ 0 , 1 ] from the target, where it remains. A sloping section between positions 3 and 7 increases the probability of slipping backwards. As the robot moves from 7 towards 3, the slope becomes steeper until position 5, then gradually flattens. We describe this steepness profile by b ( x ) : = ( 1 − ∣ x − 5 ∣ / 2 ) + b(x):=(1-\lvert x-5\rvert/2)_{+} b ( x ) := ( 1 − ∣ x − 5 ∣ /2 ) + . Thus, position 5 is the steepest part of the slope. Before reaching the target, the dynamics for a ∈ [ 0 , 3 / 4 ] a\in[0,3/4] a ∈ [ 0 , 3/4 ] and p a ( x ) : = 1 / 4 + a ⋅ b ( x ) p_a(x):=1/4+a\cdot b(x) p a ( x ) := 1/4 + a ⋅ b ( x ) are
X n + 1 = X n − 0.01 + 0.02 ⋅ Z n , Z n ∣ G n ∼ Bernoulli ( p a ( X n ) ) . X_{n+1}=X_n-0.01+0.02\cdot Z_n,\qquad Z_n\mid\mathcal{G}_n\sim\operatorname{Bernoulli}(p_a(X_n)). X n + 1 = X n − 0.01 + 0.02 ⋅ Z n , Z n ∣ G n ∼ Bernoulli ( p a ( X n )) .
Each draw uses fresh randomness with slip probability determined by the current state. The range of a a a ensures that p a ( x ) ∈ [ 0 , 1 ] p_a(x)\in[0,1] p a ( x ) ∈ [ 0 , 1 ] . If we choose f ( x ) = x f(x)=x f ( x ) = x and l ( x ) = − 0.005 ⋅ 1 { x > 1 } l(x)=-0.005\cdot\mathbf{1}\{x>1\} l ( x ) = − 0.005 ⋅ 1 { x > 1 } , the expected decrease before stopping is d a ( x ) : = E [ f ( X n + 1 ) − f ( X n ) ∣ X n = x ] = − 0.005 + 0.02 ⋅ a ⋅ b ( x ) d_a(x):=\mathbb{E}[f(X_{n+1})-f(X_n)\mid X_n=x]=-0.005+0.02\cdot a\cdot b(x) d a ( x ) := E [ f ( X n + 1 ) − f ( X n ) ∣ X n = x ] = − 0.005 + 0.02 ⋅ a ⋅ b ( x ) . If a = 0 a=0 a = 0 , f f f is a ranking supermartingale proving almost-sure target reachability. However, for every a > 0 a>0 a > 0 , the expected-decrease condition is violated on ( 3 , 7 ) (3,7) ( 3 , 7 ) .
Trajectory Given a Markov process X = ( X t ) t ∈ T X=(X_t)_{t\in\mathbb{T}} X = ( X t ) t ∈ T and a measurable function f : X → R f:\mathcal{X}\to\mathbb{R} f : X → R , the goal of the supermartingale certificate monitoring problem is to construct a monitor which observes states of the Markov process at different time steps and, upon each newly observed state, issues a verdict on whether the function f f f violates one of the supermartingale conditions or not. To that end, we define Y : = T × X \mathcal{Y}:=\mathbb{T}\times\mathcal{X} Y := T × X to be the set of time-state pairs, and use Y ∗ \mathcal{Y}^{*} Y ∗ to denote the set of all finite sequences of time-state pairs. We call elements of Y ∗ \mathcal{Y}^{*} Y ∗ trajectories .
Monitor A monitor is a tuple M : = ( π , ξ ) \mathcal{M} := (\pi, \xi) M := ( π , ξ ) , where π : Y ∗ → T \pi: \mathcal{Y}^{*} \to\mathbb{T} π : Y ∗ → T is a sampling rule which for each sampled trajectory specifies the next observation time, and ξ : Y ∗ → { 0 , 1 } \xi: \mathcal{Y}^{*} \to\{0,1\} ξ : Y ∗ → { 0 , 1 } is a verdict rule which for each sampled trajectory decides whether to raise an alarm or not. The verdict value 1 denotes an alarm , indicating statistical evidence of a certificate violation, while 0 means that no alarm has been raised. The semantics of a monitor are defined inductively as follows. At the beginning, the monitor starts with a single-state trajectory Y 0 : 0 = ( T 0 , x T 0 ) \mathbf{Y}_{0:0} = (T_0, x_{T_0}) Y 0 : 0 = ( T 0 , x T 0 ) , with T 0 = 0 T_0 = 0 T 0 = 0 and x T 0 x_{T_0} x T 0 sampled from X T 0 X_{T_0} X T 0 . Then, for each n n n , if Y 0 : n = ( Y 0 , … , Y n ) \mathbf{Y}_{0:n} = (Y_0,\ldots,Y_n) Y 0 : n = ( Y 0 , … , Y n ) is the trajectory of time-state samples that have been sampled after n n n steps, the next time-state sample and the monitor verdict are computed via
T n + 1 : = π ( Y 0 : n ) , x T n + 1 ∼ X T n + 1 , Y 0 : n + 1 : = ( Y 0 : n , ( T n + 1 , x T n + 1 ) ) , V n + 1 : = ξ ( Y 0 : n + 1 ) . T_{n+1} := \pi(\mathbf{Y}_{0:n}), \qquad x_{T_{n+1}} \sim X_{T_{n+1}}, \qquad\mathbf{Y}_{0:n+1} := (\mathbf{Y}_{0:n},(T_{n+1},x_{T_{n+1}})), \qquad V_{n+1} := \xi(\mathbf{Y}_{0:n+1}). T n + 1 := π ( Y 0 : n ) , x T n + 1 ∼ X T n + 1 , Y 0 : n + 1 := ( Y 0 : n , ( T n + 1 , x T n + 1 )) , V n + 1 := ξ ( Y 0 : n + 1 ) .
Hence, the monitor determines the next sampling time T n + 1 T_{n+1} T n + 1 , samples the next state x T n + 1 x_{T_{n+1}} x T n + 1 from X T n + 1 X_{T_{n+1}} X T n + 1 , appends the new time-state pair to the trajectory to obtain trajectory Y 0 : n + 1 \mathbf{Y}_{0:n+1} Y 0 : n + 1 , and finally computes the verdict V n + 1 V_{n+1} V n + 1 by applying the verdict rule to the trajectory Y 0 : n + 1 \mathbf{Y}_{0:n+1} Y 0 : n + 1 .
Problem Statement Our goal is to design a monitor that raises an alarm as accurately as possible, while providing probabilistic guarantees that its false alarm rate is below some tolerable threshold δ \delta δ over all sampling times , and not just for each individual sampled state. The accuracy of our monitor is an empirical claim that will be evaluated in our experiments. However, the false alarm rate is a property that we want to guarantee . We define it as follows. Given a candidate certificate f f f and an error tolerance δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) , we want to construct a monitor M : = ( π , ξ ) \mathcal{M} := (\pi,\xi) M := ( π , ξ ) such that, whenever f f f satisfies the certificate conditions for the deployed process, we have P ( ∃ n ∈ N 0 : V n = 1 ) ≤ δ \mathbb{P}(\exists n \in\mathbb{N}_0 : V_n = 1) \leq\delta P ( ∃ n ∈ N 0 : V n = 1 ) ≤ δ .
Challenge To determine whether f f f is a supermartingale certificate, it suffices to design one monitor for each domain-bound condition and each expected-decrease condition of the supermartingale. But designing a monitor for domain-bound conditions is trivial – if S ⊆ X S \subseteq\mathcal{X} S ⊆ X is the domain and [ l , u ] [l,u] [ l , u ] is the bound interval, the verdict rule is simply V n = ξ ( Y 0 : n ) = 1 V_n = \xi(\mathbf{Y}_{0:n}) = 1 V n = ξ ( Y 0 : n ) = 1 iff the last time-state pair ( T n , x n ) (T_n,x_n) ( T n , x n ) satisfies x n ∈ S x_n \in S x n ∈ S but f ( x n ) ∉ [ l , u ] f(x_n) \notin[l,u] f ( x n ) ∈ / [ l , u ] . Such monitor design ensures that the false alarm rate is 0.
Hence, the challenge in supermartingale certificate monitoring is to compute a monitor for the expected-decrease condition, and in the rest of this work we focus on that. Specifically, our construction uses fixed observation times t n = n h t_n = nh t n = nh and bounds the probability of raising an alarm before any completed observation interval has positive conditional expected corrected drift. Formally, let L n : = ∑ r = t n t n + 1 − 1 l ( X r ) L_n := \sum_{r=t_n}^{t_{n+1}-1} l(X_r) L n := ∑ r = t n t n + 1 − 1 l ( X r ) in discrete time and L n : = ∫ t n t n + 1 l ( X r ) d r L_n := \int_{t_n}^{t_{n+1}} l(X_r)\,\mathrm{d}r L n := ∫ t n t n + 1 l ( X r ) d r in continuous time denote the accumulated corrected drift . Writing τ δ \tau_\delta τ δ for the first alarm index and E n : = E [ f ( X t n + 1 ) − f ( X t n ) − L n ∣ F n ] E_n := \mathbb{E}[f(X_{t_{n+1}})-f(X_{t_n})-L_n \mid\mathcal{F}_n] E n := E [ f ( X t n + 1 ) − f ( X t n ) − L n ∣ F n ] for the conditional expected corrected drift, we prove
P ( τ δ < ∞ and E n ≤ 0 for every n < τ δ ) ≤ δ . \mathbb{P}\left(\tau_\delta< \infty\text{ and } E_n \leq0 \text{ for every } n < \tau_\delta\right) \leq\delta. P ( τ δ < ∞ and E n ≤ 0 for every n < τ δ ) ≤ δ .
Runtime monitoring as betting-based sequential testing
We use a betting-based sequential testing framework ([31 ] ) as the main underlying ingredient to construct a monitor for supermartingale certificates. In this section, we first show how a sequence of observed states can be transformed into scores that provide evidence of a certificate violation. We then define a general monitoring scheme, namely an abstract monitor , that guarantees false-alarm control for any admissible betting strategy. Lastly, we instantiate the abstract monitor with concrete strategies designed to improve detection power while preserving monitor validity.
A supermartingale ( M n ) n ∈ N 0 (M_n)_{n\in\mathbb{N}_0} ( M n ) n ∈ N 0 is nonnegative if M n ≥ 0 M_n \geq0 M n ≥ 0 almost surely for every n ≥ 0 n \geq0 n ≥ 0 . In the betting-based framework, we use Ville's inequality to turn such a process into a monitor with a bound on the probability of ever raising a false alarm. Ville’s inequality states that, for any nonnegative supermartingale ( M n ) n ∈ N 0 (M_n)_{n\in\mathbb{N}_0} ( M n ) n ∈ N 0 with M 0 = 1 M_0=1 M 0 = 1 and for every δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) , the probability of the supermartingale value ever reaching or exceeding 1 / δ 1/\delta 1/ δ is at most δ \delta δ , i.e.,
P ( ∃ n ∈ N 0 : M n ≥ 1 / δ ) ≤ δ . (1) \mathbb{P}\left(\exists n\in\mathbb{N}_0 : M_n\ge1/\delta\right)\le\delta. \tag*{(1)} P ( ∃ n ∈ N 0 : M n ≥ 1/ δ ) ≤ δ . (1)
We set the first alarm index τ δ \tau_\delta τ δ and the verdict V n V_n V n to
τ δ : = inf { n ∈ N 0 : M n ≥ 1 / δ } , V n : = 1 { τ δ ≤ n } with inf ∅ : = ∞ . \tau_\delta:=\inf\{n\in\mathbb{N}_0:M_n\ge1/\delta\},\qquad V_n:=\mathbb{1}\{\tau_\delta\le n\}\quad\text{with }\inf\varnothing:=\infty. τ δ := inf { n ∈ N 0 : M n ≥ 1/ δ } , V n := 1 { τ δ ≤ n } with inf ∅ := ∞.
This defines a statistical test, such that whenever the null hypothesis ensures that ( M n ) n ∈ N 0 (M_n)_{n\in\mathbb{N}_0} ( M n ) n ∈ N 0 is a nonnegative supermartingale, the probability of ever raising an alarm is at most δ \delta δ .
Scoring schemes
To apply the betting framework, we assign a numerical score to each pair of consecutive observations. A positive score indicates that the observed certificate change exceeds the allowed drift upper bound. However, a positive score can also occur by chance. We construct the scores so that, whenever the expected-decrease condition holds, the expected next score, given the observations so far, is at most zero. This ensures that betting on these scores cannot increase wealth in conditional expectation while the condition holds. We also ensure that each score is at least − 1 -1 − 1 almost surely, so that admissible bets cannot make the wealth negative.
Assumptions The monitor observes the Markov process X \mathbf{X} X at times t n = n h t_n=nh t n = nh , with fixed intervals h ∈ R > 0 h\in\mathbb{R}_{>0} h ∈ R > 0 in continuous time and h = 1 h=1 h = 1 in discrete time. We write F n : = σ ( X t 0 , … , X t n ) \mathcal{F}_n:=\sigma(X_{t_0},\ldots,X_{t_n}) F n := σ ( X t 0 , … , X t n ) for the information available to the monitor at t n t_n t n . Furthermore, in continuous time, the deployed process is absorbed at its first exit from S S S , retaining its terminal state. For example, for a reach–avoid certificate, the system terminates upon reaching the target or an unsafe state.
We assume that the monitor can compute two bounds from its observations. First, after observing a state at t n + 1 t_{n+1} t n + 1 , it can compute a finite upper bound L ‾ n ≥ L n \overline{L}_n\ge L_n L n ≥ L n almost surely on the accumulated allowed drift. Subtracting this bound from the observed certificate change gives the corrected certificate change D n : = f ( X t n + 1 ) − f ( X t n ) − L ‾ n D_n:=f(X_{t_{n+1}})-f(X_{t_n})-\overline{L}_n D n := f ( X t n + 1 ) − f ( X t n ) − L n . Second, at t n t_n t n and before observing state X t n + 1 X_{t_{n+1}} X t n + 1 , the monitor must already be able to compute a finite loss bound B n ≥ b min B_n\ge b_{\min} B n ≥ b m i n , where b min > 0 b_{\min}>0 b m i n > 0 is fixed, guaranteeing D n ≥ − B n D_n\ge-B_n D n ≥ − B n almost surely. This ensures that the normalised score D n / B n D_n/B_n D n / B n is at least − 1 -1 − 1 . Formally, L ‾ n \overline{L}_n L n is F n + 1 \mathcal{F}_{n+1} F n + 1 -measurable and B n B_n B n is F n \mathcal{F}_n F n -measurable, and these requirements hold for every n ∈ N 0 n\in\mathbb{N}_0 n ∈ N 0 . Moreover, we assume that the random variables f ( X t n ) f(X_{t_n}) f ( X t n ) , L n L_n L n , and L ‾ n \overline{L}_n L n are integrable.
Concrete conservative bounds can be obtained if we know a lower bound on the certificate value f ( x ) ≥ f min f(x)\ge f_{\min} f ( x ) ≥ f m i n and an upper bound on the allowed drift l ( x ) ≤ l max l(x)\le l_{\max} l ( x ) ≤ l m a x for all reachable states. Then we get L ‾ n = h l max \overline{L}_n=hl_{\max} L n = h l m a x and B n = max { b min , f ( X t n ) + h l max − f min } B_n=\max\{b_{\min},f(X_{t_n})+hl_{\max}-f_{\min}\} B n = max { b m i n , f ( X t n ) + h l m a x − f m i n } .
Scoring The monitor compares the observed certificate change with the upper bound on the allowed drift and normalises it by the loss bound. A positive score therefore indicates that the observed certificate change exceeds the drift upper bound. The score is bounded below by − 1 -1 − 1 and has nonpositive conditional mean whenever the certificate condition holds. Formally, upon observing a state at t n + 1 t_{n+1} t n + 1 , the monitor computes a raw score D n D_n D n and the normalised score W n W_n W n :
D n : = f ( X t n + 1 ) − f ( X t n ) − L ‾ n , W n : = D n / B n . D_n:=f(X_{t_{n+1}})-f(X_{t_n})-\overline{L}_n,\qquad W_n:=D_n/B_n. D n := f ( X t n + 1 ) − f ( X t n ) − L n , W n := D n / B n .
Let μ n : = E [ W n ∣ F n ] \mu_n:=\mathbb{E}[W_n\mid\mathcal{F}_n] μ n := E [ W n ∣ F n ] denote the expected next score given the observations so far. The following lemma shows that μ n ≤ 0 \mu_n\le0 μ n ≤ 0 whenever the supermartingale expected-decrease condition holds. Together with the lower bound W n ≥ − 1 W_n\ge-1 W n ≥ − 1 ensured by normalisation, this makes the scores valid for the betting construction, where admissible bets preserve nonnegative wealth and cannot increase it in conditional expectation while the certificate condition holds. The proof is deferred to Appendix § 9 .
Lemma 1 (Score validity). Recall that E n : = E [ f ( X t n + 1 ) − f ( X t n ) − L ‾ n ∣ F n ] E_n := \mathbb{E}[f(X_{t_{n+1}}) - f(X_{t_n}) - \underline{L}_n \mid\mathcal{F}_n] E n := E [ f ( X t n + 1 ) − f ( X t n ) − L n ∣ F n ] is the conditional expected corrected drift over [ t n , t n + 1 ] [t_n,t_{n+1}] [ t n , t n + 1 ] . For every n ∈ N 0 n \in\mathbb{N}_0 n ∈ N 0 ,
μ n = E n − E [ L ‾ n − L ‾ n ∣ F n ] B n ≤ E n B n almost surely. (2) \mu_n = \frac{E_n - \mathbb{E}[\overline{L}_n - \underline{L}_n \mid\mathcal{F}_n]}{B_n} \le\frac{E_n}{B_n} \qquad\text{almost surely.} \tag*{(2)} μ n = B n E n − E [ L n − L n ∣ F n ] ≤ B n E n almost surely. (2) Thus, if the expected-decrease condition holds and E n ≤ 0 E_n \le0 E n ≤ 0 , then μ n ≤ 0 \mu_n \le0 μ n ≤ 0 almost surely on { X t n ∈ S } \{X_{t_n} \in\mathcal{S}\} { X t n ∈ S } .
Example 2. Consider the hill robot in Example 1, with observation interval h = 1 h = 1 h = 1 . Since f f f is nonnegative on reachable states and l ≤ 0 l \le0 l ≤ 0 , valid bounds are L ‾ n = 0 \underline{L}_n = 0 L n = 0 and B n = max { b min , f ( X t n ) } B_n = \max\{b_{\min}, f(X_{t_n})\} B n = max { b m i n , f ( X t n )} . These bounds only assume that the certificate cannot decrease by more than its current value. However, we can use the known system dynamics to derive more informative bounds. The allowed drift is exactly l ( X t n ) l(X_{t_n}) l ( X t n ) , and a forward step decreases the certificate by only 0.01 0.01 0.01 . Before stopping, the corrected increment is therefore at least − 0.01 + 0.005 = − 0.005 -0.01 + 0.005 = -0.005 − 0.01 + 0.005 = − 0.005 . We can thus choose L ‾ n = l ( X t n ) \underline{L}_n = l(X_{t_n}) L n = l ( X t n ) and B n = b min = 0.02 B_n = b_{\min} = 0.02 B n = b m i n = 0.02 , giving
W n = f ( X t n + 1 ) − f ( X t n ) + 0.005 0.02 = Z n − 1 4 , μ n = a ⋅ b ( X t n ) . W_n = \frac{f(X_{t_{n+1}}) - f(X_{t_n}) + 0.005}{0.02} = Z_n - \frac{1}{4}, \qquad\mu_n = a \cdot b(X_{t_n}). W n = 0.02 f ( X t n + 1 ) − f ( X t n ) + 0.005 = Z n − 4 1 , μ n = a ⋅ b ( X t n ) . Hence, a forward step results in W n = − 1 / 4 W_n = -1/4 W n = − 1/4 , while a slip gives W n = 3 / 4 W_n = 3/4 W n = 3/4 , so W n ≥ − 1 W_n \ge-1 W n ≥ − 1 for every amplitude, which validates the loss bound. After stopping, W n = 0 W_n = 0 W n = 0 .
Runtime monitoring under general betting strategies
We describe how the monitor accumulates evidence from past scores and decides to raise an alarm. Our monitor combines multiple wealth accounts and alarms when its total wealth reaches 1 / δ 1/\delta 1/ δ . The construction here is abstract because we do not yet specify the betting strategies in this subsection.
A single positive score may occur by chance, so the monitor accumulates evidence by betting on successive scores, following Ramdas et al. [31 ] . At each observation index s ∈ N 0 s \in\mathbb{N}_0 s ∈ N 0 , we may launch a set of betting strategies A s \mathcal{A}_s A s , called experts . For each expert a ∈ A s a \in\mathcal{A}_s a ∈ A s , let G s , n a G^a_{s,n} G s , n a denote its normalised wealth at index n ≥ s n \ge s n ≥ s , starting from G s , s a = 1 G^a_{s,s} = 1 G s , s a = 1 . The capital allocated to these accounts is specified below. For every n ≥ s n \ge s n ≥ s , if X t n ∈ S X_{t_n} \in\mathcal{S} X t n ∈ S , expert a a a chooses an F n \mathcal{F}_n F n -measurable stake λ s , n a ∈ [ 0 , 1 ] \lambda^a_{s,n} \in[0,1] λ s , n a ∈ [ 0 , 1 ] before observing W n W_n W n , and otherwise sets λ s , n a = 0 \lambda^a_{s,n} = 0 λ s , n a = 0 . Then the account wealth is updated via:
G s , n + 1 a : = G s , n a ( 1 + λ s , n a W n ) G^a_{s,n+1} := G^a_{s,n}(1+\lambda^a_{s,n}W_n) G s , n + 1 a := G s , n a ( 1 + λ s , n a W n )
Since W n ≥ − 1 W_n \ge-1 W n ≥ − 1 , wealth remains nonnegative. The stake controls the gains from positive scores and the losses from negative scores. A good betting strategy can therefore help wealth grow rapidly when the certificate condition fails, allowing the monitor to raise an alarm sooner.
Mixing experts Different betting strategies may detect different violations more quickly. Since the monitor does not know in advance which strategy will work best, it combines their wealth accounts. Specifically, for each observation index s s s , the monitor combines the accounts in A s \mathcal{A}_s A s using fixed, nonnegative, F s \mathcal{F}_s F s -measurable weights η s , a \eta_{s,a} η s , a satisfying ∑ a ∈ A s η s , a = 1 \sum_{a\in\mathcal{A}_s}\eta_{s,a}=1 ∑ a ∈ A s η s , a = 1 . The combined wealth is Q s , n : = ∑ a ∈ A s η s , a G s , n a Q_{s,n} := \sum_{a\in\mathcal{A}_s}\eta_{s,a}G^a_{s,n} Q s , n := ∑ a ∈ A s η s , a G s , n a with Q s , s = 1 Q_{s,s}=1 Q s , s = 1 .
A mixture may lose wealth before a violation begins. To launch fresh mixtures without earlier losses, the monitor reserves part of its initial unit capital. The monitor starts with one unit of capital. Let c s c_s c s denote the amount allocated to the mixture launched at observation s s s , with c s = 0 c_s = 0 c s = 0 if no mixture is funded. Before launching the mixture at index n n n , the monitor has already allocated C n : = ∑ s = 0 n − 1 c s C_n := \sum_{s=0}^{n-1} c_s C n := ∑ s = 0 n − 1 c s to earlier mixtures, leaving 1 − C n 1-C_n 1 − C n in reserve. It allocates an amount c n ∈ [ 0 , 1 − C n ] c_n \in[0,1-C_n] c n ∈ [ 0 , 1 − C n ] from this reserve to the new mixture. This amount may depend on the observations so far (c n c_n c n is F n \mathcal{F}_n F n -measurable). Launching a mixture therefore transfers existing capital rather than adding new capital. The total monitor wealth is the remaining reserve plus the current wealth of all funded mixtures:
M n : = 1 − C n + ∑ s = 0 n − 1 c s ∑ a ∈ A s η s , a ∏ k = s n − 1 ( 1 + λ s , k a W k ) , M 0 = 1. M_n := 1-C_n+\sum_{s=0}^{n-1}c_s\sum_{a\in\mathcal{A}_s}\eta_{s,a}\prod_{k=s}^{n-1}(1+\lambda^a_{s,k}W_k),\qquad M_0=1. M n := 1 − C n + s = 0 ∑ n − 1 c s a ∈ A s ∑ η s , a k = s ∏ n − 1 ( 1 + λ s , k a W k ) , M 0 = 1.
Since Q n , n = 1 Q_{n,n}=1 Q n , n = 1 , funding a new mixture does not change the total wealth. For example, funding every q ∈ N ≥ 1 q\in\mathbb{N}_{\geq1} q ∈ N ≥ 1 observations can use c j q = 6 / ( π 2 ( j + 1 ) 2 ) c_{jq}=6/(\pi^2(j+1)^2) c j q = 6/ ( π 2 ( j + 1 ) 2 ) for j ∈ N 0 j\in\mathbb{N}_0 j ∈ N 0 and c n = 0 c_n=0 c n = 0 otherwise. The allocations sum to one and leave reserve 6 / π 2 ∑ i = j + 2 ∞ i − 2 > 0 6/\pi^2\sum_{i=j+2}^{\infty}i^{-2}>0 6/ π 2 ∑ i = j + 2 ∞ i − 2 > 0 so there always remains fresh capital.
Probabilistic guarantees If the certificate condition holds almost surely throughout execution, Lemma 1 gives λ s , n a μ n = λ s , n a E [ W n ∣ F n ] ≤ 0 \lambda^a_{s,n}\mu_n=\lambda^a_{s,n}\mathbb{E}[W_n\mid\mathcal{F}_n]\leq0 λ s , n a μ n = λ s , n a E [ W n ∣ F n ] ≤ 0 , and since the current wealth and the stake are determined by the observations available before W n W_n W n is observed, we obtain
E [ G s , n + 1 a ∣ F n ] = G s , n a ( 1 + λ s , n a μ n ) ≤ G s , n a . \mathbb{E}[G^a_{s,n+1}\mid\mathcal{F}_n]=G^a_{s,n}(1+\lambda^a_{s,n}\mu_n)\leq G^a_{s,n}. E [ G s , n + 1 a ∣ F n ] = G s , n a ( 1 + λ s , n a μ n ) ≤ G s , n a .
Thus, each expert account is a nonnegative supermartingale for any admissible stake strategy. Combining these accounts using fixed mixture weights preserves this property for Q s , n Q_{s,n} Q s , n . Funding new mixtures from the remaining reserve likewise preserves it for M n M_n M n . The threshold in (1) therefore applies to the total wealth regardless of the admissible stakes, mixture weights, and funding chosen.
Theorem 2. For every admissible choice of stakes, expert weights, and funding, the monitor satisfies
P ( τ δ < ∞ and E k ≤ 0 for every k < τ δ ) ≤ δ , (3) \mathbb{P}\left(\tau_\delta<\infty\ \text{and}\ E_k\leq0\ \text{for every }k<\tau_\delta\right)\leq\delta, \tag*{(3)} P ( τ δ < ∞ and E k ≤ 0 for every k < τ δ ) ≤ δ , (3) and, if the expected-decrease condition holds for the deployed process, then P ( τ δ < ∞ ) ≤ δ \mathbb{P}(\tau_\delta<\infty)\leq\delta P ( τ δ < ∞ ) ≤ δ .
Inequality (3) bounds the probability of raising an alarm before the expected-decrease condition is violated, thus bounding the false-positive rate of the monitor, as desired. The proof is in Appendix § 9 .
Detection power We also bound the probability that the monitor raises an alarm within a block of observations during which the supermartingale expected-decrease condition is persistently violated. Consider observation intervals indexed by k = s , … , s + N − 1 k=s,\ldots,s+N-1 k = s , … , s + N − 1 , and suppose that there exists ε ∈ ( 0 , 1 ] \varepsilon\in(0,1] ε ∈ ( 0 , 1 ] such that E [ W k ∣ F k ] ≥ ε \mathbb{E}[W_k\mid\mathcal{F}_k]\geq\varepsilon E [ W k ∣ F k ] ≥ ε and W k ≤ 1 W_k\leq1 W k ≤ 1 almost surely, for each k k k . Suppose that a betting strategy a a a , launched at index r ≤ s r\leq s r ≤ s , has capital ρ : = c r η r , a G r , s a > 0 \rho:=c_r\eta_{r,a}G^a_{r,s}>0 ρ := c r η r , a G r , s a > 0 at observation s s s and uses the constant stake ε / 2 \varepsilon/2 ε /2 over these intervals. Then, for any γ ∈ ( 0 , 1 ) \gamma\in(0,1) γ ∈ ( 0 , 1 ) ,
P ( τ δ ≤ s + N ∣ F s ) ≥ 1 − γ almost surely on { N ≥ 8 ε 2 log 1 δ ρ γ } . \mathbb{P}(\tau_\delta\leq s+N\mid\mathcal{F}_s)\geq1-\gamma\quad\text{almost surely on}\quad\left\{N\geq\frac{8}{\varepsilon^2}\log\frac{1}{\delta\rho\gamma}\right\}. P ( τ δ ≤ s + N ∣ F s ) ≥ 1 − γ almost surely on { N ≥ ε 2 8 log δ ρ γ 1 } .
Thus, if the violation persists for sufficiently many observation intervals, the monitor raises an alarm by observation s + N s+N s + N with conditional probability at least 1 − γ 1-\gamma 1 − γ . The parameter ε \varepsilon ε is a lower bound on the expected score at each observation. A larger value of ε \varepsilon ε reduces the number of observation intervals required to detect violation. A larger starting capital ρ \rho ρ also reduces this number, because less wealth growth is needed to reach the alarm threshold 1 / δ 1/\delta 1/ δ .
Weighted prediction strategies
We now give two concrete strategies for choosing the stake by predicting the next score from past scores. The better the monitor predicts the next score, the faster it can grow its capital. The prediction is based on the fact that many realistic systems exhibit regularity in space and time. Here, spatial regularity means that nearby states have similar conditional expected scores, whereas temporal regularity means that these expectations change slowly over time. We consider a mixture over several experts, where each expert guesses and weights past scores according to their spatial and temporal proximity to the current observation. If the guesses are accurate, this weighting can improve our estimate of the conditional mean of the next score.
Prediction weights For computational efficiency, we limit ourselves to a finite history, i.e., let m ≥ 1 m \ge1 m ≥ 1 be the number of scores retained in the history, and define the retained indices I n : = { i ∈ N 0 : max { 0 , n − m } ≤ i < n } I_n := \{i \in\mathbb{N}_0 : \max\{0,n-m\} \le i < n\} I n := { i ∈ N 0 : max { 0 , n − m } ≤ i < n } . Let a ∈ A s a \in\mathcal{A}_s a ∈ A s be an expert launched at observation index s s s . The expert chooses a spatial scale r X , s a r_{\mathsf{X},s}^a r X , s a and a temporal scale r T , s a r_{\mathsf{T},s}^a r T , s a , each in ( 0 , ∞ ] (0,\infty] ( 0 , ∞ ] . We describe how the scales are obtained in Appendix C. The scales serve as input to a spatial kernel k X , s a k_{\mathsf{X},s}^a k X , s a and a temporal kernel k T , s a k_{\mathsf{T},s}^a k T , s a , respectively. Both kernels are nonincreasing, take values in [ 0 , 1 ] [0,1] [ 0 , 1 ] , and equal one at zero. The kernels and scales are fixed when the expert is launched. At each observation index n ≥ s n \ge s n ≥ s , a a a assigns each retained score W i W_i W i , i ∈ I n i \in I_n i ∈ I n , a prediction weight based on its starting time t i t_i t i and starting state X t i X_{t_i} X t i :
ω s , n , i a : = k T , s a ( t n − t i r T , s a ) k X , s a ( ∥ X t n − X t i ∥ r X , s a ) , i ∈ I n . (4) \omega_{s,n,i}^a := k_{\mathsf{T},s}^a\left(\frac{t_n-t_i}{r_{\mathsf{T},s}^a}\right) k_{\mathsf{X},s}^a\left(\frac{\lVert X_{t_n}-X_{t_i}\rVert}{r_{\mathsf{X},s}^a}\right), \qquad i \in I_n. \tag*{(4)} ω s , n , i a := k T , s a ( r T , s a t n − t i ) k X , s a ( r X , s a ∥ X t n − X t i ∥ ) , i ∈ I n . (4)
Intuitively, recent observations and observations starting near the current state therefore receive greater weight. An infinite scale removes the corresponding dependence on distance, using the convention u / ∞ = 0 u/\infty= 0 u /∞ = 0 , e.g., temporal-only experts use r X , s a = ∞ r_{\mathsf{X},s}^a = \infty r X , s a = ∞ . Setting both scales to infinity gives uniform weights over the retained history.
Betting strategies Next, we transform past scores and their prediction weights into stakes, using two concrete strategies when X t n ∈ S X_{t_n} \in S X t n ∈ S . A stake λ \lambda λ multiplies the wealth by 1 + λ W n 1+\lambda W_n 1 + λ W n , so its log return is log ( 1 + λ W n ) \log(1+\lambda W_n) log ( 1 + λ W n ) . Log returns add across successive bets and therefore measure accumulated multiplicative wealth growth. The log-return strategy maximises the weighted historical log return:
λ s , n a , log : = min a r g m a x 0 ≤ λ ≤ λ ‾ ∑ i ∈ I n ω s , n , i a log ( 1 + λ W i ) for 1 / 2 ≤ λ ‾ < 1 (5) \lambda_{s,n}^{a,\log} := \min\mathop{\rm arg\,max}_{0 \le\lambda\le\overline{\lambda}} \sum_{i \in I_n} \omega_{s,n,i}^a \log(1+\lambda W_i) \quad\text{for } 1/2 \le\overline{\lambda} < 1 \tag*{(5)} λ s , n a , l o g := min arg max 0 ≤ λ ≤ λ i ∈ I n ∑ ω s , n , i a log ( 1 + λ W i ) for 1/2 ≤ λ < 1 (5)
A second strategy is the moment strategy , which maximises a quadratic lower bound on the weighted historical log return. Since log ( 1 + λ w ) ≥ λ w − λ 2 w 2 \log(1+\lambda w) \ge\lambda w-\lambda^2w^2 log ( 1 + λ w ) ≥ λ w − λ 2 w 2 for w ≥ − 1 w \ge-1 w ≥ − 1 and λ ∈ [ 0 , 1 / 2 ] \lambda\in[0,1/2] λ ∈ [ 0 , 1/2 ] , this bound is λ S s , n a − λ 2 U s , n a \lambda S_{s,n}^a-\lambda^2U_{s,n}^a λ S s , n a − λ 2 U s , n a , where S s , n a : = ∑ i ∈ I n ω s , n , i a W i S_{s,n}^a := \sum_{i \in I_n}\omega_{s,n,i}^aW_i S s , n a := ∑ i ∈ I n ω s , n , i a W i and U s , n a : = ∑ i ∈ I n ω s , n , i a W i 2 U_{s,n}^a := \sum_{i \in I_n}\omega_{s,n,i}^aW_i^2 U s , n a := ∑ i ∈ I n ω s , n , i a W i 2 . Its maximiser is
λ s , n a , m o m : = min { 1 2 , ( S s , n a ) + 2 U s , n a } , ( 0 / 0 : = 0 ) . (6) \lambda_{s,n}^{a,\mathrm{mom}} := \min\left\{\frac{1}{2},\frac{(S_{s,n}^a)_+}{2U_{s,n}^a}\right\}, \qquad(0/0 := 0). \tag*{(6)} λ s , n a , mom := min { 2 1 , 2 U s , n a ( S s , n a ) + } , ( 0/0 := 0 ) . (6)
Thus positive weighted scores favour betting, whereas large score magnitudes reduce the stake. Both strategies choose zero when the weighted sum of the retained scores is nonpositive, including for an empty history. The moment strategy requires only two sums and bets no more than the log-return strategy for the same weights. At each launch, the monitor can include a range of experts A \mathcal{A} A with different configurations of scales, kernels and strategies, to accommodate different violation patterns. Their accounts are then combined using the capital weights η s , a \eta_{s,a} η s , a from § 3.2 .
Experimental Evaluation
We evaluate on a wide range of benchmarks whether our monitoring framework can effectively detect violations of supermartingale certificate conditions. We aim to address the following research questions. Can the monitors detect certificate violations under changed system dynamics (RQ1)? How do temporal and spatial scaling affect the power of monitoring (RQ2)?
Benchmarks We consider three benchmark suites. The synthetic suite consists of six families that isolate persistent, delayed, temporary, and recurring local violations. The control suite comprises three systems which are variants of Building and Tanks from PRoTECT [35 ] , together with an LQR system. Their expected certificate increments can be computed exactly, providing ground truth for evaluating detection. The neural suite uses 16 learned controller–certificate pairs from LogRASM (Badings et al., 2025) to assess monitoring under modified deployment dynamics.
Monitors We use three prediction schemes: uniform (U), which weights retained scores equally; temporal (T), which favours recent observations; and spatial (S), which favours observations from nearby states. On the synthetic benchmarks, we compare moment (M) and log-return (L) strategies. The control and neural experiments use log-return and equal mixtures over five scales for T and S. Each monitor uses a false-alarm tolerance of δ = 0.05 \delta= 0.05 δ = 0.05 and raises an alarm when its betting wealth reaches 1 / δ = 20 1/\delta= 20 1/ δ = 20 . Full configurations and implementation details are provided in the Appendix.
RQ1: Detection of certificate violations. Our results show that the monitors detect certificate violations under changed dynamics, with spatial prediction being particularly effective when violations are localised in the state space. Table 1 illustrates how violation magnitude and exposure affect detection. In Building, S-L detects every run, and its median delay falls from 3043 to 732 observations as violations become stronger and more frequent. The weaker, less frequent violations in Tanks remain harder to detect, even with spatial prediction. For LQR, we weaken the controller by reducing the applied control input. With a 5% reduction, violations occur throughout each trajectory, yet each monitor detects fewer than half the runs. With a 20% reduction, all monitors detect every run. Overall this shows that even persistent violations can remain undetected when their effect is too small to distinguish reliably from stochastic fluctuations within the observed trajectory.
Table 1. Violation strength and detection in selected control settings, with 50 runs each. For each run, magnitude is the average of μ n \mu_n μ n over violating observations, and exposure is the percentage of violating observations. Magnitude and exposure are reported as medians over the 50 runs. Detection entries give counts, with median delay in parentheses. Detection delay is measured in observations from violation onset or first entry into the violating region. U-L, T-L, and S-L use uniform, temporal, and spatial prediction, respectively. NR means fewer than 25 runs alarm.
Table 3 summarises the mean eligible first-alarm percentages across a number of disturbed settings. On the control benchmarks, S-L achieves 83.8%, compared with 29.7% for U-L and 28.2% for T-L. Specifically in Building and Tanks, the certificate condition fails in some regions even though it holds on average along the trajectory. This suggests spatial prediction helps detect these local failures by emphasising observations from nearby states. The neural benchmarks show a similar advantage under expected nonincrease (ϵ = 0 \epsilon= 0 ϵ = 0 ), where S-L raises alarms on 43.1% of runs, compared with approximately 11% for either baseline. The higher alarm rates for positive ϵ \epsilon ϵ concern stronger decrease requirements tested on the same trajectories.
Table 3. Percentage of runs in which each monitor raises an alarm, averaged across settings (50 runs per setting). For neural , ϵ = 0 \epsilon= 0 ϵ = 0 tests expected nonincrease; larger ϵ \epsilon ϵ requires faster expected decrease.
RQ2: Temporal vs. spatial scaling impact Our results show that uniform scaling, while sufficient for long persistent violations, struggles on traces with transient violations. Both temporal and spatial weighting are able to detect such behaviour. Spatial weighting, in particular, benefits from recurrent observations. The correct scaling depends on the system, i.e., no uniformly best scaling is observed. However, mixing over scales can retain some of the benefits of the respective scales, being often only slightly worse than the best for the respective benchmark. Table 2 summarises the results. We can observe that the uniform monitor has a median detection delay of 2126 on persistent violations, on par with large spatial and temporal scales. By contrast, for temporary and recurrent violations (Rec. and Ring) its median detection delay is either larger or fewer than 50% of the runs detect a fault. For example, on the spatial recurring ring benchmark, the medium spatial monitor has a delay of 640, while the uniform monitor has a delay of 2360; on the temporary fault benchmark only the medium temporal monitor alarmed among the individual scales in more than 50% of the cases.
Table 2. Median detection delay in observations on the six synthetic benchmark families: persistent, delayed, temporary, direct recurrence, stochastic ring, and hill. XS–XL denote extra-small through extra-large prediction scales (exact parameters given in Appendix). Temporal scales determine how far back in the history observations receive weight; spatial scales determine the neighbourhood radius around the current state. Equal divides capital equally among the five scale experts. Uniform weights all retained observations equally. NR means fewer than 25 runs alarm.
Related work
Supermartingale certificates have found broad applications in probabilistic program verification and stochastic (neural) control [40 , 12 , 13 , 32 , 26 , 22 , 30 , 6 , 36 , 2 , 18 , 4 ] (Badings et al. 2025). Our work is closest to recent approaches for runtime monitoring of neural Lyapunov certificates in deterministic systems [37 , 17 ] . Runtime monitoring is comparatively straightforward in the deterministic setting: a violation of the required decrease condition is directly observable from a single state transition. For supermartingale certificates, however, monitoring is fundamentally harder because the required decrease holds only in expectation and therefore cannot be assessed from a single transition. We overcome this challenge using betting-based sequential testing [31 , 34 , 33 ] , which we apply for the first time to supermartingale certificates for temporal properties. We further exploit temporal and spatial regularity in stochastic systems to make informed bets and improve detection power.
Runtime monitoring is an established technique for ensuring correctness of cyber-physical systems [7 , 8 ] , providing a lightweight, black-box alternative to formal verification. Existing methods typically detect property violations directly from observed states, fundamentally restricting monitorable properties to safety [5 , 28 ] and excluding properties such as reachability, stability, and general ω \omega ω -regular properties. Predictive monitoring [9 , 25 ] (Henzinger et al. 2025a) extends this scope by forecasting future states, but remains limited to finite time horizons. In contrast, by monitoring supermartingale certificates, our approach can detect violations of certificate conditions supporting general temporal properties over unbounded horizons. Related work [19 , 16 ] uses martingale theory to detect distribution shifts or model misalignment in stochastic processes, but does not monitor the validity of certificates.
Conclusion
We introduced the first framework for runtime monitoring of supermartingale certificates for temporal properties that is applicable to both discrete- and continuous-time systems and to a broad range of supermartingale certificates. Our framework bounds the probability of ever raising a false alarm by a given threshold. Experimental evaluation demonstrates the practical effectiveness of our method for detecting supermartingale certificate violations at runtime in a range of stochastic control tasks. Interesting directions of future work include designing shielding and repair procedures that would use the alarms raised by our runtime monitoring framework.
AI use statement
We used ChatGPT to assist with writing, literature search, theoretical development, and the design and implementation of experiments. We describe these uses below. For writing, we used these tools to draft and revise text, simplify explanations, shorten sections, and improve consistency in notation and terminology. We also used them to assist with LaTeX formatting, e.g., constructing tables. For literature search, we used these tools to identify relevant work and compare its assumptions and guarantees with ours. For theoretical development, we used these tools to suggest proof arguments, expand derivations, and identify possible gaps and counterexamples. They also helped clarify certain measure-theoretic arguments required in the continuous-time setting. For experiments, we used these tools to write basic code and generate plots. They supported the selection of system disturbances. They were used to draft the experimental setup in the appendix. The authors take full responsibility for the final content of the paper, including all AI-assisted text, mathematical claims and proofs, references, code, and experimental results.
Continuous Time
Termination. For a drift condition ( S , l ) (S,l) ( S , l ) , we assume that the deployed process terminates at its first exit from S S S . We retain the terminal state, so X \mathbf{X} X denotes the absorbed process. More precisely,
σ : = inf { t ≥ 0 : X t ∉ S } , inf ∅ : = ∞ , \sigma:= \inf\{t \ge0 : X_t \notin S\}, \qquad\inf\varnothing:= \infty, σ := inf { t ≥ 0 : X t ∈ / S } , inf ∅ := ∞ ,
is an ( G t ) (\mathcal{G}_t) ( G t ) -stopping time, and, on { σ < ∞ } \{\sigma< \infty\} { σ < ∞ } , X σ ∉ S X_\sigma\notin S X σ ∈ / S and X t = X σ X_t = X_\sigma X t = X σ for every t ≥ σ t \ge\sigma t ≥ σ . We do not require σ \sigma σ to be finite. For example, for a reach–avoid certificate, S S S is the continuation region before reaching the target or an unsafe state. This assumption concerns the actual first exit, including exits between observations. This stopping-time requirement ensures that the process does not leave S S S without our knowledge. Meaning, we are only concerned with the certificate and loss in S S S . Hence, we extend the allowed drift by zero outside S S S :
l S ( x ) : = { l ( x ) , x ∈ S , 0 , x ∉ S . (7) l_S(x) :=
\begin{cases}
l(x), & x \in S,\\
0, & x \notin S.
\end{cases} \tag*{(7)} l S ( x ) := { l ( x ) , 0 , x ∈ S , x ∈ / S . (7)
Absorption ensures that an exit is detectable at the next observation because the terminal state is retained. The proof of Lemma 3 uses this to extend the regional drift inequality to all visited states.
Continuous-time assumptions. In continuous time, the expected drift condition bounds the instantaneous rate of change of the certificate. To obtain an expected bound on the certificate change between observations, we impose the following assumptions. As in the preliminaries, X \mathbf{X} X is a right-continuous, time-homogeneous Markov process, and ( G t ) (\mathcal{G}_t) ( G t ) is complete and right-continuous. Right-continuity and adaptation ensure the joint measurability used in the Tonelli argument in the proof of Lemma 3 .
Generator: There is a finite measurable function A f \mathcal{A}f A f such that, for every fixed t ≥ 0 t \ge0 t ≥ 0 , almost surely,
A f ( X t ) = lim u ↓ 0 E [ f ( X t + u ) ∣ X t ] − f ( X t ) u . \mathcal{A}f(X_t) = \lim_{u \downarrow0} \frac{\mathbb{E}[f(X_{t+u}) \mid X_t] - f(X_t)}{u}. A f ( X t ) = u ↓ 0 lim u E [ f ( X t + u ) ∣ X t ] − f ( X t ) .
This is the generator drift of the absorbed process, with A f = 0 \mathcal{A}f = 0 A f = 0 outside S S S . The identity is used in the proof of Lemma 3 to express the instantaneous certificate condition as A f ( X r ) ≤ l ( X r ) \mathcal{A}f(X_r) \le l(X_r) A f ( X r ) ≤ l ( X r ) on { X r ∈ S } \{X_r \in S\} { X r ∈ S } .
E [ ∣ f ( X 0 ) ∣ + ∫ 0 T ( ∣ A f ( X r ) ∣ + ∣ l S ( X r ) ∣ ) d r ] < ∞ . (8) \mathbb{E}\left[|f(X_0)| + \int_0^T \left(|\mathcal{A}f(X_r)| + |l_S(X_r)|\right)\,\mathrm{d}r\right] < \infty. \tag*{(8)} E [ ∣ f ( X 0 ) ∣ + ∫ 0 T ( ∣ A f ( X r ) ∣ + ∣ l S ( X r ) ∣ ) d r ] < ∞. (8)
Together with integrability of N t f N_t^f N t f below, this establishes integrability of f ( X t ) f(X_t) f ( X t ) and L n L_n L n in the opening argument of the proof of Lemma 3 . It also ensures that the conditional expectation of the integrated drift difference in the final step is finite.
N t f : = f ( X t ) − f ( X 0 ) − ∫ 0 t A f ( X r ) d r (9) N_t^f := f(X_t) - f(X_0) - \int_0^t \mathcal{A}f(X_r)\,\mathrm{d}r \tag*{(9)} N t f := f ( X t ) − f ( X 0 ) − ∫ 0 t A f ( X r ) d r (9)
is a right-continuous ( G t ) (\mathcal{G}_t) ( G t ) -martingale. Thus, subtracting the accumulated actual drift leaves a process with zero conditional expected change. The proof of Lemma 3 uses this property to obtain E [ N t n + 1 f − N t n f ∣ G t n ] = 0 \mathbb{E}[N_{t_{n+1}}^f - N_{t_n}^f \mid\mathcal{G}_{t_n}] = 0 E [ N t n + 1 f − N t n f ∣ G t n ] = 0 , leaving only the integrated drift difference in the expression for E n E_n E n .
For the martingale formulation of extended generators, see Hirsch and Yor [20 ] . We additionally require the displayed infinitesimal limit to exist. The certificate condition A f ≤ l Af \le l A f ≤ l on S S S is imposed separately. The usual filtration conditions and right-continuity of N f N^f N f are retained as regularity assumptions; the fixed-time proof of Lemma 3 does not use them separately.
Observations. We observe the absorbed process at fixed times t n = n h t_n = nh t n = nh . The observation filtration satisfies F n ⊆ G t n \mathcal{F}_n \subseteq\mathcal{G}_{t_n} F n ⊆ G t n , and X t n X_{t_n} X t n is F n \mathcal{F}_n F n -measurable. The proof of Lemma 3 applies the martingale identity at these fixed times and uses the filtration inclusion to condition further on F n \mathcal{F}_n F n . Measurability of the sampled state makes the loss bound below predictable, as required when taking 1 / B n 1/B_n 1/ B n outside the conditional expectation in the proof of Lemma 1 .
The accumulated allowed drift is
L n : = ∫ t n t n + 1 l S ( X r ) d r = ∫ t n ∧ σ t n + 1 ∧ σ l S ( X r ) d r . (10) L_n := \int_{t_n}^{t_{n+1}} l_S(X_r)\,\mathrm{d}r = \int_{t_n \wedge\sigma}^{t_{n+1}\wedge\sigma} l_S(X_r)\,\mathrm{d}r. \tag*{(10)} L n := ∫ t n t n + 1 l S ( X r ) d r = ∫ t n ∧ σ t n + 1 ∧ σ l S ( X r ) d r . (10)
Thus, the allowed drift stops accumulating at termination. The interval containing termination is scored using the retained terminal state. On later intervals, we set L n = 0 L_n = 0 L n = 0 , giving D n = W n = 0 D_n = W_n = 0 D n = W n = 0 . Termination itself does not raise a statistical alarm.
Bounds at termination. Suppose that l ( x ) ≤ c l(x) \le c l ( x ) ≤ c on S S S and f ( x ) ≥ f min f(x) \ge f_{\min} f ( x ) ≥ f m i n on all reachable states, including terminal states. Write c + : = max { c , 0 } c_+ := \max\{c, 0\} c + := max { c , 0 } . If the termination time is available when it occurs, define
Δ n : = ( t n + 1 ∧ σ ) − ( t n ∧ σ ) , L ‾ n : = c Δ n . \Delta_n := (t_{n+1} \wedge\sigma) - (t_n \wedge\sigma), \qquad\overline{L}_n := c\Delta_n. Δ n := ( t n + 1 ∧ σ ) − ( t n ∧ σ ) , L n := c Δ n .
Then L n ≤ c Δ n L_n \le c\Delta_n L n ≤ c Δ n for either sign of c c c . If only sampled states are available, an upper bound is
L ‾ n : = { c h , X t n + 1 ∈ S , c + h , X t n ∈ S , X t n + 1 ∉ S , 0 , X t n ∉ S . (11) \overline{L}_n :=
\begin{cases}
ch, & X_{t_{n+1}} \in S,\\
c_+h, & X_{t_n} \in S,\ X_{t_{n+1}} \notin S,\\
0, & X_{t_n} \notin S.
\end{cases} \tag*{(11)} L n := ⎩ ⎨ ⎧ c h , c + h , 0 , X t n + 1 ∈ S , X t n ∈ S , X t n + 1 ∈ / S , X t n ∈ / S . (11)
Indeed, survival until t n + 1 t_{n+1} t n + 1 ensures that the whole interval was spent in S S S , while a terminating interval has duration 0 ≤ Δ n ≤ h 0 \le\Delta_n \le h 0 ≤ Δ n ≤ h and L n ≤ c Δ n ≤ c + h L_n \le c\Delta_n \le c_+h L n ≤ c Δ n ≤ c + h . If the process has already terminated, L n = 0 L_n = 0 L n = 0 . In both cases, the predictable bound
B n : = max { b min , f ( X t n ) + c + h − f min } (12) B_n := \max\{b_{\min}, f(X_{t_n}) + c_+h - f_{\min}\} \tag*{(12)} B n := max { b m i n , f ( X t n ) + c + h − f m i n } (12)
satisfies D n ≥ − B n D_n \ge-B_n D n ≥ − B n , because L ‾ n ≤ c + h \overline{L}_n \le c_+h L n ≤ c + h . For a negative constant drift bound, using c h ch c h on the terminating interval would generally underestimate the accumulated allowance. The piecewise bound above avoids this without requiring the exact termination time.
Lemma 3 (Continuous-time expected increments). Under the continuous-time assumptions above, f ( X t ) f(X_t) f ( X t ) is integrable for every finite t t t . If the ( S , l ) (S,l) ( S , l ) -expected drift condition holds, then, for every n ∈ N 0 n \in\mathbb{N}_0 n ∈ N 0 ,
E n : = E [ f ( X t n + 1 ) − f ( X t n ) − L n ∣ F n ] ≤ 0 almost surely . (13) E_n := \mathbb{E}\left[f(X_{t_{n+1}}) - f(X_{t_n}) - L_n \mid\mathcal{F}_n\right] \le0 \qquad\text{almost surely}. \tag*{(13)} E n := E [ f ( X t n + 1 ) − f ( X t n ) − L n ∣ F n ] ≤ 0 almost surely . (13)
Proof. Fix an observation index n ∈ N 0 n \in\mathbb{N}_0 n ∈ N 0 .
Step 1: We check integrability. By the martingale decomposition in (9) ,
f ( X t ) = f ( X 0 ) + N t f + ∫ 0 t A f ( X r ) d r . f(X_t) = f(X_0) + N_t^f + \int_0^t Af(X_r)\,\mathrm{d}r. f ( X t ) = f ( X 0 ) + N t f + ∫ 0 t A f ( X r ) d r .
Taking absolute values and expectations gives
E [ ∣ f ( X t ) ∣ ] ≤ E [ ∣ f ( X 0 ) ∣ ] + E [ ∣ N t f ∣ ] + E [ ∫ 0 t ∣ A f ( X r ) ∣ d r ] < ∞ . \mathbb{E}[|f(X_t)|] \le\mathbb{E}[|f(X_0)|] + \mathbb{E}[|N_t^f|] + \mathbb{E}\left[\int_0^t |Af(X_r)|\,\mathrm{d}r\right] < \infty. E [ ∣ f ( X t ) ∣ ] ≤ E [ ∣ f ( X 0 ) ∣ ] + E [ ∣ N t f ∣ ] + E [ ∫ 0 t ∣ A f ( X r ) ∣ d r ] < ∞.
The first and third terms are finite by (8) . The second is finite because N f N^f N f is a martingale. The same integrability assumption gives
E [ ∣ L n ∣ ] ≤ E [ ∫ t n t n + 1 ∣ l S ( X r ) ∣ d r ] < ∞ . \mathbb{E}[|L_n|] \le\mathbb{E}\left[\int_{t_n}^{t_{n+1}} |l_S(X_r)|\,\mathrm{d}r\right] < \infty. E [ ∣ L n ∣ ] ≤ E [ ∫ t n t n + 1 ∣ l S ( X r ) ∣ d r ] < ∞.
Thus, the certificate values and allowance defining E n E_n E n are integrable.
Step 2: We bound the drift difference at each fixed time. Fix r ≥ 0 r \ge0 r ≥ 0 . If X r ∈ S X_r \in S X r ∈ S , the certificate condition gives
A f ( X r ) ≤ l ( X r ) = l S ( X r ) almost surely. Af(X_r) \le l(X_r) = l_S(X_r) \qquad\text{almost surely.} A f ( X r ) ≤ l ( X r ) = l S ( X r ) almost surely.
If X r ∉ S X_r \notin S X r ∈ / S , the process is absorbed. Its generator drift is therefore zero, and l S ( X r ) = 0 l_S(X_r) = 0 l S ( X r ) = 0 by definition. Combining the two cases yields
A f ( X r ) − l S ( X r ) ≤ 0 almost surely. Af(X_r) - l_S(X_r) \le0 \qquad\text{almost surely.} A f ( X r ) − l S ( X r ) ≤ 0 almost surely.
Step 3: We pass from fixed times to the whole interval. Write
J n : = ∫ t n t n + 1 ( A f ( X r ) − l S ( X r ) ) d r . J_n := \int_{t_n}^{t_{n+1}} \left(Af(X_r) - l_S(X_r)\right)\,\mathrm{d}r. J n := ∫ t n t n + 1 ( A f ( X r ) − l S ( X r ) ) d r .
This integral is integrable because
E [ ∣ J n ∣ ] ≤ E [ ∫ t n t n + 1 ( ∣ A f ( X r ) ∣ + ∣ l S ( X r ) ∣ ) d r ] < ∞ . \mathbb{E}[|J_n|] \le\mathbb{E}\left[\int_{t_n}^{t_{n+1}} \left(|Af(X_r)| + |l_S(X_r)|\right)\,\mathrm{d}r\right] < \infty. E [ ∣ J n ∣ ] ≤ E [ ∫ t n t n + 1 ( ∣ A f ( X r ) ∣ + ∣ l S ( X r ) ∣ ) d r ] < ∞.
We next show that J n ≤ 0 J_n \le0 J n ≤ 0 almost surely. Step 2 shows that, for each fixed time r r r , the drift difference is nonpositive with probability one. We now apply Tonelli’s theorem to deduce that its integral over the observation interval is also nonpositive with probability one. For ( z ) + : = max { z , 0 } (z)_+ := \max\{z,0\} ( z ) + := max { z , 0 } , joint measurability and nonnegativity give
E [ ∫ t n t n + 1 ( A f ( X r ) − l S ( X r ) ) + d r ] = ∫ t n t n + 1 E [ ( A f ( X r ) − l S ( X r ) ) + ] d r = 0. \mathbb{E}\left[\int_{t_n}^{t_{n+1}} \left(Af(X_r)-l_S(X_r)\right)_+\,\mathrm{d}r\right]
= \int_{t_n}^{t_{n+1}} \mathbb{E}\left[\left(Af(X_r)-l_S(X_r)\right)_+\right]\,\mathrm{d}r = 0. E [ ∫ t n t n + 1 ( A f ( X r ) − l S ( X r ) ) + d r ] = ∫ t n t n + 1 E [ ( A f ( X r ) − l S ( X r ) ) + ] d r = 0.
The last equality follows from Step 2 at each fixed r r r . A nonnegative random variable with expectation zero is zero almost surely. Consequently,
J n ≤ ∫ t n t n + 1 ( A f ( X r ) − l S ( X r ) ) + d r = 0 almost surely. J_n \le\int_{t_n}^{t_{n+1}} \left(Af(X_r)-l_S(X_r)\right)_+\,\mathrm{d}r = 0 \qquad\text{almost surely.} J n ≤ ∫ t n t n + 1 ( A f ( X r ) − l S ( X r ) ) + d r = 0 almost surely.
Step 4: We decompose the corrected certificate increment. Subtracting (9) at t n t_n t n from the same identity at t n + 1 t_{n+1} t n + 1 gives
f ( X t n + 1 ) − f ( X t n ) = N t n + 1 f − N t n f + ∫ t n t n + 1 A f ( X r ) d r . f(X_{t_{n+1}}) - f(X_{t_n}) = N^f_{t_{n+1}} - N^f_{t_n} + \int_{t_n}^{t_{n+1}} Af(X_r)\,\mathrm{d}r. f ( X t n + 1 ) − f ( X t n ) = N t n + 1 f − N t n f + ∫ t n t n + 1 A f ( X r ) d r .
Subtracting L n L_n L n then yields
f ( X t n + 1 ) − f ( X t n ) − L n = N t n + 1 f − N t n f + J n . f(X_{t_{n+1}}) - f(X_{t_n}) - L_n = N^f_{t_{n+1}} - N^f_{t_n} + J_n. f ( X t n + 1 ) − f ( X t n ) − L n = N t n + 1 f − N t n f + J n .
Thus, the corrected increment is the sum of a martingale increment and the nonpositive accumulated drift difference.
Step 5: We take conditional expectations. The martingale property gives
E [ N t n + 1 f − N t n f ∣ F t n ] = N t n f − N t n f = 0. \mathbb{E}[N^{f}_{t_{n+1}}-N^{f}_{t_n}\mid\mathcal{F}_{t_n}]=N^{f}_{t_n}-N^{f}_{t_n}=0. E [ N t n + 1 f − N t n f ∣ F t n ] = N t n f − N t n f = 0.
Since F n ⊆ F t n \mathcal{F}_n\subseteq\mathcal{F}_{t_n} F n ⊆ F t n , the tower property gives
E [ N t n + 1 f − N t n f ∣ F n ] = E [ E [ N t n + 1 f − N t n f ∣ F t n ] ∣ F n ] = 0. \begin{aligned}
\mathbb{E}[N^{f}_{t_{n+1}}-N^{f}_{t_n}\mid\mathcal{F}_n]=\mathbb{E}\left[\mathbb{E}[N^{f}_{t_{n+1}}-N^{f}_{t_n}\mid\mathcal{F}_{t_n}]\mid\mathcal{F}_n\right] \\
&=0.
\end{aligned} E [ N t n + 1 f − N t n f ∣ F n ] = E [ E [ N t n + 1 f − N t n f ∣ F t n ] ∣ F n ] = 0.
Applying conditional expectation to the decomposition in Step 4, we therefore obtain
E n = E [ f ( X t n + 1 ) − f ( X t n ) − L n ∣ F n ] = E [ N t n + 1 f − N t n f ∣ F n ] + E [ J n ∣ F n ] = E [ J n ∣ F n ] ≤ 0. \begin{aligned}
E_n=\mathbb{E}[f(X_{t_{n+1}})-f(X_{t_n})-L_n\mid\mathcal{F}_n] \\
&=\mathbb{E}[N^{f}_{t_{n+1}}-N^{f}_{t_n}\mid\mathcal{F}_n]+\mathbb{E}[J_n\mid\mathcal{F}_n] \\
&=\mathbb{E}[J_n\mid\mathcal{F}_n]\leq0.
\end{aligned} E n = E [ f ( X t n + 1 ) − f ( X t n ) − L n ∣ F n ] = E [ N t n + 1 f − N t n f ∣ F n ] + E [ J n ∣ F n ] = E [ J n ∣ F n ] ≤ 0.
The final inequality follows from J n ≤ 0 J_n\leq0 J n ≤ 0 almost surely and monotonicity of conditional expectation.
Validity
Score decrease. We show the score decrease condition. Intuitively, the score compares the observed certificate change with an upper bound on the allowed drift. Subtracting this upper bound can only reduce the corrected increment. Normalising by a positive bound chosen before the next observation then preserves the sign of its conditional mean.
Proof of Lemma 1. The integrability assumptions imply that D n D_n D n is integrable. Since B n ≥ b min > 0 B_n\geq b_{\min}>0 B n ≥ b m i n > 0 , ∣ W n ∣ ≤ ∣ D n ∣ / b min |W_n|\leq|D_n|/b_{\min} ∣ W n ∣ ≤ ∣ D n ∣/ b m i n , so W n W_n W n is also integrable. The loss bound gives W n ≥ − 1 W_n\geq-1 W n ≥ − 1 . Adding and subtracting L n L_n L n and using the F n \mathcal{F}_n F n -measurability of B n B_n B n gives
μ n = E [ D n ∣ F n ] B n = E n − E [ L ‾ n − L n ∣ F n ] B n ≤ E n B n . \mu_n=\frac{\mathbb{E}[D_n\mid\mathcal{F}_n]}{B_n}
=\frac{E_n-\mathbb{E}[\overline{L}_n-L_n\mid\mathcal{F}_n]}{B_n}
\leq\frac{E_n}{B_n}. μ n = B n E [ D n ∣ F n ] = B n E n − E [ L n − L n ∣ F n ] ≤ B n E n .
The inequality follows from L ‾ n ≥ L n \overline{L}_n\geq L_n L n ≥ L n . In continuous time, Lemma 3 gives E n ≤ 0 E_n\leq0 E n ≤ 0 under the certificate condition. In discrete time, h = 1 h=1 h = 1 gives t n + 1 = t n + 1 t_{n+1}=t_n+1 t n + 1 = t n + 1 . On { X t n ∈ S } \{X_{t_n}\in S\} { X t n ∈ S } , we have L n = l ( X t n ) L_n=l(X_{t_n}) L n = l ( X t n ) . The Markov property and the one-step expected-drift condition therefore give
E n = E [ f ( X t n + 1 ) − f ( X t n ) ∣ F n ] − l ( X t n ) = E [ f ( X t n + 1 ) − f ( X t n ) ∣ X t n ] − l ( X t n ) ≤ 0 \begin{aligned}
E_n=\mathbb{E}[f(X_{t_{n+1}})-f(X_{t_n})\mid\mathcal{F}_n]-l(X_{t_n}) \\
&=\mathbb{E}[f(X_{t_{n+1}})-f(X_{t_n})\mid X_{t_n}]-l(X_{t_n})\leq0
\end{aligned} E n = E [ f ( X t n + 1 ) − f ( X t n ) ∣ F n ] − l ( X t n ) = E [ f ( X t n + 1 ) − f ( X t n ) ∣ X t n ] − l ( X t n ) ≤ 0
almost surely on { X t n ∈ S } \{X_{t_n}\in S\} { X t n ∈ S } . Consequently, the certificate condition implies μ n ≤ 0 \mu_n\leq0 μ n ≤ 0 for all continuous-time observations and, in discrete time, on { X t n ∈ S } \{X_{t_n}\in S\} { X t n ∈ S } .
Statistical guarantee. For the proof, we freeze the wealth just before the first observation interval with positive conditional expected corrected drift. Before freezing, each bet has nonpositive expected gain; afterwards, the wealth stays constant. The frozen wealth is therefore a supermartingale, so Ville’s inequality applies.
Proof of Theorem 2. We first construct an auxiliary monitor whose scores always have nonpositive conditional means. We then apply Ville’s inequality to its wealth and show that every alarm covered by the historical guarantee also crosses the auxiliary wealth threshold.
Step 1: We replace scores from the first violation onwards. We define the first index at which the conditional expected corrected increment is positive, i.e., κ : = inf { n ∈ N 0 : E n > 0 } \kappa:=\inf\{n\in\mathbb{N}_0:E_n>0\} κ := inf { n ∈ N 0 : E n > 0 } , with inf ∅ : = ∞ \inf\varnothing:=\infty inf ∅ := ∞ and freeze the process at that time W ~ n : = 1 { n < κ } W n \widetilde{W}_n:=\mathbf{1}\{n<\kappa\}W_n W n := 1 { n < κ } W n . The auxiliary scores agree with the actual scores before κ \kappa κ and are zero from κ \kappa κ onwards. For every k ≤ n k \le n k ≤ n , the random variable E k E_k E k is F k \mathcal{F}_k F k -measurable and hence F n \mathcal{F}_n F n -measurable. Consequently,
{ n < κ } = ⋂ k = 0 n { E k ≤ 0 } ∈ F n . \{n < \kappa\} = \bigcap_{k=0}^{n}\{E_k \le0\} \in\mathcal{F}_n. { n < κ } = k = 0 ⋂ n { E k ≤ 0 } ∈ F n .
The indicator multiplying W n W_n W n is therefore measurable before that score is observed. We may take it outside the conditional expectation:
E [ W ~ n ∣ F n ] = 1 { n < κ } E [ W n ∣ F n ] = 1 { n < κ } μ n . \mathbb{E}[\widetilde{W}_n \mid\mathcal{F}_n] = \mathbb{1}\{n < \kappa\}\mathbb{E}[W_n \mid\mathcal{F}_n] = \mathbb{1}\{n < \kappa\}\mu_n. E [ W n ∣ F n ] = 1 { n < κ } E [ W n ∣ F n ] = 1 { n < κ } μ n .
On { n < κ } \{n < \kappa\} { n < κ } , score validity gives μ n ≤ E n / B n ≤ 0 \mu_n \le E_n/B_n \le0 μ n ≤ E n / B n ≤ 0 . On its complement, the displayed expression is zero. Hence E [ W ~ n ∣ F n ] ≤ 0 \mathbb{E}[\widetilde{W}_n \mid\mathcal{F}_n] \le0 E [ W n ∣ F n ] ≤ 0 almost surely. Moreover, ∣ W ~ n ∣ ≤ ∣ W n ∣ |\widetilde{W}_n| \le|W_n| ∣ W n ∣ ≤ ∣ W n ∣ and W ~ n ≥ − 1 \widetilde{W}_n \ge-1 W n ≥ − 1 , so the auxiliary scores remain integrable and satisfy the same lower bound.
Step 2: Each auxiliary account is a nonnegative supermartingale. For each expert a a a launched at s s s , define
G ~ s , s a = 1 , G ~ s , n + 1 a = G ~ s , n a ( 1 + λ s , n a W ~ n ) . \widetilde{G}^{a}_{s,s}=1,\qquad\widetilde{G}^{a}_{s,n+1}=\widetilde{G}^{a}_{s,n}(1+\lambda^{a}_{s,n}\widetilde{W}_n). G s , s a = 1 , G s , n + 1 a = G s , n a ( 1 + λ s , n a W n ) .
We use exactly the stakes chosen by the actual monitor. These stakes remain F n \mathcal{F}_n F n -measurable, because they are still computed from the actual observation history.
Since 0 ≤ λ s , n a ≤ 1 0 \le\lambda^{a}_{s,n} \le1 0 ≤ λ s , n a ≤ 1 and W ~ n ≥ − 1 \widetilde{W}_n \ge-1 W n ≥ − 1 , it follows that 1 + λ s , n a W ~ n ≥ 1 − λ s , n a ≥ 0 1+\lambda^{a}_{s,n}\widetilde{W}_n \ge1-\lambda^{a}_{s,n} \ge0 1 + λ s , n a W n ≥ 1 − λ s , n a ≥ 0 . Every account therefore remains nonnegative. Both its current wealth and its next stake are F n \mathcal{F}_n F n -measurable, so Step 1 gives
E [ G ~ s , n + 1 a ∣ F n ] = G ~ s , n a E [ 1 + λ s , n a W ~ n ∣ F n ] = G ~ s , n a ( 1 + λ s , n a E [ W ~ n ∣ F n ] ) ≤ G ~ s , n a . \mathbb{E}[\widetilde{G}^{a}_{s,n+1} \mid\mathcal{F}_n] = \widetilde{G}^{a}_{s,n}\mathbb{E}[1+\lambda^{a}_{s,n}\widetilde{W}_n \mid\mathcal{F}_n] = \widetilde{G}^{a}_{s,n}(1+\lambda^{a}_{s,n}\mathbb{E}[\widetilde{W}_n \mid\mathcal{F}_n]) \le\widetilde{G}^{a}_{s,n}. E [ G s , n + 1 a ∣ F n ] = G s , n a E [ 1 + λ s , n a W n ∣ F n ] = G s , n a ( 1 + λ s , n a E [ W n ∣ F n ]) ≤ G s , n a .
This calculation also establishes integrability. Because the next account value is nonnegative, its conditional expectation is defined even before integrability is established, although it could initially be infinite. Starting from G ~ s , s a = 1 \widetilde{G}^{a}_{s,s}=1 G s , s a = 1 , the displayed inequality and the tower property give inductively
E [ G ~ s , n + 1 a ] ≤ E [ G ~ s , n a ] ≤ 1. \mathbb{E}[\widetilde{G}^{a}_{s,n+1}] \le\mathbb{E}[\widetilde{G}^{a}_{s,n}] \le1. E [ G s , n + 1 a ] ≤ E [ G s , n a ] ≤ 1.
Thus every account value has finite expectation, and ( G ~ s , n a ) n ≥ s (\widetilde{G}^{a}_{s,n})_{n\ge s} ( G s , n a ) n ≥ s is a nonnegative supermartingale.
Step 3: The auxiliary mixtures are also supermartingales. Use the same mixture weights as the actual monitor and set
Q ~ s , n : = ∑ a ∈ A s η s , a G ~ s , n a . \widetilde{Q}_{s,n}:=\sum_{a\in\mathcal{A}_s}\eta_{s,a}\widetilde{G}^{a}_{s,n}. Q s , n := a ∈ A s ∑ η s , a G s , n a .
The weights are nonnegative and sum to one, so Q ~ s , n ≥ 0 \widetilde{Q}_{s,n} \ge0 Q s , n ≥ 0 and Q ~ s , s = 1 \widetilde{Q}_{s,s}=1 Q s , s = 1 . They are chosen at launch and are therefore F s \mathcal{F}_s F s -measurable, hence F n \mathcal{F}_n F n -measurable for n ≥ s n \ge s n ≥ s . Using Step 2,
E [ Q ~ s , n + 1 ∣ F n ] = ∑ a ∈ A s η s , a E [ G ~ s , n + 1 a ∣ F n ] ≤ ∑ a ∈ A s η s , a G ~ s , n a = Q ~ s , n . \begin{aligned}
\mathbb{E}[\widetilde{Q}_{s,n+1} \mid\mathcal{F}_n]
&= \sum_{a\in\mathcal{A}_s}\eta_{s,a}\mathbb{E}[\widetilde{G}^{a}_{s,n+1} \mid\mathcal{F}_n] \\
&\le\sum_{a\in\mathcal{A}_s}\eta_{s,a}\widetilde{G}^{a}_{s,n}
= \widetilde{Q}_{s,n}.
\end{aligned} E [ Q s , n + 1 ∣ F n ] = a ∈ A s ∑ η s , a E [ G s , n + 1 a ∣ F n ] ≤ a ∈ A s ∑ η s , a G s , n a = Q s , n .
As above, nonnegativity and the initial value Q ~ s , s = 1 \widetilde{Q}_{s,s}=1 Q s , s = 1 give integrability by induction. Thus each mixture is a nonnegative supermartingale. No independence between its accounts is needed.
Step 4: Funding preserves the supermartingale property. Use the actual funding amounts c s c_s c s and define
C n : = ∑ s = 0 n − 1 c s , M ~ n : = 1 − C n + ∑ s = 0 n − 1 c s Q ~ s , n . C_n:=\sum_{s=0}^{n-1}c_s,\qquad\widetilde{M}_n:=1-C_n+\sum_{s=0}^{n-1}c_s\widetilde{Q}_{s,n}. C n := s = 0 ∑ n − 1 c s , M n := 1 − C n + s = 0 ∑ n − 1 c s Q s , n .
The funding constraint 0 ≤ c n ≤ 1 − C n 0 \le c_n \le1-C_n 0 ≤ c n ≤ 1 − C n ensures 0 ≤ C n ≤ 1 0 \le C_n \le1 0 ≤ C n ≤ 1 . Hence the reserve and every funded contribution are nonnegative, giving M ~ n ≥ 0 \widetilde{M}_n \ge0 M n ≥ 0 . The sum contains finitely many terms at each n n n . Since c s ≤ 1 c_s \le1 c s ≤ 1 and each mixture is integrable, M ~ n \widetilde{M}_n M n is integrable as well. Initially, no accounts have been funded, so M ~ 0 = 1 \widetilde{M}_0 = 1 M 0 = 1 . At index n n n , funding removes c n c_n c n from the reserve and assigns it to a new mixture with unit initial wealth. Thus
M ~ n + 1 = 1 − C n − c n + ∑ s = 0 n − 1 c s Q ~ s , n + 1 + c n Q ~ n , n + 1 . \widetilde{M}_{n+1} = 1 - C_n - c_n + \sum_{s=0}^{n-1} c_s\widetilde{Q}_{s,n+1} + c_n\widetilde{Q}_{n,n+1}. M n + 1 = 1 − C n − c n + s = 0 ∑ n − 1 c s Q s , n + 1 + c n Q n , n + 1 .
All funding amounts appearing here are F n \mathcal{F}_n F n -measurable. Taking conditional expectations and applying Step 3 gives
E [ M ~ n + 1 ∣ F n ] = 1 − C n − c n + ∑ s = 0 n − 1 c s E [ Q ~ s , n + 1 ∣ F n ] + c n E [ Q ~ n , n + 1 ∣ F n ] \mathbb{E}[\widetilde{M}_{n+1} \mid\mathcal{F}_n] = 1 - C_n - c_n + \sum_{s=0}^{n-1} c_s\mathbb{E}[\widetilde{Q}_{s,n+1} \mid\mathcal{F}_n] + c_n\mathbb{E}[\widetilde{Q}_{n,n+1} \mid\mathcal{F}_n] E [ M n + 1 ∣ F n ] = 1 − C n − c n + s = 0 ∑ n − 1 c s E [ Q s , n + 1 ∣ F n ] + c n E [ Q n , n + 1 ∣ F n ]
≤ 1 − C n − c n + ∑ s = 0 n − 1 c s Q ~ s , n + c n Q ~ n , n = 1 − C n + ∑ s = 0 n − 1 c s Q ~ s , n = M ~ n . \begin{aligned}
\le1 - C_n - c_n + \sum_{s=0}^{n-1} c_s\widetilde{Q}_{s,n} + c_n\widetilde{Q}_{n,n} \\
&= 1 - C_n + \sum_{s=0}^{n-1} c_s\widetilde{Q}_{s,n} = \widetilde{M}_n.
\end{aligned} ≤ 1 − C n − c n + s = 0 ∑ n − 1 c s Q s , n + c n Q n , n = 1 − C n + s = 0 ∑ n − 1 c s Q s , n = M n .
The last equality uses Q ~ n , n = 1 \widetilde{Q}_{n,n} = 1 Q n , n = 1 : the capital assigned to the new mixture exactly matches the amount removed from the reserve. Therefore ( M ~ n ) (\widetilde{M}_n) ( M n ) is a nonnegative supermartingale.
Step 5: We bound threshold crossings of the auxiliary wealth. Since M ~ 0 = 1 \widetilde{M}_0 = 1 M 0 = 1 , Ville’s inequality gives
P ( ∃ n ∈ N 0 : M ~ n ≥ 1 / δ ) ≤ δ . \mathbb{P}\left(\exists n \in\mathbb{N}_0 : \widetilde{M}_n \ge1/\delta\right) \le\delta. P ( ∃ n ∈ N 0 : M n ≥ 1/ δ ) ≤ δ .
Step 6: We transfer this bound to the actual monitor. Consider an outcome on which τ δ < ∞ \tau_\delta< \infty τ δ < ∞ and E k ≤ 0 E_k \le0 E k ≤ 0 for every k < τ δ k < \tau_\delta k < τ δ . By definition of κ \kappa κ , this implies κ ≥ τ δ \kappa\ge\tau_\delta κ ≥ τ δ . Consequently,
W ~ k = W k for every k < τ δ . \widetilde{W}_k = W_k \qquad\text{for every } k < \tau_\delta. W k = W k for every k < τ δ .
These are precisely the scores used to compute the wealth at τ δ \tau_\delta τ δ . In particular, equality κ = τ δ \kappa= \tau_\delta κ = τ δ causes no problem: the score with index τ δ \tau_\delta τ δ has not yet contributed to that wealth.
The actual and auxiliary accounts have the same initial values and use the same stakes. Since their scores agree through index τ δ − 1 \tau_\delta- 1 τ δ − 1 , their account values agree at τ δ \tau_\delta τ δ . Their mixture weights, funding amounts, and reserves also agree. It follows that
M ~ τ δ = M τ δ ≥ 1 / δ . \widetilde{M}_{\tau_\delta} = M_{\tau_\delta} \ge1/\delta. M τ δ = M τ δ ≥ 1/ δ .
We have therefore established the event inclusion
{ τ δ < ∞ , E k ≤ 0 for every k < τ δ } ⊆ { ∃ n ∈ N 0 : M ~ n ≥ 1 / δ } . \{\tau_\delta< \infty,\ E_k \le0 \text{ for every } k < \tau_\delta\} \subseteq\{\exists n \in\mathbb{N}_0 : \widetilde{M}_n \ge1/\delta\}. { τ δ < ∞ , E k ≤ 0 for every k < τ δ } ⊆ { ∃ n ∈ N 0 : M n ≥ 1/ δ } .
Applying the bound from Step 5 yields
P ( τ δ < ∞ and E k ≤ 0 for every k < τ δ ) ≤ δ . \mathbb{P}(\tau_\delta< \infty\text{ and } E_k \le0 \text{ for every } k < \tau_\delta) \le\delta. P ( τ δ < ∞ and E k ≤ 0 for every k < τ δ ) ≤ δ .
Step 7: We obtain the unconditional false-alarm bound. Suppose that the certificate condition holds. Score validity gives μ n ≤ 0 \mu_n \le0 μ n ≤ 0 almost surely on { X t n ∈ S } \{X_{t_n} \in S\} { X t n ∈ S } . Outside S S S , every expert chooses stake zero. Consequently, for every expert and every n ≥ s n \ge s n ≥ s ,
λ s , n a μ n ≤ 0 almost surely . \lambda^a_{s,n}\mu_n \le0 \qquad\text{almost surely}. λ s , n a μ n ≤ 0 almost surely .
We can therefore apply the account argument directly to the actual scores:
E [ G s , n + 1 a ∣ F n ] = G s , n a ( 1 + λ s , n a E [ W n ∣ F n ] ) = G s , n a ( 1 + λ s , n a μ n ) ≤ G s , n a . \mathbb{E}[G^a_{s,n+1} \mid\mathcal{F}_n] = G^a_{s,n}(1 + \lambda^a_{s,n}\mathbb{E}[W_n \mid\mathcal{F}_n]) = G^a_{s,n}(1 + \lambda^a_{s,n}\mu_n) \le G^a_{s,n}. E [ G s , n + 1 a ∣ F n ] = G s , n a ( 1 + λ s , n a E [ W n ∣ F n ]) = G s , n a ( 1 + λ s , n a μ n ) ≤ G s , n a .
The nonnegativity and integrability arguments from Step 2 apply unchanged. The mixture and funding arguments from Steps 3 and 4 then show that the actual wealth ( M n ) (M_n) ( M n ) is a nonnegative supermartingale with M 0 = 1 M_0 = 1 M 0 = 1 . Ville’s inequality therefore gives
P ( τ δ < ∞ ) = P ( ∃ n ∈ N 0 : M n ≥ 1 / δ ) ≤ δ . \mathbb{P}(\tau_\delta< \infty) = \mathbb{P}(\exists n \in\mathbb{N}_0 : M_n \ge1/\delta) \le\delta. P ( τ δ < ∞ ) = P ( ∃ n ∈ N 0 : M n ≥ 1/ δ ) ≤ δ .
Monitoring several conditions. For a certificate with several drift conditions, each component monitor must satisfy the score assumptions for its own condition. The termination assumption applies separately to the region used in each continuous-time condition. In particular, one physical termination time suffices when the conditions share a continuation region. If their regions differ, stopping at the target or an unsafe state does not by itself justify every component: each component must have access to the process stopped at its own first exit, including its exit state, or use another valid interval construction.
Corollary 4 (Composition). Suppose that a certificate has J J J expected-drift conditions. For each condition j j j , run a monitor satisfying Theorem 2 at level δ j > 0 \delta_j > 0 δ j > 0 , where ∑ j = 1 J δ j ≤ δ \sum_{j=1}^{J} \delta_j \le\delta ∑ j = 1 J δ j ≤ δ . Let τ \tau τ be the first index at which any component monitor or sampled domain-bound check raises an alarm. If all certificate conditions hold for the deployed process, then P ( τ < ∞ ) ≤ δ \mathbb{P}(\tau< \infty) \le\delta P ( τ < ∞ ) ≤ δ .
Proof. Write τ j \tau_j τ j for the first alarm index of component j j j . A valid domain-bound condition holds at every fixed sampled time almost surely. Since there are countably many samples and finitely many such conditions, their checks raise no alarm almost surely. The component guarantees and the union bound therefore give
P ( τ < ∞ ) ≤ ∑ j = 1 J P ( τ j < ∞ ) ≤ ∑ j = 1 J δ j ≤ δ . \mathbb{P}(\tau< \infty) \le\sum_{j=1}^{J} \mathbb{P}(\tau_j < \infty) \le\sum_{j=1}^{J} \delta_j \le\delta. P ( τ < ∞ ) ≤ j = 1 ∑ J P ( τ j < ∞ ) ≤ j = 1 ∑ J δ j ≤ δ .
Independence is not required.
Power
Weighted stakes. The two stake strategies use the same weighted history to decide how strongly to bet. The log-return strategy directly maximises the historical log return. The moment strategy instead maximises a quadratic lower bound, which requires only the weighted sum of the scores and their squares. The following lemma justifies both constructions and explains how these quantities relate to the expected return of the next bet. For the following lemma we fix an expert a ∈ A s a \in\mathcal{A}_s a ∈ A s , an observation index n ≥ s n \ge s n ≥ s , and a cap 1 / 2 ≤ λ ‾ < 1 1/2 \le\overline{\lambda} < 1 1/2 ≤ λ < 1 . Moreover, for 0 ≤ λ ≤ λ ‾ 0 \le\lambda\le\overline{\lambda} 0 ≤ λ ≤ λ , define:
ω i : = ω s , n , i a , S : = ∑ i ∈ I n ω i W i , U : = ∑ i ∈ I n ω i W i 2 , H ( λ ) : = ∑ i ∈ I n ω i log ( 1 + λ W i ) . \omega_i := \omega^{a}_{s,n,i}, \qquad S := \sum_{i\in I_n} \omega_i W_i, \qquad U := \sum_{i\in I_n} \omega_i W_i^2, \qquad H(\lambda) := \sum_{i\in I_n} \omega_i \log(1+\lambda W_i). ω i := ω s , n , i a , S := i ∈ I n ∑ ω i W i , U := i ∈ I n ∑ ω i W i 2 , H ( λ ) := i ∈ I n ∑ ω i log ( 1 + λ W i ) .
Lemma 5 (Weighted stake strategies). The following statements hold on { X t n ∈ S } \{X_{t_n} \in S\} { X t n ∈ S } .
The log-return and moment stakes are F n \mathcal{F}_n F n -measurable, both are zero exactly when S ≤ 0 S \le0 S ≤ 0 , and 0 ≤ λ s , n a , m o m ≤ λ s , n a , l o g ≤ λ ‾ 0 \le\lambda^{a,\mathrm{mom}}_{s,n} \le\lambda^{a,\mathrm{log}}_{s,n} \le\overline{\lambda} 0 ≤ λ s , n a , mom ≤ λ s , n a , log ≤ λ .
For every λ ∈ [ 0 , 1 / 2 ] \lambda\in[0,1/2] λ ∈ [ 0 , 1/2 ] , the moment stake maximises the lower bound H ( λ ) ≥ λ S − λ 2 U H(\lambda) \ge\lambda S - \lambda^2 U H ( λ ) ≥ λ S − λ 2 U over [ 0 , 1 / 2 ] [0,1/2] [ 0 , 1/2 ] .
For any F n \mathcal{F}_n F n -measurable stake λ n ∈ [ 0 , 1 / 2 ] \lambda_n \in[0,1/2] λ n ∈ [ 0 , 1/2 ] , if q n : = E [ W n 2 ∣ F n ] < ∞ q_n := \mathbb{E}[W_n^2 \mid\mathcal{F}_n] < \infty q n := E [ W n 2 ∣ F n ] < ∞ a.s. then
E [ log ( 1 + λ n W n ) ∣ F n ] ≥ λ n μ n − λ n 2 q n (14) \mathbb{E}[\log(1+\lambda_n W_n) \mid\mathcal{F}_n] \ge\lambda_n \mu_n - \lambda_n^2 q_n \tag*{(14)} E [ log ( 1 + λ n W n ) ∣ F n ] ≥ λ n μ n − λ n 2 q n (14) almost surely.
Proof. We first establish the quadratic lower bound. For z ≥ − 1 / 2 z \ge-1/2 z ≥ − 1/2 , define ψ ( z ) : = log ( 1 + z ) − z + z 2 \psi(z) := \log(1+z) - z + z^2 ψ ( z ) := log ( 1 + z ) − z + z 2 . We take its derivative ψ ′ ( z ) = z ( 1 + 2 z ) 1 + z \psi'(z) = \frac{z(1+2z)}{1+z} ψ ′ ( z ) = 1 + z z ( 1 + 2 z ) and observe that ψ ′ ( z ) ≤ 0 \psi'(z) \le0 ψ ′ ( z ) ≤ 0 on [ − 1 / 2 , 0 ] [-1/2,0] [ − 1/2 , 0 ] , because the factor z z z is nonpositive, while 1 + 2 z 1+2z 1 + 2 z is nonnegative and 1 + z 1+z 1 + z is positive. Moreover, on [ 0 , ∞ ) [0,\infty) [ 0 , ∞ ) , all factors are nonnegative, so ψ ′ ( z ) ≥ 0 \psi'(z) \ge0 ψ ′ ( z ) ≥ 0 . Thus, ψ \psi ψ attains its minimum at zero. Since ψ ( 0 ) = 0 \psi(0) = 0 ψ ( 0 ) = 0 , substituting z = λ w z = \lambda w z = λ w implies that
log ( 1 + λ w ) ≥ λ w − λ 2 w 2 for w ≥ − 1 , 0 ≤ λ ≤ 1 2 . (15) \log(1+\lambda w) \ge\lambda w - \lambda^2 w^2 \qquad\text{for } w \ge-1,\quad0 \le\lambda\le\frac{1}{2}. \tag*{(15)} log ( 1 + λ w ) ≥ λ w − λ 2 w 2 for w ≥ − 1 , 0 ≤ λ ≤ 2 1 . (15)
Multiplying by the nonnegative weights and summing yields H ( λ ) ≥ λ S − λ 2 U H(\lambda) \ge\lambda S - \lambda^2 U H ( λ ) ≥ λ S − λ 2 U .
The linear term rewards a positive weighted score sum, while the quadratic term penalises large stakes. If U > 0 U > 0 U > 0 , the derivative of this lower bound is S − 2 λ U S - 2\lambda U S − 2 λ U , so its maximiser over [ 0 , 1 / 2 ] [0,1/2] [ 0 , 1/2 ] is
λ s , n a , m o m = min { 1 2 , S + 2 U } . \lambda_{s,n}^{a,\mathrm{mom}} = \min\left\{\frac{1}{2},\frac{S_+}{2U}\right\}. λ s , n a , mom = min { 2 1 , 2 U S + } .
If U = 0 U = 0 U = 0 , every score with positive weight is zero. Hence, S = 0 S = 0 S = 0 , the lower bound is constant, and the strategy chooses zero.
We next consider the log-return strategy. Since W i ≥ − 1 W_i \ge-1 W i ≥ − 1 and λ ˉ < 1 \bar{\lambda} < 1 λ ˉ < 1 , the logarithms are well-defined throughout the optimisation interval. The objective is continuous on a compact interval, so a maximiser exists. Its derivatives are
H ′ ( λ ) = ∑ i ∈ I n ω i W i 1 + λ W i , H ′ ′ ( λ ) = − ∑ i ∈ I n ω i W i 2 ( 1 + λ W i ) 2 . H'(\lambda) = \sum_{i\in I_n}\frac{\omega_i W_i}{1+\lambda W_i}, \qquad H''(\lambda) = -\sum_{i\in I_n}\frac{\omega_i W_i^2}{(1+\lambda W_i)^2}. H ′ ( λ ) = i ∈ I n ∑ 1 + λ W i ω i W i , H ′′ ( λ ) = − i ∈ I n ∑ ( 1 + λ W i ) 2 ω i W i 2 .
Consequently, H H H is concave, and strictly concave whenever ∑ i ∈ I n ω i W i 2 > 0 \sum_{i\in I_n}\omega_i W_i^2 > 0 ∑ i ∈ I n ω i W i 2 > 0 . The derivative H ′ ( 0 ) = ∑ i ∈ I n ω i W i H'(0) = \sum_{i\in I_n}\omega_i W_i H ′ ( 0 ) = ∑ i ∈ I n ω i W i describes whether increasing the stake from zero initially improves the historical return. If S ≤ 0 S \le0 S ≤ 0 , concavity implies that zero is the smallest maximiser. If S > 0 S > 0 S > 0 , the maximiser is positive. It equals λ ˉ \bar{\lambda} λ ˉ when H ′ ( λ ˉ ) ≥ 0 H'(\bar{\lambda}) \ge0 H ′ ( λ ˉ ) ≥ 0 ; otherwise, it is the unique root of H ′ H' H ′ in ( 0 , λ ˉ ) (0,\bar{\lambda}) ( 0 , λ ˉ ) . This gives the endpoint checks and bisection procedure used in the implementation. All inputs are F n \mathcal{F}_n F n -measurable, as are the bisection iterates and their limit. The explicit moment stake is likewise measurable.
To compare the stakes, suppose S > 0 S > 0 S > 0 . For λ ∈ [ 0 , 1 / 2 ] \lambda\in[0,1/2] λ ∈ [ 0 , 1/2 ] , we have 1 + λ W i ≥ 1 / 2 1+\lambda W_i \ge1/2 1 + λ W i ≥ 1/2 , and therefore
H ′ ( λ ) = S − λ ∑ i ∈ I n ω i W i 2 1 + λ W i ≥ S − 2 λ U . H'(\lambda) = S-\lambda\sum_{i\in I_n}\frac{\omega_i W_i^2}{1+\lambda W_i} \ge S-2\lambda U. H ′ ( λ ) = S − λ i ∈ I n ∑ 1 + λ W i ω i W i 2 ≥ S − 2 λ U .
At the moment stake, the final expression is nonnegative. Thus, the historical log return has not started decreasing at that stake, so its maximiser cannot lie below it. If S ≤ 0 S \le0 S ≤ 0 , both stakes are zero.
Finally, the pointwise logarithmic bound also applies to the next score. Taking conditional expectations and using predictability gives
E [ log ( 1 + λ n W n ) ∣ F n ] ≥ λ n μ n − λ n 2 q n . \mathbb{E}[\log(1+\lambda_n W_n)\mid\mathcal{F}_n] \ge\lambda_n\mu_n-\lambda_n^2q_n. E [ log ( 1 + λ n W n ) ∣ F n ] ≥ λ n μ n − λ n 2 q n .
The logarithm is integrable because
∣ log ( 1 + λ n W n ) ∣ ≤ log 2 + 1 2 ( W n ) + , \lvert\log(1+\lambda_n W_n)\rvert\le\log2+\frac{1}{2}(W_n)_+, ∣ log ( 1 + λ n W n )∣ ≤ log 2 + 2 1 ( W n ) + ,
and W n W_n W n is integrable under the standing assumptions. □
The conditional bound explains why the moment strategy uses both the scores and their squares. A positive conditional mean favours betting, while a large second moment makes a large stake less attractive. In particular, the expected log return is positive whenever
λ n > 0 and μ n > λ n q n . \lambda_n > 0 \qquad\text{and}\qquad\mu_n > \lambda_n q_n. λ n > 0 and μ n > λ n q n .
Thus, sufficiently small positive stakes ensure positive expected log return when the conditional mean is positive and the conditional second moment is finite. The log-return strategy achieves at least as much weighted historical log return as the moment strategy, but neither is necessarily better for the next score, e.g., overcommitting to a wrong outcome may decrease wealth drastically.
Locality. We choose spatial and temporal scales using guesses about the regularity of the conditional expected scores. Fix θ ∈ ( 0 , 1 ) \theta\in(0,1) θ ∈ ( 0 , 1 ) and an expert a ∈ A s a \in\mathcal{A}_s a ∈ A s launched at observation index s s s , which aims to detect a conditional expected score of at least μ ⋆ , s a > 0 \mu_{\star,s}^a > 0 μ ⋆ , s a > 0 . The expert guesses spatial and temporal Lipschitz constants α X , s a > 0 \alpha_{\mathcal{X},s}^a > 0 α X , s a > 0 and α T , s a > 0 \alpha_{\mathsf{T},s}^a > 0 α T , s a > 0 . For the spatial regularity argument, suppose that μ n = E [ W n ∣ F n ] = g h ( X t n ) \mu_n = \mathbb{E}[W_n \mid\mathcal{F}_n] = g_h(X_{t_n}) μ n = E [ W n ∣ F n ] = g h ( X t n ) almost surely for every n n n , where g h : X → R g_h:\mathcal{X} \to\mathbb{R} g h : X → R gives the expected score over an observation interval of length h h h . The regularity guesses are
∣ g h ( y ) − g h ( x ) ∣ ≤ α X , s a ∥ x − y ∥ , for all x , y ∈ X , ∣ μ n − μ i ∣ ≤ α T , s a ∣ t n − t i ∣ , almost surely, for all 0 ≤ i < n . (16) \begin{aligned}
|g_h(y)-g_h(x)| &\le\alpha_{\mathcal{X},s}^a \lVert x-y\rVert,\quad&&\text{for all }x,y\in\mathcal{X},\\
|\mu_n-\mu_i| &\le\alpha_{\mathsf{T},s}^a |t_n-t_i|,\quad&&\text{almost surely, for all }0\le i<n. \tag*{(16)}
\end{aligned} ∣ g h ( y ) − g h ( x ) ∣ ∣ μ n − μ i ∣ ≤ α X , s a ∥ x − y ∥ , ≤ α T , s a ∣ t n − t i ∣ , for all x , y ∈ X , almost surely, for all 0 ≤ i < n . (16)
Using θ μ ⋆ , s a \theta\mu_{\star,s}^a θ μ ⋆ , s a as the tolerated difference between past and current conditional means, we define
r X , s a : = θ μ ⋆ , s a α X , s a , r T , s a : = θ μ ⋆ , s a α T , s a . r_{\mathcal{X},s}^a := \frac{\theta\mu_{\star,s}^a}{\alpha_{\mathcal{X},s}^a},\qquad
r_{\mathsf{T},s}^a := \frac{\theta\mu_{\star,s}^a}{\alpha_{\mathsf{T},s}^a}. r X , s a := α X , s a θ μ ⋆ , s a , r T , s a := α T , s a θ μ ⋆ , s a .
For a cutoff or linear kernel with finite scale, if the corresponding guess is correct and μ n ≥ μ ⋆ , s a \mu_n \ge\mu_{\star,s}^a μ n ≥ μ ⋆ , s a , every observation with positive weight has conditional mean μ i ≥ ( 1 − θ ) μ ⋆ , s a > 0 \mu_i \ge(1-\theta)\mu_{\star,s}^a > 0 μ i ≥ ( 1 − θ ) μ ⋆ , s a > 0 . Giving these observations greater weight can help the expert choose positive stakes during violations, without affecting false-alarm control.
Lipschitz Regularity. The regularity guesses guide which historical observations are useful for predicting the next score. Fix an expert a ∈ A s a \in\mathcal{A}_s a ∈ A s . Suppose that its spatial regularity guess is valid and its spatial kernel is a cutoff or linear kernel with scale
r X , s a = θ μ ⋆ , s a α X , s a . r_{\mathcal{X},s}^a = \frac{\theta\mu_{\star,s}^a}{\alpha_{\mathcal{X},s}^a}. r X , s a = α X , s a θ μ ⋆ , s a .
A positive prediction weight requires the spatial kernel to be positive. For a cutoff or linear kernel, this is possible only when the distance from the historical state to the current state is at most the spatial scale. Hence,
ω s , n , i a > 0 ⟹ ∥ X t i − X t n ∥ ≤ r X , s a . \omega_{s,n,i}^a > 0 \quad\Longrightarrow\quad\lVert X_{t_i}-X_{t_n}\rVert\le r_{\mathcal{X},s}^a. ω s , n , i a > 0 ⟹ ∥ X t i − X t n ∥ ≤ r X , s a .
If the spatial regularity guess is valid, the conditional means at these states therefore satisfy
∣ μ i − μ n ∣ = ∣ g h ( X t i ) − g h ( X t n ) ∣ ≤ α X , s a ∥ X t i − X t n ∥ ≤ α X , s a r X , s a = θ μ ⋆ , s a . \begin{aligned}
|\mu_i-\mu_n| &= |g_h(X_{t_i})-g_h(X_{t_n})|\\
&\le\alpha_{\mathcal{X},s}^a\lVert X_{t_i}-X_{t_n}\rVert\le\alpha_{\mathcal{X},s}^a r_{\mathcal{X},s}^a = \theta\mu_{\star,s}^a.
\end{aligned} ∣ μ i − μ n ∣ = ∣ g h ( X t i ) − g h ( X t n ) ∣ ≤ α X , s a ∥ X t i − X t n ∥ ≤ α X , s a r X , s a = θ μ ⋆ , s a .
Thus, the chosen radius ensures that every observation with positive weight has a conditional mean within θ μ ⋆ , s a \theta\mu_{\star,s}^a θ μ ⋆ , s a of the current conditional mean. The same conclusion follows from a valid temporal guess and the corresponding temporal kernel. In particular, if μ n ≥ μ ⋆ , s a \mu_n \ge\mu_{\star,s}^a μ n ≥ μ ⋆ , s a , then
ω s , n , i a > 0 ⟹ μ i ≥ ( 1 − θ ) μ ⋆ , s a > 0. \omega_{s,n,i}^a > 0 \quad\Longrightarrow\quad\mu_i \ge(1-\theta)\mu_{\star,s}^a > 0. ω s , n , i a > 0 ⟹ μ i ≥ ( 1 − θ ) μ ⋆ , s a > 0.
Hence, when the current conditional mean is sufficiently positive, the selected observations also come from positive-mean steps. Their realised scores may nevertheless be negative, and their second moments may differ. Geometric kernels retain observations beyond the chosen scale, so they favour relevant observations without ensuring this implication. These regularity guesses guide prediction and need not hold for false-alarm control.
Accumulating evidence. A positive expected log return favours wealth growth, but an alarm requires the realised wealth to reach the prescribed threshold. The following lemma connects the evidence accumulated by one expert to the monitor’s verdict.
Lemma 6 (Sufficient evidence for detection). Fix a starting index s s s , an expert a ∈ A s a \in\mathcal{A}_s a ∈ A s with c s η s , a > 0 c_s\eta_{s,a} > 0 c s η s , a > 0 , and an index n > s n > s n > s . Suppose that this expert uses stakes strictly below one. If
∑ k = s n − 1 log ( 1 + λ s , k a W k ) ≥ log 1 δ c s η s , a , (17) \sum_{k=s}^{n-1} \log(1+\lambda^a_{s,k}W_k) \ge\log\frac{1}{\delta c_s\eta_{s,a}}, \tag*{(17)} k = s ∑ n − 1 log ( 1 + λ s , k a W k ) ≥ log δ c s η s , a 1 , (17) then τ δ ≤ n \tau_\delta\le n τ δ ≤ n . If its stakes are at most 1 / 2 1/2 1/2 , it suffices that
∑ k = s n − 1 ( λ s , k a W k − ( λ s , k a ) 2 W k 2 ) ≥ log 1 δ c s η s , a . (18) \sum_{k=s}^{n-1}\left(\lambda^a_{s,k}W_k-(\lambda^a_{s,k})^2W_k^2\right) \ge\log\frac{1}{\delta c_s\eta_{s,a}}. \tag*{(18)} k = s ∑ n − 1 ( λ s , k a W k − ( λ s , k a ) 2 W k 2 ) ≥ log δ c s η s , a 1 . (18)
Proof. The mixture launched at index s s s receives c s c_s c s units of capital, of which the fraction η s , a \eta_{s,a} η s , a is assigned to expert a a a . The account G s , n a G^a_{s,n} G s , n a starts from one and records how this initial capital grows through betting. Hence, the expert’s contribution to the total wealth at index n n n is c s η s , a G s , n a c_s\eta_{s,a}G^a_{s,n} c s η s , a G s , n a .
By definition, the total wealth is
M n = 1 − C n + ∑ r = 0 n − 1 c r ∑ b ∈ A r η r , b G r , n b . M_n=1-C_n+\sum_{r=0}^{n-1}c_r\sum_{b\in\mathcal{A}_r}\eta_{r,b}G^b_{r,n}. M n = 1 − C n + r = 0 ∑ n − 1 c r b ∈ A r ∑ η r , b G r , n b .
Since n > s n>s n > s , this sum includes the contribution of expert a a a launched at s s s . The reserve 1 − C n 1-C_n 1 − C n and all other contributions are nonnegative. Keeping only the chosen expert’s contribution therefore gives the lower bound
M n ≥ c s η s , a G s , n a . M_n \ge c_s\eta_{s,a}G^a_{s,n}. M n ≥ c s η s , a G s , n a .
Thus, it suffices to show that this expert’s contribution alone reaches the alarm threshold 1 / δ 1/\delta 1/ δ . The expert’s account is the product of its successive betting factors:
G s , n a = ∏ k = s n − 1 ( 1 + λ s , k a W k ) . G^a_{s,n}=\prod_{k=s}^{n-1}(1+\lambda^a_{s,k}W_k). G s , n a = k = s ∏ n − 1 ( 1 + λ s , k a W k ) .
Each factor is strictly positive because W k ≥ − 1 W_k \ge-1 W k ≥ − 1 and λ s , k a < 1 \lambda^a_{s,k}<1 λ s , k a < 1 . We can therefore express the product as the exponential of the sum of its logarithms. Under the first condition of the lemma,
G s , n a = exp ( ∑ k = s n − 1 log ( 1 + λ s , k a W k ) ) ≥ exp ( log 1 δ c s η s , a ) = 1 δ c s η s , a . G^a_{s,n}=\exp\left(\sum_{k=s}^{n-1}\log(1+\lambda^a_{s,k}W_k)\right)\ge\exp\left(\log\frac{1}{\delta c_s\eta_{s,a}}\right)=\frac{1}{\delta c_s\eta_{s,a}}. G s , n a = exp ( k = s ∑ n − 1 log ( 1 + λ s , k a W k ) ) ≥ exp ( log δ c s η s , a 1 ) = δ c s η s , a 1 .
Multiplying by the expert’s initial capital gives
M n ≥ c s η s , a G s , n a ≥ c s η s , a 1 δ c s η s , a = 1 δ . M_n\ge c_s\eta_{s,a}G^a_{s,n}\ge c_s\eta_{s,a}\frac{1}{\delta c_s\eta_{s,a}}=\frac{1}{\delta}. M n ≥ c s η s , a G s , n a ≥ c s η s , a δ c s η s , a 1 = δ 1 .
Since τ δ \tau_\delta τ δ is the first index at which the total wealth reaches 1 / δ 1/\delta 1/ δ , it follows that τ δ ≤ n \tau_\delta\le n τ δ ≤ n .
Finally, suppose that all stakes of this expert are at most 1 / 2 1/2 1/2 . Applying (15) to each betting factor and summing yields
∑ k = s n − 1 log ( 1 + λ s , k a W k ) ≥ ∑ k = s n − 1 ( λ s , k a W k − ( λ s , k a ) 2 W k 2 ) . \sum_{k=s}^{n-1}\log(1+\lambda^a_{s,k}W_k)\ge\sum_{k=s}^{n-1}\left(\lambda^a_{s,k}W_k-(\lambda^a_{s,k})^2W_k^2\right). k = s ∑ n − 1 log ( 1 + λ s , k a W k ) ≥ k = s ∑ n − 1 ( λ s , k a W k − ( λ s , k a ) 2 W k 2 ) .
If the second condition holds, the right-hand side is at least log ( 1 / ( δ c s η s , a ) ) \log(1/(\delta c_s\eta_{s,a})) log ( 1/ ( δ c s η s , a )) . The sum of log returns is therefore also at least this threshold, which establishes the first condition. The preceding argument then gives τ δ ≤ n \tau_\delta\le n τ δ ≤ n .
The lemma explains the cost of dividing capital among experts. An expert with less initial capital must accumulate more log return to trigger an alarm by itself. For example, dividing a mixture equally among K K K experts adds log K \log K log K to this sufficient threshold compared with assigning that mixture to one expert. This cost allows the monitor to support several strategies without selecting one in advance. Since other accounts also contribute wealth, the monitor may alarm before any individual expert satisfies the condition.
Monitoring several conditions. A certificate may contain several expected-decrease conditions. We can monitor them jointly by dividing the permitted false-alarm probability among their monitors. This union-bound approach allows the monitors to use the same observations, because independence is not required.
Corollary 7 (Composition). Suppose that a certificate has J J J expected-decrease conditions. For each condition j j j , run a monitor satisfying Theorem 2 at a level δ j > 0 \delta_j > 0 δ j > 0 , where ∑ j = 1 J δ j ≤ δ \sum_{j=1}^{J} \delta_j \le\delta ∑ j = 1 J δ j ≤ δ . Let τ \tau τ be the first index at which any component monitor or sampled domain-bound check raises an alarm. If all certificate conditions hold for the deployed process, then P ( τ < ∞ ) ≤ δ \mathbb{P}(\tau< \infty) \le\delta P ( τ < ∞ ) ≤ δ .
Proof. A valid domain bound cannot be violated at an observed state. Writing τ j \tau_j τ j for the first alarm index of component monitor j j j , Theorem 2 and the union bound give
P ( τ < ∞ ) ≤ ∑ j = 1 J P ( τ j < ∞ ) ≤ ∑ j = 1 J δ j ≤ δ . \mathbb{P}(\tau< \infty) \le\sum_{j=1}^{J} \mathbb{P}(\tau_j < \infty) \le\sum_{j=1}^{J} \delta_j \le\delta. P ( τ < ∞ ) ≤ j = 1 ∑ J P ( τ j < ∞ ) ≤ j = 1 ∑ J δ j ≤ δ .
Monitor power. To quantify detection, we consider a block on which the conditional expected corrected drift E k E_k E k exceeds the expected slack in the observable drift bound. The difference determines the signal available to the monitor. The following result uses an additional upper score bound and an expert whose stake is constant throughout the block. For the next lemma, fix a starting index s s s , an expert a ∈ A r a \in\mathcal{A}_r a ∈ A r launched at r ≤ s r \le s r ≤ s , a duration N ∈ N ≥ 1 N \in\mathbb{N}_{\ge1} N ∈ N ≥ 1 , and β ∈ ( 0 , 1 ) \beta\in(0,1) β ∈ ( 0 , 1 ) . Suppose that the expert’s capital at the start of the block is ρ r , s : = c r η r , a G r , s a > 0 \rho_{r,s} := c_r\eta_{r,a}G^a_{r,s} > 0 ρ r , s := c r η r , a G r , s a > 0 almost surely. Let d ⋆ d_\star d ⋆ be a lower bound on the conditional expected corrected drift E k E_k E k , and let s ⋆ ≥ 0 s_\star\ge0 s ⋆ ≥ 0 be an upper bound on the conditional expected slack E [ L ˉ k − L k ∣ F k ] \mathbb{E}[\bar{L}_k-L_k \mid\mathcal{F}_k] E [ L ˉ k − L k ∣ F k ] throughout the block. We require d ⋆ > s ⋆ d_\star> s_\star d ⋆ > s ⋆ , so a positive excess remains after accounting for the slack. Let B max > 0 B_{\max} > 0 B m a x > 0 be an upper bound on B k B_k B k , and assume ε : = ( d ⋆ − s ⋆ ) / B max ∈ ( 0 , 1 ] \varepsilon:= (d_\star-s_\star)/B_{\max} \in(0,1] ε := ( d ⋆ − s ⋆ ) / B m a x ∈ ( 0 , 1 ] . Formally, for every k = s , … , s + N − 1 k=s,\ldots,s+N-1 k = s , … , s + N − 1 , we require almost surely
E k ≥ d ⋆ , E [ L ˉ k − L k ∣ F k ] ≤ s ⋆ , B k ≤ B max , W k ≤ 1 , λ r , k a = ε / 2. \begin{aligned}
E_k &\ge d_\star, &\qquad\mathbb{E}[\bar{L}_k-L_k\mid\mathcal{F}_k] &\le s_\star,\\
B_k &\le B_{\max}, & W_k &\le1, & \lambda^a_{r,k} &= \varepsilon/2.
\end{aligned} E k B k ≥ d ⋆ , ≤ B m a x , E [ L ˉ k − L k ∣ F k ] W k ≤ s ⋆ , ≤ 1 , λ r , k a = ε /2.
The standing score assumptions already give W k ≥ − 1 W_k \ge-1 W k ≥ − 1 , so the scores lie in [ − 1 , 1 ] [-1,1] [ − 1 , 1 ] .
Lemma 8 (Detection of a persistent certificate violation). On the F s \mathcal{F}_s F s -measurable event
N ≥ 8 B max 2 ( d ⋆ − s ⋆ ) 2 log 1 δ ρ r , s β , (19) N \ge\frac{8B_{\max}^{2}}{(d_\star-s_\star)^{2}}\log\frac{1}{\delta\rho_{r,s}\beta}, \tag*{(19)} N ≥ ( d ⋆ − s ⋆ ) 2 8 B m a x 2 log δ ρ r , s β 1 , (19) the monitor satisfies P ( τ δ ≤ s + N ∣ F s ) ≥ 1 − β \mathbb{P}(\tau_\delta\le s+N\mid\mathcal{F}_s)\ge1-\beta P ( τ δ ≤ s + N ∣ F s ) ≥ 1 − β almost surely.
Proof of Lemma 8. First, we translate the certificate excess into a lower bound on the conditional score mean. Since B k B_k B k is positive and F k \mathcal{F}_k F k -measurable,
μ k = E k − E [ L ˉ k − L k ∣ F k ] B k ≥ d ⋆ − s ⋆ B k ≥ d ⋆ − s ⋆ B max = ε . \mu_k=\frac{E_k-\mathbb{E}[\bar{L}_k-L_k\mid\mathcal{F}_k]}{B_k}\ge\frac{d_\star-s_\star}{B_k}\ge\frac{d_\star-s_\star}{B_{\max}}=\varepsilon. μ k = B k E k − E [ L ˉ k − L k ∣ F k ] ≥ B k d ⋆ − s ⋆ ≥ B m a x d ⋆ − s ⋆ = ε .
Thus, each score in the block has conditional mean at least ε \varepsilon ε . Write Z k = W k − μ k Z_k=W_k-\mu_k Z k = W k − μ k . Each Z k Z_k Z k has conditional mean zero and conditional range of length at most 2 2 2 , because W k ∈ [ − 1 , 1 ] W_k\in[-1,1] W k ∈ [ − 1 , 1 ] . The conditional Hoeffding bound gives, for every q ≥ 0 q\ge0 q ≥ 0 ,
E [ e − q Z k ∣ F k ] ≤ e q 2 / 2 . \mathbb{E}[e^{-qZ_k}\mid\mathcal{F}_k]\le e^{q^2/2}. E [ e − q Z k ∣ F k ] ≤ e q 2 /2 .
For j = 0 , … , N j=0,\ldots,N j = 0 , … , N , write S j : = ∑ k = s s + j − 1 Z k S_j := \sum_{k=s}^{s+j-1} Z_k S j := ∑ k = s s + j − 1 Z k , with S 0 = 0 S_0=0 S 0 = 0 . Since S j S_j S j is F s + j \mathcal{F}_{s+j} F s + j -measurable, the tower property and the conditional Hoeffding bound give
E [ e − q S j + 1 ∣ F s ] = E [ e − q S j E [ e − q Z s + j ∣ F s + j ] ∣ F s ] ≤ e q 2 / 2 E [ e − q S j ∣ F s ] . \mathbb{E}[e^{-qS_{j+1}}\mid\mathcal{F}_s]
= \mathbb{E}\left[e^{-qS_j}\mathbb{E}[e^{-qZ_{s+j}}\mid\mathcal{F}_{s+j}]\mid\mathcal{F}_s\right]
\le e^{q^2/2}\mathbb{E}[e^{-qS_j}\mid\mathcal{F}_s]. E [ e − q S j + 1 ∣ F s ] = E [ e − q S j E [ e − q Z s + j ∣ F s + j ] ∣ F s ] ≤ e q 2 /2 E [ e − q S j ∣ F s ] .
Applying this inequality successively for j = 0 , … , N − 1 j=0,\ldots,N-1 j = 0 , … , N − 1 , starting from e − q S 0 = 1 e^{-qS_0}=1 e − q S 0 = 1 , yields
E [ e − q S N ∣ F s ] ≤ e N q 2 / 2 . \mathbb{E}[e^{-qS_N}\mid\mathcal{F}_s]\le e^{Nq^2/2}. E [ e − q S N ∣ F s ] ≤ e N q 2 /2 .
For q > 0 q>0 q > 0 , the event S N ≤ − u S_N\le-u S N ≤ − u is equivalent to e − q S N ≥ e q u e^{-qS_N}\ge e^{qu} e − q S N ≥ e q u . Conditional Markov’s inequality therefore gives
P ( S N ≤ − u ∣ F s ) = P ( e − q S N ≥ e q u ∣ F s ) ≤ e − q u E [ e − q S N ∣ F s ] ≤ exp ( − q u + N q 2 / 2 ) . \mathbb{P}(S_N\le-u\mid\mathcal{F}_s)
=\mathbb{P}(e^{-qS_N}\ge e^{qu}\mid\mathcal{F}_s)
\le e^{-qu}\mathbb{E}[e^{-qS_N}\mid\mathcal{F}_s]
\le\exp(-qu+Nq^2/2). P ( S N ≤ − u ∣ F s ) = P ( e − q S N ≥ e q u ∣ F s ) ≤ e − q u E [ e − q S N ∣ F s ] ≤ exp ( − q u + N q 2 /2 ) .
For u > 0 u>0 u > 0 , the exponent is minimised at q = u / N q=u/N q = u / N . Substituting this choice gives
P ( S N ≤ − u ∣ F s ) ≤ exp ( − u 2 2 N ) . \mathbb{P}(S_N\le-u\mid\mathcal{F}_s)\le\exp\left(-\frac{u^2}{2N}\right). P ( S N ≤ − u ∣ F s ) ≤ exp ( − 2 N u 2 ) .
For u = 0 u=0 u = 0 , the same bound holds trivially.
Now choose u = 2 N log ( 1 / β ) u=\sqrt{2N\log(1/\beta)} u = 2 N log ( 1/ β ) , so the right-hand side equals β \beta β . Thus, with conditional probability at least 1 − β 1-\beta 1 − β , S N ≥ − 2 N log ( 1 / β ) S_N\ge-\sqrt{2N\log(1/\beta)} S N ≥ − 2 N log ( 1/ β ) . Since W k = μ k + Z k W_k=\mu_k+Z_k W k = μ k + Z k and μ k ≥ ε \mu_k\ge\varepsilon μ k ≥ ε throughout the block, on this event we have
∑ k = s s + N − 1 W k = ∑ k = s s + N − 1 μ k + S N ≥ N ε − 2 N log ( 1 / β ) . \sum_{k=s}^{s+N-1}W_k
=\sum_{k=s}^{s+N-1}\mu_k+S_N
\ge N\varepsilon-\sqrt{2N\log(1/\beta)}. k = s ∑ s + N − 1 W k = k = s ∑ s + N − 1 μ k + S N ≥ N ε − 2 N log ( 1/ β ) .
We next translate the score bound into growth of the expert’s wealth. Since ρ r , s > 0 \rho_{r,s}>0 ρ r , s > 0 , the account wealth G r , s a G^a_{r,s} G r , s a is positive. During the block, the expert uses the constant stake λ = ε / 2 ≤ 1 / 2 \lambda=\varepsilon/2\le1/2 λ = ε /2 ≤ 1/2 . Each betting factor satisfies 1 + λ W k ≥ 1 / 2 1+\lambda W_k\ge1/2 1 + λ W k ≥ 1/2 , so
G r , s + N a G r , s a = ∏ k = s s + N − 1 ( 1 + λ W k ) > 0. \frac{G^a_{r,s+N}}{G^a_{r,s}}
=\prod_{k=s}^{s+N-1}(1+\lambda W_k)>0. G r , s a G r , s + N a = k = s ∏ s + N − 1 ( 1 + λ W k ) > 0.
Taking logarithms converts this product into a sum. For each score, the inequality log ( 1 + λ w ) ≥ λ w − λ 2 w 2 \log(1+\lambda w)\ge\lambda w-\lambda^2w^2 log ( 1 + λ w ) ≥ λ w − λ 2 w 2 and the bound W k 2 ≤ 1 W_k^2\le1 W k 2 ≤ 1 give
log ( 1 + λ W k ) ≥ λ W k − λ 2 W k 2 ≥ λ W k − λ 2 . \log(1+\lambda W_k)\ge\lambda W_k-\lambda^2W_k^2\ge\lambda W_k-\lambda^2. log ( 1 + λ W k ) ≥ λ W k − λ 2 W k 2 ≥ λ W k − λ 2 .
Summing over the N N N scores therefore yields
log G r , s + N a G r , s a ≥ λ ∑ k = s s + N − 1 W k − N λ 2 . \log\frac{G^a_{r,s+N}}{G^a_{r,s}}
\ge\lambda\sum_{k=s}^{s+N-1}W_k-N\lambda^2. log G r , s a G r , s + N a ≥ λ k = s ∑ s + N − 1 W k − N λ 2 .
On the score event established above, substituting λ = ε / 2 \lambda=\varepsilon/2 λ = ε /2 gives
log G r , s + N a G r , s a ≥ ε 2 ( N ε − 2 N log ( 1 / β ) ) − N ε 2 4 = N ε 2 4 − ε N 2 log ( 1 / β ) . \log\frac{G^a_{r,s+N}}{G^a_{r,s}}
\ge\frac{\varepsilon}{2}\left(N\varepsilon-\sqrt{2N\log(1/\beta)}\right)-\frac{N\varepsilon^2}{4}
=\frac{N\varepsilon^2}{4}-\varepsilon\sqrt{\frac{N}{2}\log(1/\beta)}. log G r , s a G r , s + N a ≥ 2 ε ( N ε − 2 N log ( 1/ β ) ) − 4 N ε 2 = 4 N ε 2 − ε 2 N log ( 1/ β ) .
To simplify the square-root term, apply 2 u v ≤ u + v 2\sqrt{uv} \le u + v 2 uv ≤ u + v with u = N ε 2 / 8 u = N\varepsilon^2/8 u = N ε 2 /8 and v = log ( 1 / β ) v = \log(1/\beta) v = log ( 1/ β ) :
ε N 2 log ( 1 / β ) = 2 N ε 2 8 log ( 1 / β ) ≤ N ε 2 8 + log ( 1 / β ) . \varepsilon\sqrt{\frac{N}{2}\log(1/\beta)} = 2\sqrt{\frac{N\varepsilon^2}{8}\log(1/\beta)} \le\frac{N\varepsilon^2}{8} + \log(1/\beta). ε 2 N log ( 1/ β ) = 2 8 N ε 2 log ( 1/ β ) ≤ 8 N ε 2 + log ( 1/ β ) .
Consequently,
log G r , s + N a G r , s a ≥ N ε 2 8 − log ( 1 / β ) . \log\frac{G^a_{r,s+N}}{G^a_{r,s}} \ge\frac{N\varepsilon^2}{8} - \log(1/\beta). log G r , s a G r , s + N a ≥ 8 N ε 2 − log ( 1/ β ) .
It remains to show that this growth suffices to reach the alarm threshold. Since ε = ( d ⋆ − s ⋆ ) / B max \varepsilon= (d_\star- s_\star)/B_{\max} ε = ( d ⋆ − s ⋆ ) / B m a x , the duration condition (19) implies
N ε 2 8 ≥ log 1 δ ρ r , s β = log 1 δ ρ r , s + log ( 1 / β ) . \frac{N\varepsilon^2}{8} \ge\log\frac{1}{\delta\rho_{r,s}\beta} = \log\frac{1}{\delta\rho_{r,s}} + \log(1/\beta). 8 N ε 2 ≥ log δ ρ r , s β 1 = log δ ρ r , s 1 + log ( 1/ β ) .
Combining the two bounds and exponentiating gives
log G r , s + N a G r , s a ≥ log 1 δ ρ r , s ⟹ G r , s + N a G r , s a ≥ 1 δ ρ r , s . \log\frac{G^a_{r,s+N}}{G^a_{r,s}} \ge\log\frac{1}{\delta\rho_{r,s}} \quad\Longrightarrow\quad\frac{G^a_{r,s+N}}{G^a_{r,s}} \ge\frac{1}{\delta\rho_{r,s}}. log G r , s a G r , s + N a ≥ log δ ρ r , s 1 ⟹ G r , s a G r , s + N a ≥ δ ρ r , s 1 .
The expert starts the block with capital ρ r , s = c r η r , a G r , s a \rho_{r,s} = c_r\eta_{r,a}G^a_{r,s} ρ r , s = c r η r , a G r , s a . Multiplying this capital by its growth factor gives its contribution to the total wealth at s + N s + N s + N . Since the reserve and all other accounts are nonnegative,
M s + N ≥ c r η r , a G r , s + N a = ρ r , s G r , s + N a G r , s a ≥ ρ r , s 1 δ ρ r , s = 1 δ . M_{s+N} \ge c_r\eta_{r,a}G^a_{r,s+N} = \rho_{r,s}\frac{G^a_{r,s+N}}{G^a_{r,s}} \ge\rho_{r,s}\frac{1}{\delta\rho_{r,s}} = \frac{1}{\delta}. M s + N ≥ c r η r , a G r , s + N a = ρ r , s G r , s a G r , s + N a ≥ ρ r , s δ ρ r , s 1 = δ 1 .
Thus, the monitor has raised an alarm by index s + N s + N s + N .
The score event has conditional probability at least 1 − β 1-\beta 1 − β given F s \mathcal{F}_s F s , and the duration condition is F s \mathcal{F}_s F s -measurable. Hence, on that condition,
P ( τ δ ≤ s + N ∣ F s ) ≥ 1 − β almost surely . \mathbb{P}(\tau_\delta\le s + N \mid\mathcal{F}_s) \ge1-\beta\qquad\text{almost surely}. P ( τ δ ≤ s + N ∣ F s ) ≥ 1 − β almost surely .
The sufficient duration increases quadratically as the observable excess d ⋆ − s ⋆ d_\star- s_\star d ⋆ − s ⋆ decreases, and logarithmically as the expert’s capital at the start of the block decreases. For an expert launched at s s s , this capital is ρ s , s = c s η s , a \rho_{s,s} = c_s\eta_{s,a} ρ s , s = c s η s , a . For an expert launched earlier, ρ r , s \rho_{r,s} ρ r , s also accounts for its previous gains and losses. A conservative drift bound can conceal a violation if its expected slack is as large as the excess. With observation gap h h h , the N N N scores span physical time h N hN h N . The upper score bound is used only for this detection result; false-alarm control still requires only W k ≥ − 1 W_k \ge-1 W k ≥ − 1 .
Implementation
Algorithm 1 implements the monitor using a shared history of the most recent m m m completed scores and their starting states. Before each new observation, it chooses the funding amount, computes the loss bound, and uses the retained history to choose the experts’ stakes. Upon observing the next state, it computes the score, updates the accounts, and checks whether the total wealth reaches 1 / δ 1/\delta 1/ δ . The completed score is then added to the history.
Algorithm 1 Monitor with combined expert accounts
Require: Certificate f f f , allowed drift l l l , spacing h h h , level δ \delta δ , history size m m m ; valid score-bound routines; a fixed set A \mathcal{A} A of K K K experts and weights η a \eta_a η a ; predictable funding rule 0 ≤ c n ≤ R n 0 \le c_n \le R_n 0 ≤ c n ≤ R n .
Observe X t 0 X_{t_0} X t 0 ; initialise R 0 ← 1 R_0 \leftarrow1 R 0 ← 1 , A 0 a ← 0 A_0^a \leftarrow0 A 0 a ← 0 for every a ∈ A a \in\mathcal{A} a ∈ A , and empty history.
for n = 0 , 1 , … n = 0,1,\ldots n = 0 , 1 , … while observations continue do
Choose c n c_n c n and compute B n B_n B n using information available at t n t_n t n .
Compute prediction weights from the retained history using (4) .
If X t n ∈ S X_{t_n} \in\mathcal{S} X t n ∈ S choose each expert’s stake λ n a \lambda_n^a λ n a using (6) , or (5) , otherwise λ n a = 0 \lambda_n^a = 0 λ n a = 0 .
Observe X t n + 1 X_{t_{n+1}} X t n + 1 and compute L ‾ n \overline{L}_n L n and W n W_n W n .
Update the combined accounts and reserve using (20) .
if R n + 1 + ∑ a ∈ A A n + 1 a ≥ 1 / δ R_{n+1} + \sum_{a\in\mathcal{A}} A_{n+1}^a \ge1/\delta R n + 1 + ∑ a ∈ A A n + 1 a ≥ 1/ δ then
return alarm at index n + 1 n+1 n + 1 .
end if
Append ( t n , X t n , W n ) (t_n,X_{t_n},W_n) ( t n , X t n , W n ) to the history and retain its most recent m m m entries.
end for
Combining accounts. Repeated funding need not require storing a separate account for every starting index. Suppose that every mixture uses the same finite set of experts A s = A \mathcal{A}_s = \mathcal{A} A s = A , with ∣ A ∣ = K |\mathcal{A}| = K ∣ A ∣ = K , and the same nonnegative weights η s , a = η a \eta_{s,a} = \eta_a η s , a = η a satisfying ∑ a ∈ A η a = 1 \sum_{a\in\mathcal{A}}\eta_a = 1 ∑ a ∈ A η a = 1 . Each expert keeps its kernels, scales, and stake strategy fixed and uses the shared retained history. For the moment and log-return strategies above, its stake therefore does not depend on the starting index:
λ s , n a = λ n a for every s ≤ n . \lambda_{s,n}^a = \lambda_n^a \qquad\text{for every } s \le n. λ s , n a = λ n a for every s ≤ n .
The accounts of expert a a a may hold different amounts of capital, but the next score multiplies each of them by the same factor 1 + λ n a W n 1+\lambda_n^aW_n 1 + λ n a W n . We can therefore store their combined capital:
A n a : = ∑ s = 0 n − 1 c s η a G s , n a , R n : = 1 − C n , A_n^a := \sum_{s=0}^{n-1} c_s\eta_aG_{s,n}^a,\qquad R_n := 1-C_n, A n a := s = 0 ∑ n − 1 c s η a G s , n a , R n := 1 − C n ,
where R n R_n R n is the remaining reserve. Funding at index n n n adds c n η a c_n\eta_a c n η a to the combined account of expert a a a and removes c n c_n c n from the reserve. Applying the common betting factor gives
A n + 1 a = ( A n a + c n η a ) ( 1 + λ n a W n ) , R n + 1 = R n − c n , (20) A_{n+1}^a = (A_n^a+c_n\eta_a)(1+\lambda_n^aW_n),\qquad R_{n+1}=R_n-c_n, \tag*{(20)} A n + 1 a = ( A n a + c n η a ) ( 1 + λ n a W n ) , R n + 1 = R n − c n , (20)
with A 0 a = 0 A_0^a=0 A 0 a = 0 , R 0 = 1 R_0=1 R 0 = 1 , and total wealth M n = R n + ∑ a ∈ A A n a M_n=R_n+\sum_{a\in\mathcal{A}}A_n^a M n = R n + ∑ a ∈ A A n a . Multiplication distributes over the individual account balances, so this update gives exactly the same total wealth and alarm time as maintaining those accounts separately. The optimisation requires the combined accounts to use identical stakes. Accounts whose scales or prediction histories depend on their starting indices must generally remain separate.
The history stores each score with its starting state because spatial prediction compares the states from which the corresponding transitions began. Removing an old observation from the history affects future stake choices but leaves accumulated wealth unchanged. If observations end upon reaching a target or another observed termination condition, the monitor processes the final completed interval before stopping.
Computational cost. For states in R d \mathbb{R}^d R d , the retained history requires O ( m d ) O(md) O ( m d ) storage and the combined accounts require O ( K ) O(K) O ( K ) . Processing prediction weights one expert at a time therefore gives total storage O ( m d + K ) O(md+K) O ( m d + K ) for the betting implementation. At each observation, distances to the retained states can be computed once and shared across experts, costing O ( m d ) O(md) O ( m d ) . Each moment strategy then computes two weighted sums in O ( m ) O(m) O ( m ) time, giving O ( m d + K m ) O(md+Km) O ( m d + K m ) work per observation. For log-return stakes, each derivative evaluation scans the retained history. Using J J J bisection iterations therefore gives O ( m d + K m J ) O(md+KmJ) O ( m d + K m J ) work. Finite bisection approximates the maximiser, but any returned stake in [ 0 , λ ] [0,\lambda] [ 0 , λ ] preserves false-alarm control. These bounds exclude the resources required by the certificate, score-bound, and funding routines.
Recursive updates for unlimited history. For uniform or purely temporal geometric weights, an expert using the moment strategy can use the entire history without storing individual observations. Since its temporal scale is fixed across launches, write r T a : = r T , s a r_{\mathrm{T}}^{a}:=r_{\mathrm{T},s}^{a} r T a := r T , s a , independently of s s s . For the geometric kernel k ( u ) = 2 − u k(u)=2^{-u} k ( u ) = 2 − u , set γ a = 2 − h / r T a \gamma^{a}=2^{-h/r_{\mathrm{T}}^{a}} γ a = 2 − h / r T a ; for uniform weighting, set γ a = 1 \gamma^{a}=1 γ a = 1 . The geometric weights are 2 − ( t n − t i ) / r T a = ( γ a ) n − i 2^{-(t_n-t_i)/r_{\mathrm{T}}^{a}}=(\gamma^{a})^{n-i} 2 − ( t n − t i ) / r T a = ( γ a ) n − i . Rescaling them to ( γ a ) n − 1 − i (\gamma^{a})^{n-1-i} ( γ a ) n − 1 − i leaves the moment stake unchanged, since the common factor cancels in the ratio of weighted sums. Starting from S 0 a = U 0 a = H 0 a = 0 S_0^{a}=U_0^{a}=H_0^{a}=0 S 0 a = U 0 a = H 0 a = 0 , we maintain the resulting sums through
S n + 1 a = γ a S n a + W n , U n + 1 a = γ a U n a + W n 2 , H n + 1 a = γ a H n a + 1. S_{n+1}^{a}=\gamma^{a}S_n^{a}+W_n,\qquad U_{n+1}^{a}=\gamma^{a}U_n^{a}+W_n^2,\qquad H_{n+1}^{a}=\gamma^{a}H_n^{a}+1. S n + 1 a = γ a S n a + W n , U n + 1 a = γ a U n a + W n 2 , H n + 1 a = γ a H n a + 1.
For n ≥ 1 n\ge1 n ≥ 1 , the weighted mean and second moment are S n a / H n a S_n^{a}/H_n^{a} S n a / H n a and U n a / H n a U_n^{a}/H_n^{a} U n a / H n a . The moment stake uses S n a S_n^{a} S n a and U n a U_n^{a} U n a directly, so maintaining H n a H_n^{a} H n a is optional. When γ a = 1 \gamma^{a}=1 γ a = 1 , these recursions give the ordinary sums and H n a = n H_n^{a}=n H n a = n ; when γ a < 1 \gamma^{a}<1 γ a < 1 , each update discounts earlier observations. For K K K such experts, maintaining these sums requires O ( K ) O(K) O ( K ) work per observation and O ( K ) O(K) O ( K ) storage, independently of the history length. This optimisation does not generally extend to spatial weights, which change with the current state, or to exact log-return optimisation, whose objective cannot be recovered from these sums alone.
Experimental setup
Prediction, stakes and funding. Uniform prediction (U) assigns equal weight to all retained scores. Temporal prediction (T) favours recent scores, while spatial prediction (S) favours scores whose starting states are close to the current state. Temporal and spatial prediction use the linear kernel k ( u ) = ( 1 − u ) + k(u)=(1-u)_+ k ( u ) = ( 1 − u ) + with fixed scales.
For the synthetic benchmarks, we retain 16384 observations. We use five scales, labelled XS–XL, calibrated to reference effective sample sizes 32, 128, 512, 2048, 8192, where
ESS ( w ) = ( ∑ i w i ) 2 ∑ i w i 2 . \operatorname{ESS}(w)=\frac{\left(\sum_i w_i\right)^2}{\sum_i w_i^2}. ESS ( w ) = ∑ i w i 2 ( ∑ i w i ) 2 .
The temporal cutoffs are approximately 43.166, 171.167, 683.167, 2731.167 and 10923.167 observations. We evaluate the individual scales, an equal mixture, a centred mixture with weights (0.1, 0.2, 0.4, 0.2, 0.1), and five equal mixtures that each omit one scale. For the control and neural benchmarks, we use U-L, T-L and S-L with a history of 8192 observations. T-L equally mixes temporal cutoffs 64, 128, 512, 2048, 8192, while S-L equally mixes spatial radii 0.00625, 0.025, 0.1, 0.4, 1.6. Log-return optimisation uses endpoint checks followed, when necessary, by 32 bisection steps. We launch accounts every 256 observations. Launch j ≥ 0 j\ge0 j ≥ 0 receives 6 / [ π 2 ( j + 1 ) 2 ] 6/[\pi^2(j+1)^2] 6/ [ π 2 ( j + 1 ) 2 ] of the initial capital in the synthetic benchmarks and 1 / [ ( j + 1 ) ( j + 2 ) ] 1/[(j+1)(j+2)] 1/ [( j + 1 ) ( j + 2 )] in the control and neural benchmarks.
Synthetic benchmarks
The synthetic benchmarks isolate different sources of detection difficulty (Figure 1 –Figure 4 ). We consider six families of processes.
Figure 1. Detection rates for the synthetic benchmarks, with 21 settings, 50 monitors and 50 paired runs per setting. Cells show the percentage of runs with an eligible first alarm; reference rows count any first alarm. The panels separate moment (M) and log-return (L) stakes. U uses uniform prediction, while T and S use temporal and spatial prediction. XS–XL denote individual scales; Eq is their equal mixture; Ctr uses weights (0.1, 0.2, 0.4, 0.2, 0.1). A minus label indicates that the corresponding scale is omitted from an otherwise equal mixture. All monitors use wealth threshold 20. The panels share a colour scale from 0 to 100%. NA denotes incomplete data.
Figure 4. Differences in synthetic median detection delays, computed as Q 0.5 M − Q 0.5 L Q^{M}_{0.5}-Q^{L}_{0.5} Q 0.5 M − Q 0.5 L in observations. Positive green values indicate earlier detection with log-return stakes when both strategies reach 25 eligible first alarms among all 50 runs. L only and M only indicate that only the named strategy reaches this fraction; NR means neither does. Reference delays are undefined (Ref.), and NA denotes incomplete data. No artificial delays are assigned to non-numeric cells. The comparisons use the same prediction rules and paths, with the respective stake caps of each strategy.
Temporal: The scalar process starts at X 0 = 32769 X_0=32769 X 0 = 32769 and follows
X n + 1 = X n − 0.001 + g n + ξ n , ξ n ∼ i . i . d . Unif [ − 0.6 , 0.6 ] . X_{n+1}=X_n-0.001+g_n+\xi_n,\qquad\xi_n\mathrel{\overset{\mathrm{i.i.d.}}{\sim}}\operatorname{Unif}[-0.6,0.6]. X n + 1 = X n − 0.001 + g n + ξ n , ξ n ∼ i.i.d. Unif [ − 0.6 , 0.6 ] .
With certificate f ( x ) = x f(x)=x f ( x ) = x and allowance − 0.001 -0.001 − 0.001 , the conditional expected corrected increment is E [ D n ∣ F n ] = g n E[D_n \mid\mathcal{F}_n]=g_n E [ D n ∣ F n ] = g n . Persistent violations use g n ∈ { 0.01 , 0.02 , 0.05 } g_n \in\{0.01,0.02,0.05\} g n ∈ { 0.01 , 0.02 , 0.05 } throughout. Delayed violations use g n = − 0.02 g_n=-0.02 g n = − 0.02 until onset 2048, 4096 or 8192, followed by g n = 0.05 g_n=0.05 g n = 0.05 . Temporary violations use g n = 0.05 g_n=0.05 g n = 0.05 for 256, 1024 or 4096 observations from onset 8192, and g n = − 0.02 g_n=-0.02 g n = − 0.02 otherwise. Each run lasts 32768 observations.
Spatial: The first cyclic system follows a deterministic circular path with directly prescribed scores. It does not use a controller–certificate pair, and its conditional score mean jumps at the sector boundaries, so it is not globally Lipschitz. Each period starts with 64 observations of mean 0.10 in a fixed sector, followed by observations of mean − 0.02 -0.02 − 0.02 . Independent symmetric score noise has amplitude 0.3. We use periods P ∈ { 512 , 2048 , 4096 } P \in\{512,2048,4096\} P ∈ { 512 , 2048 , 4096 } and horizons 8 P 8P 8 P . Each run therefore contains exactly 512 positive-mean observations; increasing P P P lengthens the gaps between visits.
The second system is a stochastic ring with noise in both radial position and angular speed. The certificate is the squared radial error, and the allowance is its exact nominal expected increment. The radial contraction is 0.2, radial noise is uniform on [ − 0.01 , 0.01 ] [-0.01,0.01] [ − 0.01 , 0.01 ] , and angular speed has independent uniform modulation of ± 20 % \pm20\% ± 20% . A triangular angular envelope with half-width 0.2 reduces the radial feedback by up to 75%. We use the same periods and horizons, with a nominal sector visit of 256 observations. Stochastic return times make the number of observations under disturbance vary across runs.
Hill: We use the robot from the running example. It starts at X 0 = 10 X_0=10 X 0 = 10 and stops upon reaching [ 0 , 1 ] [0,1] [ 0 , 1 ] . Before stopping,
X n + 1 = X n − 0.01 + 0.02 Z n , Z n ∣ G n ∼ Bernoulli ( 1 / 4 + a ( 1 − ∣ X n − 5 ∣ / 2 ) + ) . X_{n+1}=X_n-0.01+0.02Z_n,\qquad Z_n\mid\mathcal{G}_n\sim\operatorname{Bernoulli}\left(1/4+a(1-\lvert X_n-5\rvert/2)_+\right). X n + 1 = X n − 0.01 + 0.02 Z n , Z n ∣ G n ∼ Bernoulli ( 1/4 + a ( 1 − ∣ X n − 5 ∣ /2 ) + ) .
With certificate f ( x ) = x f(x)=x f ( x ) = x , allowance − 0.005 -0.005 − 0.005 and loss bound 0.02, the conditional expected score is a ( 1 − ∣ X n − 5 ∣ / 2 ) + a(1-\lvert X_n-5\rvert/2)_+ a ( 1 − ∣ X n − 5 ∣ /2 ) + . Amplitudes a ∈ { 0.0625 , 0.125 , 0.25 } a \in\{0.0625,0.125,0.25\} a ∈ { 0.0625 , 0.125 , 0.25 } reduce expected progress at the hill centre by one quarter, one half or entirely. Stronger disturbances also keep the robot on the hill for longer.
For the cyclic systems, increasing the period changes the horizon, the observations available in the retained history and the number of funding opportunities, even though positive exposure is fixed for direct recurrence. Including the scalar, ring and hill references gives 21 settings. Direct recurrence has no separate saved reference. The six example trajectories use seed 970000003 and settings with weak violations, late onset, short duration or long gaps between visits. These figures illustrate individual runs; the heatmaps summarise all seeds.
Control benchmarks
Building and Two Tanks adapt benchmarks from PRoTECT [35 ] . The stochastic double-integrator LQR uses a standard quadratic value function (?). Each system has one reference setting and two disturbances, each evaluated at three strengths, giving 21 settings in total. All disturbances act from the start of the run. The certificates and allowances remain fixed.
Building: We reduce heating effectiveness by 8%, 10% or 12%, or make the controller underestimate the temperature by 1, 2 or 3 degrees. In the latter case, the monitor observes the true temperature.
Tanks: We add inlet flow of amplitude 0.2, 0.3 or 0.4, which fades as the downstream level rises from 2.15 to 2.25. Alternatively, we add independent inlet bursts of size 0.5 with probability 0.35, 0.40 or 0.45 per step.
Building and Tanks use bounded triangular noise with the same means and variances as their source models. Their newly synthesised sum-of-squares certificates have degrees two and four, respectively. Independent checks using exact arithmetic validate the nominal allowances 0.04 and 0.07 under these noise distributions. Initial states are uniform on [ 19.5 , 20 ] [19.5,20] [ 19.5 , 20 ] for Building and on [ 4.45 , 4.55 ] × [ 1.45 , 1.55 ] [4.45,4.55]\times[1.45,1.55] [ 4.45 , 4.55 ] × [ 1.45 , 1.55 ] for Tanks.
LQR: The initial state lies in [ 1 , 2 ] × [ − 0.1 , 0.1 ] [1,2] \times[-0.1,0.1] [ 1 , 2 ] × [ − 0.1 , 0.1 ] . The nominal acceleration diffusion is 0.1. We sample every 0.1 time units using the exact Gaussian transition and use the exact nominal sampled certificate increment as the allowance. Disturbances either reduce feedback by 5%, 10% or 20%, or multiply the noise amplitude by 1.05, 1.10 or 1.20.
All control runs have a limit of 32768 observations. Building and Tanks also stop upon entering an unsafe set or leaving the domain; LQR stops upon leaving [ − 10 , 10 ] 2 [-10,10]^2 [ − 10 , 10 ] 2 . We compute conditional moments exactly along each recorded trajectory. These determine the fraction of runs encountering a violation and the expected-score summaries (Figure 12 –Figure 14 ).
Figure 12. First-alarm percentages for Building, Two Tanks and LQR. Each system has a reference setting and two disturbances, each evaluated at three strengths. U-L, T-L and S-L use uniform, temporal and spatial prediction with log-return stakes and wealth threshold 20. Every cell uses all 50 paired runs. The Viol. column gives the percentage of trajectories encountering at least one positive conditional excess, computed from exact model moments with tolerance 10 − 12 10^{-12} 1 0 − 12 in raw units. This differs from both the alarm rate and the fraction of observations with positive conditional excess. Reference alarms measure false alarms under the validated nominal conditions.
Figure 14. Normalised expected-score summaries for the control benchmarks, computed from exact conditional moments along each recorded path. Cells give medians of 50 equally weighted per-run summaries: the fraction of positive-mean observations, the signed mean, the mean over positive-mean observations, and the mean positive part. The last quantity includes all observations in its denominator. A negative signed mean can therefore coexist with local violations. Positivity requires a raw conditional excess above 10 − 12 10^{-12} 1 0 − 12 . Reference and disturbed runs use their full paths, including observations after alarms. A hatched dash marks an undefined mean over positive observations; NA denotes incomplete data. Column colour scales match Figure 11 .
Figure 11. Normalised expected-score summaries for the synthetic benchmarks. Each cell is the median of 50 quantities computed separately for each run: the fraction of observations with μ n > 0 \mu_n > 0 μ n > 0 , the signed mean of μ n \mu_n μ n , its mean over positive-mean observations, and the mean of ( μ n ) + (\mu_n)_+ ( μ n ) + over all observations. Summaries start at onset or first entry and include recovery and later excursions. References use the full path. Each run receives equal weight. A hatched dash marks an undefined mean over positive observations; NA denotes incomplete data. Column colour scales match the control heatmap, with the signed scale centred at zero.
Neural controller–certificate pairs
We retain 16 original controller–certificate pairs from LogRASM: four CollisionAvoidance pairs, six Linear layout-0 pairs, two Linear layout-1 pairs, two Pendulum pairs and two Triple-integrator pairs. The controller and certificate parameters remain fixed. We consider three disturbance magnitudes per setting. Initial states are sampled from fixed pools away from the target, unsafe sets and domain boundaries, with at least 20% headroom below the certificate threshold. Starts are shared across disturbance strengths and pairs within the same layout.
To obtain longer trajectories, we multiply the source drift increments by 1 / 20 1/20 1/20 and the direct plant-noise amplitudes by 1 / 20 1/\sqrt{20} 1/ 20 . The baseline controller effectiveness is 0.1 for CollisionAvoidance, 0.5 and 0.25 for the two Linear layouts, 1 and 0.5 for the ordinary and logarithmic Pendulum pairs, and 1 for Triple integrator.
For CollisionAvoidance, we add terrain-dependent slips with peak probabilities 0.25, 0.35 and 0.50. For the Linear systems, we add fluctuating sensor offsets with amplitudes 0.30, 0.35 and 0.40. For Pendulum, random torque pushes the system away from the upright position, with amplitudes 0.075, 0.10 and 0.125. For Triple integrator, we add a positive actuator bias with amplitudes 0.06, 0.08 and 0.10. Paths stop upon reaching the target, entering an unsafe set, leaving the domain, reaching the certificate threshold or completing 20480 observations.
Let C = 1 / ( 1 − ρ ) C = 1/(1-\rho) C = 1/ ( 1 − ρ ) . For an ordinary certificate output V V V , we use f ( x ) = min { V ( x ) , C } f(x) = \min\{V(x), C\} f ( x ) = min { V ( x ) , C } . For a logarithmic output L L L , we use f ( x ) = exp ( min { L ( x ) , log C } ) f(x) = \exp(\min\{L(x), \log C\}) f ( x ) = exp ( min { L ( x ) , log C }) . We evaluate each recorded path under three decrease requirements, ϵ ∈ { 0 , 0.0005 , 0.001 } \epsilon\in\{0, 0.0005, 0.001\} ϵ ∈ { 0 , 0.0005 , 0.001 } . The allowance is − ϵ -\epsilon − ϵ for ordinary certificates and ( e − ϵ − 1 ) f ( x ) (e^{-\epsilon}-1)f(x) ( e − ϵ − 1 ) f ( x ) for exponentiated logarithmic certificates. Thus, ϵ = 0 \epsilon= 0 ϵ = 0 tests expected nonincrease; positive values require additive or multiplicative decrease, respectively. All three conditions use the same predictable loss bound and the same physical trajectories (Figure 15 and Figure 16 ).
Figure 15. First-alarm percentages for the neural benchmarks. Each of the 16 original controller–certificate pairs has a reference setting and three disturbance strengths. Each row uses 50 trajectories shared by U-L, T-L and S-L and by the conditions ϵ = 0 \epsilon= 0 ϵ = 0 , 0.0005 0.0005 0.0005 , 0.001 0.001 0.001 . The allowance is − ϵ -\epsilon − ϵ for ordinary certificates and ( e − ϵ − 1 ) f ( x ) (e^{-\epsilon}-1)f(x) ( e − ϵ − 1 ) f ( x ) for exponentiated logarithmic certificates. All monitors use wealth threshold 20. Question marks in Viol. indicate that the conditional mean estimates at selected states do not determine the exact fraction of runs encountering a violation. All three conditions remain unverified under the adapted dynamics, including in the reference settings. Reference alarms therefore do not measure false-alarm rates under a verified null.
Figure 16. The 50% detection delays for the neural pairs, disturbances and conditions in Figure 15 , measured in observations from the start of each run. Each finite entry requires 25 first alarms among all 50 paired paths. Short paths and nondetections remain in the denominator. NR means this fraction was not reached, and NA denotes incomplete data. Paths end at the target, an unsafe set, domain exit, certificate threshold or 20480 observations. Detection therefore depends on both the evidence available and the length of the trajectory. All condition blocks share a colour scale. The different conditions change the allowance on the same physical trajectories.
Synthetic
Figure 2. The 50% detection delays for the synthetic monitors in Figure 1 . Each value is the first delay by which 25 of all 50 runs have eligible first alarms, measured in observations since the declared onset or first entry into the region with positive conditional mean. Nondetections, short paths and early first alarms remain in the denominator. A later crossing does not replace an early first alarm. NR denotes a median that was not reached, NA incomplete data, and a dash an undefined reference delay. Both panels use the same colour scale.
Figure 3. Differences in synthetic detection rates between log-return and moment stakes, computed as L−M in percentage points. Each comparison uses the same prediction rule and the same 50 paths. Positive green cells indicate more alarms with log-return stakes; negative cells indicate more alarms with moment stakes. For reference rows, more alarms mean a higher false-alarm rate. Column labels follow Figure 1 . The comparison includes the different stake caps, 0.99 for L and 0.5 for M. These differences are descriptive; no significance test is applied.
Figure 6. Delayed violation with onset 8192 and seed 970000003. The conditional mean of the corrected increment changes from −0.02 to 0.05 and remains positive. From top to bottom: the state; mean increase 0.07; the expected certificate increment, changing from −0.021 to 0.049, and allowance −0.001; and logarithmic monitor wealth. Temporal prediction reduces the influence of observations collected before onset as new scores arrive. U, T-equal and S-equal are shown with both M M M and L L L stakes, as in Figure 5 . The wealth threshold is 20. Neither the history nor wealth is reset at onset.
Figure 5. Persistent violation with g = 0.01 g = 0.01 g = 0.01 and seed 970000003. From top to bottom: the scalar state; mean increase g g g ; the exact expected certificate increment g − 0.001 = 0.009 g - 0.001 = 0.009 g − 0.001 = 0.009 and allowance − 0.001 -0.001 − 0.001 ; and monitor wealth on a logarithmic scale. Uniform noise on [ − 0.6 , 0.6 ] [-0.6, 0.6] [ − 0.6 , 0.6 ] makes individual increments noisy despite the positive conditional mean of the corrected increment. U uses uniform prediction, while T-equal and S-equal mix the five XS–XL experts equally. M M M and L L L denote moment and log-return stakes. The dotted line marks wealth threshold 20. All 32768 observations are shown, including those after alarms.
Figure 7. Temporary violation lasting 256 observations from onset 8192, with seed 970000003. The conditional mean of the corrected increment is 0.05 during the disturbance and −0.02 before and after it. From top to bottom: the state; temporary mean increase 0.07; the expected certificate increment and allowance −0.001; and logarithmic wealth for U U U and the equal T / S T/S T / S mixtures with M M M and L L L stakes. None of the six displayed monitors reaches the dotted threshold 20. The path is shown through observation 32768, including recovery. The aggregate detection summaries also count eligible first alarms occurring after recovery.
Figure 8. Direct recurrence with period P = 4096 P = 4096 P = 4096 and seed 970000003. Each of eight visits to a fixed circular sector contains 64 observations with score mean 0.10. Between visits, the mean is −0.02. Independent symmetric score noise has amplitude 0.3. From top to bottom: the two state coordinates; local mean increase 0.12; the prescribed conditional score mean relative to zero; and logarithmic wealth for U and the equal T/S mixtures with M and L stakes. The 32768 observations include exactly 512 with positive conditional mean. Spatial prediction can reuse observations from earlier visits despite the long gaps between them. The dotted line marks wealth threshold 20.
Figure 9. Stochastic ring with nominal period P = 4096 P = 4096 P = 4096 and seed 970000003. From top to bottom: radial error relative to the unit circle; the state-dependent reduction in restoring feedback, reaching 0.75 in the affected sector; the exact expected certificate increment minus its nominal allowance; and logarithmic monitor wealth. The certificate is the squared radial error. Radial and angular noise make return times and violation exposure vary across runs. U and the equal T/S mixtures are shown with M and L stakes. The dotted line marks wealth threshold 20. The expected-increment condition can be violated even while the process remains close to the circle. All observations are retained, including those after alarms.
Figure 10. Hill disturbance with amplitude a = 0.0625 a = 0.0625 a = 0.0625 and seed 970000003. From top to bottom: distance to the target [ 0 , 1 ] [0, 1] [ 0 , 1 ] , with the hill region ( 3 , 7 ) (3, 7) ( 3 , 7 ) shaded; additional slip probability a ( 1 − ∣ x − 5 ∣ / 2 ) + a(1 - \lvert x - 5\rvert/2)^{+} a ( 1 − ∣ x − 5 ∣ /2 ) + ; the exact expected certificate increment and required allowance − 0.005 -0.005 − 0.005 ; and logarithmic wealth for U and the equal T/S mixtures with M and L stakes. At x = 5 x = 5 x = 5 , the expected increment is − 0.00375 -0.00375 − 0.00375 , a 25% reduction in progress. The robot therefore still approaches the target in expectation while violating the required rate of decrease. The dotted line marks wealth threshold 20. The run ends when the robot reaches the target, not when a monitor raises an alarm.
Control
Figure 13. The 50% detection delays for the control settings and log-return monitors in Figure 12 . Disturbances act from the start, so each entry is the number of observations until 25 of all 50 runs have raised their first alarm. NR means this fraction was not reached, and NA denotes incomplete data. Nondetections remain in the denominator. Reference delays also start at the beginning of the run and concern false alarms. LQR observations are spaced by 0.1 physical time units; all entries are reported in observations.
Neural