MEKAWIRE
ExpertarXiv

Dynamic Watermarking and Action-Conditioned Latent Dynamics for Secure Vision-Based Controllers

Aditya Parameshwaran, Navid Aftabi, Abhishek Hanchate, Satish T. S. Bukkapatnam, Dan Li, Yue Wang
From the abstract

Replay attacks are difficult to detect in vision-based control systems because previously recorded observations can remain plausible while the physical system follows a different trajectory. This paper develops an adaptive dynamic-watermarking framework for detecting replay attacks against vision-based controllers.

From the abstract. Our summary is in progress.

Full paper

Dynamic Watermarking and Action-Conditioned Latent Dynamics for Secure Vision-Based Controllers

Aditya Parameshwaran, Navid Aftabi, Abhishek Hanchate, Satish T. S. Bukkapatnam, Dan Li, Yue Wang

Published under CC BY 4.0. Reproduced with attribution; original at arXiv:2611.07403 (PDF).

Dynamic Watermarking and Action-Conditioned Latent Dynamics for Secure Vision-Based Controllers

arXiv:2611.07403v1 [cs.RO] 5 Nov 2026

Aditya Parameshwaran1, Navid Aftabi2, Abhishek Hanchate3, Satish T. S. Bukkapatnam3, Dan Li 2 and Yue Wang1∗ Abstract— Replay attacks are difficult to detect in visionbased control systems because previously recorded observations can remain plausible while the physical system follows a different trajectory. This paper develops an adaptive dynamicwatermarking framework for detecting replay attacks against vision-based controllers. A private Gaussian watermark is added to the nominal control input, and a control inputconditioned latent dynamics network (LDN) predicts the corresponding evolution in a compact latent space learned from image observations. Attack evidence is obtained from the discrepancy between the predicted latent response and the latent representation of the received image observation. A reinforcement learning policy adjusts the watermark covariance using the latent state and detector confidence, thereby balancing attack detectability, watermark energy, and control distortion. A Lagrangian penalty on task-specific safety costs is included during training to limit the adverse effect of the excitation. The framework is evaluated on a vision-guided UR5 manipulation task in which the robot reaches a target while avoiding a moving human arm under nominal and replay-attacked observations.

I. INTRODUCTION

Vision-based neural controllers are powerful in cluttered, human-robot settings, but their sensing channel is vulnerable to replay attacks: an adversary can replace the current image stream with previously recorded observations that remain visually plausible. In safety-critical tasks, such attacks can conceal a physical deviation while the robot continues to act on stale visual feedback. Dynamic watermarking (DWM) addresses this by injecting a private excitation into the control input and checking whether the current measurements contain the corresponding response [1], [2]. Existing methods typically form this consistency check from known state-space dynamics and low-dimensional measurements [3], [4]. That assumption does not directly apply to a black-box neural controller where the observations can be high-dimensional images with unknown dynamics. We address this gap with a control input-conditioned latent dynamics network (LDN) that predicts the evolution of image representations in a compact visual latent space, enabling watermark-response residuals to be formed without requiring an explicit analytical model of the image dynamics [5], [6]. ∗ Corresponding Author

1 Department

Clemson, SC

of Mechanical Engineering, Clemson University, 29634, USA. [email protected],

[email protected]

2 Department

of

Washington,

of Industrial and Systems Engineering, University Seattle, WA 98195 USA [email protected];

[email protected]

3 Wm Michael Barnes ’64 Department of Industrial and Systems

Engineering, Texas A&M University, College Station, TX 77843 USA

[email protected]; [email protected]

We condition the LDN on a privately watermarked control input and compare its predicted latent response with the latent representation of the received observation. The resulting latent space residual provides replay evidence, while a learned DWM policy adapts the watermark covariance to balance detectability, actuation effort, and task performance. The framework thereby combines latent dynamics prediction, adaptive watermarking, and supervisory fallback in a single vision-based replay-defense architecture as seen in Figure 1. Our contributions are summarized as follows: 1) We detect replay attacks by verifying a private DWM signal through predictions from a control inputconditioned LDN. 2) We characterize how replay-induced watermark mismatch alters the MCUSUM detector statistic and develop a Bayesian belief update that quantifies online detection confidence and serves as a compact input to the DWM policy. 3) We train the DWM policy with a Lagrangian penalty on robot–human separation violations and evaluate supervisory stopping under replay. We demonstrate the framework in a simulated human-robot task where misleading visual feedback can lead to unsafe motion.

II. RELATED WORK

A. Replay Attacks and Dynamic Watermarking

