TL;DR
This paper investigates the efficiency and scalability of Multi-Lane Capsule Networks (MLCN) in multi-GPU environments. They demonstrate that MLCN, when utilizing model parallelism, offers significant speedups over traditional data parallelism, achieving up to a 2x efficiency gain. Furthermore, they introduce and solve the problem of efficiently distributing heterogeneous MLCN lanes across heterogeneous hardware using a greedy heuristic.
What Problem Does This Paper Address?
Deep Neural Networks (DNNs) are increasingly being deployed on parallel hardware for faster training and inference. While data parallelism (splitting the input data across multiple processors) is a common approach, it has limitations, particularly with small batch sizes and communication overhead. Capsule Networks (CapsNets), while offering advantages like improved explainability and location invariance, traditionally suffer from slower execution and lower accuracy compared to Convolutional Neural Networks (CNNs). The Multi-Lane Capsule Network (MLCN) was proposed as a reorganization of CapsNets to improve efficiency and parallelism by creating independent "lanes" within the network. However, the systematic study of MLCN's efficiency and scalability, especially in multi-GPU settings and with heterogeneous hardware, was lacking. This paper aims to fill that gap by thoroughly evaluating MLCN's performance and proposing a solution for its deployment in complex, heterogeneous environments.
Methods
The authors explore two primary parallelization strategies for MLCN:
- Data Parallelism: Similar to traditional DNNs, the input data is split across multiple GPUs, and computations are synchronized. This is applied to both the baseline CapsNet and the MLCN architecture.
- Model Parallelism: This is where MLCN shines. The independent "lanes" within MLCN can be executed on different GPUs. This allows for parallel processing of distinct network components, leading to potentially higher efficiency.
A key contribution is the formulation and solution of the heterogeneous lane-to-hardware deployment problem. Given a set of MLCN lanes with varying computational requirements and a set of heterogeneous hardware accelerators (GPUs), the goal is to find an optimal assignment of lanes to hardware to minimize execution time. They propose a greedy heuristic for this load balancing problem, which involves estimating lane execution costs and then assigning lanes to the least loaded hardware.
Datasets
The experiments were conducted using the MNIST dataset. The authors mention that the results were not sensitive to the input dataset and that they also tested with CIFAR10 and others.
Key Insights and Ideas
- MLCN's inherent advantage: MLCN's lane-based architecture naturally lends itself to model parallelism, offering a significant advantage over the data-parallelism-limited baseline CapsNet.
- Model parallelism is key for MLCN: While MLCN shows some improvement with data parallelism, its true potential is unlocked with model parallelism, where different lanes run on separate GPUs.
- Wider lanes are more efficient: For MLCN, increasing lane width generally leads to greater efficiency gains than increasing lane depth, even for a similar number of parameters. This suggests that the type of computation matters for hardware utilization.
- More lanes don't always mean better performance: Increasing the number of lanes beyond a certain point doesn't necessarily improve performance and can even be less efficient on a single GPU due to overhead.
- Load balancing is critical for heterogeneous systems: When deploying MLCN lanes across diverse hardware, a smart distribution strategy is crucial. A naive random assignment performs poorly compared to a well-designed heuristic.
Key Results
- Efficiency: MLCN with model parallelism is up to 2x more efficient than the original CapsNet (baseline) when using multiple GPUs.
- Scalability: MLCN with model parallelism achieves a near 7.18x speedup with 8 GPUs compared to a single GPU baseline, demonstrating excellent scalability. Data parallelism does not show the same scaling advantage for MLCN.
- Batch Size Impact: Increasing batch size improves performance for both data and model parallelism, but MLCN with model parallelism scales better without requiring a trade-off in accuracy.
- Heterogeneous Deployment: The proposed greedy heuristic for load balancing lanes on heterogeneous hardware was almost 50% faster than a naïve random approach. This advantage increases with the number of lanes and the heterogeneity of the hardware.
Limitations and Future Work
- Future Work on Optimization: The paper mentions that deciding which optimizations to apply to each lane/hardware pair is not trivial and is left for future work.
- Heuristic for Second Problem: While they present a heuristic for the lane-hardware matching problem (load balancing), they acknowledge that the problem of applying different optimizations for different HW and lane pairs is a separate, future research direction.
- Model Parallelism Complexity: While MLCN facilitates model parallelism, implementing it can still be complex, especially in current frameworks.
- Pipelining: The authors note that for very large MLCN networks, pipelining could also be used, but their focus was on demonstrating the advantages of model parallelism.
Summary updated