[Paper Review] Retrieval-Augmented Convolutional Neural Networks for Improved Robustness against Adversarial Examples
This paper proposes Retrieval-Augmented Convolutional Neural Networks (RaCNN) that combine a pretrained retrieval engine with a deep CNN to improve robustness against adversarial examples. By projecting inputs onto a feature-space convex hull of retrieved nearest neighbors and training with local mixup to enforce local linearity, RaCNN achieves superior robustness—especially against black-box attacks—on CIFAR-10, SVHN, and ImageNet compared to vanilla CNNs.
We propose a retrieval-augmented convolutional network and propose to train it with local mixup, a novel variant of the recently proposed mixup algorithm. The proposed hybrid architecture combining a convolutional network and an off-the-shelf retrieval engine was designed to mitigate the adverse effect of off-manifold adversarial examples, while the proposed local mixup addresses on-manifold ones by explicitly encouraging the classifier to locally behave linearly on the data manifold. Our evaluation of the proposed approach against five readily-available adversarial attacks on three datasets--CIFAR-10, SVHN and ImageNet--demonstrate the improved robustness compared to the vanilla convolutional network.
Motivation & Objective
- Address both off-manifold and on-manifold adversarial examples, which existing defenses often fail to handle simultaneously.
- Improve classifier robustness in real-world deployment scenarios, particularly in cloud-based systems where black-box attacks are common.
- Leverage an off-the-shelf retrieval engine to locally approximate the data manifold without requiring retraining or architectural overhaul.
- Develop a training strategy that enforces local linearity on the data manifold to mitigate on-manifold adversarial examples.
- Balance robustness gains with generalization performance by controlling retrieval set size and computational cost.
Proposed method
- Use a pretrained feature extractor φ′ to compute L2 distances between input x and candidate examples in D′, enabling efficient retrieval via an off-the-shelf engine F.
- Retrieve K nearest neighbors F(x) from D′ using distance k(x,x′) = ||φ′(x)−φ′(x′)||², forming a feature-space convex hull C(F(x)) as a local approximation of the data manifold.
- Apply an attention-based projection mechanism to map the input x onto the convex hull C(F(x)), approximating exact projection with learnable weights βk.
- Introduce 'local mixup'—a variant of mixup that generates interpolations only within the retrieved convex hull, encouraging local linearity of the classifier g on the manifold.
- Jointly train the CNN (φ, g) and the retrieval-based projection using cross-entropy loss with local mixup regularization.
- Use the retrieval engine F as a differentiable, goal-driven component that adapts during training to improve robustness through attention-based feature alignment.
Experimental results
Research questions
- RQ1Can a retrieval-augmented architecture improve robustness against both off-manifold and on-manifold adversarial examples simultaneously?
- RQ2How does local mixup, applied within the feature-space convex hull of retrieved neighbors, enhance local linearity and robustness on the data manifold?
- RQ3To what extent does the robustness of the retrieval engine influence the overall adversarial robustness of the RaCNN?
- RQ4How does RaCNN perform under diverse attack types, including white-box and black-box attacks, across datasets of varying scale?
- RQ5Can the trade-off between robustness and clean accuracy be controlled via hyperparameters such as the number of retrieved neighbors?
Key findings
- RaCNN outperforms the vanilla convolutional network in robustness across all five tested attacks—FGSM, iFGSM, DeepFool, L-BFGS, and Boundary—on CIFAR-10, SVHN, and ImageNet.
- The model demonstrated particular resilience to the black-box, decision-based Boundary attack, suggesting strong potential for cloud-based deployment.
- Robustness degradation was observed under the L-BFGS attack, indicating that strong white-box optimizers can still exploit model vulnerabilities despite the defense.
- Even under high-noise adversarial perturbations, the retrieval engine maintained semantic consistency in retrieved results (e.g., fish images still retrieved as fish), indicating robustness to input perturbations.
- The performance of RaCNN is sensitive to the choice of feature extractor φ′; using raw pixels (φ′(x)=x) increases robustness but may reduce clean accuracy.
- The trade-off between robustness and clean accuracy can be tuned by adjusting the number of retrieved neighbors, offering a controllable deployment trade-off.
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.