Replay attacks are particularly challenging because prerecorded measurements can remain plausible after the physical system has diverged, concealing unsafe behavior. Similar threats arise in visual verification systems, where replayed images can mislead face age verification [7], and detection methods combine spatial and temporal features to identify video replay attacks [8]. Dynamic watermarking (DWM) helps detect replay attacks by injecting a private random excitation and checking whether the measurements reflect the system’s response to the current control input [1]. Prerecorded measurements that remain plausible will fail this response test and thus reveal the attack’s occurrence. This principle was then formalized with innovation-based detector statistics for linear time-invariant and time-varying systems [2], [3], and later extended to sequential detection rules that balance information gain and control cost [4]. These methods provide the theoretical foundation for replay detection, but their residuals are generally derived from explicit plant and observation models with low-dimensional measurements. For a black-box neural controller operating

Fig. 1. Overview of the proposed framework. (a) The live observation xt−H is provided to the vision-based controller policy F, which predicts the control input ut−H . In parallel, an encoder maps xt−H to the latent state zt−H . The latent state, together with the detector confidence cj, is provided to the DWM policy to select the covariance Σt−H, from which the private watermark ϕt−H is sampled. The watermark and control input are combined to form the watermarked control input ūt−H, which is applied to the plant. (b) When a replay attack occurs, the encoder maps the received replayed ′ observations to latent states [zt−H+1 , . . ., zt′ ]. These are compared with the predicted latent states [z̃t−H+1|t−H, . . ., z̃t|t−H ] to obtain the residual window rj, defined in (8). The MCUSUM detector processes this window, and the resulting evidence updates the attack confidence cj through (18). When attack evidence persists, the supervisor switches to the damped-stop controller and applies uds t as specified in (7).

directly on images, neither an analytical transition model nor a tractable image-space measurement model is readily available. Our approach replaces that requirement with a learned control input-conditioned latent dynamics model, allowing the private watermark response to be tested directly from visual observations. The excitation must also be selected without unnecessarily degrading control performance. Naha et al. choose a stationary watermark variance by trading off information gain and control cost, while DynaMark learns a time-varying Gaussian policy using the operating condition and Bayesian detector confidence [9]. Our work retains this detector-dependent adaptation but evaluates dynamical consistency using learned image representations instead of low-dimensional state estimates. We further add a task-specific safety cost and a supervisory fallback to an observation-independent controller when the attack confidence exceeds a threshold.

B. Latent Dynamics Models for Visual Control

In visual control, latent dynamics models provide a compact representation in which action-conditioned dynamics can be rolled forward over multiple steps. PlaNet uses learned latent dynamics for online planning from pixels [10], while Dreamer learns behavior through imagined latent trajectories [11]; DayDreamer demonstrates the use of world models for learning directly on physical robots [6]. TDMPC further shows how task-oriented latent dynamics can support short-horizon trajectory optimization for continuous control [12]. Building on this line of work, our LDN autoregressively predicts future image-derived latents, feeding

each predicted latent and the next privately watermarked control input into the subsequent prediction. We compare this predicted trajectory with latents encoded from subsequently received images; their discrepancy supplies replay evidence to the detector. The detector confidence and current latent state then inform adaptive watermark selection.

III. METHODOLOGY

A. Problem Setup

Consider an image-based neural network controller F : X × Rdp → Rdu, where xt ∈ X ⊆ Rdx is the image observation and xprop ∈ Rdp is a trusted proprioceptive t measurement. The nominal control command is ut = F (xt, xprop ), t

ut ∈ Rdu .

(1)

An encoder E : X → Rdz maps each received image to a compact latent representation: zt = E(xt ),

zt ∈ Rdz,

(2)

where dz ≪ dx . The dimensions dx, dp, dz, and du denote the image, proprioceptive, latent, and control dimensions, respectively. Physical watermarking injects a private random signal ϕt into the nominal control input, producing ūt = ut + ϕt .

(3)

We treat ϕt as a private signal sampled online from a Gaussian distribution whose covariance Σt is selected dynamically at runtime. While existing approaches commonly

employ a fixed static watermark distribution [1], [2], [4], we use an adaptive dynamic-watermarking strategy inspired by DynaMark [9]. The DynaMark policy and its RL formulation are described in Section III-C. Under honest sensing, the observation received after applying ūt contains the physical response to the current private realization ϕt . A replayed observation was generated under a different, earlier control input and watermark realization, so it generally lacks the response associated with the current ϕt . The detector tests this mismatch by predicting the latent response to the control input that was actually applied and comparing that prediction with the latent encoding of the subsequently received image. 1/2 At each step, the watermark is sampled as ϕt = Σt ξt, where the draws ξt ∼ N (0, Idu ) are independent and Σt is selected before drawing ξt . The historical watermark ϕ′t associated with a replayed image was generated using an earlier draw and may have a different covariance. Let the latent dynamics network be L : Rdz × Rdu → Rdz,

