TL;DR
This paper introduces a novel method for making deep neural networks (DNNs) running on resource-constrained IoT devices more robust to failures. By leveraging Coded Distributed Computing (CDC) and adapting it to the matrix-matrix operations within DNNs, they achieve near-zero recovery latency, ensuring continuous operation without losing requests, even when devices fail.
What Problem Does This Paper Address?
The proliferation of Internet of Things (IoT) devices has created a massive opportunity for collecting and processing data at the edge. Deep Neural Networks (DNNs) are increasingly being deployed on these devices for tasks like image recognition and natural language processing. However, IoT devices are inherently resource-limited (computation, memory, power) and often operate in unreliable wireless environments, leading to unstable latencies and intermittent device failures. Distributing DNN computations across multiple IoT devices can overcome resource limitations, but this distribution is highly susceptible to failures. Existing methods for handling failures in distributed systems often incur significant recovery overheads, leading to lost requests or substantial delays, which is unacceptable for time-sensitive IoT applications. This paper aims to address this challenge by providing a robust DNN computation framework for IoT that minimizes recovery latency and maintains continuous operation.
Methods
The core of the proposed solution lies in adapting Coded Distributed Computing (CDC) principles to the specific matrix-matrix computations that underpin DNN layers, particularly fully-connected and convolutional layers.
- Analysis of Distributed DNN Computations: The authors first analyze how common distribution techniques (output splitting, input splitting, channel splitting, spatial splitting, filter splitting) affect the underlying matrix-matrix multiplications (GEMM) in DNNs. This analysis reveals that methods splitting weights are more amenable to robustness than those splitting inputs.
- Coded Distributed Computing (CDC) Adaptation: They propose a novel CDC method that introduces extra computations. Specifically, for fully-connected layers, they augment the weight matrix with "coded" weights derived from sums of existing weights. This allows a subset of devices to compute partial results, and if a device fails, the remaining devices can reconstruct the missing output by performing a simple local subtraction.
- Library-Level Implementation: The method is designed to be implemented at the library level (e.g., within matrix multiplication libraries like GEMM), requiring minimal changes to the user's program. This makes it easy to integrate into existing DNN frameworks.
- Constant Cost for Robustness: Unlike traditional modular redundancy methods that linearly increase the number of devices with the number of failures to tolerate, this CDC approach adds a constant number of devices (specifically, one extra device per layer for single-failure tolerance) regardless of the total number of devices in the distributed system. This makes it more scalable for larger deployments.
Datasets
The paper does not explicitly mention training datasets. However, it uses pre-trained models for evaluation:
- LeNet-5: Used to demonstrate the impact of data loss on accuracy for a simple digit recognition task.
- Inception v3: Used to demonstrate the impact of data loss on accuracy for a complex image recognition task.
- AlexNet: Used extensively in the experimental evaluation of system setup, recovery latency, and straggler mitigation.
The experiments are conducted on distributed systems comprising Raspberry Pis (RPis), which are presented as representative of typical IoT/edge devices.
Key Insights and Ideas
- Matrix-Matrix Operations are Key: Understanding how distributing DNN computations affects the underlying matrix-matrix operations is crucial for designing effective robustness mechanisms.
- Weight Splitting is More Robust: Distribution strategies that split weights (e.g., output splitting for FC layers, channel splitting for Conv layers) are more amenable to CDC-based robustness than input splitting strategies.
- Near-Zero Recovery Latency is Achievable: By cleverly encoding computations, the system can recover from failures with minimal to no additional latency, which is a significant improvement over recomputing lost data.
- Constant Overhead for Robustness: The CDC approach offers a scalable way to add robustness, with a constant overhead in terms of additional devices, making it attractive for large-scale IoT deployments.
- Straggler Mitigation Synergy: The extra computational capacity introduced for robustness can also be leveraged to mitigate the "straggler problem" (where slow devices dictate overall latency), leading to improved performance even without failures.
Key Results
- Robustness without Latency: The proposed method ensures that the system never loses a request and experiences near-zero recovery latency when a device fails.
- Performance Improvement: Experiments with AlexNet on a five-device system showed that without robustness, a device failure caused a 2.4x slowdown. With the proposed method, there was no slowdown or service interruption.
- Straggler Mitigation: By using an extra device for robustness, the system could also mitigate the straggler problem, leading to improved latency distributions and performance gains (up to 35% improvement observed in some scenarios).
- Scalable Robustness: The method provides robustness with a constant cost (one additional device per layer for single-failure tolerance), unlike modular redundancy which scales linearly.
Limitations and Future Work
- Single Failure Tolerance (primarily): The core method is demonstrated for tolerating a single device failure per layer. While the paper discusses extending this to multiple failures by adding more devices and partial sums, it acknowledges that full error correction for multiple failures might require more complex coding schemes (e.g., Hamming-style).
- Model Parallelism Focus: The current work focuses on model parallelism for robustness. Future work could explore its application in data parallelism scenarios.
- Generalization to More Failures: The paper suggests future work on extending the robustness to tolerate multiple failures, as illustrated in Figure 18, which shows setups for tolerating two failures.
- New Kernels/Distribution Methods: While the current method aims to avoid new kernels, future work might explore designing specialized kernels for further optimization.
- Full Model Coverage: The paper discusses a hybrid approach (CDC + 2MR) for full model coverage, but further investigation into optimizing this trade-off between hardware cost and coverage is suggested.
Summary updated