Improving Adversarial Robustness via Activation Amplification and Attenuation

Taïga Gonçalves, Yongsong Huang, Tomo Miyazaki, Shinichiro OmachiarXiv 2026

TL;DR

The authors introduce Activation Amplification and Attenuation (A3), a lightweight, plug-in module that significantly boosts the adversarial robustness of deep neural networks. By dynamically scaling internal activations, A3 can either amplify or attenuate non-robust features using the same learnable parameters. During training, the amplified features act as a "negative reference" to guide novel contrastive and ranking losses, forcing the network to effectively suppress adversarial perturbations during inference with negligible computational overhead.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are notoriously vulnerable to adversarial attacks—tiny, imperceptible perturbations designed to mislead a model's predictions. Research suggests this vulnerability stems from the network's reliance on non-robust features: statistical patterns in the training data that are highly predictive but easily disrupted by an attacker.

Prior defense mechanisms attempt to mitigate this by completely pruning, masking, or heavily recalibrating internal features using complex Multi-Layer Perceptrons (MLPs). However, completely discarding these features can hurt standard accuracy, and adding heavy MLP blocks introduces massive parameter overhead while obscuring the interpretability of the defense. Furthermore, many masking methods rely on non-differentiable operations (like top-$k$ selection), which run the risk of gradient obfuscation—giving a false sense of security by merely breaking the attacker's gradient calculations rather than genuinely making the model robust.

Methods

A3 addresses these flaws with a simple, mathematically elegant activation scaling mechanism that can be toggled between two modes: attenuation and amplification.

Fig. 2: Overview of the proposed A3 module. A3 is a plug-in module that can be integrated into various models. The activations z are processed using a small learnable projection Wm and a Gumbel-Softmax Mask(·) operator to produce a channel-wise mask. The resulting mask and activation magnitudes are then passed to Scale(·) to compute a rescaling factor used to either amplify (+) or attenuate (−) the activations depending on the sign of the operation. During training, zamp serves as a negative reference while zatt serves as a positive reference to define novel contrastive and ranking loss functions. During inference, the final predictions are obtained solely from zatt.
  1. Differentiable Masking: Instead of using a hard top-$k$ selection to find non-robust features, A3 applies a linear projection followed by the Gumbel-Softmax trick to generate a channel-wise binary mask ($m$). This ensures the entire module remains fully differentiable and safe from gradient obfuscation.
  2. Logarithmic Scaling: The module calculates the overall activation magnitude ($s_1$) and the masked magnitude ($s_2$). It computes bounded scaling factors using a smooth logarithmic formulation: $$f_m = \frac{\ln(1 + s_2)}{\ln(1 + s_1)}$$ This prevents gradient explosion and stabilizes training against the massive activation spikes typically induced by adversarial attacks.

  3. Dual-Mode Operation: The original activations ($z$) are modified by simply flipping the sign of the scaling operation:

  4. Attenuation Mode ($z_{\text{att}}$): Suppresses the masked features to cleanse the signal. This mode is used during inference.
  5. Amplification Mode ($z_{\text{amp}}$): Intentionally boosts the masked features to degrade model performance.
  6. Novel Objective Functions: During training, the model uses $z_{\text{amp}}$ as a worst-case "negative reference." A Cross-Entropy Ranking Loss forces the network to ensure that attenuated features yield lower error than amplified ones, while a Contrastive Logit Loss minimizes the distance between clean and adversarial attenuated features.

Datasets

The authors evaluated A3 across three standard image classification benchmarks:

  • CIFAR-10
  • CIFAR-100
  • Tiny ImageNet

These datasets were tested using popular backbone architectures (ResNet-18 and WideResNet-34-10) combined with standard adversarial training frameworks like PGD, TRADES, and MART.

Key Insights and Ideas

  • Learning from the Worst Self: The core "aha moment" is using the exact same learnable parameters to create a custom adversary inside the network's feature space. By forcing the network to maximize the performance gap between its amplified (degraded) state and its attenuated (cleansed) state, the module learns highly precise feature boundaries.
  • Visualizing Robustness: Grad-CAM visualizations reveal that the amplification mode actively highlights class-irrelevant background noise (e.g., the sky around an airplane). Attenuation mode successfully dampens these regions, forcing the model to focus strictly on the robust, class-defining object.
Grad-CAM attention maps showing how attenuation focuses on class-relevant areas compared to amplification
  • Natural Separation: Activation distribution analysis shows that simply inserting A3 causes the network to naturally separate adversarial perturbations into a distinct, low-magnitude peak that can be easily zeroed out during attenuation.

Key Results

A3 consistently outperformed existing plug-in defenses (such as CAS, CIFS, FSR, and FTA2C) across various datasets and attacks, including the rigorous AutoAttack (AA) benchmark.

  • Robustness Boost: On CIFAR-10 using a ResNet-18 backbone with standard Adversarial Training (AT), A3 achieved an AutoAttack accuracy of 47.28%, outperforming the vanilla baseline (44.28%) and beating the next best plug-in module, FSR (45.92%).
  • Extreme Efficiency: Unlike methods that introduce heavy parameter overhead, A3 is incredibly lightweight. For a ResNet-18 backbone, A3 added only 0.27M parameters, compared to 1.26M for FSR and a massive 10.71M for FTA2C, while requiring virtually no extra FLOPs.

Limitations and Future Work

Like most adversarial defense mechanisms, A3 exhibits a slight trade-off between robustness and clean accuracy. The authors note a modest decrease in clean image accuracy compared to vanilla backbones, which they attribute to the relative absence of harmful activations in clean images, making the attenuation operation less beneficial in non-attack scenarios.

Future work could explore dynamically adjusting the scaling intensity ($\alpha_{\text{att}}$ and $\alpha_{\text{amp}}$) based on whether the input is flagged as clean or adversarial, potentially mitigating the clean accuracy penalty.

Summary updated

BibTeX
@misc{goncalves2026improving,
  author = {Taïga Gonçalves and Yongsong Huang and Tomo Miyazaki and Shinichiro Omachi},
  title = {{Improving Adversarial Robustness via Activation Amplification and Attenuation}},
  year = {2026},
  eprint = {2606.27784},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.27784},
}
Figure