DRIFT: Divergent Response in Filtered Transformations for Robust Adversarial Defense

Amira Guesmi, Muhammad Shafique

TL;DR: DRIFT (Divergent Response in Filtered Transformations) is a novel defense that protects neural networks by actively destroying "gradient consensus"—the tendency of different input transformations to point an attacker in the same direction. By using an ensemble of lightweight, learnable filters trained to produce conflicting gradients, DRIFT achieves state-of-the-art robustness on ImageNet with negligible computational overhead.

The Flaw in Current Defenses: Gradient Consensus

Adversarial attacks—tiny, calculated perturbations that fool AI—remain a persistent threat to deep learning models. Most existing defenses fall into two traps:

  1. Gradient Masking: They attempt to hide the gradient (the "map" an attacker uses to navigate the loss landscape). However, clever attackers can easily bypass this using techniques like Backward Pass Differentiable Approximation (BPDA).
  2. Gradient Consensus: Even when defenses use random transformations (like blurring or JPEG compression) to confuse the attacker, the underlying gradients often still align. An attacker can use "Expectation over Transformation" (EoT) to average these signals and find a single, reliable direction that breaks the defense.

The authors identify that the root cause of defense failure isn't a lack of randomness, but the presence of a coherent, low-variance gradient landscape that attackers can exploit.

DRIFT: Engineering Gradient Dissonance

To counter this, the authors introduce DRIFT, a defense that moves from "masking" gradients to actively "destroying" their alignment.

Architecture and Training Strategy

DRIFT places a bank of $n$ lightweight, learnable residual filters in front of a frozen pretrained backbone (like a ResNet or ViT). At inference time, a filter is randomly sampled. Because the filters are small (typically 3x3 convolutions) and the backbone is frozen, the defense is "plug-and-play" and extremely fast.

The secret to DRIFT's success lies in its training objective, which explicitly engineers "gradient dissonance" through four distinct goals:

DRIFT Training Pipeline
  • Clean Accuracy ($\mathcal{L}_{CE}$): Ensures the filters don't distort the image so much that the model loses its original predictive power.
  • Jacobian Separation ($\mathcal{L}_{JS}$): Explicitly penalizes alignment between the gradients of different filters. It forces the "sensitivity" of one filter to be orthogonal to another.
  • Logit-VJP Separation ($\mathcal{L}_{LVJP}$): Enforces divergence at the decision level, ensuring that even if an attacker finds a way to shift the features, the resulting class-level gradients still conflict. This includes separation between pairs of filters and between filters and the identity path.
  • Adversarial Training ($\mathcal{L}_{adv}$): The filters are trained to resist standard attacks crafted against the base model.

By optimizing for these conflicting signals, an attacker trying to aggregate gradients from different filters ends up with noisy, incoherent data that leads nowhere. Crucially, the training includes an "identity path" (no filter) to prevent the defense from having a blind spot where an attacker could simply ignore the filters and attack the base model directly.

Key Results and Performance

The researchers evaluated DRIFT on the ImageNet-1K dataset across diverse architectures, including CNNs (ResNet-v2-50, Inception-v3) and Vision Transformers (ViT-B/16, DeiT-S).

Robustness Comparison Table

DRIFT demonstrates impressive performance across the board, particularly against adaptive attacks designed to break transformation-based defenses:

  • State-of-the-Art Robustness: On ResNet-v2, DRIFT achieved 60.19% robust accuracy against the combined BPDA+EoT attack. This is a massive improvement over prior transformation defenses like JPEG or BaRT, which collapse to near 0% under the same attack.
  • High Clean Performance: Unlike many adversarial training methods that severely degrade standard accuracy, DRIFT maintains high clean performance (e.g., 84.66% on ResNet-v2).
  • Unmatched Efficiency: DRIFT is a featherweight defense. It offers a $14,000\times$ speedup over heavy diffusion-based purification defenses (like DiffPure), adding only 0.4ms of latency per image and requiring just 0.03 GB of additional memory.

Limitations and Future Work

While DRIFT sets a new standard for empirical defenses, it does not provide the mathematical "certified" guarantees offered by methods like Randomized Smoothing (though it significantly outperforms them in practice). The authors note that shallow residual blocks currently work best, but exploring more complex filter architectures or different domains for dissonance (e.g., frequency domain) could further enhance robustness. As with any empirical defense, the ongoing evolution of adaptive attacks will ultimately test the long-term viability of gradient dissonance.

Summary updated

BibTeX
@inproceedings{guesmi2026drift,
  author = {Amira Guesmi and Muhammad Shafique},
  title = {{DRIFT: Divergent Response in Filtered Transformations for Robust Adversarial Defense}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=AYH7uBK1Gg},
}
Figure