[Paper Review] DeepSpark: A Spark-Based Distributed Deep Learning Framework for Commodity Clusters
DeepSpark is a distributed deep learning framework built on Apache Spark that accelerates training on commodity clusters by integrating data parallelism with an asynchronous, lock-free variant of elastic averaging SGD (EASGD). It reduces communication overhead by decoupling parameter synchronization from computation, achieving up to 10× faster parameter exchange than CaffeOnSpark and significant speed-ups despite increased iterations due to asynchrony.
The increasing complexity of deep neural networks (DNNs) has made it challenging to exploit existing large-scale data processing pipelines for handling massive data and parameters involved in DNN training. Distributed computing platforms and GPGPU-based acceleration provide a mainstream solution to this computational challenge. In this paper, we propose DeepSpark, a distributed and parallel deep learning framework that exploits Apache Spark on commodity clusters. To support parallel operations, DeepSpark automatically distributes workloads and parameters to Caffe/Tensorflow-running nodes using Spark, and iteratively aggregates training results by a novel lock-free asynchronous variant of the popular elastic averaging stochastic gradient descent based update scheme, effectively complementing the synchronized processing capabilities of Spark. DeepSpark is an on-going project, and the current release is available at http://deepspark.snu.ac.kr.
Motivation & Objective
- To address the high communication overhead and limited scalability of existing deep learning frameworks on commodity clusters.
- To enable seamless integration of deep learning with large-scale data processing pipelines using Apache Spark.
- To improve training efficiency by reducing synchronization bottlenecks through an asynchronous parameter update mechanism.
- To support popular deep learning frameworks like Caffe and TensorFlow within a unified Spark-based execution environment.
- To achieve faster convergence and better scalability on commodity hardware without relying on specialized GPU clusters.
Proposed method
- DeepSpark leverages Apache Spark’s resilient distributed datasets (RDDs) to distribute data and model parameters across worker nodes for data parallelism.
- It implements a novel lock-free, asynchronous variant of elastic averaging SGD (EASGD) to decouple parameter updates from computation, reducing synchronization delays.
- The framework uses a parameter exchanger module with a thread pool to manage inter-node parameter exchanges, minimizing idle time during communication.
- Communication periods (τ) are tuned to balance discrepancy penalty from asynchrony against reduced communication overhead.
- The system supports both Caffe and TensorFlow as backend computation engines, enabling flexible model training on Spark clusters.
- A speed-up model is derived based on computation time (T_comp) and communication time (T_comm), showing theoretical scalability under high network latency.
Experimental results
Research questions
- RQ1Can an asynchronous, Spark-based deep learning framework achieve faster training than synchronous counterparts on commodity clusters?
- RQ2How does parameter asynchrony affect convergence accuracy and training iteration count in distributed deep learning?
- RQ3To what extent can communication overhead be reduced by decoupling parameter synchronization from computation in a Spark environment?
- RQ4Can DeepSpark effectively integrate with existing data processing pipelines while maintaining high training throughput?
- RQ5What is the trade-off between communication reduction and discrepancy penalty in asynchronous distributed training?
Key findings
- DeepSpark reduced parameter exchange time to less than 1/10 of CaffeOnSpark’s time, achieving significant speed-up despite higher iteration counts.
- For GoogLeNet training on 16 nodes, DeepSpark achieved faster convergence than CaffeOnSpark, with parameter exchange taking only ~10% of the time spent on minibatch training.
- The discrepancy penalty d(a,τ,n) increased with both communication period τ and number of nodes n, but the speed-up gain from reduced communication outweighed this penalty.
- On 16 executors, data spilling overhead accounted for less than 1% of total training time, indicating negligible impact on performance.
- The theoretical speed-up model shows that for commodity clusters with high S (communication overhead), large τ values can yield scalable performance, approximating n/d(a,τ,n).
- DeepSpark demonstrated effective scalability and fault tolerance, though executor failure currently requires full retraining due to RDD lineage issues.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.