TL;DR
Multi-exit neural networks save energy and time by allowing "easy" images to skip later layers, but they have a hidden security flaw. This paper introduces DeepSloth, an adversarial attack that perturbs inputs to force them through every single layer of a model, effectively negating all efficiency gains and enabling a new kind of "algorithmic denial-of-service" attack on edge devices and IoT hardware.
What Problem Does This Paper Address?
Deep Neural Networks (DNNs) are becoming increasingly massive and computationally expensive. To deploy them on low-power devices (like smartphones or IoT sensors), researchers developed multi-exit architectures (e.g., MSDNets, Shallow-Deep Networks). These models have "early exits"—internal classifiers that can provide an answer early if the model is confident, saving the energy required to run the remaining layers.
However, the authors identify a critical gap: while we know DNNs are vulnerable to attacks that hurt accuracy (evasion attacks), we don't know if they are vulnerable to attacks that hurt efficiency. An adversary might want to maliciously increase the latency of a system—a "slowdown attack"—to drain a device's battery, increase cloud computing costs, or cause a real-time system (like a self-driving car) to miss a critical deadline.
Methods
The authors propose DeepSloth, a white-box adversarial attack designed to maximize computation.
- The Layer-Wise Objective: Traditional attacks like PGD only target the final output. DeepSloth modifies the objective function to target all internal classifiers simultaneously.
- Pushing to Uniformity: Instead of just trying to cause a wrong answer, DeepSloth perturbs the input so that every early exit produces a uniform distribution (maximum entropy). This ensures the model never reaches the confidence threshold required to exit early.
- Universal Variants: They also demonstrate "Universal DeepSloth," where a single, fixed perturbation can be added to any image to cause a slowdown, making the attack much more practical for real-world deployment.
- New Metric: They introduce Efficacy, defined as the area under the "Early-Exit Capability" (EEC) curve, to quantify how well a model utilizes its early exits under pressure.
Datasets
The researchers evaluated their attacks on three popular image classification benchmarks:
- CIFAR-10: A standard dataset of small images.
- Tiny ImageNet: A more complex subset of the full ImageNet dataset.
- CIFAR-100: Used specifically to test "cross-domain" transferability (i.e., can an attack crafted for one task slow down a model performing a different task?).
Key Insights and Ideas
- Standard Attacks Don't Slow Models Down: Interestingly, the authors found that traditional evasion attacks (like PGD) often increase the model's efficiency. Because those attacks push the model to be confidently wrong, the model often exits even earlier than it would on clean data.
- The "Overthinking" Trap: DeepSloth forces models to "overthink" simple samples. It exploits the fact that multi-exit models are designed to be conservative; if they aren't sure, they keep processing.
- IoT Bottlenecking: In "Big-Little" partitioning (where an edge device runs the first few layers and the cloud runs the rest), DeepSloth forces the edge device to send nearly 100% of its data to the cloud, destroying the latency benefits of the edge-cloud split.
- Cross-Mechanism Vulnerability: The attack is surprisingly robust. A DeepSloth perturbation crafted for a multi-exit model can even slow down a SkipNet—a different type of adaptive architecture that skips blocks of layers rather than using explicit exits.
Key Results
- Efficacy Destruction: DeepSloth reduces the efficacy of multi-exit DNNs by 90–100%. In most cases, the model is forced to execute every single layer for every perturbed input.
- Latency Amplification: In simulated IoT deployments, the attack increased average latency by 1.5–5×.
- The Two-for-One Attack: While the primary goal is slowdown, DeepSloth also causes a massive drop in accuracy (75–99%), making it a devastating multi-purpose attack.
- Universal Effectiveness: Even the "Universal" version of the attack, which is harder to craft, managed to reduce efficacy by 5–45% across different architectures.
Limitations and Future Work
- Crafting Cost: Generating a per-sample DeepSloth perturbation is computationally expensive—it takes more work for the attacker to create the "sloth" image than it takes for the victim to process it. However, the authors argue that Universal Perturbations solve this, as the attacker only has to do the heavy lifting once.
- Defense Gap: The authors tested Adversarial Training (AT)—the gold standard for defending against accuracy attacks—and found it "inadequate" against slowdowns. While AT helped slightly, it created a trade-off: the more robust the model became, the less efficient it was on clean data.
- Future Directions: The paper concludes that we need new types of "latency-robust" training and perhaps architectural changes that don't rely solely on confidence thresholds to trigger early exits.
Summary updated