[Paper Review] Enhancing Adversarial Defense by k-Winners-Take-All
This paper proposes replacing standard ReLU activations with k-Winners-Take-All (k-WTA) activation to enhance adversarial robustness. By introducing C⁰ discontinuities in the network's output, k-WTA renders gradients undefined at densely distributed input points, blinding gradient-based adversarial attacks. In all tested architectures and training regimes, k-WTA networks significantly outperform ReLU networks under white-box attacks, achieving up to 96.9% robust accuracy on CIFAR-10 and 62.2% on MNIST with natural training.
We propose a simple change to existing neural network structures for better defending against gradient-based adversarial attacks. Instead of using popular activation functions (such as ReLU), we advocate the use of k-Winners-Take-All (k-WTA) activation, a C0 discontinuous function that purposely invalidates the neural network model's gradient at densely distributed input data points. The proposed k-WTA activation can be readily used in nearly all existing networks and training methods with no significant overhead. Our proposal is theoretically rationalized. We analyze why the discontinuities in k-WTA networks can largely prevent gradient-based search of adversarial examples and why they at the same time remain innocuous to the network training. This understanding is also empirically backed. We test k-WTA activation on various network structures optimized by a training method, be it adversarial training or not. In all cases, the robustness of k-WTA networks outperforms that of traditional networks under white-box attacks.
Motivation & Objective
- To address the vulnerability of deep neural networks to gradient-based adversarial attacks.
- To explore whether introducing discontinuities in the network's output can prevent adversarial example generation.
- To develop a minimal architectural change that enhances robustness without altering training procedures.
- To validate that k-WTA maintains trainability despite its non-smooth activation function.
- To demonstrate superior robustness of k-WTA networks under diverse white-box and black-box attacks.
Proposed method
- Replace standard ReLU activations with k-WTA, which retains only the k largest activations in a layer and sets the rest to zero.
- Use k-WTA as a C⁰ discontinuous activation function that renders the network's gradient undefined at densely distributed input points.
- Maintain all other network components (e.g., BatchNorm, convolution, pooling) and training methods unchanged.
- Leverage the fact that discontinuities in weight space are sparse despite dense discontinuities in input space, enabling successful training.
- Use a sparsity ratio γ to control the number of active neurons, with smaller γ increasing discontinuity density.
- Evaluate robustness under PGD, C&W, DeepFool, MIM, and transfer attacks across multiple datasets and architectures.
Experimental results
Research questions
- RQ1Can introducing C⁰ discontinuities in the network’s output prevent gradient-based adversarial attacks?
- RQ2Why does k-WTA maintain trainability despite its non-differentiable activation function?
- RQ3How does k-WTA compare to ReLU in terms of robustness under white-box attacks across different training methods?
- RQ4To what extent do adversarial examples from k-WTA networks transfer to ReLU networks and vice versa?
- RQ5Does the sparsity ratio γ in k-WTA affect the smoothness of the loss landscape and adversarial robustness?
Key findings
- On CIFAR-10, k-WTA-0.1 networks achieved 96.9% robust accuracy under PGD attack with TRADES training, outperforming ReLU networks.
- Even with natural (non-adversarial) training, k-WTA-0.1 on CIFAR-10 reached 96.0% robust accuracy, compared to 95.0% for ReLU under the same setup.
- On MNIST, k-WTA-0.1 achieved 62.2% robust accuracy under PGD attack with natural training, while ReLU achieved 0.0%.
- Transfer attacks across k-WTA and ReLU networks showed significantly lower success rates for k-WTA networks, indicating reduced transferability.
- Diagonal entries in the transfer attack table showed that k-WTA-0.1 (AT) achieved 67.2% robust accuracy under the strongest black-box attack, outperforming ReLU (AT) at 59.4%.
- Loss landscape visualizations confirmed that k-WTA networks remain spiky and discontinuous even after adversarial training, with higher γ values smoothing the surface slightly.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.