# M-ary Phase Position Shift Keying Demodulation Using Stacked Denoising Sparse Autoencoders
## 3 Stacked DSAE Network  
The stacked autoencoder network is composed of multiple layers of sparse autoencoders. Furthermore, the output of the previous layer of autoencoders is used as the input of the latter layer of autoencoders. The weights of the existing neural networks are random initialization. However, in the stacked autoencoder network, the weights are learned by the autoencoder instead of that in the traditional neural network as shown in Figure 2. Furthermore, the noise is added to the training database to improve the generalization ability and robustness. Before training, the noised modulation signal is down-sampled and converted without a tag, which forms a part of the DSAE network database. After training, the weight matrices, which are learned by the network, are used to transform the data. The transformed data are used as features to train the softmax classifier. In the testing phase, the raw test data are transformed by the stacked DSAE network, and the output is fed into the softmax classifier for detection. Figure 1: Block diagram of the stacked DSAE demodulation system. The input is the noised improved MPPSK vector \(\mathbf{X}\) and the neurons are arranged in a column vector \(\mathbf{h^{(2)}}=[h_{1}^{(2)},h_{2}^{(2)},\cdots h_{e}^{(2)}]^{T}\) where the superscript \([\cdot]^{T}\) denotes transposition. It can be written in vector-matrix form as  
\[\mathbf{h^{(2)}}=\mathbf{W^{(1)}}\mathbf{X}+\mathbf{b^{(1)}}, \tag{3}\]  
where the matrix \(\mathbf{W}\) is weights and the vector \(\mathbf{b^{(1)}}\) is the bias in the input layer. The network has two nonlinear functions. One is in the second layer and the other one is in the output layer. This allows the network to capture higher order statistics from the input data, leading to a higher kurtosis in the coded representation. In the proposed stacked DSAE network, the \(\mathbf{W^{(1,1)}}\) learned by the first autoencoder is used to link the input layer and the first hidden layer. Furthermore, the \(\mathbf{W^{(1,2)}}\) learned by the second autoencoder is used to link the first hidden layer and the second hidden layer. Furthermore, the weights are stacked on the top of the first autoencoder, as shown in Figure 3. The encoding process of the stacked DSAE network is used to execute the coding steps of each layer of autoencoders from front to back. It can be expressed as  
\[ \begin{array}{l}\mathbf{a^{(l)}}=\mathbf{f}\Big{(}\mathbf{z^{(l)}}\\ \mathbf{z^{(l+1)}}=\mathbf{W^{(l)}}\mathbf{a^{(l)}}+\mathbf{b^{(l,1)}}\end{array}  \tag{4}\]  
Similarly, the decoding process is used to perform the decoding steps of each layer of autoencoders from back to front. It can be represented as  
\[ \begin{array}{l}\mathbf{a^{(n+l)}}=\mathbf{f}\Big{(}\mathbf{z^{(n+l)}}\\ \mathbf{z^{(n+l+1)}}=\mathbf{W^{(n-\!/\!2)}}\mathbf{a^{(n+l)}}+\mathbf{b^{(l- 1,2)}}\end{array}  \tag{5}\]  
where \(\mathbf{a^{(n)}}\) is the activation value of the deepest hidden unit. It contains the information of our interest, and it is also a higher-order representation of the input value. Figure 2: The activations of previous AEs are used to train the latter AE. The cost function of the stacked DSAE network is given by  
\[ \begin{split} J(\textbf{W},\textbf{b})=&\frac{1}{2m} \sum_{i=1}^{m}\left\|\widehat{\textbf{X}}^{(i)}-\textbf{X}^{(i)}\right\|+\frac{ \lambda}{2}\|\textbf{W}\|^{2}\\ &+\beta\sum_{j=1}^{k}KL\left(\rho\left\|\widehat{\rho}\right. \right),\end{split}  \tag{6}\]  
where \(m\) is the numbers of input vectors, \(\rho\) is a sparsity parameter as well as a hyper-parameter and \(\lambda\) is a parameter that controls the amount of regularization. \(\beta\) is a weight to control the sparsity penalty factor. The Kullback-Leibler (KL) divergence penalty is  
\[KL\left(\rho\parallel\widehat{\rho}_{j}\right) = \rho\log\frac{\rho}{\widehat{\rho}_{j}}+(1-\rho)\log\frac{1- \rho}{1-\widehat{\rho}_{j}}. \tag{7}\]  
\(\widehat{\rho}_{j}\) is the average activation of the \(j\)th hidden unit over the training set. The weights and biases in the input layer are updated by gradient descent.