(4)

where L(zt, ūt ) predicts the next latent state zt+1|t from the current latent state and watermarked control input applied during t and t + 1. Over a prediction horizon H, let L(H) denote the recursive rollout of the same LDN under the applied control input sequence. Specifically, the rollout is initialized with z̃t−H|t−H = zt−H and  satisfies z̃t−H+h|t−H = L z̃t−H+h−1|t−H, ūt−H+h−1 for h = 1, . . ., H. The corresponding stacked latent prediction is e zt : = vec z̃t−H+1|t−H, . . ., z̃t|t−H

= L(H) (zt−H, ūt−H:t−1 ) .

(5)

Here, z̃t−H+h|t−H is the latent prediction for discrete instant t−H +h, corresponding to physical time (t−H +h)∆t, made from the latent state available at instant t − H. At the window-completion time t, the detector has received zt and has stored the applied control input sequence ūt−H:t−1 . It can therefore complete the rollout initialized at t − H. To protect the robot when attack evidence persists, we use a Simplex-style supervisor that switches from the watermarked RL controller to a trusted damped-stop controller. Let ct denote the detector confidence, let νt count consecutive detector updates for which ct ≥ csw (and reset to zero otherwise), and let Np be the required persistence length. The supervisor mode is γt := I{νt ≥ Np }. At the switching instant ts, the fallback initializes its reference velocity from the trusted end-effector velocity measurement, vtdss = vtees, and then applies the discrete damping law ds vt+1 = (I − ∆tKd ) vtds,

Kd ≻ 0.

(6)

We choose Kd so that ρ(I −∆tKd ) < 1, where ρ denotes the spectral radius. This makes the reference velocity converge to zero. Because the nominal controller interface accepts target poses, the fallback converts the damped velocity reference ee into a compatible end-effector position target, uds t = pt +

∆t vtds, while holding the end-effector orientation fixed. The control input sent to the low-level controller is therefore ( ūt, γt = 0, cmd (7) ut = uds t, γt = 1. Thus, after detection the supervisor bypasses the RL targetpose control input and its watermark; it uses trusted proprioceptive feedback to generate target poses that bring the physical end-effector velocity to zero in a damped fashion.

B. Replay-Attack Model and MCUSUM Detection and Belief

a) Replay-Attack Model: Replay attacks seek to remain statistically consistent with nominal operation by replacing the current visual stream with previously recorded legitimate observations while the physical robot evolves under potentially manipulated control inputs [9]. We assume that the adversary has access to the sensing channels and can observe and replace the RGB-D observations received by the controller and detector. The adversary follows a two-stage strategy: first, it records a sufficiently long benign trajectory xt during closed-loop operation without active intervention; subsequently, it replays the recorded observations. Thus, during replay, the controller and detector receive the spoofed observation x′t, whereas the physical robot receives the adversarial control input F (x′t ) = uat that is predicted by the control policy on spoofed observations. In the considered threat model, it is assumed that the adversary cannot directly observe or measure the secret dynamic-watermarking signal injected into the control channel, meaning their replayed observations fail to account for the real-time physical excitation. b) Multi-Horizon Latent Residual and MCUSUM Detector: At each detector update, the latent dynamics network predicts an H-step trajectory conditioned on the current latent state and applied watermarked control. We consider disjoint prediction windows with stride H. Define the predicted and observed latent trajectories for window j as e ztj := vec z̃tj −H+1|tj −H,. . ., z̃tj |tj −H ∈ RHdz and ztj := vec ztj −H+1, . . ., ztj ∈ RHdz, respectively. Here, tj denotes the physical sample at which window j is completed, such that tj − tj−1 = H. The corresponding multi-horizon latent residual is rj := ztj − e ztj ∈ RHdz .

(8)

The nominal residual distribution is calibrated from nominal trajectories. Let µ0 and Σ0 denote the calibrated residual mean and covariance, respectively, and let Σ0 = ΓΓ⊤ be its Cholesky factorization. The standardized residual supplied to the detector is ε j := Γ−1 (rj − µ0 ) . (9) Under nominal operation, ε j ∼ N (0, IHdz ). To accumulate persistent deviations from this nominal model, we employ a multivariate cumulative-sum (MCUSUM) detector. Let sj−1 ∈ RHdz be the MCUSUM

state memory and s0 = 0. For reference parameter q > 0, the recursion is dj = sj−1 + ε j,  ∥dj ∥2 ≤ q, 0,   sj = q  1− dj, ∥dj ∥2 > q, ∥dj ∥2 Yj = ∥sj ∥2,

(10)

Ij = 1 {Yj ≥ k},

(13)

(11) (12)

