{'fraction_non_alphanumeric': 0.03913420431104069, 'fraction_numerical': 0.015695536488385304, 'mean_word_length': 4.648429584599797, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Simplified Stochastic Feedforward Neural Networks

It has been believed that stochastic feedforward neural networks (SFNNs) have several advantages beyond deterministic deep neural networks (DNNs): they have more expressive power allowing multi-modal mappings and regularize better due to their stochastic nature. However, training large-scale SFNN is notoriously harder. In this paper, we aim at developing efficient training methods for SFNN, in particular using known architectures and pre-trained parameters of DNN. To this end, we propose a new intermediate stochastic model, called Simplified-SFNN, which can be built upon any baseline DNNand approximates certain SFNN by simplifying its upper latent units above stochastic ones. The main novelty of our approach is in establishing the connection between three models, i.e., DNN->Simplified-SFNN->SFNN, which naturally leads to an efficient training procedure of the stochastic models utilizing pre-trained parameters of DNN. Using several popular DNNs, we show how they can be effectively transferred to the corresponding stochastic models for both multi-modal and classification tasks on MNIST, TFD, CASIA, CIFAR-10, CIFAR-100 and SVHN datasets. In particular, we train a stochastic model of 28 layers and 36 million parameters, where training such a large-scale stochastic network is significantly challenging without using Simplified-SFNN


Introduction
Recently, deterministic deep neural networks (DNNs) have demonstrated state-of-the-art performance on many supervised tasks, e.g., speech recognition [24] and object recognition [11]. One of the main components underlying these successes is the efficient training methods for large-scale DNNs, which include backpropagation [29], stochastic gradient descent [30], dropout/dropconnect [16,10], batch/weight normalization [17,46], and various activation functions [33,28]. On the other hand, stochastic feedforward neural networks (SFNNs) [5] having random latent units are often necessary in to model the complex stochastic natures of many real-world tasks, e.g., structured prediction [8] and image generation [41]. Furthermore, it is believed that SFNN has several advantages beyond DNN [9]: it has more expressive power for multi-modal learning and regularizes better for large-scale networks.
Training large-scale SFNN is notoriously hard since backpropagation is not directly applicable. Certain stochastic neural networks using continuous random units are known to be trainable efficiently using backpropagation with variational techniques and reparameterization tricks [32,1]. On the other hand, training SFNN having discrete, i.e., binary or multi-modal, random units is more difficult since intractable probabilistic inference is involved requiring too many random samples. There have been several efforts toward developing efficient training methods for SFNN having binary random latent units [5,38,8,35,9,34] (see Section 2.1 for more details). However, training a SFNN is still significantly slower than training a DNN of the same architecture, consequently most prior works have considered a small number (at most 5 or so) of layers in SFNN. We aim for the same goal, but our direction is complementary to them.
Instead of training a SFNN directly, we study whether pre-trained parameters from a DNN (or easier models) can be transferred to it, possibly with further low-cost fine-tuning. This approach can be attractive since one can utilize recent advances in DNN design and training. For example, one can design the network structure of SFNN following known specialized ones of DNN and use their pre-trained parameters. To this end, we first try transferring pre-trained parameters of DNN using sigmoid activation functions to those of the corresponding SFNN directly. In our experiments, the heuristic reasonably works well. For multi-modal learning, SFNN under such a simple transformation outperforms DNN. Even for the MNIST classification, the former performs similarly as the latter (see Section 2 for more details). However, it is questionable whether a similar strategy works in general, particularly for other unbounded activation functions like ReLU [33] since SFNN has binary, i.e., bounded, random latent units. Moreover, it loses the regularization benefit of SFNN: it is believed that transferring parameters of stochastic models to DNN helps its regularization, but the opposite is unlikely.
Contribution. To address these issues, we propose a special form of stochastic neural networks, named Simplified-SFNN, which is intermediate between SFNN and DNN, having the following properties. First, Simplified-SFNN can be built upon any baseline DNN, possibly having unbounded activation functions. The most significant part of our approach lies in providing rigorous network knowledge transferring [22] between Simplified-SFNN and DNN. In particular, we prove that parameters of DNN can be transformed to those of the corresponding Simplified-SFNN while preserving the performance, i.e., both represent the same mapping. Second, Simplified-SFNN approximates certain SFNN, better than DNN, by simplifying its upper latent units above stochastic ones using two different non-linear activation functions. Simplified-SFNN is much easier to train than SFNN while still maintaining its stochastic regularization effect. We also remark that SFNN is a Bayesian network, while Simplified-SFNN is not.
The above connection DNN → Simplified-SFNN → SFNN naturally suggests the following training procedure for both SFNN and Simplified-SFNN: train a baseline DNN first and then fine-tune its corresponding Simplified-SFNN initialized by the transformed DNN parameters. The pre-training stage accelerates the training task since DNN is faster to train than Simplified-SFNN. In addition, one can also utilize known DNN training techniques such as dropout and batch normalization for fine-tuning Simplified-SFNN. In our experiments, we train SFNN and Simplified-SFNN under the proposed strategy. They consistently outperform the corresponding DNN for both multi-modal and classification tasks, where the former and the latter are for measuring the model expressive power and the regularization effect, respectively. To the best of our knowledge, we are the first to confirm that SFNN indeed regularizes better than DNN. We also construct the stochastic models following the same network structure of popular DNNs including Lenet-5 [6], NIN [13], FCN [2] and WRN [39]. In particular, WRN (wide residual network) of 28 layers and 36 million parameters has shown the stateof-art performances on CIFAR-10 and CIFAR-100 classification datasets, and our stochastic models built upon WRN outperform the deterministic WRN on the datasets.
In the above, x is the input vector and σ (x) = 1/ (1 + e −x ) is the sigmoid function. Our conditional distribution of the output y is defined as follows: where N (·) denotes the normal distribution with mean W 2 h 1 + b 2 and (fixed) variance σ 2 y . Therefore, P (y | x) can express a very complex, multi-modal distribution since it is a mixture of exponentially many normal distributions. The multi-layer extension is straightforward via a combination of stochastic and deterministic hidden layers (see [8,9]). Furthermore, one can use any other output distributions as like DNN, e.g., softmax for classification tasks.
There are two computational issues for training SFNN: computing expectations with respect to stochastic units in the forward pass and computing gradients in the backward pass. One can notice that both are computationally intractable since they require summations over exponentially many configurations of all stochastic units. First, in order to handle the issue in the forward pass, one can use the following Monte Carlo approximation for estimating the ex- x and M is the number of samples. This random estimator is unbiased and has relatively low variance [8] since one can draw samples from the exact distribution. Next, in order to handle the issue in backward pass, [5] proposed Gibbs sampling, but it is known that it often mixes poorly. [38] proposed a variational learning based on the mean-field approximation, but it has additional parameters making the variational lower bound looser. More recently, several other techniques have been proposed including unbiased estimators of the variational bound using importance sampling [8,9] and biased/unbiased estimators of the gradient for approximating backpropagation [35,9,34].

Simple transformation from sigmoid-DNN and ReLU-DNN to SFNN
Despite the recent advances, training SFNN is still very slow compared to DNN due to the sampling procedures: in particular, it is notoriously hard to train SFNN when the network structure is deeper and wider. In order to handle these issues, we consider the following approximation: Note that the above approximation corresponds to replacing stochastic units by deterministic ones such that their hidden activation values are same as marginal distributions of stochastic units, i.e., SFNN can be approximated by DNN using sigmoid activation functions, say sigmoid-DNN. When there exist more latent layers above the stochastic one, one has to apply similar approximations to all of them, i.e., exchanging the orders of expectations and nonlinear functions, for making the DNN and SFNN are equivalent. Therefore, instead of training SFNN directly, one can try transferring pre-trained parameters of sigmoid-DNN to those of the corresponding SFNN directly: train sigmoid-DNN instead of SFNN, and replace deterministic units by stochastic ones for the inference purpose. Although such a strategy looks somewhat 'rude', it was often observed in the literature that it reasonably works well for SFNN [9] and we also evaluate it as reported in Table 1. We also note that similar approximations appear in the context of dropout: it trains a stochastic model averaging exponentially many DNNs sharing parameters, but also approximates a single DNN well. Now we investigate a similar transformation in the case when the DNN uses the unbounded ReLU activation function, say ReLU-DNN. Many recent deep networks are of the ReLU-DNN type because they mitigate the gradient vanishing problem, and their pre-trained parameters are often available. Although it is straightforward to build SFNN from sigmoid-DNN, it is less clear in this case since ReLU is unbounded. To handle this issue, we redefine the stochastic latent units of SFNN: In the above, f (x) = max{x, 0} is the ReLU activation function and α is some hyperparameter. A simple transformation can be defined similarly as the case of sigmoid-DNN via replacing deterministic units by stochastic ones. However, to preserve the parameter information of ReLU-DNN, one has to choose α such that αf W 1 i x + b 1 i ≤ 1 and rescale upper parameters W 2 as follows: Then, applying similar approximations as in (2), i.e., exchanging the orders of expectations and non-linear functions, one can observe that ReLU-DNN and SFNN are equivalent. We evaluate the performance of the simple transformations from DNN to SFNN on the MNIST dataset [6] and the synthetic dataset [36], where the former and the latter are popular datasets used for a classification task and a multi-modal (i.e., one-to-many mappings) prediction learning, respectively. In all experiments reported in this paper, we commonly use the softmax and Gaussian with standard deviation of σ y = 0.05 are used for the output probability on classification and regression tasks, respectively. The only first hidden layer of DNN is replaced by a stochastic layer, and we use 500 samples for estimating the expectations in the SFNN inference. As reported in Table 1, we observe that the simple transformation often works well for both tasks: the SFNN and sigmoid-DNN inferences (using same parameters trained by sigmoid-DNN) perform similarly for the classification task and the former significantly outperforms the latter for the multi-modal task (also see Figure 1). It might suggest some possibilities that the expensive SFNN training might not be not necessary, depending on the targeted learning quality. However, in case of ReLU, SFNN performs much worse than ReLU-DNN for the MNIST classification task under the parameter transformation.

Transformation from DNN to SFNN via Simplified-SFNN
In this section, we propose an advanced method to utilize the pre-trained parameters of DNN for training SFNN. As shown in the previous section, simple parameter transformations from DNN to SFNN do not clearly work in general, in particular for activation functions other than sigmoid. Moreover, training DNN does not utilize the stochastic regularizing effect, which is an important benefit of SFNN. To address the issues, we design an intermediate model, called Simplified-SFNN. The proposed model is a special form of stochastic neural network, which approximates certain SFNN by simplifying its upper latent units above stochastic ones. Then, we establish more rigorous connections between three models: DNN → Simplified-SFNN → SFNN, which leads to an efficient training procedure of the stochastic models utilizing pretrained parameters of DNN. In our experiments, we evaluate the strategy for various tasks and popular DNN architectures.

Simplified-SFNN of two hidden layers and non-negative activation functions
For clarity of presentation, we first introduce Simplified-SFNN with two hidden layers and non-negative activation functions, where its extensions to multiple layers and general activation functions are presented in Section 4. We also remark that we primarily describe fullyconnected Simplified-SFNNs, but their convolutional versions can also be naturally defined.
In Simplified-SFNN of two hidden layers, we assume that the first and second hidden layers consist of stochastic binary hidden units and deterministic ones, respectively. As in (3), the first layer is defined as a binary random vector with N 1 units, i.e., h 1 ∈ {0, 1} N 1 , drawn under the following distribution: where x is the input vector, α 1 > 0 is a hyper-parameter for the first layer, and f : R → R + is some non-negative non-linear activation function with |f (x)| ≤ 1 for all x ∈ R, e.g., ReLU and sigmoid activation functions. Now the second layer is defined as the following deterministic vector with N 2 units, i.e., h 2 (x) ∈ R N 2 : where α 2 > 0 is a hyper-parameter for the second layer and s : R → R is a differentiable function with |s (x)| ≤ 1 for all x ∈ R, e.g., sigmoid and tanh functions. In our experiments, we use the sigmoid function for s(x). Here, one can note that the proposed model also has the same computational issues with SFNN in forward and backward passes due to the complex expectation. One can train Simplified-SFNN similarly as SFNN: we use Monte Carlo approximation for estimating the expectation and the (biased) estimator of the gradient for approximating backpropagation inspired by [9] (see Section 3.3 for more details).  We are interested in transferring parameters of DNN to Simplified-SFNN to utilize the training benefits of DNN since the former is much faster to train than the latter. To this end, we consider the following DNN of which -th hidden layer is deterministic and defined as follows: where h 0 (x) = x. As stated in the following theorem, we establish a rigorous way how to initialize parameters of Simplified-SFNN in order to transfer the knowledge stored in DNN.
Theorem 1 Assume that both DNN and Simplified-SFNN with two hidden layers have same network structure with non-negative activation function f . Given parameters { W , b : = 1, 2} of DNN and input dataset D, choose those of Simplified-SFNN as follows: and γ 2 > 0 is any positive constant. Then, for all j, x ∈ D, it follows that The proof of the above theorem is presented in Section 5.1. Our proof is built upon the firstorder Taylor expansion of non-linear function s(x). Theorem 1 implies that one can make   Figure 2(c) shows that knowledge transferring loss decreases as γ 2 increases on MNIST classification. Based on this, we choose γ 2 = 50 commonly for all experiments.

Why Simplified-SFNN ?
Given a Simplified-SFNN model, the corresponding SFNN can be naturally defined by taking out the expectation in (6). As illustrated in Figure 2(a), the main difference between SFNN and Simplified-SFNN is that the randomness of the stochastic layer propagates only to its upper layer in the latter, i.e., the randomness of h 1 is averaged out at its upper units h 2 and does not propagate to h 3 or output y. Hence, Simplified-SFNN is no longer a Bayesian network. This makes training Simplified-SFNN much easier than SFNN since random samples are not required at some layers 1 and consequently the quality of gradient estimations can also be improved, in particular for unbounded activation functions. Furthermore, one can use the same approximation procedure (2) to see that Simplified-SFNN approximates SFNN. However, since Simplified-SFNN still maintains binary random units, it uses approximation steps later, in comparison with DNN. In summary, Simplified-SFNN is an intermediate model between DNN and SFNN, i.e., DNN → Simplified-SFNN → SFNN.
The above connection naturally suggests the following training procedure for both SFNN and Simplified-SFNN: train a baseline DNN first and then fine-tune its corresponding Simplified-SFNN initialized by the transformed DNN parameters. Finally, the fine-tuned parameters can be used for SFNN as well. We evaluate the strategy for the MNIST classification. The MNIST dataset consists of 28 × 28 pixel greyscale images, each containing a digit 0 to 9 with 60,000 training and 10,000 test images. For this experiment, we do not use any data augmentation or pre-processing. The loss was minimized using ADAM learning rule [7] with a mini-batch size of 128. We used an exponentially decaying learning rate. Hyper-parameters are tuned on the validation set consisting of the last 10,000 training images. All Simplified-SFNNs are constructed by replacing the first hidden layer of a baseline DNN with stochastic hidden layer.
We first train a baseline DNN for first 200 epochs, and the trained parameters of DNN are used for initializing those of Simplified-SFNN. For 50 epochs, we train simplified-SFNN. We choose the hyper-parameter γ 2 = 50 in the parameter transformation. All Simplified-SFNNs are trained with M = 20 samples at each epoch, and in the test, we use 500 samples. Table  2 shows that SFNN under the two-stage training always performs better than SFNN under a simple transformation (4) from ReLU-DNN. More interestingly, Simplified-SFNN consistently outperforms its baseline DNN due to the stochastic regularizing effect, even when we train both models using dropout [16] and batch normalization [17]. This implies that the proposed stochastic model can be used for improving the performance of DNNs and it can be also combined with other regularization methods such as dropout batch normalization. In order to confirm the regularization effects, one can again approximate a trained Simplified-SFNN by a new deterministic DNN which we call DNN * and is different from its baseline DNN under the following approximation at upper latent units above binary random units: We found that DNN * using fined-tuned parameters of Simplified-SFNN also outperforms the baseline DNN as shown in Table 2 and Figure 2(b).

Training Simplified-SFNN
The parameters of Simplified-SFNN can be learned using a variant of the backpropagation algorithm [29] in a similar manner to DNN. However, in contrast to DNN, there are two computational issues for simplified-SFNN: computing expectations with respect to stochastic units in forward pass and computing gradients in back pass. One can notice that both are intractable since they require summations over all possible configurations of all stochastic units. First, in order to handle the issue in forward pass, we use the following Monte Carlo approximation for estimating the expectation: where h (m) ∼ P h 1 | x and M is the number of samples. This random estimator is unbiased and has relatively low variance [8] since its accuracy does not depend on the dimensionality of h 1 and one can draw samples from the exact distribution. Next, in order to handle the issue in back pass, we use the following approximation inspired by [9]: where h (m) ∼ P h 1 | x and M is the number of samples. In our experiments, we commonly choose M = 20.

Extensions of Simplified-SFNN
In this section, we describe how the network knowledge transferring between Simplified-SFNN and DNN, i.e., Theorem 1, generalizes to multiple layers and general activation functions.

Extension to multiple layers
A deeper Simplified-SFNN with L hidden layers can be defined similarly as the case of L = 2.
We also establish network knowledge transferring between Simplified-SFNN and DNN with L hidden layers as stated in the following theorem. Here, we assume that stochastic layers are not consecutive for simpler presentation, but the theorem is generalizable for consecutive stochastic layers.
Theorem 2 Assume that both DNN and Simplified-SFNN with L hidden layers have same network structure with non-negative activation function f . Given parameters { W , b : = 1, . . . , L} of DNN and input dataset D, choose the same ones for Simplified-SFNN initially and modify them for each -th stochastic layer and its upper layer as follows: where γ = max The above theorem again implies that it is possible to transfer knowledge from DNN to Simplified-SFNN by choosing large γ l+1 . The proof of Theorem 2 is similar to that of Theorem 1 and given in Section 5.2.

Extension to general activation functions
In this section, we describe an extended version of Simplified-SFNN which can utilize any activation function. To this end, we modify the definitions of stochastic layers and their upper layers by introducing certain additional terms. If the -th hidden layer is stochastic, then we slightly modify the original definition (5) as follows: where f : R → R is a non-linear (possibly, negative) activation function with |f (x)| ≤ 1 for all x ∈ R. In addition, we re-define its upper layer as follows: where h 0 (x) = x and s : R → R is a differentiable function with |s (x)| ≤ 1 for all x ∈ R. Under this general Simplified-SFNN model, we also show that transferring network knowledge from DNN to Simplified-SFNN is possible as stated in the following theorem. Here, we again assume that stochastic layers are not consecutive for simpler presentation.
Theorem 3 Assume that both DNN and Simplified-SFNN with L hidden layers have same network structure with non-linear activation function f . Given parameters { W , b : = 1, . . . , L} of DNN and input dataset D, choose the same ones for Simplified-SFNN initially and modify them for each -th stochastic layer and its upper layer as follows: We omit the proof of the above theorem since it is somewhat direct adaptation of that of Theorem 2.

Proof of Theorem 1
First consider the first hidden layer, i.e., stochastic layer. Let

then the marginal distribution of each hidden unit i becomes
Next consider the second hidden layer. From Taylor's theorem, there exists a value z between 0 and x such that . Since we consider a binary random vector, i.e., h 1 ∈ {0, 1} N 1 , one can write where β j h 1 := W 2 j h 1 + b 2 j is the incoming signal. From (6) and (11), for every hidden unit j, it follows that Since we assume that |f (x)| ≤ 1, the following inequality holds: where we use |s (z)| < 1 for the last inequality. Therefore, it follows that This completes the proof of Theorem 1.

Proof of Theorem 2
For the proof of Theorem 2, we first state the two key lemmas on error propagation in Simplified-SFNN.
Lemma 4 Assume that there exists some positive constant B such that and the -th hidden layer of Simplified-SFNN is standard deterministic layer as defined in (7). Given parameters { W , b } of DNN, choose same ones for Simplified-SFNN. Then, the following inequality holds: where W max = max ij W ij .

Lemma 5
Assume that there exists some positive constant B such that and the -th hidden layer of simplified-SFNN is stochastic layer. Given parameters { W , W +1 , b , b +1 } of DNN, choose those of Simplified-SFNN as follows: Proof. See Section 5.4.
Assume that -th layer is first stochastic hidden layer in Simplified-SFNN. Then, from Theorem 1, we have According to Lemma 4 and 5, the final error generated by the right hand side of (14) is bounded by where τ = L =l+2 N −1 W max . One can note that every error generated by each stochastic layer is bounded by (15). Therefore, for all j, x ∈ D, it follows that From above inequality, we can conclude that lim γ +1 →∞ ∀ stochastic hidden layer This completes the proof of Theorem 2.

Proof of Lemma 4
From assumption, there exists some constant i such that | i | < B and By definition of standard deterministic layer, it follows that Since we assume that |f (x)| ≤ 1, one can conclude that This completes the proof of Lemma 4.

Proof of Lemma 5
From assumption, there exists some constant −1 Let γ = max j,x∈D f W j h −1 (x) + b j be the maximum value of hidden units. If we initialize the parameters α , W , b ← 1 γ , W , b , then the marginal distribution becomes From (16), it follows that Similar to Lemma 4, there exists some constant j such that j < BN −1 W max and Next, consider the upper hidden layer of stochastic layer. From Taylor's theorem, there exists a value z between 0 and t such that s(x) = s(0) + s (0)x + R(x), where R(x) = s (z)x 2 2! . Since we consider a binary random vector, i.e., h ∈ {0, 1} N , one can write k is the incoming signal. From (17) and above equation, for every hidden unit k, we have Since we assume that |f (x)| < 1, the following inequality holds: where we use |s (z)| < 1 for the last inequality. Therefore, it follows that . This completes the proof of Lemma 5.

Experimental Results
We present several experimental results for both multi-modal and classification tasks on MNIST [6], Toronto Face Database (TFD) [37], CASIA [3], CIFAR-10, CIFAR-100 [14] and SVHN [26]. The softmax and Gaussian with the standard deviation of 0.05 are used as the output probability for the classification task and the multi-modal prediction, respectively. In all experiments, we first train a baseline model, and the trained parameters are used for further fine-tuning those of Simplified-SFNN.

Multi-modal regression
We first verify that it is possible to learn one-to-many mapping via Simplified-SFNN on the TFD, MNIST and CASIA datasets. The TFD dataset consists of 48 × 48 pixel greyscale images, each containing a face image of 900 individuals with 7 different expressions. Similar to [9], we use 124 individuals with at least 10 facial expressions as data. We randomly choose 100 individuals with 1403 images for training and the remaining 24 individuals with 326 images for the test. We take the mean of face images per individual as the input and set the output as the different expressions of the same individual. The MNIST dataset consists of greyscale images, each containing a digit 0 to 9 with 60,000 training and 10,000 test images.
For this experiments, each pixel of every digit images is binarized using its grey-scale value similar to [9]. We take the upper half of the MNIST digit as the input and set the output as the lower half of it. We remark that both tasks are commonly performed in recent other works to test the multi-modal learning using SFNN [9,34]. The CASIA dataset consists of greyscale images, each containing a handwritten Chinese character. We use 10 offline isolated characters produced by 345 writers as data. 2 We randomly choose 300 writers with 3000 images for training and the remaining 45 writers with 450 images for testing. We take the radical character per writer as the input and set the output as either the related character or the radical character itself of the same writer (see Figure 5). The bicubic interpolation [4] is used for re-sizing all images as 32 × 32 pixels. For both TFD and MNIST datasets, we use fully-connected DNNs as the baseline models similar to other works [9,34]. All Simplified-SFNNs are constructed by replacing the first hidden layer of a baseline DNN with stochastic hidden layer. The loss was minimized using  ADAM learning rule [7] with a mini-batch size of 128. We used an exponentially decaying learning rate. We train Simplified-SFNNs with M = 20 samples at each epoch, and in the test, we use 500 samples. We use 200 hidden units for each layer of neural networks in two experiments. Learning rate is chosen from {0.005 , 0.002, 0.001, ... , 0.0001}, and the best result is reported for both tasks. Table 3 reports the test negative log-likelihood on TFD and MNIST. One can note that SFNNs fine-tuned by Simplified-SFNN consistently outperform SFNN under the simple transformation.
For the CASIA dataset, we choose fully-convolutional network (FCN) models [2] as the baseline ones, which consists of convolutional layers followed by a fully-convolutional layer. In a similar manner to the case of fully-connected networks, one can define a stochastic convolution layer, which considers the input feature map as a binary random matrix and generates   the output feature map as defined in (6). For this experiment, we use a baseline model, which consists of convolutional layers followed by a fully convolutional layer. The convolutional layers have 64, 128 and 256 filters respectively. Each convolutional layer has a44receptive field applied with a stride of 2 pixel. All Simplified-SFNNs are constructed by replacing the first hidden feature maps of baseline models with stochastic ones. The loss was minimized using ADAM learning rule [7] with a mini-batch size of 128. We used an exponentially decaying learning rate. We train Simplified-SFNNs with M = 20 samples at each epoch, and in the test, we use 100 samples due to the memory limitations. One can note that SFNNs fine-tuned by Simplified-SFNN outperform SFNN under the simple transformation as reported in Table  4 and Figure 5.

Classification
We also evaluate the regularization effect of Simplified-SFNN for the classification tasks on CIFAR-10, CIFAR-100 and SVHN. The CIFAR-10 and CIFAR-100 datasets consist of 50,000 training and 10,000 test images. They have 10 and 100 image classes, respectively. The SVHN dataset consists of 73,257 training and 26,032 test images. 3 It consists of a house number 0 to 9 collected by Google Street View. Similar to [39], we pre-process the data using global contrast normalization and ZCA whitening. For these datasets, we design a convolutional version of Simplified-SFNN using convolutional neural networks such as Lenet-5 [6], NIN [13] and WRN [39]. All Simplified-SFNNs are constructed by replacing a hidden feature map  Figure 6: Test error rates of WRN * per each training epoch on CIFAR-100. One can note that the performance gain is more significant when we introduce more stochastic layers.
of a baseline models, i.e., Lenet-5, NIN and WRN, with stochastic one as shown in Figure 3(d).
We use WRN with 16 and 28 layers for SVHN and CIFAR datasets, respectively, since they showed state-of-the-art performance as reported by [39]. In case of WRN, we introduce up to two stochastic convolution layers. Similar to [39], the loss was minimized using the stochastic gradient descent method with Nesterov momentum. The minibatch size is set to 128, and weight decay is set to 0.0005. For 100 epochs, we first train baseline models, i.e., Lenet-5, NIN and WRN, and trained parameters are used for initializing those of Simplified-SFNNs. All Simplified-SFNNs are trained with M = 5 samples and the test error is only measured by the approximation (9). The test errors of baseline models are measured after training them for 200 epochs similar to [39]. All models are trained using dropout [16] and batch normalization [17]. Table 5 reports the classification error rates on CIFAR-10, CIFAR-100 and SVHN. Due to the regularization effects, Simplified-SFNNs consistently outperform their baseline DNNs. In particular, WRN * of 28 layers and 36 million parameters outperforms WRN by 0.08% on CIFAR-10 and 0.58% on CIFAR-100. Figure 6 shows that the error rate is decreased more when we introduce more stochastic layers, but it increases the fine-tuning time-complexity of Simplified-SFNN.

Conclusion
In order to develop an efficient training method for large-scale SFNN, this paper proposes a new intermediate stochastic model, called Simplified-SFNN. We establish the connection between three models, i.e., DNN → Simplified-SFNN → SFNN, which naturally leads to an efficient training procedure of the stochastic models utilizing pre-trained parameters of DNN. This connection naturally leads an efficient training procedure of the stochastic models utilizing pre-trained parameters and architectures of DNN. Using several popular DNNs including Lenet-5, NIN, FCN and WRN, we show how they can be effectively transferred to the corresponding stochastic models for both multi-modal and non-multi-modal tasks. We believe that our work brings a new angle for training stochastic neural networks, which would be of   [39] are in the brackets. Results with † are obtained using the horizontal flipping and random cropping augmentation.
broader interest in many related applications.