Expectation Over Transformation (EOT) is an optimization framework for crafting adversarial examples that remain effective under a distribution of physical-world transformations. Rather than optimizing a perturbation for a single static input, EOT minimizes the expected loss across randomly sampled transformations—such as rotation, scaling, lighting variation, and additive noise—ensuring the attack survives the rendering and capture pipeline.
Glossary
Expectation Over Transformation (EOT)

What is Expectation Over Transformation (EOT)?
A technique for generating robust physical adversarial examples by optimizing the perturbation over a distribution of real-world transformations, such as viewpoint shifts, noise, and distance changes.
Formalized by Athalye et al., EOT addresses the fundamental challenge of physical adversarial attacks: perturbations that fool a digital classifier often fail when printed, photographed, or viewed from different angles. By computing gradients through a differentiable transformation distribution during Projected Gradient Descent (PGD) optimization, EOT produces robust adversarial patches and 3D objects that reliably cause misclassification in embodied perception systems.
Key Characteristics of EOT
Expectation Over Transformation (EOT) is a foundational technique for generating robust physical adversarial examples. It works by optimizing a perturbation not for a single static image, but over a distribution of real-world transformations, ensuring the attack remains effective under varying conditions.
Optimization Over a Distribution
Unlike standard attacks that optimize for a single input, EOT computes the expected value of the loss function across a distribution of transformations T. The objective is to find a perturbation δ that fools the classifier over the entire distribution, not just one sample.
- Formulation:
argmin_δ E_t~T [L(f(t(x+δ)), y_target)] - This prevents overfitting to a specific viewpoint or condition.
- The distribution T typically models 2D/3D changes like rotation, translation, and scaling.
Modeling Real-World Transformations
The power of EOT lies in the composition of the transformation distribution T. It must accurately simulate the physical world's variability to ensure physical realizability.
- Geometric transforms: 3D rotation, perspective projection, translation, and scaling.
- Photometric transforms: Lighting changes, contrast shifts, Gaussian noise, and motion blur.
- Physical constraints: Clipping perturbations to printable color gamuts and enforcing smoothness to avoid high-frequency patterns that printers cannot reproduce.
Enabling Robust Physical Attacks
EOT is the critical enabler for attacks that transfer from the digital lab to the physical world. By training the perturbation to survive noise and viewpoint shifts, it creates adversarial patches and 3D-printed objects that remain effective.
- Adversarial patches: EOT ensures a patch fools a detector regardless of its placement angle or distance.
- 3D adversarial objects: EOT optimizes a texture over a full distribution of 3D object poses, creating a physical turtle classified as a rifle from every angle.
Differentiable Transformations
For gradient-based optimization to work, the transformations in T must be differentiable or use a differentiable approximation. This allows the error signal from the classifier to backpropagate through the transformation to the input perturbation.
- Affine transformations (rotation, scaling) are inherently differentiable.
- Non-differentiable operations like ray-tracing for 3D rendering are often replaced with a differentiable renderer.
- This end-to-end differentiability is what makes joint optimization of the perturbation and transformation robustness possible.
Defense Evaluation Benchmark
EOT is the standard methodology for rigorously evaluating adversarial robustness claims. A defense that only tests against naive, single-image attacks provides a false sense of security.
- Adaptive attacks: A proper security evaluation must assume the attacker uses EOT to overcome input transformations used as a defense.
- Gradient masking detection: EOT helps identify defenses that rely on obfuscated gradients, as the attack's loss landscape is smoothed over the transformation distribution, revealing true vulnerability.
Computational Cost Trade-off
The primary drawback of EOT is its significant computational overhead. Each optimization step requires sampling multiple transformations and performing a forward-backward pass for each.
- Sample complexity: The number of transformation samples per step directly trades off attack reliability against compute time.
- Variance reduction: Techniques are used to reduce the variance of the gradient estimate over T to speed up convergence.
- This cost is the main barrier to scaling EOT to very large models or high-resolution inputs without substantial GPU resources.
Frequently Asked Questions
Core concepts and mechanisms behind Expectation Over Transformation (EOT), the foundational technique for generating robust physical adversarial examples.
Expectation Over Transformation (EOT) is an optimization framework for generating adversarial examples that remain effective under a distribution of real-world transformations. Unlike standard adversarial attacks that craft a perturbation for a single static input, EOT optimizes the perturbation to fool the classifier in expectation over a range of environmental variations—such as viewpoint shifts, lighting changes, distance variations, and sensor noise. The core mechanism modifies the standard adversarial loss function to integrate over a transformation distribution T. At each optimization step, the input is randomly transformed (e.g., rotated, scaled, noised) before computing the gradient. The perturbation is then updated based on the average gradient across these transformed samples. This forces the perturbation to capture invariant features that survive the transformation pipeline, making it robust enough to be printed and placed in a physical scene. The seminal work by Athalye et al. (2018) demonstrated this by creating 3D-printed adversarial objects that consistently fooled classifiers across varying poses and viewpoints.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core concepts surrounding Expectation Over Transformation (EOT) for building physically robust adversarial examples.
Physical Adversarial Attack
The attack class that EOT was specifically designed to enable. Unlike digital-only perturbations, physical attacks must survive printing, lighting changes, camera noise, and viewpoint shifts. EOT formalizes this by optimizing over a distribution of real-world transformations rather than a single static input. Standard attacks like PGD fail when a sticker is photographed from a different angle; EOT-trained perturbations maintain adversarial efficacy across these nuisance variables.
Adversarial Training
The primary defense against EOT-generated attacks. Standard adversarial training augments each minibatch with worst-case perturbations found by PGD. To defend against physical attacks, practitioners must use EOT-based adversarial training, generating perturbations that are robust across transformations during the training loop. This forces the model to learn decision boundaries that are invariant to nuisance variables, directly countering the optimization strategy EOT employs.
Certified Robustness
Formal guarantees that a model's prediction will not change under any perturbation within a specified bound. While EOT generates empirical attacks, certified defenses like randomized smoothing provide provable L2-radius guarantees. The tension: EOT can be used to stress-test certified bounds by searching for physical transformations that violate the assumptions of the certification. A model with a certified radius of 0.3 may still be vulnerable to an EOT-crafted patch that exploits the gap between the certification's mathematical assumptions and physical reality.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us