Abstract—Faced with continuously increasing scale of data, words, the artificial neural network as a whole acts as a human
original back-propagation neural network based machine learn- brain.
ing algorithm presents two non-trivial challenges: huge amount of
arXiv:1510.02709v1 [cs.DC] 9 Oct 2015
2
Project Report for Cloud Computing and Storage. Dept. of Electrical and Computer Engineering, University of Florida, October 12, 2015
h(0) h(1)
j J+1 …… m j J+1 …… m
<vi,hj>0 W WT W <vi,hj>1
Cloud Computing
by Hadoop i i+1 …… n i i+1 …… n
v(0) v(1)
Positive Phase Negative Phase
3
Project Report for Cloud Computing and Storage. Dept. of Electrical and Computer Engineering, University of Florida, October 12, 2015
C. Precision Refinement
This step is still in discussion. We are going to use Ad- Mapper w1 Reducer
aboosting [18] method to refine the result of data training. Mapper 1 w2
Training item 1
Basically, a neural network model after training is regarded
w3
as a classifier. Unfortunately, the precision of a classifier is
w1
vulnerable to the noisy and the large-scale of the mobile data. Reducer 1 (w1)
Such learning is called weak learning, and we need to improve Training item 2 Mapper 2 w2
This is just the basis and we are not going to talk much about w1
the Adaboosting method here because we do not have a good Training item 4 Mapper 4 w2
idea about it now. Our main focus at present is implementing w3
the pre-training step, using deep learning, and realizing the
MapReduce based back-propagation algorithm.
V. C LOUD C OMPUTING BASED ON M AP R EDUCE
A. Choice of Cloud Computing Platform Fig. 4. Flow chart of applying MapReduce on deep learning.
4
Project Report for Cloud Computing and Storage. Dept. of Electrical and Computer Engineering, University of Florida, October 12, 2015
Algorithm 1 The Driver for MapReduce-based Deep Learning Algorithm 2 The mapper of restricted Boltzmann machine
algorithm (RBM) training part in deep learning MapReduce program.
Initialization: Initialization:
The user provides the input file location, output file Input of the mapper is one training case from network
location, max iteration number (maxEpoch), number input. Also, there are arguments like numV is, numHid
of layers (numLayer), number of nodes in each layer and W eight(current) past in via configurations or dis-
(numN odes(layer)) via input arguments. tributed cache.
Iteration: Iteration:
1: for layer ← 1 to numLayers − 1 do 1: initialize();
2: numV is ← numN odes(layer − 1); 2: getposphase();
3: numHid ← numN odes(layer); 3: getnegphase();
4: W eights(layer) ← RandomizeW eights(); 4: update();
5: iter ← 1; 5: for i ← 0 to numV is − 1 do
6: for iter ≤ Max Iteration Times do 6: for j ← 0 to numHid − 1 do
7: JobRBM ← Initialized MapReduce Job for RBM; 7: output hkey, valuei pair:
8: Store W eights(layer) into → file system: F S; hW eightID , W eightU pdate i
9: Give config data: numV is → JobRBM ; 8: end for
10: Give config data: numHid → JobRBM ; 9: end for
11: Assign Distributed Cache: F S → JobRBM ; 10: return
// Each Mapper has a full copy of weights Each mapper output its update of W eights() according
12: Start JobRBM : to its train case.
13: input: the network input for current layer;
// (# of Mappers: num of cases) Algorithm 3 The reducer of restricted Boltzmann machine
14: output: W eightsupdate ← update for every weight; (RBM) training part in deep learning MapReduce program.
// (# of Reducers: numV is × numHid) Initialization:
15: Update W eights(layer): Input of the reducer is the intermediate data output by the
16: for all weight ∈ W eights(layer) do mappers from the same weight ID.
17: weight ← weight + weightupdate ; Iteration:
18: end for 1: sum ← 0;
19: iter++; 2: for all W eightupdate ∈ same W eightID do
20: end for 3: sum ← sum + W eightupdate ;
21: Jobprop ← Initialized MapReduce Job for propagate; 4: end for
22: Store W eights(current) into → file system: F S; 5: output hkey, valuei pair:
23: Give config data: numV is → Jobprop ; hW eightID , sumi
24: Give config data: numHid → Jobprop ; 6: return
25: Assign Distributed Cache: F S → Jobprop ; Each reducer output the overall update of W eights().
26: Start Jobprop :
27: input: the network input for current layer;
28: output: the network output for current layer; this MapReduce program is numLayer − 1. It contains four
29: end for parts: conf igure() reads all the configurations and distributed
30: return cache from outside; initialize() parses the input strings
The final W eights(last layer) is the trained result we into parameters, and initializes parameters for algorithm;
want. prop2nextLayer() computes the forward propagation algo-
rithm; map() implements the mapper. It outputs the original
key and updated value pair. We also skip the algorithm details
code, we skip the details of RBM training algorithm, because here, and just focus on the structure.
that is not the focus of this paper. If the reader is interested The reducer of forward propagation part is just output the
in it, please refer to Dr. Hinton’s paper in [4]. intermediate data as final output, so it is omitted.
Algorithm 3 describes the reducer of restricted Boltzmann
machine (RBM) training part in deep learning MapReduce VI. P ERFORMANCE AND R ESULTS
program. Each reducer collects all the weight updates from In the performance evaluation section, extensive experi-
one single weight ID. It adds up the updates from the same ments have been conducted. The experimental results prove
weight and write to the final output. the efficiency, and scalability of our proposed MapReduce
Algorithm 4 describes the mapper of forward propagation on neural network method. This method can be applied over
part in deep learning MapReduce program. It is executed large-scale realistic data on the cloud-computing platform of
between every two layers. So the total execution time for AWS.
5
Project Report for Cloud Computing and Storage. Dept. of Electrical and Computer Engineering, University of Florida, October 12, 2015
6
Project Report for Cloud Computing and Storage. Dept. of Electrical and Computer Engineering, University of Florida, October 12, 2015
(a) (b)
(a) Training Error v.s. iteration time (b) Testing Error v.s. iteration time
curve curve
Fig. 7. Train and test error v.s. iteration time for supervised learning. Note
that the misclassification decreases in training (a), but increases in testing (b),
which is a sign of over-fitting problem.
(c) (d)
7
Project Report for Cloud Computing and Storage. Dept. of Electrical and Computer Engineering, University of Florida, October 12, 2015
(a) import the weight file for classification (b) draw a digit with mouse (c) click recognize button and the result shows
Fig. 9. Screen shots of demo program for supervised learning of hand-written digit recognition. (a) step is to import the weight file; (b) step is to draw a
digit with mouse on left box; (c) step is to click the recognize button and the result shows on the right.
(a) import the weight file for auto- (b) draw a digit with mouse (c) click encode button and the code (d) click decode button and the recon-
encoding shows in the middle struction shows on the right
Fig. 10. Screen shots of demo program for unsupervised learning of hand-written digit auto-encoding. (a) step is to import the weight file; (b) step is to draw
a digit with mouse on left box; (c) step is to click encode button and the code shows in the middle; (d) step is to click decode button and the reconstruction
shows on the right.
A PPENDIX
The code repository can be found on Github at: https://
github.com/sunkairan/MapReduce-Based-Deep-Learning
ACKNOWLEDGEMENT
(a) (b) The authors thank Dr. Andy Li and his teaching assistances
for their suggestions that significantly improved the quality of
the paper. The authors also thank Dr. Dapeng Oliver Wu and
his team for providing deep discussions about our research
details. The computing cluster resources used by this project
is supported by the course of EEL-6935: Cloud Computing
and Storage.
(c) (d)
R EFERENCES
Fig. 12. Demo screen shots of unsupervised learning of hand-written digit
auto-encoding. In every figure, the left side contains the hand-written digit [1] J. Hoskins and D. Himmelblau, “Process control via artificial neural net-
written by user using mouse (down-sampled as 28 × 28 pixels), the middle works and reinforcement learning,” Computers & chemical engineering,
small box contains the code for left picture (only 30 dimensions), and the vol. 16, no. 4, pp. 241–251, 1992.
right side is the auto-reconstruction result from the code in the middle. Note [2] M. T. Hagan, H. B. Demuth, M. H. Beale et al., Neural network design.
the in (a) (b) and (c), the reconstruction is very similar to the original picture, Pws Pub. Boston, 1996.
but in (d), they are quite different. [3] D. E. Rumelhart and J. L. McClelland, “Parallel distributed processing:
explorations in the microstructure of cognition. volume 1. foundations,”
1986.
[4] G. E. Hinton, S. Osindero, and Y.-W. Teh, “A fast learning algorithm for
deep belief nets,” Neural computation, vol. 18, no. 7, pp. 1527–1554,
2006.
[5] M. Pethick, M. Liddle, P. Werstein, and Z. Huang, “Parallelization of a
backpropagation neural network on a cluster computer,” in International
system overhead when larger number of nodes is introduced conference on parallel and distributed computing and systems (PDCS
into the system. We are convinced that with the application of 2003), 2003.
[6] K. Ganeshamoorthy and D. Ranasinghe, “On the performance of parallel
MapReduce, neural network is capable of successfully recog- neural network implementations on distributed memory architectures,”
nizing handwriting digits with great efficiency and accuracy. in Cluster Computing and the Grid, 2008. CCGRID’08. 8th IEEE
In the future we are planning to apply our algorithm on International Symposium on. IEEE, 2008, pp. 90–97.
[7] S. Suresh, S. Omkar, and V. Mani, “Parallel implementation of back-
more complex input model including face recognition, speech propagation algorithm in networks of workstations,” Parallel and Dis-
recognition and human language processing. tributed Systems, IEEE Transactions on, vol. 16, no. 1, pp. 24–34, 2005.
8
Project Report for Cloud Computing and Storage. Dept. of Electrical and Computer Engineering, University of Florida, October 12, 2015