RetraQ: Manifold-Constrained Critic Guidance for Flow Policies in RL

Retraction-based Q-guidance: a flow policy's own geometry constrains where its critic can push it
Anonymous Authors  ·  Under review at ICLR 2027
Paper Code (anonymized) Interactive Demo Robot Videos
RetraQ on real-world phone-charger plug insertion. A behavior-cloned policy is improved with a learned critic, where each proposed action chunk is filtered and retracted by the policy's own flow. Real-time playback.
55.0 → 76.7%
real-robot success with test-time guidance only (no policy update)
55.0 → 98.3%
real-robot success after 30 min of online RL (100% at 1 h)
+11–15
points over BC on every LIBERO suite after online RL, highest mean success among compared methods
0
extra trainable modules: one critic gradient, one JVP, one forward pass
TL;DR. A critic can be accurate on demonstrated actions and still give unreliable action gradients, because data never constrain the component pointing off the data manifold. RetraQ uses the pretrained flow's one-step denoising map to fix both the direction (its Jacobian keeps the tangent part of ) and the destination ( retracts the stepped action back to the support).

Abstract

A learned critic can improve a pretrained flow-matching policy by steering sampled actions toward higher predicted value. However, even a critic that fits the behavior data well can provide misleading action gradients. Gradient components pointing away from the data-supported region are weakly constrained by behavior data and can lead guidance to exploit critic extrapolation errors. We introduce RetraQ (Retraction-based Q-guidance), which uses geometry encoded by the pretrained flow to constrain both the direction and the destination of critic guidance. A single velocity evaluation of the frozen flow defines a denoising map. RetraQ filters the critic gradient with the map's Jacobian and applies the map itself to correct the updated action. Our analysis characterizes when these operations approximate tangent filtering and retraction onto the behavior manifold. The same update guides actions at test time and provides targets for policy distillation and online reinforcement learning. In controlled studies, RetraQ improves true return while keeping refined actions close to the data-supported region, and its distillation targets remain more stable than those of raw critic ascent. In offline-to-online training on LIBERO and OGBench, RetraQ achieves higher mean final success than the evaluated critic-guidance baselines. On a real-world plug-insertion task, test-time RetraQ improves the success rate of a behavior-cloned policy from 55.0% to 76.7%. Online training further increases success to 98.3% in only 30 minutes and 100% within one hour.

Accurate critic values, unreliable critic gradients

RetraQ overview: the problem, the method, and the real-robot result

The problem

Model the demonstrated actions for a state as a low-dimensional manifold . Critic values observed on determine how changes along tangent directions, but not along normal directions. Two critics that agree on every data-supported action can have arbitrarily different normal derivatives.

Raw ascent follows this unconstrained normal component off the support, into regions where a high predicted value is often just extrapolation error. Even a perfectly tangent step leaves a curved manifold at finite step size.

What reliable improvement needs

Two operations on an unknown manifold:

① a tangent projector to filter the update direction, and
② a retraction to correct the update destination.

Our key observation: a pretrained flow policy already supplies both, through a single map that costs one velocity evaluation.

Design space: raw ascent, filter only, raw + retract, filter + retract
Two operations, four updates. Only filtering and retracting gives an update that is invariant to the unidentifiable normal gradient ( vs. ) and lands on .

Method: one RetraQ step

Let be the frozen behavior-cloned flow and a guidance level. Treating an action as a partially-noised flow state gives the denoising map

1Critic gradient

Read the critic at an action sampled from the policy.

2Filter

Keep the tangent part; suppress the normal part that behavior data cannot identify.

3Step & retract

Take a finite step, then pull the endpoint back to the behavior support.

RetraQ method diagram
The refined action is either executed directly (test-time guidance) or distilled into the actor as a stop-gradient flow-matching target (offline distillation and offline-to-online RL). A single Jacobian-vector product returns both and , so there is no critic Hessian and no backpropagation through the sampling chain.
PyTorch-style pseudocode
# v_ref: frozen BC velocity   t_g = 0.9: guidance level   Q: critic   M = 1 refinement step
def R(s, a):                                     # denoising map of the frozen flow
    return t_g * a + (1 - t_g) * v_ref(s, t_g * a, t_g)

def refine(s, a, eta):
    g = grad(Q(s, a), a)                         # ① critic gradient
    _, g_f = jvp(lambda x: R(s, x), (a,), (g,))  # ② filter: g_f = J_R g  (one JVP)
    return stopgrad(R(s, a + eta * g_f))         # ③ step, then retract

