Introduction
The Rectified Linear Unit (ReLU) has become the ubiquitous choice for activation functions in deep learning due to its ability to accelerate training. However, its unbounded nature ($f(x) = x$ for $x > 0$) introduces a significant security vulnerability. This paper explores how the lack of an upper bound allows adversarial perturbations to be amplified through network layers and proposes "Capped ReLU" as a mitigation strategy.
The Vulnerability of Unbounded Activations
Adversarial examples are inputs designed with minimal, human-imperceptible noise that cause models to fail. In a standard ReLU network, even a small perturbation at the input can be scaled up as it passes through successive layers. Because ReLU does not saturate for positive values, there is no mechanism to dampen these malicious signals.
As shown in Figure 1, the distance between clean and adversarial activations grows significantly as the signal progresses through the network. This amplification is most pronounced when the cap value $\beta$ is high, effectively mimicking the behavior of standard, unbounded ReLU.
Proposed Solution: Capped ReLU
To address this, the authors propose the Capped ReLU function: $$a(z, \beta) = \max(0, \min(z, \beta))$$ By introducing a hyperparameter $\beta$ as a ceiling, the function prevents any single neuron from contributing excessively to the final output, thereby "buffering" the network against noise.
Key Insights
The Depth vs. Value Trade-off
The effectiveness of capping depends on both the value of $\beta$ and the layer in which it is applied. The research indicates that while low caps are generally more robust, their placement matters.
As illustrated in Figure 6, applying a very low cap (e.g., $\beta = 0.01$) can lead to a reduction in the perturbation distance at deeper layers, effectively neutralizing the adversarial noise that was amplified earlier in the network.
The "Zero Gradient" Shield
Capping ReLU creates "flat" regions in the model's loss landscape. In these regions, the gradient is zero, which acts as a shield against gradient-based attacks like Projected Gradient Descent (PGD). If an attacker cannot find a gradient to follow, they cannot easily optimize the perturbation to cause a misclassification.
Experimental Results
Evaluations on the MNIST dataset demonstrated substantial gains in robustness:
- Standard ReLU: PGD attack accuracy fell to 9.47%.
- Capped ReLU ($\beta = 0.01$): Maintained 89.61% accuracy under the same attack without adversarial training.
- Hybrid Defense: Combining Capped ReLU with PGD adversarial training yielded a robust accuracy of 95.43%, while keeping clean accuracy high at 96.55%.
Limitations and Future Directions
The primary challenge with Capped ReLU is the vanishing gradient problem. The same "flat" regions that hinder attackers also make it difficult for standard backpropagation to train the model, particularly in very deep architectures like those used for ImageNet. Future research is needed to explore dynamic capping or strategic placement to balance trainability with security.
Summary updated