Manuscript Offprint
arXiv:2610.38207Progressive Coupling Method for Diffusion Posterior Sampling in Ptychography
Yihan Qiu, Mingtao Huang, Tianyuan Li, Shudong Li, and Yuan Shen
Abstract—Ptychography is a computational imaging method that reconstructs a sample from overlapping diffraction measurements. This technique relies on these overlapping measurements to provide the redundancy information needed for robust reconstruction, but dense scanning increases acquisition time and data volume. Reducing scan overlaps can improve measurement efficiency but weakens the physical constraints available for reconstruction. Diffusion models provide strong learned prior information, offering a promising approach to compensate for the loss of measurement redundancy. However, effectively utilizing this prior information under weak measurement constraints remains a challenge. We propose a progressive coupling posterior sampling (PCPS) method, which allows for a broader exploration of the solution space under high uncertainty while maintaining stronger diffusion-guided consistency as the reconstruction becomes more refined. Experiments on real X-ray ptychographic data at various scan overlaps demonstrate that PCPS consistently improves reconstruction accuracy compared to traditional iterative methods and existing diffusion posterior samplers, especially at low overlaps. These results show that diffusion priors can reduce the measurement redundancy required for accurate ptychography reconstruction.
Index Terms—Inverse problem, ptychography, diffusion model, posterior sampling.
I. INTRODUCTION
Ptychography is a computational imaging technique that reconstructs the complex transmission function of a sample from overlapping diffraction measurements [1]–[3]. The overlap between adjacent scan positions provides measurement redundancy that is essential for robust reconstruction. However, achieving high overlap requires dense scanning with small scan steps, resulting in more diffraction measurements, longer acquisition times, and larger data volumes. Reducing the scan overlap therefore provides a direct way to improve measurement efficiency by covering the same field of view with fewer scan positions. This efficiency comes at the cost of reduced measurement redundancy, which weakens the constraints on the inverse problem and makes accurate reconstruction increasingly challenging. Classical reconstruction methods, including projection methods, the extended Ptychographic Iterative Engine (ePIE), and least-squares maximum-likelihood reconstruction (LSQ-ML), rely primarily on the physical forward model and can degrade substantially in this low-overlap regime [4]–[7].
Diffusion models provide powerful prior information, offering a promising approach to compensate for the loss of measurement redundancy in low-overlap ptychography. To incorporate this prior information into the inverse problem, diffusion posterior sampling methods combine the learned image distribution with measurement information during inference. Diffusion posterior sampling (DPS) enforces measurement consistency during inverse diffusion and has been extended to ptychography reconstruction [8], [9]. A complementary hybrid approach, Ptycho-LDM, uses a conditional latent diffusion model to refine coarse Difference Map reconstructions obtained from reduced probe measurements [10]. Decoupled annealed posterior sampling (DAPS) enables broader exploration of the solution space by relaxing the dependence on the diffusion trajectory, which is particularly advantageous for complex nonlinear inverse problems [11]. DAPS++ further improves computational efficiency by separating prior-based initialization from measurement-driven refinement [12]. These advances highlight an important trade-off in diffusion-based reconstruction: more strict adherence to the diffusion trajectory preserves the learned prior structure, while greater deviation from the diffusion trajectory allows for a broader exploration of the solution space in the case of weak or ambiguous measurements.
Motivated by this trade-off, we propose progressive coupling posterior sampling (PCPS), which adapts the balance between measurement-driven exploration and diffusion-guided consistency over the sampling trajectory. At high noise levels, where uncertainty remains large, PCPS maintains greater freedom for measurement-driven exploration. As the noise level decreases and the reconstruction becomes more refined, PCPS progressively strengthens consistency with the diffusion trajectory to better preserve the learned structure. PCPS also naturally supports sparse sampling, enabling fewer sampling steps and lower computational cost. Experiments on real X-ray ptychographic data across different scan overlaps demonstrate that PCPS consistently improves reconstruction accuracy, with particularly clear advantages in the low-overlap regime.
A. Ptychography Formula
Ptychography reconstructs a complex-valued object by scanning a localized probe across overlapping regions of the sample and recording the corresponding far-field diffraction intensities. For scan ,
The authors are with the Department of Electronic Engineering, Beijing National Research Center for Information Science and Technology (BNRist), Tsinghua University, Beijing 100084, China (e-mail: qyh23@mails.tsinghua.edu.cn; huangmt@mail.tsinghua.edu.cn; li-ty22@mails.tsinghua.edu.cn; sli248@jh.edu; shenyuan_ee@tsinghua.edu.cn).
where extracts the local object region, denotes the probe function, and is the discrete Fourier transform. The operator denotes the collection of over all scan positions.
To account for photon-counting noise in ptychography, a common data-fidelity term is the square-root intensity loss [7]
where is a small constant for numerical stability.
B. Diffusion Model and DAPS
In diffusion model-based methods, the forward diffusion process gradually perturbs the clean sample by adding Gaussian noise, with transition [13]
where . By composing these transitions, can be sampled directly from according to
with .
A noise prediction network , trained to estimate the Gaussian noise added at each diffusion level, can then be used to recover an estimate of the underlying clean sample
Given measurements y, the goal of posterior sampling is to draw clean samples from the posterior distribution . Since direct sampling is generally intractable, diffusion-based methods traverse a sequence of noise-perturbed posterior marginals induced by the forward diffusion process
As the noise level approaches zero, this distribution recovers the target clean posterior .
DAPS performs this transition in two steps. To move from the current noise level t to a lower level s < t, DAPS first approximates a clean conditional sample
and then re-noises it according to the diffusion marginal
When , this two-step update yields . DAPS therefore uses through the clean conditional in Eq. (7). Once has been obtained, the re-noising step in Eq. (8) no longer depends explicitly on . This decoupling facilitates exploration at high noise levels, but may hinder the preservation of established structure as the noise level decreases.
III. PROGRESSIVE COUPLING FOR POSTERIOR SAMPLING
This section introduces the proposed progressive coupling posterior sampling (PCPS) method, which balances measurement-driven exploration and diffusion-guided consistency over the sampling trajectory. Figure 1 provides an overview of the sampling procedure.