# offline-to-online (Algorithm 1); test-time guidance only runs refine() and executes a*
pi.load(v_ref); eta = None; warm_up(Q, D_demo)   # actor starts at BC, v_ref stays frozen
while budget_left():
    D.add(rollouts(pi, env))
    for cycle in update_cycles():
        td_update(Q, D); Q_hat = freeze(min(Q1, Q2))
        for _ in range(actor_steps):
            s, a_exec = D.sample()                   # executed chunks
            if eta is None:                          # calibrate once, then hold fixed:
                eta = calibrate(s, a_exec, Q_hat)    # |R(a + eta*g_f) - R(a)| = d_target
            a_tgt = refine(s, a_exec, eta)
            a_bc  = bc_sample(v_ref, s)              # behavior anchor
            loss  = lam_imp * fm_loss(pi, s, a_tgt) + lam_bc * fm_loss(pi, s, a_bc)
            loss.backward(); opt.step()

Why a denoiser is both a filter and a retraction

For the population-optimal flow, with noise scale , the denoising map is a posterior mean and its Jacobian is a scaled posterior covariance (Tweedie's identity):

Near the manifold the posterior concentrates at the nearest manifold point and spreads only along it, so

A learned flow adds the error of its velocity field and of its input derivatives to both operators. Choosing is a trade-off: larger shrinks the terms, but for any velocity with bounded input derivatives as . That is the identity-Jacobian approximation used by prior guidance methods, and it filters nothing. We use () on all platforms.

Ideal denoising map on a ring manifold
Exact computation on a thin ring. (a) With a critic whose normal slope is extrapolated, raw ascent walks off the ring while RetraQ moves along it to the true optimum. (b) points to the nearest ring point. (c) keeps tangent directions () and suppresses normal ones () at . (d) The filtered gradient at three guidance levels.

Interactive: see the geometry yourself

Below is the ideal version of RetraQ, computed exactly in the browser. Behavior actions lie on a curve with thickness . The critic is correct on the curve but has an extrapolated normal slope off it (orange shading = , darker is higher). The star marks the true best action. and are the exact posterior mean and covariance of the data at noise level . They are what a perfectly trained flow would give.

critic gradient its normal part filtered retraction to

Drag the black point anywhere to inspect a single step. Arrows are drawn at a common scale, so the shrinkage of the normal part is visible.

At the black point
noise scale tangent gain normal gain normal part of gradient
tangent gainnormal gaindashed line = current
After the updates
Updatetrue value ↑dist. to ↓
Things to try
  • Default setting (): raw ascent follows the fake normal slope off the ring; RetraQ slides along it to the star.
  • Tick the overlay and press Swap critic: the two critics agree on , yet raw ascent goes to opposite sides. RetraQ's path barely changes, which is the identifiability argument in action.
  • Set or : once is below the data thickness, and the filter disappears. This is the identity-Jacobian limit of prior guidance methods.
  • Switch to Wave and increase the step length. Filter-only drifts off the curved manifold, and the retraction is what brings it back.

Real robot: phone-charger plug insertion

A bimanual humanoid must pick up a charger plug and insert it into a power strip. The task is contact-rich and needs millimetre-level alignment. The platform is an AgiBot G02 dual-arm robot and the base policy is a behavior-cloned (55.0% success). We evaluate the same RetraQ update in three settings: offline-to-online RL, where refined actions are distilled back into the policy; test-time guidance of the frozen policy; and offline distillation of a fixed set of refined targets. Every evaluation uses 60 trials.

Online RL on the real robot

Method0 h0.5 h1.0 h
RetraQ55.098.3100.0
Q-VGM55.095.093.3
QGF55.088.391.7
FlowDPG55.088.386.7

Success rate (%) versus online training time after critic warm-up. All methods start from the same BC policy and the same warmed-up IQL critic, then train their own critics under the same interaction budget. Each entry is the mean over three training runs, with 60 trials per checkpoint and run. RetraQ reaches 98.3% within 30 minutes, 100% after one hour, and is the highest at every checkpoint.

Without online interaction

Test-time guidance, Critic 1 (linear)
Test-time guidance, Critic 2 (nonlinear)
Offline distillation (Critic 1)

Success rate (%), 60 trials per entry. Test-time guidance leaves all policy parameters fixed and refines actions only at detected fork states, using two fork critics (linear and nonlinear in the action deviation) trained on the same 270 forked rollouts. All guidance methods are displacement-matched to RetraQ, so they differ only in direction and destination. RetraQ's gain over BC is significant with Critic 1 (Fisher's exact test, ; with Critic 2); its margin over FlowDPG is not (). With the linear critic, Q-VGM's farthest-iterate selection leaves the data support and fails every trial. Offline distillation fits a fixed set of refined targets under one shared, much larger displacement budget, probing the critic far from its training data: Q-VGM targets make the policy hit the table, FlowDPG targets cause misaligned insertions, and RetraQ targets stay on par with BC (). Baselines are our implementations adapted to this setting.

