# Unfolded Algorithms for Deep Phase Retrieval
## 3 UPR: The Proposed Framework
### Architecture of the Decoding Module
Then, a decoder function (\(\hat{f}_{\Gamma^{*}}\in\mathcal{F}_{\sigma,L}\)) can be found by training the neural network; e.g., the realization of a decoder function with respect to some fixed sensing matrix (\(\mathbf{A}\)) is given by  
\[\hat{f}_{\Gamma^{*}}=\operatorname*{argmin}_{f_{\Gamma}\in\mathcal{F}_{\sigma, L}}\frac{1}{B}\sum_{i=0}^{B-1}\|\mathbf{x}_{i}-f_{\Gamma}(\mathcal{E}_{\mathbf{A}}( \mathbf{x}_{i}))\|_{2}^{2}. \tag{12}\]  
The above model-agnostic decoder function is only justifiable in scenarios where the input-output relationship of the system is unknown (i.e., in applications such as computer vision and natural language processing problems). Furthermore, due to the model-agnostic nature of the above methodology, the obtained decoder function is not interpretable and acts as a black-box decoder in which the decision-making process of the decoder functioncannot be examined by the user. In addition, the above black-box methodology for solving the inverse problem results in a very large number of training parameters (\(\Gamma\)), which begs for a very large number of training samples (\(B\)) to optimize the network We note that there exists a rich literature on phase retrieval; hence, choosing such a black-box approach for this problem would not be appropriate. Most prudent would be to develop a more mature deep learning model for this problem that incorporates domain knowledge while still harnessing the expressive power of deep neural networks. In the following, we show how a model-aware deep architecture can be obtained for phase retrieval. In particular, we employ the deep unfolding approach to obtaining a class of decoder modules based on an optimization problem in the form of (10). Generally speaking, finding a closed-form solution to (10) for a given loss function is either a very difficult task or even mathematically intractable. Thus, after formalizing the objective function and the search space for a phase retrieval problem, first-order mathematical optimization techniques are utilized to tackle (10). Iterative optimization techniques are a popular choice for both convex and non-convex programming. Specifically, first-order methods are among the most popular and well-established iterative optimization techniques due to their low per-iteration complexity and efficiency in complex scenarios. One of the most prominent first-order optimization techniques suitable for our problem in (10) is the projected gradient descent algorithm (PGD) [49; 50; 51; 52; 53; 54]. In particular, assuming \(z^{0}\) is the initial point for the algorithm, the \(l\)-th iteration of PGD to approximate the solution to (10) can be defined as follows:  
\[z^{l+1}=\mathcal{P}_{\Omega}\Big{(}z^{l}-a^{l}\
abla_{z}\ell(z^{l})\Big{)}, \tag{13}\]  
where \(\mathcal{P}_{\Omega}:\mathbb{C}^{n}\mapsto\Omega\subseteq\mathbb{C}^{m}\) denotes a mapping function of the vector argument to the feasible set (\(\Omega\)), \(\
abla_{z}\ell(z^{l})\) denotes the gradient of the objective function obtained at point \(z^{l}\), and \(a^{l}\) represents the step size of the PGD algorithm at the \(l\)-th iteration. We note that first-order methods generally suffer from a slow speed of convergence, and predicting the number of iterations they require for convergence is a difficult task. As a result, they are not ordinarily recommended for real-time signal processing applications. A sensible approach to circumvent this issue is to fix the total number of iterations of such algorithms (e.g., \(L\)) and to follow up with a proper choice of the parameters for each iteration (i.e., the step sizes) that results in the best improvement in the objective function while allowing only \(L\) iterations. Let \(g_{\gamma_{l}}:\mathbb{C}^{n}\mapsto\mathbb{C}^{n}\) be a parameterized mapping operator defined as  
\[g_{\gamma_{l}}(z)=\mathcal{P}_{\Omega}\Big{(}z-G^{l}\
abla_{z}\ell(z)\Big{)}, \tag{14}\]  
where \(\gamma_{l}=\{G^{l}\}\) denotes the set of parameters of the mapping function (\(g_{\gamma_{l}}\)) and \(G^{l}\) denotes a positive semi-definite matrix.