Distractors are the Real Enemy: Visual Distraction Adversarial Perturbations on SAM2-Based Video Tracking and Segmentation

Adonay Demewez Gebremedhin, Mohamad Alansari, Wessam Shehieb, Muzammal NaseerarXiv 2026

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.

As SAM2's confidence drops along the x-axis, its internal mask hypotheses diverge (a) and its attention drifts off-target (b), revealing prime distractor candidates.

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:

  1. Foreground Suppression: Weakens predictions on the actual target.
  2. Distractor-Weighted Foreground Displacement: Actively pushes the foreground mask onto the strongest, recurring distractors in the bank.
  3. Multi-Granular Clutter Corruption: Uses contrastive loss to pull the target’s feature representation closer to distractors and away from its clean history.
Instead of merely erasing the target, DistractAttack pulls foreground predictions toward the most convincing background distractors accumulated in its bank.

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.836 down to 0.420 (vs. 0.689 for 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 from 87.15 to 50.97.
Figure 1. Drift-Rate Error (DRE) vs Not-Reported Error (NRE) performance across video perturbation methods. Higher DRE and NRE represent a balanced and comprehensive attack success.
  • One-shot Perturbation (OP): Perturbing only the first frame (using a 20-frame observation rollout during optimization) craters VOT quality $Q$ from 0.836 to 0.076 and drops average VOS performance from 87.15 to 19.56, beating specialized initialization attacks like VOSPGD (0.172 $Q$ and 24.52 VOS).
  • 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 clean 0.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

Abstract

Promptable video trackers such as SAM2 achieve accurate and robust performance through strong temporal consistency, making them important foundations for downstream video understanding and tracking applications. As their use continues to expand, understanding their robustness to adversarial perturbations becomes increasingly important. Existing attacks on SAM2 largely focus on local mask degradation and short-term temporal feature disruption, leaving its longer-term dynamics and competing object interferences (Distractors) insufficiently explored. We observe that SAM2 itself exposes useful distractor cues when tracking becomes uncertain. Based on these observations, we propose DistractAttack, a white-box attack that uses background distractors to disrupt target tracking persistently. Its core procedure, Counterfactual Distractor Search (CDS), propagates clean and attacked trajectories in parallel to discover plausible competing regions and identify those that become increasingly effective under perturbation. The discovered evidence is accumulated over time to weaken target support and promote recurrent alternatives or disappearance predictions. Extensive experiments under video-level and one-shot perturbations across Visual Object Tracking and Video Object Segmentation demonstrate strong attack effectiveness, raising DRE to $4.4\times$ and NRE to $7.3\times$ their nearest baselines under video perturbation, while transferring effectively across model scales and tracker variants in black-box settings. Project page: https://adonaydem.github.io/sam2-da-page/
BibTeX
@misc{gebremedhin2026distractors,
  author = {Adonay Demewez Gebremedhin and Mohamad Alansari and Wessam Shehieb and Muzammal Naseer},
  title = {{Distractors are the Real Enemy: Visual Distraction Adversarial Perturbations on SAM2-Based Video Tracking and Segmentation}},
  year = {2026},
  eprint = {2611.32011},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.32011},
}
Figure