Fig. 1. Overview of PCPS. For a transition from noise level to , the denoiser produces , measurement refinement with and yields , and the Gaussian coupling combines the refined clean estimate, the residual of the current noisy state, and fresh Gaussian noise to sample . The predetermined coefficient increases toward the clean endpoint.
A. Posterior Marginal-Preserving Gaussian Coupling
DAPS maps to through independent re-noising where is decoupled with . However, preservation of the target marginal does not impose a fully decoupled transition. PCPS therefore constructs a family of Gaussian transition kernels with a coupling coefficient that controls how much information from is retained while maintaining the desired posterior marginal.
Proposition 1 (Gaussian coupling): For a predetermined coupling coefficient , s < t, define the Gaussian transition kernel
where
(10)
Here, . If , then the induced marginal satisfies
Proof: Since implies , , so for . With , the transition induces a Gaussian with mean and covariance
Hence the induced marginal is .
At , the transition kernel reduces to , corresponding to independent re-noising. At , it recovers , the conditional transition induced by the original forward diffusion process. Intermediate values provide continuously varying dependence on . This construction is related to DDIM-type non-Markovian transitions that alter cross-level dependence while preserving diffusion marginals [14].
Proposition 2 (posterior marginal preservation): Let and draw . If is fixed independently of the realized and , then drawing from Eq. (9) with gives
Proof: The joint density of the current noisy state and the sampled clean variable satisfies
(13)
where the last equality follows from the forward diffusion model, under which is conditionally independent of y given .
The output density induced by the two-step sampling procedure is therefore
Since is independent of the realized and , Proposition 1 applies conditionally for every fixed and gives
Substituting Eq. (14) into Eq. (14) yields
(15)
which proves Eq. (12).
A predetermined coupling schedule can therefore vary across noise levels while preserving the noisy posterior marginal at every visited level under exact clean conditional sampling. This permits weak coupling at high noise levels to allow greater exploration and progressively stronger coupling at low noise levels to preserve the structure already established in the current state.
B. Progressive Coupling Sampler
The exact clean conditional sample in Eq. (7) is infeasible and is approximated using Langevin dynamics with measurement consistency and a diffusion-based reference term [11]. Starting from , refinement steps are performed as
(16)
where is the step size, controls the reference term, and is the stochastic update scale. The measurement-loss gradient enforces consistency with the pychographic data, while the reference term keeps the update close to the clean estimate supplied by the diffusion model. After steps, is set to .
To realize progressive coupling from weak to strong, PCPS selects M positive noise levels along the diffusion timeline as the visited sampling states, ordered from high to low noise as
Here, denotes the number of visited noise levels. The adjacent states define transitions, with the -th transition given by , where .
To determine the coupling strength according to the sampling progress, the noise level is represented by the log-SNR
The normalized progress of the j-th transition is defined as
so that the first transition satisfies and the last transition satisfies . The coupling coefficient is then assigned using a cosine schedule,
such that the coupling strength progressively increases as sampling proceeds from high to low noise levels.
For each transition , a clean estimate is first obtained from the current state and then refined using the measurement information to obtain . The next noisy state is subsequently sampled using the Gaussian coupling with and . After reaching the final noise level , one final denoising and refinement step is performed, and the resulting is returned as the reconstruction.
C. Sparse Log-SNR Sampling
Proposition 1 applies to arbitrary pairs , allowing transitions between nonadjacent diffusion timesteps. For PCPS-M, the visited levels are selected by uniformly spacing their target log-SNR values between the initial noise level and the final positive noise level of the full sampling trajectory, with each target mapped to the nearest training timestep. The two endpoints are retained for all . PCPS-1000 uses the full 1000-step schedule.
IV. EXPERIMENTS
A. Data, Evaluation, and Baselines
We use real X-ray pychographic data from pychoNN [15], split at the full-resolution object level into 67 training, 16 validation, and 11 test objects. The diffusion prior is trained only on the training set using complex crops with real and imaginary channels. Subsampling the full scan positions produces 60%, 50%, 40%, 30%, and 20% overlap.
For each object, 2000 iterations of 3-mode LSQ-ML in like [16] reconstruct the reference object and probe from complete scans. All experiments use the corresponding known reference probe.
Each reconstruction is formed by stitching four overlapping windows. Neighboring windows are phase-aligned over their common support and averaged, followed by global phase alignment of the stitched reconstruction to the reference. Reconstruction accuracy is evaluated using
Comparisons are conducted against LSQ-ML [7], DPS [8], DAPS [11], and DAPS++ [12]. LSQ-ML is run for 2000
TABLE I
STITCHED COMPLEX NRMSE AT DIFFERENT SCAN OVERLAPS. REPORTED AS MEAN ± STANDARD DEVIATION OVER THE TEST OBJECTS.
| Method | 60% | 50% | 40% | 30% | 20% |
|---|---|---|---|---|---|
| DPS | |||||
| LSQ-ML | |||||
| 100 steps | |||||
| DAPS | |||||
| DAPS++ | |||||
| PCPS | |||||
| 500 steps | |||||
| DAPS | |||||
| DAPS++ | |||||
| PCPS | |||||

