{"id":"3f9a40ab-17dd-4ed6-ada6-91772fcefd88","arxiv_id":"2608.02869","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":7.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":2,"one_line_summary":"Predicting objects in real/imaginary units with test-time scaling optimization makes ptychography neural network reconstructions contrast-invariant across illumination conditions, cutting Fourier error up to 5x versus the prior PtychoPINN-torch baseline.","lead":"This paper introduces a scaling trick for ptychography neural networks that lets one trained model produce correctly scaled reconstructions from datasets with very different light intensities. The authors report up to a 5x drop in Fourier error against their own previous baseline on five experimental datasets and argue the approach is ready for real-time beamline use.","discovery_kind":"new_method","skeptic_critique":{"model":"deepseek-v4-flash","headline":"The 'single trained network across beamlines' claim depends on an unstated fixed-probe condition; current experiments use per-instrument probes, so cross-beamline generalization is not actually demonstrated.","rationale":"The scaling factorization itself is mathematically sound: Eq. (5) follows from the real/imaginary parameterization and linearity of the Fourier transform, and fitting s1,s2 at inference is a plausible way to absorb dataset-dependent photon flux. The least secure condition for the central claim is not the algebra but the assumption that the probe is known and fixed. The paper states this assumption and even scopes deployment to unchanged probe geometry, but the abstract's wording about 'multiple beamlines and facilities' and 'a single trained network' overstates what the experiments actually show, since each instrument uses its own experimentally measured probe. The reader's weakest_assumption identifies the same point. My concern does not invalidate the per-probe contribution; it sharpens the scope. The reader already returned a CONDITIONAL verdict, and this concern reinforces the need for a probe-change test or clear scoping, so the verdict remains unchanged.","tokens_in":13088,"tokens_out":18309,"duration_ms":175058,"concrete_test":"Use the single model trained on TP2 synthetic data with the Velociprobe probe P_V (as in Section 3.3). Without retraining, feed the HXN 'W' dataset diffraction patterns through the same network, but keep P_V as the forward-model probe while fitting s1,s2 per dataset with Eq. (7). Compute the R-factor (Eq. 13) and compare to the result obtained when the correct HXN probe is used. If the R-factor degrades by more than about 2x, or if the reconstructed object loses the features shown in Figure 2, the cross-beamline single-network claim fails and the method is confirmed to be probe-specific.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central transfer claim rests on the fixed-probe assumption stated in Section 2.1: 'We assume a known probe function P, which remains constant between training and inference.' In Eq. (5), the quadratic coefficients are built from Psi_a = F[P a_tilde] and Psi_b = F[P b_tilde]; any change in probe shape changes these coefficients, and the two scalar parameters s1,s2 can only rescale the two basis terms, not replace a different P. The abstract's claim of 'a single trained network' across datasets 'spanning multiple beamlines and facilities' is therefore not supported by the reported protocol: the synthetic and experiment-trained models in Sections 3.1 and 3.3 are trained with experimentally measured probes for each instrument, so each beamline effectively has its own probe and thus its own network. The paper itself acknowledges in Section 4 that robustness holds only 'provided the probe geometry does not substantially change.' This is not an internal inconsistency, but it means the headline generalization claim should be scoped to flux/contrast variation under a fixed probe, not to cross-beamline deployment.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The manuscript proposes PtychoPINN-CI, a feed-forward ptychography reconstruction network with a real/imaginary decoder output, test-time fitting of two global scaling parameters (s1, s2), probe-intensity-weighted stitching, and synthetic training data sampled from an empirical real/imaginary distribution. The central claim is that, with a known and fixed probe, the far-field intensity depends quadratically on (s1, s2) when the object is represented in rectangular components, so fitting two scalars at inference makes a single trained network measurement-consistent under changes in illumination intensity. The authors report qualitative improvements and up to a 5x Fourier-error reduction over PtychoPINN-torch on five experimental datasets from multiple facilities.","tokens_in":13305,"tokens_out":5412,"duration_ms":49587,"significance":"The scaling factorization in Eqs. (1)-(5) is a clean, parameter-free consequence of the forward model and is correct as stated; if the fixed-probe assumption holds, it gives a principled and architecture-agnostic way to remove the global scale ambiguity at inference. The probe-weighted stitching and the empirical-correlation synthetic sampling are sensible engineering contributions that appear to improve reconstruction quality. The main value is in enabling zero-retraining deployment under changing photon flux. However, the empirical support is currently incomplete: quantitative metrics are not tabulated, and the cross-beamline generalization claim is not demonstrated under a single trained network and probe model.","major_comments":[{"comment":"The headline claim of 'up to a 5x reduction in Fourier error' is not supported by a quantitative table or error bars. Figure 3(c) shows only a schematic comparison, and no per-dataset R-factor values (Eq. S13) or run-to-run variability are reported. Please provide a table with per-dataset R-factors for all configurations, including the baseline, and repeat training runs with multiple seeds.","section":"Section 3.1, Fig. 3(c)"},{"comment":"The abstract and conclusion state that 'a single trained network' produces consistent reconstructions 'across 5 experimental datasets spanning multiple beamlines and facilities,' but the reported protocol trains separate models with per-instrument measured probes, and Section 4 explicitly limits robustness to cases where 'the probe geometry does not substantially change.' This is a load-bearing overstatement: with a different probe, the quadratic coefficients in Eq. (5) change, and the two scalars (s1, s2) cannot compensate. Either report an experiment with one frozen network and one probe model applied to datasets from different beamlines, or revise the claim to fixed-probe, variable-flux/contrast generalization.","section":"Abstract, Section 5, and Section 4"},{"comment":"The correlated synthetic distributions are derived from the TP2 reference reconstruction and then evaluated on TP2 (Fig. 4), so the evaluation target's complex-value statistics are present in the training-data generation. This does not invalidate the other Velociprobe datasets, but the TP2 result should be reported as a leakage-affected or semi-supervised case, and the generalization claim should rely on the held-out datasets.","section":"Section 3.3, Fig. 4"},{"comment":"The training loss as printed is not the Poisson negative log-likelihood: LPoiss = sum [I_pred - I_meas log(I_pred)]^2 is a squared residual of a likelihood expression, not the likelihood itself. Please correct the equation or justify the squared form; as written it is ambiguous and affects reproducibility.","section":"Section 2.4, Eq. (9)"}],"minor_comments":[{"comment":"The typesetting of the RMS scaling formula contains malformed radicals; please re-typeset the equation.","section":"Section 2.4, Eq. (10)"},{"comment":"Reference [22] is an incomplete citation containing 'TODO: Complete citation once published'; this must be completed before publication.","section":"References"},{"comment":"The use of the index n in Eq. (9) is inconsistent with the surrounding notation ('n' appears both as a summation index and inside the parentheses); please clean up the notation.","section":"Section 2.4 and Eq. (9)"},{"comment":"The claim of '30% fewer parameters' than PtychoPINN-torch is not accompanied by a table of architecture sizes; please report the parameter counts explicitly.","section":"Section 4"}],"recommendation":"major_revision","confidential_remarks":"The manuscript extends the authors' own baseline and the comparison is fair, but the abstract and conclusion overclaim cross-beamline deployment relative to the fixed-probe experiments actually performed. The editor may wish to ensure that the final version scopes the generalization claim to a fixed probe and adds the missing quantitative metrics."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Colleague,\n\nThe real/imaginary scaling factorization is the genuine contribution here, and it holds up. With a fixed probe, the diffracted intensity is exactly a quadratic in two scaling parameters (Eq. 5), and fitting those at inference is simple and principled. That is a real step forward for feed-forward ptychography nets, which otherwise need per-dataset fine-tuning to match photon scales. The probe-weighted stitching and correlated synthetic sampling are sensible and, as far as I can tell, new in this application. The authors also honestly report lingering phase compression and acknowledge the fixed-probe condition in Section 4.\n\nThe soft spots are mostly about evidence and scope. The quantitative case is thin: Fourier error appears in a single panel, no error bars or per-dataset metric table, and the new data aren't available yet. The synthetic sampling distribution is derived from the same instrument family used for evaluation, which is a moderate circularity concern, though the TP2-to-other-Velociprobe results do show some transfer. The bigger issue is the abstract's 'single trained network across beamlines' claim. The experiments use per-instrument measured probes, so each beamline effectively has its own network; the factorization only rescales under a fixed probe. The authors themselves note robustness requires the probe geometry does not substantially change, so the headline should be scoped to contrast/flux invariance under a fixed probe rather than cross-beamline deployment. That is an overstatement, not a fatal flaw.\n\nThere are also small presentation issues: a TODO citation, malformed equation formatting, and the loss in Eq. 9 looks garbled. None of that undermines the derivation.\n\nVerdict: the core method is sound and worth publishing after revision. A serious referee should ask for quantitative tables with error bars, code or detailed pseudocode for the scaling fit, and a rewritten abstract that scopes the generalization claim to fixed-probe settings. This is a paper for ptychography and ML practitioners; I'd put it on a reading group list and would cite the scaling factorization.","headline":"Solid scaling factorization, overstated beamline generalization claim; worth a serious referee with revisions.","tokens_in":13840,"tokens_out":2227,"would_cite":true,"duration_ms":19533,"reading_group":"yes","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"A ptychography network with real/imaginary decoder outputs reconstructs datasets across order-of-magnitude photon-flux differences by fitting two scale parameters at inference, without retraining.","keywords":["ptychography","phase retrieval","deep learning","contrast invariance","scaling factorization","real-imaginary representation","synthetic data","X-ray imaging"],"falsifier":"Take a trained PtychoPINN-CI network and apply it to a dataset acquired with a deliberately different probe, such as a different defocus setting or a changed focusing optic, while keeping the network's stored probe fixed; if the inference-time scaling fit cannot bring the predicted diffraction intensities into agreement with the measured ones, the probe-constancy assumption is violated and the central claim fails for that case.","tokens_in":12882,"feed_emoji":"🔬","tokens_out":2665,"duration_ms":27097,"temperature":0.7,"pith_summary":"This paper tries to remove the main barrier to deploying feed-forward neural networks for ptychography: their reconstructions do not generalize across experiments with different illumination intensity, because the absolute scale of the object is ambiguous. The authors propose to have the network output normalized real and imaginary object components rather than amplitude and phase, and show that the predicted diffraction intensity is then a quadratic function of just two scale parameters. At inference time, these two parameters are fit to the measured data with a fast least-squares step, so a single trained network can produce measurement-consistent reconstructions across datasets differing in photon flux by orders of magnitude. If correct, this means a network trained once on one instrument can be used for real-time experiment steering or as an initialization for iterative refinement, without fine-tuning to each new measurement scale.","feed_headline":"One network now reconstructs ptychography data at any photon scale","feed_subtitle":"Real/imaginary decoder turns intensity into a quadratic in two scale constants, fit at inference with no retraining.","key_machinery":"The central mechanism is the real/imaginary decoder representation together with the quadratic intensity factorization in Eq. (5). Because rectangular coordinates are linear through the Fourier transform, the exit wave separates into two terms, each linear in one scaling parameter, so the measured intensity becomes a quadratic form in $(s_1, s_2)$ whose coefficients are determined entirely by the network's normalized predictions and the known probe. This makes the scaling parameters directly optimizable at inference time and removes the nonlinear coupling that arises with amplitude/phase outputs. The probe-weighted patch stitching in Eq. (8), which uses the probe intensity as a confidence weight, and the synthetic object sampling from empirical real-imaginary distributions are supporting components that address signal-to-noise in patch assembly and phase-distribution mismatch in training data.","core_discovery":"The central claim is that representing the decoder output in rectangular coordinates, as normalized real and imaginary components $\\tilde{a}_o(\\theta)$ and $\\tilde{b}_o(\\theta)$, makes the far-field intensity a quadratic function of two real scaling parameters $s_1$ and $s_2$: $I = s_1^2|\\Psi_a|^2 + 2s_1 s_2 \\mathrm{Re}[\\bar{\\Psi}_a \\Psi_b] + s_2^2|\\Psi_b|^2$, where $\\Psi_a$ and $\\Psi_b$ are Fourier transforms of probe-weighted basis fields that depend only on the network's normalized predictions and the known probe. Because this intensity is quadratic in the scale parameters, the optimal $(s_1, s_2)$ for any new dataset can be found by solving a linear least-squares problem after freezing the network weights. This decouples the learned object texture from the dataset-dependent measurement scale, so a single trained network can produce photon-consistent reconstructions across datasets with very different photon fluxes. The paper further claims that probe-intensity-weighted stitching and synthetic training data sampled from empirical real-imaginary correlations are needed to recover accurate amplitude and phase contrast, and that together these components reduce Fourier error by up to a factor of five compared with the previous baseline across five experimental datasets from multiple beamlines.","pith_inferences":["The same quadratic-scaling trick should apply to any coherent imaging problem where the forward model is a product of the object with a known illumination and a linear transform, such as Fourier ptychography or in-line holography, provided the object is represented in rectangular coordinates.","One could extend the per-dataset scaling fit to a per-region or per-patch fit to handle spatially varying illumination intensity within a single dataset, though this would trade global consistency for local flexibility.","The observed phase compression, which the paper attributes to limited network capacity or remaining synthetic-data mismatch, suggests that replacing the empirical sampling distribution with a learned generative model of complex-valued object statistics could be a direct next step.","Because the factorization requires a known, fixed probe, a natural stress test is to deliberately defocus or drift the optics between training and inference; if the scaling fit still compensates, the framework may tolerate more probe variation than the stated assumption allows."],"forward_implications":["A network trained once on data from a given instrument can be reused for subsequent measurements with fluctuating photon fluxes, since the two scale parameters absorb the per-dataset intensity scale at inference with negligible computational cost.","The correctly scaled output makes neural-network reconstructions usable as initialization for iterative phase retrieval, potentially skipping the coarse refinement stage.","The scaling factorization transfers to more expressive network backbones, such as vision transformers, because it is a property of the output representation and forward model, not of the specific architecture.","The probe-weighted stitching principle, borrowed from iterative ptychography, can be applied generally to any patch-based reconstruction network that assembles overlapping object predictions.","Synthetic-only training can work for a new instrument as long as a probe function is available, removing the need for large experimental training sets at each new beamline."],"supporting_citations":[{"why":"Supplies the previous PtychoPINN-torch baseline, the experimental datasets, and the observed phase-distribution mismatch that the new synthetic sampling strategy is designed to fix.","marker":"[22]"},{"why":"Provides the original physics-constrained unsupervised learning framework, including the Poisson negative log-likelihood loss and overlap constraint that the new model trains with.","marker":"[24]"},{"why":"Establishes the ptychographic forward model and the probe-object scale ambiguity that motivates the scaling factorization.","marker":"[2]"},{"why":"Introduces the iterative ptychography algorithm whose probe-normalization weighting is mirrored in the probe-weighted patch stitching.","marker":"[7]"},{"why":"Provides the Pty-Chi least-squares maximum-likelihood algorithm used to generate the reference reconstructions and the empirical real-imaginary distributions for synthetic sampling.","marker":"[25]"}],"fun_headline_variants":["Scale-agnostic ptychography: one net, any photon flux","Ptychography net learns texture once, scales at inference","Real-imaginary output makes ptychography intensity quadratic","Contrast-invariant ptychography: fix scale without retraining","One ptychography network now covers all beamline intensities"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The probe function is assumed known and identical between training and inference; if the probe changes (for example, from optics drift or a different focusing condition), the scaling factorization and the reported cross-dataset generalization break down.","fun_headline_variants_meta":{"raw":{"variants":["Scale-agnostic ptychography: one net, any photon flux","Ptychography net learns texture once, scales at inference","Real-imaginary output makes ptychography intensity quadratic","Contrast-invariant ptychography: fix scale without retraining","One ptychography network now covers all beamline intensities"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000206,"raw_usage":{"total_tokens":1387,"prompt_tokens":927,"completion_tokens":460,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":543,"completion_tokens_details":{"reasoning_tokens":374}},"tokens_in":543,"tokens_out":460,"duration_ms":4641,"temperature":1.0,"reasoning_tokens":374,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-15T14:55:21.761517+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Take a trained PtychoPINN-CI network and apply it to a dataset acquired with a deliberately different probe, such as a different defocus setting or a changed focusing optic, while keeping the network's stored probe fixed; if the inference-time scaling fit cannot bring the predicted diffraction intensities into agreement with the measured ones, the probe-constancy assumption is violated and the central claim fails for that case.","supporting_citations":[{"cited_title":"To- wards generalizable deep ptychography neural networks","cited_arxiv_id":null,"evidence_quote":"Supplies the previous PtychoPINN-torch baseline, the experimental datasets, and the observed phase-distribution mismatch that the new synthetic sampling strategy is designed to fix."}],"review_version":2}