Attention Footprints per Primitive: Attacking and Defending Robot Policies at Skill Boundaries

Many robot manipulation systems break a task into a short sequence of skills, called primitives: reach toward an object, grab it, move it, place it. A planner picks the next skill and a dedicated controller runs it. Recent attacks show that a printed patch or a specially textured object can pull a vision transformer's attention toward itself. Attention here means the weights a transformer uses to decide which image regions inform its output. Once attention moves, the robot reaches for the wrong thing. These attacks have been tested only on a single grasp or reach. This note proposes that in a multi-skill system, attention redirection has a structure that single-skill studies cannot see. Each skill should look at a predictable part of the scene: reach looks at the target, grab at the gripper–object contact, place at the receptacle. That predictability is both the system's weak point and its most useful defense signal.

The project has two parts. First, a measurement-and-attack study asks which skills are most hijackable, and whether the moments when the system switches skills are the most exploitable. Second, a defense checks, at every control step, whether the active skill's attention still falls in that skill's expected region (its "attention footprint"), using an independent segmenter to locate the regions. The central bet is that a footprint conditioned on the active primitive catches redirection that a single, static attention anchor misses. A static anchor either flags the legitimate attention shifts that happen at every skill switch, or must be loosened so far that attacks slip through.

Core Claim

Primitive-structured policies differ from the monolithic image-in, action-out models that existing attacks target. Their correct attention pattern depends on which primitive is active, and it changes abruptly at each switch. We claim three things. Vulnerability to attention hijacking differs across primitives. The first steps after a primitive switch, when a new controller has to re-acquire its target, are the most vulnerable window. A defense that conditions its expected-attention check on the active primitive detects and recovers from redirection better than primitive-agnostic attention anchoring, at matched false-alarm rates on clean runs and on runs with harmless distractors.

Where This Sits

The attack side builds on three lines of work. Patch-Fool optimizes a single patch to monopolize intermediate-layer attention. It shows vision transformers are less robust than CNNs under this attack: DeiT-S robust accuracy is 6.25% versus 24.00% for ResNet-50. Are Vision Transformers Robust to Patch Perturbations? shows the fragility is specific to targeted patches, not random ones. Attacking Attention of Foundation Models shows that maximizing attention divergence hurts fine-grained spatial tasks most. These papers supply our attack losses and motivate the asymmetry hypothesis, but all of them work on static images.

Two papers bring these attacks into robotics, and they are the closest prior work. Beyond the Patch optimizes a viewpoint-consistent 3D adversarial texture with a Grad-CAM-guided pose loss that steers a wrist-camera policy toward the decoy. TRAP hijacks the chain-of-thought text of reasoning robot policies (vision-language-action models) and shows their attention heads shift to the malicious object. Both evaluate isolated pick, place, or move behaviours on single-policy systems. TRAP's defense compares generated text against the instruction, so it cannot protect policies that emit no text. We differ from both in three ways. We attack a planner-routed system with separate skill controllers. We treat the primitive switch as a target. We build a defense from the skill structure itself.

The system under attack comes from Specialist VLA. It routes reach, grab, move and place through separate low-rank adapters (LoRA, small trainable weight additions) on a frozen TinyVLA-1.3B backbone, chosen by a planner that is re-queried every 30 steps. It was evaluated only in benign simulation, and it uses scripted stage-completion signals. GENMANIP motivates the threat model: modular planners fall to about 11% success on long-horizon chaining and degrade with even one distractor. The defense side reuses ideas from Attention, Please!, which rectifies attention by masking regions outside the predicted focus, and from TGA-ZSR, which anchors adversarial attention to clean attention maps. Both are tested only on static classification. Neither has a notion of attention that is supposed to change over time. To test primitive diversity beyond pick-and-place, we add a non-prehensile pre-grasp slide drawn from PreAfford.

Research Program

Building the testbed. We reproduce the Specialist VLA setup in Robosuite. We train the four LoRA specialists from scripted demonstrations, matching the paper's 1,000 per primitive. We add a fifth "slide-to-edge" specialist for flat objects that cannot be grasped from above. Gemini cannot be attacked white-box, so the planner is an open-weight vision-language model prompted to output primitive names and target arguments. Gemini is attacked only in a transfer setting. A monolithic generalist trained on the same pooled data serves as the single-policy comparison. To study wrist cameras and 3D decoys, we port the same primitive set to ManiSkill3, where Beyond the Patch's textured-object pipeline applies directly.

Primitive-aware attacks. We use two attack surfaces, a printed 2D patch and a textured 3D object. For each, we optimize three objectives:

  1. The attention-hijack loss from Patch-Fool, applied to a chosen specialist.
  2. The Grad-CAM pose-redirection loss from Beyond the Patch.
  3. A new switch-targeted loss. It applies the perturbation's effect only within a window of $w$ steps after a primitive switch, or it targets the planner's categorical output. For example, it pushes the planner to emit "place" while the gripper is still empty.

Comparing a fixed perturbation budget spent uniformly against the same budget concentrated at switches tests the transition-window hypothesis.

Primitive-conditioned footprint monitor. For each primitive $k$ and planner argument (target object $o$, receptacle $r$), we define a relevant region $R_k$. For reach and grab this is the mask of $o$. For place it is the mask of $r$. For slide it is $o$ plus the support edge. The masks come from an independent segmentation model run on the same frames. At step $t$, we compute the share of the active specialist's attention-rollout mass that falls in the region,

