Stochastic gradient descent without full data shuffle: with applications to in-database machine learning and deep learning systems
Authors:
Open Access
- 12 April 2024
- journal article
- research article
- Published by Springer Nature in The VLDB Journal
- Vol. 33 (5) , 1231-1255
Abstract
Modern machine learning (ML) systems commonly use stochastic gradient descent (SGD) to train ML models. However, SGD relies on random data order to converge, which usually requires a full data shuffle. For in-DB ML systems and deep learning systems with large datasets stored onblock-addressable secondary storagesuch as HDD and SSD, this full data shuffle leads to low I/O performance—the data shuffling time can be even longer than the training itself, due to massive random data accesses. To balance the convergence rate of SGD (which favors data randomness) and its I/O performance (which favors sequential access), previous work has proposed several data shuffling strategies. In this paper, we first perform an empirical study on existing data shuffling strategies, showing that these strategies suffer from either low performance or low convergence rate. To solve this problem, we propose a simple but noveltwo-leveldata shuffling strategy named , which canavoida full data shuffle while maintainingcomparableconvergence rate of SGD as if a full shuffle were performed. We further theoretically analyze the convergence behavior of and empirically evaluate its efficacy in both in-DB ML and deep learning systems. For in-DB ML systems, we integrate into PostgreSQL by introducing three newphysicaloperators with optimizations. For deep learning systems, we extend single-process to multi-process for the parallel/distributed environment and integrate it into PyTorch. Our evaluation shows that can achieve comparable convergence rate with the full-shuffle-based SGD for both linear models and deep learning models. For in-DB ML with linear models, is 1.6 $$\times $$ $$-$$ 12.8 $$\times $$ faster than two state-of-the-art systems, Apache MADlib and Bismarck, on both HDD and SSD. For deep learning models on ImageNet, is 1.5 $$\times $$ faster than PyTorch with full data shuffle.
Keywords
Funding Information
- Swiss Federal Institute of Technology Zurich
This publication has 38 references indexed in Scilit:
- Why random reshuffling beats stochastic gradient descentMathematical Programming, 2019
- MLlib*: Fast Training of GLMs Using Spark MLlib2019
- Stochastic Learning Under Random Reshuffling With Constant Step-SizesIEEE Transactions on Signal Processing, 2018
- Optimization Methods for Large-Scale Machine LearningSIAM Review, 2018
- Deep Residual Learning for Image Recognition2016
- Petuum: A New Platform for Distributed Machine Learning on Big DataIEEE Transactions on Big Data, 2015
- Stochastic First- and Zeroth-Order Methods for Nonconvex Stochastic ProgrammingSIAM Journal on Optimization, 2013
- Stochastic Gradient Descent Tricks2012
- Large-Scale Machine Learning with Stochastic Gradient Descent2010
- Volcano-an extensible and parallel query evaluation systemIEEE Transactions on Knowledge and Data Engineering, 1994