Manuscript Offprint
arXiv:2611.01675Learned optical compression for single-pixel quantitative phase imaging
Abstract
Quantitative phase imaging (QPI) reveals optical path-length variations in transparent objects but typically relies on spatially resolved intensity measurements. Here we numerically and experimentally demonstrate learned optical compression for single-pixel QPI, jointly optimizing a diffractive encoder and a digital neural decoder to concentrate reconstruction-relevant phase information into a compact measurement vector. A single reconfigurable phase-modulation plane sequentially displays the learned encoding patterns, which are independent of the input object, each yielding one scalar intensity measurement. Operating at a visible wavelength, the experimental system reconstructs quantitative phase images of unknown objects with ~40-fold dimensional compression, using only 2.55% as many intensity measurements as reconstructed pixels. Experimental blind testing on handwritten digits and grating-like phase objects achieves mean Pearson correlation coefficients of 0.945 and 0.848, respectively. Benchmarking under the same measurement budget demonstrates substantially higher reconstruction fidelity than other encoding strategies, highlighting the advantages of learned optical compression. With the optical encoder fixed, decoder-only neural adaptation enables experimental transfer to previously unseen data distributions, extending the utility of the learned measurement representation. These results establish learned optical compression as a measurement-efficient and reusable framework for QPI, integrating phase-information compression into single-pixel intensity measurements while retaining adaptability to new data. This approach paves the way for low-data-rate phase imaging and sensing, with the potential to extend QPI to spectral regions where high-quality detector arrays are costly or unavailable.
Introduction
Quantitative phase imaging (QPI) reveals optical path-length variations in transparent specimens, providing label-free contrast associated with refractive index and thickness variations . Because detectors record intensity rather than phase, conventional QPI methods convert phase information into intensity variations and computationally invert this mapping, which is generally ill-posed without additional information . Established approaches obtain this information through, e.g., off-axis holography , phase-shifting interferometry , common-path interferometry , or measurement diversity based on defocus , scanning of illumination angle , and asymmetric illumination . Deep-learning-based reconstruction methods can reduce the required image count , but generally retain dense spatial sampling despite the compressibility of many natural and biological phase objects . Reliance on detector arrays imposes data acquisition, storage and readout-related burdens and limits the use of QPI at wavelengths where suitable detector arrays are costly or unavailable . This motivates an acquisition strategy that compresses phase information optically into a small set of scalar measurements, rather than first recording densely sampled intensity images for subsequent digital reconstruction.
Single-pixel imaging avoids spatially resolved detection by encoding an object's spatial information in time or wavelength and reconstructing the target image from scalar measurements . This single-pixel architecture has enabled infrared and terahertz imaging , but its efficiency depends on which encodings minimize the required measurement count . For intensity imaging, Hadamard and Fourier patterns and random compressive measurements exploit a linear measurement model. Phase-to-intensity conversion is instead nonlinear, so encodings that are effective for intensity imaging need not efficiently preserve phase information. Existing single-pixel QPI methods use interferometric spatial-frequency projections , random phase modulation , or Hadamard and Fourier phase patterns , prescribed independently of object statistics and digital reconstruction methods. The challenge is to design optical encodings that exploit both the nonlinear phase-to-intensity mapping and object phase statistics to support high-fidelity quantitative phase reconstruction from a small number of scalar, single-pixel measurements.
Diffractive optical surfaces provide a physical route to learned optical encoding, with phase profiles optimized through differentiable wave propagation . For example, diffractive QPI has converted object phase into spatially resolved intensity images , including at multiple wavelengths and through unknown/random diffusers . Despite visible-wavelength demonstrations for other optical-processing tasks , diffractive QPI remains limited in this regime , with cascaded surfaces introducing fabrication and alignment demands . Hybrid optical-digital architectures instead compress optical inputs into representations decoded by neural networks , including spectral measurements acquired by a single-pixel detector . An optical compressor coupled to a digital decoder has also been numerically studied for QPI, without time-multiplexed encoding or experimental implementation . The central opportunity is therefore to learn a compact, experimentally realizable optical measurement representation that preserves quantitative phase information for single-pixel-based QPI reconstructions.
Here, we report learned optical compression for single-pixel QPI, in which the optical acquisition itself is trained to concentrate reconstruction-relevant phase information into a compact set of scalar intensity measurements. By jointly optimizing a diffractive encoder and a digital neural decoder through a differentiable wave-propagation model, we learn measurement patterns tailored to both the object statistics and the physics of phase-to-intensity conversion. A single reconfigurable phase-modulation plane sequentially displays the learned patterns, which are independent of the input phase object to be reconstructed, with optical propagation and intensity detection yielding one scalar measurement per pattern. In blind-testing experiments at 635 nm, we reconstruct -pixel quantitative phase images of previously unseen handwritten digits and grating-like phase objects from only 20 scalar intensity measurements. This corresponds to a measurement-to-output-pixel ratio of 2.55% and ~40-fold dimensional compression. At the same 20-measurement budget, numerical benchmarking with matched decoder architectures and training protocols yields an 11.4-12.7 dB improvement in mean PSNR (peak signal-to-noise ratio) over the tested random, Hadamard and Fourier encoders. This advantage demonstrates the value of jointly learning optical encoding, single-pixel acquisition and digital reconstruction rather than optimizing reconstruction alone for prescribed phase encodings. Beyond measurement efficiency, the same 20 encoder phase patterns also support experimental reconstruction of phase objects drawn from new data distributions that were excluded from their original optimization. Decoder-only retraining reduces the simulation-to-experiment mismatch and enables this transfer without re-optimizing the optical encoder or increasing the per-object measurement count.
Together, these results establish learned optical compression as a measurement-efficient and reusable framework for single-pixel QPI, combining a compact phase measurement representation with digitally adaptable phase reconstruction. By encoding QPI into a compact stream of scalar measurements, this learned optical compression approach opens a path toward low-data-rate phase sensing in biomedical imaging and optical inspection and could extend label-free QPI to parts of the electromagnetic spectrum where high-quality detector arrays are costly or unavailable.
Single-pixel QPI using sequential optimized phase encoding
Learned optical compression maps each input phase distribution into a compact sequence of optimized scalar intensity measurements, which a jointly trained neural decoder converts into a quantitative phase image (Fig. 1). In the demonstrated configuration, 20 scalar measurements support a -pixel reconstruction, corresponding to a measurement-to-output-pixel ratio of 2.55% and ~40-fold dimensional compression. Figure 1 summarizes the operating principle of the single-pixel QPI system. As shown in Fig. 1(a), our input phase object (the target sample) is defined as:
where is a normalized spatial data distribution and is a dimensionless scaling factor that sets the maximum target phase to . The target phase object to be reconstructed, , remains fixed while it is sequentially superimposed with M optimized phase-only encoder patterns, , under coherent illumination at wavelength , where . The encoder patterns are learned and fixed (i.e., they are independent of the unknown object to be reconstructed), and span a phase range of . Stated differently, after their optimization the encoder patterns are held fixed for all test objects; no object-specific optical re-optimization is performed. At the single-pixel acquisition at , the encoded phase-only optical field, composed of , propagates to the detector plane, where its intensity is averaged over a detector aperture of width to produce one scalar measurement, . Repeating this process for all encoder states forms the nonnegative measurement vector:
As illustrated in Fig. 1(b), the digital neural decoder, , first normalizes the -element measurement vector and expands it through a sequence of fully connected layers. The resulting features are reshaped into a spatial latent representation and upsampled through two transposed-convolutional stages to reconstruct the phase distribution of the input phase object:
The layer dimensions and intermediate feature-map sizes are depicted in Fig. 1(b), with complete architectural details provided in the Methods.
The object-independent encoder phase patterns, , and the neural decoder, , were jointly optimized using supervised training within a differentiable model of the complete data acquisition process (see Fig. 2(a)). Training phase objects were randomly drawn from the MNIST dataset and a custom-built grating-like image dataset (see the Methods section). The phase-range scaling factor was chosen as to limit the target objects' phase range between 0 and unless otherwise mentioned. The resulting complex field, , was then propagated through the differentiable optical model onto the detector plane. Spatial averaging of the detector-plane intensity over the finite detector aperture yielded the measurement vector , which was processed by the digital decoder to reconstruct the target phase distribution for each training sample. Since the complete optical data acquisition and image reconstruction model was differentiable, gradients were backpropagated through both the optical encoder and the digital decoder, enabling end-to-end joint optimization. The training loss function combined pixelwise mean square error of the phase reconstruction with a detector-plane energy penalty term that promoted optical energy to remain concentrated within the finite detector aperture (see Methods for details). The resulting optimized encoder phase patterns, , are shown in Fig. 2(b); post-training, these encoder patterns remain frozen, independent of the input target phase function to be reconstructed, .
Experimental single-pixel phase reconstruction at ~40-fold dimensional compression
The optimized encoder was tested experimentally using the visible-wavelength optical system shown in Fig. 3. As illustrated in Fig. 3(a), a 635-nm coherent beam illuminated a reflective phase-only spatial light modulator (SLM), which displayed the phase object together with each of the 20 encoder patterns in a sequence. Fig. 3(b) shows the corresponding experimental setup. At the detector plane, each encoder pattern produced a spatial intensity distribution, as shown in Fig. 3(c). A fixed region of interest, corresponding to approximately , defined the single-pixel detection aperture. The optical intensity within this region generated one scalar measurement for each encoder pattern, and repeating this process for all encoder patterns created the measurement vector supplied to the digital decoder, i.e., ; no spatially resolved camera image was supplied for reconstruction, and the remaining camera pixels were used only for alignment.
For the experimental deployment and testing of the trained model, the encoder states, , were quantized into 8-bit SLM patterns and fixed for experimental deployment. Zero-shot QPI was performed by applying the simulation-trained decoder directly to the experimental measurement vectors, ; in this notation, we use to indicate the model was not exposed to experimental training data. This zero-shot deployment achieved mean PCC (Pearson correlation coefficient) values of 0.848 for MNIST and 0.752 for grating-like test objects that were never seen before (Fig. 4(c,d)), demonstrating direct transfer from the digital twin to the physical/experimental system. The remaining simulation-to-experiment gap reflects experimental imperfections, including photon noise, misalignment, and detector-sampling inaccuracies. To reduce this gap, was fine-tuned using experimentally tested objects from each dataset, yielding while remained fixed; for example, denotes 900 MNIST and 900 grating objects used during this experimental transfer learning phase. Final blind testing through was applied to separate phase-only objects never used before. Fig. 3(d) compares simulated () and experimental () measurement vectors for a test object held out from decoder training. Their strong correlation across the 20 encoder states () shows that the digital twin closely reproduces the experimental measurement response. After transfer learning with objects per dataset, the experimental phase reconstructions achieved a PCC of 0.979 and a PSNR of 24.9 dB, approaching the simulated reconstruction performance of PCC of 0.989 and PSNR of 27.9 dB (Fig. 3(e)).
Furthermore, Fig. 4(a,b) compares blind-test reconstructions from simulated measurements using , zero-shot experimental measurements using , and transfer-learned experimental measurements using , while the optimized encoder remains fixed. The simulated reconstructions closely reproduce both the localized structures of the MNIST objects and the extended periodic features of the grating-like phase objects, which have never been seen before. Under zero-shot deployment, the principal object structures remain recognizable, showing that can recover meaningful phase information directly from experimental measurements. However, these reconstructions exhibit relatively attenuated phase contrast, local spatial distortions, and background artifacts, reflecting the mismatch between the digital twin and the experimental set-up. Transfer learning substantially reduces these errors: using the reconstructed object boundaries and grating features more closely follow the ground truth, phase contrast is better recovered, and background artifacts are suppressed. This improvement across both object classes demonstrates that much of the experimental mismatch compared to the digital twin can be corrected through without modifying .
To statistically quantify the phase reconstruction quality, PCC and PSNR values between the reconstructed and ground-truth phase distributions were reported through the mean standard deviation values over the blind test set in Fig. 4(c). For MNIST test objects, the simulated PCC of and PSNR of dB fell to and dB, respectively, when the same decoder was applied directly to experimental measurements, . Transfer learning with experimental objects per dataset recovered most of the gap (PCC , PSNR dB), while a further increase of experimental transfer learning to improved the performance to (PCC) and dB (PSNR). On the other hand, the grating test dataset encompassed a broad range of spatial periods, orientations, and pattern geometries (see Methods; representative examples are shown in Fig. 4(b)). Its phase reconstruction performance is summarized in Fig. 4(d). The mean simulated reconstruction PCC was (PSNR dB), while zero-shot experimental deployment achieved ( dB), respectively. Experimental transfer learning further increased the mean PCC to and the mean PSNR to dB at T = 900, while all 20 optical encoder patterns remained fixed. Although the experimental reconstructions exhibited greater variability than those of MNIST test objects, decoder adaptation produced a consistent improvement in the single-pixel QPI fidelity.
Together, these blind tests demonstrate ~40-fold dimensional compression for phase objects ranging from sparse, localized handwritten digits to extended periodic gratings, using a single optimized optical encoder, scalar intensity detection and a jointly optimized digital decoder. Reconstruction of held-out objects before experimental fine-tuning establishes direct simulation-to-experiment transfer, while decoder-only adaptation substantially improves fidelity without changing the optical encoding patterns. The same compact measurement representation therefore supports both structurally distinct object classes and experimental adaptation of their reconstruction.
To further shed light on how the single-pixel QPI reconstruction fidelity depends on the spatial feature size of test objects, we evaluated linear grating phase objects with periods between 142.9 and 714.3 µm and orientations spanning 0–180° (Fig. 5). Each test grating, never seen before, was reconstructed in simulation and from its experimental measurements, both zero-shot and after transfer learning with . For a fair comparison, all gratings shown in Fig. 5 were held out from the learning sets. Fig. 5(a) presents representative ground-truth, simulated, and experimental reconstructions for grating periods of 657, 571, 429, and 229 µm. Fig. 5(b) compares their phase profiles, extracted along a line perpendicular to the grating fringes, together with the corresponding phase errors. The simulated profiles closely follow the ground truth for all four gratings (PCC ). Both sets of experimental reconstructions recover the grating structure: zero-shot PCC is 0.963–0.966 for the three coarser gratings and 0.899 for the 229 µm grating, rising to 0.985–0.992 and 0.926, respectively, after transfer learning, . The phase errors nevertheless grow as the period decreases. This period dependence of single-pixel QPI is quantified in Fig. 5(c), where all curves are evaluated on the same 54 held-out linear gratings grouped into seven period bins. In simulation results , the phase reconstruction fidelity is nearly independent of period: the mean PCC is 0.978 in the shortest-period bin (171 µm) and 0.998–0.999 for periods of 263 µm and longer. The zero-shot experimental reconstructions show a markedly different trend, reaching mean PCC values of 0.832–0.925 at long periods but falling to 0.351 in the shortest-period bin. To test whether measurement-domain perturbations could account for this loss, we approximated an additive Gaussian perturbation model using the residuals between measured and simulated detector signals for the same objects (see Methods), obtaining relative to the spread of each object's measurement vector. Applying these perturbations to the simulated measurements and decoding them with the unchanged decoder reproduced much of the experimental period dependence: the mean PCC decreased from 0.924–0.941 at long periods to 0.410 in the shortest-period bin, closely following the zero-shot results, . Transfer learning, , recovered most of the long-period degradation, increasing the mean PCC to 0.941–0.975 for periods of 263 µm and longer.
At the shortest period, however, the improvement was modest, from 0.351 to 0.447, leaving performance below the noise-free simulation results.
Learned optical encoding improves single-pixel QPI fidelity under a fixed measurement budget
Next, we investigated whether the optimized single-pixel measurement process outperforms conventional encoding strategies under the same measurement budget. To assess the benefit of jointly optimizing the optical encoder and digital decoder, we numerically compared the optimized encoder with random, Hadamard, and Fourier phase-pattern baselines (see Methods). These baselines represent established encoding strategies in single-pixel imaging and single-pixel QPI, including random projections , spatial-frequency projections , and fixed Hadamard or Fourier phase bases . Unlike the encoder presented in this work, these measurement patterns are prescribed independently of the object data distribution and digital reconstruction model. This comparison therefore tests whether optimizing the physical measurement process enables a limited set of scalar measurements to preserve more information for quantitative phase reconstruction than established fixed-pattern encoding strategies.
The benchmarking pipeline is summarized in Fig. 6. Each encoder contained phase masks and therefore generated the same number of scalar measurements per unknown test object. The optimized condition used the original jointly optimized encoder and decoder, and . For each fixed-pattern baseline, the random, Hadamard, or Fourier encoder was frozen and paired with a newly initialized digital decoder having the same architecture as . Each baseline decoder was optimized independently under the same training and evaluation protocol. The comparison therefore evaluates the complete jointly optimized optical-digital system against systems employing prescribed optical encoders and separately optimized digital reconstruction. The mask construction and complete training protocol are detailed in the Methods section.
Representative blind-testing reconstructions and the corresponding quantitative metrics are shown in Fig. 7. The optimized encoder preserved the structures of both MNIST and grating-like phase objects more faithfully than the other encoder baselines, achieving a mean PCC of and a PSNR of dB. By comparison, the random encoders achieved PCC and dB PSNR, while the Hadamard and Fourier encoders achieved PCC values of and and PSNR values of and dB, respectively. The jointly optimized system improved mean PSNR by 11.4, 11.9 and 12.7 dB over the random, Hadamard and Fourier baselines, respectively, while using the same 20-measurement budget and neural decoder architecture. These results demonstrate that learning the optical measurements together with the decoder provides a substantial reconstruction advantage for single-pixel QPI over optimizing the neural decoder alone for the tested prescribed phase encodings.
Next, we examined how reconstruction performance changes with the number () of optimized encoder states. This analysis separates the benefit of the encoder design from the effect of simply acquiring additional measurements. The number of sequential scalar measurements, , determines both the optical compression and the reconstruction fidelity of the proposed system. Reducing shortens the acquisition sequence and increases compression, but also limits the phase information available to the digital decoder. To characterize this trade-off, Fig. S1 evaluates reconstruction performance for using various test phase objects. PCC and PSNR are reported while the output resolution remains fixed at pixels. Therefore, the observed changes in fidelity arise from the number of acquired scalar measurements rather than from changes in reconstruction resolution. For this analysis, we define the measurement ratio as
Across the sweep, the measurement ratio ranges from 2/784 to 50/784, corresponding to approximately 0.26% – 6.38%. Both PCC and PSNR values improve markedly at low measurement counts and continue to increase as M approaches 20. Grating-like test objects exhibit the largest reduction in fidelity under lower values of , reflecting the greater measurement diversity required to recover their spatially varying phase structure, whereas MNIST test objects remain more recognizable at smaller . Increasing M from 20 to 50 provides further reconstruction gains, whereas M = 20 offers a practical balance between QPI fidelity and sequential measurement count under the evaluated training protocol. We used this 20-measurement configuration for experimental deployment, corresponding to a 2.55% measurement-to-output-pixel ratio and ~40-fold dimensional compression.
Generalization and transferability of the frozen optical encoder to new data distributions
Using numerical simulations, we next investigated whether the frozen, optimized optical encoder could support object phase ranges beyond the range used during its original joint optimization, and whether decoder-only fine-tuning could broaden the operating range of the single-pixel QPI system. As illustrated in Fig. 8, in this analysis the original digital decoder is hereafter referred to as the “Phase Specialist” model. This decoder was jointly optimized with the optical encoder only at , corresponding to a maximum object phase of . Phase Generalist I and Phase Generalist II were initialized from the Phase Specialist and fine-tuned using phase-scale factors sampled from and , respectively. In both cases, the decoder was fine-tuned with its output range expanded from to , while the optical encoder remained fixed. The three decoders were subsequently evaluated using the same previously unseen test objects over .
Representative MNIST test object reconstructions are shown in Fig. 9(a), while Fig. 9(b) reports the mean PCC over MNIST test objects. Despite being optimized only at , the Phase Specialist retained high structural fidelity outside its optimization condition, achieving mean PCC values from 0.913 to 0.974 over . Phase Generalist I extended this range further, maintaining a mean PCC above 0.910 over . In particular, it achieved PCC values of 0.934 at and 0.914 at , both outside its fine-tuning range. These results demonstrate external phase-range generalization for Phase Generalist I, which retained high structural correlation at phase scales outside its fine-tuning interval. Phase Generalist II, whose fine-tuning range encompassed the complete evaluation interval, achieved a PCC above 0.910 from to 2, including 0.914 at . The improvement was most pronounced at the extremes: at , the PCC increased from 0.346 for the Phase Specialist to 0.772 and 0.858 for Phase Generalists I and II, respectively; at , it increased from 0.615 to 0.746 and 0.914, respectively. As highlighted by the enlarged region around in Fig. 9(b), this broader performance involved only a modest trade-off at the original operating point, where the PCC decreased from 0.974 for the Phase Specialist to 0.968 and 0.961 for Phase Generalists I and II, respectively.
These results reveal complementary phase-generalization capabilities in the optical encoder and digital decoder. Because the optimized optical encoder was jointly optimized only at , its ability to support reconstruction across the complete tested interval, , shows that its compressed measurements preserve phase information beyond the range encountered during joint optimization/training. Decoder-only fine-tuning, together with expansion of the decoder output range, further improves structural fidelity of phase reconstructions over a broader range of object-phase amplitudes while leaving the optical encoder unchanged. The same physical encoder can therefore be retained while the digital decoder is adapted to the phase range expected for a particular QPI application, avoiding the need to re-optimize or modify the optical system.
We next experimentally demonstrated the reuse of the same 20-pattern optical encoder across five phase-object datasets, including EMNIST and BloodMNIST, whose phase images were excluded from simulation-stage decoder training (Figs. 10 and 11). With the optical encoder frozen, one multi-dataset decoder was trained in simulation using the combination of MNIST, Fashion-MNIST, and OrganAMNIST, which we refer to as internal datasets because they were seen during decoder training. We then introduced EMNIST and BloodMNIST as external datasets that were excluded from this training stage, allowing us to test generalization to previously unseen object/data distributions. For this study, the simulation-stage decoder was trained using perturbations calibrated from experimental residuals computed on the experimental fine-tuning training sets. The held-out experimental test objects were excluded from residual calibration. The same decoder was first applied directly to experimental measurements from all five datasets to establish zero-shot experimental results and was subsequently fine-tuned to produce using experimental data while keeping the optical encoder unchanged. This design therefore evaluates both simulation-to-experiment generalization for familiar object distributions and transfer learning to previously unseen data distributions using only digital decoder updates.
Fig. 11 summarizes the dataset-transfer performance of the frozen optical encoder (values given as PCC and PSNR). For the internal datasets, Fig. 11 (a,b), the simulation-trained decoder transfers well to experimental measurements for MNIST and Fashion-MNIST test objects, with only a modest reduction in fidelity under zero-shot deployment: 0.895 (18.5 dB) and 0.918 (18.9 dB), compared with 0.945 (21.4 dB) and 0.942 (20.7 dB) in simulation, respectively. OrganAMNIST presents a more challenging data distribution: its simulated test performance is lower (0.728 (17.0 dB)), reflecting the more complex, low-contrast structure of these images, and its zero-shot performance is 0.679 (16.1 dB). Experimental decoder adaptation improves performance across all three datasets, with most of the gain occurring with transfer-learning objects per dataset before gradually approaching a plateau. At , MNIST and Fashion-MNIST reach 0.942 (21.5 dB) and 0.937 (20.8 dB), matching their simulated performance, an increase of about 2–3 dB in PSNR over zero-shot. OrganAMNIST reaches 0.761 (17.5 dB), slightly exceeding its simulated value. The corresponding reconstructions show the same trend as in Fig. 4, with improved structural phase fidelity after adaptation while the optical encoder remains unchanged.
These external phase datasets provide a more stringent test for our single-pixel QPI system because neither EMNIST nor BloodMNIST images were included in simulation-stage decoder training (Fig. 11(c,d)). Despite this distribution shift at the input phase objects, the zero-shot reconstructions retain recognizable object structure, 0.779 (15.1 dB) for EMNIST and 0.651 (13.2 dB) for BloodMNIST test images, indicating that the fixed encoder preserves phase information beyond the object/data distributions used for the original encoder–decoder optimization. Subsequent experimental transfer learning substantially improves the QPI results of both datasets, with the largest gain observed for BloodMNIST, which rises from 0.651 (13.2 dB) to 0.884 (22.0 dB), reflecting an 8.8 dB improvement. Similarly, EMNIST improves from 0.779 (15.1 dB) to 0.871 (17.9 dB). In both cases, the adapted decoder surpasses the simulation-stage decoder's performance on the same test objects in simulation because the simulation-stage decoder was never trained on these distributions.
Together, the numerical benchmarks and optical experiments establish two complementary capabilities of learned optical compression for single-pixel QPI: improved phase-reconstruction fidelity over the tested prescribed encoders at the same measurement count, and reuse of the optimized optical encoder across new data distributions absent from its original training. This combination makes the learned measurement representation both compressive and reusable, rather than restricting it to the object distributions used for its initial optimization. Adapting the digital decoder not only compensates for changes in object phase statistics but also for simulation-to-experiment domain shifts. With the optical front-end held fixed, the system can therefore be extended to new phase-object data distributions through decoder fine-tuning alone, demonstrating the transferability and reusability of the optimized single-pixel QPI measurement framework.
Discussion
In this work, we experimentally demonstrated single-pixel QPI with a jointly optimized optical encoder and digital decoder, reconstructing -pixel phase images of various test objects from 20 scalar intensity measurements. Under the same measurement budget, benchmarking showed that the optimized encoder substantially outperformed random, Hadamard, and Fourier patterns. With the same encoder states fixed, decoder-only adaptation improved experimental reconstruction fidelity and enabled transfer to previously unseen object phase distributions. Simulations further demonstrated that decoder retraining could improve structural reconstruction across a broader range of object-phase amplitudes. Together, these results establish a measurement-efficient and reusable optical encoding framework that can be adapted to different imaging conditions and object distributions without modifying the optical hardware.
The optical encoder of this single-pixel QPI architecture determines which information is retained in the scalar measurements and therefore places practical limits on reconstruction fidelity. By holding the decoder architecture and training protocol constant, the benchmark comparisons in Fig. 7 empirically examine how the choice of optical encoding affects reconstruction performance under matched conditions. Each encoder was paired with an identical decoder architecture trained under identical conditions, so differences in QPI fidelity reflect the information supplied by each encoder type. Under these conditions, the optimized encoder reached a mean PCC of 0.969, compared with 0.811 for random, 0.804 for Hadamard, and 0.789 for Fourier patterns. The lower performance of the structured Hadamard and Fourier bases compared with random patterns indicates that structure alone does not guarantee effective encoding under the nonlinear phase-measurement model used here. Although Hadamard and Fourier bases are efficient for linear intensity imaging, this does not guarantee efficient phase encoding under a limited measurement budget. The optimized encoder instead allocates its 20 measurements according to both the object statistics and the measurement physics, as reflected in the spatial-frequency content of the optimized patterns (Fig. 2(b)). Optimizing the physical measurement is therefore not a refinement of the reconstruction but reflects a step that determines how much phase information the reconstruction can use. This distinction separates the present approach from earlier single-pixel QPI methods, which formed their measurements from prescribed rather than optimized patterns . Such discrete-pattern implementations operated at measurement ratios of ~400–600% , whereas the present system performs quantitative phase reconstructions using a measurement ratio of .
Whereas the optical encoder determines which phase information is retained, the digital decoder determines how well that information is mapped to a phase reconstruction under experimental conditions. With the encoder fixed, decoder-only transfer learning using objects per dataset substantially reduced the simulation-to-experiment mismatch. The same adaptation also shows what the encoder retains. The improvement in BloodMNIST reconstruction demonstrates that the frozen 20-measurement representation remains useful for phase-object distributions outside the encoder’s original optimization set, with substantially improved reconstruction obtained through decoder-only adaptation. The present system therefore handles both experimental calibration and task changes by optimizing , without re-optimizing the optical encoder . Because this flexibility rests entirely on the neural decoder, its size and computational cost determine how practical the approach is. The decoder maps the 20-element measurement vector to a reconstruction using 115.4 million trainable parameters and approximately 519.6 million multiply-accumulate operations per reconstruction. This is equivalent to approximately 1.04 GFLOPs when multiplication and addition are counted separately (see Methods). Although the decoder has many parameters, its computational demand per reconstruction is moderate: deep-learning QPI networks that recover phase from full-resolution intensity images or holograms typically require between about 10 and several hundred GFLOPs per image , because they process the full detector frame. Most of the decoder’s parameters reside in a single fully connected layer (approximately 103 of 115 million), which makes it well suited to compression: low-rank factorization of large fully connected layers , weight pruning , or more parameter-efficient convolutional architectures could shrink it substantially without changing the optimized optical measurement process.
In this time-multiplexed single-pixel QPI architecture, the number of measurements, , controls the trade-off among compression, acquisition length, and reconstruction fidelity. As shown in Fig. S1 (each trained separately with a reduced training budget; see Supplementary Information), increasing produces the largest gains in the strongly undersampled regime with low values. From to , the combined PCC increases from ~0.291 to 0.869, while the corresponding PSNR rises from ~10 dB to 20 dB. Further increasing to 20 improves the combined PCC to ~0.942 and the PSNR to ~24 dB, whereas increasing the measurement count to yields only modest additional gains. The dependence on is particularly pronounced for grating test images: their PCC is near zero at , compared with ~0.50 for MNIST, but increases to above 0.9 by , indicating that the grating-like test phase structures require greater measurement diversity under severe undersampling. These results therefore identify as a practical operating point for the present system, capturing most of the achievable reconstruction improvement while limiting the sequential acquisition to 20 scalar measurements. For a -pixel phase reconstruction, this corresponds to a measurement ratio of , a ~40× dimensional reduction.
Single-pixel detection at other parts of the electromagnetic spectrum could extend the significance of this approach beyond the visible-wavelength implementation demonstrated here. Although high-performance detector arrays are widely available at visible wavelengths, arrays can become substantially more expensive, less sensitive or more difficult to fabricate in infrared, terahertz and other spectral regions. Single-pixel architectures allow the use of detector technologies optimized for the wavelength, sensitivity, dynamic range or temporal bandwidth of interest without requiring those detectors to be fabricated as dense arrays. They can also reduce detector readout and data-transfer requirements by recording a compact sequence of scalar values rather than spatially resolved intensity frames.
Future implementations could further improve the throughput and applicability of the presented single-pixel QPI framework. The sequential acquisition time could be reduced by using faster phase light modulators (PLMs) and tighter synchronization between modulation and detection, since the present acquisition rate is primarily limited by the SLM update and settling time rather than by the optical measurement itself. Throughput could also be increased through spatial parallelization, by dividing the modulator aperture into independently optimized channels associated with separate single-pixel detector regions or single-element detectors, enabling parallel acquisition from multiple fields of view or phase objects. Beyond acquisition speed, wavelength diversity could increase the information available for reconstruction: because the phase delay introduced by a specimen depends on wavelength and material dispersion, measurements at multiple wavelengths provide additional constraints on the object, and diffractive multispectral QPI has previously produced wavelength-resolved quantitative phase maps across multiple bands. A wavelength-diverse extension of the present system could therefore improve the robustness of the recovered phase or enable reconstruction of multispectral phase distributions. Finally, extending the current programmable-SLM validation to independent physical-phase specimens would provide a broader realization of the proposed single-pixel QPI architecture across various phase-imaging and sensing applications.
In summary, these results establish a controlled experimental foundation for measurement-efficient single-pixel QPI using a reusable optimized optical encoder. By jointly optimizing the physical measurement process and digital reconstruction, the proposed framework preserves quantitative phase information within a highly compressed set of scalar measurements while retaining adaptability through decoder-only retraining. More broadly, this work highlights the value of task-specific optical measurement design for quantitative phase imaging, particularly in regimes where spatially resolved detector arrays are costly, slow, or unavailable, or where reducing measurement and data requirements is itself advantageous.
Methods
Optical forward model
The single-pixel quantitative phase imaging system was represented by a differentiable optical encoder, , followed by a digital decoder, . The encoder used sequential phase masks, yielding one scalar measurement per mask, and was time-multiplexed over the acquisition times , while the input phase object remained fixed. Let denote the target phase object to be reconstructed, and let denote the uniformly illuminated aperture. At time , the field at the input plane was
Propagation through a homogeneous medium of refractive index over an axial distance was written as the first Rayleigh–Sommerfeld diffraction integral,
with
where is the wavelength in the propagation medium, with denoting the vacuum wavelength. The numerical model evaluated the propagating-wave component using the angular-spectrum representation:
where and represent the Fourier and inverse Fourier transforms and is
defined by
Average intensity detection at the detector plane over the single-pixel aperture yields a single scalar measurement :
The complete acquisition yielded
For all the single-pixel QPI models the target phase map and reconstruction were defined on an grid with . The target was bilinearly interpolated onto an object-plane grid with to be used as the input phase. The optical field was represented on an simulation grid with pitch . The encoder contained independently controlled phase pixels with pitch , and the interpolated object occupied samples with pitch . The numerical window therefore spanned , the encoder region spanned and the interpolated object occupied . The propagated light has a wavelength of , and was used as the distance between the time-multiplexed encoder and the detector. The simulated detector has a length , or 25 simulation-grid samples.
Modeling and initialization of optical time-multiplexed encoder
The phase-only encoder was parameterized by an unconstrained latent trainable tensor , calculated by:
where is the sigmoid function. The trainable variables were initialized as
where denotes a normal (Gaussian) distribution and is the standard deviation used to initialize the latent encoder parameters . The deployed model used encoder states, and phase values, resulting in million optimized optical parameters. Once deployed, the same optimized encoder states were used for all reported experimental captures and were frozen during decoder transfer learning (Fig. 2).
Evaluation metrics and statistical analysis
Reconstruction fidelity was quantified primarily using PCC and PSNR. Each reconstructed phase map and its ground-truth phase map were flattened before evaluation. For one pair, PCC was computed as
where n indexes pixels on the reconstruction grid, and and are the mean values of the reconstructed and target phase maps, respectively. PCC was computed per object and then summarized across the corresponding blind-testing set.
MSE was computed between the reconstructed and target phase maps on the reconstruction grid. For object i, the MSE was defined as
where and denote the reconstructed and target phase maps, respectively. For a test phase scale , the target phase range was 0 to , and the peak value used to calculate phase PSNR was radians:
For grating analyses, phase-error profiles were computed along selected one-dimensional sections through the reconstructed and target phase maps.
Numerical benchmarking of optical encoding strategies
Four phase encoding strategies were compared numerically: optimized, random, Hadamard, and Fourier phase encoding. Every encoder contained phase-only masks, each represented by independently specified SLM phase values, and produced one scalar intensity measurement per mask. The optimized condition used the original encoder–decoder pair, , obtained through end-to-end joint optimization and subsequently deployed in the experimental system. For each fixed-pattern baseline, the random, Hadamard, or Fourier masks were frozen and paired with a newly initialized digital decoder having the same architecture as . Each baseline decoder was then trained from scratch to reconstruct the phase objects from the measurements produced by its corresponding encoder. The comparison therefore evaluates the performance of the jointly optimized optical–digital system against conventional fixed optical encoders followed by independently optimized digital reconstruction.
The random encoder consisted of independently sampled phase values drawn uniformly from . The Hadamard masks were generated from a Sylvester Hadamard matrix , which was the smallest power-of-two construction covering the -pixel SLM grid. Each two-dimensional pattern was formed as the outer product of two Hadamard rows, cropped to pixels, and mapped from binary values to phase levels of 0 and . Two Hadamard orderings were evaluated: an index-based Sylvester ordering and a cake-cutting ordering based on the number of connected regions in each pattern. The Sylvester ordering produced the higher reconstruction PCC and was used for the comparison reported in Figs. 6 and 7. Fourier masks were constructed from two-dimensional cosine patterns,
where , and denotes the spatial-frequency index. Frequencies were selected from a grid, ordered by increasing , with the zero-frequency component omitted. We evaluated a cosine-only implementation, which assigned one mask to each of the 20 lowest nonzero frequencies, and a quadrature implementation, which assigned phase offsets of and to each of the ten lowest frequencies. The quadrature implementation achieved the higher PCC and was used as the Fourier baseline reported in Figs. 6-7. Both the Hadamard ordering and the Fourier variant were selected based on reconstruction PCC on the validation set.
Supplementary Information:
Supplementary Information includes:
-
Supplementary Fig. S1
-
Digital decoder architecture
-
Loss functions for single-pixel QPI joint optimization
-
Experimental implementation details
-
Experimental transfer learning
-
Datasets and preprocessing
-
Experimental noise calibration and noise-augmented simulations
References
-
Park, Y., Depeursinge, C. & Popescu, G. Quantitative phase imaging in biomedicine. Nat. Photonics 12, 578–589 (2018).
-
Nguyen, T. L. et al. Quantitative Phase Imaging: Recent Advances and Expanding Potential in Biomedicine. ACS Nano 16, 11516–11544 (2022).
-
Kandel, M. E. et al. Phase imaging with computational specificity (PICS) for measuring dry mass changes in sub-cellular compartments. Nat. Commun. 11, 6256 (2020).
-
Shechtman, Y. et al. Phase Retrieval with Application to Optical Imaging: A contemporary overview. IEEE Signal Process. Mag. 32, 87–109 (2015).
-
Javidi, B. et al. Roadmap on digital holography [Invited]. Opt. Express 29, 35078 (2021).
-
Cuche, E., Marquet, P. & Depeursinge, C. Simultaneous amplitude-contrast and quantitative phase-contrast microscopy by numerical reconstruction of Fresnel off-axis holograms. Appl. Opt. 38, 6994 (1999).
-
Yamaguchi, I. & Zhang, T. Phase-shifting digital holography. Opt. Lett. 22, 1268–1270 (1997).
-
Popescu, G., Ikeda, T., Dasari, R. R. & Feld, M. S. Diffraction phase microscopy for quantifying cell structure and dynamics. Opt. Lett. 31, 775 (2006).
-
Wang, Z. et al. Spatial light interference microscopy (SLIM). Opt. Express 19, 1016–1026 (2011).
-
Zuo, C. et al. Transport of intensity equation: a tutorial. Opt. Lasers Eng. 135, 106187 (2020).
-
Greenbaum, A. et al. Wide-field computational imaging of pathology slides using lens-free on-chip microscopy. Sci. Transl. Med. 6, 267ra175 (2014).
-
Greenbaum, A. & Ozcan, A. Maskless imaging of dense samples using pixel super-resolution based multi-height lensfree on-chip microscopy. Opt. Express 20, 3129 (2012).
-
Rodenburg, J. M. & Faulkner, H. M. L. A phase retrieval algorithm for shifting illumination. Appl. Phys. Lett. 85, 4795–4797 (2004).
-
Zheng, G., Horstmeyer, R. & Yang, C. Wide-field, high-resolution Fourier ptychographic microscopy. Nat. Photonics 7, 739–745 (2013).
-
Fienup, J. R. Phase retrieval algorithms: a comparison. Appl. Opt. 21, 2758 (1982).
-
Luo, W., Greenbaum, A., Zhang, Y. & Ozcan, A. Synthetic aperture-based on-chip microscopy. Light Sci. Appl. 4, e261–e261 (2015).
-
Tian, L. & Waller, L. Quantitative differential phase contrast imaging in an LED array microscope. Opt. Express 23, 11394 (2015).
-
Barbastathis, G., Ozcan, A. & Situ, G. On the use of deep learning for computational imaging. Optica 6, 921 (2019).
-
Rivenson, Y., Zhang, Y., Günaydin, H., Teng, D. & Ozcan, A. Phase recovery and holographic image reconstruction using deep learning in neural networks. Light Sci. Appl. 7, 17141 (2018).
-
De Haan, K., Rivenson, Y., Wu, Y. & Ozcan, A. Deep-Learning-Based Image Reconstruction and Enhancement in Optical Microscopy. Proc. IEEE 108, 30–50 (2020).
-
Park, J. et al. Artificial intelligence-enabled quantitative phase imaging methods for life sciences. Nat. Methods 20, 1645–1660 (2023).
-
Sinha, A., Lee, J., Li, S. & Barbastathis, G. Lensless computational imaging through deep learning. Optica 4, 1117 (2017).
-
Deng, M., Li, S., Goy, A., Kang, I. & Barbastathis, G. Learning to synthesize: robust phase retrieval at low photon counts. Light Sci. Appl. 9, 36 (2020).
-
Donoho, D. L. Compressed sensing. IEEE Trans. Inf. Theory 52, 1289–1306 (2006).
-
Edgar, M. P., Gibson, G. M. & Padgett, M. J. Principles and prospects for single-pixel imaging. Nat. Photonics 13, 13–20 (2019).
-
Duarte, M. F. et al. Single-pixel imaging via compressive sampling. IEEE Signal Process. Mag. 25, 83–91 (2008).
-
Zhang, Z., Ma, X. & Zhong, J. Single-pixel imaging by means of Fourier spectrum acquisition. Nat. Commun. 6, 6225 (2015).
-
Zhang, Z., Wang, X., Zheng, G. & Zhong, J. Hadamard single-pixel imaging versus Fourier single-pixel imaging. Opt. Express 25, 19619 (2017).
-
Goda, K., Tsia, K. K. & Jalali, B. Serial time-encoded amplified imaging for real-time observation of fast dynamic phenomena. Nature 458, 1145–1149 (2009).
-
Li, J. et al. Spectrally encoded single-pixel machine vision using diffractive networks. Sci. Adv. 7, eabd7690 (2021).
-
Higham, C. F., Murray-Smith, R., Padgett, M. J. & Edgar, M. P. Deep learning for real-time single-pixel video. Sci. Rep. 8, 2369 (2018).
-
Watts, C. M. et al. Terahertz compressive imaging with metamaterial spatial light modulators. Nat. Photonics 8, 605–609 (2014).
-
Radwell, N. et al. Single-pixel infrared and visible microscope. Optica 1, 285 (2014).
-
Zhang, K., Hu, J. & Yang, W. Deep compressed imaging via optimized pattern scanning. Photonics Res. 9, B57 (2021).
-
Bai, B. et al. Data-Class-Specific All-Optical Transformations and Encryption. Adv. Mater. 35, 2212091 (2023).
-
Stockton, P. A., Field, J. J. & Bartels, R. A. Single pixel quantitative phase imaging with spatial frequency projections. Methods 136, 24–34 (2018).
-
Li, X., Sun, Y., He, Y., Li, X. & Sun, B. Quantitative imaging for optical field via a single-pixel detector. Signal Process. 188, 108173 (2021).
-
Zhao, Y.-N. et al. Single-pixel phase microscopy without 4 f system. Opt. Lasers Eng. 163, 107474 (2023).
-
Lin, X. et al. All-optical machine learning using diffractive deep neural networks. Science 361, 1004–1008 (2018).
-
Mengu, D. & Ozcan, A. All-Optical Phase Recovery: Diffractive Computing for Quantitative Phase Imaging. Adv. Opt. Mater. 10, 2200281 (2022).
-
Shen, C.-Y., Li, J., Mengu, D. & Ozcan, A. Multispectral Quantitative Phase Imaging Using a Diffractive Optical Network. Adv. Intell. Syst. 5, 2300300 (2023).
-
Li, Y., Luo, Y., Mengu, D., Bai, B. & Ozcan, A. Quantitative phase imaging (QPI) through random diffusers using a diffractive optical network. Light Adv. Manuf. 4, 17 (2023).
-
Shen, C.-Y. et al. Broadband Unidirectional Visible Imaging Using Wafer-Scale Nano-Fabrication of Multi-Layer Diffractive Optical Processors. Light Sci. Appl. 14, 267 (2025).
-
Cheng, Y., Shen, C.-Y., Wang, Y., Chen, S. & Ozcan, A. Wavelength-Multiplexed Nonlinear Computing with a Single-Layer Diffractive Optical Processor. Preprint at https://arxiv.org/abs/2609.18155 (2026).
-
Hu, J. et al. Subwavelength imaging using a solid-immersion diffractive optical processor. eLight 4, 8 (2024).
-
Hu, J. et al. Diffractive optical computing in free space. Nat. Commun. 15, 1525 (2024).
-
Mengu, D., Veli, M., Rivenson, Y. & Ozcan, A. Classification and reconstruction of spatially overlapping phase images using diffractive optical networks. Sci. Rep. 12, 8446 (2022).
-
Metzler, C. A., Ikoma, H., Peng, Y. & Wetzstein, G. Deep Optics for Single-Shot High-Dynamic-Range Imaging. in 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) 1372–1382 (IEEE, Seattle, WA, USA, 2020). doi:10.1109/CVPR42600.2020.00145.
-
Sitzmann, V. et al. End-to-end optimization of optics and image processing for achromatic extended depth of field and super-resolution imaging. ACM Trans. Graph. 37, 1–13 (2018).
-
Lee, G.-Y. et al. Neural phase microscopy with metasurface optics for real-time and nanoscale quantitative phase imaging. Nat. Commun. 17, 1411 (2026).
-
Haputhanthri, U. et al. Towards ultrafast quantitative phase imaging via differentiable microscopy [Invited]. Biomed. Opt. Express 15, 1798 (2024).
-
Li, M. et al. Single-pixel ptychography. Opt. Lett. 46, 1624 (2021).
-
Shu, X., Niu, M., Zhang, Y., Luo, W. & Zhou, R. Neural Architecture Search Generated Phase Retrieval Net for Real-Time Off-Axis Quantitative Phase Imaging. IEEE Photonics Technol. Lett. 37, 1069–1072 (2025).
-
Sainath, T. N., Kingsbury, B., Sindhwani, V., Arisoy, E. & Ramabhadran, B. Low-rank matrix factorization for Deep Neural Network training with high-dimensional output targets. in 2013 IEEE International Conference on Acoustics, Speech and Signal Processing 6655–6659 (IEEE, Vancouver, BC, Canada, 2013). doi:10.1109/ICASSP.2013.6638949.
-
Han, S., Pool, J., Tran, J. & Dally, W. Learning both Weights and Connections for Efficient Neural Network. in Advances in Neural Information Processing Systems vol. 28 1135-1143. (Curran Associates, 2015).
-
Howard, A. G. et al. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. Preprint at https://doi.org/10.48550/arXiv.1704.04861 (2017).
-
Gibson, G. M., Johnson, S. D. & Padgett, M. J. Single-pixel imaging 12 years on: a review. Opt. Express 28, 28190 (2020).
-
Rocha, J. C. A. et al. Fast and light-efficient wavefront shaping with a MEMS phase-only light modulator. Opt. Express 32, 43300 (2024).
-
Lecun, Y., Bottou, L., Bengio, Y. & Haffner, P. Gradient-based learning applied to document recognition. Proc. IEEE 86, 2278–2324 (1998).
-
Xiao, H., Rasul, K. & Vollgraf, R. Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. Preprint at https://doi.org/10.48550/arXiv.1708.07747 (2017).
-
Yang, J. et al. MedMNIST v2 - A large-scale lightweight benchmark for 2D and 3D biomedical image classification. Sci. Data 10, 41 (2023).
-
Cohen, G., Afshar, S., Tapson, J. & Van Schaik, A. EMNIST: Extending MNIST to handwritten letters. in 2017 International Joint Conference on Neural Networks (IJCNN) 2921–2926 (IEEE, Anchorage, AK, USA, 2017). doi:10.1109/IJCNN.2017.7966217.
-
Sylvester, J. J. LX. Thoughts on inverse orthogonal matrices, simultaneous signsuccessions, and tessellated pavements in two or more colours, with applications to Newton's rule, ornamental tile-work, and the theory of numbers. Lond. Edinb. Dublin Philos. Mag. J. Sci. 34, 461–475 (1867).
Figures
Single Pixel QPI Workflow

