WorksPhysics and Astronomy
4D-TEMPO: Differentiable 4D-STEM ptychography via fast Physics Optimizers
Abstract
Electron ptychography recovers atomic structure from 4D-STEM data: diffraction patterns at multiple positions of a scanned probe. Current codes reconstruct an image and read atoms off it, or fit atoms under an loss; neither gives per-atom uncertainty. We propose 4D-TEMPO, a differentiable physical renderer that fits the atoms, the microscope, and the detector directly to the recorded electron counts under a Poisson likelihood. The output is a list of atoms, each a Gaussian primitive with a 3D position, a thermal width, and a model-conditional error bar from the Fisher information. The Fisher information also conditions the solver, gives the dose (electrons per Å) each parameter needs, and separates calibration from imaging. On a simulated WSe bilayer, starting from the published reconstruction, fitted atoms cut in-plane error by a third (3.2 vs. 4.8 pm) and depth error by 40-61% against its 3D peaks. Depth comes from multiple scattering into the dark field, the faint counts outside the direct beam. The two layers, closer than the depth of field, separate; per-atom depth then follows the layer geometry. When the model is well specified, the bars are calibrated (69% of position coordinates within ). On experimental WSe, fitted atoms predict held-out patterns better than the three published codes we test. With free probe modes where atoms are incomplete, the same likelihood predicts best on all three held-out benchmarks, matches every WSe baseline in 5 min against up to 20.5 h, and passes torchslice at its released setting 180 sooner on PrScO. Per-atom error bars, planned doses, and fast reconstruction point to low-dose, real-time 3D imaging of beam-sensitive and dynamic materials.
Introduction
Can a microscope report every atom’s position with an error bar (Figure 1)? Electron ptychography comes closest. A focused electron probe scans a thin specimen, and a detector records a diffraction pattern of Poisson counts at every position: a four-dimensional scanning transmission electron microscopy (4D-STEM) dataset (Figure 1a). Current codes reconstruct a pixel image from these patterns and add freedom until the fit is good: free probe modes – mutually incoherent wavefields of unconstrained pixels – absorb what the physics misses, including part of the atoms’ own signal (Figure 2). The fit improves, but it can no longer say how well it knows any one atom. 4D-TEMPO puts atoms before pixels: it fits atoms, the microscope, and the detector directly to the counts, as crystallographic refinement fits a structure to diffraction data [45]. In vision terms, this is inverse rendering via “analysis by synthesis”: a physical renderer – the multislice model of electron scattering – maps Gaussian atoms to expected patterns, much as NeRF fits a radiance field to photos [44]. The differentiable renderer gives its Jacobian and the Fisher information (FI): an error bar for every atom, which parameters the data determine, and the dose an experiment needs, in advance (Figure 1c).

Figure 1. 4D-TEMPO fits every atom and the microscope directly to electron counts and returns each atom with an error bar. (a) A defocused electron probe scans the specimen; the detector records Poisson counts at every position (4D-STEM). (b) A physical multislice renderer maps the atoms (position , ; thermal width ) and the instrument to expected counts ; the Poisson likelihood compares them with the measured counts , and the Fisher information gives the error bars. (c) Real twisted WSe bilayer: every fitted atom (dot) on the reconstructed phase, with its shot-noise (Fisher) position ellipse (39% joint coverage) magnified ; medians 0.5 pm (W) and 0.8 pm (Se). Dot pairs are two atoms on one beam path (the two Se of a column, or atoms of the two layers), each with its own ellipse. Top: length scales (log axis; 1 Å = 100 pm): electron optics at 25 mrad (blue; filled: 80 kV, these data), specimen (gray), and our accuracy against truth on simulated data (red); model error exceeds the shot-noise ellipses of (c) (§ 5.3).

Figure 2. Free probe modes make each atom less determined. (a) A physical microscope makes probes only from a small family set by its aberrations and coherence : the dots, which lie in a plane (Eq. (11)). A free probe mode can be any wave, so it can leave the plane. (b) Each arrow is how the predicted counts change when one parameter moves, in units of the noise. Only the part of an atom’s arrow that no instrument change can imitate, its height above the instrument’s span, informs that atom and sets its error bar (§ 6). Free modes widen the span to the red plane, imitate more of the atom’s signal, and shrink .
A 300 kV electron has wavelength pm, but lens aberrations limit the beam to a cone of semi-angle of tens of milliradians, setting the diffraction-limited resolution to 0.66 Å (1 Å = 100 pm) at 30 mrad. Electron ptychography shifts this limit from optics to computation, reaching 0.39 Å in a 2D material [24] and the thermal-vibration limit (20 pm resolution) [6], recovering depth, and enabling low-dose imaging of frozen biological specimens [72]. The dose, the number of electrons sent through each Å of specimen, is capped by the specimen itself: each electron can deposit energy that breaks bonds or knocks atoms out. Frozen biological specimens tolerate tens of electrons per Å; in the WSe bilayer studied here, selenium vacancies appear by about [22]. Every electron must therefore count. 3D atom positions and vibrations reveal how twisted 2D crystal layers relax [22], how moiré phasons dominate atomic vibrations [69], how atoms vibrate under heating [2], and where hydrogen sits in metals [57]. Each question demands quantitative numbers with error bars; beam-sensitive and changing specimens also demand low dose and reconstruction fast enough to follow them.
Three computational obstacles stand in the way. 1) A dataset contains up to measurements, and multiple scattering makes the renderer strongly nonlinear. 2) Microscope aberrations, coherence, and detector response are known only approximately and must be fitted with the specimen. 3) Existing codes reconstruct millions of pixels per slice with free probe modes [61], introduced for partial coherence but tied to neither source nor lens, so they absorb detector blur, drift, and model error with specimen signal.
Maximum-likelihood ptychography under Poisson or Gaussian noise [47, 60] reconstructs these pixel grids and extracts atom positions and uncertainties post hoc, as in the published pipeline for twisted tungsten diselenide (WSe) bilayers [22]. Yet atoms are far fewer than pixels, and an atom’s potential is a known function of position, species, and thermal width. Diederichs et al. put atoms directly into the inversion, fitting atoms and a physical instrument to experimental 4D-STEM data via differentiable multislice under an loss [11]. Meanwhile, the FI has designed STEM experiments for atom-column positions [64] and bounded 4D-STEM precision [12]. We take the next step: atoms, instrument, and pixels share one Poisson likelihood with a physical detector model. We add free modes only to test the likelihood and where atoms are incomplete.
Contributions and gains over the state of the art.
Atoms and instrument fitted to the counts. Atoms, a physical instrument, and the detector share one Poisson likelihood, so atoms come out as numbers. On a simulated bilayer, starting from the published reconstruction and using no structural priors, fitted atoms cut in-plane error by a third (3.2 vs. 4.8 pm) and depth error by 40–61% against its 3D peaks (Tab. 3). Multiple scattering into the dark field separates two layers 10× closer than the depth of field. The solver is quasi-Newton in scaled units on
a deterministic objective, and atom depth is continuous across slices (§§§ 3 and § 4).
Every atom with an error bar. The FI gives each atom a shot-noise precision, calibrated in simulation (69% of position coordinates within , nominal 68%), identifiability via pivoted QR, and the dose required per parameter (§§§ 5.3 and § 6; cf. Laplace approximations of neural fields [17]). Calibrate once, image at low dose: a Schur complement separates calibration from imaging, cutting the parameters a low-dose scan must fit by (Fig. 6). On an independent simulator, planted 5–20 pm displacements are recovered (median 1.6 pm) with no false ones (§S4).
The same model predicts best. We score every code by held-out Poisson deviance per pixel, (lower is better). Atoms alone beat every baseline on unseen bilayer patterns (0.450 vs. 0.455 for
fold_slice); a calibrated 1% detector distortion widens the lead to 0.024. With free probe modes, our fit leads on all three benchmarks: by 0.053 on the WSe bilayer, by 0.07–0.33 on a 21 nm praseodymium scandium oxide (PrScO) crystal, where one baseline runs longer, and by 0.46–0.53 on a lead zirconate titanate (PZT) film (§ 5.4; §§S2, § 16).
Fast mode. The free-mode fit matches every WSe baseline after 5 min, vs. 22 min for
PtyRADand 20.5 h forfold_slice, and passestorchslice’s best PrScO score sooner; a 1 h atom refinement of the published reconstruction beats its in-plane error (§ 5.4).
Sections S0–S18 are in the supplement.
Related work
Phase retrieval and ptychography
Detectors record intensity without phase. Gerchberg and Saxton posed this for electron micrographs [16], and Fienup needed only a support constraint [14]. Ptychography supplies measurement diversity physically, as every point lies in tens to hundreds of overlapping patterns. The ptychographical iterative engine (PIE) [53], difference map [62], and its extension ePIE [39] recover object and probe; probe modes model partial coherence [61]; Fourier ptychography swaps probe and pupil [70]; and multislice electron ptychography reaches the thermal-vibration limit [6, 24]. These reconstruct pixels, as do our baselines: fold_slice, built on PtychoShelves [6, 67] and Odstrčil et al.’s maximum-likelihood solver [47], and the autodiff package PtyRAD [31]; py4DSTEM is another [56, 66].
Atoms fitted to diffraction data
Diederichs et al. first fitted atoms and a physical instrument, with frozen phonons, to experimental 4D-STEM data [11]; Herdegen et al. recover thermal displacements in simulation [21]. We share their autodiff through multislice, pathwise width gradients, and atomic parameterization, but fix phonon configurations so our objective is deterministic rather than redrawing them at each Adam/SGD step. Singh et al. and Mani et al. map pixels to Gaussian atoms for tomography [41, 58], while crystallography refines positions and Gaussian displacements via maximum likelihood [1, 45].
Physics-based inverse imaging in vision
Cloud tomography inverts multiple scattering [32, 54], and neural fields image black holes [13, 33]. Cryo-electron microscopy pairs single scattering with a neural volume [34, 71], NFH-SEM learns a scanning electron microscope forward model [5], and generative priors [43] and neural fields [8, 35] regularize electron ptychography and tomography. Single-photon imaging similarly fits an inhomogeneous Poisson model (with dead time and jitter) to raw timestamps of single-photon avalanche diodes (SPADs) rather than histogramming detections [68]. None reports per-parameter uncertainty; of these, only cloud tomography inverts multiple scattering. Chien et al. leave validating the implicit prior open; held-out deviance and bar coverage (§§§ 12, S7) test it.
Representations and priors
Learned reconstructors [38, 48], deep image priors [63], and diffusion priors [4, 9] regularize inversions with networks; in ptychography, they provide fast initialization but import training biases and hold only near training conditions, so we experiment with one solely as a warm start (§S9). Neural fields and Gaussian splatting fit one scene via differentiable rendering (§ 1). Our atoms are physical Gaussians, each equipped with an FI error bar.
Formulation: creating the data by scattering
The forward model follows the electron in Figure 3 with parameters : specimen (atoms) and instrument (beam, optics, scan, detector), each fixed from prior knowledge or fitted per scan; on the 25 mrad bilayer, 16 numbers describe the optics and detector against 475 for the specimen and 1,804 for the scan (Table S1).
Figure 3. Every quantity the model fits, along one electron’s path. Source size and focal spread blur the probe. The aperture sets convergence semi-angle ; the focus is wide (lateral resolution) and long (depth of field). A probe of diameter enters at defocus and traverses slices (; thickness ): each shifts phase (by the projected phase for a column) and propagates the wave, causing multiple scattering. Electrons cross vibrating atoms in s, seeing frozen snapshots averaged in the pattern. The detector records the bright-field disc (the direct beam, radius ) and the dark field (scattered electrons) out to the detector edge ; the charge spreads to neighboring pixels before readout. Independent arrivals make counts Poisson. Inset: pixels , scan step, resolution cell ; values in Tab. 1.
| quantity (fitted numbers) | status | source / transfer |
| Specimen : 1,702 atoms, 236 free (78 W, 158 Se) | ||
| in-plane positions of free atoms (472) | fitp | each scan |
| positions of the other 1,466 atoms fixed earlier | fixed | earlier fit, lattice |
| thermal widths , one per species (2) | fit | material |
| interlayer distance (1) | fit | each scan |
| species, occupancy 1, Se planes Å | fixed | lattice |
| Instrument : beam and optics | ||
| energy 80 kV, pm | fixed | high tension |
| convergence angle (1) | fit | session |
| aperture edge width, 0.3 pixel | fixed | construction |
| defocus (1) | fit | each scan |
| (2) | fitp | each scan |
| , (4) | fitp | session |
| spherical aberration (1) | fitp | session |
| coherence widths , (2) | fitp | session |
| probe modes, of the trace | derived | rows above |
| Instrument : scan, positions, 896 training, 128 held out | ||
| step 0.429 Å () | fixed | scan calibration |
| polynomial distortion, degree 2 (10) | fitp | each scan |
| training offsets (1,792) | fit | each scan |
| specimen-to-scan shift (2) | fit | each scan |
| position jitter , one Gaussian (1) | fit | each scan |
| mean offset, polynomial–offset split (12) | gauge | removed exactly |
| Instrument : detector, 128 × 128 pixels | ||
| pixel 1.666 mrad | fixed | diffraction standard |
| pixel box, orientation | fixed | construction, §S8 |
| projector ellipse , axis (2) | rim fit | camera length, aperture (§S14) |
| dark frame, gain 151 ADU/e, (mean count per pattern, 94,571 e; its scale is absorbed by the dose scale , fitted on training patterns) | fixed | measured [59] |
| effective detector blur (1) | fit | all sessions |
| dose scale , background , descan (4) | fit | each scan |
Table S1. Sixteen fitted numbers describe the optics and detector of the 25 mrad WSe bilayer, vs. 475 for the specimen and 1,804 for the scan (counts in parentheses; fitp: weak Gaussian prior). The last column shows how fixed quantities are known or how far fitted ones transfer: each scan; a session (between corrector retunes); all sessions; or the material (Fig. 6). Only in the transferred-calibration design (§S17(f)); in the fitted 25 mrad model covers it, and it is not in the counts above.
Image formation. Let be position transverse to the beam, depth along the beam through the specimen, conjugate spatial frequency (scattering angle ). The probe is set by aperture , equal to 1 for and 0 otherwise, and by the aberration phase with defocus and spherical aberration [28]:
A specimen of thickness and potential is split into slices of thickness . Slice has projected potential
and transmission function
where is the interaction constant ( the relativistic mass) and the column phase (Figure 3). Cowley and Moodie’s multislice [10] (the split-step beam propagation of optics) alternates transmission with the Fresnel propagator [28]
| dataset (kV, mrad) | source | use | (Å) | (Å) | step | e per | , W / Se (rad) | |
| WSe twisted bilayer (80, 25) | [69] | main: held-out, bars | 1.68 | 67 | 0.26 | 0.15 | 0.89 / 1.02 | |
| WSe twisted bilayer, published (80, 25) | [22] | vs. published recon. (§S15) | 1.68 | 67 | 0.26 | 0.15 | 0.89 / 1.02 | |
| simulated, same conditions | [22] | accuracy, coverage | 1.68 | 67 | 0.26 | 0.15 | 0.89 / 1.02 | |
| WSe monolayer (80, 18.4) | unpubl. | warm start outside training range (§S9) | 2.26 | 123 | 0.13 | 0.05 | 0.64 / 0.74 | |
| WSe bilayer (200, 7.5–22.5) | [46] | uncorrected lens (§S10) | 1.11–3.34 | 50–446 | 0.16–0.36 | 0.01–0.13 | 0.28–0.95 / 0.34–1.06 | |
| PrScO crystal (300, 21.4) | [6] | thick: held-out | 0.92 | 43 | 0.45 | 4.88 | – | |
| PdH particle (300, 30) | [52] | thick: pixels (§S10) | 0.66 | 22 | 0.64 | 12.80 | – |
Table 1. Datasets of tungsten diselenide (WSe), praseodymium scandium oxide (PrScO), and palladium hydride (PdH), with step in , thickness in depths of field , e per resolution cell , and projected phase band-limited to (more in §§S9, S10).
from :
A far-field detector records intensity at every scan position:
Source size and focal spread (Figure 3) produce an incoherent average of Eq. (3) over probe shifts and defoci; the detector applies point-spread function and background . With the mean measured count per pattern and a unit-intensity probe, counts are Poisson with mean , giving negative log-likelihood
The fit uses dimensionless units (Figure 3): lateral lengths in , depths in , defocus in Scherzer units , and aberrations in phase radians at the aperture edge.
The specimen as atoms. Each atom has in-plane position , depth , species , and thermal width (mean-square displacement per axis). In the atom model, the projected potential of slice is
modeled with the five-Gaussian electron scattering factors
of Peng et al. [50]. A Gaussian displacement of variance multiplies the transform by the Debye–Waller factor :
with rest mass ; in real space, each term is a Gaussian of per-axis variance . Each atom is thus five physical Gaussian splats [26]. Widening an atom obeys the heat equation (the scale space of vision [29]),
making the mean-field width derivative exact and cheap; an anisotropic covariance gives . We