where dj is the pre-shrinkage detection evidence, combining the accumulated memory sj−1 with the current standardized residual ε j . The quantity Yj is the MCUSUM score, k > 0 is the alarm threshold, and Ij ∈ {0, 1} indicates threshold exceedance at j th detector update. Let H0 denote nominal operation and HA denote an active replay attack. Under H0, define the nominal average run  length (ARL0 ) as ARL0 := E inf {j ≥ 1 : Ij = 1} H0 . Accordingly, the threshold k is selected to attain a prescribed target ARL⋆0 . We use α := 1/ ARL⋆0 as the corresponding nominal false-alarm frequency per detector update. Because detector windows are disjoint, the corresponding average time to false alarm is H · ∆t · ARL⋆0 . For an attack beginning at physical sample time ta, detection occurs at the first post-onset detector update Jd := inf {j : tj ≥ ta, Ij = 1}, and the detection delay is (tJd − ta )∆t. Both ARL0 and the detection delay are first-passage quantities evaluated using the MCUSUM recursion and therefore account for the temporal dependence induced by its state memory. c) Residual Distribution under Attack: Consider a detector window j that lies entirely after the replay onset, such that tj − H ≥ ta . Under HA, the detector receives the previously recorded initial latent state zt′j −H = E(x′tj −H ) and the recorded latent trajectory z′j, where primes identify samples from the recorded source segment aligned with the current detector window. The recorded trajectory was generated under the historical applied watermarked-control input sequence ū′tj −H:tj −1 = u′tj −H:tj −1 +ϕ′tj −H:tj −1 . Therefore, by (5), it satisfies z′j = L(H) (zt′j −H, ū′tj −H:tj −1 )+r′j, where r′j denotes the nominal prediction residual associated with the recorded source window. In contrast, the detector evaluates the replayed initial latent state using the watermarkedcontrol input sequence actually applied during the current detector window, ūtj −H:tj −1 = utj −H:tj −1 + ϕtj −H:tj −1 . Hence, the residual observed under HA is   ′ (H) ′ rA := z − L z , ū (14) tj −H:tj −1 . j j tj −H Because the LDN is conditioned on the applied watermarked-control input sequence, its prediction accounts for the modeled latent response to the recorded watermark realization. Therefore, the remaining nominal prediction residuals rj are prediction error and are independent of the particular watermark realization. Specifically, conditional on the locally matched operating regime and the watermark covariance sequences selected by the policy, r′j follows the calibrated nominal residual distribution and is independent

of the current and recorded watermark sequences. This assumption does not imply that z′j is independent of the recorded watermark. Rather, it assumes that their modeled dependence is captured by L(H) . Lemma 1. Suppose that L(H) is continuously differentiable with respect to its control-sequence input, the replayed source window is selected from a locally matched operating regime such that u′tj −H:tj −1 ≈ utj −H:tj −1, and the firstorder linearization remainder is negligible. Furthermore, assume that r′j is independent of ϕtj −H:tj −1 and ϕ′tj −H:tj −1 . Define Bj := ∇u L(H) (z, u) z=z′ ∈ ,u=ū tj −H

tj −H:tj −1

RHdz ×Hdu . Then, to first order,   ′ ′ rA j ≈ rj + Bj ϕtj −H:tj −1 − ϕtj −H:tj −1,

(15)

approx.

and hence rA ∼ N (µ0, ΣA,j ), where ΣA,j = Σ0 + j ⊤ , Σj = blkdiag Σ Bj (Σ′j + Σj )B j  tj −H, . . ., Σtj −1, and

Σ′j = blkdiag Σ′tj −H, . . ., Σ′tj −1 . Consequently, ε A j := A Γ−1 (rA j − µ0 ) satisfies ε j

approx.

N (0, ΩA,j )

ΩA,j = IHdz + Γ−1 Bj (Σ′j + Σj )Bj⊤ Γ−⊤ .

(16)

Proof. Substituting the recorded latent trajectory into (14) gives rA = r′j + L(H) (zt′j −H, ū′tj −H:tj −1 ) − j (H) ′ L (ztj −H, ūtj −H:tj −1 ). A first-order expansion of L(H) with respect to the control-sequence input around (zt′j −H, ūtj −H:tj −1 ) yields ′ ′ rA j ≈ rj + Bj (ūtj −H:tj −1 − ūtj −H:tj −1 )

≈ r′j + Bj (ϕ′tj −H:tj −1 − ϕtj −H:tj −1 ), where the last approximation follows from u′tj −H:tj −1 ≈ utj −H:tj −1 . Independence and Gaussianity give the corresponding block covariance for ϕ′tj −H:tj −1 − ϕtj −H:tj −1, denoted by Σ′j + Σj .  ′ ⊤ Therefore, rA j ∼ N µ0, Σ0 + Bj (Σj + Σj )Bj . Finally, applying the nominal standardization in (9) on rA j gives  −1 E[εεA E[rA j ]=Γ j ] − µ0 ≈ 0, −1 Cov(εεA ΣA,j Γ−⊤ j )=Γ