Figure 1. Time-multiplexed workflow of learned optical compression for single-pixel QPI. (a) A coherently illuminated phase object, , is superimposed onto a sequence of optimized phase masks, , displayed sequentially ( ); these phase masks are frozen after optimization and remain the same, independent of the tested phase pattern to be reconstructed. For each encoder state, the propagated optical intensity is averaged over a single-pixel detector of width , producing one intensity measurement . These single-pixel measurements form the vector . (b) The digital decoder, , maps the measurement vector through normalization, fully connected layers and transposed-convolutional layers to reconstruct the quantitative phase distribution, .
End-to-end training pipeline

b
Trained optical encoder states

Figure 2. Schematic of end-to-end training and deployment of the optimized optical encoder. (a) Simulated phase objects are processed by a jointly optimized optical encoder and a digital decoder . The same frozen encoder and decoder are then evaluated zero-shot using experimental measurements. Separate experimental measurement-target pairs, excluded from blind testing, are subsequently used to fine-tune the experimental decoder, i.e., , that accounts for system-specific measurement discrepancies. (b) Visualization of the optimized encoder phase masks.
Experiment diagram
b

Experimental setup
C
CMOS plane
d
e
Figure 3. Experimental setup for single-pixel QPI. (a) Optical schematic. A 635 nm laser beam illuminates a phase-only SLM through a beam splitter; the reflected beam is relayed by a 4f system to a plane conjugate to the SLM, and the CMOS camera is placed at an effective distance cm beyond it. The camera emulates the single-pixel detector: each measurement is the intensity averaged over a region of interest (ROI) with mm. (b) Photograph of the experimental setup. (c) Detector-plane intensity for one encoder state ( ), simulated (top) and measured with the CMOS camera (bottom), shown over the same 0.35 mm field centered on the optical axis and normalized to the maximum of each image; the dashed square marks the 100 m detector region. (d) The single-pixel measurements of the object in (e), experiment and simulation, each normalized to its maximum (Pearson correlation ). (e) Target phase object (an MNIST digit held out from training) and its reconstructions from simulated measurements, using the simulation-trained decoder, and from experimental measurements, after transfer learning with experimental objects per dataset; PCC and PSNR are given below each reconstruction.
Blind testing results
a

