Abstract: Deep Learning Systems (DLSs) are increasingly deployed in real-time applications, including those in resource-constrained environments such as mobile and IoT devices. To address efficiency challenges, Dynamic Deep Learning Systems (DDLSs) adapt inference computation based on input complexity, reducing overhead. While this dynamic behavior improves efficiency, such behavior introduces new attack surfaces. In particular, efficiency adversarial attacks exploit these dynamic mechanisms to degrade system performance. This paper systematically explores efficiency robustness of DDLSs, presenting the first comprehensive taxonomy of efficiency attacks. We categorize these attacks based on three dynamic behaviors: (i) attacks on dynamic computations per inference, (ii) attacks on dynamic inference iterations, and (iii) attacks on dynamic output production for downstream tasks. Through an in-depth evaluation, we analyze adversarial strategies that target DDLSs efficiency and identify key challenges in securing these systems. In addition, we investigate existing defense mechanisms, demonstrating their limitations against increasingly popular efficiency attacks and the necessity for novel mitigation strategies to secure future adaptive DDLSs.
Introduction: The Vulnerability of Adaptive Computation
In the race to deploy AI on mobile phones, IoT devices, and edge hardware, researchers developed Dynamic Deep Learning Systems (DDLSs). Unlike static models that perform the same number of operations for every image or sentence, DDLSs use "shortcuts"—they might skip layers if an image is easy to recognize or stop generating text once a logical conclusion is reached. This adaptability is crucial for saving energy and reducing latency in real-time applications.
However, this adaptability creates a new and dangerous "attack surface." While traditional adversarial attacks try to make a model misclassify an input (e.g., seeing a stop sign as a speed limit sign), efficiency attacks aim to maximize computational cost. By adding imperceptible noise to an input, an attacker can force a model to ignore its shortcuts, leading to increased latency, massive energy consumption, and even "Denial-of-Service" (DoS) where a system becomes too slow to be useful in real-time.
Taxonomy of Efficiency Attacks
This study provides the first comprehensive Systematization of Knowledge (SoK) for efficiency attacks. The authors categorize these threats into a taxonomy based on three primary dynamic behaviors identified in DDLS architectures:
- D1: Dynamic Computation per Inference: These attacks target internal execution paths. For example, they might force "early-exit" models to always run to the final layer or increase the "spiking" frequency in neuromorphic hardware, bypassing the energy-saving benefits of sparse activity.
- D2: Dynamic Inference Iterations: These target models that generate output step-by-step, such as Large Language Models (LLMs) or translation tools. Attackers trick the model into generating unnecessarily long sequences or getting stuck in infinite loops.
- D3: Dynamic Output Production: These attacks target downstream tasks that rely on model outputs. In object detection, for instance, an attack might force the model to propose thousands of "phantom" bounding boxes, overwhelming post-processing stages like Non-Maximum Suppression (NMS).
Experimental Evaluation and Key Results
The study evaluates efficiency robustness across several standard benchmarks, including CIFAR-10 for image classification, MS-COCO for image captioning, and MOT17 for object tracking. The results highlight the devastating potential of these attacks:
- Latency Inflation: Attacks like DeepSloth can increase inference latency by up to 5x in multi-exit networks by suppressing early-exit confidence scores, forcing the model to use its most expensive computational path.
- Tracking Collapse: In object tracking scenarios, efficiency attacks increased total runtime by more than 10x (from ~4 seconds to over 46 seconds) while simultaneously crashing tracking accuracy (MOTA) from 1.0 to -81.0.
- Sparsity Exploitation: Attacks on quantized Vision Transformers (ViTs) can increase GPU memory usage by 17.2% and energy consumption by 7% by disrupting the model's ability to skip "zero" values in its mathematical operations.
- Energy as a Weapon: On mobile devices, these attacks are particularly effective. A specific attack on a translation model was shown to drain 30% of a smartphone's battery in just 300 iterations, compared to less than 1% for normal use.
The Defense Dilemma and Future Directions
Efficiency attacks are uniquely dangerous because they are often "stealthy." A security camera might still identify a thief correctly, but if the attack makes the processing take 10 seconds instead of 100 milliseconds, the thief is long gone before the alert triggers.
Current defenses face a "triple trade-off" between accuracy, efficiency, and robustness. For instance, applying JPEG compression to inputs can strip away adversarial noise and restore efficiency, but it often degrades the model's accuracy on the actual task. Furthermore, some attacks are specifically designed to exploit hardware optimizations, such as forcing a GPU to switch from low-precision (INT8) to high-precision (FP16) math, which consumes more memory and power.
Future research must move beyond simple input filters and toward model architectures that are mathematically guaranteed to bound their computational cost, regardless of input noise. There is also a critical need to explore the efficiency robustness of massive models like GPT-4 or Mixture-of-Experts (MoE) architectures, which remain largely unstudied in this context.
Summary updated