Adversarial patch

On this page 7

An adversarial patch is a localized, visible image region whose pixels have been optimized so that a computer vision model produces a wrong output whenever the patch appears in its field of view. In AI security, it is the best-known form of physical adversarial attack: unlike classic adversarial examples, which spread tiny imperceptible changes across a whole image, a patch concentrates an unrestricted perturbation into one area that can be printed as a sticker, poster or piece of clothing.

The concept was demonstrated in 2017, when a printed patch placed next to a banana caused image classifiers to label the scene as a toaster. Since then, patches have been shown to hide people from object detectors, alter traffic sign recognition and disrupt depth estimation, which makes them a practical concern for any camera-based system operating in uncontrolled environments.

How an adversarial patch is optimized

An adversarial patch is created by gradient-based optimization of the patch pixels against a target model, while the rest of the image stays unchanged. The attacker defines a loss, such as maximizing a target class probability or minimizing the objectness score of a detector, and updates the patch through backpropagation over thousands of training images.

The key ingredient is Expectation over Transformation (EOT). During optimization the patch is randomly scaled, rotated, shifted, recolored and blurred before being pasted into each image, so the final pattern works regardless of position and viewing angle. Physical attacks add a non-printability score that penalizes colors a printer cannot reproduce and a total variation term that keeps the pattern smooth enough to survive camera sensors.

The table below summarizes the main design choices and what each one controls.

ParameterTypical choiceWhat it controls
Patch size2 to 10 percent of image areaAttack strength versus visibility
Attack goalTargeted class or suppressionWhich wrong output is produced
TransformationsScale, rotation, lighting, noiseRobustness in the physical world
Printability penaltyColor distance to printable paletteFidelity after printing
Smoothness penaltyTotal variation lossSurvival of camera blur
Main adversarial patch design parameters

Types of adversarial patch attacks

Adversarial patches differ by the task they attack and by how much the attacker knows about the model. The following table lists the main families documented in research.

VariantTarget systemIntended effect
Universal classifier patchImage classificationForces one chosen label
Detector evasion patchObject detection such as YOLOMakes a person or vehicle vanish
Sign sticker attackTraffic sign recognitionMisreads a stop sign
Adversarial clothingPedestrian detectionEvades detection at many angles
Face accessory patchFace recognitionImpersonation or dodging
Optical flow or depth patchDriving perception stacksCorrupts motion or distance estimates
Common patch attack variants

Most published attacks are white-box attacks, which require access to model gradients. However, patches often show adversarial transferability, so a patch trained on one open-source detector can partially fool another model, and black-box variants use query-based or surrogate optimization to reach similar results.

Adversarial patches compared with other evasion attacks

An adversarial patch is a special kind of evasion attack, and its threat model differs sharply from pixel-level perturbations. The comparison below explains why patches matter more for deployed systems.

PropertyAdversarial patchNorm-bounded perturbation
Perturbation areaSmall local regionEntire image
VisibilityVisible but innocuous-lookingUsually imperceptible
Size constraintArea limit, any pixel valuesLp-norm budget such as L-infinity
Physical feasibilityHigh, printableLow, needs digital access
Typical methodsEOT-based optimizationFGSM, PGD, Carlini-Wagner
UniversalityOne patch for many imagesUsually image-specific
Patch attacks versus perturbation attacks

The decisive difference is that an attacker needs no access to the digital pipeline. Anyone who can place an object in front of a camera can mount the attack, which moves the threat from the data center into streets, stores and factories.

Defenses against adversarial patches

Defenses against adversarial patches either remove the patch influence at inference time or provide certified guarantees that no patch of a given size can change the output. No single defense is complete, so layered approaches are recommended.

  • Adversarial training with patches improves robustness against known patch styles but often fails against adaptive attackers.
  • Input purification, such as detecting high-frequency regions and masking them, works against crude patches but can be bypassed by smooth ones.
  • Certified patch defenses such as PatchGuard and derandomized smoothing use small receptive fields or ablation voting to prove robustness for patches up to a fixed area, usually at a clear accuracy cost.
  • Sensor fusion with lidar, radar or multiple camera views reduces dependence on a single image region.
  • Temporal consistency checks flag objects that disappear abruptly from a tracked video stream.

Security teams should treat claims of patch robustness cautiously. Many early defenses were later broken by adaptive attacks that knew the defense, a pattern also seen with gradient masking, so evaluation must assume an attacker who adapts.

Assessing patch risk in deployed systems

Patch risk is highest where a single camera decision triggers a consequential action without human review. Threat frameworks such as MITRE ATLAS and NIST AI 100-2 list physical evasion as a recognized technique, and red teams increasingly include printed patches in test plans.

SettingRisk levelRecommended control
Autonomous drivingHighSensor fusion and redundancy
Surveillance analyticsHighHuman review of missed detections
Retail checkout visionMediumWeight sensors and audits
Photo tagging servicesLowMonitoring for abuse patterns
Patch risk by deployment setting

The short version

An adversarial patch is a specially designed sticker that confuses AI cameras. To people, it looks like an odd colorful pattern. To the model, it is a powerful signal.

The pattern is calculated by computer, not drawn by hand. It can make a system see a toaster where there is a banana. It can also make a person invisible to a detector. The danger is that anyone can print one.

Where it makes a difference

A logistics company plans to use camera-based person detection to stop autonomous forklifts in a warehouse when workers come close. Before rollout, its security team runs a red team exercise. Using the open-source detector architecture behind the system, the team optimizes a 40 by 40 centimeter printed patch with EOT and attaches it to a safety vest.

In controlled trials, the detector misses the patch wearer in a large share of frames at distances between three and eight meters, while unmodified vests are detected reliably. The team concludes that vision alone is an unacceptable single point of failure. The final design adds lidar-based proximity sensing, requires both sensors to agree before the forklift resumes movement, and logs sudden detection losses for review. The patch test thus changes the architecture before any worker is exposed to the risk.