- The paper introduces a novel deep learning framework that embeds phase as sine and cosine to address the inherent 2π periodicity, ensuring smooth optimization.
- The method utilizes saturation-aware dual-gain scaling and a multi-decoder architecture to preserve mid- and high-frequency structural details effectively.
- The framework achieves robust gains in reconstruction quality, with improvements of up to 17 pp in SSIM and 1–2 dB in PSNR over conventional methods.
Circular Phase Representation and Geometry-Aware Optimization for Ptychographic Image Reconstruction
Introduction
Ptychography requires reconstructing complex-valued specimen transmission functions from measured far-field diffraction intensities, a task central to high-resolution imaging in materials science and biology. Classical iterative approaches—such as ePIE and difference-map—enforce physical constraints but incur high computational costs and show sensitivity to noise and initialization. Recent developments in deep learning have dramatically reduced inference times by recasting phase retrieval as a supervised feedforward regression problem, mapping intensity patterns to amplitude and phase. Despite these advances, most prior approaches treat phase as a Euclidean scalar, leading to artifacts due to the inherent 2π periodicity of physical phase, introducing artificial discontinuities and suboptimal loss geometry.
This work introduces a deep ptychographic reconstruction paradigm that rigorously addresses the circular geometry of phase. The framework embeds phase prediction on the unit circle via sine and cosine coordinate outputs, regularized by differentiable geodesic and manifold-consistency losses. The architecture incorporates saturation-aware dual-gain scaling, parallel encoders, and multi-decoder pathways for amplitude and phase, collectively optimized for both high fidelity and physical consistency. The resulting method yields superior amplitude and phase reconstructions across synthetic and real data, with strong gains in mid- and high-frequency structure preservation and a favorable efficiency/accuracy tradeoff.
Methodology
Circular Output Parameterization and Losses
Direct scalar regression for phase is fundamentally at odds with its topology (modulo 2π), resulting in discontinuous losses, misleading gradients near branch cuts, and adverse optimization dynamics. The proposed framework embeds the phase as (cosϕ,sinϕ), mapping S1 to R2, enforced by explicit unit-circle normalization. Phase output is subsequently recovered by the numerically stable atan2 operation on normalized decoder outputs.
Phase error is not penalized via conventional L2 but rather a geodesic cyclic loss of the form 1−cos(Δϕ), yielding bounded, periodic, and smooth gradients with no branch-cut discontinuity. A manifold-consistency regularizer penalizes deviation of phase predictions from the unit circle, harmonizing feature space and signal geometry and effectively regularizing network training.
Network Architecture
The input diffraction intensity is decomposed into low- and high-gain views using a saturation-aware dual-gain scaling module, which enables the network to exploit complementary dynamic range features—considering the extreme contrast between strong low-angle and weak high-angle diffraction Figure 1. Each gain branch is encoded separately before concatenation and linear projection. A shared mid-resolution skip pathway, generated directly from the input, is injected into all three decoders, each specializing in amplitude, cosine, or sine prediction.

Figure 1: Architecture overview highlighting dual-gain scaling, encoder fusion, and decoders for amplitude, cosine, and sine outputs.
The decoder branches employ progressive upsampling, concatenation with context features, and modality-specific activations. This separation supports distinct optimization pathways for amplitude and phase structure.
Composite Loss
A layered loss function is deployed:
- Base pixel-wise MSE for amplitude, cosine, and sine.
- Gradient and SSIM penalties for amplitude and phase, preserving edge sharpness and perceptual structure.
- Geodesic cyclic loss for angular error in phase.
- Unit-magnitude constraint on phase outputs.
Loss coefficients are systematically tuned for balanced optimization dynamics.
Experimental Results
Reconstruction Fidelity: Patch and Full-Field
Comparative experiments are conducted on synthetic and real datasets, with controlled evaluation against PtychoNN, DPI, PtyNet, and PPN. Across noise-free and noisy regimes, the proposed method demonstrates consistent improvement in amplitude and phase metrics (MSE, MAE, PSNR, SSIM)—with especially notable gains in SSIM and PSNR for phase, surpassing closest baselines by 15–17 pp in SSIM and 1–2 dB in PSNR over extensive test sets.

