# Unfolded Algorithms for Deep Phase Retrieval
## 3 UPR: The Proposed Framework
### Architecture of the Decoding Module
The above mapping can then be utilized to model various first-order optimization techniques for the problem at hand--in particular, the PGD algorithm considered in this work. Consequently, \(L\) iterations in the form of (13) can be modeled as follows:  
\[\mathcal{G}^{L}_{\mathbf{F}}(x)=g_{\gamma_{L}}\circ g_{\gamma_{L-1}}\circ \cdots\circ g_{\gamma_{1}}(\mathcal{E}_{A}(x);x_{0}), \tag{15}\]  
where the above function corresponds to the PGD in all scenarios, be it when we have a fixed step size (\(G^{l}=\alpha I\)), time-varying step sizes (\(G^{l}=\alpha^{l}I\)), or the general preconditioned PGD algorithm with an arbitrary choice of \(G^{l}\). Under some mild conditions and for a proper choice of the step size (\(\alpha\)), it can be shown that as \(L\rightarrow\infty\), the output of the mapping function (\(\mathcal{G}^{L}_{\mathbf{F}=a}\)) converges to a first-order optimal point of the objective function. By allowing the preconditioning matrix to be learned, UPR adapts to varying gradient magnitudes and changes in the problem's structure during training. This enables UPR to adjust the update magnitude in each layer, better matching the gradient's scale and the evolving constraints, similar to how a learnable step size in PGD adapts to changing gradient magnitudes and optimization landscapes [49; 51; 52; 53; 54]. This leads to faster convergence and more stable updates. It allows the algorithm to take larger steps when needed (e.g., when the gradient is significant) and smaller, more precise steps as the solution approaches optimality. This adaptability is crucial for improving convergence rates and stability, ensuring efficient refinement of the solution without overshooting or stagnating. In light of the above, we now formally propose a high-level definition of the considered hypothesis classes of the decoder function in accordance with (15). Note that for a fixed realization of the set of parameters (\(\mathbf{\Gamma}\) and \(L\)), the realized mapping function (\(\mathcal{G}_{\mathbf{\Gamma}}^{L}\)) can be viewed as a problem-specific decoder function. In particular, after the formalization of the objective function (\(\ell(x)\)) for a phase retrieval problem and with an initial point of \(x^{0}\), the output of the mapping function (\(\hat{\mathbf{x}}=\mathcal{G}_{\mathbf{\Gamma}}^{L}(\mathcal{E}_{\mathbf{A}}(x);\mathbf{x}^{0})\)) can be considered to be an estimate of the signal of interest. Accordingly, we define the hypothesis class of possible decoder functions as follows:  
\[\mathcal{H}_{d,L}=\{\mathcal{D}_{\mathbf{\Gamma}}:\mathcal{C}^{n}\mapsto\mathcal{C }^{n}|\mathbf{\Gamma}=\{\gamma_{i}=\mathbf{G}^{i}\in\mathbb{S}_{+}\}_{i=1}^{L}\}, \tag{16}\]  
where \(\mathbf{\Gamma}=\{\gamma_{i}=\mathbf{G}^{i}\in\mathbb{S}_{+}\}_{i=1}^{L}\) denotes the set of parameters of the proposed class of decoder functions, \(\mathbb{S}_{+}\) denotes the set of all positive semi-definite matrices, and \(\mathcal{D}_{\mathbf{\Gamma}}(\mathcal{E}_{\mathbf{A}}(x);\mathbf{x}_{0})=\mathbf{g}_{\gamma_{ L}}\circ\mathbf{g}_{\gamma_{L}-1}\circ\cdots\circ\mathbf{g}_{\gamma_{L}}(\mathcal{E}_{ \mathbf{A}}(x);\mathbf{x}_{0})\). Observe that for a fixed realization (\(\mathcal{G}_{\mathbf{\Gamma}^{*}}\in\mathcal{H}_{d,L}\)), one can interpret \(\mathcal{G}_{\mathbf{\Gamma}^{*}}\) as an \(L\)-layer deep neural network whose computation dynamics in each layer mimic the behavior of one iteration of a first-order optimization algorithm, as given in (13). Specifically, due to the incorporation of domain knowledge in the design of the deep unfolded network, the resulting deep neural network (\(\mathcal{G}_{\mathbf{\Gamma}}\)) is interpretable and has far fewer training parameters as compared to its black-box counterparts. Moreover, hypothesis class \(\mathcal{H}_{d,L}\) encompasses the class of gradient method realizations with a varying preconditioning matrix.