= IHdz + Γ−1 Bj (Σ′j + Σj )Bj⊤ Γ−⊤, where Σ0 = ΓΓ⊤ was used in the final equality. The proof is complete. d) MCUSUM Belief Characterization: We introduce the detection confidence cj := Pr (HA | d1:j ),

c0 := Pr(HA ),

(17)

as the posterior probability of the replay-attack hypothesis given the MCUSUM evidence observed through detector update j. By (11) and (13), sj and Ij are deterministic functions of dj and therefore provide no additional information once d1:j is observed. Under HA, the attacker selects an unknown

onset time τ before the system trajectory is realized. Bayes’ rule gives the sequential update [9] cj−1 κ1,j cj = , (18) cj−1 κ1,j + (1 − cj−1 )κ0,j

For a pre-onset window, the same argument under the nominal residual model gives  f dj | d1:j−1, Acj, HA = f0,j . (26)

where κ0,j := f (dj | d1:j−1, H0 ) and κ1,j := f (dj | d1:j−1, HA ) are the conditional likelihoods of the current detection-evidence vector under the nominal and replay-attack hypotheses, respectively. Because the replay attack may begin at any physical sample, define Aj := {τ ≤ tj − H}, which is the event that detector window j lies entirely after the attack onset. We represent onset uncertainty at window resolution by defining eτ (j) := Pr (Aj | d1:j−1, HA ), Qτ (j) := Pr(Aj | HA ), Q + and Qτ (j) := Pr (Aj | d1:j, HA ). For Qτ (j −1) < 1, define the onset hazard between consecutive fully attacked-window events as  hτ (j) := Pr Aj | Acj−1, HA Qτ (j) − Qτ (j − 1) . (19) = 1 − Qτ (j − 1)

Because Aj−1 ⊆ Aj , the event Aj is the disjoint union Aj = Aj−1 ∪ Aj ∩ Acj−1 . Consequently,

Windows satisfying tj − H < τ ≤ tj straddle the attack onset and are excluded from the subsequent analysis, which applies only to fully nominal or fully attacked windows. Theorem 1. Suppose the standardized-residual distributions in Lemma 1 hold, and conditional on the applicable regime, the current standardized residual is independent of d1:j−1 . In addition, assume that the onset time is fixed by the attacker before the system trajectory is realized, so that  Pr Aj | Acj−1, d1:j−1, HA = hτ (j). (20) Define f0,j := ϕHdz (εεj ; 0, IHdz ) = ϕHdz (dj ; sj−1, IHdz ), fA,j := ϕHdz (εεj ; 0, ΩA,j ) = ϕHdz (dj ; sj−1, ΩA,j ) . Then, the onset probabilities and conditional likelihoods satisfy   eτ (j) = Q+ (j − 1) + 1 − Q+ (j − 1) hτ (j), Q (21) τ τ κ0,j = f0,j, h i eτ (j) f0,j + Q eτ (j)fA,j, κ1,j = 1 − Q Q+ τ (j) =

eτ (j)fA,j Q . κ1,j

eτ (j) = Pr (Aj | d1:j−1, HA ) Q = Pr (Aj−1 | d1:j−1, HA ) + Pr Aj ∩ Acj−1 | d1:j−1, HA

=Q+ τ (j − 1)    c + 1 − Q+ τ (j − 1) Pr Aj | Aj−1, d1:j−1, HA   + =Q+ τ (j − 1) + 1 − Qτ (j − 1) hτ (j), which proves (21). Conditioning the attack-hypothesis likelihood on Aj gives κ1,j =f (dj | d1:j−1, HA )   =f dj | d1:j−1, Acj, HA Pr Acj | d1:j−1, HA + f (dj | d1:j−1, Aj, HA ) Pr (Aj | d1:j−1, HA ) h i eτ (j) f0,j + Q eτ (j)fA,j, = 1−Q where (25) and (26) were used. This proves (23). Finally, Bayes’ rule within HA gives Q+ τ (j) = Pr (Aj | d1:j, HA ) f (dj | d1:j−1, Aj, HA ) Pr (Aj | d1:j−1, HA ) = f (dj | d1:j−1, HA ) eτ (j)fA,j Q = , κ1,j which proves (24).

C. Adaptive Dynamic Watermarking via Reinforcement

Learning

(23)

DynaMark adapts the distribution of the private watermark without replacing the nominal image-based controller F . We formulate its adaptive covariance selection as a Markov Decision Process (MDP) [13], [14]. At time t, the DynaMark information state is