Fig. 2. Qualitative reconstructions at 40% overlap. The top and bottom rows show the amplitude and phase, respectively. The scale bar denotes 500 nm.
iterations at each overlap. The same diffusion prior, probe, data loss, reconstruction windows, and evaluation procedure are used for all diffusion-based methods. DAPS-M and PCPS-M additionally share the same noise grid and refinement parameters, differing only in the coupling step.
B. Reconstruction Accuracy
Table I reports the stitched complex NRMSE at five scan overlaps. PCPS consistently achieves the lowest NRMSE under both the 100- and 500-step settings, outperforming matched DAPS and DAPS++ at every overlap. The advantage over DAPS becomes more pronounced as the overlap decreases, indicating that progressive coupling is particularly beneficial as the phase retrieval problem becomes more challenging. Increasing the sampling budget from 100 to 500 steps further improves PCPS across all overlap levels, whereas DAPS does not benefit from the additional steps. DAPS++ also improves with a larger sampling budget but remains less accurate than PCPS. In comparison, LSQ-ML degrades substantially at low overlaps, while DPS exhibits both higher reconstruction errors and larger variations. Figure 2 shows qualitative results at 40% overlap, consistent with the quantitative comparisons in Table I.
C. Sparse Sampling and Computational Cost
Figure 3 compares reconstruction accuracy and averaged runtime at 40% overlap, with runtime measured on an NVIDIA GeForce RTX 3090 GPU. PCPS consistently provides a better accuracy-cost tradeoff than matched DAPS across the tested sampling budgets. PCPS-500 achieves the lowest mean

Fig. 3. Accuracy–runtime tradeoff at 40% overlap for different sampling budgets. Labels indicate the number of sampling steps. Lower-left points provide better tradeoffs.