What does the critic see?

Critic value for every executed action chunk, synchronized with the robot's head camera. In successful rollouts the value rises sharply as the plug approaches and seats in the socket. In failed rollouts it stays flat. Drag the slider to see how this structure emerges during online critic training. Click the chart to seek the video, and switch cameras to watch the same rollout from another viewpoint.

Camera
 
RetraQ (success) BC (failure)
Checkpoint

One action chunk = 30 frames at 30 FPS. Raw critic outputs, not normalized. Critic update counts range from 100 (after warm-up) to 340. The successful and failed rollouts come from different policies (online RetraQ and BC), so the comparison between them is illustrative. The chart cursor follows the head camera, whose frames are aligned with the critic values; the third-person recording is not frame-aligned, so the cursor is hidden in that view.

Simulation results

Controlled study with known geometry

manifold, 30 refinement–distillation rounds, median over 8 actor seeds.

MethodTrue objective ↑Dist. to , p95 ↓
BC reference0.3950.015
Self-distillation0.2660.081
Raw ascent−16.7941.016
Filter-only−0.5820.430
Raw + 0.7740.073
RetraQ0.8270.028

RetraQ reaches the highest true objective while keeping refined actions closest to the known manifold: 2.6× closer than Raw + and 36× closer than raw ascent. This is the high-dimensional counterpart of the playground above.

LIBERO, offline-to-online

Final online success (%), mean ± std over 3 actor seeds, 30 episodes per task and seed. Spatial: the 6 tasks with the lowest BC success; Goal and Object: all 10 tasks.

MethodSpatialGoalObject
BC63.369.055.3
AWR64.8 ± 0.671.9 ± 3.358.4 ± 0.7
FlowDPG60.4 ± 3.668.1 ± 3.249.3 ± 8.0
Q-VGM70.6 ± 0.673.6 ± 0.459.9 ± 2.0
QAM61.5 ± 2.773.1 ± 0.760.9 ± 0.7
Self-distillation35.7 ± 12.959.6 ± 11.942.2 ± 5.3
Raw ascent59.3 ± 7.367.9 ± 5.856.6 ± 6.4
Filter-only63.5 ± 10.170.9 ± 5.657.8 ± 6.0
Raw + 75.4 ± 1.779.4 ± 1.462.1 ± 6.7
RetraQ78.1 ± 4.281.3 ± 3.766.4 ± 5.2

The retraction carries most of the gain; filtering adds another 1.9–4.3 points on every suite, consistent in sign but within the variation across three seeds.

53.0 → 70.3%
RoboMimic Can (multi-human), held-out success after two refinement rounds (Q-VGM 69.0%, Raw + R 67.0%)
98.8%
OGBench cube-single, online learning from an offline-refined initialization (Raw + R 99.0%, Q-VGM 95.0%)

Limitations

Repeated offline distillation without new interaction is a limitation: on LIBERO, RetraQ degrades over three refinement rounds more than AWR or FlowDPG, so its stability advantage holds against raw ascent but not in general. Separating errors in the refined targets from errors in fitting them could help stabilize offline improvement. The Jacobian–vector product through the frozen flow also adds GPU memory. The geometric guarantees are local and asymptotic, and the learned filter weakens in high-dimensional action spaces (normal gain 0.84–0.97 at under a fixed training budget). Refinement also remains tied to the support of the frozen reference flow; combining RetraQ with exploration, or carefully updating the reference, could broaden the behaviors it can learn.

BibTeX

@misc{anonymous2027retraq,
  title  = {{RetraQ}: Manifold-Constrained Critic Guidance for Flow Policies in {RL}},
  author = {Anonymous},
  year   = {2027},
  note   = {Under review at ICLR 2027}
}