(24)

st := (zt, ut, Σt−1, ct ) ∈ S,

(22)

Proof. Given d1:j−1, the previous MCUSUM state sj−1 is known. Moreover, ε j = dj − sj−1 . For fixed sj−1, this transformation is a translation with unit Jacobian. Therefore, κ0,j = f (dj | d1:j−1, H0 ) = fε (εεj | d1:j−1, H0 ) = ϕHdz (εεj ; 0, IHdz ) = f0,j, where the final equality follows from the conditionalindependence assumption. This proves (22). Similarly, Lemma 1 gives f (dj | d1:j−1, Aj, HA ) = ϕHdz (εεj ; 0, ΩA,j ) = fA,j . (25)

(27)

where zt and ut are the current latent state and control input respectively, Σt−1 is the predicted DWM covariance at the previous step and ct ∈ [0, 1] is the detection confidence from the belief update in (18). The DynaMark policy is the map DM : S → Sd+u,

Σt = DM (st ).

(28)

The selected covariance determines ϕt ∼ N (0, Σt ), which is the watermark signal added to the nominal control input through (3). The resulting observation is encoded and compared with the LDN prediction, producing new detector evidence and the subsequent confidence supplied back to DM .

a) Action Space: The action is the positive semidefinite watermark covariance Σt . Its magnitude is bounded to limit the excitation applied to the nominal control: n o A(st ) = Σ ∈ Sd+u : ∥Σ∥F ≤ Σmax . (29) Here, Σmax > 0 is chosen according to the desired excitation level. Task-specific safety is incorporated through the reward rather than as an additional action-space constraint. b) Reward Function: The reward balances watermark expenditure, deviation from nominal behavior, detector connom fidence, and robot–human separation. Let z̃t+1 := L(zt, ut ) denote the predicted successor under the nominal control without watermarking, and let ω1, ω2, ω3 > 0 be design weights. The base watermarking reward is nom rtwm = − ω1 ∥ϕt ∥1 − ω2 ∥z̃t+1 − zt+1 ∥2

+ ω3 |0.5 − ct+1 |.

(30)

The first term penalizes watermark magnitude, the second penalizes deviation from the predicted unwatermarked evolution, and the third rewards detector confidence away from 0.5. DWM training includes both clean and replay-attacked episodes, exposing the policy to both operating conditions. The intended response is low attack confidence during clean operation and high confidence after replay onset. The confidence term encourages decisive beliefs, while the other terms limit the motion and excitation costs of watermarking. The reward uses the subsequent confidence ct+1 to evaluate the effect of the selected covariance. To incorporate safety into policy optimization, we define a safety metric (βt ) specific to our use case (human-robot interaction), observed after applying ūt βt+1 = ∥Pr,t+1 − Ph,t+1 ∥2,

(31)

where Pr,t+1 and Ph,t+1 denote the points on the robot end-effector and human-arm that are closest to one another, respectively. For a minimum desired separation βmin > 0, define the nonnegative safety cost rtsafe = [βmin − βt+1 ]+,

[a]+ := max(0, a).

(32)

Here, a ∈ R is a scalar argument of the positive-part operator [a]+ . In (32), a = βmin − βt+1 represents the separation shortfall, so the safety cost is positive only when the observed separation falls below βmin . The reward used during policy optimization is then rtλ (st, Σt ) = rtwm − λ · rtsafe,

λ ≥ 0.

(33)

Thus, the covariance bound is enforced through the action space, while separation violations are penalized during training. The multiplier λ sets the weight of the safety cost. As training progresses and the policy learns to reduce separation violations, λ is reduced while remaining nonnegative.

Fig. 2.

Live plant observations and replayed controller observations

IV. EXPERIMENTS

A. Human-Robot Interactive Task Environment

We evaluate a vision-guided robotic manipulator in Isaac Sim while it reaches a target and avoids a moving human arm. The controller F receives RGB-D observation xt ∈ R120×160×4, joint positions and velocities, end-effector position, and goal position form xprop ∈ R18 . The nominal cont troller F outputs a three-dimensional action ut ∈ [−1, 1]3 . Figure 2 illustrates the live-versus-replay attacked visual discrepancy before and after the recorded replay onset. The policy controller runs at 30Hz, thus ∆t ≈ 0.033s.

B. Latent Encoder and DWM Policy Training Setup

We train a V-JEPA-inspired [15] encoder and actionconditioned LDN on clean nominal and watermarked RGBD trajectories, excluding replay data with latent dimension dz = 64 and LDN prediction horizon H = 4. With F frozen, we train the DWM policy using PPO [16] on both clean and replay-attacked episodes. The policy predicts a watermarking covariance Σt = diag(σt2 ), such that 0 ≤ σt,i ≤ 0.3 according to (29). The objective balances detector confidence, excitation and motion costs, and the Lagrangian separation penalty. Latent residual windows (rj ) are obtained from encoded RGB-D images (replay vs predicted), watermark covariances are selected by the trained PPO policy, and attack beliefs are updated using the likelihoods defined for (18).

