# Unfolded Algorithms for Deep Phase Retrieval
## 3 UPR: The Proposed Framework
### Architecture of the Decoding Module
We seek to find the best set of parameters of a first-order optimization algorithm with only \(L\) iterations or, equivalently, to find \(\mathcal{G}_{\mathbf{\Gamma}}\in\mathcal{H}_{d,L}\) such that \(\|\mathbf{x}-\mathcal{G}_{\mathbf{\Gamma}}\circ\mathcal{E}_{\mathbf{A}}(\mathbf{x})\|\) is minimized. In the case of the phase retrieval problem and a Euclidean metric (\(\mathrm{D}(\cdot,\cdot)\)), we are concerned with the following optimization problem:  
\[\min_{\mathcal{G}_{\mathbf{\Gamma}}\in\mathcal{H}_{d,L}}\ \ \ \mathbb{E}_{\mathbf{x} \sim P(\mathbf{x})}\{\mathrm{D}(\mathbf{x},\mathcal{G}_{\mathbf{\Gamma}}\circ\mathcal{E}_ {\mathbf{A}}(\mathbf{x}))\}. \tag{17}\]  
The above program can be re-written in a more familiar form of optimizing the set of parameters (\(\Gamma\)) containing the weights of each layer of the considered deep neural network defined in (15). Note that our goal is to develop a joint design for the set of parameters of both the decoder and encoder modules, which we address in the next part. However, for a fixed \(\mathbf{A}\), the learning of the deep decoder module with respect to a realization of the encoder function can be expressed in the almost equivalent form of (17):  
\[\min_{\mathbf{\Gamma}=\{\mathbf{G}^{i}\in\mathbb{S}_{+}\}_{i}}\ \ \mathbb{E}_{\mathbf{x} \sim P(\mathbf{x})}\{\mathrm{D}(\mathbf{x},\mathcal{G}_{\mathbf{\Gamma}}\circ\mathcal{E}_ {\mathbf{A}}(\mathbf{x}))\}, \tag{18}\]  
where the above optimization problem formulation corresponds to the training of an \(L\)-layer deep neural network (\(\mathcal{G}_{\mathbf{\Gamma}}\)) with a task-specific architecture as defined in (15) and the input to such a model-based deep architecture is given by a realization of the encoder module. In the following, we build upon the aforementioned ideas and propose two model-based deep architectures as decoder modules for both the conventional phase retrieval problem and a sparse phase retrieval setting. Specifically, we consider the unfolding of iterations of two well-established signal processing techniques for the phase retrieval problem to derive the considered decoder modules. \(\bullet\)_UPR-SPARTA: Sparse Phase Retrieval_. We now present the structure of the proposed UPR-SPARTA deep decoder module for the problem of sparse phase retrieval. As mentioned earlier, one particular area of interest in phase retrieval is when the signal of interest is sparse in nature. The applications of sparse phase retrieval emerge across different fields of engineering and are seen especially in domains such as imaging [2]. Severalalgorithms and frameworks readily exist for sparse phase retrieval. The most notable one is the sparse truncated amplitude flow (SPARTA) methodology, which seeks to recover an \(s\)-sparse signal from its phase-less measurements [20]. Inspired by SPARTA, the following discussion is aimed at providing the iterations of a first-order gradient-based optimizer that lays the groundwork for the proposed UPR-SPARTA model-based decoder module. We begin our work by formalizing the problem in a non-convex form similar to (10). Let \(\mathcal{E}_{A}(\mathbf{x})\) represent the encoder module providing the phase-less measurements of an underlying \(s\)-sparse signal (\(\mathbf{x}\)), i.e., \(\mathbf{x}\in\Omega:=\{\mathbf{x}\in\mathbb{C}^{n}|\|\mathbf{x}\|_{0}=s\}\). Then, decoding the signal (\(\mathbf{x}\)) from the measurement vector (\(\mathcal{E}_{A}(\mathbf{x})\)) can be formulated as the following non-convex optimization problem by utilizing the least-squares criterion similar to [20]:  
\[\min_{\mathbf{z}\in\mathbb{C}^{n}}\quad\ell(\mathbf{z})\quad\text{s.t.}\quad\mathbf{z}\in \Omega, \tag{10}\]0  
Note that if both the objective function and the constraint in the above are non-convex, the problem is deemed to be NP-hard in its general form. The SPARTA algorithm [20] was proposed to efficiently approximate the solution to (19). In particular, the SPARTA solver works through a two-stage process, which we briefly describe, with extensive details found in [20].