Introduction
In distributed deep learning, the choice of parameter synchronization protocol significantly impacts both training speed and final model accuracy. Traditionally, practitioners have had to choose between two extremes: Bulk Synchronous Parallel (BSP) and Asynchronous Parallel (ASP). BSP ensures high accuracy by requiring all worker nodes to synchronize gradients at every iteration, but it is highly sensitive to "stragglers" (slow nodes). Conversely, ASP maximizes hardware utilization by allowing workers to update independently, but the resulting "stale gradients" can degrade model accuracy or cause divergence.
The Sync-Switch Framework
Sync-Switch is a hybrid synchronization framework built on TensorFlow that aims to provide the best of both worlds: the high accuracy of BSP and the high throughput of ASP. The system dynamically transitions between protocols based on three core policies:
- Protocol Policy: Training always begins with BSP to establish stability and ensure the model reaches a high-quality region of the loss landscape. Once the training process stabilizes, the system switches to ASP to accelerate the remaining epochs.
- Timing Policy:
- Offline: For recurring jobs, a binary search algorithm identifies the earliest possible epoch to switch to ASP without compromising target accuracy.
- Online: To mitigate transient stragglers during the BSP phase, an elastic policy temporarily removes slow nodes from the cluster, restoring them once the transition to ASP occurs.
- Configuration Policy: To ensure a smooth transition, the system automatically scales hyper-parameters, such as mini-batch size and learning rate, when switching from BSP to ASP.
Theoretical Motivation
The authors justify the BSP-to-ASP transition through the lens of the "population loss" landscape. Early in training, the loss landscape is chaotic and gradients are volatile; here, the strict synchronization of BSP is critical. As training progresses and the learning rate decays, the landscape becomes smoother. In this later phase, the noise introduced by ASP's stale gradients becomes manageable and does not prevent the model from reaching the global minimum.
Experimental Results
The framework was evaluated on Google Cloud Platform using GPU clusters (8 and 16 nodes) with standard benchmarks: CIFAR-10 (ResNet32) and CIFAR-100 (ResNet50).
Key Performance Metrics
- Throughput and Speed: Sync-Switch achieved up to 5.13X higher throughput and a 4X improvement in Time-to-Accuracy (TTA) compared to pure BSP.
- Accuracy Preservation: The system achieved the same converged accuracy as BSP, which was 3.8% higher than pure ASP.
- Robustness: On 16-GPU clusters where pure ASP failed to converge due to gradient noise, Sync-Switch successfully reached convergence by utilizing BSP during the volatile early stages of training.
- Efficiency: The overhead for checkpointing and switching protocols was minimal, accounting for approximately 1.7% of total training time (roughly 36 seconds).
Conclusion
Sync-Switch demonstrates that a significant portion of the training process can be performed asynchronously without sacrificing accuracy, provided the initial phase is handled synchronously. While the offline timing policy requires an initial search cost, it is highly effective for production environments with recurring training workloads. Future work may explore combining Sync-Switch with network optimization techniques like gradient compression to further enhance distributed training efficiency.
Summary updated