C. Replay Protocol and Detector Calibration

In paired-fork rollouts, the target and source start from matched states; at ta, the target receives the source RGB-D stream while its physical trajectory continues. Disjoint Hstep windows yield residuals rj ∈ RHdz from (8). Separate clean episodes estimate (µ0, Σ0 ) and calibrate k against a prescribed nominal average run length ARL0 . At each update, the LDN uses the current private control sequence and its Jacobian to form the replay covariance; the detector uses q = 0.5, c0 = 0.01, and a geometric onset hazard of 10−3 per window. Continuous likelihoods update cj independently of the MCUSUM alarm. Calibration and evaluation episodes remain disjoint, and live ground truth is withheld from the detector.

V. RESULTS

A. Replay Detection and State Divergence

Replay separates the received observations from the physical plant, as illustrated in Figure. 2. Private watermarking

TABLE I REPLAY DETECTION AND SAFETY TEST (30 EPISODES ).

Replay Detection Metric No WM Dynamic WM Clean Episode False Alarms 0/30 6/30 Belief based Attack Detection 0/30 29/30 Median detection delay (s) — 1.23 Early Belief Crossing 0/30 1/30 Safety under Replay with Watermarking Metric No Simplex Simplex Episodes below 3 cm 20/30 0/30 Minimum clearance (m) 0.023 0.122 Final clearance (m) 0.074 0.210 Final mean speed (m/s) 0.140 0.003

Simplex switching (7) under replay with watermarking. From Figure 3, in the belief panel (Top), the red curve shows confidence from the replayed observation stream and the green curve shows confidence in the replay experiment with Simplex. In the Safety metric (Middle) and end effector speed plots (Bottom), blue describes the physical robot without Simplex, red describes the replayed source trajectory, and green describes the physical robot with Simplex. It is clear that the policy visible, replay attacked observations show the safety metric to be increasing, whereas in reality the true safety metric actually decreases caused by the attack. With Simplex active, the live robot maintains greater separation from the human arm and its end-effector speed approaches zero. The safety comparisons in Table I use the live physical trajectories, rather than the replayed source trajectory. Simplex switches to stopping when attack confidence exceeds 0.9 for the required persistence period. As shown in Figure. 3 and Table I, 20 of 30 episodes without Simplex entered the 3 cm proximity zone, compared with none with Simplex. The reported minimum clearance increased from 0.023 to 0.122 m, and final speed decreased from 0.140 to 0.003 m/s. These results show that the fallback reduces continued physical motion under misleading visual feedback. Of 30 switches, 28 followed attack onset and two occurred early. Watermarking supplies attack evidence, and Simplex uses that evidence to initiate a protective stop. A limitation remains that false attack detections can still interrupt the task and reduce performance.

VI. CONCLUSION

Fig. 3. Average (Top) Attack Belief, (Middle) Min Robot-Human separation (m), and (Bottom) End-effector speed (m/s) across 30 episodes. Replay begins at step 60. Blue denotes live observations, red denotes the replayed source observations received by the policy, and green denotes the live trajectory with Simplex stopping.

tests whether that feedback contains the response to the current excitation. In Table I, 29 of 30 watermarked replay episodes crossed the belief threshold after onset without an earlier crossing, with median delay 1.23 s. The remaining episode crossed both before and after onset. Six clean watermarked episodes also crossed the belief threshold, indicating a specificity limitation rather than alarms rejected by belief accumulation. Without watermarking, none of the 30 replay episodes crossed the belief threshold, supporting the role of private excitation in this evaluation.

B. Safety Benefits of Simplex Switching

Detection alone does not prevent the robot from following misleading feedback. A separate test therefore evaluates

This paper combines private dynamic watermarking, action-conditioned latent dynamics, Bayesian attack confidence, and Simplex stopping for vision-based control. The detector compares latent predictions conditioned on the applied watermarked commands with representations encoded from the received RGB-D images. A trained PPO policy selects the watermark covariance, while a Lagrangian separation penalty discourages watermark choices that bring the robot too close to the human arm. The analysis derives an approximate replay-residual covariance and a sequential belief update under the stated modeling assumptions. Reach-avoid experiments evaluate this visual detector and trained watermark policy. Watermarking produced post-onset belief crossings without earlier crossings in 29 of 30 replay episodes, with a median delay of 1.23 s. Simplex stopping reduced episodes entering the 3 cm proximity zone from 20 of 30 to none in the separate safety test. Six clean episodes crossed the belief threshold, and two switches in the safety test occurred before attack onset, showing that unnecessary intervention remains a limitation. These results demonstrate replay detection and reduced motion under misleading feedback within the evaluated task; the training penalty and stopping response do not establish a formal safety guarantee. Future work will use neural network verification tools to develop formal safety guarantees, extend the framework to physical robot experiments with sensing and actuation delays, and improve latent dynamics prediction to reduce