b

Blind testing experimental transfer learning
C

d

Figure 4. Experimental transfer learning for MNIST and grating-like phase test objects. (a,b) Blind-testing reconstructions of MNIST and grating-like phase test objects, respectively, comparing the ground truth, simulation reconstruction, zero-shot experimental reconstruction, and experimental reconstruction after transfer learning with T = 900 experimental objects per dataset (900 MNIST and 900 grating objects). (c,d) Mean Pearson correlation coefficient (PCC, left axis, filled circles) and peak signal-to-noise ratio (PSNR, right axis, open squares) as functions of the number (T) of experimental transfer-learning objects per dataset, for MNIST and gratings, respectively; T = 0 corresponds to zero-shot reconstruction. A single digital decoder was fine-tuned on balanced numbers of objects from both datasets while the optical encoder remained fixed. Lines show the mean over 100 blind-testing experimental objects per dataset, and shaded regions indicate standard deviation (hatched for PSNR). From T = 0 to T = 900, the mean PCC increased from 0.848 to 0.945 for MNIST and from 0.752 to 0.848 for gratings, and the mean PSNR increased from 16.8 dB to 22.2 dB and from 15.7 dB to 19.6 dB, respectively.
Grating blind-testing analysis
a

b

C
Quantitative grating-resolution performance

