Abstract
Vision Transformers (ViTs) are state-of-the-art for image classification but suffer from significant brittleness against adversarial attacks and out-of-distribution (OOD) noise. AdaNCA introduces Neural Cellular Automata (NCA) as lightweight, plug-and-play adaptors to address this. By leveraging NCA’s inherent resilience and a novel "Dynamic Interaction" mechanism, AdaNCA boosts ViT robustness by over 10% with less than a 3% increase in parameters.
Introduction
Vision Transformers (ViTs) have become the gold standard for image classification, yet they possess a significant "Achilles' heel": brittleness. Despite high accuracy on clean data, they are notoriously vulnerable to adversarial attacks and out-of-distribution (OOD) noise like blur or weather effects. While previous research integrated local structures like convolutions, these often improve accuracy without enhancing robustness. AdaNCA addresses the need for a module that dynamically refines visual representations to handle unpredictable inputs without massive computational overhead.
Methods
The authors propose AdaNCA (Adaptor Neural Cellular Automata), where image tokens act as "cells" evolving through local interactions.
Technical Innovations
- Dynamic Interaction (DI): Standard NCAs are computationally expensive for high-dimensional ViT tokens. AdaNCA replaces channel-wise concatenation with a per-token weighted sum, allowing dynamic environment-based interaction.
- Multi-scale DI: Applies DI across multiple dilation rates to capture both fine details and broader context.
- Stochastic Training: Uses random binary masks and varying recurrent steps to mimic biological "self-healing," forcing the model to reach a stable state regardless of noise.
- Optimal Placement Algorithm: A dynamic programming algorithm based on the Set Cohesion Index (κ) identifies redundant network sections where an NCA adaptor most effectively refines information.
Key Insights
- Recurrence as a Buffer: The recurrent nature of AdaNCA allows tokens to iteratively settle into a representation, acting as a buffer against noise. Even if the initial input is perturbed, the recurrence helps the model "converge" back to a clean state.
- Redundancy as Opportunity: Robustness gains are highly correlated with network redundancy. Adaptors placed between similar layers act as "information transmitters" that clarify stage partitions.
- Human-like Resilience: AdaNCA-enhanced models exhibit noise sensitivity patterns that more closely resemble human vision compared to standard ViTs, which often fail on frequency bands that humans find trivial.
Key Results
Evaluated on ImageNet1K and various robustness benchmarks (ImageNet-C/A/R/SK), AdaNCA consistently outperformed baselines.
- Adversarial Boost: On ImageNet1K, AdaNCA provided a 10% absolute improvement in accuracy under adversarial attacks (APGD-DLR).
- Efficiency: These gains were achieved with <3% increase in parameters and minimal FLOP overhead.
- Broad Applicability: The module improved both clean accuracy and robustness across four distinct architectures: Swin, FAN, RVT, and ConViT.
Limitations and Future Work
Current limitations include sensitivity to the number of recurrent steps during testing and the non-negligible computational cost of recurrence. Future work will explore AdaNCA for other vision tasks like object detection and segmentation, as well as performance on larger datasets like ImageNet-21K.
Summary updated