Figure 2: Comparative amplitude and phase reconstructions across methods for representative test samples.
Metric distributions reveal the method not only improves mean reconstruction quality but yields narrower spread, indicating robustness and consistency (Figures 3 & 4).

Figure 3: Amplitude reconstruction metric distributions highlight reduced spread and improved mean quality with the proposed method.

Figure 4: Phase reconstruction metric distributions highlight similar trends in phase accuracy and consistency.
When assembling individual reconstructions into large-field-of-view images, the method exhibits superior seam handling and global consistency, with stitched amplitude and phase maps and extracted profiles closely replicating ground-truth transitions and plateau levels Figure 5.




Figure 5: Full-field stitched amplitude/phase maps and cross-sectional profiles showcasing structural and global consistency advantages.
Experimental Validation
On real synchrotron data, the framework generalizes effectively, displaying enhanced structural fidelity and noise robustness versus prior methods Figure 6. Texture quality and mid-frequency content are visually and numerically superior, aligning with ground-truth reference reconstructions.

Figure 6: Representative real-data reconstructions showing robustness to noise and experimental variability.
Frequency-Domain Preservation
Spectral analysis elucidates preservation of critical mid- and high-frequency content for both amplitude and phase. Competing methods demonstrate premature attenuation of high-frequency features, whereas the proposed framework exhibits closer alignment with ground-truth PSD curves and frequency band energy partitioning (Figures 7 & 8).


Figure 7: Amplitude PSD and energy distribution demonstrating higher mid/high-frequency retention.


*Figure 8: Phase PSD and energy analysis indicating sup
erior mid-band phase structure preservation.*
Ablation Study
A comprehensive ablation (Figures 9 & 10) quantifies impacts of architectural and loss modifications. Removing the circular representation induces the largest degradation, especially in phase fidelity (SSIM ↓ 20 pp, MSE ↑ 220%). Omission of the geodesic cyclic loss or manifold-consistency constraint markedly reduces performance. Saturation-aware dual-gain scaling and skip connections are critical for detail recovery; their removal increases amplitude error by 60–80%. Loss terms enforcing perceptual (SSIM) or gradient (total variation) constraints contribute mainly to edge and texture accuracy.

Figure 9: Qualitative ablation showing amplitude and phase artifacts when key architectural or loss elements are removed.

Figure 10: Heatmap of relative reconstruction metric degradation across ablation variants.
Complexity and Efficiency
The method displays favorable computational efficiency. Model capacity (parameter count) and training FLOPs are moderate compared to alternatives like DPI and PPN, yielding a superior quality-to-complexity tradeoff. Convergence is faster, further supporting practical deployment potential Figure 11.

Figure 11: Model complexity and training efficiency, highlighting the favorable trade-off of the presented approach.
Implications and Future Directions
By explicitly embedding phase prediction within the natural topology of 2π0, the framework eliminates branch discontinuities, enables smooth and physically faithful optimization, and robustly transcends common artifacts (e.g., wrapping, discontinuity-induced textures) present under scalar regression. This has both immediate and downstream implications:
- Practical: Amplitude and phase reconstructions with higher accuracy and consistency enable new applications in real-time microscopy and adaptive experiment feedback.
- Theoretical: The efficacy of circular representations with geometry-aware loss functions reinforces the necessity of manifold-conforming models for other angular or periodic regression problems, including 3D orientation, pose, and unwrapping-free phase imaging.
- Future Work: Extension to electron ptychography, modeling partial coherence, and domain adaptation for diverse physical signal topologies are promising directions.
Conclusion
The circular phase representation combined with geometry-aligned supervision and dynamic-range-aware architecture yields substantial gains in ptychographic reconstruction quality, training stability, and efficiency. The methodology provides a technically rigorous template for learning with periodic physical variables and poses a strong foundation for future work on high-throughput, physically consistent inverse imaging.