Abstract
Deep learning models are highly susceptible to adversarial attacks, where small, imperceptible perturbations can lead to incorrect classifications. This paper introduces AdversarialTensors, an open-source framework developed by researchers at Los Alamos National Laboratory. The framework utilizes tensor decomposition—specifically Tucker, Canonical Polyadic (CPD), and Tensor Train (TT) decompositions—to "purify" input images before they reach a classifier. By treating adversarial noise as high-rank interference and applying low-rank approximations, AdversarialTensors achieves robustness competitive with state-of-the-art generative defenses while maintaining significantly lower computational overhead.
Introduction
The brittleness of deep neural networks (DNNs) remains a critical barrier to their deployment in security-sensitive applications. Adversarial attacks, which involve adding carefully crafted noise to inputs, can easily deceive state-of-the-art models. Existing defenses generally fall into two categories: tensor-based methods and generative models. While tensor-based methods are computationally efficient, they have historically struggled with hyperparameter optimization and performance. Conversely, generative methods like Diffusion models or GANs offer high robustness but are often too slow for real-time deployment.
To address this gap, we present the AdversarialTensors Denoiser framework. This approach provides a robust, efficient purification step that can be integrated into existing machine learning pipelines without requiring model retraining.
Methodology: The AdversarialTensors Framework
The core of our defense strategy is the purification of input data through tensor factorization. The process involves three primary stages:
1. Tensorization (Patch and Merge)
Input images are first decomposed into overlapping patches. This localized approach allows the denoiser to capture and preserve structural details that might be lost in a global decomposition. These patches are then organized into higher-order tensors.
2. Factorization as Filtering
The framework applies low-rank tensor approximations using three distinct decomposition methods: Tucker, Canonical Polyadic (CPD), and Tensor Train (TT) decomposition. The underlying principle is that adversarial noise typically manifests as high-rank components within the data. By performing a low-rank approximation, the denoiser effectively filters out the noise while reconstructing the essential features of the image.
3. Systematic Hyperparameter Selection
A major contribution of this work is a systematic way to choose patch size, stride, and rank. We utilize a "Fit score"—the average of clean accuracy and adversarial accuracy—to find the "Goldilocks zone" where the model is robust but retains sufficient detail for classification. The framework is implemented via an open-source library integrated with Ray Tune, allowing for distributed, multi-GPU optimization.
Experimental Results
The AdversarialTensors framework was evaluated on standard computer vision benchmarks, including CIFAR-10, CIFAR-100, and ImageNet, using ResNet-18 and ResNet-24 architectures. Performance was compared against top-ranked models on RobustBench.
| Dataset | Attack Type | Adversarial Accuracy (AA) |
|---|---|---|
| CIFAR-10 | $l_\infty$ | 70.24% |
| CIFAR-10 | $l_2$ | 77.73% |
| CIFAR-100 | $l_\infty$ | 42.68% |
On CIFAR-10 ($l_\infty$), the framework achieved an AA of 70.24%, trailing the absolute state-of-the-art (70.69%) by less than half a percent. While clean accuracy takes a slight hit (e.g., dropping from ~93% to ~85% on CIFAR-10), the gain in robustness is massive, as undefended models often drop to near 0% accuracy under these attacks.
Discussion and Conclusion
AdversarialTensors demonstrates that tensor-based purification is a viable, efficient alternative to heavy generative defenses. Its modular nature allows it to be deployed as a pre-processing layer for legacy systems without retraining.
However, challenges remain. The "clean accuracy tax" highlights the need for more sophisticated merging heuristics to better preserve image detail. Additionally, while faster than diffusion-based methods, the latency of tensor decomposition must be further optimized for high-speed video applications. Future research will explore extending these tensor-based "purifiers" to other domains, such as Large Language Model (LLM) embeddings and multi-modal inputs.
Summary updated