TL;DR
Video foundation models like SAM2 track objects smoothly across frames by leaning heavily on a recurrent memory mechanism. However, that very memory becomes a liability when faced with DistractAttack—a new adversarial attack that subtly nudges the model to lock onto plausible background "distractors" instead of just trying to erase the target. Even worse, tweaking the pixels of just the very first frame is enough to poison SAM2's memory and derail its tracking for an entire video.
What Problem Does This Paper Address?
Imagine pointing at a specific fish in a crowded aquarium video and asking an AI to follow it. Models like Meta’s Segment Anything Model 2 (SAM2) excel at this by maintaining a streaming memory of what the target looks like over time. Because SAM2 is rapidly becoming foundational infrastructure for video understanding, researchers need to know how easily it can be fooled by adversarial perturbations—tiny, imperceptible pixel changes designed to break AI.
Until now, adversarial attacks on SAM2 mostly tried to brute-force erase the object's segmentation mask on individual frames or disrupt features between back-to-back frames. Because SAM2 has strong long-term memory, it often shrugs off these local hiccups and recovers. What remained unexplored was how to weaponize SAM2's biggest natural headache: distractors (competing background objects that look similar to the target) to corrupt its long-term identity tracking.
Methods
The authors noticed a fascinating quirk in how SAM2 fails naturally: right before losing a target, its internal candidate masks start disagreeing, and its decoder attention drifts onto nearby objects.
To exploit this, they built DistractAttack, powered by a novel Counterfactual Distractor Search (CDS). During optimization, CDS runs two realities in parallel: a clean video trajectory and an attacked trajectory. It harvests candidate distractors from three sources: regions that look semantically like the target, rejected mask hypotheses from the clean run, and off-target attention spikes from the attacked run. Reliable target appearances and the most tempting distractors are stored in compact memory banks over time.
Using standard bounded gradient updates ($\ell_\infty$), the attack optimizes three objectives simultaneously:
- Foreground Suppression: Weakens predictions on the actual target.
- Distractor-Weighted Foreground Displacement: Actively pushes the foreground mask onto the strongest, recurring distractors in the bank.
- Multi-Granular Clutter Corruption: Uses contrastive loss to pull the target’s feature representation closer to distractors and away from its clean history.
They test two standard threat setups: Video Perturbation (VP) (applying one universal noise pattern across all frames) and One-shot Perturbation (OP) (perturbing only the initial prompted frame, leaving the rest of the video completely untouched).
Datasets
No training datasets were used—perturbations are optimized directly on test sequences using official pretrained SAM2.1 checkpoints. No new benchmarks were introduced. Evaluation spans two standard tasks:
- Visual Object Tracking (VOT): LaSOT, UTB180, GOT-10k, and LaSOT-ext (including the distractor-heavy DiDi subset).
- Video Object Segmentation (VOS): DAVIS 2017, YouTube-VOS 2018, MOSEv2, and the SA-V test set.
Key Insights and Ideas
- SAM2 snitches on itself: You don't need to manually pick a distractor to fool the tracker; SAM2’s own discarded mask hypotheses and wandering attention maps tell an attacker exactly which background objects it finds confusing.
- Memory turns a one-frame lie into a permanent delusion: In the One-shot Perturbation setting, corrupting just Frame 0 poisons the initial memory state. As SAM2 propagates that corrupted memory across clean frames, tracking collapses completely.
- Distractor-resistant upgrades aren't enough: Recent SAM2 spin-offs (like DAM4SAM and SAMURAI) were specifically engineered with clever memory filters to handle distractors. Yet, adversarial perturbations still slice right through them—and transfer effectively in black-box settings where the attacker doesn't even have access to the target variant's weights.
Key Results
DistractAttack decisively outperforms existing image, tracking, and video attacks across both VOT and VOS:
- Video Perturbation (VP): On SAM2.1-Large, DistractAttack slashes overall tracking quality ($Q$) from a clean
0.836down to0.420(vs.0.689for the runner-up UAP-SAM2). It boosts Drift-Rate Error (DRE—how often the tracker locks onto the wrong thing) to 10.83% ($4.4\times$ higher than the nearest baseline) and Not-Reported Error (NRE—object disappearance) to 15.77% ($7.3\times$ higher). Average VOS $\mathcal{J}\&\mathcal{F}$ score drops from87.15to50.97.
- One-shot Perturbation (OP): Perturbing only the first frame (using a 20-frame observation rollout during optimization) craters VOT quality $Q$ from
0.836to 0.076 and drops average VOS performance from87.15to 19.56, beating specialized initialization attacks like VOSPGD (0.172$Q$ and24.52VOS). - Transferability & Defenses: Perturbations transfer strongly across SAM2 model sizes (Tiny to Large), specialized tracker variants, and long time horizons (optimizing on 100 frames still degrades tracking at 1,000 frames). Combining feature-level and memory-filtering defenses only partially recovers VP tracking quality to
0.532—far short of the clean0.836.
Limitations and Future Work
While perturbations transfer well to unseen models, generating them in the first place relies on white-box access (model weights, auxiliary decoder outputs, and gradients) and requires knowing the video frames (or at least an initial rollout window) and initial prompt mask ahead of time. Furthermore, increasing the perturbation budget makes the noise more visually noticeable. The authors note that current feature and memory defenses offer only partial protection, pointing to a pressing need for stronger adversarial robustness mechanisms around initialization sensitivity and distractor handling in future video foundation models.
Summary updated