Physical adversarial attack

Also known as: real-world adversarial attack

On this page 7

A physical adversarial attack is an attack on a machine learning model in which the adversary alters objects, surfaces, light or sound in the real world, rather than digital input files, so that a sensor captures data the model misclassifies. In AI security, a real-world adversarial attack is the point where adversarial examples stop being a laboratory curiosity and become a safety risk for cameras, lidar, microphones and other perception systems.

Unlike a digital evasion attack, the attacker cannot control individual pixels. The perturbation must survive printing, distance, viewing angle, lighting and camera processing, which makes physical attacks harder to build but also far more relevant to deployed systems such as driver assistance, access control and surveillance.

How a physical adversarial attack works

A physical attack starts like a digital one: the attacker optimizes a perturbation that pushes the model toward a wrong output. The difference is that the optimization must model the physical capture pipeline, because the object will be photographed under conditions the attacker does not control.

The standard technique is Expectation over Transformation (EOT). Instead of optimizing against one image, the attacker optimizes the average loss over many random transformations such as rotation, scaling, perspective, brightness shifts, blur and noise. A perturbation that works across this distribution is far more likely to work when printed and filmed.

ConstraintEffect on the perturbationTypical modeling approach
Viewpoint and distancePattern is scaled, rotated and warpedRandom affine and perspective transforms
Lighting changesColors and contrast shiftBrightness and contrast augmentation
Printer color gamutSome colors cannot be reproducedNon-printability penalty on the loss
Sensor and compressionFine detail is lost or blurredBlur, noise and JPEG simulation
Human attentionObvious patterns get noticedArea limits or natural-looking textures
Physical constraints and how attacks account for them

Attacks also add a smoothness penalty, often total variation, because high-frequency noise disappears after printing and capture. The result is usually a visible but innocuous-looking pattern, which is why physical attacks trade imperceptibility for robustness.

Types of physical adversarial attacks

Physical attacks differ by what the attacker can modify and which sensor is targeted. The categories below cover most published work and most threat models used in red teaming.

FormExample targetIntended effect
Adversarial patchObject detector in a camera feedHide a person or create a false object
Sticker perturbationTraffic sign classifierRead a stop sign as another sign
Wearable patternFace recognition or person detectionEvade detection or impersonate someone
3D-printed objectImage classifierMisclassify the object from most angles
Projected lightCamera-based perceptionTemporary perturbation without contact
Sensor-specific spoofingLidar or speech recognitionInject phantom points or hidden commands
Main forms of physical adversarial attacks

Attacks are also classified by goal. An untargeted attack only needs any wrong output, while a targeted attack forces a specific label, which is harder. Hiding attacks suppress a detection entirely and are often the most dangerous for safety-critical systems.

Physical versus digital adversarial attacks

A physical adversarial attack is a subset of evasion attacks with a much stricter threat model. The comparison below explains why results from digital benchmarks do not transfer directly to the physical world.

AspectDigital attackPhysical attack
Input controlEvery pixel or sampleOnly part of the scene
Perturbation sizeTiny, often invisibleLarge, usually visible
Robustness neededOne fixed inputMany angles, distances and lights
Model accessOften white-box in researchOften black-box, relying on transferability
Success rateClose to 100 percent in white-box testsLower and highly condition-dependent
Digital and physical attacks compared

Because attackers rarely know the deployed model, physical attacks often depend on adversarial transferability: a patch optimized on several surrogate models may also fool the target. Ensemble optimization across architectures is the usual way to raise this transfer rate.

Defending perception systems against physical attacks

No single defense removes the risk, so mature teams use defense in depth across the model, the sensors and the system. Defenses designed for small digital perturbations, such as norm-bounded adversarial training, offer limited protection against large localized patches.

DefenseMechanismMain limitation
Patch-aware adversarial trainingTrains on images with simulated patchesCostly, weaker against unseen patterns
Certified patch defensesProvable bounds for small patch regionsAccuracy drop, limited patch size
Input anomaly detectionFlags unusual high-saliency regionsAdaptive attacks can evade it
Sensor fusionCross-checks camera, radar and lidarHigher cost, fusion logic can be attacked
Temporal consistencyRequires stable detections across framesAdds latency to decisions
Defense options and their trade-offs

Threat modeling frameworks such as MITRE ATLAS and the OWASP Machine Learning Security Top 10 help teams document physical attack paths. Red teams should evaluate defenses with adaptive attacks, because a defense tested only against known patches gives a false sense of security, a pattern known as gradient masking.

Limitations and common misconceptions

Physical attacks are real but less reliable than headlines suggest. Success often drops sharply outside the tested distances and angles, and many demonstrations target single-frame classifiers rather than full systems with tracking, maps and redundant sensors.

  • Misconception: a sticker can stop any car. Production stacks combine several sensors and planning checks, so one fooled classifier is not equal to a system failure.
  • Misconception: invisible attacks are common. Most physical perturbations are visible to a careful human observer.
  • Misconception: the risk is only for vision. Audio, lidar and radar systems have their own sensor-specific attack surfaces.

The opposite error is also common. Treating physical attacks as theoretical leads teams to skip robustness testing, even though low-cost printed patterns have repeatedly degraded detectors in controlled field trials.

Explained without jargon

AI cameras learn to recognize things from patterns. A physical adversarial attack uses a specially designed sticker, print or light that confuses those patterns. A person still sees a normal stop sign. The camera system may see something else.

It is like an optical illusion made for a machine instead of a human. The trick works in the real world, not just inside a computer. That is why engineers test their systems against such tricks before using them on roads or at doors.

A typical use case

A company building a warehouse safety system uses cameras with a person detector to slow forklifts when workers are nearby. Before launch, its AI security team runs a physical red-team exercise. They print several adversarial patches on A3 paper, optimized with Expectation over Transformation against three open-source detectors, and attach them to safety vests.

In tests at distances of 3 to 10 meters, the patches cut the detection rate of the production model from 98 percent to about 61 percent under bright overhead lighting. The team responds by adding patch-aware adversarial training, a thermal camera as a second sensor and a rule that requires agreement between sensors before a zone is marked clear. In a repeat trial, missed detections drop below 1 percent, and the exercise becomes part of the quarterly safety review.