## 4 Fourier Ptychographic Transformer Backbone Network  
We utilized a Fourier ptychographic transformer (FPT) as the backbone network [32], providing an efficient end-to-end training paradigm with rapid inference capabilities. As shown at the top panel in Figure 2, the network utilizes all low-resolution amplitude images as the input to ensure the complete information required for reconstruction. The architecture is primarily composed of convolutional neural networks (CNNs) and a self-attention mechanism [35]. The initial layers of the network employ convolutional operations for feature extraction, where the translation invariance and local receptive field properties of convolution are well suited for capturing shallow texture features of images. The deeper layers employs self-attention mechanism for extracting complex, high-dimensional  
Figure 1: Semi-supervised FPT training process diagram.  
features [36]. The self-attention mechanism effectively captures long-range dependencies, enabling super-resolution and phase recovery.  
The input of the network consists of 225 channels' low-resolution amplitude images, denoted as \(X_{i}\in\mathbb{R}^{C\times H\times W}\), where \(H\) and \(W\) represent the height and width of the amplitude image, while \(C\) denotes the channel dimension which is 225. Initially, the shallow texture feature extraction is performed through a convolutional layer to obtain \(X_{0}\). Subsequently, deep feature extraction is carried out using 8 transformer blocks, each comprising an image to patch module, a pixel self-attention module, a channel self-attention module, a patch to image module, and a multi-layer perceptron (MLP) module.  
In each transformer block, \(X_{n}\) is first converted into a window patch sequence \(X_{n}^{t}\in\mathbb{R}^{C\times P\times P\times\frac{H}{P}\times\frac{W}{P}}\) via the image to patch module, which is inspired by the shifted windows in the Swin transformer [37], where \(H\) represents the window patch size. This module alternates pixel assignments into patches, ensuring that the deep network captures long-range spatial dependencies. Then, feature extraction is conducted along two dimensions: the pixel self-attention module calculates the self-attention relationship \(f_{p}\Big{(}X_{n}^{tp}\Big{)}\) among pixels within each spatial patch, focusing on capturing spatial-level detail features, expressed as follows:  
\[f_{p}\Big{(}X_{n}^{tp}\Big{)}=softmax\Bigg{(}L_{Q}\Big{(}X_{n}^{tp}\Big{)}* \frac{L_{K}\Big{(}X_{n}^{tp}\Big{)}^{T}}{\sqrt{P\times P}}\Bigg{)}L_{V}\Big{(} X_{n}^{tp}\Big{)},X_{n}^{tp}\in\mathbb{R}^{C\times\big{(}\frac{H}{P}\times \frac{W}{P}\big{)}\times(P\times P)}, \tag{9}\]  
where \(X_{n}^{tp}\) represents the reshape of \(X_{n}^{t}\), and \(L_{Q},L_{K},L_{V}\) represent linear transformations that preserve dimensional consistency. The channel self-attention module computes the self-attention relationships \(f_{c}\big{(}X_{n}^{tc}\big{)}\) among channel features, thereby enhancing the network capacity to promote cross-channel interactions, expressed as follows:  
\[f_{c}\big{(}X_{n}^{tc}\big{)}=softmax\Bigg{(}L_{Q}\big{(}X_{n}^{tc}\big{)}* \frac{L_{K}\big{(}X_{n}^{tc}\big{)}^{T}}{\sqrt{C}}\Bigg{)}L_{V}\big{(}X_{n}^{ tc}\big{)},X_{n}^{tc}\in\mathbb{R}^{\big{(}\frac{H}{P}\times\frac{W}{P}\big{)} \times(P\times P)\times C}, \tag{10}\]  
where \(X_{n}^{tc}\) represents the reshape of \(X_{n}^{t}\). The results from both attention modules are then summed and restored to image distribution through the patch to image module, yielding \(X_{n}^{s}\), which is subsequently fed into the MLP for nonlinear feature extraction, producing the block output \(X_{n+1}\). The upsample module achieves \(\times 2\) super-resolution enhancement through pixel transformation. Finally, a convolutional layer performs channel fusion, outputting high-resolution amplitude and phase images.  
Figure 2: FPT architecture diagram.