Instruction-Anchored Gating Against Confusable Distractors in Visuomotor Policies

Robot manipulation policies that learn from camera images break when the scene gets busier. A new pen on the table, a patterned cloth, or a change in lighting can halve success rates. Much of the field's answer has been to decide in advance what counts as "background" and remove it, using segmentation masks, object tracking, or foreground-biased pretraining. That answer misses the hardest and most common case. Often the distractor is a perfectly good foreground object that is wrong only because of what the instruction says. "Pick up the red mug" makes the blue mug a distractor, and the next episode's "pick up the blue mug" reverses the roles. No instruction-blind filter can get this right. The decision about which image regions deserve the policy's attention has to be made by the instruction and the robot's own state, not by the image alone.

We propose to condition a diffusion policy on vision through a gated, sparse cross-attention layer. A diffusion policy is a controller that generates an action sequence by gradually denoising random noise, and cross-attention is a mechanism where one set of tokens selectively reads from another. In our layer, the queries come only from signals a visual distractor cannot corrupt: the language instruction and the robot's proprioceptive state, meaning its joint and gripper readings. The layer is trained with counterfactual scene pairs, in which simulated distractors are inserted at known pixels. Two losses apply to these pairs: one penalizes attention mass on the inserted regions, and one penalizes changes in the predicted action. The claim is that anchoring the reliability decision in distractor-immune modalities and supervising it with counterfactuals removes the failure that defeats segmentation pipelines, global modality gates, and plain scaling alike. That failure is confusion between the target and a look-alike that only the instruction can tell apart.

Where the field stands and what is missing

Several papers motivate the problem. THE COLOSSEUM perturbs 20 manipulation tasks along 14 axes. It finds 30–50% success drops under single perturbations such as added distractors or lighting changes, and failure rates above 75% under compound perturbations. Sundaresan et al. attribute this to over-specified full-scene representations that pick up spurious scene correlations. Scaling Diffusion Policy in Transformer to 1 Billion Parameters, known as ScaleDP, shows that capacity is not the fix. Standard cross-attention conditioning causes gradient spikes as the transformer diffusion policy grows. ScaleDP replaces cross-attention with AdaLN, a global scale-and-shift of every layer's features computed from the observation. Even at 1B parameters it still struggles in "highly cluttered environments with many distractors". This is unsurprising, because a global transform cannot single out specific image patches.

Two families of work supply the defenses we must beat.

The first family removes distractors explicitly before the policy sees them. GROOT lifts tracked object masks into 3D point clouds. ImitDiff cascades GPT-4o, GroundingDINO, MixFormerV2 and MobileSAM to produce semantic masks that guide a policy encoder. Both work when the masks are right. Both inherit every upstream error, with no way to fall back when a mask is wrong. ImitDiff's own cross-attention fuses two resolutions of the same image, not instruction and image.

The second family builds foreground preference into representations. FAC and its robot vision-language extension bias 3D contrastive pretraining toward language-identified foreground. This avoids inference-time pipelines but stays at the level of static segmentation. More importantly, FAC treats "foreground" as instruction-independent, so a confusable mug is foreground just like the target.

The fusion literature supplies our mechanism. Gated cross-attention for drug–target interaction combines Sparsemax attention, which assigns exactly zero weight to most keys, with a learned gate that mixes cross-modal context back into the original features. This prevents one dominant stream from washing out the other. MAF shows that word-to-region cross-attention, rather than global vectors, is what resolves ambiguity between similar instances in phrase grounding. It reports 61.43% versus 38.71% on Flickr30k Entities.

Dynamic modality weighting is also relevant. CASIA-SURF uses squeeze-and-excitation blocks to compute per-sample, channel-wise weights that suppress a degraded sensor, raising true-positive rate from 89.1% to 96.7%. The research file also flags a constraint on this approach: when the gate is computed from the corrupted input itself, it can assign high confidence to the noisy channel. We call this correlated corruption, and we take it as a design rule rather than a footnote.

The closest single prior system is ImitDiff. It differs from our proposal in three ways. It decides relevance with an external, instruction-to-mask pipeline at inference time, whereas we learn relevance inside the policy. Its cross-attention fuses visual scales, whereas ours lets the instruction and robot state read from image patches. It has no training signal that targets distractor attention, whereas we supervise it with counterfactuals.

Core Claim