Figure 4. One differentiable model yields both the fit and its error bars. Atom and instrument parameters render expected counts through the potential (Eqs. (7) and (8), or Eq. (10) for frozen phonons), multislice (Eq. (2)), coherence (Eq. (11)), and detector (Eq. (12)). Reverse-mode gradients minimize the Poisson likelihood (Eq. (5)); forward-mode Jacobian columns give the FI and an error bar on every parameter (§4). Held-out positions score the model (algorithms: §S17).
synthesize in Fourier space on an oversampled grid via one matrix product per slice. In layered specimens, atoms sit in their atomic-plane slices and layer planes shift together via a fitted interlayer distance. For general depths, each atom carries a Gaussian depth profile of fixed width ( is the maximum retained angle), moving rigidly so its depth derivative converges under slice refinement (§S1). An atom has four parameters —six with in-plane covariance, and three, , in layered specimens, where a fixed plane index and one shared interlayer distance set . The physics is built in: atoms cannot amplify the beam, a width is strictly positive (§S6), and no unphysical spatial frequency appears.
Thermal motion. Eq. (7) is the mean-field potential: each atom is smeared by its own vibration. Frozen phonons [28, 37] average intensities over static configurations,
with fixed standard normal displacements drawn in antithetic pairs. Since enters through the displacement, its gradient is the pathwise derivative of Diederichs et al. [11] rather than Eq. (8); the widths we report use this model. Eq. (5) is evaluated once, on the average of the patterns.
The instrument. The aberration function extends Eq. (2) (Eq. (16)) with astigmatism , coma , and three-fold astigmatism ; higher orders are optional, and the aperture radius is fitted. Partial coherence is an incoherent sum over defocus offsets and source shifts , at the nodes of a product grid spaced evenly over standard deviations, with Gaussian weights :
The copies span a low-rank mixed state, so we replace them by the leading eigenmodes of their Gram matrix—at least 32 and enough to capture all but of the trace [61] (81 on the 25 mrad bilayer); the modes stay differentiable in (exactly), , and (§S17), and free probe modes can be added for what the physics misses; they are off in every atom fit. The scan positions are , with a degree-2 polynomial distortion basis and per-position offsets . The descan—a scan-wide shift of the diffraction pattern—is a phase ramp on the exit wave, shifting by any fraction of a pixel while keeping it nonnegative. The detector integrates the pattern over the area of each pixel (a box), applies a Gaussian point-spread function of variance , and adds a flat background subtracted from the scattered total. Eq. (4) becomes
with , in pixels, in cycles per pixel, pixels, and a dose scale .
Inference and error bounds
Fitting. Over training positions and pixels in the band-limited disc, we minimize Eq. (5) plus weak Gaussian priors on atom displacements (0.3 Å), scan polynomial, , and non-defocus aberrations. Per-position offsets are bounded by 1 Å, and the 12 gauge directions mimicking other parameters (mean offset and scan-polynomial projection) are removed exactly. Gradients use reverse-mode autodiff through the potential and FFT multislice Eq. (2), a network whose layers are slices [11, 65]. Fits from a coarse start run Adam [27] on mini-batches of positions; every fit then polishes with full-batch L-BFGS [36] and strong-Wolfe line search. Each polish freezes the probe-mode basis of Eq. (11) to minimize a smooth objective, refreshing between polishes until a refresh moves the objective by less than 1 nat (optimizer ablation: §S17(g)). On real data the FI also sets the optimization metric, scaling every parameter by its Fisher standard deviation (FI computed once near the optimum); simulated-bilayer fits use fixed per-group scales. Convergence is tested via the squared Newton decrement (: FI plus prior precision) on training patterns, in squared error-bar units; we stop below 0.1 with every step below 0.1 sd (§S17).
Table 2. Atoms beat every baseline on unseen bilayer patterns, and the calibrated detector ellipse widens the lead; with free probe modes, the same likelihood predicts best on all three datasets. Held-out deviance (identical counts and scoring per block) on 128 held-out patterns of the 25 mrad WSe bilayer, 512 of a 21 nm PrScO crystal, and 613 of a 20 nm PbZrTiO (PZT) film (estimated gain, §S10). WSe: exact detector-pixel integration (∗ point-sampled). Free modes: three-seed mean. Baselines at published settings; torchslice [11]: released setup, 50 epochs (longer runs: §S9). Amp.: amplitude least squares; swap: with only the loss swapped ( for ours, Poisson for torchslice; §S2). Gap: , held-out minus training deviance. Time: one A6000 (A5000: PtyRAD, fold_slice; †2–5 cards), A100 (PrScO).
| model | loss | gap | time | swap | |
| WSe twisted bilayer, 25 mrad | |||||
| ours, atoms, physical instrument | Poisson | 0.4496 | 0.005 | 42 h† | – |
| + calibrated detector ellipse | Poisson | 0.4312 | 0.005 | +24 h† | – |
| ours, 8 probe modes | Poisson | 0.4025 | 0.027 | 53 min | – |
fold_slice (400 + 125 it.) | amp. | 0.4552 | 0.007 | 20.5 h | – |
| PtyRAD, sub-scan | amp. | 0.4735 | 0.012 | 22 min | – |
| PtyRAD, full field | amp. | 0.4817 | 0.014 | 50 min | – |
torchslice∗ | 1.105 | 0.007 | 4 min | 0.594 | |
| PrScO crystal, 21 nm | |||||
| ours, 8 probe modes | Poisson | 0.4157 | 0.129 | 13 min | 0.4184 |
| ours, 4 probe modes | Poisson | 0.4224 | 0.131 | 7 min | 0.4265 |
| PtyRAD (200 it.) | amp. | 0.5586 | 0.070 | 34 min | – |
| PtyRAD (1,000 it.) | amp. | 0.4877 | 0.094 | 2.8 h | – |
torchslice | 0.745 | 0.094 | 4.7 h | 0.754 | |
fold_slice (200 + 200 it.) | amp. | 0.7359 | 0.051 | 95 min | – |
| PZT film, 20 nm (data of [11]) | |||||
| ours, 8 probe modes | Poisson | 0.5754 | 0.146 | 30 min | – |
| ours, 4 probe modes | Poisson | 0.5981 | 0.151 | 15 min | 0.5826 |
torchslice | 1.106 | 0.078 | – | 1.035 |
Table 2.
Held-out protocol. We score models on withheld scan-grid indices with (one in eight). Each held-out pattern sets per-position parameters (e.g., ) to its four scan neighbors’ mean so it never informs its own prediction. The score is half the Poisson deviance per pixel inside the band-limited disc,
which equals Eq. (5) minus its value at . We report and the generalization gap (§S7).
Error bounds. For Poisson counts, the FI is
the expected Hessian of Eq. (5) (i.e., its Gauss–Newton approximation); at the optimum, bounds any unbiased estimator’s covariance (Cramér–Rao [25]). We report the Laplace covariance, the inverse of plus the prior precision, with clamped parameters held fixed. A pixel with expected count contributes to – its counts times squared relative sensitivity. Faint pixels with strong relative response can carry more information than bright ones; on the bilayer, atoms draw most of their information from the dark field (§S13).
Since the instrument is fitted alongside the atoms, we take the Schur complement of the instrument block,
where has rows and columns . Per-atom bounds are the diagonal blocks of , with ; widening from to measures the exact instrument calibration would recover. Each error bar is one parameter’s standard deviation with all others profiled out, conditioned on fixed or clamped parameters: detector blur (at its lower bound of 0 on the 80 kV data), fixed exterior atom positions, and clamped log values.
Each column of takes one forward-mode pass, computed in parallel in single precision and accumulated in double precision; on the 25 mrad sub-scan, is formed densely with 1,636 columns over 896 training patterns; larger fields use local patches (§S16).
Experiments
Data
We test accuracy against truth (§5.2), precision under the model (§5.3), and prediction of unseen experimental patterns and speed (§5.4) on the datasets of Tab. 1. Our main dataset is a twisted WSe bilayer recorded at 80 kV and 25 mrad on an aberration-corrected microscope with a pixelated detector [69]. For accuracy, we use the simulated twisted bilayer of Huang et al. [22]: 1,928 atoms rendered with Prismatic [49] under matching conditions, tilted 12.7°, with Poisson counts at e/Å. Our thick benchmark is the public PrScO [1] crystal of Chen et al. [6, 7] (21 nm, or 4.9 depths of field at 300 kV).
Table 3. On simulated twisted WSe bilayer, our atom fit achieves the lowest in-plane error without structural (bond-length or inter-layer) priors. Within 1 h our fit already beats the published in-plane error; truth enters only through the alignment, depth gauge and atom identity (§S6). Rms error (pm) after similarity alignment (depth: W / Se); time: refinement on one RTX A6000 after the published recon. ‡475 fold_slice iterations at 14.7 s each per released files (GPU unknown), excluding peak finding/refinement.
Table 3.
Accuracy against truth
The two layers lie 6.6 Å apart, 10× closer than the depth of field Å. Pixel reconstructions blur them along the beam, and 3D phase-peak depths are off by 84 pm (W) and 127 pm (Se) on simulated data (Figure 5). An atom model replaces that volume with three coordinates per atom. Multiple scattering across both layers shapes the dark field and constrains them. We start from atoms read off the published reconstruction, one plane per layer, and fit every depth freely without structural priors. In-plane, our atoms beat the published accuracy even after its priors (Tab. 3). With depth polished to the likelihood minimum, they end at 50 pm (W) and 49 pm (Se); prior-refined coordinates remain best (5.3 and 5.5 pm). The FI bounds single-atom depth at 8.0 pm rms (; 0.34 pm in-plane), close to the 6.4 pm rms of flat tilted layers, and the likelihood of one atom’s depth is indeed 5–9 pm wide. The likelihood is thus sharp in depth, but mismatch with the simulator displaces its minimum from truth (§S6); the priors of Huang et al. supply the rest.

