Abstract
Stochastic gradient descent (SGD) and its variants have attracted much attention in machine learning due to their efficiency and effectiveness for optimization. To handle large-scale problems, researchers have recently proposed several lock-free strategy based parallel SGD (LF-PSGD) methods for multi-core systems. However, existing works have only proved the convergence of these LF-PSGD methods for convex problems. To the best of our knowledge, no work has proved the convergence of the LF-PSGD methods for non-convex problems. In this paper, we provide the theoretical proof about the convergence of two representative LF-PSGD methods, Hogwild! and AsySVRG, for non-convex problems. Empirical results also show that both Hogwild! and AsySVRG are convergent on non-convex problems, which successfully verifies our theoretical results.
Introduction: The Challenge of Lock-Free Parallelism
In large-scale machine learning, parallelizing stochastic gradient descent (SGD) is essential for efficiency. Traditional parallel methods rely on software "locks" to ensure data consistency when multiple CPU cores update shared model parameters. However, these locks often become a performance bottleneck.
"Lock-free" strategies, such as Hogwild!, allow threads to read and write to shared memory without synchronization. While significantly faster, this approach introduces "stale" gradients and inconsistent states. Prior theoretical work only guaranteed convergence for convex problems. This paper bridges the gap by providing the first theoretical proof of convergence for lock-free parallel SGD methods—specifically Hogwild! and AsySVRG—in the context of non-convex optimization, which characterizes most modern deep learning models.
Methods: Hogwild! vs. AsySVRG
The study focuses on two primary algorithms:
- Hogwild!: A straightforward parallel SGD where threads update the global parameter vector asynchronously without any locking mechanism.
- AsySVRG (Asynchronous Stochastic Variance Reduced Gradient): A more advanced variant that incorporates variance reduction. It periodically computes a full gradient to "anchor" the noisy stochastic updates, leading to more stable and precise convergence.
To model the asynchronous nature of these systems, the authors introduced a random diagonal matrix to represent atomic updates and accounted for the "read-write gap"—the delay between a thread reading parameters and committing its update.
Experimental Setup
The theoretical findings were validated using two standard non-convex benchmarks:
- MNIST: A dataset of 70,000 handwritten digit images used to train a fully-connected neural network.
- connect-4: A dataset of 67,557 legal board positions used for a classification task.
Key Insights: The Power of Variance Reduction
A central finding is that AsySVRG is theoretically and empirically superior to Hogwild! for non-convex problems.
AsySVRG achieves a faster convergence rate of $O(1/\tilde{T})$ compared to $O(1/\sqrt{\tilde{T}})$ for Hogwild!. Furthermore, AsySVRG does not require the "bounded gradient assumption" typically needed for Hogwild!'s proof, as its variance reduction naturally stabilizes updates near stationary points.
Key Results and Scalability
The empirical results confirm the theoretical proofs. Both methods demonstrate strong scalability, significantly reducing the CPU time required for convergence as the number of threads increases.
Key findings include:
- Faster Convergence: AsySVRG consistently reaches lower training loss faster than Hogwild! across different datasets.
- Computational Complexity: To reach an $\epsilon$-local optimal solution, AsySVRG has a total computation complexity of $O(n^{2/3}/\epsilon)$, outperforming traditional parallel gradient descent.
- Hardware Sensitivity: The authors observed that hardware architecture impacts performance; for instance, using 4 threads on the connect-4 dataset was occasionally slower than 1 thread due to NUMA (Non-Uniform Memory Access) overhead between physical CPUs.
Limitations and Future Work
While this work provides a major theoretical milestone, it focuses on shared-memory systems (Parallel SGD) rather than distributed systems (Distributed SGD) where network latency is a factor. Additionally, like most non-convex research, it proves convergence to a stationary point rather than a global minimum. Future research could investigate how complex hardware topologies influence these lock-free algorithms.
Summary updated