$$s_t = \sum_{i \in R_k} a_{t,i},$$

where $a_{t,i}$ is the rollout attention on image token $i$, normalized to sum to one. On clean demonstrations, we fit a per-primitive, per-phase lower quantile $\tau_k(\phi)$, where the phase $\phi$ is the number of steps since the primitive started. That phase dependence lets the expected footprint relax right after a switch. An alarm fires when $s_t < \tau_k(\phi)$ for $m$ consecutive steps.

The response has two parts. We mask image tokens outside $R_k$, in the style of Attention, Please!'s rectification, and re-run the specialist. We also force a planner re-query on the masked image. The segmenter is a separate network, so an attacker must fool both the policy and the segmenter. Section "Decisive Checks" tests that assumption directly with an adaptive attacker.

Baselines

The naive reference point is the undefended system under each attack, alongside its clean success rate. For the specialist system, the strongest reported clean figure is Specialist VLA's 90% full-task success on Robosuite with dynamic re-querying, against 70% for the generalist. We expect our reproduction to land near those numbers before we attack it. If it falls far short, we report attack results relative to our own clean rate.

The strongest existing attacks are TRAP-style patches and Beyond-the-Patch 3D objects, re-implemented on our specialists with identical perturbation area, iteration count and Expectation-over-Transformation augmentations. The relevant reported number is TRAP's average attack success rate of 52.5% on SimplerEnv, against 5.5% for an action-only attack. That number comes from different models and tasks, so we use it as a sanity anchor, not a target. Our switch-targeted attack counts as beating these baselines if, at equal budget, it achieves higher targeted success on full multi-primitive tasks, with non-overlapping 95% confidence intervals over at least 200 seeded episodes per condition.

The strongest existing defense is static attention anchoring. We use two versions. One applies TGA-ZSR's attention-refinement loss, which penalizes the L2 distance between adversarial and frozen clean attention maps, during adapter fine-tuning. The other is Attention, Please!'s primitive-agnostic rectification at test time. TGA-ZSR reports 42.09% zero-shot robust accuracy on static classification. There is no reported result on Lacuna for any attention-anchoring defense on robot manipulation. Every defense gets the same clean data, the same attack-in-the-loop fine-tuning budget in GPU-hours, and the same threshold-tuning protocol on held-out clean episodes. All defenses are compared at a matched 5% false-alarm rate on clean runs.

The key ablation keeps our full monitor but replaces the per-primitive, per-phase threshold with one pooled threshold and one pooled region, namely the union of all task-relevant objects. If this ablation matches the full monitor, the primitive conditioning adds nothing and the core claim fails.

The text- and goal-consistency checks are covered in the next section, because they are the most serious competitors.

Why not just…?

Why not just use TRAP's text-consistency check on the planner's output? A planner that emits primitive names can be checked against the instruction cheaply; TRAP reports under 1% overhead. But an attack on a specialist's visual attention leaves the planner's text untouched, as in Beyond the Patch's Grad-CAM redirection. Our switch-targeted planner attack can also produce a primitive sequence that is plausible yet wrong, such as an early "place," and that sequence still agrees with the instruction's words. We run the text check as a baseline on all attack types. We expect it to catch only object-substitution attacks on the planner.

Why not just check geometrically whether the gripper is moving toward the object the planner named? This is the real threat. An independent detector plus a direction-of-motion test needs no attention access and could match our monitor against redirection attacks on reach. We include it as a baseline with the same segmenter. Our argument is that it reacts only after the robot has moved, and it says nothing during grab and slide, where motion toward the object is correct even while attention has been hijacked to produce a bad contact. The experiment decides it. We measure detection lead time (steps before an irreversible failure) and detection rate split by primitive. If the geometric check matches us on every primitive, we will report that the cheaper check suffices and keep the asymmetry and transition findings as the contribution. A hybrid of the two is an obvious fallback.

Why not just adversarially train the specialists against patches? Patch-Fool reports that standard adversarial training leaves vision transformers highly vulnerable to single-patch attention attacks. Adversarial fine-tuning also costs clean accuracy, which TGA-ZSR documents as its motivation. Retraining each of five adapters against every attack also scales poorly as the primitive library grows. We include patch-augmented adversarial fine-tuning of all adapters as a baseline at equal compute. We would treat it as a win for that alternative if it held clean full-task success within 5 points of the clean rate and still beat our monitor under adaptive attack.

Decisive Checks

Four measurements decide the core claim.

The asymmetry test gives, for each primitive, the smallest patch area at which targeted success exceeds 50%. Each specialist is attacked in isolation from matched start states. The hypothesis predicts that reach and place, which select a location from scene-wide attention, break at smaller budgets than grab. Grab works in a near-field wrist view where the target fills the frame. Equal thresholds across primitives would refute the first claim.

The transition test compares switch-concentrated against uniform perturbation at equal total budget. If switch targeting is not stronger, the vulnerable-window claim fails.

The defense test reports detection rate at a 5% clean false-alarm rate, task success after recovery, and wall-clock overhead. It is reported separately on episodes containing a harmless distractor object, since GENMANIP shows distractors alone degrade modular systems and a monitor must not confuse them with attacks.

The adaptive-attacker test gives the attacker white-box access to the monitor and the segmenter. It adds a term that keeps $s_t$ above threshold, in the spirit of the attention-imperceptible backdoors of Wang et al., which hide triggers inside naturally attended regions. The defense is useful only if forcing attention to stay inside the correct region measurably lowers the attack's ability to change the robot's actions.