A visuomotor policy will be robust to instruction-conditional distractors if three things hold. First, its only path from image patches to the action denoiser is a sparse cross-attention whose queries are formed from the instruction and proprioception. Second, a modality-level gate decides how much that visual context to use, and this gate is computed from the same distractor-immune anchors. Third, both are trained so that inserting a distractor neither attracts attention mass nor moves the action.

Concretely, let $h_a$ be anchor tokens built from the instruction embedding and the proprioceptive state, and let $K, V$ be keys and values from visual patch tokens. The conditioning signal passed to the denoiser is

$$ c = g \cdot \mathrm{sparsemax}\!\left(\frac{W_q h_a K^\top}{\sqrt{d}}\right) V + (1-g)\, h_a, \qquad g = \sigma\big(f(h_a, \bar{v})\big), $$

where $d$ is the key dimension, $W_q$ projects the anchor tokens into queries, and $\sigma$ is the logistic function. The gate input $\bar{v}$ is a stop-gradient summary of the attended visual context, so the gate can see the visual evidence but cannot be trained to manipulate it. The sparsemax rows, which we write as $a$, decide which patches matter; $g$ decides how much the attended visual evidence should be trusted at all.

Training augments the diffusion loss $L_{\text{diff}}$ with counterfactual pairs $(o, o')$. Here $o'$ is the same simulator state as $o$ with distractors or lighting changes injected at a known pixel set $D$:

$$ L = L_{\text{diff}} + \lambda_1 \sum_{i \in D} a_i(o') + \lambda_2 \,\big\| \epsilon_\theta(x_t, t, o) - \epsilon_\theta(x_t, t, o') \big\|^2 . $$

The term $a_i(o')$ is the attention weight on patch $i$ in the perturbed scene. The function $\epsilon_\theta$ is the denoiser's noise prediction for the same noisy action $x_t$ at diffusion step $t$. The weights $\lambda_1, \lambda_2$ trade off the two penalties.

The crucial design choice is the content of $D$ in the confusable setting. When we insert an attribute-swapped copy of the target and flip the instruction, the "distractor" pixels are the original target's pixels. The attention loss therefore cannot be satisfied by a generic objectness prior. It can only be satisfied by reading the instruction.

Research Program

The work has three parts.

The first part is an evaluation split that isolates the failure we care about. We extend the COLOSSEUM task generators with a "confusable distractor" factor. This factor duplicates the task-relevant object with one altered attribute (color, size, or category sibling) and pairs scenes with instructions that refer to either copy. Instruction and scene are balanced so that neither alone predicts the target. We keep COLOSSEUM's 14 original factors and its compound perturbations for generic robustness. We also report standard RLBench to confirm that clean-scene performance is not sacrificed.

The second part is the policy. It is a transformer diffusion policy in the ScaleDP style that keeps AdaLN for timestep and proprioception, with the gated sparse cross-attention above as the only visual pathway. We run it on two visual encoders: a generic pretrained vision transformer, and a SAM2 image encoder matching SAM2Act. Testing both separates the contribution of the conditioning pathway from that of encoder priors.

The third part is analysis. We track per-layer gradient norms across depth to test whether sparsemax plus gating removes the cross-attention spikes that led ScaleDP to abandon cross-attention. We also measure attention mass on the true target versus its confusable twin as the instruction flips. If the mechanism works, this mass should swap with the instruction. If the policy is ignoring language, it will not.

Baselines

The naive reference point is a transformer diffusion policy with standard dense cross-attention from action tokens to all image patches. It is trained on the same demonstrations with no counterfactual losses. It shows how much of the problem exists at all in our setup.

The scaling reference is ScaleDP with AdaLN conditioning. We run it at the largest size our compute allows, with the same data and the same number of tuning trials as our method. The file reports that ScaleDP-H outperforms standard DP-T by an average of 21.6% on MetaWorld (ScaleDP). It is the right foil for the claim that global conditioning cannot filter patches.

The strongest existing method on our main benchmark is SAM2Act. The file reports 86.8% average success on RLBench and only a 4.3% performance drop under COLOSSEUM perturbations (SAM2Act), against RVT-2's 81.4% on RLBench (RVT-2). Because SAM2Act's drop on generic perturbations is already small, we do not expect to beat it meaningfully on COLOSSEUM's original factors. Beating it means two things. On the confusable split, we must exceed its success rate by a margin larger than seed variance, which we estimate from five seeds. On the original COLOSSEUM factors, we must stay within its reported 4.3% drop. We rerun SAM2Act from its released recipe on our new split rather than quote it.

The explicit-masking competitor is an ImitDiff-style pipeline. An open-vocabulary detector and SAM-family segmenter, prompted with the instruction, produce masks that are injected into the same diffusion policy. No reported result was found on Lacuna for ImitDiff on RLBench or COLOSSEUM success rates. The file only states that it beats VoxPoser and Manipulate-Anything on 3 of 4 RLBench tasks, so we reimplement it under our compute budget. We also run a GROOT-style object-centric policy on the same tasks.

Four ablations isolate the key ingredient, each trained with the same budget as the full method. The first removes the counterfactual losses but keeps the architecture. The second keeps the counterfactual action-consistency loss but removes the attention loss. The third replaces the anchored gate with a gate computed from visual features, the CASIA-SURF-style design. The fourth replaces sparsemax with softmax.

Why not just…?

Why not just strip distractors upstream with SAM2 or an ImitDiff-style mask pipeline? On generic clutter this is a real threat and may match us. When the target mask is correct, removing the background is hard to beat. The weakness is that GROOT and ImitDiff make a hard, irreversible choice outside the policy and have no fallback when it is wrong. The confusable split is designed to make that choice difficult: detector confusion between attribute-swapped twins sends a wrong mask straight to the controller. We will report the masking pipeline's mask accuracy alongside policy success. If the pipeline's masks are reliably correct on our split and it matches our success, we will conclude that our contribution is limited to cost and latency, not robustness.

Why not just train on randomized distractor augmentation and let the policy learn invariance? This is the most serious alternative, because our counterfactual pairs are themselves a form of augmentation. The second ablation is exactly this baseline: same pairs, action-consistency loss, no attention loss, no anchored queries. If it matches the full method on held-out distractor types, the architecture is unnecessary and we will say so. Our expectation is that action invariance learned without attention supervision is easy to satisfy on the training distractor families but transfers less well. This follows from the observation in AMLRIS that gradients from hard-to-align visual noise destabilize cross-modal mapping. To test transfer, we train counterfactuals on a subset of COLOSSEUM factors and evaluate on the held-out ones.

Why not just use a global squeeze-and-excitation style modality gate? CASIA-SURF shows such gates work when one whole sensor degrades. A confusable distractor, however, does not degrade the camera stream as a whole; it changes which few patches matter. A gate computed from vision is also exposed to correlated corruption. The third ablation tests both points. We predict it helps under lighting perturbations but not on the confusable split.

Why not just scale the policy? ScaleDP already ran this experiment and reports remaining failures in heavy clutter. We include it as a baseline rather than argue the point.

Proposed Experiments

All methods train on the same RLBench-derived demonstrations. They share a GPU-hour budget and the same number of hyperparameter trials, and each is evaluated over five seeds with 25 episodes per task variation.

The decisive check is the instruction-flip test on the confusable split. For each scene we run both instructions and score success only when the policy manipulates the referred object. The full method should succeed on both instructions. Every instruction-blind defense should succeed on at most one, which shows up as success near chance on the paired metric. Alongside this we measure the swap of sparsemax attention mass between target and twin.

The second check is generalization across distractor families. Counterfactual losses are trained on some COLOSSEUM factors and tested on held-out factors and compound perturbations. Here the full method must beat the augmentation-only ablation for the attention loss to justify itself.

The third check is the correlated-corruption test. Under COLOSSEUM's lighting factor, we compare the anchored gate with the vision-computed gate. We record whether $g$ falls when visual evidence degrades, and whether success holds better when it does.

The fourth check concerns scaling. We train depth sweeps of the dense cross-attention, AdaLN, and gated-sparse variants and plot gradient-norm spikes and success against depth. This tests whether cross-attention can be kept at scale rather than abandoned.

Real-robot validation on a small set of tabletop tasks with confusable objects is a final, smaller check. We do not treat it as decisive, given that COLOSSEUM reports only a moderate sim-to-real correlation of failure ($R^2 = 0.614$).

The outcome that would refute the proposal is clear in advance. Suppose the augmentation-only ablation or the SAM2Act encoder alone matches the full method on the instruction-flip test. Then anchoring and attention supervision add nothing, and confusable distractors are already handled by existing encoders and data.