Skip to main content
QUICK REVIEW

[Paper Review] A Data and Model-Parallel, Distributed and Scalable Framework for Training of Deep Networks in Apache Spark

Disha Shrivastava, Santanu Chaudhury|arXiv (Cornell University)|Aug 19, 2017
Advanced Neural Network ApplicationsComputer Science10 references9 citations
TL;DR

This paper proposes a scalable, data and model-parallel framework for training deep neural networks in Apache Spark using only commodity CPUs. It introduces a novel distributed backpropagation algorithm for model parallelism with proven convergence and achieves up to 11X speedup for CNNs by efficiently distributing large models and data across clusters without requiring GPUs or specialized hardware.

ABSTRACT

Training deep networks is expensive and time-consuming with the training period increasing with data size and growth in model parameters. In this paper, we provide a framework for distributed training of deep networks over a cluster of CPUs in Apache Spark. The framework implements both Data Parallelism and Model Parallelism making it suitable to use for deep networks which require huge training data and model parameters which are too big to fit into the memory of a single machine. It can be scaled easily over a cluster of cheap commodity hardware to attain significant speedup and obtain better results making it quite economical as compared to farm of GPUs and supercomputers. We have proposed a new algorithm for training of deep networks for the case when the network is partitioned across the machines (Model Parallelism) along with detailed cost analysis and proof of convergence of the same. We have developed implementations for Fully-Connected Feedforward Networks, Convolutional Neural Networks, Recurrent Neural Networks and Long Short-Term Memory architectures. We present the results of extensive simulations demonstrating the speedup and accuracy obtained by our framework for different sizes of the data and model parameters with variation in the number of worker cores/partitions; thereby showing that our proposed framework can achieve significant speedup (upto 11X for CNN) and is also quite scalable.

Motivation & Objective

  • To address the high computational cost and memory limitations of training large deep networks on single machines.
  • To enable scalable training of deep networks using only commodity CPU clusters, avoiding expensive GPU or supercomputer requirements.
  • To develop a unified framework in Apache Spark that supports both data and model parallelism for diverse architectures like CNNs, RNNs, and LSTMs.
  • To provide a mathematically sound, convergent algorithm for distributed backpropagation in model-parallel settings with low communication overhead.
  • To empirically validate scalability and performance across varying data sizes, model parameters, and cluster configurations.

Proposed method

  • The framework uses a hybrid approach combining data parallelism—partitioning training data across worker nodes—and model parallelism—partitioning large neural network layers across machines.
  • A novel distributed backpropagation algorithm is proposed for model-parallel training, where gradients are computed locally and asynchronously updated via a parameter server architecture.
  • The algorithm ensures convergence through mathematical analysis and cost modeling, accounting for communication delays and out-of-order updates.
  • The system is implemented in Apache Spark using its resilient distributed datasets (RDDs) and supports multiple deep learning architectures including fully connected networks, CNNs, RNNs, and LSTMs.
  • Optimization uses mini-batch stochastic gradient descent with RMSprop, and variable-length sequences in RNNs/LSTMs are handled via padding and masking.
  • The framework is designed to minimize communication overhead by leveraging local connectivity in CNNs and efficient parameter synchronization.

Experimental results

Research questions

  • RQ1Can a distributed deep learning framework built on Apache Spark achieve significant speedup for large-scale models without relying on GPUs?
  • RQ2Does the proposed model-parallel backpropagation algorithm converge reliably under asynchronous updates and communication delays?
  • RQ3How does the framework scale with increasing data size and model complexity across different neural network architectures?
  • RQ4What is the impact of model partitioning and number of worker partitions on training performance and communication efficiency?
  • RQ5Can the framework maintain accuracy comparable to non-distributed training while scaling across CPU clusters?

Key findings

  • The proposed model-parallel backpropagation algorithm converges mathematically and experimentally, with error decreasing and gradients approaching zero over epochs.
  • The framework achieves up to 11X speedup for CNNs when training on 5 million samples, demonstrating strong scalability on large data.
  • For fully connected networks, a 7.2X speedup was achieved with 0.1 million samples, and 5.6X speedup was observed with 4 billion model parameters using only five CPUs.
  • Speedup increases with model size and data size, and the saturation point for performance gain shifts higher with larger models, indicating better scalability for large-scale problems.
  • The implementation of distributed RNN/LSTM shows uniform speedup with increasing worker nodes, confirming scalability for sequential architectures.
  • The framework successfully supports diverse architectures including CNNs, RNNs, LSTMs, and fully connected networks, with no need for specialized hardware or software.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.