Figure 5. Fitted atoms separate two layers 10× closer than the depth of field (d, e); free modes under the same likelihood predict unseen patterns best (a–c). (a)–(c) Projected phase of the real 25 mrad WSe₂ bilayer on the held-out sub-scan (shared scale, ramp removed, low-passed at ) with held-out per pixel (Tab. 2): (a) our free-mode pixel fit, shown alone on the left half and with our fitted W (circles) and Se (diamonds) atoms overlaid on the right half; (b) PtyRAD and (c) fold_slice at published settings. (d) On the simulated bilayer, our fit separates both layers. (e) Depth of field Å vs. the 6.6 Å interlayer spacing. (f) Depth error of each fitted atom: rms 50/49 pm (W/Se, solid), vs. 84/127 pm for published 3D peaks (dashed) and 5.3/5.5 pm for prior-refined coordinates (band; Tab. 3).
Precision under the model
When the model is well specified, the bars are calibrated: on Poisson redraws of the fitted model, truth falls within for 69% of position coordinates and 68% of widths (nominal 68%), and within for 95% of position coordinates (nominal 95%). Across an 8× dose range, position errors scale as vs. the Fisher prediction , and the bars stay calibrated (§S5).
With the instrument profiled, species widths on the 25 mrad bilayer are pm () for W and pm for Se, with sandwich bars (robust bars from per-pattern score scatter) of 0.15 and 0.13 pm. These effective widths exceed the pm molecular-dynamics value because static displacements, vacancies, and drift add to thermal motion. Zhang et al. read per-atom vibration amplitudes from phase reconstructions of these data and traced them to moiré phasons [69]. Against an independent multislice simulation, our model underestimates widths by pm (8–12%) due to a 3–7% dark-field intensity deficit (§S4). Per atom, median width bars are 0.68 pm (W) and 1.36 pm (Se) across the 236 interior atoms. Every width is nearly uncorrelated with each instrument parameter (), and profiling the instrument leaves the species-width bars essentially unchanged (§S4). Untying the two Se atoms in each column splits them laterally by a median of 0.10 Å at an earlier fit and improves held-out prediction. The independent simulation recovers planted splits of this size (7 of 7 from 0.05 Å) without generating false splits from misfit, bonding charge, or vacancies (§S4).
On real data and the independent simulator, model mismatch sets position error at about the Fisher bars (§S15). The bars there state shot-noise precision; §6 budgets the gap. Per atom, sandwich bars are 1.6 (W) and 1.4 (Se) times the Fisher bars in median (§S12). Per-atom widths absorb part of this misfit: refitting with one width per atom lowers by at least per pixel (paired over held-out patterns). At the species-width fit, the FI determines about 200 of 235 interior widths (§S3).
Prediction and speed
With atoms in place of pixels and free modes, the atom fit beats every baseline on unseen bilayer patterns with the smallest train–test gap; a 1% detector ellipse, calibrated from the bright-field rim, widens its lead to 0.024 per pixel (Tab. 2, §S14). Pixels and eight free probe modes under the same likelihood predict best: 0.029 per pixel ahead of the calibrated atom fit, 0.053 below foldslice and 0.071–0.079 below PtyRAD. On the low-count bilayer the likelihood drives this margin: on the same model, data, and optimizer, and amplitude least squares lose 0.058 and 0.054 per pixel (§S2), and foldslice and PtyRAD optimize amplitude losses.
On thick PrScO and PZT, our free-mode fit leads every code by 0.07–0.53 per pixel, on PrScO mostly through the fitted detector blur; Poisson pays at low counts (Tab. 2; §§S2, S8, S10).
The fast mode cuts the wait for a reconstruction from a day to minutes. On one A6000, the free-mode fit matches every bilayer baseline after 5.3 min ( 0.453 vs. 0.455), against 22 min for PtyRAD and 20.5 h for foldslice (A5000, published settings). It reaches 0.4025 after 53 min. On PrScO it passes the best torchslice score in 95 s vs. 4.7 h (§§S9, S11). The sub-scan takes about 1 s to record, so reconstruction time over acquisition time falls from to ; near one, the fit can steer the next scan.
Identifiability and model error
Exact reference. Atom-by-atom multiple scattering via Foldy–Lax [15, 30] with partial-wave T-matrices [55] is our reference, exact for static atoms of a given potential. With slices at atomic planes, multislice matches dark-field amplitudes of the bilayer’s mean-field columns within 1%, while the tabulated potential [50] differs from partial waves by +1.6% to −4.8% (§S18).
Identifiability. The FI answers two questions before an experiment: which parameters the counts determine, and what dose a target precision needs. Stacking whitened Jacobians () into yields ; a rank-revealing (column-pivoted) QR factorization gives
In natural units ( in-plane, in depth, for widths), is the information on pivot with earlier pivots profiled out and later ones fixed; counts determine the pivot when (one shot-noise unit). With background scaling with dose, , so one factorization covers all doses: pivot reaches conditional standard deviation at for measured dose . On local patches of the 25 mrad bilayer with per-atom widths, 95–96% of parameters are determined at the dataset dose and 88% at 0.01× dose. With all other patch parameters profiled, 0.1 in-plane precision requires 196–212 e/Ų (W) and 731–1,090 e/Ų (Se); 10% per-atom width precision 0.1–2.5 times the dataset dose, and 1 Å depth – e/Ų at an earlier fit (§S16).
Separate readings enable low-dose imaging (Fig. 6). At 100 e/Ų, a dose for beam-sensitive specimens, fixing the calibrated instrument, coma included, and the widths from a high-dose scan, and refitting positions, a smooth scan model, defocus, two-fold astigmatism, and one jitter, estimates 3× fewer parameters and tightens position bounds by 24% (W) and 6% (Se), if coma holds to well within 30 nm, as between scans minutes apart (§S16).
Error budget. The FI converts any model error into a shift in error-bar units. We project ten omitted or truncated terms and our three cost-saving approximations through the FI of a reference fit (§S12). Each term shifts a median width by 0.2–0.9 sd. A ∼20 mrad local tilt or a frozen-phonon diffuse-scattering error reaches the measured per-atom misfit, which names the next terms to model.
Conclusion
An atom with an error bar turns atomic imaging into hypothesis testing: whether an atom moved by 5 pm, or a width changed with temperature, is a test against a stated bar (§5.3), once model error is budgeted (§6) or cancels between scans on one instrument. The FI states what each electron tells about each parameter, the limit any reconstruction faces, and so makes the experiment designable. It gives the dose each parameter needs before the scan, and after one high-dose calibration a low-dose scan fits 3× fewer parameters (Fig. 6). That is the route to beam-sensitive materials and, with known molecular fragments as primitives, to frozen biological specimens.
As fit time approaches acquisition time (now minutes for a 1 s scan, from 20.5 h), the fit can steer the next scan and follow a process, such as a defect forming under the beam, while it happens. Two steps remain: forward models accurate enough that counts alone limit each atom, and event-driven detectors, now reaching the market, that timestamp each electron [23], as SPADs do photons [68], so the likelihood absorbs drift and dynamics.
Limitations. Each bar is a model-conditional bound, which per-atom misfit on the bilayer exceeds (§6) until diffuse scattering and coherence are better modeled. At published doses, counts constrain single-atom depth no better than layer geometry (§ 5.2); on real data we fit atoms in their atomic planes, so we do not resolve two atoms of one layer in depth. The fit neither adds nor removes atoms. In specimens tens of nm thick, every method, ours included, is challenged, since a column spans tens of atoms. We fit pixels there while building a joint column model (§S10).
Supplementary Material
Physical picture
Source. A field-emission gun emits electrons, accelerated through 80–300 kV. At 80 kV an electron moves at half the speed of light and has a wavelength . The source has a finite size and the electrons a small spread of energies. The first blurs the probe across the beam; the second, through the lens’s chromatic aberration, blurs its focus. These are the two partial-coherence parameters, and .
Probe. Condenser lenses and an aberration corrector focus the beam, and an aperture limits its angles to a semi-angle . The probe at the specimen is about across (1.7 Å for the bilayer). Its shape is set by the residual aberrations: defocus, astigmatism, coma and spherical aberration.
One electron at a time. At picoampere currents electrons are nanoseconds, meters, apart. They do not interact. Each one propagates as a wave, interferes with itself, and is detected once, as a particle, at one pixel. The diffraction pattern is a histogram of these detections. Its expected value is the wave’s intensity, and its fluctuations are counting noise.
Specimen, layer by layer. Each atom’s electrostatic potential (a positive nucleus screened by its electron cloud) slows the electron and shifts the phase of its wave. A thin layer acts as a phase screen. Between layers the wave spreads by Fresnel diffraction. In a thin bilayer the electron is scattered a few times. In a crystal many depths of field thick, it is scattered many times and channels along atomic columns. Multislice alternates the two steps, transmit and propagate (Eq. (2)).
Heat. At room temperature the atoms vibrate by a few picometers, with periods of about a picosecond. An electron crosses the specimen in about , so it sees the atoms frozen in one configuration. Successive electrons see different configurations. The recorded pattern is therefore an average of intensities over thermal configurations (Eq. (10)). That average weakens the sharp diffraction and spreads intensity to high angles (thermal diffuse scattering). A few electrons also lose energy to the specimen (inelastic scattering), which redistributes them by small angles.
Detector. After the specimen, the pattern spreads over the camera length onto a pixelated detector. On the EMPAD, each electron deposits its energy in silicon. The charge spreads sideways, by an amount that grows with beam energy, into neighboring pixels, and each pixel integrates its charge over its area and the frame time. The read-out converts charge to a number through a gain (151 ADU per electron at 80 kV), and a dark frame is subtracted. The recorded value is thus a blurred, integrated, scaled count with a little read noise (Eq. (12)).
Dose. Dose is the number of electrons per unit area, in electrons per Å. Beam-sensitive specimens are damaged above a threshold dose, so they are imaged at low dose. There most dark-field detector pixels record zero or one electron (median 0.35 on the bilayer). Poisson counting noise then sets what can be learned. At high dose the counts per pixel are large, the noise is nearly Gaussian, and errors in the model, not counting noise, set the limit (§S2). Because electrons arrive independently, the count in each pixel is a Poisson variable whose mean is the model’s expected count. The natural loss is therefore the Poisson negative log-likelihood of the counts, which weights each pixel by its noise, rather than least squares or L1 on intensities (§S2).
The scan. The probe steps across the specimen on a grid finer than its width, so neighboring illuminated regions overlap. One pattern is recorded at each position. The overlap makes ptychography possible. The forward model of §3 follows this path in order: source and probe, multislice through vibrating atoms, the detector, and the Poisson likelihood of the counts.
Model components
We test the object (atoms, pixels or a hybrid), the thermal model (frozen phonons with to 32, mean field, absorptive potential), partial coherence and focal spread, aberration order, slicing, the depth-placement kernel, and the exact Foldy–Lax reference.
Exact reference: atom-by-atom Foldy–Lax multiple scattering with partial-wave T-matrices; back-scattering below for the tabulated potential, forward-only equals full to (§S18).
Forward-only Foldy–Lax is multislice with one atom per slice, which links the reference to the fitted model (§S18).
Partial waves agree with ELSEPA to ; the tabulated potential [50] differs from it by +1.6% to −4.8% (80–300 kV).
1 Å slice grid: tungsten (W) dark-field amplitude error 3.3% (selenium, Se, 1.0%); plane-aligned or Å slices: ; with the eikonal-exact phase: . These hold for mean-field atoms at the reference sampling. Static atoms are in §S18.
Probe window: agreement with abTEM 1.1% at 50 Å (dark field 4.8%), against 4.3% at 25 Å.
With point-sampled detector pixels, mean field and frozen phonons () predict the held-out patterns equally well within noise. Each is fitted from two starts and scored on the 128 held-out patterns with a freshly
computed probe-mode basis on common configurations. Paired per pattern, the frozen-phonon differs from the mean field’s by per pixel from one start and from the other. The two starts fit the same counts, so they are not pooled as independent samples. The standard errors treat the 128 patterns as independent. Neighboring held-out patterns are 1.2 Å apart and share atom misfit, so the standard errors are lower bounds. The score is converged in ( changes it by ).
A third thermal model keeps the mean field and adds the absorptive phase , the second cumulant of the frozen-phonon phase [20], in closed form for Gaussian terms.
The absorptive potential is worse by 0.0012 per pixel, 4.9 times its paired standard error, because it removes flux that the detector records as thermal diffuse scattering.
The two thermal models differ in their widths. Frozen phonons give pm for W and 8.97–8.98 pm for Se (two starts). These effective widths exceed the pm molecular-dynamics value because static displacements, vacancies and drift add to thermal motion (§ 5.3). The propagation distance between the two W slices of the six-plane model (one slice per atomic plane, the Se planes fixed at Å from their W plane) is 6.74 Å from both starts. is a parameter of that model, not the interlayer spacing. Its Fisher standard deviation is 0.013 Å. Its offset from the nominal 6.5 Å spacing is 0.24 Å, only 0.0036 depths of field. With depth-resolved atoms and no priors, the W–W spacing is 6.51 Å on the published 6° bilayer and 6.62 Å on the simulation (truth 6.60 Å; §S15). In that comparison the mean field reaches the same prediction only with –11.4 pm for W, twice the molecular-dynamics value, a collapsed 1.4 pm for Se, and –6.43 Å. The mean field suffices to predict a thin bilayer. The thermal widths require frozen phonons. Image-based thermometry on twisted-bilayer molybdenum disulfide (MoS) under the same acquisition conditions (80 kV, 25 mrad, EMPAD) finds room-temperature rms displacements of about 9.6 pm for Mo and 11.7 pm for S, with 1–2 pm precision per atom [2]; W and Se are heavier. The bounds of § 5 are 0.7–1.4 pm per atom. On the counts before the dark-reference correction (§S14), the widths are converged in to 0.1 pm: fits with and give W 5.17 against 5.21 pm and Se 5.07 against 5.08 pm from one start, and 5.39 against 5.49 pm and 4.96 against 4.97 pm from the other.
The atom model trails a free-pixel fit by 0.047 per pixel (Tab. 2), far more than the phonon effect, so the thermal model does not set the remaining deficit. The thick specimens (PdH, PrScO) are fitted with a pixel object only (§S10), so the thermal model is untested there.
Representation size. An atom carries four parameters (three in a layered specimen), so the 25 mrad bilayer needs 2.6 per Å, against 26 real values per Å for our one-slice pixel fit and 208 for a four-slice complex object (§ 3). Over its scanned field, 1,985 atoms carry 7,940 parameters. For the thick PdH particle a pixel object of 14 slices holds complex values, plus free probe modes.
Depth derivatives need a placement kernel of fixed physical width. Placing an atom on the two nearest depth nodes (linear weights) gives a correct forward model. It leaves a sawtooth artifact in the depth derivative that does not shrink as :
single W atom, forward-mode derivative against finite differences: artifact / true tangent 16, 28 and 51 at , 0.25 and 0.125 Å;
a cubic B-spline gives 1.1–3.4 and grows as ;
a Gaussian profile of fixed width Å gives and at and 0.25 Å. Each atom is therefore a 3D object of depth extent that moves rigidly. Its derivatives agree with finite differences to in FP64.
Slicing on real data: one slice per plane equals one per layer; misplacing atoms in depth costs 0.004; finite projection and the eikonal phase change the score by .
50 Å window: the same 60-epoch difference ( 0.42493 for frozen phonons, 0.42601 for the mean field) and the same widths as at 25 Å.
Aberrations and parameters. The full aberration function of § 3, extending Eq. (2), is
with .
Loss
We compare the Poisson likelihood with least squares on counts and on amplitudes, for the same model, data and held-out set. Each fit is scored by held-out Poisson deviance and by the metric of each loss. The WSe numbers of this section use point-sampled detector pixels, as do the torchslise rows of §S9. Tab. 2 integrates over each pixel.
Free-mode pixel fit (8 probe modes, one slice, 2,500 iterations): held-out 0.4077 (Poisson), 0.4618 (least squares on amplitudes), 0.4733 (least squares on counts).
Held-out squared amplitude error is 0.258 (Poisson), 0.231 (amplitudes) and 0.308 (counts); squared count error is 14.47, 14.52 and 15.18, lowest for the Poisson fit. Least squares on counts over-fits most (train 11.2 against test 15.2).
The amplitude loss gives up 0.054 in , and least squares on counts 0.066.
Atom model (mean field, one width per species) on the counts before the dark-reference correction (§S14), 300 L-BFGS iterations, held-out scored with a freshly computed probe-mode basis: from the shared-width solution (warm) 0.4222 (Poisson), 0.4364 (least squares on amplitudes), 0.4660 (least squares on counts); from a cold start through Adam, 0.4224, 0.4419 and 0.4669. The ordering is that of the pixel fit on the same counts, with a smaller penalty (0.014–0.045 against 0.034–0.080). Under the two least-squares losses the W width drifts to 8–12 pm.
Loss ablation across datasets.
Table S2 trains our pixel solver, unchanged, under four losses on three datasets, with only the loss swapped (Poisson path bit-identical). It also trains the released torchslice code [11] under its L1 and under our Poisson loss (§S9). The datasets differ in how many electrons reach a dark-field pixel: median 0.35 on the bilayer, 2.3 on PrScO and 3.1 on PZT (training patterns, bright-field radii, inside the scoring disc).
The likelihood’s advantage grows as the counts fall. L1 costs our solver 0.058 per pixel on the bilayer and 0.004 (4 modes; 0.003 with 8) on PrScO, and gains 0.016 on PZT. Least squares on counts costs 0.066 and 0.035 where it was run.
torchslicewith our loss gains 0.51 on the bilayer at 50 epochs (0.14 at 500) and nothing on PrScO.On PZT, L1 wins. The residual dispersion at the fitted is about 0.77 on held-out dark-field pixels but 1.6 in the bright-field disc, where . We read the excess there as model error rather than counting noise; a robust loss limits its pull. Two checks rule out the noise model. A refit with counts at an effective gain of 270 ADU/e, which brings the dark-field to about 1, keeps L1 ahead (0.583 against 0.596 per pixel at the 378 scale, three seeds each). A quasi-Poisson loss weighted by , with fitted on training residuals, does worse (0.610 0.009).
All three detectors are sub-Poisson at the nominal gain ( column), so the Poisson bars are conservative (§S12). The PrScO and PZT values imply effective gains 25–45% below the nominal ones.
| WSe bilayer | PrScO | PZT | |
| e/pix, dark field | 0.35 | 2.3 | 3.1 |
| 0.88 | 0.56 | 0.77 | |
| ours, Poisson | 0.4077 (0.028) | 0.4224 ± 0.0006 (0.131) | 0.5981 ± 0.0017 (0.151) |
| ours, L1 | 0.4657 ± 0.0005 (0.023) | 0.4265 ± 0.0002 (0.127) | 0.5826 ± 0.0006 (0.137) |
| ours, amp. | 0.4618 | 0.4237 ± 0.0001 (0.131) | |
| ours, counts | 0.4733 | 0.4570 ± 0.0003 (0.122) | |
| torchslice, L1, 50 ep. | 1.105 (0.007) | 0.745 (0.094) | 1.106 (0.078) |
| Poisson, 50 ep. | 0.594 (0.032) | 0.754 (0.089) | 1.035 (0.083) |
| Poisson, 3c, 50 ep. | – | 0.724 (0.101) | – |
| torchslice, L1, 100 ep. | – | 0.627 (0.101) | – |
| Poisson, 100 ep. | – | 0.668 (0.097) | – |
| torchslice, L1, 500 ep. | 0.688 (0.058) | – | – |
| Poisson, 500 ep. | 0.548 (0.043) | – | – |
| torchslice, L1, 1,000 ep. | 0.660 (0.061) | – | – |
| torchslice, L1, 1×10⁴, 500 ep. | 0.639 (0.053) | – | – |
| Poisson, 1×10⁴, 500 ep. | 0.473 (0.012) | – | – |
| Poisson, 1×10⁴, 1,000 ep. | 0.458 (0.009) | – | – |
| torchslice, L1, 1×10⁴, 50 ep. | – | 0.905 (0.094) | – |
Table S2. Loss ablation: held-out (mean sd over three seeds; gap in parentheses) of our pixel solver under four losses, and of torchslice under its L1 and our Poisson loss, with identical counts and scoring per dataset. e/px: median electrons per dark-field pixel; : Pearson dispersion of held-out dark-field pixels at the Poisson fit (1 for Poisson counts). Ours: 8 modes (WSe), 4 modes (PrScO, PZT). WSe: point-sampled detector pixels (§S9). Their object learning rate ×10, tuned by us; 3c: Poisson weight three times the calibrated (§S9).
Parameterization of per-atom widths
Per-atom widths replace the two species widths of Tab. S1 by one log per atom. Every other row of that table is unchanged. We compare unscaled and Fisher-scaled log at a species-width fit. With unit scaling, the per-atom log directions are about times flatter than the position directions, and L-BFGS leaves 98% of the 1,702 widths within 1% of their start after 400 iterations. With each log scaled by its Fisher standard deviation, 66% of the interior atoms move within 40 iterations and the held-out deviance falls.
The scaled refit starts from the converged species-width fit. After 40 L-BFGS iterations it lowers the held-out deviance by per pixel, paired over the 128 held-out patterns on common phonon configurations (§ 5.3), and 79% of them improve. The bright field gains per pixel and the dark field . Later iterates score slightly lower still, so this gain is a lower bound. The standard errors treat the patterns as independent. Neighbors Å apart share atom misfit, so the significance is lower than the ratio suggests.
The per-atom Fisher information at the species-width fit determines 200 of the 235 interior widths with an unclamped (standard deviation of at most 1): 71 of 78 W and 129 of 157 Se. One Se width sits at its upper bound. The determined widths have a median standard deviation of 0.65 pm in for W and 1.11 pm for Se. The refit is stopped after 40 iterations. Single widths still move between iterations 20 and 40 (rms 1.9 sd), so Figure S1 shows the population of widths and we quote no single-atom value. Figure S1 maps them at iteration 40.
Figure S1. The Fisher information determines 200 of the 235 unclamped interior widths of the 25 mrad bilayer. (a) After 40 iterations of the per-atom refit, for the 236 interior atoms (W circles, Se triangles, second layer faded; gray outlines: the 36 widths the Fisher information does not determine). (b) Distribution of the 200 determined widths per species; dashed lines mark the one-width-per-species values, the dotted line the molecular-dynamics value.
In twisted bilayers, ultrasoft phason modes near appear at any nonzero twist, and uneven interlayer coupling mixes in-plane with out-of-plane vibration [40, 69]. Per-atom widths with an out-of-plane term could measure this.
Error-bar coverage
This test checks the estimator and its bars under a correct model. It draws Poisson counts from the fitted model at the measured dose (a redraw) and refits each from the generating point with the same objective. Model error is tested in §§S6 and § 20. uses the Fisher standard deviation at the truth. We score 42 redraws at full dose and 47 at half dose (§S5 adds 1/4 and 1/8). Refits that fail the convergence test are dropped, which can raise the coverage. There are 236 free atoms (472 position coordinates, 153 informed ; the other 83 , with Fisher standard deviation above 1, are held at the truth).
| group, dose | within 1 sd | within 2 sd | sd() | mean |
| positions, | 0.687 | 0.954 | 1.00 | +0.06 |
| positions, | 0.686 | 0.952 | 1.00 | +0.05 |
| , Fisher sd , | 0.671 | 0.940 | 1.15 | −0.17 |
| , Fisher sd –, | 0.687 | 0.900 | 1.57 | −0.37 |
| , Fisher sd –, | 0.681 | 0.865 | 1.67 | −0.52 |
| nominal | 0.683 | 0.954 | 1 | 0 |
caption:
:::
With the redraw as the unit, a fraction over redraws has the binomial standard error : 0.07 for the fractions within 1 sd below, and 0.03–0.05 for those within 2 sd.
Positions are calibrated at both levels and both doses. This holds for redraws from the fitted model; model error is treated in §§S6 and § 20. The widths are calibrated at one standard deviation. At two, the interval covers 90% where the Fisher standard deviation of exceeds 0.3 (widths known to worse than 15%), because the refits scatter 1.6 times the Fisher value there (sd of in the table above) and the low tail is heavier (estimates narrower than the truth).
The interval for in picometers inherits the coverage exactly (monotone map): median per-atom standard deviation 0.56 pm for the well-determined widths and 1.19 pm for the rest, at a true width of 5.1–5.2 pm.
Atom-level bounds
Synthetic (twisted bilayer at the conditions of the 25 mrad data; instrument fitted jointly). The model has 1,985 atoms with position and in-plane covariance (six parameters each) and 16 instrument parameters (, , , , , , , a four-term scan affine map, , , 11,926 in all). The Fisher matrix costs about 1,500 CPU core-hours. It is assembled in blocks of nearby positions truncated at 6 Å: 2–3% of the diagonal information of a tungsten (W) atom lies beyond, and the truncation changes those bounds by about 1%. Doses are 5.2 10 e/Å, with 2.4 10 in brackets.
Single atom, : W 0.14 pm [0.21]; Se 0.43 pm [0.65].
Region means of : sd 0.006–0.014 pm. AA and AB stacking are resolved at 6.5 sd [44].
Domain-wall phason ellipse (1.3:1), single W atom: detected at 4.5 sd, orientation to 6° [9].
Identifiability: with every instrument parameter. Fitting the instrument jointly widens the bounds by .
Recovery on synthetic refits: empirical over predicted spread 0.88–0.99; 0.93–1.12 (1 dof).
The bounds are 20–50 below published image-fitting errors.
Real data (Laplace bounds at the fitted optimum, conditional on the model).
Public data, 10.3 mrad, atom model:
Columns resolved from the other layer by more than 1 Å () have median ( pm) for both W and Se.
Pairs closer than 0.4 Å (108 of 282 interior sites) merge into one broad column and are flagged.
The W and Se sublattices are not distinguished at this aperture, so per-site is an effective column width.
Main dataset, 25 mrad [69], the main real-data result. Frozen phonons, :
Species widths with the instrument profiled: pm (W) and pm (Se) at the converged fit (Laplace bars, dense Fisher information over the 502 non-offset parameters of the species-width model, with the offsets eliminated; the per-atom plan of §§S12 and S16 has 1,636 columns). With the instrument known the bars are 0.033 and 0.039 pm. From the data term alone, without the priors, they are 0.034 and 0.041 pm. The cluster-by-pattern sandwich bars are 0.15 and 0.13 pm, 4.5 and 3.2 times the Laplace bars. The species-width model is therefore misspecified at this level; the per-atom misfit of §S3 is the likely carrier. The Pearson dispersion of the training counts at this fit is 0.92.
Per-atom widths for the 236 interior atoms: median sd() 0.68 pm (W) and 1.36 pm (Se), from the per-atom Fisher information at the converged species-width fit.
All Fisher bars on the 25 mrad data use of the fit’s 32 phonon configurations. Their medians hold to about 10%; the bar of a single atom depends on its four antithetic pairs of draws. The per-atom position bars have medians of 0.5 pm (W) and 0.8 pm (Se) (Figure 1).
Region means (78 W, 158 Se): sd 0.23 and 0.76 pm.
Correlation with every instrument parameter: (W; 0.02 for Se).
The real per-atom bounds are 3–5× the synthetic ones (0.68 against 0.14 pm for W, 1.36 against 0.43 pm for Se). Most of the gap is accounted for (§S12). Thermal diffuse scattering leaves frozen-phonon intensities with 3.9 times less diagonal width information for W (1.3 for Se) than the static potential of the synthetic test. The 71 mrad scoring disc keeps 58% of the detector’s information, and marginalizing the neighbors costs a further factor of 1.3–1.4. The rest is the per-atom misfit, measured at the budget fit (§S12) at 3.5 sd (W) and 3.4 sd (Se) against the 2.0 and 1.3 sd that the budgeted terms explain there. The width map after 40 iterations of the per-atom refit is Figure S1 (§S3).
Held-out comparison on the same data: the 128 held-out patterns of one sub-scan, identical counts and scoring (exact detector-pixel integration, Tab. 2).
Our free-mode pixel fit (8 modes, one slice): 0.4025, gap 0.027.
PtyRAD at its published settings, retrained without the held-out patterns: 0.4817 (full field, gap 0.014); 0.4735 trained on the sub-scan alone (gap 0.012).
Our atom model (frozen phonons, , one width per species): 0.4496, gap 0.005; 0.4312 with the calibrated detector ellipse (§S14).
Our pixel fit leads PtyRAD by 0.071–0.079 per pixel. The atom model is 0.047 per pixel behind (0.029 with the ellipse), returns physical parameters with error bars, and has the smallest train–test gap.
fold_sliceat its published schedule (400 + 125 iterations), retrained without the held-out patterns: 0.4552, gap 0.007.
Start independence. The species-width fit is run from two starts. In projection, the tungsten atoms of the two layers can trade places where their columns coincide, and so can the two selenium atoms of one column. Such a relabeling barely changes the counts, so two starts can differ by a few of these discrete swaps. An exchange screen and a relaxed exchange test remove them (§S17), after which the two starts agree inside the scan box. Of the 236 free atoms, 232 agree to better than 0.1 Å (median 0.04 pm; 0.05 pm rms for the 114 inside the box), and the species widths agree to 0.001 and 0.010 pm (0.04 and 0.24 sd). The other four are selenium atoms in the margin, 1.6–4.9 Å outside the scan box. Their Fisher standard deviations, 0.017–0.17 Å, are 3–26 times the median inside the box (0.0066 Å). Yet the two starts place them 0.28–3.4 Å apart. They sit in different local arrangements, which a local bound does not describe. The rearrangement is worth at most 28 nats of the training objective. It does not move the reported widths.
Planted-truth test. To test whether the fit recovers or creates the Se-pair splits, we simulate data from known structures with an independent multislice code (abTEM: Lobato potentials, 0.25 Å slices, 3D frozen phonons, exact pixel integration). The simulation uses the fitted instrument, dose, scan and held-out split of the real data, on the central positions. Our pipeline fits it from the held-out start.
Coincident Se pairs: release gives splits of median 0.017 Å (), a gain of 8 nats against 9 expected by chance, and no held-out improvement. The result is the same with an anisotropic thermal ellipsoid and a width at each site (0.017 Å), with DFT bonding charge in the potential (0.013 Å).
Planted splits of 0.05–0.20 Å in random directions are all detected (7 of 7, no false detection among the null pairs), with median vector error 0.016 Å and median angle error 9°. The release gains 58 nats per split pair and lowers the held-out deviance by per pixel. The Fisher
bars of the split components understate the scatter by a factor of 1.5–2.
Outer-plane Se vacancies leave a different signature. The remaining atom of the column moves by about 0.6 Å, worth about 2,000 nats.
At an earlier fit, the real data give in-box splits of median 0.10 Å (at most 0.28 Å), about 63 nats per pair and a held-out improvement of per pixel. This matches the planted case and none of the confounds. Not tested: dislocations, Se buckling along the beam, larger site anisotropy, interstitials.
The same test bounds the accuracy of the species widths. Against a sampling-converged simulation the fitted are low by 0.9 pm (W) and 0.75 pm (Se), 8–12%, because our forward model under-predicts dark-field intensity by 3–7% (static cores without the Coulomb cusp, the 2.55 Å band limit, plane slicing). The fit compensates with a smaller and a higher background. On data from our model the pipeline recovers the widths to within 1.4 error bars. Coherence, vibration along the beam, the scattering-factor table, bonding and the number of phonon configurations are each excluded as causes.
Dose
The same synthetic bilayer is redrawn at fractions , , and of the measured dose. As in §S4, only refits that reach the convergence test are scored (42, 47, 44 and 23 draws; at the rest stop on the iteration budget or the FP32 line-search floor). With the redraw as the unit, the binomial standard error of the coverage is 0.03–0.05 for the positions and 0.04, 0.05, 0.05 and 0.08 for the widths.
| 1 | 1/2 | 1/4 | 1/8 | |
| positions, rms sd (Å): Fisher / meas. | 0.011 / 0.011 | 0.015 / 0.015 | 0.021 / 0.021 | 0.028 / 0.029 |
| positions, within 2 sd | 0.954 | 0.952 | 0.948 | 0.944 |
| informed, rms sd: Fisher / meas. | 0.50 / 0.83 | 0.71 / 1.19 | 1.00 / 1.56 | 1.42 / 1.91 |
| informed, within 2 sd | 0.912 | 0.883 | 0.854 | 0.817 |
Table S5.
Positions: measured scatter follows , the Fisher standard deviation (below 1/2 because the weak position prior matters more at low dose). The bars stay calibrated at every dose.
Widths: the scatter exceeds the Fisher value at every dose, and the two-standard-deviation coverage falls as the dose drops. The widths that stay well determined (Fisher sd of below 0.3 at full dose) follow against .
Depth
The fit separates the two layers and places each atomic plane without structural priors: the W–W spacing comes out at 6.62 Å against the true 6.60 Å (§S15). From the published reconstruction, with depth polished to the likelihood minimum, depth error is 49 pm rms (W 50, Se 49 pm), against 114 pm for the 3D phase peaks. Freeing in-plane positions as well leaves it at 51 pm. The Fisher bound on single-atom depth is 8 pm, about what flat tilted layers give, and the likelihood of one atom’s depth has that width (see Figure S3). Mismatch between our model and the simulator (0.02–0.035 per pixel in ) places these minima tens of picometers from truth. The items below give the evidence.
Figure S3. A single atom’s depth is determined at the Fisher bound, and an atom model resolves the layers that a pixel reconstruction blurs along the beam (simulated bilayer; full fit from the published reconstruction, before the polish of §S6). (a) Change in training negative log-likelihood (solid) and half the held-out deviance (dashed) as one atom’s depth moves, all else fixed; three W (blue) and three Se (orange) atoms. Ticks: ±1 Fisher sd; triangles: true depth. The polish moves the atoms toward these minima. (b) section of the fitted atomic potential through both layers (circles: fitted atoms; dots: truth). (c) The same section of the published fold_slice reconstruction.
Task: recover for every atom of the simulated bilayer, with no bond-length or interlayer prior; a weak Gaussian prior (0.5 Å) acts on in-plane position increments only, none on depth. Two starts:
(i) From the published reconstruction (main text): in-plane, the 3-D phase peaks; in depth, one plane fitted to the peak depths of each layer. Truth enters only through one global similarity (four numbers), the depth gauge and atom identity. Start error: 4.9 pm in-plane, 47 pm in depth.
(ii) With the true layer geometry: flat layers at the true tilt and depth, so no per-atom depth information, and in-plane offsets of about 14 pm rms from truth. Start error in depth: 11–12 pm.
Instrument: fitted jointly. The simulation is coherent, so the fitted focal spread and source size measure how far our model departs from the simulator.
Fit floor at the true atoms: with the instrument fitted, , against a Poisson floor of 0.35–0.36 for our model.
The difference, 0.02–0.035 per pixel, is the model mismatch between their simulator and ours (potential parameterization, slicing, detector binning).
References for depth error (rms over atoms):
peaks of the published multislice reconstruction, 84 pm (W) and 127 pm (Se);
the same after bond-length and interlayer priors, 5.3 pm [22];
flat tilted planes fitted to the truth, which carry no per-atom depth information, 6.3–6.5 pm per plane. Per-atom depth resolution therefore requires an error below about 6.4 pm, about of the depth of field.
Block test: 48 × 48 positions (20.6 Å = 12λ/α square; 266 atoms inside the window, all free):
Start: flat layers at the true tilt; in-plane offsets of 13.5 pm rms; depth offsets of 10.9 pm rms.
Held-out is 0.3842, with gap . Both are within 0.001 of the fit at the true atoms.
Fit time 2.8 h on one consumer GPU.
In-plane positions on this block are recovered to 3.75 pm rms (2.2 × λ/α; W 3.65 pm, Se 3.80 pm), with no structural priors (3.2 pm over the full field below). Huang et al. reach 4.4 pm using bond-length and interlayer priors [22].
At convergence, counting statistics and the model set depth:
Fisher bound on per-atom depth, instrument profiled: 8.0 pm rms (; W 6.7 pm, Se 8.6 pm). This is about the 6.4 pm that flat tilted planes give. At electrons per resolution cell, the data alone cannot locate single atoms in depth much better than the layer geometry does. The 5.3 pm of Huang et al. is below this bound because their bond-length and interlayer priors supply the missing information.
The joint fit stays at 11.2 pm, 1.44 bound-sd per atom, with 85% of atoms inside 2 sd.
A depth-only search with the instrument and in-plane positions held at the joint fit lands at the same point from either start, the fit or the true depths. That point is 36.6 pm rms from the truth, at a lower objective ( 0.38387 against 0.38418). The true depths are not a stationary point of our objective.
Rescaling depth steps by in the joint fit gives 17.1 pm at a similar objective ( 0.38393). The next steps are structural priors and a potential matched to the simulator.
In-plane, the same mismatch dominates: the bound is 0.33 pm, against the block error of 3.75 pm.
Widths: the 25 mrad fits use , so by construction (§ 3). The simulated truth has , on the boundary, so these fits use directly, bounded below at , to test for bias at zero.
Width at zero truth: W (bound ), unbiased. Se is biased by (bound ), consistent with the Se column absorbing the depth and potential mismatch.
Full field from start (i): positions, all 1,928 atoms in the window free; 14 h on one RTX A6000.
0.38403.
In-plane: 3.2 pm rms (W 2.8 pm, Se 3.4 pm), without priors, from 4.9 pm at the start.
Depth: 35.8 pm rms (W 29.0, Se 38.8 pm) at the full fit, 49.0 pm (W 49.6, Se 48.8 pm) with depth polished to the likelihood minimum, and 50.9 pm (W 51.3, Se 50.7 pm) after a joint polish of , and (below). The block’s depth-only searches end at a similar distance, 36.6 pm. The fit from start (ii) has held-out lower by , so the counts separate the two depth configurations only weakly.
Full field from start (ii), the same flags; 14 h on one RTX A5000. In-plane agrees with start (i) to 0.05 pm. Depth starts at 12.1 pm and ends at 16.7 pm. This fit has no depth polish, so its depth stays near the start.
0.38384, gap 0.0003.
In-plane: 3.20 pm rms (; W 2.9 pm, Se 3.4 pm), without priors.
Depth: 16.7 pm rms. Whole atomic planes shift by to pm, so the mismatch acts on the layer geometry as much as on single atoms.
Widths: W sits near the lower bound of (; mean ), and Se is biased by . The same mismatch causes both.
Fisher bounds on the full field (9,495 parameters, instrument profiled): depth 8.2 pm rms (W 6.6, Se 8.9 pm), the same as on the block; in-plane 0.34 pm. The errors are 2.2 bound-sd in depth and 10 in-plane, with whole planes shifted by to pm. Width bounds: (W) and (Se).
Sensitivity to the depth profile: , 0.4 and 0.6 Å give the same depth error (11.2, 11.2 and 11.1 pm) and in-plane error (3.67, 3.75 and 3.98 pm). is 0.3835, 0.3842 and 0.3851, so the narrowest profile fits best.
Freezing focal spread and source size near 0 on these coherent data leaves depth at 11.1 pm and costs 0.017 per pixel in . The fitted partial coherence absorbs the simulator mismatch; it does not limit depth.
Figure S2 shows the per-atom depth errors of the full field against their bounds.
One-atom depth profiles at the fit from start (i), all other parameters fixed (three W and three Se atoms, interior; Figure S3). The training likelihood is 4.8–5.3 pm wide for W and 7.5–9.0 pm for Se, against Fisher standard deviations of 5.8–6.5 and 8.4–8.8 pm, so the counts locate a single atom in depth at the bound. At the full fit each minimum lies 20–70 pm away, and the 4–35 nats lower, and the held-out deviance falls in the same direction. A depth-only L-BFGS polish of all in-window atoms, run to a relative decrease below , moves them toward the minima by 56 pm rms: falls from 0.38403 to 0.38364, depth error is 49.6/48.8 pm (W/Se), and in-plane is unchanged. A joint polish of , and from there lowers to 0.38360 and leaves depth at 51.3/50.7 pm and in-plane at 3.2 pm. The minima lie 14–51 pm from truth, the model mismatch above.
An section through both layers (Figure S3,Figure S3): the fitted atoms show the two layers and their Se planes; the published multislice reconstruction of the same data shows streaks along the beam, its depth of field Å being the layer spacing.
Figure S2. Depth on the simulated bilayer, full field from start (ii) of §S6 (1,928 atoms, no structural priors). Left: depth error against true depth (W blue, Se orange). Middle: its distribution against the rms of the prior-refined published coordinates (dashed) and of flat tilted planes (dotted). Right: each atom’s depth error against its Fisher standard deviation; the solid line is one bound-sd, the dashed line two. The errors cluster by species at 6.6 and 8.9 pm of bound and exceed it by 2.2 on average, so model mismatch sets the depth error.
Held-out protocol
One pattern in eight is held out by the rule on the scan grid. Held-out positions come from their scan neighbors (neighbor rule). Deviance is scored on the 2/3 disc. A floor of in the model intensity changes scores by . Baselines train only on the remaining seven eighths, in every stage, and are scored on the same 128 (sub-scan) or 2,048 (full field) patterns through our likelihood.
Calibration sensitivity
On the 25 mrad bilayer the center-of-mass curl test fixes the detector orientation (a flip, no residual rotation), and the scan calibration fixes the scan step. The convergence angle is fitted. For the uncorrected 200 kV instrument the rotation prior comes from the camera-length table (+1.1±0.5°) and the detector scale and from fits of a silicon calibration specimen. Each calibration error is rendered and projected through the per-atom Fisher information of the fit of §S12, as there. The table gives the median / 90th-percentile width bias over the 236 interior atoms, in units of each atom’s standard deviation. It also gives per pixel before and after the refit absorbs the error.
| error | W | Se | () | absorbed |
| scan rotation 1° (0.07 at the scan edge) | 0.12/0.33 | 0.12/0.25 | 2.86 / 0.04 | 98.6% |
| scan step +2% | 0.16/0.44 | 0.14/0.37 | 3.67 / 0.07 | 98.2% |
| convergence angle +2% | 0.88/2.11 | 0.71/1.71 | 242 / 22.6 | 90.6% |
Table 1 (PDF p. 19).
A scan rotation or scale error is a linear map of the probe positions, which the fitted per-pattern offsets and drift absorb. At sizes larger than the calibration uncertainty the widths move by at most 0.4 sd for one atom in ten, and the held-out deviance by after the refit. Projected on the data, the residuals favor of rotation and of step, both inside the calibration.
The convergence angle is fitted and pinned by the bright-field edge. A 2% error is 1,360 of its standard deviations, i.e. the data fix to relative. The row is an upper bound for an error the fit cannot make. At the size the data allow, the widths move by less than sd.
Detector blur on PrScO. Our pixel solver fits a Gaussian detector blur (clamped to [0.05, 3] px). Freezing it measures its effect (4 modes, three seeds, full depth, same held-out rule, 1,336 s each on one RTX A4000):
| blur | gap | (px) | |
| fitted | 0.4224 ± 0.0006 | 0.131 | 0.862 |
| pinned at the hardware value | 0.4766 ± 0.0004 | 0.105 | 1.34 |
| off | 0.4927 ± 0.0023 | 0.153 | 0.05 |
Table S9.
The fitted blur is worth 0.070 per pixel. Without it, our fit trails PtyRAD (0.4877 at 1,000 and 0.4846 at 4,000 iterations) by 0.005–0.008. PtyRAD also applies a blur kernel, so the margin comes from fitting the blur width with the specimen.
The data reject the per-axis charge spread measured for the EMPAD-G2 at 300 keV (201 m [51], 1.34 px at 150 m pixels): pinning it costs 0.054. The fitted 0.86 px is an effective blur after the free modes take their share (below).
One run suggests that free modes absorb detector blur. On the 7-slice first stage (seed 1), removing the blur costs 0.151 with four modes and 0.092 with eight. The fitted blur falls from 0.81 to 0.66 px (0.86 to 0.79 px at full depth; 0.91 to 0.70 px on PZT). The difference, 0.059, is twenty times the spread over seeds and GPUs. This is consistent with Figure 2. A full-depth check with eight modes needs a card with more than 16 GB.
Baselines at their own settings
Table S9.
Every baseline is retrained without the held-out patterns and scored through our likelihood (§S7). Our pixel fit of Tab. 2 shares the fixed rows of Table S1, the scan and . Its specimen is one slice of real phase, its probe eight free modes in place of the optics rows, and it fits no , or . fold_slice is run with the published settings for this instrument (multislice LSQ-ML, 19 slices of 1.535 Å, 8 probe modes, 400 + 125 iterations) and scored at every saved iteration. Its held-out on the sub-scan, with point-sampled pixels, is 0.4651, 0.4611, 0.4629, 0.4653 at 100–400 iterations of stage 1 and 0.4721, 0.4696, 0.4672, 0.4648, 0.4602 at 25–125 iterations of stage 2. PtyRAD v1.0.0 is run with its shipped twisted-bilayer tungsten diselenide (WSe) parameters at 200, 400 and 3,000 iterations. Run to 4,000 iterations, as in its paper, it reaches 0.485 on PrScO (0.488 at 1,000) and 0.477 / 0.487 on the WSe sub-scan / full field (point-sampled; 0.473 / 0.488 at the published iterations), flat after 2,000–2,500 iterations. Its run-to-run spread is 0.003–0.005. The PrScO run takes 16.8 h on one A6000 without compilation. PtyRANNOSAUR on the WSe data:
25 mrad data, at the conditions of the network’s 80 kV model, : free modes 0.409; ours, 4 slices, 0.414; learned 0.419 (scaled) and 0.421 (raw), 0.417 and 0.421 with rigid stitching of the patches.
Started from the learned output, our fit reaches the final score of a fit from a blank object 3.1× sooner.
18.4 mrad data, outside the network’s range:
position correction rejects at least 15,362 of 15,376 patches;
the phase is about 12× too weak, with no amplitude.
PtyRANNOSAUR as a warm start. PtyRANNOSAUR is a learned reconstructor. Convolutional networks trained on multislice simulations of Materials Project structures map patches of diffraction patterns to a real projected phase [38]. Three properties keep it out of Tab. 2.
Its models hold only at their training conditions: 80 kV, 25 mrad and nm; and 300 kV, 25 mrad, or nm, with defocus of 5–7.5 nm and a 0.5 Å step. Its authors note that accuracy decreases outside these regimes. Our bilayer is at the conditions of the first. PrScO (21.4 mrad, 20 nm defocus), PZT (200 kV) and PdH (30 mrad, 28 nm) are not, and on our 18.4 mrad data the network fails (above). A fair comparison there needs a model retrained at each dataset’s conditions, about 64 A100-hours each by its authors’ account, with training choices that would be ours, not theirs.
It returns a real projected phase, not a complex multislice object with a probe, scan and coherence, so it cannot predict a diffraction pattern by itself. We score it through our fitted instrument, with and without a fitted global scale.
Its paper validates by SSIM against simulated truth and by comparison with an iterative reconstruction. No held-out score is reported on experimental data.
Where it applies, it is fast and close: 0.419 against 0.409 for our free-mode fit, from 5 s of inference. As a warm start it makes our fit 3.1× faster. Our fit adds the instrument and the error bars. We therefore treat it as a learned warm start that our method refines. Its speed suits further roles, not tested here:
live view during acquisition, with the FI evaluated at its output to choose the next scan positions and dose (§S16);
an initial atom list, by peak finding on its phase, for the atom model;
training once over the range of instrument states a calibration scan reports (probe, coherence and detector blur), which would remove the retraining per condition;
triage of large fields: regions where its output and a fit disagree, or its held-out deviance is high, get a full fit. The same score flags structure imported from training data.
torchslice at its released settings. Diederichs et al. released their code (torchslice) with a pixel-object notebook for the PrScO data of Tab. 2 [11]; their PZT atom pipeline is not released. We convert the notebook to a script and change only two things: the held-out patterns leave the epoch loop, and the snapshots are saved. The intensity scale (mean total per pattern) uses training patterns only.
Model as released: 40 complex phase gratings of 5 Å on a grid at 0.093 Å (0.10 , half our pixel), 13 spatial and 1 temporal coherence states with fitted weights and offsets, five aberrations, per-pattern positions; about parameters (ours with 4 modes: ). Adam with their four learning rates, warm-up and switch-on epochs and halving on a worse epoch, one step per pattern, 50 epochs, L1 on intensities over the whole frame, sparse-frequency regularizer.
Our loss: only L1 · is replaced by with their fixed dose times the model intensity. Adam ignores the constant except against their regularizer, so matches the L1 data term at the L1 run’s epoch-10 snapshot (training patterns). Calibrated at the empty model, it over-weights the regularizer 5–10 times late in training. The regularizer’s share of the loss still ends 1.5 times that of the L1 run on PrScO. With the Poisson run reaches 0.724 at 50 epochs, against 0.754 at and 0.745 for L1, so on PrScO the effect of the loss on
torchsliceis the size of the effect of the regularizer weight.WSe and PZT: the same pixel-object setup at each dataset’s geometry, with slices and sampling at the notebook’s non-dimensional values (2 slices of 6.5 Å and 41 of 5 Å; 0.12 and 0.11 ); detector orientation and defocus for PZT screened on training loss. A one-row roll of the WSe frame aligns its pattern center, which the code cannot fit.
Scoring: their forward model, reloaded from each snapshot, is cut to our 128-pixel window and scored by our likelihood. Held-out positions take the mean learned offset of their four neighbors. Gates: the reloaded forward reproduces the training run’s to 0 (bitwise) on four training patterns, and their input frame equals our counts bitwise, with the same held-out set.
Run to plateau (WSe, one A6000): of the L1 run falls from 1.105 at 50 epochs to 0.688 at 500 and 0.660 at 1,000, flat to over its last 50 epochs. The Poisson run reaches 0.548, flat to over its last 50 epochs. With ten times their object learning rate (tuned by us), L1 reaches 0.639 at 500 epochs and Poisson 0.458 at 1,000, flat to over its last 50 epochs and still 0.051 above our solver. On PrScO the same tuning makes L1 worse, 0.905 at 50 epochs against 0.745 as released, so the released rate stands there. Our solver: 0.4077 in 7 min. On PrScO both arms still fall at 50 epochs (0.016 per 5 epochs). At 100 epochs L1 reaches 0.627 and Poisson 0.668, both still falling (L1 by 0.013 over the last 10 epochs), so our margin shrinks from 0.32–0.34 at the released 50 epochs to 0.21–0.25 (epochs 51–100 on an A4000, so no single-GPU run time).
Time to accuracy on one A6000 (PrScO):
torchsliceneeds 4.7 h for 50 epochs (337 s each) under either loss. Our 4-mode fit reaches the besttorchslice, 0.745, after 95 s, and its own 0.4224 after 12.8 min. On WSe, 50 epochs take 249 s; ours takes 413 s. On PZT, on one RTX A4000,torchslicetakes 9.5 h for 50 epochs under either loss and our 4-mode fit 26 min, 21.6 times less. Repeats of our fits on another GPU change by at most (Poisson) and (L1), below the spread over seeds.
Reported evidence of fit. None of the methods we compare reports how well its fit predicts diffraction patterns it did not see. Their papers judge a reconstruction by an information limit, a Fourier ring correlation against a known model or a repeated scan, SSIM, a training loss, or the scatter of positions over repeated unit cells (Table S3). A small gap is not a good fit: torchslice at 50 epochs and foldslice on PrScO have gaps of 0.007 and 0.051 at 1.105 and 0.736, both under-fitted.
| method | what the paper reports | held out? | gap | ||
| WSe twisted bilayer, 80 kV, 25 mrad | |||||
fold_slice, 400 + 125 it.† | info. limit 0.31 Å; rms against simulated truth 4.5 pm in-plane [22]; no data-fit value | no | 0.4479 | 0.4552 | 0.007 |
| PtyRAD, sub-scan | info. limit 30 pm (other data); SSIM; data error rejected as a metric [31] | no | 0.4615 | 0.4735 | 0.012 |
| PtyRAD, full field | as above | no | 0.4680 | 0.4817 | 0.014 |
torchslice, L1, 50 ep. | L1 training loss; 2–4 pm s.d. over 25 unit cells (PZT) [11] | no | 1.098 | 1.105 | 0.007 |
torchslice, L1, 500 ep. | as above | no | 0.631 | 0.688 | 0.058 |
torchslice, Poisson, 500 ep. | (our loss swap) | – | 0.505 | 0.548 | 0.043 |
torchslice, L1, 1,000 ep. | as above | no | 0.598 | 0.660 | 0.061 |
torchslice, Poisson, lr, 1,000 ep. | (our loss swap, tuned by us) | – | 0.449 | 0.458 | 0.009 |
| ours, pixels, 8 modes† | , gap; Fisher bars with coverage | yes | 0.3758 | 0.4025 | 0.027 |
| ours, atoms† | , gap; per-atom Fisher bars | yes | 0.4447 | 0.4496 | 0.005 |
| PrScO [1], 300 kV, 21 nm | |||||
fold_slice, 200 + 200 it. | info. limit 0.23 Å; 0.7 pm s.d. of repeated Pr–Pr distances; data error against trial thickness (training) [6] | no | 0.685 | 0.736 | 0.051 |
| PtyRAD, 1,000 it. | info. limit 23 pm [31] | no | 0.394 | 0.488 | 0.094 |
| PtyRAD, 4,000 it. | as above | no | 0.389 | 0.485 | 0.096 |
torchslice, L1, 50 ep. | released notebook (“a demonstration, not fine-tuned”) | no | 0.651 | 0.745 | 0.094 |
torchslice, Poisson, 50 ep. | (our loss swap) | – | 0.664 | 0.754 | 0.089 |
torchslice, L1, 100 ep. | (run on by us) | no | 0.526 | 0.627 | 0.101 |
torchslice, Poisson, 100 ep. | (our loss swap) | – | 0.572 | 0.668 | 0.097 |
| ours, pixels, 8 modes | , gap | yes | 0.287 | 0.416 | 0.129 |
| ours, pixels, 4 modes | , gap | yes | 0.291 | 0.422 | 0.131 |
| PZT film, 200 kV, 20 nm | |||||
torchslice, L1, 50 ep. | 2–4 pm s.d. over 25 unit cells, from their atom pipeline [11] | no | 1.028 | 1.106 | 0.078 |
torchslice, Poisson, 50 ep. | (our loss swap) | – | 0.951 | 1.035 | 0.083 |
| ours, pixels, 8 modes | , gap | yes | 0.430 | 0.575 | 0.146 |
Table S3.
Atom fits in the literature. Diederichs et al. fit atoms to experimental 4D-STEM data of a 20 nm PbZrTiO film, about five depths of field. Their differentiable multislice includes frozen phonons, five aberrations, a fitted partial-coherence ensemble, crystal tilt and scan positions, under an L1 loss on intensities. They report a spread of 2–4 pm over 25 unit cells, not a per-atom bar [11]. Herdegen et al. recover temperature in such inversions on simulated data [21]. Singh et al. fit isotropic Gaussian atoms to ptychographic phase projections for tomography [58], and Mani et al. train a network on randomized Gaussian atoms to clean tomograms [41]. Both work on reconstructed images, not detector counts. Crystallographic refinement fits positions and displacement parameters to diffraction data by maximum likelihood [45], and to cryo-EM maps in real space [1].
Table S3. What each method’s paper reports as evidence of fit, beside what we measure for it on withheld patterns. , : half the Poisson deviance per detector pixel on training and held-out patterns, identical counts and likelihood within a block; gap = . WSe: †exact detector-pixel integration (Tab. 2); other rows point-sampled pixels. Baselines retrained without the held-out patterns; torchslice with Poisson loss is our loss swap in their code. PrScO gaps include about 0.09 Å of neighbor-mean position error for every method (§S10).
Table S4. Characteristic quantities of the datasets of tungsten diselenide (WSe), palladium hydride (PdH) and praseodymium scandium oxide (PrScO), computed from the counts and the instrument parameters. Doses are the electrons recorded inside the detector disc; is the projected phase band-limited to the probe’s transfer disc, . Defocus of the probe of the published reconstruction (−238 Å = −0.45); our physics-built fits do not determine it (the estimate follows its start). Fitted, 5.7 nm underfocus; 7 nm underfocus nominal at acquisition. Nominal, 20 nm overfocus [6].
More datasets
Table S4 gives the characteristic numbers of every dataset, and Tab. 1 repeats the main ones. Lengths are in across the beam and in along it.
| dataset | (Å) | (Å) | step in | pixel in | in | dose (e/Å) | e per | (Å) | W / Se (rad) | |
| WSe bilayer, Nguyen 2024, 7.5 mrad | 3.34 | 446 | 0.16 | 0.039 | 0.01 | – | 4.1e+05 | 4.6e+06 | 525 | 0.28 / 0.34 |
| WSe bilayer, Nguyen 2024, 10.3 mrad | 2.43 | 236 | 0.22 | 0.053 | 0.03 | −1.01 | 4.2e+05 | 2.5e+06 | 525 | 0.42 / 0.50 |
| WSe bilayer, Nguyen 2024, 22.5 mrad | 1.11 | 50 | 0.36 | 0.187 | 0.13 | – | 7.1e+05 | 8.8e+05 | 525 | 0.95 / 1.06 |
| WSe twisted bilayer [69], 25 mrad | 1.68 | 67 | 0.26 | 0.078 | 0.15 | 0.91 | 5.1e+05 | 1.4e+06 | – | 0.89 / 1.02 |
| WSe monolayer (unpublished), 18.4 mrad | 2.26 | 123 | 0.13 | – | 0.05 | – | 9.5e+05 | 4.9e+06 | – | 0.64 / 0.74 |
| WSe twisted bilayer, simulated (Zenodo), 25 mrad | 1.68 | 67 | 0.26 | 0.078 | 0.15 | 1.30 | 2.2e+05 | 6.3e+05 | – | 0.89 / 1.02 |
| WSe twisted bilayer, published 6° (Zenodo), 25 mrad | 1.68 | 67 | 0.26 | 0.078 | 0.15 | – | 6.5e+05 | 1.8e+06 | – | 0.89 / 1.02 |
| PdH nanoparticle (PtychoHub), 30 mrad | 0.66 | 22 | 0.64 | 0.234 | 12.80 | – | 5.4e+05 | 2.3e+05 | – | – |
| PrScO crystal (PARADIM), 21.4 mrad | 0.92 | 43 | 0.45 | 0.203 | 4.88 | −4.65 | 1.2e+06 | 1.0e+06 | – | – |
Table S4.
Datasets.
Thin, public [46]: twisted bilayer WSe, uncorrected 200 kV Talos (C 1.1 mm, the vendor value; = 525 Å), EMPAD, 128 × 128 scan, apertures 7.5, 10.3 and 22.5 mrad; dose 4.1–7.1 × 10 e/Å.
Thin, experimental: the twisted bilayer WSe data of Zhang et al. [69], 80 kV (not calibrated), aberration-
corrected (retuned each session; not measured), Schottky source with 0.8–1 eV spread, EMPAD; 25 mrad (the main real-data set, nominal 7 nm underfocus). From the same microscope, an unpublished 18.4 mrad scan of a monolayer region tests the learned baseline outside its training range (§S9). Counts are dark-subtracted raw values over 151 ADU per electron (§S14). rad for W and 1.02 rad for an Se column, so multiple scattering matters even in a bilayer. At e/Å about 5% of outer-plane Se sites are vacant after imaging [22], so the dose is at the onset of damage.
Simulated truth [22]: the bilayer with known coordinates (1,928 atoms in the window) at 80 kV, 24.92 mrad, step 0.42900 Å = 0.256 , tilt 12.7°, coherent probe, static atoms (thermal width zero), Poisson counts at e/Å nominal ( in the disc).
Published 6° bilayer [22]: untilted 6° bilayer under the conditions of the main dataset, e/Å. The published tilted bilayer (12.5° tilt) is not fitted.
Thick: PdH nanoparticle (PtychoHub [52, 57]), 300 kV, 30 mrad, 280 Å; PrScO [1] [6, 7], 300 kV, 21.4 mrad, 210 Å, whose public release is a 64 × 64 part of the published scan, without a reconstruction; PbZrTiO (PZT) film of Diederichs et al. [11] (CC BY 4.0), 200 kV, 24.6 mrad, Å, 52 cells of 3.95 Å = 205 Å = 5.0 depths of field, step 0.35 Å = 0.34 , 70 × 70 scan, EMPAD, e/Å ( per resolution cell). PZT holds dark-subtracted ADU without a gain. We estimate 378 ADU/e from the single-electron peak and EMPAD calibrations scaled to 200 keV; a refit at 270 keeps every ranking (§S2). Its lattice (, Å against 3.953 and 4.148 Å) confirms step and detector calibration to better than 1%. We report no atom positions for it.
Every fit uses the Poisson likelihood and held-out rule of § 4. We report (lower is better) and the gap . Depth nodes are every 0.25 Å ( ), and each atom is spread in depth by a Gaussian of Å (§S1; sensitivity in §S6).
Public bilayer. On the sub-scan, the physics-built instrument halves the train–test gap at matched accuracy: free modes 0.299–0.307 (gap 0.025), physics-built 0.324 (0.012), physics-built + 2 modes 0.305 (0.012). On the full field (2,048 held-out patterns) the three give 0.2906 (gap 0.010), 0.3235 (0.006) and 0.2913 (0.008). The information limit is the largest frequency at which a lattice spot exceeds the 99th percentile of the noise maximum in its window. It is 0.41–0.49 Å = 0.17–0.20 for free modes over three seeds and 0.45 Å with the physics-built instrument, against 0.46 Å for the published reconstruction. Requiring two symmetry-equivalent spots gives 0.49–0.52 and 0.46 Å, so the two are comparable, not ranked. The free-mode fit takes 381 s on one V100; the published run took 16.7 h by its log, 158× longer (19–113× against the 2–12 h the article quotes). The published code, retrained without the held-out patterns, reaches 0.345 near 1,000 iterations and then over-fits (0.352 at 9,000), with transmission above 1 on 57% and then 94% of the field. Our physics-built fits reproduce across seeds to .
Instrument on the public data. The fits do not determine or focal spread at 7.5 and 10.3 mrad ( about 0 and 0.15 mm against 1.1 mm), and at 22.5 mrad bound only mm. The counts carry the information (Cramér–Rao bound 2.5–8 µm, under 1% of 1.1 mm; §S16). Model error coupled to the free modes leaves undetermined.
Thick specimens (pixel object, free modes, same held-out rule for every method). Atoms are not fitted here: a column holds tens of atoms, about ten per depth of field, so it needs a joint parameterization, e.g. a lattice with displacements. This joint column model is in development.
PdH (12.8 depths of field): 0.401 (thick region) and 0.350 (mid), against 0.419 and 0.385 for PtyRAD retrained without the held-out patterns [31]; full field (256 × 256, 8,192 held-out) 0.367 against 0.390 (one seed; thick corner 0.414, mid 0.369). The physics-built instrument gives 0.486 and 0.458, 0.085 and 0.108 above free modes. Adding two free modes (0.429, 0.359) lets them absorb what the instrument model leaves out.
PrScO (4.9 depths of field, 512 held-out; Tab. 2): free modes 0.4157 with 8 modes (seeds within , gap 0.129), 0.4224 with 4 (0.131); PtyRAD at its shipped settings (21 slices of 10 Å, 4 modes, 200 iterations) 0.559 (gap 0.070, still falling), 0.488 (0.094) at 1,000 iterations after 2.8 h; and
fold_sliceat its published script 0.736 (0.051), best saved state 0.717. Our fit passes PtyRAD’s 200-iteration score after 110 s, 19 times sooner on the same GPU. Scored at the nominal raster instead of the neighbor rule, our rises from 0.423 to 0.795. The offsets jitter along the fast scan (rms 0.17 Å), and the neighbor mean misses them by 0.09 Å (0.10 ) rms, so part of every method’s here is position error.PZT: 613 held-out, depth schedule as for PrScO (7 slices of 30 Å, then 21 of 9.8 Å), orientation and defocus (−100 Å) screened on a 32 × 32 sub-scan; 0.575 (8 modes, 30 min on an A6000) and 0.598 (4 modes, 15 min), gaps 0.146 and 0.151 (Tab. 2).
6° bilayer, full field. After screening registry and stacking by held-out deviance, the atom fit (all in-window atoms free, 34 h on one RTX A6000) reaches 0.549, gap . The published fold_slice reconstruction, which used every pattern, scores 0.456 through our likelihood, so here atoms trail pixels by 0.09 per pixel. The layermean W–W spacing is accurate. Per-atom bounds would need about 6,800 A100-hours (§S16).
Timing and hardware
Reconstruction against acquisition. The 1,024-pattern sub-scan is recorded in about 1 s (1 ms per pattern; the full 128 × 128 scan takes 16 s). fold_slice reconstructs it in 20.5 h and PtyRAD in 22 min, 7 × and 1.3 × times the acquisition time (RTX A5000, published settings). Our free-mode fit passes both scores after 5.3 min on one RTX A6000, 3 × times the acquisition time; from a learned warm start it converges 3.1× sooner (§S9). A ratio near one would let the fit steer the next scan.
Time to accuracy, WSe₂. Our free-mode pixel fit with exact detector-pixel integration on one RTX A6000 reaches held-out 0.453 after 250 iterations (5.3 min), already below fold_slice (0.455, 20.5 h) and PtyRAD (0.474, 22 min). It reaches 0.412 after 500 iterations (10.6 min) and 0.4025 after 2,500 (53 min). With exact integration on a 2× sub-sampled pixel instead of 3×, it reaches 0.4023 in 26 min. Each budget is a separate run from the same start.
Time to accuracy, simulated bilayer. The atom fit of Tab. 3, started from the published peaks with the same flags, is run with shorter budgets on one RTX A6000 (each a separate run; last column: held-out ):
| budget | in-plane (pm) ↓ | depth W / Se (pm) ↓ | ↓ |
| start | 4.9 | 49 / 46 | 0.513 |
| 2 Adam epochs, 0.31 h | 4.0 | 47 / 45 | 0.392 |
| 5 Adam epochs, 0.93 h | 3.5 | 45 / 44 | 0.387 |
| 10 Adam epochs, 1.96 h | 3.3 | 41 / 43 | 0.386 |
| full fit (30 epochs + 40 L-BFGS), 14 h | 3.2 | 29 / 39 | 0.384 |
| + depth-only polish, 17.8 h | 3.2 | 50 / 49 | 0.384 |
| + joint , , polish, 20.6 h | 3.2 | 51 / 51 | 0.384 |
| published pipeline [22], 1.9 h | 4.8 | 84 / 127 | – |
Table 3 (PDF p. 24).
In-plane accuracy passes the published value within 20 min and is within 0.3 pm of the full fit after 1 h. Depth moves slowly. An hour leaves it near the start; the polish moves it to the likelihood minimum, 50 / 49 pm. A block of 5 L-BFGS iterations after 5 epochs changes neither number. A joint polish of , and after the depth-only polish lowers by 4 × and ends at 51 / 51 pm in depth, with in-plane unchanged. Freeing all three coordinates together does not improve depth over the depth-only polish.
Other timings. Free-mode pixel fit of the public 10.3 mrad data (full 128 × 128 scan, 10 modes): 381 s on one V100. The published fold_slice run of the same data: 16.7 h on a V100 by its log (9,000 iterations at 6.7 s). fold_slice on the 25 mrad data at its published settings: 140 s per iteration on an RTX A5000 (15.6 h for stage 1, 4.9 h for stage 2). Atom model with frozen phonons ( configurations, 81 coherence modes, no free modes, 1,702 atoms, 896 training patterns): exact pixel integration at bin 2 costs 850 s per gradient pass on two RTX A6000 (211 s with sinc pixels). The final two stages of the fit of Tab. 2 take 42 h wall on 2–5 RTX A6000 (118 GPU-hours), and the refit with the calibrated detector ellipse 24 h on six. The 300-iteration fits take 4.4 min per iteration on an RTX A6000. Fisher-vector product on one A100: 1.7 s against 1.2 s for the likelihood and its gradient over 4,096 patterns. Depth block of the simulated bilayer: 2.8 h on an RTX 2080 Ti. The full field: 14 h on an RTX A6000 (start (i); A5000 for start (ii)). The 6° bilayer full field: 34 h on an RTX A6000. Free-mode pixel fit of PrScO₃ (full 64 × 64 scan, 21 slices): 403 s with 4 modes and 783 s with 8 modes on one A100 (6.5 and 12.7 s per pass over 3,584 training patterns). PtyRAD takes 34 min for 200 iterations (10.2 s each), and fold_slice 95 min for 200 + 200 iterations. The published reconstruction of the full 128 × 128 scan (12 modes, 42 slices, 256-pixel patterns) took about 45 min per iteration for fewer than 100 iterations on a Quadro P5000 [6]. These A100 times are the 7 and 13 min of Tab. 2. On one RTX A6000, the card of the torchslice comparison: our PrScO₃ fit takes 12.8 min with 4 modes and 25.1 min with 8 (L1 in place of the likelihood; the same), and torchslice 4.7 h for its 50 epochs under either loss (337 s per epoch over 3,584 patterns). On WSe₂ the times are 413 s against 249 s for its 50 epochs, and on PZT 15 and 30 min.
Error budget
The Fisher bounds of §S4 are dose bounds that assume the model is right. This section projects measurement errors through the Fisher information of one reference fit of the 25 mrad bilayer, the budget fit, and compares them with the per-atom width misfit measured there. There the misfit, one Gauss–Newton step from the data, has a median of 3.5 (W) and 3.4 (Se) Fisher standard deviations (p90 14 and 8.9; last row of Tab. S5), where shot noise alone gives 1. The real per-atom bounds are 3–5 times the synthetic ones. The error budget identifies the measurement errors that account for this, and those below the shot-noise floor.
Conditions. 80 kV, mrad, Å, depth of field Å; EMPAD, 128 × 128 scan, step 0.429 Å = 0.256 ; 9.6 × e per pattern, 5.2 × e/Ų (1.46 × e per ) on the uncorrected counts. The bilayer spans 11.6 Å = 0.17 in the fitted model of this section and 10.08 Å = 0.150 at the converged fit. Tab. 1 uses the nominal 9.84 Å (). The three approximations that save cost are phonon configurations, slices at the atomic planes and a lateral sampling of 0.078 . The budget fit is a frozen-phonon fit with one width per species ( = 5.18 pm W, 5.08 pm Se), on the counts before the dark-reference correction (§S14), evaluated with configurations. Its 236 interior atoms carry a free width.
Method. For each source we switch it on at a plausible size in the fitted model, or switch a modeled term off, and compute the change in the expected counts on the 71 mrad disc of all 1024 patterns. A fit that lacks the source is biased by one Gauss–Newton step,
with the gauge-fixed Laplace covariance of §S4 (1636 global and per-atom columns, 1792 per-pattern offsets). We report the induced width and position shifts in units of their Fisher sd, the change in held-out deviance per pixel before and after the linear refit, and how much the measured data would gain if the source were fitted at its best amplitude. Checks: a log-width step of one atom projects onto that atom to 0.8% (the curvature of a 2% step) with every other parameter below sd; a 0.002 Å position step projects to ; the data residual reproduces the stored per-pattern scores to .
Below the shot-noise floor. Everything the model fits is absorbed: a 7% gain error goes into the dose scale, a background offset into the background, the scan affine between two scans of the session (0.057°, steps differing by 0.7%; 0.030 Å = 0.018 across the sub-scan) and 1 Å/min of specimen drift into the scan polynomial and per-pattern offsets. Each moves widths by less than 0.01 sd. So do the focal-spread quadrature (9 against 19 nodes), finer lateral sampling ( 0.078→0.058 ), a 50 Å probe window in place of 25 Å, and at the tuning tolerance, saturation and flyback.
Comparable to the floor. At plausible sizes, ten sources each move the median width by 0.2–0.9 sd and the worst tenth by up to 2.9 sd: clipped read noise (0.33 e, sized to the 31–39% negative pixels of the uncorrected counts; §S14 measures 0.02–0.04 e on the corrected counts), the detector PSF held at its floor, , , and at , finite-projection slicing, a 10 mrad local tilt, the frozen-phonon sampling at , and the difference between the fit and the evaluation. Static Se vacancies (5% of outer sites) move only their neighbors (p90 1.4 sd). Combined in quadrature these give a median of 2.0 sd (p90 6.0) for W and 1.3 sd (p90 3.7) for Se, against the measured 3.5 (p90 14) and 3.4 (p90 8.9). At the budget fit they account for about a third of the W misfit variance and a sixth of the Se.
Closing the gap. Two terms reach the measured scale. Switching thermal diffuse scattering off (mean field at the same ) biases W by 4.8 sd median and −6.6 pm on average. The model includes TDS, so only a fraction of this, the error of independent-atom frozen phonons, is a candidate. A uniform 20 mrad (1.1°) tilt gives 3.3/9.8 sd for W, because the Se pair and the two layers shear by the tilt times their separation along the beam. With it the quadrature sum reaches 3.7/11 for W, matching the measurement, but only 1.7/5.4 for Se. The data do not favor a uniform tilt along the fast axis (best amplitude −0.6 ± 0.03 of 10 mrad in training, not significant on held-out patterns). Fitting a tilt along the slow scan axis and one tilt per moiré region as nuisance parameters is the next step. It adds two to six parameters and repeats the per-atom Fisher pipeline (about 390 CPU node-hours for this sub-scan; §S16). It is not run here.
Held-out deviance. At the budget fit, fitting every source above at its best amplitude would lower by at most per pixel in total. That is small against the 0.047 per pixel that separates the converged atom model (0.4496) from our free-mode pixel fit (0.4025; Tab. 2), so most of that gap lies outside this list. The absolute lies below the Poisson expectation at the fitted counts (0.511 per pixel; 0.453 with clipped read noise). The counts are sub-Poisson (Pearson dispersion 0.92 at the converged atom fit), consistent with a gain of 140 rather than 151 ADU/e plus clipping. is therefore compared only between models.
Real against synthetic bounds. The real bounds are 3–5 times the synthetic ones. Three factors are measured at the budget fit. (i) Thermal diffuse scattering: at the same the static potential carries 3.9 times the diagonal width information of frozen phonons for W (1.3 for Se). Diffuse scattering returns to the detector much of what the Debye–Waller factor removes from the Bragg beams, and the synthetic bounds use the static potential. (ii) Detector disc: the scorer’s 71 mrad disc holds 58% of the width information of the full 106 mrad detector for both species. (iii) Marginalizing neighbors, stacked partners and the instrument widens the conditional sd by 1.40 (W) and 1.29 (Se). Together they give 3.7 of the 4.9 for W and 1.9 of the 3.2 for Se. We attribute the remaining factor of 1.3 (W) and 1.7 (Se) to the synthetic test: its truth widths (36–45 pm against the fitted 26–27 pm) and its 13-slice static model carry more width information than the real data at the same dose. Closing it needs the synthetic coverage test rerun with frozen phonons at the fitted widths (about 60 GPU-hours), which is not done here. The cluster-by-pattern sandwich bounds are 1.6 (W) and 1.4 (Se) times the Fisher bounds (per-atom medians): the same misfit, seen from the score side. The ratio grows with the size of the pattern clusters, which share misfit, and its scores use phonon configurations against the fit’s (§S4). It indicates the misfit; it does not calibrate the bars.
| Source | Size | Model | W med/p90 | Se med/p90 | p90 | W/Se pm | no refit/refit | data gain |
| 1. Shot noise | ||||||||
| Poisson counts | e/pattern | includes | 1 | 1 | 1 | sd 1.09/2.05 | – | – |
| 2–4. Detector, scan, specimen | ||||||||
| Gain | 151→140 ADU/e (−7.3%) | fits (dose) | <0.01/<0.01 | <0.01/<0.01 | <0.01 | <0.01/<0.01 | 49.9/<0.01 | – |
| Flat background | +0.05 e/px | fits | <0.01/<0.01 | <0.01/<0.01 | <0.01 | <0.01/<0.01 | 2.14/<0.01 | – |
| Read noise, clipped at 0 | e (uncorrected); bias 0.13 e/px dark | ignores | 0.66/1.45 | 0.43/1.23 | 1.37 | 0.94/1.10 | 5.17/0.08 | 0.15 |
| PSF | 0.05→0.174 px | pinned at floor | 0.20/0.55 | 0.20/0.44 | 0.74 | −0.28/0.50 | 2.28/1.64 | 2.28 |
| Scan affine | 0.057°, steps ±0.35% | fits (offsets, drift) | <0.01/0.02 | <0.01/0.02 | 0.02 | <0.01/<0.01 | 0.12/<0.01 | <0.01 |
| Specimen drift | 1 Å/min: 0.068 Å = 0.04 Å/ | fits (drift, offsets) | <0.01/0.02 | <0.01/0.01 | 0.02 | <0.01/<0.01 | 0.11/<0.01 | <0.01 |
| Se vacancies (static) | 5% of outer Se | ignores | 0.29/1.31 | 0.30/1.43 | 1.93 | −0.04/0.98 | 2.40/1.09 | <0.01 |
| Saturation | max 162 e/px/frame | ignores | < of the EMPAD range; no effect | |||||
| Scan flyback | 100–200 µs/line | ignores | sub-scan columns 84–115, far from the line start | |||||
| Se loss during the scan | 0.6–1.1% per scan | ignores | occupancy deficit ≤0.006 per site while sampled: ≤0.006× the bias of one vacancy | |||||
| 5–6. Partial coherence and aberrations beyond | ||||||||
| Focal-spread rule | 9 vs 19 nodes | includes | <0.01/<0.01 | <0.01/<0.01 | <0.01 | <0.01/<0.01 | <0.01/<0.01 | 0.87 |
| Focal-spread shape | skewness −0.38 | ignores | 0.19/0.41 | 0.13/0.30 | 0.35 | −0.14/0.02 | 0.46/0.18 | 0.02 |
| at (5.4 µm) | ignores | 0.77/2.12 | 0.68/1.61 | 2.26 | 0.36/0.52 | 5.74/5.38 | <0.01 | |
| (1.35 µm) | ignores | 0.30/0.63 | 0.25/0.60 | 1.14 | 0.27/0.52 | 6.33/1.01 | 0.14 | |
| ignores | 0.44/1.05 | 0.30/0.71 | 1.02 | 0.63/0.55 | 5.60/0.79 | 0.34 | ||
| ignores | 0.10/0.27 | 0.08/0.17 | 0.76 | 0.12/0.10 | 2.32/0.14 | 0.04 | ||
| (0.27 mm) | ignores | 0.74/1.70 | 0.52/1.33 | 2.27 | 0.60/0.40 | 4.09/3.72 | 0.08 | |
| (13 mm) | ignores | 0.05/0.11 | 0.05/0.09 | 0.19 | 0.02/0.09 | 1.30/0.05 | 0.03 | |
| 7–8. Thermal scattering and geometry | ||||||||
| Frozen-phonon sampling | includes | 0.39/1.43 | 0.20/0.68 | 0.26 | 0.04/<0.01 | 0.05/0.02 | 0.01 | |
| Fit at vs | 8→32 | includes | 0.61/2.53 | 0.43/1.20 | 0.46 | 0.10/0.03 | 0.15/0.07 | <0.01 |
| TDS (mean field, same ) | switch off | includes | 4.76/10.8 | 0.88/2.72 | 2.07 | −6.55/−1.82 | 6.17/0.62 | 0.34 |
| Absorptive instead of TDS | switch | includes | 1.22/3.21 | 0.43/1.27 | 0.78 | −1.34/−0.76 | 1.66/0.09 | 0.26 |
| In-plane anisotropy | 1.3:1 | ignores | 0.24/0.97 | 0.12/0.40 | 0.28 | <0.01/−0.07 | 0.02/<0.01 | 0.35 |
| Local tilt | 10 mrad (0.12 Å over 11.6 Å) | ignores | 0.92/2.86 | 0.38/1.13 | 7.70 | 1.20/0.76 | 4.21/0.09 | 0.03 |
| Local tilt | 20 mrad | ignores | 3.29/9.76 | 1.14/4.08 | 13.6 | 4.36/2.74 | 15.1/1.04 | 0.02 |
| Moiré corrugation | height ≈ 0.15 Å (est.) = 0.002 Å/ | ignores | interlayer change across the 13.7 Å window; below the depth of field by 450× | |||||
| 9. Forward-model discretization | ||||||||
| Lateral sampling | 0.078→0.058 Å/ | includes | 0.10/0.35 | 0.08/0.21 | 0.20 | 0.05/0.04 | 0.01/<0.01 | 0.04 |
| Probe window | 25→50 Å | includes | 0.02/0.05 | 0.02/0.04 | 0.14 | <0.01/−0.01 | 0.08/0.08 | 0.37 |
| Slicing | planes→0.5 Å finite projection | includes | 0.67/2.26 | 0.41/1.13 | 0.85 | −1.10/0.03 | 0.65/0.16 | 0.72 |
| Peng vs Dirac–Fock atom | DF +1.6% (W), −1.1% (Se) | ignores | common to a species: −0.27/+0.19 pm (band center 2α) | 1.20/5.5 sd of the species mean | ||||
| Schrodinger vs Dirac | DF −0.24%/+0.29% | ignores | 0.2× the Peng row | |||||
| Measured misfit | one GN step from the data | 3.5/14 | 3.4/8.9 | 8.7 |
Table S5 (PDF p. 26). Table S5. Error budget of the 25 mrad bilayer at the budget fit (counts before the dark-reference correction). : induced per-atom bias in units of its Fisher sd over the 236 interior atoms (78 W, 158 Se). : mean width shift. in per pixel (held-out before refit, training after linear refit). Data gain: decrease of (10−3) if the source were fitted to the data at its best amplitude. “−”: absorbed by fitted parameters to (unresolved). Aberrations are set to of phase at the aperture edge, the corrector tuning tolerance; the bias scales linearly below it.
Dose. The dose dependence of the bars and of the measured scatter is in §S5.
Counting statistics. The counts are slightly sub-Poisson (Pearson dispersion 0.88 on held-out patterns, flat in the expected count). The Fisher bars on the experimental data are therefore conservative by about 6%. The dispersion is measured at our point-sampled pixel fit (§S2; iteration 2,500, ) on the 5,721 pixels of the scoring disc. For variance the covariance of the Poisson-likelihood estimate is , so the true standard deviations are of the Fisher ones. Clipping at zero leaves 26.5% of the disc pixels at (25.1% of the dark-subtracted values were negative). At the atom model the larger held-out misfit is model error, not noise.
| expected count (e) | < 0.5 | 0.5–2 | 2–10 | ≥ 10 | all |
| share of disc pixels | 41% | 32% | 13% | 13% | |
| , held-out (128 patterns) | 0.885 | 0.859 | 0.887 | 0.890 | 0.877 |
| , training (896) | 0.728 | 0.806 | 0.843 | 0.823 | 0.781 |
Table S6.
Information per detector pixel
A detector pixel with expected count adds to the information on (Eq. (14)). We evaluate it at the budget fit (§S12) from the forward-mode Jacobian columns, which match central differences to and sum to the diagonal of the Fisher matrix to rounding. Depth is not a parameter of the fit. It is added for one W and one Se atom by moving each onto its own sub-slice, which reproduces the interlayer and defocus columns to (Figure S4). The atoms draw 76–98% of their information from beyond , with medians near for width and depth. The brightest 10% of the pattern pixels carry 1–18% of it, and the 10% with the largest relative sensitivity 76–94%. The instrument uses the bright field more. Defocus and the two coherence widths take 41–54% of their information from inside 0.9, and it grows with the counts (rank correlation 0.6, against at most 0.2 for the atoms). The Cramér–Rao direction of one W width lies 96% beyond 1.1, and profiling the instrument changes its bound by 0.5%. At the budget fit, with the instrument profiled, the Fisher information bounds an atom’s depth on the real bilayer to 12.9 pm for W and 14.6 pm for Se, about of the depth of field . Freeing the depth widens the W width bound by 15%.
Figure S4. Per-pixel Fisher information of the 25 mrad bilayer at the budget fit (§S12). (a–f) Probe on a W atom: expected counts (log scale), the Fisher density for the W atom’s in-plane position, depth and width and for defocus, and the per-pixel share of the Cramér–Rao direction of the W width with the instrument profiled out; densities on a square-root scale, each to its own 99.5th percentile; dashed circle ; the disc is the 71 mrad scoring disc (2.86). (g) Share of the information per unit , summed over the 896 training patterns, against the share of the counts. (h) Fraction of the information carried by the top of (pattern, pixel) pairs, ranked by relative sensitivity (solid) or by counts (dashed).
Detector check
The 25 mrad frames are raw detector values (§ 5.1; dark reference subtracted in the detector orientation). We check the outer detector, beyond 3.7, where almost every frame records no electron:
The dark reference leaves a static residual of 2.6 ADU rms per pixel (0.017 electrons at 151 ADU per electron).
The zero-electron peak has a standard deviation of 4 ADU, of which 3 ADU (0.02 electrons) is temporal read noise per pixel and frame. With the frame-to-frame common offset left in, as the fits see the counts, it is about 6 ADU (0.04 electrons) around a zero level of −5 ADU. Electrons that share their charge between pixels add a tail of partial deposits above the peak. Second differences over the scan and the variance–mean intercept include this tail and overstate the read noise by a factor of about seven. Clipping the counts at zero (§ 4) turns this noise into a positive pedestal. With the zero level and the read noise, both known before the fit, the expected count of Eq. (12) becomes the expected clipped count
i.e. no electron, or at least one at its conditional mean. This is within 1.6% of the exact Poisson sum for from to 10. With the measured and the atom model (, 20 L-BFGS iterations from the fit of Tab. 2) changes by per pixel, below the seed-to-seed spread of . A read noise of 30 ADU raises it by . In the free-mode pixel fit every read-noise setting widens the train–test gap. The detector of Eq. (12), with its fitted flat background, is therefore used for every fit.
A vacuum scan from an earlier session on the same detector calibrates the detector blur. With the pixel box resolved by 16 × 16 sub-samples per pixel, the bright-field disc has a hard edge seen through a Gaussian blur of px () at mrad. At coarser sub-sampling the blur and the edge width trade off, with deviances equal to per pixel. The atom model fixes the aperture edge at 0.3 px. This soft edge stands in for the blur at the disc edge, so its fitted goes to 0.
Projector ellipse. The bright-field rim is an ellipse: rim fits give semi-axes with and the major axis at from the detector axis, a distortion of the whole diffraction plane (it improves the dark field as well as the bright field, below). This is . Bright-field disks on other aberration-corrected microscopes are elliptical by 1–4% in the same measure. The projector and condenser settings set the ellipse. On one microscope, for each condenser aperture, its axis holds to within a few degrees over all camera lengths beyond the last projector-mode change, and its size to about a percentage point. It is therefore calibrated once per camera length and aperture. On the six scans of our session (about 90 min, two magnifications, five defoci), the rim gives to within , the axis at –, and the same rim radius to 0.004 pixel. The value above, from the summed training patterns of the fitted sub-scan (896 of 1,024; held-out patterns do not enter), lies within the scatter of single sub-scans. The atom model can carry it as a fixed, area-preserving stretch of detector frequencies, calibrated from the rim and never fitted: aperture, aberrations, propagator and band limits see the stretched frequencies, the potential is synthesized at the matching sheared frequencies, and the scoring disc and detector pixels stay unchanged, with no re-sampling; at every array is unchanged. Switching it on for the converged atom fit lowers from 0.4496 to 0.4318 without a refit (bright field 0.599 to 0.567, dark field 0.429 to 0.413); a refit gains another and leaves the train–test gap at 0.005 (Tab. 2). The refit lowers the species widths by 0.08 (W) and 0.03 pm (Se), within their sandwich bars, the rms atom displacement from the lattice from 0.41 to 0.32 Å, and the interlayer parameter from 6.74 Å to 6.69 Å. The free-mode pixel fit does not improve with the same correction, since its free modes absorb the distortion. The widths and bars quoted in the main text are those of the fit without the ellipse.
Accuracy against published results
We read atom positions from the published reconstructions as a user would, with no structural priors. We use Gaussian fits in 2-D to the projected phase or to the max-phase image, and Huang et al.’s 3-D peak retrieval (voxel maxima of the phase refined to sub-voxel by a spline) [22]. A 2-D peak cannot separate atoms closer than 0.35 Å in projection, so 2-D peaks are compared with the -weighted centroids of such columns. Every set is aligned to its reference by one similarity transform (rotation and isotropic scale). The published simulated reconstruction used a scan step 0.9% long. With translation-only alignment it scores 19–23 pm against our 3.2 pm; the difference is the step calibration, not the method. Values are rms, with ours on the same atoms or columns in brackets.
With no priors on either side, our in-plane error is 3.1–3.2 pm against 4.8 pm ( against ), from either start. The advantage holds for both species, on overlapping columns, and in the outer 3 Å of the field (3.5 against 6.2–7.9 pm).
The priors move the published in-plane error only from 4.8 to 4.4 pm [22]. They act on depth, 84/127 to 5.3/5.5 pm. From the published reconstruction our depth error is about 3 times below the raw published peaks and 5–7 times above the refined coordinates (§S6).
Our in-plane error is 10 times our Fisher standard deviation (0.34 pm), and only 8% of atoms lie within one. The published peak-fit standard deviation understates its error by 3.5 times. Both methods are limited by model or read-out error, not by the counts.
Table S7. Real data: our atoms against peaks of the published phase, similarity-aligned (pm rms). : matched columns. Interior: away from the edge of the fitted field. Last column: rms of the difference over the combined standard deviation per axis (our Fisher bound and the peak-fit error).
| dataset | all↓ | W↓ | Se | interior↓ | diff./sd | ||
| main, 25 mrad | 127 | 13.7 | 0.082 | 14.1 | 12.2 | 9.0 | 10.4 |
| public, 10.3 mrad | 445 | 19.2 | 0.079 | 17.6 | 19.3 | 14.0 | – |
| 6° bilayer | 766 | 31.9 | 0.19 | 33.3 | 32.6 | 31.6 | – |
| 6° bilayer, ideal-lattice start | 1,033 | 17.9 | 0.11 | 17.1 | – |
Table S7.
25 mrad. Agreement is 13.7 pm overall and 9.0 pm on the 16 columns farthest from the edge of the free-atom box (111 of the 127 lie within 3 Å of it in a 13.3 Å field). The difference is 10 times the combined standard deviation. The two starts of our fit agree to 0.05 pm rms on the in-box atoms, so the difference from the published peaks is model or readout error. The position bars at one optimum are therefore not a credible interval for positions on these data. The width bars stand as in §§S3–S4.
Public. Agreement is 14 pm in the interior and 26.7 pm in the outer 3 Å, where our fitted sub-scan ends.
6° bilayer. Our atoms agree with the published phase worse than the ideal two-lattice start does (32 against 18 pm). The fit moves the atoms by 42–49 pm in random directions, its coherence parameters sit at their bounds ( Å, Å), and it trails the published reconstruction by 0.09 per pixel in (§S10). The positions absorb instrument mismatch and are not accurate.
Where the two differ. At the edges of the fitted field, at overlapping columns (25 mrad: 17.1 against 12.3 pm on isolated columns), and at low-amplitude Se columns, 5–
| method | priors | in-plane (pm)↓ | W↓ | Se↓ | depth W/Se (pm)↓ |
| published, 2-D, projected phase | none | 7.0 [3.0] | 7.1 | 7.3 | – |
| published, 2-D, max-phase image | none | 5.5 [3.0] | 5.9 | 5.3 | – |
| published, 3-D peaks | none | 4.8 [3.1] | 3.9 | 5.2 | 84/127 |
| refined coordinates | bond, interlayer | 4.3 [2.9] | 3.7 | 4.5 | 5.3/5.5 |
| ours, from published phase | none | 3.2 | 2.8 | 3.4 | 50/49 |
| ours, true layer geometry (§S6) | none | 3.1 | 2.8 | 3.3 | 18.8/15.5 |
Table S6 (PDF p. 28).
6% of them, about the fraction of Se vacancies in [22]. Our full-occupancy model does not widen those sites ( of Se 6.1 against 6.6 pm elsewhere on the 6° bilayer). These sites need an occupancy parameter.
On real data and an independent simulator, model error, not counting noise, sets both methods’ position error: 14–19 pm on real data (0.08 ), about 10 times our Fisher bars.
Spacing of the W planes. We rotate each layer so its mean W plane is level, interpolate both W surfaces on a 0.5 Å grid, and take their difference. Published depths and interlayer distances come from refinement under bond-length constraints [22], so they are a constrained reference, not a measurement.
| set | W–W (Å) | 5–95% (Å) |
| molecular dynamics, flat | 6.57 | 6.45–6.78 |
| simulation, truth | 6.60 | 6.45–6.84 |
| simulation, refined coordinates (priors) | 6.58 | 6.37–6.83 |
| simulation, ours (no priors) | 6.62 | 6.28–6.88 |
| 6° bilayer, refined coordinates (priors) | 6.57 | 6.28–6.83 |
| 6° bilayer, ours (no priors) | 6.51 | 6.13–6.89 |
Table 1 (PDF p. 29).
Without priors, the mean W–W spacing of our depth-resolved fit matches the simulation and agrees with the prior-refined coordinates on the 6° bilayer (the paper reports 6.2–6.9 Å between stacking regions [22]). The Se–W spacings do not match. On the simulation one Se plane per layer shifts by about 17 pm (1.49–1.86 Å against 1.64 Å), and on the 6° bilayer they stretch to 1.82–1.86 Å.
The 6.74 Å of §S1 is a different quantity: the propagation distance between the two W slices of the six-plane model used for the 25 mrad fits, in which each atomic plane is one thin slice and the Se planes sit at Å from their W plane. It depends on the model: 6.738 and 6.735 Å for frozen phonons from two starts, 6.87 Å at iteration 40 of the per-atom-width refit, and 6.40–6.43 Å for the mean field at an earlier fit. Its Fisher standard deviation is 0.013 Å (). Its offset from the nominal 6.5 Å spacing of the W planes is 0.24 Å, 0.0036 depths of field, a direction in which the counts are weakly informative. The fitted defocus of the 25 mrad set is Å (5.7 nm underfocus, i.e. nm in the microscope’s sign), against 7 nm underfocus at acquisition.
Image level. Our free-mode phase of the public data and the published phase, registered by rotation, scale and sub-pixel shift, correlate at 0.80 (0.79 after a 2 Å high-pass), and their Fourier ring correlation crosses 0.143 at 0.46 Å (0.19 ). Both come from the same counts, so this measures agreement, not resolution. The two agree to about the information limit of either (§S10).
Thermal widths. An atom in a published phase image is 15–21 pm wide (short axis), three to four times the thermal width, so the reconstruction sets the image width. On the 6° bilayer it is 20.7 pm, no larger than on the static simulation (21.1 pm), so the thermal width cannot be read from one published image. Image-based thermometry separates the two only through a temperature series [2]. Our is fitted directly, with its bar.
Identifiability by rank-revealing QR
Setup. The whitened Jacobian A stacks over the training positions, so (Eq. (14)) with unit noise per count. Columns are forward-mode tangents with every parameter in its natural unit: positions and scan offsets in , depths in , , aberrations in radians of phase at the aperture edge, and , , . A patch centered on a W site, Se site or hollow takes the 372–375 training patterns within 5 Å and all parameters they see (about 1,260 atoms with, 1,100 with one width per species), rows. The specimen-to-scan shift (2) trades exactly with a common shift of a patch’s atoms. Fixing the fit’s 12 gauges (mean offset 2, scan polynomial 10; §S4) and this shift removes 14 exact null directions and cuts the equilibrated from to –.
Rule. is the information on pivot with the earlier pivots profiled and the later ones fixed; adding it gains about in expected log-likelihood. The test asks whether the data support a standard deviation of natural units ( is AIC type). Since exactly, pivot is determined at the dose .
Rank and dose. With per-atom widths, at e/Ų, 1,200–1,213 of 1,246–1,271 parameters (95–96%) pass ; the widths of outer, partly seen atoms fail. At 0.1 more widths fail (91–92%), and at 0.01 still only widths fail (88%). These scalings assume the fitted background (0.024 electrons per pixel, 7% of the median dark-field count) scales with dose. A fixed detector pedestal of that size would dominate dark-field pixels below about 0.1 and raise the low-dose figures. On all three patches the instrument pivots first and the widths last. With one width per species, as the paper fits, every parameter passes at all three doses.
| parameter | , (e/Ų) | target | at target (e/Ų) |
| W position | 0.6–0.9 | 0.1 | 61–94 |
| Se position | 4.4–9.8 | 0.1 | 440–980 |
| W depth, earlier fit | 0.5–1.3 | 1 Å | – |
| Se depth, earlier fit | 2–4 | 1 Å | – |
| W width, per atom () | – | 10% in | – |
| Se width, per atom () | – | 10% in | – |
| width, per species () | 100–140 | 10% in | – |
Table 2 (PDF p. 29).
These pivot-conditional doses, for a detector that counts every electron once, are lower bounds. With every other parameter profiled, the core positions reach at 196–212 e/Ų (W) and 731–1,090 e/Ų (Se), above the 10–100 e/Ų that organic specimens tolerate. The two Se atoms of the core column lie 0.15 Å apart in the plane and trade positions, which raises the Se doses. Per-atom widths to 10% need 0.1–2.5 times the dataset dose, and one width per species about e/Ų. The depth rows come from an earlier fit, at which depth to 1 Å needs – e/Ų.
QR against Cholesky. Worst relative error of diag against refined double-precision QR, on the patches of an earlier fit:
| problem | Cholesky, FP64 | Cholesky, FP32 | QR, FP32 | Cholesky + 1 refinement | |
| patch, gauges fixed | 12.4 | – | – | – | |
| full field, gauge held by the prior | 3.9% | – | |||
| patch, gauges left in | breakdown | 98% | breakdown |
Table 4.
With the gauges fixed, every method works. The bad conditioning is all in the near-gauge of scan polynomial, offsets and global shift. Held only by a weak prior, FP32 Cholesky errs by and QR by . With gauges left in, only the pivoted QR truncated at degrades gracefully: it flags the gauges and gives finite bars conditional on them. The bars fix the mean-offset gauge exactly; the scan-polynomial gauge is held by its prior (bars without priors agree within 1.2%). is accumulated in FP64 from the FP32 Jacobian, Jacobi-scaled, and inverted by eigendecomposition on the gauge null space, with no eigenvalue truncated. Its condition number of costs about relative accuracy. A randomized interpolative decomposition [19, 42] finds the same skeleton as the strong rank-revealing QR [18] but costs 7.0–7.2 times its tangent passes at , so it does not pay here.
Cost of the Fisher matrix. Every column over every training pattern of the 25 mrad sub-scan (1,636 columns, 896 patterns) costs about 390 CPU node-hours or 75 A100-hours (0.18 s per column and pattern). A field the size of the 6° bilayer (14,336 patterns, 9,458 parameters) would cost about 6,800 A100-hours. Local assembly fails. Width columns of fixed atoms outside the 13.3 Å scan draw information from the whole sub-scan through the 25 Å probe window. Truncating them changes the width bars by a median of 33% (p90 183%) at a 5 Å footprint, 3.4% (44%) at 6 Å and 1.1% (23%) at 8 Å. The dense matrix is therefore formed. Its factorization takes seconds on a GPU.
Instrument across datasets. Ordering local columns first and shared ones (, , ) last, the trailing block of each dataset is the Schur complement Eq. (15), and the joint factor is the QR of the stacked blocks. On the full 25 mrad field the bound is 0.12 μm for (0.018 rad at the aperture edge), on the 32 × 32 sub-scan the converged fit gives 0.20% for (70.62 Å) and 0.13% for (0.3203 Å); at 18.4 mrad 0.25–0.26 μm; for an uncorrected 200 kV lens with mm, 8.3 μm (7.5 mrad) and 2.5 μm (10.3 mrad). Pooling datasets narrows the coherence bounds only as . These are lower bounds: on real data model error, not information, limits the instrument.
Low-dose design. About 70% of a patch’s columns are per-pattern scan offsets. A low-dose scan can replace them with a cubic scan model (18 columns), freeze calibrated parameters, and take the instrument, including the second-order aberrations and , and the widths from a high-dose calibration. The target scan then refits positions, interlayer distance, defocus , two-fold astigmatism , dose scale, background and descan. One Gaussian position jitter, a free log , catches the scan’s blur. Each row adds to the one above. The last row is the alternative in which coma is refit:
| design | passes | rank | W / Se (e/Ų) | variance W / Se | ||
| all profiled (species widths) | 1,084–1,104 | 342–358 | 87–89% | 193–206 / 657–1,076 | 1 / 1 | |
| scan model | 358–374 | 342–358 | 62–67% | 173–185 / 642–1,058 | 0.90 / 0.97 | |
| + calibration and jitter Fig. 6 | 349–365 | 333–349 | 62–67% | 110–122 / 540–995 | 0.58 / 0.88 | |
| + and also held | 342–358 | 326–342 | 61–66% | 110–122 / 535–993 | 0.58 / 0.87 | |
| , refit | 353–369 | 337–353 | 62–67% | 173–184 / 616–1,057 | 0.90 / 0.97 |
Table 5.
is the dose at which the core W or Se position reaches with every other estimated parameter profiled; the pivot-conditional does not change (61–94 and 440–980 e/Ų). Variance is relative to the dispersion (median over the core coordinates). The design of Fig. 6 estimates 3.02–3.11 times fewer parameters. The passes barely change: the offsets take two passes in any design, and one width per species adds only two columns. At every core position stays determined, and the position bounds tighten by 24% (W) and 6% (Se). The jitter leaves them unchanged and is determined to 12% (relative standard deviation of the total Gaussian spread, 0.32 Å). Holding and as well changes little (24% and 7%). The gain comes from the axial coma , which trades with in-plane position. Holding alone gives the same 24% and 6%, and does not matter. If coma must be refit, the bounds tighten by only 5% and 2%. Holding it is valid when coma drifts by much less than the target scan can resolve. The target scan alone pins only to about 30 nm at (0.4 nm at the dataset dose), and a coma error of that size biases the positions by about half a standard deviation. Coma drift is negligible between scans taken minutes apart and reaches about 20 nm over an hour, a bias of a third of a standard deviation. The calibration scan is therefore taken next to the target in time as well as in space. Defocus and two-fold astigmatism drift in minutes and are refit [3].
A frozen group off by biases the estimate by at every dose while the standard deviation falls as . At the tolerable errors are about the bounds, so the design suits low dose only. The binding assumption is the scan model: the fitted offsets are 10.6 pm rms and a cubic model leaves 8.8–9.0 pm, five times their 1.8 pm bound. In the design of Fig. 6 this residual biases core W positions by 0.15 sd at 100 e/Ų, 1.1 at 0.01 and 11 at ; the bias reaches half a standard deviation at about e/Ų and one at e/Ų. A smooth scan model therefore suits organic doses, not the dataset dose.
Transfer to later scans. Two later scans of the same session are fitted with the same pipeline. One is taken 70 min after the first at the same magnification and dose. The other is taken 83 min after it at 10 instead of 14.5 Mx and half the dose. We express each change of a calibrated parameter in units of its low-dose threshold, the Fisher standard deviation of the first scan scaled to 100 e/Ų. The slow aberrations that the design holds fixed transfer on both scans within one threshold: changes by at most 0.01, by at most 0.92, by at most 0.11 and by at most 0.30. The terms it refits move, as the design assumes: defocus by 2.0 and 2.1 thresholds, by up to 4.5, and the descan by up to 6.4. The coherence widths stay inside one threshold at the same magnification, the focal spread changing by 0.52 and the source size by 0.10. On the 10 Mx scan they move by 1.15 (71 to 83 Å) and 1.86 (0.32 to 0.38 Å). The design holds the focal spread fixed, and its jitter term adds to the source size. The species widths are 7.78 and 10.18 pm at the same magnification, close to the 7.35 and 8.98 pm of the first scan. The 10 Mx scan fits 14.4 and 11.6 pm, so part of its coherence change may be blur that the widths absorb. Within a session, the coherence widths therefore transfer to within one or two thresholds.
Algorithms
The steps below give the order of operations, with the cost and settings of each step. is the number of grid points of the probe window, the number of slices, the number of probe modes, the number of frozen-phonon configurations, the training positions and the parameters.
(a) Forward renderer (one batch of positions ).
Potential. For each slice , evaluate (Eq. (7)) at every frequency of the oversampled grid and sum over the atoms of the slice, one matrix product per slice. Alternatively, evaluate the real-space Gaussians by the fast Gauss transform to a requested tolerance. The width enters the Gaussian variance , and follows from Eq. (8). Cost: per slice plus . General depth spreads each atom over the slices by a Gaussian profile of width Å.
Frozen phonons. Draw fixed standard-normal displacement sets in antithetic pairs and build (Eq. (10)); the mean field is with Eq. (7). Cost: times steps 1, 3 and 4.
Probe. Form with the aberrations of Eq. (16), the partially coherent copies of Eq. (11) on a product grid over standard deviations, and compress them to the leading eigenmodes of their Gram matrix. This replaces hundreds of coherent copies by tens of modes: at least 32, holding all but of the trace. The modes are refreshed every 50 steps during Adam and held fixed within each L-BFGS polish, step (b)3 (Fisher coherence columns: trace , §S16). Within a polish the eigenvector coefficients are frozen, so each mode is a fixed combination of the analytic copies. Gradients in are exact, since leaves the Gram matrix unchanged; gradients in , , are those of the frozen basis, corrected at each refresh. The modes have unit total intensity on the window. Shift each mode to by a phase ramp.
Multislice. For : multiply by , band-limited to 2/3 of Nyquist, and propagate with (Eq. (2)). Modes are stacked along the batch axis. Cost: FFTs of size per mode, position and configuration, per position.
Detector. Apply the descan ramp to (g in pixels times 1.666 mrad/Å) on a 50 Å window, twice the detector’s conjugate cell, so its wrap at the window edge costs less than 0.02 in per pattern at the fitted g. Take , sum the weighted modes and average the patterns, integrate over each detector pixel (exact integration at bin 2; bin 3 agrees to ), convolve with the Gaussian PSF (variance fitted; 0 on the 25 mrad data), scale by and add , held in (Eq. (12)). A smooth floor of electrons keeps . Read noise is not in the fitted model (see §§S12 and S14). Cost: per position.
(b) Fitting.
Initialize detector and scan parameters from a pixel fit with the same instrument model. Atoms start from the lattice, widths from a shared value per species.
Adam on mini-batches of 32–512 training positions with a cosine learning-rate schedule (60 epochs by default), for fits from a coarse start; refits from a converged fit go straight to the polish. Loss: Eq. (5) over , and the detector pixels inside the band-limited disc, plus Gaussian priors (atom displacements 0.3 Å; scan polynomial; the aberrations , , and , with none on the defocus; , , and offsets Å. Cost per epoch: one forward and one reverse pass over , about twice step (a).
Polish: full-batch L-BFGS with a strong-Wolfe line search (history 20), in blocks of 5 iterations and segments of 20. On real data every parameter is scaled by its Fisher standard deviation from a dense Fisher matrix computed once at an earlier nearby fit; the simulated-bilayer fits scale each parameter group by a fixed constant. Up to three polish rounds are run. The probe-mode basis is frozen within a round and refreshed between rounds, until a refresh changes the objective by less than 1 nat. Stop when the squared Newton decrement is below 0.1 and every step is below 0.1 Fisher standard deviations, both on training patterns only. Here includes the priors and the prior precision. One start meets this rule (0.006, largest step 0.04 sd). The other ends at 0.18, with its largest steps 0.38 and 0.34 sd in and and at most 0.04 sd in any atom parameter. Its positions and widths are converged; its coherence widths are not.
Label exchanges. Two atoms of one species whose projected positions coincide share a column, and only the weak depth contrast of the multislice decides which layer holds which. A continuous optimizer cannot swap them: the straight path passes through the coincident configuration. The exchange screen evaluates every such swap from the current point on the training patterns near the column (one frozen probe basis, the same frozen-phonon draws before and after) and accepts improving swaps with disjoint pattern sets. An accepted set is kept only if the full training objective drops by more than a threshold per swap, both at the fitting configurations and at a phonon seed never used for scoring. The relaxed exchange test imposes a candidate swap and refits from it, keeping the swap if the refit ends lower.
Numerics: the slice loop is checkpointed, so memory is that of one slice per mode and position plus the stored slice boundaries. Waves are single-precision complex, and the likelihood is accumulated in double precision. Double precision throughout is an option, used for derivative checks. Fit state is checkpointed for restart.
Held-out protocol and score.
Split: , one position in eight, each with four training neighbors. is the rest. Baselines see only .
Neighbor rule: a held-out position takes the mean per-position parameters (offset ) of its four scan neighbors. An edge position uses the opposite neighbor in place of the missing one.
Score of Eq. (13) on the band-limited disc, with a model floor of . Report and . Cost: one forward pass over .
Fisher information, rank and error bars.
Tangents. One forward-mode pass per non-offset parameter gives a column over all training patterns. Each pattern sees only its offset , so all offset columns come from two combined passes, one per axis. This gives passes in all, where counts the non-offset parameters. A product costs one tangent and one adjoint pass (1.7 s against 1.2 s for the gradient on 4,096 SrTiO patterns, one A100).
Whiten: , every parameter in its natural unit (§S16). Remove the exact gauge directions.
Offsets: eliminate each pattern’s two offsets exactly by a Schur complement (Eq. (15)), so the remaining matrix is that of atoms and instrument.
Identifiability: factor by column-pivoted (strong rank-revealing) QR in double precision. Cost , seconds on a GPU at . The passes of step 1 dominate.
Rank: pivot is determined when .
Error bars: accumulate in double precision from the single-precision columns, scale it by its diagonal, and invert it through its symmetric eigendecomposition on the null space of the gauge constraints. The Schur complement over the instrument gives the profiled bars, and .
Misspecification: the scatter-by-pattern sandwich bars of the two species widths are 4.5 (W) and 3.2 (Se) times their Laplace bars (§S4). The ratio measures how far the species-width model is from the data.
Dose map: scales as dose, so pivot reaches sd at from the same factorization.
(e) Coverage test.
Generate expected counts from the fitted model at the measured dose (and at fractions of it).
Draw Poisson counts, and refit each redraw from the truth with the same objective (42 redraws at full dose, 47 at half, after dropping the refits that do not converge).
Compute with the Fisher sd at the truth, and tabulate the fractions within 1 and 2 sd, and mean (§§S4). Cost: one fit per redraw.
(f) Separating calibration from imaging. The parameters split into groups that a measurement determines at different doses (§S16). The instrument (aberrations, coherence, aperture, detector) and the thermal widths need a high dose, the atom positions a low one.
Calibrate: fit everything, steps (a)–(b), on a high-dose scan of an area next to the target, or of a radiation-hard specimen at the same imaging conditions. The gun (source size, energy spread), the detector, the aperture, and the second-order aberrations and transfer while the corrector is not retuned; on a second scan of
the same session the coherence widths hold only to one or two low-dose thresholds (§S16). Coma drifts negligibly over minutes and by up to about 20 nm in an hour [3]. Defocus and two-fold astigmatism drift in minutes and are refit on the target, with tilt, thickness, dose scale, background and descan. The thermal widths, a property of the material, come from a prior fit, tables or simulation. Repeating the calibration scan after the target bounds the drift.
Image: scan the target at low dose and fit only the positions, a smooth scan model, and the drifting terms of step 1, steps (a)–(b), with the calibrated parameters held fixed except one Gaussian position jitter. A Gaussian spread of probe positions adds to in quadrature. With the instrument calibration transferred, this one per-scan term catches session blur (stage vibration, drift jitter) that would otherwise widen every atom. It acts on the probe, so unlike a blur of the potential it is not degenerate with the mean of the per-atom widths.
Bound: compute the error bars of the positions, step (d), with the fixed parameters as known, and the bias a calibration error would cause.
A pixel reconstruction estimates every pixel of the object and the probe from the low-dose counts; here they determine about three numbers per atom. The bounds assume the model is right; experiments at these doses are the test.
(g) Optimizer ablation. The solver has three parts: Adam on mini-batches, a full-batch L-BFGS polish, and the scaling of parameters in that polish. On the simulated bilayer the ablation holds the model, data, start and held-out set fixed and changes only the optimizer: Adam alone for the same wall time; Adam then L-BFGS in raw units; and the production solver (Adam, then L-BFGS with per-group scales). Each arm is scored by training objective, held-out and error against truth, against wall time. Two effects are already measured. On real data, Fisher scaling decides whether per-atom widths move at all: unscaled, L-BFGS leaves 98% of the 1,702 widths within 1% of their start after 400 iterations; scaled, 66% of the interior widths move within 40 iterations and the held-out deviance falls (§S3). On the simulated bilayer, 10 Adam epochs (1.96 h) reach 3.3 pm in-plane but leave depth near its start, and the full-batch polish moves each atom toward its likelihood minimum in depth (§§S6, S11).
Exact Foldy–Lax reference
Method. The reference is Foldy–Lax multiple scattering with partial-wave T-matrices. Each atom carries the thermally smeared Peng potential of Eq. (7), tapered to zero at 7 Å, in the relativistically corrected scalar wave equation. Its phase shifts come from the variable-phase equation (fourth-order Runge–Kutta), giving a T-matrix diagonal in ,
. The optical theorem holds to nine digits, and ELSEPA [55] agrees on the same potential to in the dark field. Foldy–Lax [15, 30] then makes the wave incident on each atom of a column the beam plus the outgoing waves of all others, coupled by outgoing-to-regular translations. GMRES, preconditioned by the forward-only sweep, solves it to a residual of in 0–36 iterations; dense LU agrees to .
Back-scattering and multislice. The backward-hemisphere fraction is below over all columns for the tabulated potential (evaluated four times beyond its fit range). A Coulomb atom gives Å for W at 80 kV, and the conclusion stands. Dropping the backward coupling changes the dark-field amplitude by at most . Forward-only, the system is lower triangular, solved in one sweep: multislice with one atom per slice.
Agreement. Dark-field amplitude error of the multislice against the exact reference, relative , 80 kV, mean-field atoms unless marked, reference sampling 0.05 Å:
| column | 1 Å grid | 0.25 Å grid | slab, 0.0625 Å | eikonal-exact |
| W (2 atoms, 6.49 Å) | 3.3% | 0.61% | 0.93% | 0.18% |
| Se (4 atoms) | 1.0% | 0.30% | 0.39% | 0.17% |
| W, one static atom (), one projected slice | 2.2% (0.58% with the thermal width on) |
Table 6.
For the bilayer’s columns the multislice is accurate to 1% (0.3% eikonal). With frozen phonons at the production sampling, against abTEM, one slice per atomic plane errs by 2.7% (mean field) and 6.0% (static configurations, dark-field power 4–7% low).
Potential. The Peng et al. [50] factors are a fit. ELSEPA’s Dirac–Fock atom with a finite nucleus is the physical reference. In the dark field they differ for W by +1.6%, −3.2% and −4.8% at 80, 200 and 300 kV, and for Se by −1.0% to −1.2%. At 80 kV this error is comparable to slicing error.
Data and code
The public bilayer and simulated datasets are on Zenodo [22, 46], and the PrScO data on PARADIM (CC BY-NC-ND) [7]. The 25 mrad data are those of Zhang et al. [69]; the 18.4 mrad scan is unpublished data from the same microscope. Code will be released under a suitable research license on acceptance of the paper.
Limitations (full list)
Bounds assume the model is right. Thermal diffuse scattering and partial coherence are the remaining model errors.
Fits are slower than a learned network (minutes against seconds). The learned output is a good warm start.
The detector blur of Table S1 is an effective blur. On specimen data it can also absorb small-angle inelastic scattering, which the model omits.
Se bounds assume full occupancy. About 5% of Se sites are vacant in these samples, beam-induced at 80 kV and confined to the outer Se planes [22]. A vacancy trades against a wider Se site, so Se widths need an occupancy parameter per site (W unaffected).
Ellipse (anisotropy) bounds assume a rigid scan and a flat layer. Drift is about 1 Å per minute, i.e. 0.3 Å over a 16 s scan (0.5% of the field), and moiré corrugations bend each layer [22]. Both can mimic anisotropy. Per-region tilt and drift parameters would absorb both and are not fitted here.
Per-site widths on the public 10.3 mrad data are effective column widths. The W and sublattices are not told apart, and pairs closer than 0.4 Å merge into one column.
The simulated benchmark is static and coherent. It tests positions and the instrument model, not thermal widths, which are checked against molecular dynamics and thermometry.
Atoms are fitted only in a thin specimen (0.15 depths of field). The thick specimens (PdH, PrScO, PZT, 4.9–12.8 depths of field) are fitted with a pixel object. Thick specimens matter: specimens cut from bulk are tens of nanometers thick, and there multislice ptychography reached the lattice-vibration limit [6]. Atoms are harder there: a column holds tens of atoms, the wave channels along it, and its atoms lie ten times closer in depth than the depth of field (3.95 against 41 Å for PZT), so the counts barely fix one atom’s depth. A column must then be parameterized jointly, e.g. as a lattice with displacements.
References
- [1]Pavel V. Afonine, Billy K. Poon, Randy J. Read, Oleg V. Sobolev, Thomas C. Terwilliger, Alexandre Urzhumtsev, and Paul D. Adams. Real-space refinement in PHENIX for cryo-EM and crystallography. Acta Crystallographica Section D: Structural Biology, 74(6):531–544, 2018. 3, 21
- [2]Sang Hyun Bae, Yichao Zhang, Jeffrey Huang, He Lin Zhao, Arend M. van der Zande, and Pinshane Y. Huang. Quantitative atomic resolution electron ptychography of thermal vibrations under in situ heating. ACS Nano, 20(23):16655–16664, 2026. 2, 13, 29
- [3]Juri Barthel and Andreas Thust. On the optical stability of high-resolution transmission electron microscopes. Ultramicroscopy, 134:6–17, 2013. 30, 33DOI
- [4]Christian K. Belardi, Chia-Hao Lee, Yingheng Wang, Justin Lovelace, Kilian Q. Weinberger, David A. Muller, and Carla P. Gomes. Improving multislice electron ptychography with a generative prior. In ICCV Workshops (CV4MS), 2025. arXiv:2507.17800. 3arxiv.org/abs/2507.17800
- [5]Shuo Chen, Yijin Li, Xi Zheng, and Guofeng Zhang. Neural field-based 3D surface reconstruction of microstructures from multi-detector signals in scanning electron microscopy. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7266–7277, 2026. 3arxiv.org/abs/2508.04728
- [6]Zhen Chen, Yi Jiang, Yu-Tsun Shao, Megan E. Holtz, Michal Odstrčil, Manuel Guizar-Sicairos, Isabelle Hanke, Steffen Ganschow, Darrell G. Schlom, and David A. Muller. Electron ptychography achieves atomic-resolution limits set by lattice vibrations. Science, 372(6544):826–831, 2021. 2, 3, 4, 6, 20, 22, 23, 24, 34DOI
- [7]Zhen Chen, Yi Jiang, Yu-Tsun Shao, Megan E. Holtz, Michal Odstrčil, Manuel Guizar-Sicairos, Isabelle Hanke, Steffen Ganschow, Darrell G. Schlom, and David A. Muller. Dataset: Electron ptychography achieves atomic-resolution limits set by lattice vibrations. PARADIM, an NSF Materials Innovation Platform, 2021. CC BY-NC-ND 4.0. 6, 23, 33DOI
- [8]Tiffany Chien, Colin Ophas, and Laura Waller. Space-time implicit neural representations for atomic electron tomography on dynamic samples. In NeurIPS 2023 Workshop on Deep Learning and Inverse Problems, 2023. https://openreview.net/forum?id=jGCG2nThTr7. 3
- [9]Hyungjin Chung, Jeongsol Kim, Michael T. Mccann, Marc L. Klasky, and Jong Chul Ye. Diffusion posterior sampling for general noisy inverse problems. In International Conference on Learning Representations (ICLR), 2023. arXiv:2209.14687. 3arxiv.org/abs/2209.14687
- [10]J. M. Cowley and A. F. Moodie. The scattering of electrons by atoms and crystals. I. A new theoretical approach. Acta Crystallographica, 10:609–619, 1957. 4DOI
- [11]Benedikt Diederichs, Ziria Herdegen, Achim Strauch, Frank Filbir, and Knut Müller-Caspary. Exact inversion of partially coherent dynamical electron scattering for picometric structure retrieval. Nature Communications, 15:101, 2024. 2, 3, 5, 6, 14, 21, 22, 23DOI
- [12]Christian Dwyer and David M. Paganin. Quantum and classical Fisher information in four-dimensional scanning transmission electron microscopy. Physical Review B, 110:024110, 2024. 2DOI
- [13]Berthy T. Feng, Andrew A. Chael, David Bromley, Aviad Levis, William T. Freeman, and Katherine L. Bouman. Dynamic black-hole emission tomography with physics-informed neural fields. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 12511–12521, 2026. 3arxiv.org/abs/2602.08029
- [14]J. R. Fienup. Phase retrieval algorithms: a comparison. Applied Optics, 21(15):2758–2769, 1982. 3DOI
- [15]Leslie L. Foldy. The multiple scattering of waves. Physical Review, 67:107–119, 1945. 7, 33
- [16]R. W. Gerchberg and W. O. Saxton. A practical algorithm for the determination of phase from image and diffraction plane pictures. Optik, 35(2):237–246, 1972. 3
- [17]Lily Goli, Cody Reading, Silvia Sellán, Alec Jacobson, and Andrea Tagliasacchi. Bayes’ rays: Uncertainty quantification for neural radiance fields. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 20061–20070, 2024. 3arxiv.org/abs/2309.03185
- [18]Ming Guo and Stanley C. Eisenstat. Efficient algorithms for computing a strong rank-revealing QR factorization. SIAM Journal on Scientific Computing, 17(4):848–869, 1996. 30
- [19]Nathan Halko, Per-Gunnar Martinsson, and Joel A. Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM Review, 53(2):217–288, 2011. 30arxiv.org/abs/0909.4061
- [20]C. R. Hall and P. B. Hirsch. Effect of thermal diffuse scattering on propagation of high energy electrons through crystals. Proceedings of the Royal Society of London. Series A, 286 (1405):158–177, 1965. 13DOI
- [21]Ziria Herdegen, Benedikt Diederichs, and Knut Müller-Caspary. Thermal vibrations in the inversion of dynamical electron scattering. Physical Review B, 110:064102, 2024. 3, 21DOI
- [22]Jeffrey Huang, Yichao Zhang, Sang Hyun Bae, Ballal Ahammed, Elif Ertekin, and Pinshane Y. Huang. 3D mapping of defects and moiré corrugations via electron ptychography atomic coordinate retrieval. Science Advances, 12(19):eabe4305, 2026. 2, 4, 6, 17, 20, 22, 23, 24, 28, 29, 33, 34DOI
- [23]Daen Jannis, Christoph Hofer, Chuang Gao, Xiaobin Xie, Armand Béché, Timothy J. Pennycook, and Jo Verbeeck. Event driven 4D STEM acquisition with a Timepix3 detector: Microsecond dwell time and faster scans for high precision and low dose applications. Ultramicroscopy, 233:113423, 2022. 8DOI
- [24]Yi Jiang, Zhen Chen, Yimo Han, Pratiti Deb, Hui Gao, Saien Xie, Prafull Purohit, Mark W. Tate, Jiwoong Park, Sol M. Gruner, Veit Elser, and David A. Muller. Electron ptychography of 2D materials to deep sub-ångström resolution. Nature, 559(7714):343–349, 2018. 2, 3
- [25]Steven M. Kay. Fundamentals of Statistical Signal Processing: Estimation Theory. Prentice Hall, 1993. 6
- [26]Bernhard Kerbl, Georgios Kopanas, Thomas Leimkühler, and George Drettakis. 3D Gaussian splatting for real-time radiance field rendering. ACM Transactions on Graphics, 42 (4):1–14, 2023. 4arxiv.org/abs/2308.04079
- [27]Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015. arXiv:1412.6980. 5arxiv.org/abs/1412.6980
- [28]Earl J. Kirkland. Advanced Computing in Electron Microscopy. Springer, 3rd edition, 2020. 3, 4, 5
- [29]Jan J. Koenderink. The structure of images. Biological Cybernetics, 50:363–370, 1984. 4pubmed.ncbi.nlm.nih.gov/6477978
- [30]Melvin Lax. Multiple scattering of waves. Reviews of Modern Physics, 23:287–310, 1951. 7, 33DOI
- [31]Chia-Hao Lee, Steven E. Zeltmann, Dasol Yoon, Desheng Ma, and David A. Muller. PtyRAD: A high-performance and flexible ptychographic reconstruction framework with automatic differentiation. Microscopy and Microanalysis, 31(4):ozaf070, 2025. 3, 20, 22, 23
- [32]Aviad Levis, Yoav Y. Schechner, Amit Aides, and Anthony B. Davis. Airborne three-dimensional cloud tomography. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 3379–3387, 2015. 3DOI
- [33]Aviad Levis, Pratul P. Srinivasan, Andrew A. Chael, Ren Ng, and Katherine L. Bouman. Gravitationally lensed black hole emission tomography. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 19841–19850, 2022. 3arxiv.org/abs/2204.03715
- [34]Axel Levy, Frédéric Poitevin, Julien Martel, Youssef Nashed, Ariana Peck, Nina Miolane, Daniel Ratner, Mike Dunne, and Gordon Wetstein. CryoAI: Amortized inference of poses for ab initio reconstruction of 3D molecular volumes from real cryo-EM images. In Proceedings of the European Conference on Computer Vision (ECCV), 2022. 3arxiv.org/abs/2203.08138
- [35]Cedric Lim, Corneel Casert, Arthur R. C. McCray, Serin Lee, Andrew Barnum, Jennifer Dionne, and Colin Ophus. Missing wedge inpainting and joint alignment in electron tomography through implicit neural representations. arXiv:2512.08113, 2025. 3arxiv.org/abs/2512.08113
- [36]Dong C. Liu and Jorge Nocedal. On the limited memory BFGS method for large scale optimization. Mathematical Programming, 45(1–3):503–528, 1989. 5
- [37]R. F. Loane, P. Xu, and J. Silcox. Thermal vibrations in convergent-beam electron diffraction. Acta Crystallographica Section A, 47(3):267–278, 1991. 5DOI
- [38]Kieran Loehr, Rahim Raja, Xiaochuan Ding, Jeffrey Huang, Gillian Nolan, Sang Hyun Bae, Bryan K. Clark, and Pin-shan Y. Huang. PtyRANNOSAUR: Ptychography with robust artificial neural networks optimized for sub-ångstrom accuracy and ultrafast reconstruction. arXiv:2606.27587, 2026. 3, 20arxiv.org/abs/2606.27587
- [39]Andrew M. Maiden and John M. Rodenburg. An improved ptychographical phase retrieval algorithm for diffractive imaging. Ultramicroscopy, 109(10):1256–1262, 2009. 3DOI
- [40]Indrajit Maity, Mit H. Naik, Prabal K. Maiti, H. R. Krishnamurthy, and Manish Jain. Phonons in twisted transition-metal dichalcogenide bilayers: Ultrasoft phasons and a transition from a superlubric to a pinned phase. Physical Review Research, 2:013335, 2020. 15DOI
- [41]Krishna Mani, Nalini Singh, Tiffany Chien, Colin Ophus, and Laura Waller. AnyAtom: Domain-randomized atomic priors for electron tomography. In Optica Imaging Congress 2025 (3D, COSI, DH, IS, pcAOP, RadIT), page JW2A.18. Optica Publishing Group, 2025. 3, 21
- [42]Per-Gunnar Martinsson, Vladimir Rokhlin, and Mark Tygert. A randomized algorithm for the decomposition of matrices. Applied and Computational Harmonic Analysis, 30(1):47–68, 2011. 30DOI
- [43]Arthur R. C. McCray, Stephanie M. Ribet, Georgios Varnavides, and Colin Ophus. Deep generative priors for robust and efficient electron ptychography. arXiv:2511.07795, 2025. 3arxiv.org/abs/2511.07795
- [44]Ben Mildenhall, Pratul P. Srinivasan, Matthew Tancik, Jonathan T. Barron, Ravi Ramamoorthi, and Ren Ng. NeRF: Representing scenes as neural radiance fields for view synthesis. In ECCV, 2020. 2arxiv.org/abs/2003.08934
- [45]Garib N. Murshudov, Alexei A. Vagin, and Eleanor J. Dodson. Refinement of macromolecular structures by the maximum-likelihood method. Acta Crystallographica Section D: Biological Crystallography, 53:240–255, 1997. 2, 3, 21
- [46]Kayla X. Nguyen, Yi Jiang, Chia-Hao Lee, Priti Kharel, Yue Zhang, Arend M. van der Zande, and Pinshane Y. Huang. Achieving sub-0.5-angstrom-resolution ptychography in an uncorrected electron microscope. Science, 383:865–870, 2024. 4, 22, 33DOI
- [47]Michal Odstrčil, Andreas Menzel, and Manuel Guizar-Sicairos. Iterative least-squares solver for generalized maximum-likelihood ptychography. Optics Express, 26:3108–3123, 2018. 2, 3DOI
- [48]Gregory Ongie, Ajil Jalal, Christopher A. Metzler, Richard G. Baraniuk, Alexandros G. Dimakis, and Rebecca Willett. Deep learning techniques for inverse problems in imaging. IEEE Journal on Selected Areas in Information Theory, 1(1):39–56, 2020. 3arxiv.org/abs/2005.06001
- [49]Colin Ophus. A fast image simulation algorithm for scanning transmission electron microscopy. Advanced Structural and Chemical Imaging, 3:13, 2017. 6arxiv.org/abs/1702.01904
- [50]L.-M. Peng, G. Ren, S. L. Dudarev, and M. J. Whelan. Robust parameterization of elastic and absorptive electron atomic scattering factors. Acta Crystallographica Section A, 52(2):257–276, 1996. 4, 7, 12, 33DOI
- [51]Hugh T. Philipp, Mark W. Tate, Katherine S. Shanks, Luigi Mele, Maurice Peeman, Pleun Dona, Reinout Hartong, Gerard van Veen, Yu-Tsun Shao, Zhen Chen, Julia Thom-Levy, David A. Muller, and Sol M. Gruner. Very-high dynamic range, 10,000 frames/second pixel array detector for electron microscopy. Microscopy and Microanalysis, 28(2):425–440, 2022. 20DOI
- [52]PtychoHub. PtychoHub: The central hub for ptychography. https://www.ptychohub.com/, 2026. PdH nanoparticle challenge. Accessed 3 Nov 2026. 4, 23
- [53]J. M. Rodenburg and H. M. L. Faulkner. A phase retrieval algorithm for shifting illumination. Applied Physics Letters, 85(20):4795–4797, 2004. 3DOI
- [54]Roi Ronen, Yoav Y. Schechner, and Eshkol Eytan. 4D cloud scattering tomography. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 5520–5529, 2021. 3DOI
- [55]Francesc Salvat, Aleksander Jablonski, and Cedric J. Powell. ELSEPA—Dirac partial-wave calculation of elastic scattering of electrons and positrons by atoms, positive ions and molecules. Computer Physics Communications, 165:157–190, 2005. 7, 33DOI
- [56]Benjamin H. Savitzky, Steven E. Zeltmann, Lauren A. Hughes, Hamish G. Brown, Shiteng Zhao, Philipp M. Pelz, Thomas C. Pekin, Edward S. Barnard, Jennifer Donohue, Luis Rangel DaCosta, Ellis Kennedy, Yujun Xie, Matthew T. Janish, Matthew M. Schneider, Patrick Herring, Chiranjeevi Gopal, Abraham Anapolsky, Rohan Dhall, Karen C. Bustillo, Peter Ercius, Mary C. Scott, Jim Ciston, Andrew M. Minor, and Colin Ophus. py4DSTEM: A software package for four-dimensional scanning transmission electron microscopy data analysis. Microscopy and Microanalysis, 27 (4):712–743, 2021. 3
- [57]Zixiao Shi, Qihao Li, Himani Mishra, Desheng Ma, Héctor D. Abruña, and David A. Muller. Electron ptychography images hydrogen atom superlattices and 3D inhomogeneities in palladium hydride nanoparticles. Journal of the American Chemical Society, 147(43):39020–39025, 2025. 2, 23arxiv.org/abs/2508.11142
- [58]Nalini M. Singh, Tiffany Chien, Arthur R. C. McCray, Colin Ophus, and Laura Waller. A Gaussian parameterization for direct atomic structure identification in electron tomography. In 2025 IEEE International Conference on Computational Photography (ICCP), pages 1–10, Toronto, ON, Canada, 2025. IEEE. arXiv:2512.15034. 3, 21DOI
- [59]Mark W. Tate, Prafull Purohit, Darol Chamberlain, Kayla X. Nguyen, Robert Hovden, Celesta S. Chang, Pratiti Deb, Emrah Turgut, John T. Heron, Darrell G. Schlom, Daniel C. Ralph, Gregory D. Fuchs, Katherine S. Shanks, Hugh T. Philipp, David A. Muller, and Sol M. Gruner. High dynamic range pixel array detector for scanning transmission electron microscopy. Microscopy and Microanalysis, 22(1):237–249, 2016. 14DOI
- [60]Pierre Thibault and Manuel Guizar-Sicairos. Maximum-likelihood refinement for coherent diffractive imaging. New Journal of Physics, 14(6):063004, 2012. 2DOI
- [61]Pierre Thibault and Andreas Menzel. Reconstructing state mixtures from diffraction measurements. Nature, 494(7435):68–71, 2013. 2, 3, 5DOI
- [62]Pierre Thibault, Martin Dierolf, Andreas Menzel, Oliver Bunk, Christian David, and Franz Pfeiffer. High-resolution scanning X-ray diffraction microscopy. Science, 321(5887):379–382, 2008. 3DOI
- [63]Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Deep image prior. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 9446–9454, 2018. 3
- [64]Sandra Van Aert, Arnold J. den Dekker, Dirk Van Dyck, and Adriaan van den Bos. Optimal experimental design of STEM measurement of atom column positions. Ultramicroscopy, 90(4):273–289, 2022. 2
- [65]Wouter Van den Broek and Christoph T. Koch. Method for retrieval of the three-dimensional object potential by inversion of dynamical electron scattering. Physical Review Letters, 109(24):245502, 2012. 5
- [66]Georgios Varnavides, Stephanie M. Ribet, Steven E. Zeltmann, Yue Yu, Benjamin H. Savitzky, Dana O. Byrne, Frances I. Allen, Vinayak P. Dravid, Mary C. Scott, and Colin Ophus. Iterative phase retrieval algorithms for scanning transmission electron microscopy, 2023. arXiv:2309.05250. 3arxiv.org/abs/2309.05250
- [67]Klaus Wakonig, Hans-Christian Stadler, Michal Odstrčil, Esther H. R. Tsai, Ana Diaz, Mirko Holler, Ivan Usov, Jörg Raabe, Andreas Menzel, and Manuel Guizar-Sicairos. PtychoShelves, a versatile high-level framework for high-performance analysis of ptychographic data. Journal of Applied Crystallography, 53:574–586, 2020. 3, 20
- [68]Mian Wei, Sotiris Nousias, Rahul Gulve, David B. Lindell, and Kiriakos N. Kutulakos. Passive ultra-wideband single-photon imaging. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 8135–8146, 2023. 3, 8DOI
- [69]Yichao Zhang, Ballal Ahammed, Sang Hyun Bae, Chia-Hao Lee, Jeffrey Huang, Mohammad Abir Hossain, Tawfiqur Rakib, Arend M. van der Zande, Elif Ertekin, and Pin-shane Y. Huang. Atom-by-atom imaging of moiré phasons with electron ptychography. Science, 389(6758):423–428, 2025. 2, 4, 6, 7, 15, 16, 22, 33DOI
- [70]Guoan Zheng, Roarke Horstmeyer, and Changhuei Yang. Wide-field, high-resolution Fourier ptychographic microscopy. Nature Photonics, 7(9):739–745, 2013. 3DOI
- [71]Ellen D. Zhong, Adam Lerner, Joseph H. Davis, and Bonnie Berger. CryoDRGN2: Ab initio neural reconstruction of 3D protein structures from real cryo-EM images. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 4066–4075, 2021. 3DOI
- [72]Liqi Zhou, Jingdong Song, Judy S. Kim, Xudong Pei, Chen Huang, Mark Boyce, Luiza Mendonça, Daniel Clare, Alistair Siebert, Christopher S. Allen, Emanuela Liberti, David Stuart, Xiaoqing Pan, Peter D. Nelli st, Peijun Zhang, Angus I. Kirkland, and Peng Wang. Low-dose phase retrieval of biological specimens using cryo-electron ptychography. Nature Communications, 11:2773, 2020. 2DOI




