# Unfolded Algorithms for Deep Phase Retrieval
## 3 UPR: The Proposed Framework
### Architecture of the Decoding Module  
In this subsection, we propose two model-based deep architectures that are not only highly tailored to the problem of phase retrieval but also allow for the learning of task-specific superior reconstruction algorithms. Next, we cascade the decoder and encoder modules to obtain an auto-encoder deep architecture that facilitates the joint training of the sensing matrix and the reconstruction algorithm. _Deep Unfolded Networks for Phase Retrieval._ We begin with a brief introduction to deep unfolded networks and their relation with mathematical optimization. Note that the goal of a decoder module is to obtain an estimate of the underlying signal of interest from the phase-less measurements of the form \(\mathcal{E}_{A}(\mathbf{x})=|\mathbf{A}\mathbf{x}|\) for a given sensing matrix (\(\mathbf{A}\)). Equivalently, a decoder function seeks to tackle the following problem:  
\[\text{find}\quad\mathbf{z}\quad\text{s.t.}\quad\mathcal{E}_{A}(\mathbf{z})=\mathcal{E} _{A}(\mathbf{x}). \tag{9}\]  
In lieu of directly tackling (9), a more practical approach is to consider an alternative optimization problem to find an approximation of the true signal of interest. Accordingly, such an alternative optimization problem can be defined as follows:  
\[\min_{\mathbf{z}\in\mathbb{C}^{n}}\quad\ell(\mathbf{z})\quad\text{s.t.}\quad\mathbf{z}\in \Omega, \tag{10}\]  
where \(\Omega\) represents the search space of the underlying signal of interest. For instance, if it is known a priori that the signal of interest is \(s\)-sparse, this information can be encoded in \(\Omega\), i.e., \(\Omega=\{\mathbf{x}\in\mathbb{C}^{n}:\,\left\lVert\mathbf{x}\right\rVert_{0}=s\}\). On the other hand, for a conventional phase retrieval problem where no prior structural information is assumed on \(\mathbf{x}\), we set \(\Omega=\mathbb{C}^{m}\). The ultimate formalization of a phase retrieval problem, as we move from (9) to (10), boils down to a proper realization of the loss function (\(\ell(\mathbf{x})\)) and the feasible set (\(\Omega\)). In particular, for a given signal of interest (\(\mathbf{x}\)) and sensing matrix (\(\mathbf{A}\)), if \(\mathbf{z}^{*}\in\operatorname*{argmin}_{\mathbf{z}\in\Omega}\ell(\mathbf{z})\), then we must have \(\mathcal{E}_{A}(\mathbf{z}^{*})=\mathcal{E}_{A}(\mathbf{x})\). Note that different choices of the loss function (\(\ell(\mathbf{x})\)) and the feasible set (\(\Omega\)) give rise to various flavors of recovery algorithms for phase retrieval, as has been previously discussed. In this work, we consider the development of the class of decoder functions (\(\mathcal{H}_{d}\)) such that for any realization of the decoder function (\(D_{\phi}\in\mathcal{H}_{d}\)), the function \(D_{\phi}\) becomes a good approximator of the solution to (10). Note that there exist alternative approaches to tackle the phase retrieval problem. For example, the direct development of a class of decoder functions can be considered as model-agnostic. One particular class of such model-agnostic methodologies can be derived by utilizing black-box deep neural networks. Assume that the set \(\{\mathbf{x}_{i},\mathcal{E}_{A}(\mathbf{x}_{i})\}_{i=0}^{B-1}\) represents our available data from the phase retrieval system, i.e., we have \(B\) realizations of the input-output relationship of our phase retrieval system for a given \(\mathbf{A}\). Furthermore, let  
\[\mathcal{F}_{\sigma,L}=\{f_{\Gamma}:\mathcal{E}_{\mathbf{A}}(\mathbf{x})\mapsto\mathbf{x} \,|f_{\Gamma}(\mathbf{x})=\sigma_{\gamma_{L}}^{L}\circ\cdots\circ\sigma_{\gamma_{1} }^{1}(\mathcal{E}_{\mathbf{A}}(\mathbf{x}))\} \tag{11}\]  
represent the class of all \(L\)-layer deep neural networks with activation function \(\sigma(\cdot)\), where \(\gamma_{i}\) denotes the weights of the \(i\)-th layer and \(\Gamma=\{\gamma_{i}\}_{i=1}^{L}\).