Abstract
The Convolutional Neural Network (CNN) model, often used for image classification, requires significant training time to obtain high accuracy. To this end, distributed training is performed with the parameter server (PS) architecture using multiple servers. Unfortunately, scalability has been found to be poor in existing architectures. We find that the PS network is the bottleneck as it communicates a large number of gradients and parameters with the many workers. This is because synchronization with the many workers has to occur at every step of training. Depending on the model, communication can be in the several hundred MBs per synchronization. In this paper, we propose a scheme to reduce network traffic through layer placement that considers the resources that each layer uses. Through analysis of the characteristics of CNN, we find that placement of layers can be done in an effective manner. We then incorporate this observation within the TensorFlow framework such that layers can be automatically placed for more efficient training. Our evaluation making use of this placement scheme show that training time can be significantly reduced without loss of accuracy for many CNN models.
Introduction
Distributed deep learning typically relies on the Parameter Server (PS) architecture, where multiple worker nodes compute gradients and a central PS aggregates them. However, as models increase in complexity, the network becomes a massive bottleneck. The primary cause is the constant synchronization of large parameter and gradient sets between workers and the PS. This research introduces RALP (Resource-Aware Layer Placement), a system designed to mitigate this bottleneck by intelligently distributing model layers based on their specific resource demands.
The Resource Disparity in CNNs
The fundamental insight behind RALP is the lopsided resource requirements of different layers within a CNN. Convolution layers are computationally intensive, accounting for approximately 80% of GPU time, but they contain relatively few parameters. Conversely, Fully Connected (FC) layers are "memory-heavy," often containing over 86% of a model's total parameters while requiring very little actual computation.
As illustrated above, the cumulative parameter percentage spikes sharply in the final layers of most models, while computation time is dominated by the initial convolution layers. In a traditional distributed setup, workers waste significant time transmitting these massive FC parameters over the network. RALP exploits this disparity by matching layer needs to the appropriate hardware resources.
RALP: Resource-Aware Layer Placement
RALP consists of two main components that automate the optimization process:
- RALP Profiler: Before training, this component analyzes the CNN's structure. It uses a mathematical "skewness factor" to identify the optimal "split point"—the exact layer where the model should be partitioned to minimize total data transfer.
- RALP Runtime: This component handles the actual placement. It keeps compute-heavy convolution layers on worker GPUs and offloads memory-heavy FC layers to the CPU/memory of the Parameter Server machine.
By colocating the FC layers with the PS, the communication for those layers happens via high-speed internal memory transfer rather than the congested external network. This system is implemented as a wrapper for TensorFlow, requiring only a single line of code change from the user.
Key Results and Evaluation
The system was evaluated using eight popular CNN benchmarks, including AlexNet, VGG11/19, and ResNet-50, across the ImageNet-1K and ImageNet-22K datasets.
As shown in the performance breakdown, RALP (denoted as 'C') significantly reduces the communication overhead (red bars) compared to the standard configuration ('S'). Key findings include:
- Throughput Gains: RALP achieved speedups ranging from 120% to 958% across various models, with some configurations reaching up to 13x faster training than standard TensorFlow.
- Competitive Advantage: RALP consistently outperformed Horovod, a popular ring-reduce framework. For VGG11 on 32 GPUs, RALP reduced the required transfer per step from 6.93 GB to just 0.64 GB.
- Scalability with Complexity: RALP performs exceptionally well as task complexity increases (e.g., moving to the 21,000-category ImageNet-22K), where traditional methods struggle with exploding parameter sizes in the final layers.
Conclusion
RALP demonstrates that intelligent, resource-aware layer placement can drastically improve the scalability of distributed CNN training. While most effective for models with skewed parameter distributions like VGG or AlexNet, it provides a robust framework for reducing network congestion in shared clusters. Future work will focus on extending RALP to multi-PS environments and porting the architecture to imperative frameworks like PyTorch.
Summary updated