GUARD: Anomaly-Informed Q-Steering for Generative Robot Policies in Dexterous Manipulation
Generative robot policies based on diffusion and flow matching can model complex, multimodal behaviors, but remain susceptible to covariate shift during closed-loop execution. Existing approaches mitigate such failures through additional demonstrations, policy fine-tuning, or test-time guidance, but often require human intervention, engineered rewards, or other task-specific signals.
From the abstract. Our summary is in progress.
Full paper
GUARD: Anomaly-Informed Q-Steering for Generative Robot Policies in Dexterous Manipulation
Published under CC BY 4.0. Reproduced with attribution; original at arXiv:2611.10343 (PDF).
Abstract
Generative robot policies based on diffusion and flow matching can model complex, multimodal behaviors, but remain susceptible to covariate shift during closed-loop execution. Existing approaches mitigate such failures through additional demonstrations, policy fine-tuning, or test-time guidance, but often require human intervention, engineered rewards, or other task-specific signals. We introduce GUARD, an anomaly-informed Q-steering framework that leverages the policy’s training distribution to construct a dense, failure-anticipatory steering signal. GUARD pairs sparse task rewards with dense anomaly scores learned from policy training data and propagates both through a learned Q-function. Its gradients then steer the denoising process toward actions that improve task return while preventing trajectories from entering poorly supported regions, without directly modifying the pretrained policy. Across four Adroit dexterous manipulation tasks, GUARD achieves average success rates of 96.0\% and 80.0\% under nominal and perturbed dynamics, outperforming the strongest baseline by 21.0 and 20.0 percentage points while maintaining the lowest anomaly score. GUARD further demonstrates direct sim-to-real transfer on in-hand screwdriver rotation and reorientation tasks, achieving 40 and 25 percentage-point gains in success rate. These results demonstrate that anomaly signals can serve not only for failure monitoring but also to complement sparse task rewards as effective supervision for robust policy steering.
I Introduction
Generative policies, such as diffusion and flow matching, have emerged as the state-of-the-art for imitation learning in robotics, given their ability to model complex, multimodal action distributions [8, 22, 5]. However, as with other behavior-cloned policies, their performance can degrade under covariate shift: execution errors and environmental variations may drive the system into states poorly represented in the demonstration data, where the learned policy becomes unreliable. This problem is especially pronounced in dexterous manipulation, where complex contact-rich dynamics and long-horizon interactions can amplify small deviations.
Current methods for addressing covariate shift rely primarily on providing additional signal to adjust policy behavior. Human-in-the-loop methods utilize a supervisor to intervene and provide corrective demonstrations that address deviations as they occur [32, 23, 19, 18], but require significant human effort and are difficult to collect for dexterous robot hands. Methods for post-training generative policies with reinforcement learning can introduce more robust behaviors via trial-and-error [29, 43, 3, 40, 36, 38] but rely heavily on the quality of the reward signal. Dense rewards provide rich, informative signals to guide policy improvement, but generally require task-specific shaping, additional failure data, or manual failure annotations [7, 12, 4]. Sparse task-success rewards are often more scalable, but provide delayed signaling, which can increase the data burden and make adjustments challenging to learn [2, 25].
In this work, we explore how we can construct guidance for a generative policy without relying on human input, brittle assumptions, or engineered signals. Our key insight is to explicitly “nudge” the policy back toward its support region rather than relying on laborious task signaling. This prevents our target system from drifting into regions of limited support where our policy is likely to fail. We build on recent work that derives out-of-distribution (OOD) and anomaly scores for robotic behaviors [41, 31, 14] by constructing a model of the policy’s training demonstrations. While previous methods demonstrated the efficacy of anomaly detection for failure monitoring, behavior adjustment is primarily limited to naive retries [44] or state-based interpolation [28, 13], neither of which can be applied to contact-rich dexterous manipulation.
To translate anomaly detection into effective online adjustment, we propose steering the action-generation process at inference time. Inspired by gradient guidance in generative modeling [9], test-time steering preserves the pretrained policy as a behavioral prior while modifying its samples toward desirable actions. To effectively steer, we require an anticipatory signal of covariate shift, i.e., grounding future actions to their likelihood of leading to anomalous states. We propose constructing a Q-function trained on offline policy rollouts and online environment interactions to capture the discounted likelihood of future anomalies. The result is a function we can directly utilize to steer a policy to remain near its support. Further, we compose our proposed signal with a sparse task reward, which specifies what condition should ultimately be achieved, while the anomaly signal indicates where the pretrained policy is likely to remain competent. The resulting value function captures both the task return and the risk of leaving high-support regions, and its action gradient is used to steer each denoising process toward actions that improve the predicted task outcome while remaining close to the trusted region.
Contributions. We introduce GUARD: Guidance Using Anomaly-infoRmed Dense Values, a method that (1) combines sparse task rewards with dense anomaly signals to learn informative Q-functions for steering; and (2) utilizes an offline-to-online Q-function learning mechanism that uses the resulting value gradients to steer frozen flow matching policies toward successful, well-supported actions. We present a comprehensive evaluation on contact-rich dexterous manipulation tasks in the Adroit simulation benchmark and via direct sim-to-real transfer across three real-world tasks.
II Related Works
Failure Prediction and Anomaly Detection. Several recent works study failure prediction through anomaly detection, OOD detection, and uncertainty estimation. FAIL-Detect learns a flow model on the observation distribution from policy training data without requiring failure examples [41], while FIPER combines observation OOD and action-distribution uncertainty to predict failures of generative policies [31]. Sentinel monitors temporal action consistency and task progress [1], and other anomaly-based approaches detect deviations from nominal manipulation behavior to trigger failsafe or recovery mechanisms [14, 34, 30]. Policy uncertainty has also been used to improve residual-RL adaptation [10]. In contrast, we use policy-input anomaly scores as dense reward supervision for learning Q-functions, allowing information about distributional support to propagate through the Bellman return and shape the same value gradients that steer actions toward task success.
Improving Generative Robot Policies.
The prevalence of generative policy methods has stoked much interest in methods that address failure modes and improve task performance. Applying post-training Reinforcement Learning (RL) is an intuitive choice, and has been demonstrated with success on generative policies [29, 43], however, the generative denoising processes make training unstable and inefficient. Alternative approaches include applying RL in the latent space of the policy [40, 36], adding a residual policy to the generative policy outputs [3, 36, 38], or ranking multiple outputs from the policy with an external value function [26]. Several works build on gradient guidance for generative modeling [9] to inject learned Q-function gradients into the denoising process [20, 42, 45, 33]. We build on this Q-guided sampling machinery but address an orthogonal bottleneck: what signal should the Q-function learn from when task supervision is sparse?
Several other methods have explored moving beyond RL signals for steering. UA-Flow steers flow generation directly using predicted policy uncertainty [16]. DynaGuide uses an action-conditioned dynamics model to steer predicted outcomes toward desired behaviors [11]. Latent Policy Barrier similarly predicts future latent states and guides them toward the expert demonstration distribution [37]. In contrast, our work utilizes a Q-function approach to transform an anomaly signal into a failure anticipatory signal, thereby avoiding dynamics learning. We provide a direct comparison to these methods in our experiments.
III Background
III-A Reinforcement Learning
We consider a Markov decision process (MDP) [39] \mathcal{M}=(\mathcal{S},\mathcal{A},P,r,\gamma), with state space \mathcal{S}, action space \mathcal{A}, transition dynamics P, reward r, and discount factor \gamma\in[0,1). A policy \pi(a\mid s) maximizes the expected discounted return J(\pi)=\mathbb{E}_{\pi,P}\left[\sum_{t=0}^{\infty}\gamma^{t}r(s_{t},a_{t})\right]. Its action-value function is Q^{\pi}(s,a)=\mathbb{E}_{\pi,P}[\sum_{t=0}^{\infty}\gamma^{t}r(s_{t},a_{t})\mid s_{0}=s,a_{0}=a]. Given transitions (s,a,r,s^{\prime})\sim\mathcal{D}, a Q-function Q_{\phi} can be learned through temporal-difference learning by minimizing \mathcal{L}_{Q}(\phi)=\mathbb{E}_{\mathcal{D}}[(Q_{\phi}(s,a)-r-\gamma Q_{\bar{\phi}}(s^{\prime},a^{\prime}))^{2}], where a^{\prime}\sim\pi(\cdot\mid s^{\prime}) and Q_{\bar{\phi}} denotes a target Q-function. Since Q^{\pi}(s,a) depends explicitly on the action, its gradient \nabla_{a}Q^{\pi}(s,a) provides a local direction toward actions with a higher predicted return.
III-B Flow Matching
Flow matching [22, 24] policies are parameterized by a state-conditioned, time-dependent velocity field v_{\theta}(a,k;s) that transports samples from a Gaussian noise distribution p_{0}=\mathcal{N}(0,I) to the policy distribution \pi_{\theta}(a\mid s) via an ODE: \mathrm{d}a_{k}=v_{\theta}(a_{k},k;s)\mathrm{d}k,\quad a_{0}\sim p_{0}. Given dataset state-action pairs (s,a_{1})\sim\mathcal{D}, we define linear interpolants a_{k}=(1-k)a_{0}+ka_{1} between noise and data actions and train the velocity field via flow matching: \mathcal{L}_{\mathrm{FM}}(\theta)=\mathbb{E}_{k\sim\mathcal{U}[0,1],a_{0}\sim p_{0},(s,a_{1})\sim\mathcal{D}}\left[\left|v_{\theta}(a_{k},k;s)-(a_{1}-a_{0})\right|_{2}^{2}\right]. At inference time, actions are generated by integrating the ODE from k=0 to 1, yielding a sample a_{1}\sim\pi_{\theta}(a\mid s).
IV GUARD: Guidance Using Anomaly-infoRmed Dense Values
Our method consists of three components: (i) anomaly signals-informed dense reward construction, (ii) Q-guided action denoising, and (iii) offline-to-online Q-function adaptation. The overall procedure is summarized in Alg. 1.
IV-A Anomaly Signals-Informed Dense Rewards
Let \mathcal{D}_{\mathrm{demo}} denote the demonstration data used to train the frozen flow policy \pi_{\theta}. We fit an anomaly detector U(s) on the policy inputs in \mathcal{D}_{\mathrm{demo}}, where larger values indicate observations that are less supported by the policy’s training distribution. Since U is learned solely from the policy training data, it requires neither failure examples nor task-specific failure annotations. Our method naturally admits many available anomaly metrics. In our experiments, we primarily use the logpZO score [41] by fitting a separate flow model to the observations in \mathcal{D}_{\mathrm{demo}} that transports each observation to a Gaussian latent z, and take the squared latent norm \lVert z\rVert_{2}^{2} as its continuous anomaly score (large when an observation maps far from in-distribution regions).
We assign each state-action pair (s_{t},a_{t}) the anomaly score of s_{t+1}, i.e., U(s_{t+1}). Using an offline buffer \mathcal{D}_{\mathrm{off}} collected with the frozen flow policy, we compute and freeze reward-normalization statistics \Xi_{\mathrm{off}}\coloneqq\{\mu_{\log U}^{\mathrm{off}},\sigma_{\log U}^{\mathrm{off}},\mu_{\mathrm{task}}^{\mathrm{off}},\sigma_{\mathrm{task}}^{\mathrm{off}}\}. The dense anomaly reward is then defined as
r_{t}^{U}=-\frac{\log U(s_{t+1})-\mu_{\log U}^{\mathrm{off}}}{\sigma_{\log U}^{\mathrm{off}}}Thus, transitions toward states better supported by the policy’s training distribution receive a larger reward, while transitions toward anomalous states are penalized.
The available task supervision is a sparse binary signal, r_{t}^{\mathrm{task}}. To place both rewards on comparable scales, we independently standardize the task reward using the fixed statistics in \Xi_{\mathrm{off}},
\bar{r}_{t}^{\mathrm{task}}=\frac{r_{t}^{\mathrm{task}}-\mu_{\mathrm{task}}^{\mathrm{off}}}{\sigma_{\mathrm{task}}^{\mathrm{off}}},and define the reward used for Q-learning as their equal-weight sum,
\tilde{r}_{t}=r_{t}^{U}+\bar{r}_{t}^{\mathrm{task}}.Independent standardization places both signals on comparable scales without introducing a tunable trade-off coefficient.
The two rewards provide complementary supervision: the sparse task reward specifies what the robot should ultimately accomplish, while the dense anomaly reward indicates where the pretrained policy is well supported. Crucially, we do not directly steer actions to minimize instantaneous anomaly. Instead, Eq. (3) enters the Bellman return, allowing the Q-function to propagate both task success and distributional support over future trajectories.
IV-B Q-Guided Action Denoising
We learn an ensemble of N independently initialized Q-functions, \mathcal{Q}_{\phi}=\{Q_{\phi_{i}}\}_{i=1}^{N}. To reduce exploitation of Q-function extrapolation errors during gradient-based guidance, we follow prior Q-guided methods [33] and construct the pessimistic ensemble estimate
L(s,a;\mathcal{Q}_{\phi})=\frac{1}{N}\sum_{i=1}^{N}Q_{\phi_{i}}(s,a)-\rho\,\underset{i}{\operatorname{std}}\,Q_{\phi_{i}}(s,a),where \rho\geq 0 controls the degree of pessimism. The ensemble disagreement in Eq. (4) is distinct from the anomaly score U(s): U(s) measures support of the policy input under the training distribution and is used for reward construction, whereas Q-ensemble disagreement provides conservative value estimates for guidance.
Intermediate flow variables are noisy and generally lie outside the clean-action distribution on which the Q-functions are trained. Following prior works [45, 21], at each denoising step k\in[0,1], we estimate the corresponding clean action with a single step over the remaining flow horizon,
\hat{a}_{k}=a_{k}+\left(1-k\right)v_{\theta}\!\left(a_{k},k;s\right),query the ensemble at \hat{a}_{k} and compute g_{k}=\nabla_{\hat{a}_{k}}L(s,\hat{a}_{k};\mathcal{Q}_{\phi}). Following QGF [45], we approximate \partial\hat{a}_{k}/\partial a_{k}\approx I, avoiding differentiation through the flow velocity. With denoising step size \Delta, the guided update is
a_{k+\Delta}=a_{k}+\Delta\left[v_{\theta}(a_{k},k;s)+\lambda\nabla_{\hat{a}_{k}}L(s,\hat{a}_{k};\mathcal{Q}_{\phi})\right].We denote the action distribution induced by iterating Eq. (6) as \pi_{\mathcal{Q}_{\phi}}(a\mid s). The frozen flow policy remains the behavioral prior, while the Q-gradient biases denoising toward actions with high future anomaly signal-augmented task return. Here \lambda is the guidance weight, and we discuss details about the selection of \lambda in Sec . V.
IV-C Offline-to-Online Q-Function Adaptation
The Q-functions used for guidance should evaluate the policy that is ultimately executed, i.e., the steered policy. We therefore first estimate values under the base policy with offline initialization and subsequently adapt them to the evolving steered policy using online experience.
Offline initialization
We collect an offline buffer \mathcal{D}_{\mathrm{off}} by rolling out the frozen policy \pi_{\theta} with action noise \sigma_{a}, recording each transition together with its subsequent behavior action a^{\prime}_{\mathrm{BC}}. Each independently initialized ensemble head uses its own exponentially averaged target Q-function \bar{Q}_{i}. We perform behavior-policy fitted Q evaluation (FQE) using
y_{i}^{\mathrm{off}}=\tilde{r}+\gamma(1-d)\bar{Q}_{i}(s^{\prime},a^{\prime}_{\mathrm{BC}}),where d is the terminal indicator. Each Q_{\phi_{i}} is regressed toward its corresponding target, while its target parameters are updated as \bar{\phi}_{i}\leftarrow\tau\phi_{i}+(1-\tau)\bar{\phi}_{i}. Using per-head targets during offline initialization preserves ensemble diversity while estimating the anomaly-augmented return in regions covered by the behavior policy.
Online adaptation
Once Q-guidance is applied, the executed policy \pi_{\mathcal{Q}_{\phi}} differs from the behavior policy used for offline initialization. A Q-function evaluated only on the original behavior distribution can therefore become mismatched to the policy it is used to guide. We address this by alternating guided interaction with FQE updates under the resulting policy.
At each online iteration, we collect fresh trajectories using a\sim\pi_{\mathcal{Q}_{\phi}}(\cdot\mid s) and append them to the unified replay buffer \mathcal{B}=\mathcal{D}_{\mathrm{off}}\cup\mathcal{D}_{\mathrm{on}}. All online transitions are assigned rewards using Eq. (3) with the fixed normalization statistics \Xi_{\mathrm{off}}.
For a sampled transition (s,a,\tilde{r},s^{\prime},d), we regenerate a fresh bootstrap action using the guided policy induced by the EMA target ensemble, a^{\prime}\sim\pi_{\bar{\mathcal{Q}}}(\cdot\mid s^{\prime}), and construct the pessimistic target
y=\tilde{r}+\gamma(1-d)L(s^{\prime},a^{\prime};\bar{\mathcal{Q}}).Each ensemble head is regressed toward this shared target, \mathbb{E}_{\mathcal{B}}[(Q_{\phi_{i}}(s,a)-y)^{2}], while its target network is updated by Polyak averaging. Using the slowly evolving target ensemble to generate both a^{\prime} and its bootstrap value decouples action generation from instantaneous Q-function updates and stabilizes the guidance-value feedback loop. Repeated interaction and evaluation progressively adapt the Q-functions toward the steered policy, so that Q(s,a) estimates the long-horizon return obtained after taking a and subsequently following that guided policy. The resulting policy \pi_{\mathcal{Q}_{\phi}}(a\mid s) uses the ensemble of online-adapted Q-functions to guide denoising towards high-return, high-support actions. Refer Alg. 1 for the full training procedure.
V Experiments
- Method
- Metric
- \sigma_{d}=0
- \sigma_{d}=0.1
- \sigma_{d}=0
- \sigma_{d}=0.3
- \sigma_{d}=0
- \sigma_{d}=0.1
- \sigma_{d}=0
- \sigma_{d}=0.05
- \sigma_{d}=0
- –
- BC
- SR
- 0.74 \pm 0.01
- 0.45 \pm 0.06
- 0.75 \pm 0.008
- 0.49 \pm 0.04
- 0.52 \pm 0.03
- 0.40 \pm 0.05
- 0.37 \pm 0.08
- 0.32 \pm 0.05
- 0.60 \pm 0.03
- 0.41 \pm 0.05
- No data
- AS
- 12.14 \pm 4.76
- \mathbf{25.34} \pm 4.51
- 16.81 \pm 1.65
- 41.37 \pm 18.62
- 105.16 \pm 49.48
- 95.54 \pm 38.36
- 19.94 \pm 3.54
- 19.51 \pm 1.17
- 38.51 \pm 14.86
- 45.44 \pm 15.67
- Sparse-Q
- SR
- 0.80 \pm 0.11
- 0.55 \pm 0.13
- 0.88 \pm 0.04
- \mathbf{0.62} \pm 0.02
- 0.74 \pm 0.09
- 0.66 \pm 0.11
- 0.21 \pm 0.07
- 0.19 \pm 0.05
- 0.66 \pm 0.08
- 0.50 \pm 0.08
- No data
- AS
- 12.67 \pm 2.79
- 88.60 \pm 28.70
- 5.71 \pm 1.06
- 18.17 \pm 1.06
- 58.58 \pm 24.56
- 83.44 \pm 19.47
- 24.23 \pm 4.36
- 18.98 \pm 2.34
- 25.30 \pm 8.19
- 52.30 \pm 12.89
- LPB
- SR
- 0.78 \pm 0.03
- 0.53 \pm 0.03
- 0.74 \pm 0.03
- 0.50 \pm 0.03
- 0.57 \pm 0.04
- 0.47 \pm 0.03
- 0.49 \pm 0.04
- 0.36 \pm 0.03
- 0.64 \pm 0.04
- 0.47 \pm 0.03
- No data
- AS
- 9.75 \pm 3.28
- 42.95 \pm 19.10
- 6.46 \pm 2.18
- 49.17 \pm 30.86
- 28.03 \pm 10.13
- 39.07 \pm 8.84
- 16.19 \pm 2.13
- 16.93 \pm 2.70
- 15.11 \pm 4.43
- 37.03 \pm 15.38
- DynaGuide
- SR
- 0.87 \pm 0.03
- 0.55 \pm 0.04
- 0.79 \pm 0.03
- 0.54 \pm 0.01
- 0.78 \pm 0.04
- 0.79 \pm 0.05
- 0.55 \pm 0.02
- 0.51 \pm 0.04
- 0.75 \pm 0.03
- 0.60 \pm 0.04
- No data
- AS
- 9.18 \pm 3.75
- 35.12 \pm 5.39
- 21.68 \pm 7.60
- 39.29 \pm 10.62
- 22.01 \pm 7.18
- 17.71 \pm 7.58
- 17.37 \pm 1.28
- 19.62 \pm 0.26
- 17.56 \pm 4.95
- 27.94 \pm 5.96
- UA-Flow
- SR
- 0.75 \pm 0.01
- 0.43 \pm 0.02
- 0.73 \pm 0.009
- 0.47 \pm 0.03
- 0.51 \pm 0.02
- 0.36 \pm 0.009
- 0.39 \pm 0.03
- 0.34 \pm 0.05
- 0.60 \pm 0.02
- 0.40 \pm 0.03
- No data
- AS
- 7.15 \pm 1.37
- 46.10 \pm 16.26
- 9.15 \pm 2.85
- 38.42 \pm 10.23
- 91.51 \pm 18.02
- 84.32 \pm 37.38
- 16.03 \pm 0.94
- 20.30 \pm 2.50
- 30.96 \pm 5.80
- 47.29 \pm 16.59
- U-SA
- SR
- 0.84 \pm 0.02
- 0.48 \pm 0.02
- 0.75 \pm 0.03
- 0.53 \pm 0.02
- 0.77 \pm 0.03
- 0.68 \pm 0.05
- 0.52 \pm 0.06
- 0.39 \pm 0.05
- 0.72 \pm 0.04
- 0.52 \pm 0.04
- No data
- AS
- 5.74 \pm 1.02
- 45.15 \pm 13.54
- 12.66 \pm 6.21
- 35.84 \pm 8.94
- 14.79 \pm 5.37
- 32.25 \pm 16.94
- 11.17 \pm 0.49
- 17.40 \pm 1.53
- 11.09 \pm 3.27
- 32.66 \pm 10.24
- GUARD
- SR
- \mathbf{0.98} \pm 0.005
- \mathbf{0.79} \pm 0.03
- \mathbf{0.93} \pm 0.01
- 0.60 \pm 0.03
- \mathbf{0.99} \pm 0.009
- \mathbf{0.93} \pm 0.06
- \mathbf{0.95} \pm 0.005
- \mathbf{0.89} \pm 0.03
- \mathbf{0.96} \pm 0.008
- \mathbf{0.80} \pm 0.04
- No data
- AS
- \mathbf{4.21} \pm 1.89
- 62.49 \pm 31.94
- \mathbf{4.04} \pm 0.53
- \mathbf{16.83} \pm 1.89
- \mathbf{1.19} \pm 0.66
- \mathbf{3.46} \pm 1.72
- \mathbf{3.29} \pm 0.80
- \mathbf{3.92} \pm 0.60
- \mathbf{3.18} \pm 0.97
- \mathbf{21.68} \pm 9.04
We evaluate GUARD on the D4RL Adroit dexterous manipulation benchmark [27] in simulation and further demonstrate its sim-to-real transfer capabilities across three tasks using the Allegro V5 Plus multi-fingered robot hand. Through these experiments, we aim to answer the following research questions (RQs):
- RQ1: Can GUARD reliably steer the policy toward successful task completion?
- RQ2: Does GUARD keep the system near high-support, in-distribution regions?
- RQ3: Is GUARD more robust under distribution shift, including perturbed dynamics and sim-to-real transfer?
V-A Adroit Simulation Benchmark
We run experiments on all four Adroit manipulation tasks: Relocate, Pen, Hammer, and Door [27]. We train base flow-matching policies over 200 episodes, sampled equally from the expert and cloned subsets. The policy uses a four-layer MLP with 512 hidden units, GELU activations, layer normalization, and K{=}10 Euler denoising steps. GUARD uses an ensemble of five Q-functions with pessimism \rho{=}0.5, trained for 40k offline FQE updates on 800 episodes with batch size 256, learning rate 3{\times}10^{-4}, discount \gamma{=}0.99, EMA target rate \tau{=}0.005, followed by 150 iterations of online adaptation collecting 24 episodes each iteration. Each episode includes 200 steps, and the sparse task reward used for Adroit tasks is -1 everywhere and 0 on successful states, aligning with the commonly used choice in offline RL. We calibrate \lambda once after offline initialization by matching the average gradient scale to the average flow-velocity scale, \lambda=\tfrac{\mathbb{E}\left[\lVert v_{\theta}\rVert_{2}\right]}{\mathbb{E}\left[\lVert\nabla_{\hat{a}_{k}}L(s,\hat{a}_{k};\mathcal{Q}_{\phi})\rVert_{2}\right]} where the expectations are estimated using the offline-initialized ensemble and then hold \lambda fixed throughout the online adaptation and deployment.
Baselines
We compare GUARD against: (i) BC, the unsteered flow-matching policy; (ii) LPB [37] and (iii) DynaGuide [11], which use a learned dynamics model to steer predicted future states toward in-distribution regions and desired task outcomes respectively; (iv) UA-Flow [16], which guides flow sampling toward actions with lower predicted uncertainty; (v) Sparse-Q, Q-guided denoising using only the sparse task success reward; and (vi) U-SA, which directly guides denoising using action gradient of joint state-action anomaly scores U(s,a). Every baseline is trained using its prescribed methodology, with an equal data budget (both offline and online) to GUARD, for fair comparison. UA-Flow and U-SA are trained only with \mathcal{D}_{\mathrm{demo}}, as they rely only on the training demonstrations.
Results
In Table I, we evaluate 100 episodes per task in each of the nominal and perturbed dynamics settings. In the latter setting, we add Gaussian noise to the actions to investigate GUARD under distribution shift.
In the nominal setting, GUARD achieves the strongest overall task performance, reaching an average success rate (SR) of 0.96. This corresponds to an average gain of 36.0 percentage points (pp) over the BC policy and a gain of 21.0 pp over the next-best baseline, DynaGuide. Fig. 2 shows how GUARD successfully steers an originally failed trajectory under the BC policy for the Pen task starting from the same initial state. These results establish for RQ1 that GUARD can effectively steer generative policies toward task success and outperform existing steering strategies.
GUARD also consistently keeps the system much closer to in-distribution regions, achieving the lowest state-anomaly scores (AS) on successful episodes for each method across all tasks in the nominal setting. Here, the AS is evaluated using random network distillation (RND) [6, 17], a neutral metric for fair comparison across all methods, using a fixed random target network g and a predictor h trained to regress g on \mathcal{D}_{\mathrm{demo}} inputs, calculating the anomaly score as \mathrm{RND}(s)=\lVert h(s)-g(s)\rVert_{2}^{2}. These results answer RQ2: GUARD realizes substantially stronger support under the policy training distribution.
Finally, we compute both SR and AS in the perturbed-dynamics setting. GUARD achieves an average SR of 0.80 in the shifted environment, a 39.0 and 20.0 pp gain over the BC policy and the next-best baseline, again Dynaguide, and the lowest AS score on average across all tasks. Fig. 3(b) shows our method maintains the highest performance with increasing perturbation levels as shown on the Door task. Thus, answering RQ3, GUARD demonstrates more robust performance across both tests under distribution shift.
Our results indicate the efficacy of GUARD for driving task improvement. The performance gains over U-SA (nominal: +24.0 pp; perturbed: +28.0 pp) indicate the importance of grounding the signal in actions with the Q-function. Gains over the Sparse-Q (nominal: +30.0 pp; perturbed: +30.0 pp) show the value of dense anomaly-signaling. While LPB and DynaGuide utilize a failure-anticipation mechanism by rolling out the predicted dynamics, we find that GUARD outperforms both, suggesting that the dynamics of the contact-rich tasks under test may be challenging to capture accurately. Finally, UA-Flow relies only on the policy uncertainty, which provides a weaker steering signal than GUARD.
Failure Signal Alignment
We compare each method’s failure-detection performance using the AUROC metric aggregated over the episode. Fig. 3(a) shows that GUARD achieves the highest AUROC, demonstrating its ability to reliably identify failures, complementing its steering performance.
L(s,a;\mathcal{Q}) and high state-anomaly scores U(s). (Right) At the moment some fingers lose contact, steering provides a larger action correction \|\Delta a\| folding the fingers back in to maintain a firm grasp and reorient the pen to the target orientation.Training Data Efficiency
GUARD is highly data-efficient in both the offline and online phases. The Q-function reaches near-perfect steered success with only a modest buffer of offline data paired with online training and stays saturated as the buffer grows, whereas the strongest baselines (DynaGuide, LPB) plateau well below it (Fig. 3(c)). The gap between the offline-only (dashed) and offline + online (solid) curves shows that offline training alone is insufficient and that online adaptation supplies most of the leverage for steering. Online, GUARD quickly improves its signaling, climbing to \approx\!0.9 within the first \sim\!10^{5} environment steps and saturating near 1.0, while the baselines improve more slowly and to a lower ceiling (Fig. 3(d)). Thus, GUARD achieves the highest performance with little offline data and some online interactions, a favorable trade-off for a scalable real-world deployment.
Ablation on Anomaly Signal
We ablate the choice of state-anomaly score U(s) by swapping in alternative OOD signals in GUARD, such as input reconstruction error (Recon-AE) [14], RND [17], and learned dynamics-based metrics such as prediction error (Dyn-Err) and ensemble disagreement (Dyn-Ens) [15], as shown in Table II. The state-density logpZO metric we adopt is both the strongest and most stable, while Recon-AE, RND, and Dyn-Ens also remain competitive. In contrast, Dyn-Err collapses, indicating that prediction error conflates model inaccuracy with genuine anomaly and is a poor proxy for how far a state has drifted OOD. This ablation shows that steering benefits from a state-distributional notion of anomaly, and that logpZO is a robust default choice.
- \mathbf{.95{\pm}.005}
- .89{\pm}.03
- .90{\pm}.02
- .61{\pm}.12
- .91{\pm}.008
\sigma_{d} (action noise). (c) Offline data efficiency on Hammer: success rate vs. offline dataset size; dashed = offline-only (no online adaptation), solid = offline + online training. (d) Online data efficiency on Hammer: success rate vs. online interaction (env steps) at the 800-episode offline budget. Overall, GUARD leads across failure detection, dynamics robustness, and data efficiency.V-B Real-World Experiments
We evaluate on three dexterous tasks with a 16-DoF Allegro V5 Plus hand: (1) screwdriver in-hand rotation, requiring continuous rotations throughout the episode without dropping, and screwdriver in-hand reorientation in (2) palm-down and (3) palm-up configurations, requiring the screwdriver to be reoriented vertically below and above the palm, respectively, from a horizontal initial pose, just using its fingers in the fixed-wrist hand, and holding it there for \geq 5 sec. The BC policies are cloned from 64, 256, and 4096 demonstrations, respectively, for each task, each 40 sec long. These demonstrations are generated for each task using an RL expert policy trained with PPO [35] using self-defined dense rewards in the mjlab simulation, with domain randomization of dynamics and observations. The BC policy is a conditional 1D U-Net (channels 256/512/1024, kernel 5) taking 41 dim observations containing joint positions, previously commanded joint positions, and object pose in the palm frame for all tasks. It outputs 16 dim joint-position deltas of chunk length 4 with an execution horizon of 2. It is trained for 100 epochs with batch size 256, learning rate 10^{-4}, cosine schedule, and EMA decay 0.9999, with K{=}10 Euler steps at inference. GUARD uses an ensemble of five Q-functions with pessimism \rho{=}0.5, trained for 200k offline FQE updates on 2000 policy rollouts with batch size 2048, learning rate 10^{-4}, discount \gamma{=}0.95, EMA target rate \tau{=}0.005, followed by \sim 40 iterations of online adaptation collecting 128 episodes in each iteration. The sparse task reward is 0 everywhere and 1 on successful states. We keep dynamics and observation domain randomization enabled to train GUARD under the same noise distribution as seen by the BC policy. Note that GUARD is trained entirely in simulation, for both the offline and online stages, and then evaluated directly in the real world to assess its sim-to-real capabilities.
- Rotation
- 20
- 60
- 80
- 25
- 0.11 \pm0.03
- 0.07 \pm0.02
- Palm-Down
- 70
- 95
- 30
- 5
- 0.05 \pm0.11
- 0.03 \pm0.07
- Palm-Up
- 30
- 10
- 5
- 20
- 0.01 \pm0.00
- 0.02 \pm0.01
L(s,a;\mathcal{Q}) and a jump in state-anomaly score U(s). (Right) Whenever the fingers lose hold of the screwdriver, steering provides a larger action correction \|\Delta a\|, successfully correcting the grasp twice in the episode, and prevents the screwdriver from falling.Results
On the continuous rotation and palm-down reorientation tasks, GUARD substantially improves real-robot performance over the unsteered BC policy (Table III). For rotation, the success rate improves by 40.0 pp, and the drop rate reduces by 55.0 pp. Fig. 4 shows how GUARD successfully steers the policy for the rotation task. On palm-down reorientation, GUARD improves the success rate by 25.0 pp, converting those drops to successful reorientations. The terminal orientation error from the palm normal axis reduces from 4.4^{\circ}\!\to\!2.1^{\circ} and the longest stable object hold duration increases from 32.3\!\to\!37.5 s when evaluated on successful episodes for both methods, indicating tighter and more durable reorientation. GUARD also maintains a low RND score, comparable to BC, on successful episodes, indicating that steered rollouts remain in-distribution and do not encounter OOD states. On the palm-up reorientation task, GUARD hurts performance relative to BC. We attribute this to inaccurate contact modeling in simulation compared to the real world. We observed a pronounced screwdriver rotation mid-execution on the real robot that occurred rarely under the same policy in simulation, resulting in a large sim-to-real gap. Because these transitions were largely absent in the simulation, we hypothesize that the Q-function is unable to anticipate this behavior and thus fails to provide the required correction to recover to high-support regions. We intend to resolve such gaps in future work by training with wider domain randomization and on mixed buffers that incorporate real-world interactions, a commonly used technique in steering methods for real-world deployment (LPB, DynaGuide). This can further close the sim-to-real gap, allowing the Q-function to be well aware of the failure modes actually encountered on hardware.
VI Conclusion and Future Work
We introduced GUARD, an anomaly-informed Q-guidance framework for robustly steering frozen generative robot policies. Rather than relying on task-specific dense rewards or manual failure annotations, GUARD leverages anomaly signals learned from the base policy’s training distribution and combines them with sparse task rewards to learn Q-functions. By propagating this information through the Bellman return, GUARD enables the value gradients to account for both task completion and the likelihood of entering poorly supported states, rather than greedily minimizing instantaneous uncertainty.
Across Adroit dexterous manipulation tasks, GUARD significantly improves task success while maintaining lower anomaly scores than existing steering methods, including under perturbed dynamics. We further demonstrate direct sim-to-real transfer without any real-robot training, achieving performance gains on two of three evaluated tasks. Together, these results demonstrate that signals typically used for runtime failure monitoring can also provide scalable supervision to actively improve generative robot policies through test-time Q-steering methods.
Our results indicate that our anomaly-informed Q-steering can transfer surprisingly well across shifts in dynamics and even to the real world. We hypothesize that task conditions with overlapping successful state distributions and comparable dynamics can reliably transfer the anomaly metrics and subsequent Q-functions, as demonstrated by successful steering across perturbed simulation dynamics and by rotation and palm-down reorientation results in the real world. However, if the environment shift significantly alters the successful state distribution, turning nominal states anomalous and leaving the Q-function unaware of real failure modes, GUARD may no longer provide the required correction. This is exemplified by the palm-up reorientation results.
Future work will explore resolving these issues through mixed simulation and real-world training to further improve real-world transfer and explore extensions to policies with multimodal inputs and broader manipulation tasks.