Figure 5. Quantitative grating resolution and phase-error analysis. (a) Representative linear gratings with periods and 229 m, shown as ground truth alongside the simulated reconstructions and two experimental reconstructions: zero-shot and after transfer learning with experimental captures per dataset. All four gratings were held out from the transfer-learning set. Yellow lines mark where the phase profiles are extracted, oriented normal to the grating fringes. (b) Phase profiles extracted along the marked lines for the ground truth, the simulated reconstructions and both experimental reconstructions, together with the corresponding phase-error profiles relative to the ground truth. (c) Reconstruction PCC as a function of grating period for ideal simulation, simulation with calibrated experimental noise ( ), and the zero-shot and transfer-learned (T = 900) experimental reconstructions. All curves are evaluated on the same 54 linear gratings held out from transfer learning. Points show the mean PCC within each of 7 grating-period bins, and shaded regions indicate standard deviation. The noise-calibrated simulation reproduces much of the degradation observed experimentally at shorter grating periods, and transfer learning improves the experimental reconstructions at every period.

Figure 6. Benchmark comparisons for optimized and fixed-pattern phase encoders. Identical phase objects are encoded using optimized (), random, Hadamard, or Fourier phase patterns. Each frozen encoder produces a corresponding scalar measurement vector , which is processed by its respective digital decoder. Reconstructions are evaluated on blind-testing phase objects not used during optimization.
Encoder benchmarking: Blind testing results

