Abstract
IoT and edge-based inference systems require unique solutions to overcome resource limitations and unpredictable environments. In this paper, we propose an environment-aware dynamic pruning system that handles the unpredictability of edge inference pipelines. While traditional pruning approaches can reduce model footprint and compute requirements, they are often performed only once, offline, and are not designed to react to transient or post-deployment device conditions. Similarly, existing pipeline placement strategies may incur high overhead if reconfigured at runtime, limiting their responsiveness. Our approach allows slices of a model, already placed on a distributed pipeline, to be ad-hoc pruned as a means of load-balancing. To support this capability, we introduce two key components: (1) novel training strategies that endow models with robustness to post-deployment pruning, and (2) an adaptive algorithm that determines the optimal pruning level for each node based on monitored bottlenecks. In real-world experiments on a Raspberry Pi 4B cluster running camera-trap workloads, our method achieves a 1.5x speedup and a 3x improvement in service-level objective (SLO) attainment, all while maintaining high accuracy.
Introduction: The Challenge of Edge Inference Pipelines
Deploying large-scale AI models on resource-constrained IoT sensors or camera traps often necessitates pipeline parallelism. By splitting a model into slices and distributing them across multiple devices, developers can circumvent the memory and compute limits of a single node. However, edge environments are notoriously unpredictable. Transient issues—such as background OS tasks, network fluctuations, or thermal throttling—can suddenly degrade the performance of a single device. In a pipelined system, such a slowdown creates a bottleneck that stalls the entire inference chain, leading to significant latency spikes.
Traditional solutions like static pruning or dynamic re-partitioning fall short. Static pruning cannot adapt to real-time environmental changes, while re-partitioning (moving model weights between devices at runtime) is often too slow and memory-intensive for low-power edge hardware. This paper proposes a novel alternative: dynamic pruning as a load-balancing mechanism.
System Design and Methodology
The proposed system enables specific slices of a distributed model to be pruned or "un-pruned" on the fly to instantly relieve bottlenecked devices. This approach treats neural network pruning not just as a compression step, but as a real-time control knob for resource management.
The framework consists of four primary components:
- Pruning-Aware Training: To prevent the catastrophic accuracy loss typically associated with sudden pruning, the authors employ specialized training regimes. By using smaller batch sizes, higher L2-regularization, and extended training durations, models are made robust to post-deployment channel removal.
- Offline Benchmarking: Prior to deployment, the system profiles hardware to establish linear latency curves and global accuracy models based on varying pruning ratios.
- Dynamic Pruning Controller: A central coordinator monitors end-to-end pipeline latency. If latency exceeds a Service Level Objective (SLO) threshold, the controller intervenes.
- Constrained Optimization: Using the pre-computed benchmarks, the controller determines the optimal pruning ratio for each node to minimize latency while maintaining a minimum accuracy floor. It then signals devices to perform "on-device surgery" using Torch-Pruning to physically remove the least important channels.
Experimental Evaluation
The system was evaluated using a realistic AI-driven animal ecology workload.
- Dataset: The DSAIL-Porini Camera Trap Dataset provided real-world wildlife images from Kenya to test the accuracy of a BioCLIP model.
- Workload: Real camera-trap traces were used to simulate the bursty inference request patterns typical of wild animal movements.
Key Results
The dynamic pruning system demonstrated significant performance gains over static baselines:
- Throughput and Latency: On a Raspberry Pi 4B cluster, the system achieved a 1.5x inference speedup at a 0.3 pruning ratio.
- SLO Attainment: Compared to a static pipeline, the dynamic approach improved SLO compliance by 3x.
- Load Balancing: In scenarios with a 14% load imbalance between nodes, the system roughly halved end-to-end latency while maintaining over 80% accuracy.
Discussion and Insights
A critical finding of this research is that CPUs benefit more than GPUs from dynamic pruning. While GPUs struggle to utilize the fragmented resources freed by pruning due to their lockstep thread execution, CPUs can immediately capitalize on the reduced compute load. Furthermore, the authors discovered that slice accuracy is largely independent. Pruning decisions in one part of the pipeline do not significantly degrade the effectiveness of adjacent slices, allowing for highly granular, node-specific optimization.
Limitations and Future Work
Currently, the controller is reactive, relying on a hysteresis threshold to trigger pruning after a bottleneck occurs. Future iterations could integrate Reinforcement Learning (RL) to proactively anticipate and mitigate bottlenecks before they impact performance. Additionally, while successful with BioCLIP, further testing on standard architectures like ResNet or VGG is needed to confirm broader generalizability.
Summary updated