NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

IRAD: Implicit Representation-driven Image Resampling against Adversarial Attacks

Yue Cao, Tianlin Li, Xiaofeng Cao, Ivor Tsang, Yang Liu, Qing Guo

Adversarial attacks are the "optical illusions" of the machine learning world—tiny, often invisible perturbations added to an image that can trick a state-of-the-art neural network into misclassifying a stop sign as a speed limit sign. While many defenses exist, they often come at a high cost: either they make the model slower, or they significantly degrade performance on normal, "clean" images.

A new paper presented at ICLR 2024, IRAD: Implicit Representation-driven Image Resampling against Adversarial Attacks, proposes a clever solution inspired by the physical world. If a human is confused by a glare or a weird angle, they simply shift their head or move the camera to get a better look. IRAD brings this "resampling" logic to the digital realm.

IRAD draws inspiration from real-world camera resampling to build a continuous representation and sample away adversarial noise.

TL;DR

IRAD defends deep learning models by converting discrete images into a continuous mathematical representation and then "resampling" them using a specialized network called SampleNet. This process effectively strips away brittle adversarial noise while preserving the image's core meaning, offering a fast and robust defense that generalizes across different AI architectures.

What Problem Does This Paper Address?

Most computer vision models treat an image as a fixed grid of pixels. Adversarial attacks exploit this rigidity by calculating exact, pixel-level noise that interferes with the model's internal logic.

Existing defenses usually fall into two camps: Adversarial Training (retraining the model on noisy data, which is computationally expensive and specific to certain attacks) and Adversarial Purification (using models like Diffusion to "clean" the image before the classifier sees it). Purification is effective but notoriously slow—sometimes taking seconds per image—making it impractical for real-time systems like self-driving cars.

The authors identify a gap: can we simulate the act of "re-capturing" a scene from a slightly different perspective to break the attack? Naive methods like randomly shifting pixels or using basic blurring (bilinear interpolation) help a little, but they often "smear" the image so much that the AI can't recognize the original object anymore.

Methods

The authors introduce IRAD (Implicit Representation-driven Image Resampling), which consists of two main components:

The IRAD architecture, highlighting how SampleNet predicts pixel-wise coordinate shifts to resample the image from a continuous feature space.
  1. Implicit Continuous Representation: Instead of seeing an image as a 2D array of numbers, IRAD uses a "Local Implicit Image Function." This treats the image as a continuous mathematical landscape. You can query any coordinate (even "between" pixels) to get a color value. This allows for much smoother and more precise manipulations than a standard grid.
  2. SampleNet: This is the "brain" of the defense. It’s a small neural network (an MLP) that looks at the input image and predicts a custom "shift map." For every pixel, SampleNet decides exactly how much to shift the sampling coordinate to best avoid adversarial patterns while keeping the semantic features (like the edges of a butterfly wing) intact.

By training SampleNet on an "adversarial denoising" task, the system learns to automatically find the best way to resample an image to "shake off" the noise.

Datasets

The researchers evaluated IRAD on three standard computer vision benchmarks:

  • CIFAR-10 & CIFAR-100: Small-scale image datasets used for rapid prototyping and benchmarking.
  • ImageNet: The industry-standard large-scale dataset for object recognition.
  • Models: They tested the defense across various architectures, including WideResNet-28-10, ResNet50, VGG16, and ResNet34, to ensure the defense wasn't just "overfitting" to one specific type of AI.

Key Insights and Ideas

  • Adversarial Noise is Spatially Brittle: The core "aha moment" is that adversarial perturbations are highly sensitive to the exact pixel grid they were designed for. By moving to a continuous coordinate space and shifting the sampling points intelligently, you can break the attack's "texture" without losing the object's shape.
  • Learned Shifting vs. Random Shifting: The paper shows that random shifting (Spatial-Variant sampling) hurts accuracy on clean images. SampleNet’s "learned" shifts are the key to maintaining high performance on normal data while still being robust.
  • The Diffusion "Warm Start": One of the most practical insights is that IRAD can be combined with Diffusion-based defenses. By using IRAD first, they can run the Diffusion process for only 20 steps instead of 100, achieving a 5x speedup with almost no loss in defensive power.

Key Results

  • Robustness: On CIFAR-10, IRAD achieved a Robust Accuracy (RA) of 89.72% against the formidable "AutoAttack," compared to 0% for an undefended model.
  • Clean Accuracy: Unlike many defenses that tank performance on normal images, IRAD maintained a Standard Accuracy (SA) of 91.70% (only a ~3% drop from the undefended baseline).
  • Adaptive Attacks: Even when the attacker knows exactly how IRAD works (using a technique called BPDA), IRAD remains highly effective, outperforming other recent "implicit function" defenses like DISCO.
  • Generalization: An IRAD model trained on a ResNet18 could successfully defend a VGG16 or a WideResNet, proving it’s a "plug-and-play" defense.

Limitations and Future Work

While IRAD is significantly faster than Diffusion-based methods, it still adds a small amount of computational overhead due to the MLP queries for every pixel. The authors also note that while it handles "oblivious" attackers extremely well, a truly "adaptive" attacker who has full access to the SampleNet weights can still find ways to reduce its effectiveness, though it remains a much higher bar to clear than previous methods.

Future work could involve integrating IRAD directly into the training loop of the classifier itself, potentially creating a model that is natively "resampling-aware" and even more difficult to fool.

Summary updated

BibTeX
@inproceedings{cao2024irad,
  author = {Yue Cao and Tianlin Li and Xiaofeng Cao and Ivor Tsang and Yang Liu and Qing Guo},
  title = {{IRAD: Implicit Representation-driven Image Resampling against Adversarial Attacks}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=jFa5KESW65},
}
Figure