b
Encoder benchmarking: Blind testing metrics

Figure 7. Statistical comparison of the optimized optical encoder against fixed-pattern encoders. (a) Target phase objects and blind-testing reconstructions obtained using optimized ( ), random, Hadamard, and Fourier phase encoders under the same measurement budget. The optimized encoder was paired with its original jointly trained digital decoder, whereas each frozen fixed-pattern encoder was paired with a newly initialized digital decoder of identical architecture that was optimized independently under the same training protocol. The displayed examples include MNIST and grating phase test objects; the aggregate metrics include all 2000 blind-testing objects. (b) Mean PCC and PSNR values for each encoder over the 2000 blind-testing objects; error bars indicate standard deviation across objects. For the random encoder, reconstruction metrics were first averaged over five independently generated mask sets for each test object; the reported means and standard deviations were then calculated across all test objects.
Phase generalization pipeline

Figure 8. Optimization of specialist and generalist digital decoders for internal and external generalization in numerical simulations. The same frozen optimized optical encoder ( ) is used to produce scalar measurements for all phase-range conditions. The specialist digital decoder is optimized using phase objects with a fixed scaling factor of , corresponding to phase values spanning 0 to . Generalist I is initialized from the specialist decoder and further optimized using phase objects with , while Generalist II is initialized from the same specialist decoder and optimized over the broader interval . The phase-scaling factor is sampled from the corresponding interval during optimization, while the optical encoder ( ) remains unchanged. The three decoders are subsequently evaluated across maximum phase values from to ( ) to compare QPI reconstruction fidelity within their optimization ranges, representing internal generalization, and beyond those ranges, representing external phase-range generalization; also see Fig. 9 for this comparison.
Phase generalization: Blind-testing results

