Abstract
Despite the soaring use of convolutional neural networks (CNNs) in mobile applications, uniformly sustaining high-performance inference on mobile has been elusive due to the excessive computational demands of modern CNNs and the increasing diversity of deployed devices. A popular alternative comprises offloading CNN processing to powerful cloud-based servers. Nevertheless, by relying on the cloud to produce outputs, emerging mission-critical and high-mobility applications, such as drone obstacle avoidance or interactive applications, can suffer from the dynamic connectivity conditions and the uncertain availability of the cloud. In this paper, we propose SPINN, a distributed inference system that employs synergistic device-cloud computation together with a progressive inference method to deliver fast and robust CNN inference across diverse settings. The proposed system introduces a novel scheduler that co-optimises the early-exit policy and the CNN splitting at run time, in order to adapt to dynamic conditions and meet user-defined service-level requirements. Quantitative evaluation illustrates that SPINN outperforms its state-of-the-art collaborative inference counterparts by up to 2x in achieved throughput under varying network conditions, reduces the server cost by up to 6.8x and improves accuracy by 20.7% under latency constraints, while providing robust operation under uncertain connectivity conditions and significant energy savings compared to cloud-centric execution.
Introduction: The Challenges of Mobile CNN Inference
Running modern Convolutional Neural Networks (CNNs) on mobile devices presents a significant challenge. On-device execution is often too slow or requires accuracy-reducing optimizations. Conversely, cloud-only offloading makes performance dependent on network stability; a connection drop can lead to application failure.
Existing collaborative solutions partition models between device and cloud but often treat CNNs as static pipelines. They fail to account for input-dependent complexity—where some images are easier to classify than others—and lack a safety net for cloud unresponsiveness. SPINN (Synergistic Progressive Inference of Neural Networks) addresses these gaps by making the inference process both distributed and progressive.
The SPINN Framework
SPINN introduces a multi-layered architecture designed to manage the device-cloud relationship dynamically. The system operates in two main phases: offline model preparation and online execution.
Core Components
- Progressive Inference Model Generator: During the offline phase, it injects "early exits" (intermediate classifiers) into a standard CNN. This allows the model to terminate early if a high confidence level is reached, saving computation.
- Dynamic Scheduler: Acting as the system's brain, the scheduler uses a multi-objective optimization (MOO) framework at runtime to determine the optimal split point and confidence thresholds. It balances user-defined Service Level Agreements (SLAs) against real-time network bandwidth and server load.
- CNN Communication Optimiser: To minimize network overhead, SPINN employs 8-bit quantization and LZ4 compression on intermediate feature maps.
- Distributed Execution Engine: Built on PyTorch, this engine handles the actual hand-off between the mobile hardware and the remote server.
- Fault Tolerance: SPINN ensures at least one early exit is executed on-device. If the network fails, the system provides a "best-effort" result from the local exit.
Experimental Evaluation
The researchers evaluated SPINN using standard benchmarks:
- Datasets: CIFAR-100 (50,000 training images) and ImageNet (1.2 million training images).
- Architectures: Popular models including ResNet-50/56, VGG16, MobileNetV2, and Inception-v3.
Key Insights and Results
SPINN demonstrates that model partitioning and early exits are highly synergistic. By combining them, the system can offload complex processing to the cloud while maintaining a functional local backup.
- Throughput and Efficiency: SPINN outperformed state-of-the-art systems like Neurosurgeon and Edgent by up to 2× in throughput. It also reduced server-side computation costs by up to 6.8× by resolving many tasks locally via early exits.
- Accuracy and Robustness: Under strict latency constraints, SPINN improved accuracy by 20.7% over competitors. In scenarios of server failure, SPINN maintained high accuracy through local fallbacks, whereas non-progressive baselines failed completely.
- Graceful Degradation: As network conditions worsen, the scheduler automatically shifts more workload to local early exits, ensuring service continuity.
Conclusion and Future Work
SPINN provides a robust framework for distributed CNN inference, though current limitations include a lack of explicit energy optimization and split points restricted to ReLU layers. Future work aims to extend this approach to Recurrent Neural Networks (RNNs) and Transformers, and to explore multi-client cloud resource sharing.
Summary updated