Abstract
Distributed training in deep learning (DL) is common practice as data and models grow. The current practice for distributed training of deep neural networks faces the challenges of communication bottlenecks when operating at scale, and model accuracy deterioration with an increase in global batch size. Present solutions focus on improving message exchange efficiency as well as implementing techniques to tweak batch sizes and models in the training process. The loss of training accuracy typically happens because the loss function gets trapped in a local minima. We observe that the loss landscape minimization is shaped by both the model and training data and propose a data optimization approach that utilizes machine learning to implicitly smooth out the loss landscape resulting in fewer local minima. Our approach filters out data points which are less important to feature learning, enabling us to speed up the training of models on larger batch sizes to improved accuracy.
Introduction
Training deep neural networks with massive batch sizes is essential for distributed scaling, but it often leads to a "generalization gap" where model accuracy plummets. This research addresses two primary obstacles in large-scale training: the tendency for optimization to get trapped in sharp local minima at high batch sizes, and the communication overhead inherent in synchronizing gradients across thousands of GPUs. We hypothesize that the irregularities in the loss landscape are partially caused by irrelevant or noisy data points. By refining the training set, we can implicitly smooth the loss function, allowing large-batch stochastic gradient descent (SGD) to navigate more effectively toward global minima.
Methodology: The Data Optimization Pipeline
The proposed approach involves a multi-step pipeline designed to identify and remove "noisy" data points that do not contribute significantly to feature learning.
- Feature Extraction: A pre-trained ResNet model is used as a feature extractor. Training data is passed through the network, and the output of the penultimate layer is captured as high-dimensional feature vectors.
- Dimensionality Reduction: These vectors are projected into a 2D space using PCA followed by t-SNE to preserve local structures.
- Clustering & Noise Removal: DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is applied to the 2D projection. Points that do not belong to dense clusters are classified as noise.
- Filtered Training: The identified noise is removed, and a smaller target network is trained from scratch using only the "Network filtered" dataset.
Results and Discussion
The study utilized the CIFAR-10 dataset to demonstrate the relationship between batch size and accuracy. A key finding is that removing a small percentage (1-7%) of the most "noisy" data points consistently improved model accuracy for large batch sizes.
As shown in the figure above, there is a clear "sweet spot" for batch sizes. Beyond this point, accuracy begins to degrade—a phenomenon known as the generalization gap. However, the "Network filtered" data achieved significantly higher top-1 accuracy (77.5%) compared to the full dataset (75.2%) at a large batch size of 6,272. This suggests that the ML-based filtering identifies truly detrimental data points rather than simply reducing the dataset size.
Furthermore, scaling tests on the Summit supercomputer using up to 1,536 NVIDIA V100 GPUs revealed that PyTorch's Distributed Data Parallel (DDP) outperformed Horovod at extreme scales. DDP's static messaging approach provided better overlapping of communication and computation compared to Horovod's dynamic queue.
Conclusion
Data quality often outweighs data quantity in the context of large-batch distributed training. By filtering out noise through an unsupervised learning pipeline, we can smooth the loss landscape and overcome the generalization gap. Future work will focus on validating this technique on larger datasets like ImageNet and automating the hyperparameter tuning for the filtering process.
Summary updated