# Deep Compressed Sensing Generation Model for End-to-End Extreme Observation and Reconstruction
## 3 Method
### Algorithm Design  
In this paper, we propose the framework of an end-to-end (input-output) relationship that combines compressed sensing and deep learning (E2_DCSGM) to achieve observation and reconstruction. Different from CSGM and DCS, instead of finding the optimal latent variable \(\mathbf{z}\) by random inputs of the generative model, observed low-dimensional vectors were directly specified as inputs of the generative model to achieve the observation-and reconstruction process for high-dimensional data. With the guarantee of RIP and S-REC, different high-dimensional data have different low-dimensional vectors after being observed. Figure 1 shows the algorithm's model structure, which is divided into two parts. First, the real sample \(\mathbf{x}\) is observed as a low-dimensional vector \(\mathbf{y}=\mathbf{\Phi}\mathbf{x}\) through the observation model \(\mathbf{\Phi}\) and normalized to obtain \(\mathbf{z}=L_{2}(\mathbf{y})\) as the input of the generative model \(\mathbf{G_{\theta}}\). In the inner loop, the output \(\mathbf{G_{\theta}}(\mathbf{z})\) of the generative model is observed as a low-dimensional vector \(\hat{\mathbf{y}}=\mathbf{\Phi}\mathbf{G_{\theta}}(\mathbf{z})\). As shown in Formula (11), the low dimensional vector loss optimizes \begin{table}
\begin{tabular}{c c} \hline \hline
**Network Layer** & **Related Hyperparameter Settings** \\ \hline Input & batch\_size = 64 \\  & (batch\_size, sensing\_dim) \\ \hline upsampling 1 & scale\_factor: 2 \\ \hline deconvolution layer 1 & kernel\_size: (128, 3 \(\times\) 3), stride\_size: 1, padding\_size: 1 \\  & activation function: LeakyReLU \\ \hline upsampling 2 & scale\_factor: 2 \\ \hline deconvolution layer 2 & kernel\_size: (64, 3 \(\times\) 3), stride\_size: 1, padding\_size: 1 \\  & activation function: LeakyReLU \\ \hline deconvolution layer 3 & kernel\_size: (1, 3 \(\times\) 3), stride\_size: 1, padding\_size: 1 \\  & activation function: Tanh \\ \hline output & (batch\_size, 1, 28, 28) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Hyperparameter Settings of deconvolution generative model. \begin{table}
\begin{tabular}{c c} \hline \hline
**Network Layer** & **Related Hyperparameter Settings** \\ \hline Input & batch\_size = 64 \\  & (batch\_size,1, 28, 28) \\ \hline Hidden layer 1 & Linear(784, 512) \\  & activation function: LeakyReLU \\ \hline Hidden layer 2 & Linear(512, 256) \\  & activation function: LeakyReLU \\ \hline Hidden layer 3 & Linear(256, sensing\_dim) \\ \hline output & (batch\_size, sensing\_dim) \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Hyperparameter Settings of multi-layer perceptron deep observation network. the input \(z\) to the generated model. Formula (11) is similar to Formulas (8) and (9) in the inner loop. The difference is that the optimization object of formula (11) is the input. \[\hat{z}\leftarrow\hat{z}-\left.\frac{\partial\parallel\boldsymbol{y}-\boldsymbol {\Phi}\boldsymbol{G}_{\boldsymbol{\theta}}(\boldsymbol{z})\parallel_{2}^{2}}{ \partial z}\right|_{z=\hat{z}} \tag{11}\]  
After the inner loop optimization, the optimized generation sample \(\hat{x}=\boldsymbol{G}_{\boldsymbol{\theta}}(\hat{z})\) is obtained by the optimized input \(\hat{z}\) and the generation model \(\boldsymbol{G}_{\boldsymbol{\theta}}\). The loss is obtained for low-dimensional vectors \(\boldsymbol{y}\) and \(\hat{\boldsymbol{y}}\), observed from the real sample \(\boldsymbol{x}\) and the generation sample \(\hat{x}\) by the model \(\boldsymbol{\Phi}\):  
\[\mathcal{L}_{\boldsymbol{G}}=\frac{1}{N}\sum_{i=1}^{N}\left[\parallel \boldsymbol{y}-\hat{\boldsymbol{y}}\parallel_{2}^{2}\right] \tag{12}\]  
\(\mathcal{L}_{\boldsymbol{G}}\) is the loss of the generative model. \(\boldsymbol{y}\) and \(\hat{\boldsymbol{y}}\) are observation vectors for any existing natural vectors. In addition to the loss of the generative model, the joint loss also has the loss of the observation model. Similar to RIP in Formula (3) and S-REC in Formula (6), Formula (13) serves as the loss function of the observed model.