false alarms. Further evaluation will also consider continued human motion after the robot stops.

ACKNOWLEDGMENTS

The authors used OpenAI’s ChatGPT [17] throughout the manuscript to assist with writing, proofreading, and minor language edits for grammar, clarity, and readability. All images were devised by the authors, who also conducted the experiments and generated the plots. The authors reviewed and approved the final text and take full responsibility for the manuscript’s content and accuracy.

REFERENCES

  1. [1] Y. Mo and B. Sinopoli, “Secure control against replay attacks,” in 2009 47th Annual Allerton Conference on Communication, Control, and Computing, 2009, pp. 911–918.
  2. [2] B. Satchidanandan and P. R. Kumar, “Dynamic watermarking: Active defense of networked cyber-physical systems,” Proceedings of the IEEE, vol. 105, no. 2, pp. 219–240, 2017.
  3. [3] M. Porter, P. Hespanhol, A. Aswani, M. Johnson-Roberson, and R. Vasudevan, “Detecting generalized replay attacks via time-varying dynamic watermarking,” IEEE Transactions on Automatic Control, vol. 66, no. 8, pp. 3502–3517, 2021.
  4. [4] A. Naha, A. M. H. Teixeira, A. Ahlén, and S. Dey, “Sequential detection of replay attacks,” IEEE Transactions on Automatic Control, vol. 68, no. 3, pp. 1941–1948, 2023.
  5. [5] A. Parameshwaran and Y. Wang, “Scalable and interpretable verification of image-based neural network controllers for autonomous vehicles,” in Proceedings of the ACM/IEEE 16th International Conference on Cyber-Physical Systems (ICCPS), 2025. [Online]. Available: https://doi.org/10.1145/3716550.3722037
  6. [6] P. Wu, A. Escontrela, D. Hafner, P. Abbeel, and K. Goldberg, “Daydreamer: World models for physical robot learning,” in Proceedings of the Conference on Robot Learning, ser. Proceedings of Machine Learning Research, vol. 205. PMLR, 2023, pp. 2226–2240.
  7. [7] P. Korshunov, A. George, G. Özbulak, and S. Marcel, “Vulnerability of face age verification to replay attacks,” in 2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2024, pp. 4830–4834.
  8. [8] S. Khan, T. H. M. Siddique, M. S. Ibrahim, A. J. Siddiqui, and K. Huang, “Spatio-temporal deep learning for improved face presentation attack detection,” Knowledge-Based Systems, vol. 311, p. 113059, 2025.
  9. [9] N. Aftabi, A. Hanchate, S. T. S. Bukkapatnam, and D. Li, “Dynamark: A reinforcement learning framework for dynamic watermarking in industrial machine tool controllers,” IEEE Transactions on Automation Science and Engineering, vol. 23, pp. 13 658–13 676, 2026.
  10. [10] D. Hafner, T. Lillicrap, I. Fischer, R. Villegas, D. Ha, H. Lee, and J. Davidson, “Learning latent dynamics for planning from pixels,” in Proceedings of the 36th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, vol. 97. PMLR, 2019, pp. 2555–2565.
  11. [11] D. Hafner, T. Lillicrap, J. Ba, and M. Norouzi, “Dream to control: Learning behaviors by latent imagination,” in International Conference on Learning Representations, 2020.
  12. [12] N. A. Hansen, H. Su, and X. Wang, “Temporal difference learning for model predictive control,” in Proceedings of the 39th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, vol. 162. PMLR, 2022, pp. 8387–8406.
  13. [13] M. L. Puterman, Markov Decision Processes: Discrete Stochastic Dynamic Programming, 1st ed. USA: John Wiley & Sons, Inc., 1994.
  14. [14] R. S. Sutton and A. G. Barto, Reinforcement Learning: An Introduction. Cambridge, MA, USA: A Bradford Book, 2018.
  15. [15] M. Assran et al., “V-JEPA 2: Self-supervised video models enable understanding, prediction and planning,” 2025. [Online]. Available: https://arxiv.org/abs/2506.09985
  16. [16] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov, “Proximal policy optimization algorithms,” arXiv preprint arXiv:1707.06347, 2017.
  17. [17] OpenAI, “ChatGPT,” Online. Available: https://chatgpt.com, accessed: September 29, 2026.