b
Quantitative phase generalization results

Figure 9. Numerical evaluation of internal and external phase-range generalization of specialist and generalist digital decoders. (a) Target phase objects and reconstructed MNIST objects for maximum phase values of , with , and 2. Reconstructions are compared for a specialist decoder optimized at , Generalist I decoder optimized with , and Generalist II decoder optimized with . All three digital decoders use the same frozen optimized optical encoder ( ). (b) Mean PCC as a function of for the 10,000 blind-testing MNIST objects. Lines show the mean, shaded regions indicate standard deviation across objects, and the inset magnifies the region near . Performance within the decoder training interval characterizes internal generalization, whereas performance beyond that interval characterizes external phase-range generalization.
Dataset transfer pipeline

Figure 10. Experimental transfer learning and external generalization with a frozen optimized optical encoder ( ). Simulated phase objects drawn from MNIST, Fashion-MNIST, and OrganAMNIST are processed by the frozen optical encoder to generate measurement vectors , which were subsequently augmented with calibrated perturbations (see Methods). These measurements are used to optimize the simulation-stage digital decoder . The same optical encoder is then deployed experimentally, and the resulting experimental measurement vectors are first reconstructed zero-shot using . Experimental transfer learning is subsequently performed using measurements from MNIST, Fashion-MNIST, OrganAMNIST, EMNIST, and BloodMNIST while the optimized optical encoder remains frozen. The EMNIST and BloodMNIST image distributions were excluded from simulation-stage reconstruction training and were used to evaluate external generalization.
Internal generalization
a

b
Quantitative transfer learning performance

External generalization
c
Blind-testing results

d
Quantitative transfer learning performance


Figure 11. Analysis of decoder transfer learning for internal and external datasets under a frozen optical encoder. (a) Visualization of the reconstructed phase images of samples never seen before, sampled from internal datasets MNIST, Fashion-MNIST, and OrganAMNIST, which are used during in silico training, comparing ground truth, simulation prediction, zero-shot experimental reconstruction, and experimental transfer-learning reconstructions with . (b) Mean PCC (left axis, filled circles) and PSNR (right axis, open squares) against the number of experimental transfer-learning objects per dataset, for the internal datasets; corresponds to zero-shot reconstruction, which denotes experimental reconstruction without decoder fine-tuning on paired experimental measurements and phase targets. (c) Corresponding visualization results for the external datasets, i.e., EMNIST and BloodMNIST datasets, which were unseen during simulation training. (d) Mean PCC and PSNR against the number of experimental transfer-learning objects per dataset, for the external datasets. Curves summarize 50 blind-testing experimental captures per dataset. Shaded regions show standard deviation (hatched for PSNR). The encoder () remained frozen throughout, and only decoder weights were adapted.