## 2 Introduction to Theory  
### Stacked Auto Encoders  
The basic component unit of a SAE is an automatic encoder (AE) structure, and an AE is a symmetrical three-layer neural network consisting of an input layer, hidden layer, and output layer. The structure is shown in Figure 1. The learning process includes encoding and decoding: encoding is used to map input signals into hidden layer expression, while decoding is a reconstruction of hidden layer expression [18]. In the process of reconstruction, a reconstruction error is set to minimize the reconstruction error through iterative training to obtain the best hidden layer data expression.  
To build an AE, three things need to be done: building an encoder, building a decoder, and setting up a loss function measuring the information lost due to compression. The process of encoding and decoding usually adopts a parametric equation, and the parameter optimization process can be realized by minimizing the loss function.  
If the input is a tableless dataset \(\{x_{n}\}_{n=1}^{N}\), in which \(x_{n}\in R^{m\times l}\), \(h_{n}\) is the hidden layer encoding vectors, and \(\hat{x}_{n}\) is the output layer decoding vector. Therefore, the encoding process is as follows:  
\[h_{n}=f(Wx_{n}+b_{1}) \tag{1}\]  
where \(f(\cdot)\) is the coded activation function [19]; \(W\) is the coded weight matrix; and \(b_{1}\) is the offset vector.  
The decoding process is:  
\[\hat{x}_{n}=g(W^{T}h_{n}+b_{2}) \tag{2}\]  
where \(g(\cdot)\) is the coded activation function; \(W^{T}\) is the coded weight matrix; and \(b_{2}\) is the offset vector.  
The network parameter set is optimized by minimizing the reconstruction error:  
\[O(\Theta)=\text{argmin}\frac{1}{n}\sum_{i=1}^{n}L(x_{i},\hat{x}_{i}) \tag{3}\]  
where \(L\) is loss function: \(L(x_{i},\hat{x}_{i})=\|x_{i}-\hat{x}_{i}\|^{2}\).  
AE was superimposed layer by layer, that is, the first hidden layer was the second input, thus forming the DNN model structure based on SAE, as shown in Figure 2. The constituted DNN first carries out the layer by layer training of the forward propagation realization network, and realizes the network weight updating and parameter fine-tuning by the BP algorithm. When given an input signal, the input layer and the first hidden layer of DNN are regarded as the coding network of the first AE.  
Figure 1: The automatic encoder AE architecture.  
The parameters obtained after the first AE training are then used to initialize the second hidden layer of DNN. The calculation process of the first coding vector of the input signal is as follows:  
\[h_{n}^{1}=f(x_{n}) \tag{4}\]  
Then, the encoding vector was used as input data to train the second AE, that is, the first hidden layer and the second hidden layer of the DNN were used as the encoding network of the second AE. Accordingly, the second hidden layer of DNN is initialized by the second AE, step by step until the last AE completes the training:  
\[h_{n}^{M}=f(h_{n}^{M-1}) \tag{5}\]  
After pre-training the superimposed AE, the softmax classification layer containing sample tags was used as the DNN output layer, followed by SAE, and then the BP algorithm was used to reverse fine-tune the DNN parameters layer by layer. Therefore, the DNN output calculated from the input signal was:  
\[y_{n}=f(h_{n}^{M}) \tag{6}\]