Fig. 4. Coupling schedule analysis. (a) Compared coupling schedules. (b) NRMSE difference relative to the full-width cosine schedule across scan overlaps.
NRMSE, while PCPS-100 already attains strong accuracy at substantially lower cost and outperforms DAPS++-500 at a similar runtime. These results show that PCPS remains effective under sparse sampling.
D. Coupling Schedule Analysis
PCPS-100 is used to compare the full-width cosine schedule in Eq.(20) with fixed couplings , and 1, a reversed cosine, and local cosine schedules centered at with different transition widths, as shown in Fig. 4(a). Here, w = 0 denotes a hard switch and w = 1 recovers the full-width cosine.
Figure 4(b) reports the NRMSE difference relative to the full-width cosine. The increasing schedules remain close to the baseline across all overlaps, indicating limited sensitivity to the transition width. In contrast, fixed and reversed schedules generally perform worse, with showing the largest degradation. These results support progressively increasing the coupling as the noise level decreases.
V. CONCLUSION
This paper presents PCPS for low-overlap ptychographic reconstruction. Experiments on real X-ray data demonstrate improved reconstruction accuracy over iterative and diffusion-based baselines, particularly at low overlaps, while sparse sampling reduces computational cost with limited accuracy loss. These results indicate that diffusion priors can enable more measurement-efficient ptychographic imaging.
REFERENCES
[1] J. M. Rodenburg and H. M. Faulkner, "A phase retrieval algorithm for shifting illumination," Applied physics letters, vol. 85, no. 20, pp. 4795–4797, 2004. I
[2] H. M. L. Faulkner and J. Rodenburg, “Movable aperture lensless transmission microscopy: a novel phase retrieval algorithm,” Physical review letters, vol. 93, no. 2, p. 023903, 2004. I
[3] P. Thibault, M. Dierolf, O. Bunk, A. Menzel, and F. Pfeiffer, “Probe retrieval in ptychographic coherent diffractive imaging,” Ultramicroscopy, vol. 109, no. 4, pp. 338–343, 2009. I
[4] V. Elser, “Phase retrieval by iterated projections,” Journal of the Optical Society of America A, vol. 20, no. 1, pp. 40–55, 2003. I
[5] A. M. Maiden and J. M. Rodenburg, “An improved ptychographical phase retrieval algorithm for diffractive imaging,” Ultramicroscopy, vol. 109, no. 10, pp. 1256–1262, 2009. I
[6] A. Maiden, D. Johnson, and P. Li, “Further improvements to the ptychographical iterative engine,” Optica, vol. 4, no. 7, pp. 736–745, 2017. I
[7] M. Odstrcil, A. Menzel, and M. Guizar-Sicairos, “Iterative least-squares solver for generalized maximum-likelihood ptychography,” Optics Express, vol. 26, no. 3, pp. 3108–3123, 2018. I, II-A, IV-A
[8] H. Chung, J. Kim, M. T. McCann, M. L. Klasky, and J. C. Ye, “Diffusion posterior sampling for general noisy inverse problems,” in International Conference on Learning Representations, 2023. I, IV-A
[9] R. M. Cam, J. Deng, R. Kettimuthu, M. J. Cherukara, and T. Bicer, “Ptychographic image reconstruction from limited data via score-based diffusion models with physics-guidance,” in 2025 IEEE 35th International Workshop on Machine Learning for Signal Processing (MLSP), pp. 1–6, IEEE, 2025. I
[10] S. Saha, P. Ansuinelli, L. Barba, I. Mochi, and B. B. Haro, “Ptycho-ldm: A hybrid framework for efficient phase retrieval of euv photomasks using conditional latent diffusion models,” in Photonics, vol. 12, p. 900, MDPI, 2025. I
[11] B. Zhang, W. Chu, J. Berner, C. Meng, A. Anandkumar, and Y. Song, “Improving diffusion inverse problem solving with decoupled noise annealing,” in Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 20895–20905, 2025. I, III-B, IV-A
[12] H. Chen, R. Zhang, and S. S. Howard, “DAPS++: Rethinking diffusion inverse problems with decoupled posterior annealing,” arXiv preprint arXiv:2511.17038, 2025. I, IV-A
[13] J. Ho, A. Jain, and P. Abbeel, “Denoising diffusion probabilistic models,” in Advances in Neural Information Processing Systems, vol. 33, pp. 6840–6851, 2020. II-B
[14] J. Song, C. Meng, and S. Ermon, “Denoising diffusion implicit models,” in International Conference on Learning Representations, 2021. III-A
[15] A. V. Babu, T. Zhou, S. Kandel, T. Bicer, Z. Liu, W. Judge, D. J. Ching, Y. Jiang, S. Veseli, S. Henke, et al., “Deep learning at the edge enables real-time streaming ptychographic imaging,” Nature Communications, vol. 14, no. 1, p. 7059, 2023. IV-A
[16] D. Gursoy and D. J. Ching, “Tike.” [Computer Software] https://doi.org/10.11578/dc.20230202.1, dec 2022. IV-A