Abstract: Machine learning models have demonstrated vulnerability to adversarial attacks, more specifically misclassification of adversarial examples. In this paper, we propose a one-off and attack-agnostic Feature Manipulation (FM)-Defense to detect and purify adversarial examples in an interpretable and efficient manner. The intuition is that the classification result of a normal image is generally resistant to non-significant intrinsic feature changes, e.g., varying thickness of handwritten digits. In contrast, adversarial examples are sensitive to such changes since the perturbation lacks transferability. To enable manipulation of features, a combo-variational autoencoder is applied to learn disentangled latent codes that reveal semantic features. The resistance to classification change over the morphs, derived by varying and reconstructing latent codes, is used to detect suspicious inputs. Further, combo-VAE is enhanced to purify the adversarial examples with good quality by considering both class-shared and class-unique features. We empirically demonstrate the effectiveness of detection and the quality of purified instance. Our experiments on three datasets show that FM-Defense can detect nearly $100\%$ of adversarial examples produced by different state-of-the-art adversarial attacks. It achieves more than $99\%$ overall purification accuracy on the suspicious instances that close the manifold of normal examples.
Introduction
Deep Neural Networks (DNNs) are notoriously vulnerable to adversarial attacks—carefully crafted, often invisible perturbations that trick a model into misclassification. While many defenses exist, they often fall into two traps: brittleness against sophisticated attacks like Carlini-Wagner (CW) and information loss during purification. The authors propose FM-Defense, an attack-agnostic framework that detects and purifies adversarial examples by manipulating "disentangled" semantic features.
Methodology
The core of FM-Defense is the combo-variational autoencoder (combo-VAE). Unlike standard autoencoders that mash all features together, the combo-VAE is trained to "disentangle" latent codes, allowing specific codes to control individual semantic features, such as the rotation of a digit or the thickness of its lines.
Detection is performed via a metric called "Resistance." To check if an image is adversarial, the system slightly varies these latent codes to create several "morphs" of the input. A normal image is resistant to these changes; for example, a handwritten "7" remains a "7" even if its thickness varies. Conversely, adversarial perturbations are highly brittle and tuned to specific original pixels. When the image is morphed along a semantic manifold, the perturbation loses its effect, and the classifier's prediction typically flips.
For purification, the system uses a Deep Gaussian Mixture Model (DGMM) to reconstruct images flagged as suspicious. By capturing both class-shared and class-unique features (like a specific person's identity), FM-Defense ensures purified images are clean yet accurate, avoiding the information loss common in simpler reconstruction methods.
Datasets and Results
The authors evaluated FM-Defense on three widely used benchmarks: MNIST (digits), FMNIST (clothing silhouettes), and CelebA (celebrity faces).
Key results include:
- Near-Perfect Detection: FM-Defense detected nearly 100% of adversarial examples across various attacks, including FGSM, DeepFool, and the notoriously difficult CW attack.
- High Purification Accuracy: The system achieved over 99% purification accuracy on suspicious instances, successfully restoring the image's true label.
- Superiority over Baselines: Against the CW attack on MNIST, FM-Defense maintained 98.78% accuracy, while baselines like MagNet dropped to approximately 19.6%.
Conclusion
FM-Defense exploits the fundamental asymmetry between robust semantic features and brittle adversarial perturbations. By moving images along a semantic manifold, the defense effectively "shakes off" adversarial spells. While the process introduces some computational overhead due to multiple morph generations, it provides a highly interpretable and effective defense against state-of-the-art attacks. Future work will focus on scaling these disentangled representations to more complex datasets like ImageNet.
Summary updated