The benefits of full data shuffle, now with optimal I/O cost: -wise independence and matrix transposition to the rescue
Peyman Afshani, Rezaul Chowdhury, Mayank Goswami, Jens Kristian R Schou, Francesco Silvestri, Mariafiore Tognon
Abstract
It is known that RandomShuffle, the without replacement version of Stochastic Gradient Descent (SGD), converges faster than with replacement SGD. However, RandomShuffle requires uniformly performing a random permutation of the input sequence, which is known to have high I/O complexity due to data movement across the memory hierarchy. In this paper, we propose a shuffling algorithm with a linear I/O complexity that generates almost-uniformly random permutations with rigorous mathematical guarantees. Specifically, we show that the shuffling algorithm can generate -wise independent permutations. Furthermore, we can extend to -wise independence with a small error in the probability distribution, if the fast memory has at least memory blocks. These results allow us to reach the same expected theoretical convergence as RandomShuffle while achieving optimal linear I/O cost.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext e261daab-b665-4b5b-856e-566be173f383Builds on4
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
- FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 citations
- Provable Benefit of Random Permutations over Uniform Sampling in Stochastic Coordinate DescentDonghwa Kim, Jaewook Lee, Chulhee YunICML 2025
- Permutation-based Rank Test in the Presence of Discretization and Application in Causal Discovery with Mixed DataXinshuai Dong, Ignavier Ng, Boyang Sun, Haoyue Dai et al.ICML 2025
Related papers
- On the Convergence to a Global Solution of Shuffling-Type Gradient AlgorithmsLam M. Nguyen, Trang H. TranNeurIPS 2023 · 5 citations
- Minibatch vs Local SGD with Shuffling: Tight Convergence Bounds and BeyondChulhee Yun, Shashank Rajput, Suvrit SraICLR 2022 · 47 citations
- Random Reshuffling: Simple Analysis with Vast ImprovementsKonstantin Mishchenko, Ahmed Khaled, Peter RichtárikNeurIPS 2020 · 172 citations
- Permutation-Based SGD: Is Random Optimal?Shashank Rajput, Kangwook Lee, Dimitris S. PapailiopoulosICLR 2022 · 15 citations
- SGD with shuffling: optimal rates without component convexity and large epoch requirementsKwangjun Ahn, Chulhee Yun, Suvrit SraNeurIPS 2020 · 83 citations
