Manuscript Offprint
arXiv:2611.12193Amortized Transport-Map Likelihoods for Hierarchical Inverse Problems with Application to Wetting
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Hierarchical Bayesian models pool measurements, but with the forward model in the likelihood every posterior evaluation costs one forward solve per cell. To reduce this cost, we introduce a simulation-based inference framework in which a triangular transport-map likelihood, trained once per design, serves every cell. We apply it to infer wetting properties from photographs of a stable hole in a thin liquid film. The hole’s radius depends, through the nonlinear Young–Laplace equation, on the contact angle and capillary length. One photograph gives rank-one information about them, so we pool many in a hierarchical model whose cells, each a substrate at one volume setting, share the apparatus geometry and the noise scale. A design fixes the number of substrates, the volume settings and the photographs per cell. The map’s posteriors agree with direct sampling of the forward model in the wetting properties at a synthetic validation design, and less closely at a larger synthetic scaling design. At the validation design, simulation-based calibration detects no departure for any parameter. There, the map needs several hundred times fewer forward-model evaluations than direct sampling with a gradient-free ensemble sampler for a single posterior, and about five orders of magnitude fewer over a calibration study of 200 posteriors. On real photographs its posterior agrees with direct sampling and is consistent with the measured radii. Trained offline, the amortized map turns new photographs into a posterior with no forward solve. It is thus a major step toward measuring wetting properties in situ without disturbing the liquid.
Key words. simulation-based inference, triangular transport maps, surrogate likelihood, hierarchical Bayesian model, simulation-based calibration, Young–Laplace equation, wetting
MSC codes. 62F15, 62G07, 62P35, 65L09, 76D45
1 Introduction
The contact angle and the surface tension characterize the wetting behavior of a liquid film on a substrate. They govern whether a liquid spreads on a solid surface, coats it or dewets from it. Measuring these wetting properties inside a running process, such as coating or inkjet printing, needs a method that leaves the liquid undisturbed. As an example, a thin liquid film on a superhydrophobic substrate can hold a stable circular defect, and a camera photographs this hole in the liquid film from above without contact with the liquid. The equilibrium shape of the film follows the Young–Laplace equation, and earlier work established when a hole is stable [41, 28]. The radius of the hole, one scalar per photograph, depends on the contact angle of the substrate and on the liquid’s capillary length, which combines its surface tension with its density and gravity. The inverse problem of this paper is therefore to infer the contact angle and the capillary length, together with their uncertainty, from measured radii accurately and at low computational cost. Our previous work provides the experimental data and a first Bayesian model, whose posterior was approximated by variational inference [7]. A Bayesian formulation answers an inverse problem with a posterior distribution, which quantifies the uncertainty of the inferred parameters [39].
In our case one photograph informs the inputs of the Young–Laplace model along a single direction only, so photographs at several volume settings and of several substrates must be combined. A hierarchical model pools the photographs systematically [18]: parameters of each substrate, such as its capillary length, are drawn from a common population, and parameters such as the noise scale are shared by every photograph. With the forward model in the likelihood, every evaluation of the posterior of such a hierarchical model costs one forward solve per cell (one substrate at one volume setting), and a chain needs many evaluations. The cost of inference therefore grows with the cost of the forward model. Simulation-based inference moves the forward solves out of the sampler: it learns from simulations run before inference [13]. Drawn from a fixed training distribution, the simulations are independent of each other and can run in parallel. In our case, a design fixes the number of substrates, the volume settings and the number of photographs per cell. Because a learned likelihood takes the parameters of one cell, one fit per design is the likelihood of every cell of that design.
A neural density estimator can learn such a likelihood [32]. For hierarchical models, neural posterior estimation has been adapted by conditioning on the global parameters [36], and amortized posterior estimation has been applied to real data [21]. Learned likelihoods have been shared across the subjects of a hierarchical model [15] and, as a normalizing flow sampled by Hamiltonian Monte Carlo, across the supernovae of a cosmological one [8], both on synthetic data. Triangular transport maps [29] have given simulation-based posteriors [5], also for a model of block-copolymer self-assembly [4]. A simulation-based likelihood has been built from triangular maps as an explicit conditional density [37]. Transport maps have accelerated likelihood-based inference [34], also on experimental data [30]. A triangular map can be parametrized to suit the available data and the complexity of the distribution, has tractable derivatives, and evaluates a normalized density and the conditionals of that density [35]. A likelihood built from such a map therefore has an analytic gradient in the parameters.
We are not aware of a transport-map likelihood learned from simulations and shared across a hierarchical model of real physical measurements. We therefore introduce a framework for simulation-based inference in hierarchical inverse problems, in which an amortized transport-map likelihood, trained once per design, serves every cell. We test it on synthetic datasets and demonstrate it on the Young–Laplace problem with real measurements. Direct sampling of the forward model stays feasible in the present problem, which gives a reference for testing the map, alongside simulation-based calibration. We find that the map’s posteriors agree with direct sampling on real photographs and, in the wetting properties, at a synthetic validation design, and less closely at a larger synthetic scaling design. At the validation design they pass simulation-based calibration, and the map needs several hundred times fewer forward-model evaluations than direct sampling with a gradient-free ensemble sampler for a single posterior. Every further posterior at the same design adds no forward solve, which makes simulation-based calibration of the hierarchical model affordable. We expect the framework to extend to problems in which direct sampling is infeasible, with non-Gaussian noise or a more expensive forward model, provided the map stays accurate as the number of cells grows.
Section 2 describes the measured radii from earlier laboratory experiments [7], the Young–Laplace model, the observation model and the reduced-order model. Section 3 shows why one photograph is not enough and builds the hierarchical Bayesian model and the designs of the simulation studies. Section 4 constructs the map’s likelihood, its training on re-noised forward solves, the posterior sampling and the cost comparison. Sections 5 and 6 test the map in simulation studies, against direct sampling and by simulation-based calibration, and section 7 applies it to the measured radii.
2.1 The measured data
We reuse the photographs of the static film from our previous experiments and the radii reported there [7]. A superhydrophobic substrate is clamped in a circular basin whose wall ends in a sharp edge, the knife edge, which pins the rim of a TiO2–water film about thick. A gas jet ruptures the film at its centre, and the film retracts to a stable circular dry patch, the hole. A syringe pump sets the dispensed liquid volume in the basin ( is that volume minus the fixed volume below the knife edge). Adding liquid shrinks the hole until it collapses. A camera above the basin photographs the film, and an adaptive intensity threshold gives the hole radius.
We use the measurements of three substrates, one per day, so substrate and day are aliased. Each substrate enters at two volume settings. We call one substrate at one volume setting a cell and use one photograph of the static film per cell. Figure 2.1(a) shows the static radii analysed here.
(a) measured radii
(b) geometry
r$$z$$\alpha$$s=0$$s$$\phi$$R=\min r$$z_{k}$$r_{k}$$V
Figure 2.1: The data and the geometry. (a) Measured hole radius against the liquid volume , net of the volume below the knife edge, for the six cells used: three substrates at two volume settings. Marker shape and colour identify the substrate. Lines, as an illustration: the full boundary-value solve for each substrate at the posterior means of direct sampling, drawn up to the largest volume, where the hole closes (). (b) Schematic meridian geometry of the pinned film. The interface leaves the substrate at the contact angle , is described in arc length by its local inclination , and is pinned at the knife edge . The shaded region is the liquid volume . The fixed volume below the edge lies outside the drawing. At a large contact angle the interface overhangs (exaggerated here), so the observed radius lies above the substrate. The layout follows Fig. 3(a) of [7], the same apparatus.
2.2 Young–Laplace model
The equilibrium shape of the film, including the stable hole, follows the Young–Laplace equation [28, 7]. Because the knife edge pins the film along a circle and the hole is circular, we take the interface as axisymmetric. Its meridian profile is described by the arc length and the local inclination (Fig. 2.1(b)). The profile balances surface tension against hydrostatic pressure,
with surface tension , mass density and gravitational acceleration . The profile leaves the substrate at the contact angle and ends at the knife edge : , , and , with the length of the profile. The liquid volume enters through the constraint . The contact-line radius , the length and the Laplace pressure at the substrate are unknown. We solve this nonlinear boundary-value problem with a collocation solver at a given contact-line radius , which returns , and the profile, and find by a root search that meets the volume constraint. Surface tension, density and gravity enter the radius only through the capillary length , so they cannot be inferred separately. The forward model therefore takes the inputs .
2.3 Observation model
The camera sees the hole from above, and at a large (hydrophobic) contact angle the interface overhangs. The observed radius is therefore the smallest radius of the profile, and the observation operator is . We model a photograph as returning the radius with an additive Gaussian error,
where the noise scale is shared by all photographs and inferred with the other parameters. It absorbs what the forward model does not describe: the scatter of the threshold between photographs, the variability of the procedure between runs, and the mismatch between the Young–Laplace model and the film. The errors of the dispensed volume and of the knife-edge position enter the model as parameters of their own.
2.4 Reduced-order model
Direct sampling and the training of the transport-map likelihood both call the forward model many times. To reduce the cost of these calls, we replace the boundary-value solve by a reduced-order model. It only has to be accurate over the inputs that inference and training visit, and we use a standard construction. The reduced-order model expands in the eight leading modes of a proper orthogonal decomposition [9], computed from full boundary-value solutions. A least-squares solve fits their coefficients, together with , and , to the residual of Eq. 2.1 at interior collocation points, the boundary conditions and the volume constraint. A radius exists only where a stable hole exists: beyond a volume that depends on the other inputs, the hole closes. The reduced-order solve fails increasingly often as closure approaches, so we also bound the liquid volume of a cell below . The inputs at which a stable hole exists and lies below form the domain of the forward model. Off its training grid, the reduced-order model agrees with the full solve in to within about one percent up to . From to , across the domain bound and into the largest volumes of the training draws, the median difference is and the largest about three percent (section SM1).
3 Hierarchical Bayesian model
3.1 Information in the photographs
Consider one cell with the five shape parameters and one photograph . Under Eq. 2.2, its Fisher information in the shape parameters is , the outer product of the forward-model gradient with itself [42], which has rank one wherever . The unknown noise scale is orthogonal to the shape parameters [12] and leaves this information unchanged. A photograph therefore informs only along and leaves the level set uninformed. With , and held, that level set is a curve in the plane of contact angle and capillary length. A photograph at a second volume gives an additional curve. The larger the angle at which the two curves cross, the more information the second photograph adds. Unfortunately, in Fig. 3.1(a), computed with the reduced-order model, the curves at the three larger volumes of the validation and real-data designs nearly coincide. Two photographs at and pin the position across the curve about 270 times more tightly than the position along it, and two at and about 46 times more tightly. Both ratios compare standard deviations, with in units of and in units of , the prior widths of and of the population mean of the capillary length, and they hold even with the volume and the knife edge known. Therefore the photographs of one substrate inform mainly one combination of contact angle and capillary length.
Because the substrates share the liquid, their capillary lengths are nearly equal, and their photographs can be pooled. With a capillary length of its own, every substrate adds a weak direction, and the photographs determine neither a contact angle nor the difference between two of them. Tying their capillary lengths together collapses the weak directions into a single shared one: raising the capillary length and lowering every contact angle to match leaves all radii nearly unchanged. For three substrates at the reference point and the real-data volumes, the information has three weak directions when each substrate has its own capillary length, and one when they share it (section SM2). The photographs then fix the contact angles up to this one direction: once one of them is known, so are the others (Fig. 3.1(b)). Because uncertain volumes and knife-edge coordinates can only lower this information, the weak directions remain in the full model. Pooling alone thus leaves one weak direction, and an informative prior on the capillary length fixes it. We therefore use a Bayesian hierarchical model, which combines pooling with prior knowledge.
Figure 3.1: (a) Iso-radius curves of the reduced-order model at the volumes of the validation and real-data designs, with 40\text{,}\mathrm{mm} and $z_{k}=$5\text{\,}\mathrm{mm} held. is the radius at the reference point 150\text{,}\mathrm{\SIUnitSymbolDegree}2.7\text{,}\mathrm{mm} (dot), so every curve passes through it. The curves at the three larger volumes nearly coincide. (b) Contact angles of two substrates consistent with one noise-free photograph each at the smaller real-data volume, for true contact angles 135\text{,}\mathrm{\SIUnitSymbolDegree}150\text{,}\mathrm{\SIUnitSymbolDegree} (dot) and a capillary length of . Box: each substrate has a capillary length of its own, within one prior standard deviation of around . Dashed: partial pooling, the two capillary lengths differ by at most , the scale of the prior on their spread . Curve: the substrates share one capillary length exactly.
3.2 Hierarchy and designs
We infer all parameters jointly by Bayes’ rule, [18]. Substrates are indexed by , volume settings by and the photographs of one cell by (Fig. 3.2). Cell has the forward-model inputs , with the nominal volume of setting , net of like , and its volume error. Under Eq. 2.2, the likelihood is a product over substrates, volume settings and photographs,
Each substrate-liquid combination has its own contact angle and capillary length . The capillary lengths are partially pooled through a population mean and a spread . Each substrate was measured on its own day, and the properties of the liquid can differ slightly between days, for example through temperature or humidity. The spread lets the capillary lengths differ, and its prior keeps the difference small. This partial pooling lies between a capillary length of its own for each substrate and one shared by all, the limit [18] (Fig. 3.1(b)). The volume errors are partially pooled through a spread about a global offset . A population mean of the volume error would enter the forward model only through its sum with , and absorbs it. Both pooled quantities take the non-centred parametrization,
with standard normal latents and . This parametrization counters the funnel geometry of hierarchical posteriors [6].
\sigma_{l_{c}}\;(\mathrm{mm})$$\sim\text{half }\mathcal{N}$$\mu_{l_{c}}\;(\mathrm{mm})$$\sim\mathcal{N}$$\sigma_{\Delta V}\;(\mathrm{mL})$$\sim\text{half }\mathcal{N}$$\Delta V_{k}\;(\mathrm{mL})$$\sim\mathcal{N}$$r_{k}\;(\mathrm{mm})$$\sim\mathcal{N}$$z_{k}\;(\mathrm{mm})$$\sim\mathcal{N}$$\sigma_{\text{exp}}\;(\mathrm{mm})$$\sim\text{half }\mathcal{N}$$z_{l_{c},i}\;(-)$$\sim\mathcal{N}$$l_{c,i}\;(\mathrm{mm})$$\alpha_{i}\;(^{\circ})$$\sim\mathcal{N}$$\Delta V_{j}\;(\mathrm{mL})$$z_{\Delta V,j}\;(-)$$\sim\mathcal{N}$$R_{ij}\;(\mathrm{mm})$$y_{ijm}\;(\mathrm{mm})Substrates Volume settings Photographs Cell
Figure 3.2: Hierarchical Bayesian model as a generative model of the photographs, with , as in Eq. 3.1. The knife-edge coordinates , the offset and the noise scale are shared by every cell. The contact angle and the capillary length belong to substrate , and the volume error to volume setting . Cell lies in both plates, where their tints overlap, and holds the radius and the photographs . The capillary length and the volume error are partially pooled. Ellipses are sampled, rectangles are deterministic given their parents, and the shaded ellipse is observed.
We use three designs. The validation design has two substrates at two volume settings, with nominal volumes of and , and five photographs per cell. At this design we test the map against direct sampling, by simulation-based calibration, under skewed noise and with a smaller training set. The scaling design has three substrates at six volume settings, equally spaced from to , and five photographs per cell. With 18 cells against the validation design’s four, it tests the map on a larger hierarchy. Both designs are synthetic. The real-data design is the layout of the measured cells of subsection 2.1, with one photograph per cell.
Table 3.1: Priors of the hierarchical model. Level says what each parameter is constant over. Normal entries give the mean and standard deviation, and the half-normal entries give scales.
| Parameter | Level | Prior |
|---|---|---|
| global | 2.7\text{,}\mathrm{mm}0.1\text{,}\mathrm{mm} | |
| global | half-normal, scale | |
| per substrate | ||
| per substrate | 150\text{,}\mathrm{\SIUnitSymbolDegree}15\text{,}\mathrm{\SIUnitSymbolDegree} on 0\text{,}\mathrm{\SIUnitSymbolDegree}180\text{,}\mathrm{\SIUnitSymbolDegree} | |
| global | half-normal, scale | |
| per volume setting | ||
| global | 40\text{,}\mathrm{mm}0.333\text{,}\mathrm{mm} | |
| global | 5\text{,}\mathrm{mm}0.333\text{,}\mathrm{mm} | |
| global | 0.5\text{,}\mathrm{ml} | |
| global | half-normal, scale | |
| global | fixed at |
3.3 Priors
Table 3.1 specifies the priors. On one sample substrate, the advancing and receding contact angles of the coating are and [7, Suppl. Mat.]. Goniometry scattered and drifted as the coatings aged, while they stayed hydrophobic. The prior on the contact angle is therefore a generous normal distribution about . The priors on the knife-edge coordinates are centred at their nominal values and read the milling tolerance of as three standard deviations. The volume below the knife edge (subsection 2.1) is computed from the technical drawing of the knife edge; it depends on without a closed form, and absorbs that uncertainty. The prior on is informative: the measured surface tension of the dispersion, [7, Suppl. Mat.], gives, with the density of the dispersion at , a capillary length of about , inside the prior’s width of around . The prior on is weakly informative [17].
4 Amortized transport-map likelihood
4.1 Triangular maps as conditional densities
We replace each factor of Eq. 3.1 by a surrogate likelihood learned from forward-model simulations [32]. A transport map pushes a distribution forward to a reference distribution, here the standard Gaussian [29]. We order the inputs of one cell, and , before its datum and take the triangular (Knothe–Rosenblatt) map
Its last component , the lower block of the map [35], describes the datum given the inputs. We call it the likelihood component. The integrated rectifier of Baptista et al. [5] makes it increase in at fixed inputs and therefore invertible in . A change of variables then gives an explicit conditional density, the surrogate likelihood
If pushes the joint distribution of inputs and datum to , this density is the conditional of that joint [35]. Fitting minimizes the Kullback–Leibler divergence between the pushforward of the training distribution and . This objective separates into one term per component, and each term depends on the coefficients of its own component alone [5, 35]. The lower block alone then gives the conditional density [4], and we fit only .
4.2 A likelihood component with an exact noise scale
The inputs of the likelihood component include the noise scale, because every cell shares it and the posterior infers it. The noise in Eq. 2.2 is Gaussian, and the component should learn this from the simulations without assuming it. We work in variables normalized by moments of the training set: the shape parameters become and the log noise scale , with . The datum becomes , with and the mean and standard deviation of the training data. A standard likelihood component applies the integrated rectifier to a polynomial . It gives , with a positive rectifier . It takes only through , and its slope in is . The Gaussian density is exact only if this slope equals , that is, if . For SoftPlus, approaches for large , and this target grows like , exponentially in , as . The derivative of a polynomial grows at most polynomially in . A standard component of fixed order therefore cannot be exact for every noise scale. A standard component fitted to the training solves of our maps, with one noisy radius per solve, misplaces the noise scale at all three designs, by up to about six direct posterior standard deviations, and fails simulation-based calibration in it at both designs tested, the validation and real-data designs (section SM8).
Our observation model scales the noise of the simulator by exactly. We therefore let the noise scale enter the likelihood component in normalized units, , as an exact coordinate with a learned correction, outside the rectifier (Fig. 4.1(a)). This follows Lueckmann et al., who choose the output form of a learned likelihood from what is known of the simulator [27], and the normalizing-flow model of camera noise of Abdelhamed et al., which uses an exact noise scale with a learned correction [1]. The likelihood component then becomes
whose shift and exponential scale take the affine form of masked autoregressive flows [31]. Here is a Hermite expansion of total order three for the mean, and a correction of total order two to the width, both orders fixed before training. The monotone component uses the SoftPlus rectifier, has total order three in and is built with the software package MParT [33]. Using Eq. 4.1, the log-likelihood is then
The correction lets the width depart from , and lets the shape depart from the Gaussian. Both are fitted to the simulations in training and stay fixed during inference. Unlike the camera gain of Abdelhamed et al., which is a known setting with one learned factor per discrete gain level, our noise scale is an unknown parameter of the posterior, and the correction is a function of all inputs. Unlike the output forms of Lueckmann et al., which are fixed in advance when the noise model is known, the Gaussian form here is only where training starts. The Gaussian density can be recovered as a special case with and the identity, in which Eq. 4.2 becomes , exact at every noise scale.
4.3 Training on re-noised forward solves
(a)y_{n}$$(y-\mu_{y})/s_{y}$$\bm{\theta},\ \sigma_{\text{exp}}normalizeshiftscalemonotoneB(\bm{x},r)$$\mathcal{T}_{y}fit: {\sim}\,\mathcal{N}(0,1)$$r$$\bm{t}$$\ell,\ \bm{x}$$\bm{x}$$\bm{t}, , \ell$$a: Hermite, order 3 exact;: Hermite, order 2: MParT,SoftPlus, order 3 likelihood component , the last component of the map(b) rows forward solve , once (\sigma^{(n,1)},\varepsilon^{(n,1)})$$(\sigma^{(n,2)},\varepsilon^{(n,2)})$$(\sigma^{(n,3)},\varepsilon^{(n,3)})$$(\sigma^{(n,4)},\varepsilon^{(n,4)}) , rows one map: of (a), fit per solve once, before sampling(1,1)$$(1,2)$$(2,1)$$(2,2)$$(i,j)$$\cdots posterior sampling: the same map at every cell and step, no forward solve
Figure 4.1: The amortized transport-map likelihood. (a) The likelihood component. The inputs are normalized to , and (subsection 4.2). The normalized datum is shifted by the learned mean and scaled by , in which is exact and is a learned correction. The monotone SoftPlus component , built with MParT, then gives , and the fit drives it toward a reference standard normal. The polynomials and are Hermite expansions. (b) Amortization. Each forward solve is reused under draws of noise scale and noise, and the coefficients of , and in (a) are fitted to the resulting training set. During posterior sampling the fitted likelihood component is evaluated at every cell without a forward solve.
We train one map per design of subsection 3.2, each on its own training draw of parameter rows from a training distribution . In the contact angle and the capillary length, is the marginal that the prior implies for one cell. In the knife-edge coordinates and the volume, is broader than the prior. The reduced-order model solves each row once, and rows for which it returns no radius are discarded. Each solve is reused times under fresh noise (Fig. 4.1(b)), similar to [14, 20]. Each reuse draws , independently of , from a mixture of a half-normal and a log-uniform distribution. It then sets with . The training distribution thus factorizes as , with the observation density of Eq. 2.2. Up to a constant, the likelihood component’s term of the Kullback–Leibler objective is the expectation of under this distribution [5, 35]. As for sequential neural likelihood [32], this expectation is
with independent of the map. The training distribution enters Eq. 4.4 only as a weight, which lets it differ from the prior: the volumes of each training draw can concentrate on the volume settings of its design. The mixture is part of the weight, with a density that is positive on all of and covers the support of the prior on . No hyperparameter of the hierarchy enters Eq. 4.4, and every cell shares the observation density of Eq. 2.2, so one fit is the likelihood of every cell. By linearity of expectation, reusing each solve under noise draws keeps the target of Eq. 4.4 and, at a fixed number of solves, lowers the variance of its Monte Carlo estimate.
We minimize that estimate, the mean of over the training rows, plus a small ridge penalty, with L-BFGS-B [10]. For fixed and , fitting is the standard problem for a monotone component in . For the SoftPlus rectifier, Baptista, Marzouk and Zahm prove that the local minima of this problem are global when it is posed over a function space [5]. To the best of our knowledge, the fit of finite order has no such guarantee, nor does the joint fit of , and . The fitted map can therefore depend on where training starts. Training starts at the Gaussian special case of subsection 4.2 (, the identity, fitted by least squares), and and learn their departures from it. Each map is fitted once from this start.
4.4 Posterior sampling
The log posterior of the hierarchical model is the log prior plus the surrogate log-likelihood of every photograph,
with each term from Eq. 4.3 and the inputs of each cell assembled through Eq. 3.2. The No-U-Turn sampler [22] draws from Eq. 4.5 without a forward solve, with its analytic gradient obtained by the chain rule through the polynomials of the map, the normalization and the non-centred parametrization. This gradient agrees closely with central finite differences, and section SM3 gives the check and the settings of the map, its training and the sampler. The chains of the map reach a rank-normalized potential scale reduction factor [43] for every parameter at the chain lengths we use. As a numerical safeguard, a proposal at which Eq. 4.3 is not finite is rejected. Beyond hole closure and above the volume bound, the reduced-order model returns no radius, and the training set has no rows there. The map’s likelihood stays finite at those inputs, extrapolated from the training rows, so the surrogate posterior can place mass where direct sampling has zero density.
We count cost in forward-model evaluations, one reduced-order solve at one cell, a measure of running time where forward solves dominate it [11]. Direct sampling solves the forward model at every cell whenever it evaluates the likelihood, for every posterior. The map pays the forward solves of its training draw once, and its posteriors need none. We compare the two at a bulk effective sample size [43] of 200 for the slowest parameter of a posterior. Wall-clock time also depends on the implementation and the hardware, and we report it as a secondary measure under the conditions of Table SM14.
5 Agreement with direct sampling
Sections SM3 and SM4 give the chain lengths and the convergence of every chain of this section, and section SM5 its values for every parameter and map.
5.1 The reference and the measure
Direct sampling evaluates the likelihood of Eq. 3.1 with the reduced-order model of subsection 2.4, one solve per cell for each walker of an ensemble sampler [19, 16] at every step. The same reduced-order model generates the map’s training data, so direct sampling has none of the map’s approximations. The error of the reduced-order model enters both posteriors alike, and on real photographs the noise scale absorbs it. The direct chains reach for every parameter at the chain lengths we use, as do those of the map (subsection 4.4). Two checks with known answers, a coordinate that enters no likelihood and a direction along which the likelihood is constant, reproduce their predicted posterior standard deviations closely in the direct chains. The cost of direct sampling per posterior is the number of steps times the number of walkers times the number of cells.
Albert et al. compare samplers by the Wasserstein-1 distance between the marginal of each parameter and that of a reference posterior, in parameters scaled to the unit cube [2]. We compare the map’s posterior with that of direct sampling by the same distance, divided by the standard deviation of the direct marginal, . This ratio measures a difference in units of the posterior’s own uncertainty: if two marginals differ only by a shift, equals that shift in direct posterior standard deviations. As a reference level, the split-half level, we compute the same ratio between the first and second half of the direct sample and take its maximum over the parameters of a design. This level serves as the reference for the sampling variation of direct sampling, and we read against it.
5.2 Agreement at two synthetic designs
We first test the map on synthetic data, generated by the reduced-order model and Eq. 2.2 at a known ground truth. The model of the data is then exact, and a difference between the posteriors of the map and of direct sampling beyond the sampling variation comes from the map. At the validation design of subsection 3.2, the reduced-order model gives the radii at the ground truth, and Eq. 2.2 adds noise of scale 0.4\text{,}\mathrm{mm}$$. At the scaling design, one synthetic dataset is drawn in the same way at its own ground truth, also at . Direct sampling and the map condition on the same dataset at each design. To see how far the result depends on the training draw, after the map of subsection 4.3 was fixed, we trained three replicate maps per design, each on an independent training draw made in the same way, with as many rows with a radius.
Figure 5.1 shows the pairwise joint posteriors of , the contact angles, , and the noise scale at the validation design, with the marginals on its diagonal. The strongest correlations lie between the two contact angles and between and , with coefficients of 0.63 and 0.56 under direct sampling and 0.62 and 0.54 under the map. The contact angles correlate negatively with ( and under direct sampling) and positively with each other, as the weak direction of subsection 3.1 implies. Over all 78 pairs of parameters, the correlation coefficients differ from those of direct sampling by at most 0.14, between and the noise scale, with a median of 0.01. Section SM5 shows the joint posteriors at the scaling and real-data designs.
Figure 5.1: Pairwise joint posteriors at the validation design. Shaded: direct sampling, the regions holding and of the draws. Contours: the map, at the same fractions. Diagonal: the marginals, with direct sampling shaded, the map as a solid line and the prior as a dashed line.
(a) posterior marginals
(b) agreement with direct sampling
Figure 5.2: Agreement with direct sampling at the two synthetic designs. (a) Posterior marginals of the population mean of the capillary length, the contact angles and the noise scale at the scaling design; the diagonal of Fig. 5.1 shows the validation design. Section SM5 shows every parameter. Shaded: direct sampling. Solid line: the map. Dashed line: the prior. (b) between the map’s and direct sampling’s posterior marginals, per parameter. Markers: the map. Bars: the range over the map and its three replicate maps. Dashed line: between the two halves of the direct sample, maximized over the parameters. A half holds half the draws, so this line overstates the sampling variation of the full comparison.
Figure 5.2(a) overlays the map’s marginals on those of direct sampling for the population mean of the capillary length, the contact angles and the noise scale at the scaling design. At both designs the marginals coincide closely for every parameter except the noise scale and, at the scaling design, . The posterior of the noise scale sits higher under the map at both designs, by about two thirds of a direct posterior standard deviation at the validation design and three quarters at the scaling design. At the scaling design, is shifted upward under the map by about half a direct posterior standard deviation (). Every other parameter lies within a few times the split-half level.
The replicate maps keep every parameter other than the noise scale within at the validation design. At the scaling design they place the contact angles at up to 0.62, further from direct sampling than the map (Fig. 5.2(b)). In all eight maps of the two designs, the posterior mean of the noise scale lies above that of direct sampling. Along the principal directions of the direct posterior in the contact angles and capillary lengths, the four maps differ from direct sampling by at most at the validation design. At the scaling design all four shift the posterior mainly along one such direction, a combination of contact angles and capillary lengths, by 0.48 to 0.82 direct posterior standard deviations, and by 0.29 to 0.41 along the widest direction. For three of the four maps the shift along the main direction exceeds of every marginal other than the noise scale. At the scaling design, pooling the draws of the four maps gives of at most 0.45 outside the noise scale, against 0.54 for the map alone, and moves the largest marginal departure from to a contact angle. At both synthetic designs, none of posterior draws of the map lies where the reduced-order model returns no radius, so this comparison is free of the extrapolation of subsection 4.4.
The map’s posterior thus agrees with direct sampling at the validation design, apart from the shift of the noise scale. On the larger hierarchy of the scaling design it agrees less closely, and every replicate map shares its shift, mainly along one combination of contact angles and capillary lengths.
5.3 The learned noise model
The likelihood component learns the width and the shape of the noise from the simulations (subsection 4.2). To see what this costs when the noise is Gaussian, and what it gains when the noise is not, we compare it with its Gaussian special case, and the identity, which assumes Gaussian noise and is fitted on the same training draw. On the Gaussian data of subsection 5.2, the special case agrees more closely than the map in the noise scale, with of 0.17 and 0.04 at the validation and scaling designs, and in at the scaling design. In the other parameters the two components differ from direct sampling by comparable amounts, each at most 0.3. Along the combination of contact angles and capillary lengths that the learned maps share at the scaling design, one fit of the special case reaches , against 0.48 to 0.82 (Table SM10). At the validation design its largest value along these directions, 0.23, lies above those of the learned maps, 0.15 to 0.21. On this Gaussian testbed, the shift of the noise scale comes mostly from learning the width and shape. At the validation design the shift persists as the training draw grows from 250 to about rows. At the map’s posterior draws, the mean of the likelihood component differs from the reduced-order radius by under 0.8 noise scales in every cell but one, where the reduced-order solve returns a second, much smaller root.
We repeated the validation design with skewed noise, for which the special case assumes the wrong law. The noise follows a standardized sinh-arcsinh law [25] of skewness 1.0, so that remains the noise scale. Both components are fitted to the same forward solves re-noised with that law, against direct sampling with the exact skewed likelihood. The test covers one law, one dataset at this design and one training draw per component. The Gaussian special case places the noise scale about one posterior standard deviation low (). The learned component agrees to 0.25, about twice the split-half level. The special case places the noise scale near the realized standard deviation of this dataset’s noise, about two thirds of the law’s, so the size of its departure may depend on the dataset.
Learning the noise model thus shifts the noise scale on Gaussian data, and under the one skewed law tested it brings the noise scale closer to direct sampling than the Gaussian special case does.
5.4 Cost of one posterior
We compare the map with direct sampling for a single posterior, the case least favourable to the map. Counting cost as in subsection 4.4, we price direct chains at the validation design that stop at the effective sample size given there. Their length is extrapolated linearly from the direct chain of subsection 5.2. These chains need about times as many forward-model evaluations as the map’s training draw, or with their burn-in left uncounted. At the chain lengths of direct sampling, the ratio is to over the three designs of subsection 3.2. In wall-clock time, under the conditions of Table SM14, the map is about twice as fast as direct sampling for one posterior. In process-hours its advantage is an order of magnitude larger. The baseline is a gradient-free ensemble sampler, so these ratios include the difference between the two samplers as well as the forward solves the map removes. A smaller training draw lowers the map’s cost further. At the validation design, a map trained on 250 rows agrees with direct sampling within the range spanned by the four full-budget maps of Fig. 5.2(b), for every parameter. At the real-data design, a map trained on 250 rows also agrees closely, within for every parameter.
Even for a single posterior and against this baseline, the map thus needs several hundred times fewer forward-model evaluations than direct sampling, and every further posterior at the same design adds no forward solve.
6 Calibration
6.1 Simulation-based calibration
We test the calibration of the surrogate posterior over many datasets drawn from the prior, by simulation-based calibration [40]. Each replication draws a ground truth from the prior, simulates a dataset by Eq. 2.2, samples the posterior and records the rank of the truth among posterior draws. Under calibration, the rank of each parameter is uniform on . Per parameter, we apply a chi-squared test on ten bins and a Kolmogorov–Smirnov test. A parameter departs from uniformity when either -value falls below the Bonferroni correction , with the number of parameters in the study. We also apply the ECDF test of Säilynoja et al. [38], which compares the empirical distribution function of the ranks with simultaneous binomial bands, at the same level. A study needs one posterior per replication, which makes it costly with direct sampling. With one trained map for every posterior, it costs only the forward solves of the map’s training draw plus one solve per cell per accepted dataset.
Our studies test the surrogate posterior as a whole, the map and the hierarchical model together. We sample the map’s posterior of Eq. 4.5 and use posterior draws, the effective sample size of subsection 4.4. The draws are equally spaced in the pooled draws of the four chains. A replication enters when the smallest bulk effective sample size over its parameters reaches , and replications that do not finish within a wall-clock cap are left out. Every replication that enters also meets the limit of subsection 4.4. A ground truth is redrawn when some cell of its dataset lies outside the domain of subsection 2.4, so the study covers that domain. Section SM3 gives the caps, section SM4 the of the replications, and section SM6 the statistics of every study, including the verdicts without the convergence gate.
6.2 Results at the two designs
We ran the study at the validation design, where the map agrees with direct sampling in the wetting properties (subsection 5.2), and at the real-data design, the design of the measured radii. At the validation design of subsection 3.2, we ran 200 replications with the map of subsection 4.3. All but four finish within the cap, and every replication that finishes passes the convergence gate. The four capped replications have the four smallest true noise scales of the study, and they change no verdict. The rank histograms of all 13 parameters stay inside their bands in every bin (Fig. SM6; Fig. 6.1 shows , the contact angles and the noise scale), and neither rule finds a departure for any parameter.
At the real-data design, we ran two independent studies of 200 replications each, of which 195 and 188 pass the convergence gate. In both studies, the contact angles, the capillary lengths and the noise scale pass both rules. Of these parameters, comes closest to a departure: it has the smallest -value of the validation study, 0.0087 in the ECDF test, and in the Kolmogorov–Smirnov test of one real-data study. Under the chi-squared and Kolmogorov–Smirnov rule, one study departs in and the other in . The ECDF test finds the departure in . The departure in rests on the chi-squared test of one study, and the Kolmogorov–Smirnov and ECDF tests of that study and all three tests of the other study find none.
We attribute the departure in to the redraw rule. The rule removes ground truths outside the domain, where is larger on average and the real-data prior puts the most mass of the three designs, and the surrogate posterior places mass there (subsection 4.4). The true then sit below the posterior mean on average, and the posteriors are wider than calibration requires. At the validation design, with almost no prior mass outside the domain, shows no departure.
After the study, we split the validation replications into thirds by their true noise scale. In the middle third, with true from to , the map places the noise scale above the truth by about 0.4 posterior standard deviations on average. Within that third, the Kolmogorov–Smirnov lies above the study’s Bonferroni threshold. The lower and upper thirds show no such shift. The synthetic ground truths of subsection 5.2, at , lie in the middle third. In all three studies, the central credible intervals of the noise scale cover the true value close to their nominal level.
Figure 6.1: Rank histograms at the validation design for the population mean of the capillary length, the contact angles and the noise scale, from the 196 replications that finish and pass the convergence gate. Each rank is divided by and binned into ten bins, the last of which holds one attainable rank more than the others. Solid line: observed count. Dashed line: expected count under uniformity. Shaded: the band in which a uniform histogram stays with probability at least 0.99 in each bin, from the quantiles of the binomial distribution. Figure SM6 shows every parameter.
With one map for all 200 posteriors, the validation study needs about five orders of magnitude fewer forward-model evaluations than direct sampling, with chains priced as in subsection 5.4. The amortized map thus makes simulation-based calibration of this hierarchical model affordable, and at the validation design the study detects no departure from calibration. At the real-data design, every departure lies in the knife-edge and volume parameters.
7 Real-data demonstration
7.1 Setup
We apply the amortized transport-map likelihood with the Young–Laplace forward model to the radii measured in the laboratory experiments of subsection 2.1, with direct sampling as the reference. The data are six cells: three substrates, each at two volume settings (Fig. 2.1(a)). Direct sampling and the map condition on these six radii. The radii inform the fifteen parameters of the real-data design of subsection 3.2. Section SM7 lists the cells, and section SM5 gives the values of this section for every parameter and map.
7.2 The posterior conditioned on the real photographs
(a) posterior marginals
(b) posterior predictive check
(c) agreement with direct sampling
Figure 7.1: The map on the real photographs. (a) Posterior marginals of the population mean of the capillary length, the three contact angles and the noise scale. Section SM5 shows every parameter. Shaded: direct sampling. Solid line: the map. Dashed line: the prior. Dotted line: the capillary length of water at . (b) Posterior predictive check, one column per cell, labelled by substrate and nominal volume in . Each cell is drawn about the median of its predictive radii. Line: central interval. Bar: central interval. Marker: the measured radius, in the shape and colour of Fig. 2.1(a). The intervals use every draw at which the reduced-order model returns a radius, 491 to 500 per cell. (c) against direct sampling for every parameter, as in Fig. 5.2(b). Marker: the map. Bar: the range over the map and its three replicate maps. Dashed line: between the two halves of the direct sample, maximized over the parameters.
We compare the posteriors of the map and of its replicate maps with that of direct sampling by , as at the synthetic designs. Figure 7.1(a) overlays the marginals of the map on those of direct sampling for the population mean of the capillary length, the three contact angles and the noise scale. They agree closely for every parameter, the noise scale included. Three replicate maps, each trained on an independent training draw as in subsection 5.2, agree closely too. Over the four maps, stays below one seventh for the noise scale and below one tenth for every other parameter (Fig. 7.1(c)). It also stays below one tenth along every principal direction of the direct posterior in the contact angles and capillary lengths. The correlation coefficients of all 105 pairs of parameters differ from those of direct sampling by at most 0.05 (Fig. SM4). For the map, is at most about the split-half level for every parameter, and the noise scale reaches it (Fig. 7.1(c)). The noise scale agrees more closely here than at the synthetic designs partly because six radii leave its posterior wide, with a standard deviation under direct sampling of against and there. The map shifts its posterior mean less than at the validation design, by about .
The two volume settings of this design are the pair of Fig. 3.1 whose curves nearly coincide, so each substrate’s two radii inform about one direction in contact angle and capillary length. Under the map, the six radii narrow the contact angles to about half to two thirds of their prior standard deviation. The capillary lengths stay above four fifths of theirs. The population mean of the capillary length is 2.740(\pm 0.086)\text{,}\mathrm{mm}$$ (posterior mean and standard deviation), consistent with the capillary length of about that the measured surface tension of the dispersion gives (subsection 3.3) and with the standard value for water, at [24, 23]. Because the prior is centred at , near both values, this agreement is a consistency check. On the real photographs, the map thus agrees closely with direct sampling, and the photographs inform the contact angles more than the capillary lengths.
7.3 Posterior predictive check
A posterior predictive check tests whether the posterior reproduces the measured radii. For 500 draws of the map’s posterior, the reduced-order model solves each cell, and Eq. 2.2 adds noise at the noise scale of the draw. This gives each cell a posterior predictive distribution of its radius. All six measured radii lie inside the central and intervals of their own cell (Fig. 7.1(b)). With six cells, this in-sample check has little power.
Sampling the map’s posterior needs no forward solve, but this check runs the reduced-order model again after training. Of its solves, 27 return no radius. In each, the draw places a cell of the setting beyond the domain bound of subsection 2.4, where the surrogate posterior places mass (subsection 4.4). Subsection 6.2 attributes the departure in to the same mass. From training through the posterior to the predictive check, the approach runs end to end on real photographs, and its posterior agrees with direct sampling and is consistent with the measured radii.
8 Conclusion
We introduced a framework for simulation-based inference in a hierarchical inverse problem, with one amortized triangular transport-map likelihood per design that serves every cell of the hierarchical model. We applied it to infer the contact angle and the capillary length from photographs of a hole in a thin liquid film. The map is trained offline on forward solves. We tested the map against direct sampling of the forward model and by simulation-based calibration at synthetic designs, and applied it to experimentally measured radii.
In the present problem direct sampling of the forward model stays feasible and served as the reference. The map’s posteriors agree with direct sampling at the validation design, apart from an upward shift of the noise scale, and there the map also passes simulation-based calibration for every parameter. We conclude that at the validation design the amortized map infers the wetting properties and their uncertainty accurately. On the larger hierarchy of the scaling design the posteriors agree less closely: the map and its replicate maps shift the posterior mainly along one combination of contact angles and capillary lengths. We hypothesize that the errors of the learned likelihood add up over the larger number of cells while the posterior narrows, similar to the compounding approximation errors reported for compositional amortized inference [3]. The Gaussian special case shifts less along this combination at this design, so the learned width and shape may contribute. A higher order of the map or more training rows may reduce this shift. The learned width and shape of the noise account for most of the shift of the noise scale on Gaussian data, and under the skewed law we tested they bring the noise scale closer to direct sampling than the Gaussian special case does. On real photographs the method runs end to end, from training through the posterior to the posterior predictive check, and the map agrees with direct sampling for every parameter, the noise scale included. The map can place posterior mass at inputs where the reduced-order model returns no radius, and we attribute to this the departure of the calibration of in one of the two calibration studies at the real-data design. A surrogate that also learns where the reduced-order model returns a radius would confine the posterior to the domain of the forward model.
Even for a single posterior at the validation design, the map needs orders of magnitude fewer forward-model evaluations than direct sampling with a gradient-free ensemble sampler, and once it is trained offline, a further posterior at its design needs no forward solve. Studies that need many posteriors, such as calibration studies or repeated measurements, therefore take far fewer forward-model evaluations than direct sampling. For an expensive forward model, forward solves dominate the running time, so the training draw accounts for most of the cost of the map, and the online cost of each posterior falls to that of sampling the surrogate.
The training draw itself may also shrink. At the validation design, a map trained on a fraction of the forward solves agrees with direct sampling within the range of the full-budget maps, from one map per budget. Training rows drawn near the posterior, as in sequential neural likelihood [32], could lower the cost further for a single dataset.
Without direct sampling as a reference, simulation-based calibration can still check the map, and beyond the training draw it needs forward solves only to simulate its datasets. The map thus makes this check affordable where direct sampling would make it costly. Calibration and agreement with direct sampling test different properties: calibration averages over datasets drawn from the prior, and agreement compares the posteriors for one dataset. At the validation design, the noise scale passes calibration while its posterior sits above that of direct sampling. A comparison with direct sampling, on a problem small enough to afford it, therefore remains part of validating such a map.
The Bayesian analysis also shows what photographs of a hole determine. A photograph informs a single combination of contact angle and capillary length, and at the volume settings of the experiments the photographs of one substrate add little beyond it. The contact angles are then fixed only through the shared liquid and the prior on the capillary length. An experiment designed for inference would choose volume settings at which the radius responds to contact angle and capillary length in more different proportions. With such settings the same measurement would also give the surface tension of a liquid of known density.
The construction uses the forward model only through its solves, so it could also serve other hierarchical inverse problems with expensive forward models, provided that the likelihood factorizes over cells, every cell shares an observation density free of the hierarchy’s hyperparameters, and a single parameter scales the simulator’s noise exactly. We will apply the construction to forward models of more complicated wetting processes, such as impacting drops [26]. A map trained offline for suitable settings could act as a soft sensor in a running process, such as coating or inkjet printing. It would turn each photograph taken during the process into the contact angle and the surface tension with their uncertainty, without a forward solve and without disturbing the liquid.
Code availability
A basic implementation of the method and of its application to the Young–Laplace problem will be made publicly available upon publication.
Acknowledgments
The author thanks Youssef Marzouk and his group for discussions on Bayesian inference and transport maps. The author used Anthropic’s Claude (Opus 5.5, through Claude Code) to edit prose, to search the literature and to write the scripts that recompute the reported values and figures. The author assumes responsibility for all content.
References
[1] A. Abdelhamed, M. A. Brubaker, and M. S. Brown, Noise flow: Noise modeling with conditional normalizing flows, in 2019 IEEE/CVF International Conference on Computer Vision (ICCV), IEEE, 2019, pp. 3165–3173, https://doi.org/10.1109/ICCV.2019.00326.
[2] J. Albert, C. Balázs, A. Fowlie, W. Handley, N. Hunt-Smith, R. Ruiz de Austri, and M. White, A comparison of Bayesian sampling algorithms for high-dimensional particle physics and cosmology applications, Computer Physics Communications, 315 (2025), p. 109756, https://doi.org/10.1016/j.cpc.2025.109756.
[3] J. Arruda, V. Pandey, C. Sherry, M. Barroso, X. Intes, J. Hasenauer, and S. T. Radev, Compositional amortized inference for large-scale hierarchical Bayesian models, in International Conference on Learning Representations (ICLR 2026), 2026, https://arxiv.org/abs/2505.14429.
[4] R. Baptista, L. Cao, J. Chen, O. Ghattas, F. Li, Y. M. Marzouk, and J. T. Oden, Bayesian model calibration for block copolymer self-assembly: Likelihood-free inference and expected information gain computation via measure transport, Journal of Computational Physics, 503 (2024), p. 112844, https://doi.org/10.1016/j.jcp.2024.112844.
[5] R. Baptista, Y. Marzouk, and O. Zahm, On the representation and learning of monotone triangular transport maps, Foundations of Computational Mathematics, 24 (2024), pp. 2063–2108, https://doi.org/10.1007/s10208-023-09630-x.
[6] M. Betancourt and M. Girolami, Hamiltonian Monte Carlo for hierarchical models, in Current Trends in Bayesian Methodology with Applications, Chapman and Hall/CRC, 2015, pp. 79–101, https://doi.org/10.1201/b18502-5.
[7] S. Bisswanger, H. Bonart, P. T. Khaing, and S. Hardt, Liquid surfaces with chaotic capillary waves exhibit an effective surface tension, Physical Review Letters, 133 (2024), p. 034001, https://doi.org/10.1103/PhysRevLett.133.034001.
[8] B. M. Boyd, K. S. Mandel, M. Grayling, A. Mitra, R. Kessler, M. Autenrieth, A. Do, M. Ginolin, L. Kelsey, G. Narayan, M. O’Callaghan, N. Sarin, and S. Thorp, FlowSN: neural simulation-based inference under realistic selection effects applied to supernova cosmology, Monthly Notices of the Royal Astronomical Society, 550 (2026), p. stag1046, https://doi.org/10.1093/mnras/stag1046.
[9] S. L. Brunton and J. N. Kutz, Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control, Cambridge University Press, Cambridge, 2019, https://doi.org/10.1017/9781108380690.
[10] R. H. Byrd, P. Lu, J. Nocedal, and C. Zhu, A limited memory algorithm for bound constrained optimization, SIAM Journal on Scientific Computing, 16 (1995), pp. 1190–1208, https://doi.org/10.1137/0916069.
[11] P. R. Conrad, Y. M. Marzouk, N. S. Pillai, and A. Smith, Accelerating asymptotically exact MCMC for computationally intensive models via local approximations, Journal of the American Statistical Association, 111 (2016), pp. 1591–1607, https://doi.org/10.1080/01621459.2015.1096787.
[12] D. R. Cox and N. Reid, Parameter orthogonality and approximate conditional inference, Journal of the Royal Statistical Society: Series B (Methodological), 49 (1987), pp. 1–18, https://doi.org/10.1111/j.2517-6161.1987.tb01422.x.
[13] K. Cranmer, J. Brehmer, and G. Louppe, The frontier of simulation-based inference, Proceedings of the National Academy of Sciences, 117 (2020), pp. 30055–30062, https://doi.org/10.1073/pnas.1912789117.
[14] M. Dax, S. R. Green, J. Gair, J. H. Macke, A. Buonanno, and B. Schölkopf, Real-time gravitational wave science with neural posterior estimation, Physical Review Letters, 127 (2021), p. 241103, https://doi.org/10.1103/PhysRevLett.127.241103.
[15] A. Fengler, L. N. Govindarajan, T. Chen, and M. J. Frank, Likelihood approximation networks (LANs) for fast inference of simulation models in cognitive neuroscience, eLife, 10 (2021), p. e65074, https://doi.org/10.7554/eLife.65074.
[16] D. Foreman-Mackey, D. W. Hogg, D. Lang, and J. Goodman, emcee: The MCMC hammer, Publications of the Astronomical Society of the Pacific, 125 (2013), pp. 306–312, https://doi.org/10.1086/670067.
[17] A. Gelman, Prior distributions for variance parameters in hierarchical models, Bayesian Analysis, 1 (2006), pp. 515–534, https://doi.org/10.1214/06-BA117A.
[18] A. Gelman, J. B. Carlin, H. S. Stern, D. B. Dunson, A. Vehtari, and D. B. Rubin, Bayesian Data Analysis, Chapman and Hall/CRC, 3 ed., 2013, https://doi.org/10.1201/b16018.
[19] J. Goodman and J. Weare, Ensemble samplers with affine invariance, Communications in Applied Mathematics and Computational Science, 5 (2010), pp. 65–80, https://doi.org/10.2140/camcos.2010.5.65.
[20] J. Grashorn, M. Broggi, L. Chamoin, and M. Beer, Transport map coupling filter for state-parameter estimation, in Advances in Reliability, Safety and Security, Part 9 (ESREL 2024), Polish Safety and Reliability Association, 2024, pp. 47–56, https://esrel2024.com/wp-content/uploads/articles/part9/transport-map-coupling-filter-for-state-parameter-estimation.pdf.
[21] D. Habermann, M. Schmitt, L. Kühmichel, A. Bulling, S. T. Radev, and P.-C. Bürkner, Amortized Bayesian multilevel models, Bayesian Analysis, (2025), pp. 1–30, https://doi.org/10.1214/25-BA1570. Advance publication.
[22] M. D. Hoffman and A. Gelman, The No-U-Turn sampler: Adaptively setting path lengths in Hamiltonian Monte Carlo, Journal of Machine Learning Research, 15 (2014), pp. 1593–1623, http://jmlr.org/papers/v15/hoffman14a.html.
[23] International Association for the Properties of Water and Steam, Revised supplementary release on properties of liquid water at 0.1 MPa, IAPWS Supplementary Release SR6-08(2011), International Association for the Properties of Water and Steam, Plzeň, Czech Republic, 2011, https://iapws.org/technical-guidance/release/LiquidWater.
[24] International Association for the Properties of Water and Steam, Revised release on the surface tension of ordinary water substance, IAPWS Release R1-76(2014), International Association for the Properties of Water and Steam, Moscow, Russia, 2014, https://iapws.org/technical-guidance/release/Surf-H2O.
[25] M. C. Jones and A. Pewsey, Sinh-arcsinh distributions, Biometrika, 96 (2009), pp. 761–780, https://doi.org/10.1093/biomet/asp053.
[26] C. Josserand and S. T. Thoroddsen, Drop impact on a solid surface, Annual Review of Fluid Mechanics, 48 (2016), pp. 365–391, https://doi.org/10.1146/annurev-fluid-122414-034401.
[27] J.-M. Lueckmann, G. Bassetto, T. Karaletsos, and J. H. Macke, Likelihood-free inference with emulator networks, in Proceedings of The 1st Symposium on Advances in Approximate Bayesian Inference, vol. 96 of Proceedings of Machine Learning Research, PMLR, 2019, pp. 32–53, https://proceedings.mlr.press/v96/lueckmann19a.html.
[28] C. Lv, M. Eigenbrod, and S. Hardt, Stability and collapse of holes in liquid layers, Journal of Fluid Mechanics, 855 (2018), pp. 1130–1155, https://doi.org/10.1017/jfm.2018.680.
[29] Y. Marzouk, T. Moselhy, M. Parno, and A. Spantini, Sampling via measure transport: An introduction, in Handbook of Uncertainty Quantification, Springer, Cham, 2017, pp. 785–825, https://doi.org/10.1007/978-3-319-12385-1_23.
[30] S. C. Muchandimath, J. R. R. A. Martins, and A. A. Gorodetsky, Accelerating Bayesian inference via multifidelity transport map coupling, AIAA Journal, 64 (2026), pp. 5325–5341, https://doi.org/10.2514/1.J066460.
[31] G. Papamakarios, T. Pavlakou, and I. Murray, Masked autoregressive flow for density estimation, in Advances in Neural Information Processing Systems 30 (NIPS 2017), vol. 30, Curran Associates, Inc., 2017, https://arxiv.org/abs/1705.07057.
[32] G. Papamakarios, D. Sterratt, and I. Murray, Sequential neural likelihood: Fast likelihood-free inference with autoregressive flows, in Proceedings of the Twenty-Second International Conference on Artificial Intelligence and Statistics, vol. 89 of Proceedings of Machine Learning Research, PMLR, 2019, pp. 837–848, https://proceedings.mlr.press/v89/papamakarios19a.html.
[33] M. Parno, P.-B. Rubio, D. Sharp, M. Brennan, R. Baptista, H. Bonart, and Y. Marzouk, MParT: Monotone parameterization toolkit, Journal of Open Source Software, 7 (2022), p. 4843, https://doi.org/10.21105/joss.04843.
[34] M. D. Parno and Y. M. Marzouk, Transport map accelerated Markov chain Monte Carlo, SIAM/ASA Journal on Uncertainty Quantification, 6 (2018), pp. 645–682, https://doi.org/10.1137/17M1134640.
[35] M. Ramgraber, D. Sharp, M. Le Provost, and Y. Marzouk, A friendly introduction to triangular transport, Transactions on Machine Learning Research, (2026), https://openreview.net/forum?id=PL0vAVlmAH.
[36] P. L. C. Rodrigues, T. Moreau, G. Louppe, and A. Gramfort, HNPE: Leveraging global parameters for neural posterior estimation, in Advances in Neural Information Processing Systems 34 (NeurIPS 2021), vol. 34, Curran Associates, Inc., 2021, pp. 13432–13443, https://arxiv.org/abs/2102.06477.
[37] P.-B. Rubio, Y. Marzouk, and M. Parno, A transport approach to sequential simulation-based inference. arXiv:2308.13940 [stat.ME], 2023, https://arxiv.org/abs/2308.13940.
[38] T. Säilynoja, P.-C. Bürkner, and A. Vehtari, Graphical test for discrete uniformity and its applications in goodness-of-fit evaluation and multiple sample comparison, Statistics and Computing, 32 (2022), p. 32, https://doi.org/10.1007/s11222-022-10090-6.
[39] A. M. Stuart, Inverse problems: A Bayesian perspective, Acta Numerica, 19 (2010), pp. 451–559, https://doi.org/10.1017/S0962492910000061.
[40] S. Talts, M. Betancourt, D. Simpson, A. Vehtari, and A. Gelman, Validating Bayesian inference algorithms with simulation-based calibration. arXiv:1804.06788 [stat.ME], 2018, https://arxiv.org/abs/1804.06788.
[41] G. I. Taylor and D. H. Michael, On making holes in a sheet of fluid, Journal of Fluid Mechanics, 58 (1973), pp. 625–639, https://doi.org/10.1017/S0022112073002375.
[42] M. K. Transtrum, B. B. Machta, K. S. Brown, B. C. Daniels, C. R. Myers, and J. P. Sethna, Perspective: Sloppiness and emergent theories in physics, biology, and beyond, The Journal of Chemical Physics, 143 (2015), p. 010901, https://doi.org/10.1063/1.4923066.
[43] A. Vehtari, A. Gelman, D. Simpson, B. Carpenter, and P.-C. Bürkner, Rank-normalization, folding, and localization: An improved for assessing convergence of MCMC (with discussion), Bayesian Analysis, 16 (2021), pp. 667–718, https://doi.org/10.1214/20-BA1221.
Supplementary Materials
SM1 The reduced-order model
The basis comes from full boundary-value solutions on a grid of five contact angles from , five capillary lengths from and the knife-edge radii , with the knife-edge height and the volume varied across the solutions. The knife-edge height is 0.10, 0.13 or 0.16 times the knife-edge radius. The prior of Table 3.1 stays within the band these ratios span, and the training distribution of subsection 4.3 leaves it in the tails of .
The accuracy check draws 50 parameter vectors from the hierarchical prior at each of four volumes, fixes the volume exactly, and solves twice: with the reduced-order model, and with the full boundary-value solver, whose contact-line radius is root-found to meet the same volume. A second check repeats this with the other inputs drawn from the training distribution, whose knife-edge coordinates are broader than the prior’s. Of its draws, the reduced-order solve returns no radius at 4, which are redrawn. Of the other 200, 48 have outside the band of the basis. A third check draws 50 rows from the training distribution at each of five volumes from to . Of its draws, the reduced-order solve returns no radius at 77 and the full solve fails at 14, and these are redrawn. Table SM1 gives the relative difference in for all three.
Table SM1: Relative difference in between the reduced-order model and the full boundary-value solve off the training grid, per volume, with the other inputs drawn from the prior and from the training distribution. The volumes without prior entries are those of the third check. The last two rows split the training-distribution draws of the four volumes of the second check by whether lies in the band of the basis.
| prior | training distribution | |||||
|---|---|---|---|---|---|---|
| [mL] | draws | median [%] | max [%] | draws | median [%] | max [%] |
| 10.00 | 50 | 0.007 | 0.013 | 50 | 0.008 | 0.015 |
| 17.18 | 50 | 0.054 | 0.157 | 50 | 0.053 | 0.248 |
| 18.00 | 50 | 0.087 | 0.192 | 50 | 0.082 | 0.672 |
| 19.21 | 50 | 0.115 | 0.544 | 50 | 0.141 | 1.049 |
| 19.60 | – | – | – | 50 | 0.175 | 2.759 |
| 20.00 | – | – | – | 50 | 0.171 | 2.754 |
| 20.50 | – | – | – | 50 | 0.208 | 1.860 |
| 21.00 | – | – | – | 50 | 0.266 | 2.597 |
| 21.50 | – | – | – | 50 | 0.231 | 1.654 |
| 10.00 to 19.21 | 200 | 0.066 | 0.544 | 200 | 0.062 | 1.049 |
| 19.60 to 21.50 | 250 | 0.202 | 2.759 | |||
| in the basis | 152 | 0.057 | 1.049 | |||
| outside | 48 | 0.084 | 0.495 |
Table SM2 places the volume bound of subsection 2.4 against the failures of the production solve. For this table, the production solve runs without the bound at draws of the other inputs from the hierarchical prior and 15 volumes from , and each entry is the share of draws for which it returns a radius.
Table SM2: Share of prior draws for which the reduced-order solve returns a radius, per volume, without the volume bound.
| [mL] | radius returned | share |
|---|---|---|
| 10.00 | 300/300 | 1.000 |
| 12.00 | 300/300 | 1.000 |
| 14.00 | 300/300 | 1.000 |
| 16.00 | 300/300 | 1.000 |
| 17.18 | 300/300 | 1.000 |
| 18.00 | 300/300 | 1.000 |
| 18.80 | 300/300 | 1.000 |
| 19.21 | 298/300 | 0.993 |
| 19.50 | 296/300 | 0.987 |
| 20.00 | 292/300 | 0.973 |
| 20.50 | 282/300 | 0.940 |
| 21.00 | 264/300 | 0.880 |
| 22.00 | 182/300 | 0.607 |
| 23.00 | 78/300 | 0.260 |
| 24.00 | 14/300 | 0.047 |
SM2 Information in the photographs
Table SM3 gives the numbers behind subsection 3.1, from the reduced-order grids of Fig. 3.1 at the reference point, with in units of and in units of . For two photographs of one substrate, the ratio of the standard deviations along and across the curve is the square root of the ratio of the largest to the smallest eigenvalue of their information. For three substrates with two photographs each at the real-data volumes, a direction of the information counts as weak when its eigenvalue lies below of the largest.
Table SM3: Information of the photographs in contact angle and capillary length: standard deviations along and across the curve of Fig. 3.1 for two photographs, and weak directions of the information of three substrates, with the smallest eigenvalue and the next one, each relative to the largest.
| case | quantity | value |
|---|---|---|
| and (real data) | sd along / sd across | 273 |
| and (validation) | sd along / sd across | 46 |
| own capillary length | weak directions | 3 (each ; next ) |
| shared capillary length | weak directions | 1 (; next ) |
SM3 Software and settings
All computations ran in Python 3.12.7 with NumPy 2.4.6, SciPy 1.15.3, MParT 2.2.2, emcee 3.1.6 and littlemcmc 0.2.2.
Likelihood component
The mean is a probabilists’ Hermite expansion of total order three in the five inputs and has 56 coefficients. The correction has total order two in the six inputs and 28 coefficients. The monotone component has total order three in the seven inputs and 120 coefficients. Each map of Table SM4 therefore has 204 coefficients.
Training
Each row of is one cell, at a substrate and a volume setting chosen at random, of a draw from the hierarchical prior with two changes. The knife-edge coordinates and have standard deviation , against in the prior, and the volume error has an additional population mean drawn from 0.5\text{,}\mathrm{ml}. The mixture draws with equal probability from the half-normal prior of Table 3.1 and from a log-uniform distribution on . The ridge penalty is times the squared norm of the coefficients. L-BFGS-B runs for at most iterations. Table SM4 lists the trained maps with their forward solves. The analytic log-likelihood gradient agrees with central finite differences to a relative error of on 40 training rows, and the gradient of Eq. 4.5 to at three prior draws in eight coordinates.
Table SM4: The trained maps by family. Rows with a radius: the rows of the training draw below the bound of subsection 2.4 at which the reduced-order model returns a radius. The draws of the three maps of subsection 4.3 take , and forward solves at the real-data, validation and scaling designs. The replicate maps train on independent training draws of fresh parameter rows (subsections 5.2 and 7.2), each with as many rows with a radius as the map of its design. The maps with train on the first rows with a radius of a random permutation of the map draw of their design.
| rows with a radius | |||
|---|---|---|---|
| map | validation | scaling | real data |
| map | |||
| replicate 1 | |||
| replicate 2 | |||
| replicate 3 | |||
| 250$$ | – | ||
| 500$$ | – | ||
| 1000$$ | – |
Sampling
The No-U-Turn sampler runs four chains of warm-up and draws at a target acceptance rate of 0.95. In simulation-based calibration each replication runs four chains of warm-up and draws. A replication that has not finished after is stopped and run once more with a cap of .
Direct sampling uses the ensemble sampler of subsection 5.1 with 40 walkers and the default stretch move. Its chains run for steps at the validation and scaling designs and at the real-data design, and the comparisons use their last , and steps, thinned by 50. The direct chain of the skewed-noise test runs for steps after burn-in steps.
SM4 Convergence
Table SM5 gives the largest and the smallest bulk effective sample size [43]. For the ensemble sampler, each walker counts as a chain. assumes independent chains, and the walkers interact. The direct chain at the real-data design comes closest to the limit of subsection 4.4, with , and its marginals agree with those of the map’s independent No-U-Turn chains to about the split-half level of subsection 5.1 (subsection 7.2). In simulation-based calibration, every replication that passes the convergence gate of subsection 6.1 also stays within this limit, with a largest of 1.03.
Table SM5: Convergence of every chain behind sections 5 and 7: largest rank-normalized split and smallest bulk effective sample size over the parameters and, for the maps, over every map sampled at that design (the maps of Table SM4, the two Gaussian forms and, for skewed noise, the three components of Table SM12), each with four chains of the No-U-Turn sampler. Direct chains: the steps of section SM3 that the comparisons use.
| design | chains | sampler | max | min bulk ESS |
|---|---|---|---|---|
| validation | 9 maps | map | 1.00 | |
| scaling | 6 maps | map | 1.00 | |
| real data | 7 maps | map | 1.00 | |
| validation, skewed noise | 3 maps | map | 1.00 | |
| validation | 40 walkers | direct | 1.009 | |
| scaling | 40 walkers | direct | 1.039 | |
| real data | 40 walkers | direct | 1.048 | |
| validation, skewed noise | 40 walkers | direct | 1.040 |
Two checks test the direct sampler against known answers. The first uses a sentinel coordinate, which has a standard normal prior and enters no likelihood and therefore has posterior standard deviation one. The second uses a flat direction. By Eq. 3.2, adding a constant to every and to leaves every unchanged, so the likelihood is constant along this direction. With volume settings, the mean of the and that of the , the prior terms that depend on at fixed are 0.5\text{,}\mathrm{ml}, with the prior standard deviation of . Given the and , the posterior standard deviation of is therefore
P=\sqrt{\frac{J}{J+4\sigma_{\Delta V}^{2}/${\mathrm{ml}}^{2}$}}\;,which tends to the prior value one as . The marginal posterior standard deviation that a chain measures also contains the spread of this conditional mean over the posterior of the and , which can move it away from . We evaluate at each chain’s posterior mean of , and the criterion, fixed before the measurement, is agreement within . Table SM6 gives both checks.
Table SM6: The two checks of the direct sampler on the steps the comparisons use. Flat direction: measured and predicted posterior standard deviation of and their ratio. Sentinel: posterior standard deviation of a coordinate whose posterior is its standard normal prior.
| flat direction | ||||
|---|---|---|---|---|
| design | measured | predicted | ratio | sentinel sd |
| validation | 0.982 | 0.963 | 1.019 | 0.994 |
| scaling | 0.998 | 0.999 | 0.999 | 0.974 |
| real data | 0.966 | 0.945 | 1.022 | 0.989 |
SM5 Agreement, cost and the real-data posterior
The agreement study covers one synthetic dataset per design, drawn at the ground truth of Table SM7.
Table SM7: Ground truths of the two synthetic designs.
| parameter | unit | validation | scaling |
|---|---|---|---|
| mm | 2.72 | 2.72 | |
| mm | 0.03 | 0.03 | |
| – | |||
| – | 0.3 | 0 | |
| – | – | 0.3 | |
| 145 | 145 | ||
| 152 | 148.5 | ||
| – | 152 | ||
| mL | 0.15 | 0.15 | |
| – | |||
| – | 0.5 | ||
| – | – | ||
| – | – | 0.1 | |
| – | – | 0.3 | |
| – | – | 0.5 | |
| mm | 40 | 40 | |
| mm | 5 | 5 | |
| mL | 0.2 | 0.2 | |
| mm | 0.4 | 0.4 |
Figures SM1 and SM2 overlay the marginals of the map on those of direct sampling for every parameter at the validation and scaling designs. Tables SM8 and SM9 give for the four learned maps, the Gaussian special case of subsection 5.3 and the same form with its mean refitted by the training objective, with the posterior mean of the noise scale under each. Refitting the mean leaves the noise scale of the Gaussian special case unchanged ( of 0.17 and 0.17 at the validation design, 0.04 and 0.05 at the scaling design). The last column is the between the two halves of the direct sample, and its largest value, the split-half level, is the dashed line of Fig. 5.2(b). The map and its three replicate maps spread most in the noise scale at the validation design, where the map lies at the top of its range, and in the contact angles, and the noise scale at the scaling design. Against the split-half level, the map differs from direct sampling at the validation design by at most about 3.4 times this level for every parameter other than the noise scale. At the scaling design it differs by at most about twice this level for every parameter other than the noise scale and , which lies at about five times. The noise scale differs by about 14 times this level at the validation design and 6.5 times at the scaling design.
Figure SM1: Posterior marginals at the validation design, one panel per parameter. Shaded: direct sampling. Solid line: the map. Dashed line: the prior.
Figure SM2: Posterior marginals at the scaling design, one panel per parameter. Shaded: direct sampling. Solid line: the map. Dashed line: the prior.
Table SM8: against direct sampling at the validation design. Learned component: the map and its three replicate maps (rep. 1 to 3). Gaussian: the special case , the identity, with fitted by least squares, and the same form with refitted by the training objective (mean refitted). Last row: posterior mean of the noise scale under each map, and under direct sampling in the last column.
| learned | Gaussian | direct | |||||
|---|---|---|---|---|---|---|---|
| parameter | map | rep. 1 | rep. 2 | rep. 3 | special case | mean refitted | split half |
| 0.13 | 0.02 | 0.16 | 0.14 | 0.05 | 0.03 | 0.014 | |
| 0.02 | 0.01 | 0.02 | 0.01 | 0.05 | 0.01 | 0.008 | |
| 0.06 | 0.01 | 0.01 | 0.09 | 0.06 | 0.01 | 0.012 | |
| 0.04 | 0.02 | 0.07 | 0.06 | 0.04 | 0.02 | 0.009 | |
| 0.14 | 0.08 | 0.01 | 0.17 | 0.08 | 0.06 | 0.038 | |
| 0.16 | 0.01 | 0.04 | 0.19 | 0.12 | 0.15 | 0.048 | |
| 0.01 | 0.01 | 0.05 | 0.03 | 0.01 | 0.07 | 0.013 | |
| 0.01 | 0.01 | 0.02 | 0.06 | 0.04 | 0.04 | 0.016 | |
| 0.03 | 0.05 | 0.08 | 0.03 | 0.07 | 0.02 | 0.048 | |
| 0.06 | 0.08 | 0.02 | 0.18 | 0.02 | 0.12 | 0.045 | |
| 0.04 | 0.01 | 0.15 | 0.02 | 0.03 | 0.04 | 0.019 | |
| 0.07 | 0.07 | 0.09 | 0.22 | 0.04 | 0.07 | 0.016 | |
| 0.68 | 0.28 | 0.34 | 0.45 | 0.17 | 0.17 | 0.021 | |
| [mm] | 0.401 | 0.375 | 0.378 | 0.386 | 0.368 | 0.368 | 0.357 |
Table SM9: As Table SM8, at the scaling design.
| learned | Gaussian | direct | |||||
|---|---|---|---|---|---|---|---|
| parameter | map | rep. 1 | rep. 2 | rep. 3 | special case | mean refitted | split half |
| 0.54 | 0.04 | 0.10 | 0.22 | 0.02 | 0.07 | 0.067 | |
| 0.03 | 0.05 | 0.05 | 0.02 | 0.04 | 0.02 | 0.047 | |
| 0.05 | 0.13 | 0.15 | 0.19 | 0.04 | 0.05 | 0.039 | |
| 0.10 | 0.05 | 0.03 | 0.08 | 0.01 | 0.06 | 0.021 | |
| 0.09 | 0.04 | 0.06 | 0.02 | 0.01 | 0.05 | 0.014 | |
| 0.08 | 0.58 | 0.62 | 0.61 | 0.19 | 0.14 | 0.041 | |
| 0.16 | 0.43 | 0.51 | 0.33 | 0.13 | 0.04 | 0.050 | |
| 0.15 | 0.54 | 0.56 | 0.48 | 0.24 | 0.14 | 0.114 | |
| 0.13 | 0.08 | 0.08 | 0.11 | 0.16 | 0.13 | 0.102 | |
| 0.24 | 0.23 | 0.29 | 0.25 | 0.16 | 0.23 | 0.040 | |
| 0.04 | 0.02 | 0.04 | 0.01 | 0.06 | 0.01 | 0.021 | |
| 0.10 | 0.07 | 0.09 | 0.06 | 0.10 | 0.16 | 0.056 | |
| 0.23 | 0.19 | 0.19 | 0.19 | 0.29 | 0.28 | 0.021 | |
| 0.13 | 0.09 | 0.06 | 0.10 | 0.13 | 0.08 | 0.014 | |
| 0.13 | 0.05 | 0.04 | 0.06 | 0.26 | 0.22 | 0.017 | |
| 0.14 | 0.20 | 0.12 | 0.13 | 0.04 | 0.02 | 0.025 | |
| 0.19 | 0.02 | 0.17 | 0.02 | 0.17 | 0.08 | 0.046 | |
| 0.10 | 0.13 | 0.04 | 0.01 | 0.04 | 0.01 | 0.011 | |
| 0.74 | 0.90 | 0.80 | 0.43 | 0.04 | 0.05 | 0.027 | |
| [mm] | 0.325 | 0.329 | 0.327 | 0.318 | 0.309 | 0.309 | 0.307 |
Joint directions
Table SM10 gives along the principal directions of the direct posterior in the contact angles and capillary lengths. Their coordinates are 15\text{,}\mathrm{\SIUnitSymbolDegree} and $l_{c,i}/$0.1\text{\,}\mathrm{mm}, with , and the directions are the eigenvectors of the covariance of these coordinates under direct sampling. At the scaling design, direction 4 has the components in . All four maps place the posterior higher along it than direct sampling does, with the mean shifted by 0.48 to 0.82 direct posterior standard deviations and the standard deviation within ten percent of that of direct sampling.
Table SM10: against direct sampling along the principal directions of the direct posterior in 15\text{,}\mathrm{\SIUnitSymbolDegree}0.1\text{,}\mathrm{mm}, ordered by their standard deviation under direct sampling (sd, in these units). Replicate maps: replicates 1 to 3 of Table SM4. Gaussian: the special case and the same form with its mean refitted, as in Table SM8, at the synthetic designs. Split half: the same between the two halves of the direct sample.
| design | direction | sd | map | replicate maps | Gaussian | split half | |||
|---|---|---|---|---|---|---|---|---|---|
| validation | 1 | 1.22 | 0.16 | 0.01 | 0.15 | 0.18 | 0.05 | 0.04 | 0.015 |
| 2 | 0.68 | 0.07 | 0.04 | 0.10 | 0.11 | 0.05 | 0.13 | 0.052 | |
| 3 | 0.53 | 0.03 | 0.06 | 0.08 | 0.05 | 0.18 | 0.03 | 0.012 | |
| 4 | 0.15 | 0.15 | 0.17 | 0.05 | 0.21 | 0.23 | 0.07 | 0.009 | |
| scaling | 1 | 1.17 | 0.31 | 0.29 | 0.38 | 0.41 | 0.12 | 0.07 | 0.055 |
| 2 | 0.50 | 0.49 | 0.29 | 0.26 | 0.08 | 0.10 | 0.05 | 0.114 | |
| 3 | 0.49 | 0.06 | 0.12 | 0.07 | 0.11 | 0.11 | 0.14 | 0.067 | |
| 4 | 0.45 | 0.69 | 0.82 | 0.75 | 0.48 | 0.26 | 0.22 | 0.097 | |
| 5 | 0.12 | 0.15 | 0.17 | 0.18 | 0.10 | 0.15 | 0.10 | 0.075 | |
| 6 | 0.10 | 0.12 | 0.22 | 0.25 | 0.23 | 0.10 | 0.12 | 0.058 | |
| real data | 1 | 1.50 | 0.04 | 0.04 | 0.02 | 0.08 | – | – | 0.042 |
| 2 | 0.79 | 0.02 | 0.02 | 0.02 | 0.02 | – | – | 0.074 | |
| 3 | 0.58 | 0.02 | 0.03 | 0.03 | 0.03 | – | – | 0.058 | |
| 4 | 0.50 | 0.04 | 0.04 | 0.04 | 0.03 | – | – | 0.055 | |
| 5 | 0.18 | 0.02 | 0.02 | 0.02 | 0.04 | – | – | 0.092 | |
| 6 | 0.15 | 0.03 | 0.05 | 0.05 | 0.04 | – | – | 0.031 |
Four maps pooled
Pooled with equal weights, the draws of the map and its three replicate maps give against direct sampling of 0.44, 0.72 and 0.06 in the noise scale at the validation, scaling and real-data designs. Outside the noise scale they give at most 0.11, 0.45 and 0.05.
Pairwise joint posteriors
Figures SM3 and SM4 show the pairwise joint posteriors at the scaling and real-data designs, as Fig. 5.1 does at the validation design. At the scaling design, the correlation coefficients of all 171 pairs of parameters differ from those of direct sampling by at most 0.09, with a median of 0.02. The map couples the contact angles more strongly there, with coefficients of 0.66 to 0.67 against 0.60 to 0.61 under direct sampling. A linear-Gaussian approximation from the gradients of the forward model at the direct posterior mean and the priors, for every parameter other than the noise scale, gives the sign of every correlation above 0.2 in magnitude, at all three designs, and correlates with the measured coefficients at 0.98, 0.93 and 0.95.
Figure SM3: Pairwise joint posteriors at the scaling design, drawn as in Fig. 5.1.
Figure SM4: Pairwise joint posteriors at the real-data design, drawn as in Fig. 5.1.
Training budget
Table SM11 gives for the maps with , 500 and of Table SM4, with all other settings unchanged. The four maps of full budget at the validation design are in Table SM8.
Table SM11: against direct sampling for maps trained on 250, 500 and rows.
| validation | real data | |||||
|---|---|---|---|---|---|---|
| parameter | ||||||
| 0.13 | 0.05 | 0.05 | 0.12 | 0.06 | 0.05 | |
| 0.01 | 0.01 | 0.01 | 0.01 | 0.01 | 0.02 | |
| 0.06 | 0.04 | 0.05 | 0.02 | 0.03 | 0.01 | |
| 0.02 | 0.01 | 0.06 | 0.01 | 0.01 | 0.05 | |
| – | – | – | 0.01 | 0.01 | 0.02 | |
| 0.16 | 0.10 | 0.05 | 0.03 | 0.03 | 0.02 | |
| 0.09 | 0.01 | 0.09 | 0.01 | 0.02 | 0.06 | |
| – | – | – | 0.08 | 0.02 | 0.03 | |
| 0.04 | 0.03 | 0.03 | 0.05 | 0.09 | 0.01 | |
| 0.01 | 0.06 | 0.01 | 0.03 | 0.04 | 0.02 | |
| 0.05 | 0.07 | 0.03 | 0.02 | 0.03 | 0.05 | |
| 0.06 | 0.06 | 0.02 | 0.03 | 0.03 | 0.02 | |
| 0.06 | 0.02 | 0.02 | 0.03 | 0.05 | 0.05 | |
| 0.07 | 0.02 | 0.02 | 0.09 | 0.03 | 0.02 | |
| 0.41 | 0.41 | 0.67 | 0.08 | 0.06 | 0.10 |
Mean of the likelihood component
At 500 posterior draws of the map per design, spread over its four chains, the mean differs from the reduced-order radius by at most 0.79, 0.60 and 0.59 times the draw’s noise scale at the validation, scaling and real-data designs, in every cell but one. That cell, at the validation design, is a lower root of the reduced-order solve, with a radius of , and the mean differs from it by . The upper root, found by continuation in volume and confirmed by the full solver, is , and the mean lies 0.2 noise scales from it. Over the training rows the difference exceeds at of the rows, the largest of them at small radii. The training rows of the twelve maps at full budget include, at radii of at most , 0 to 4 such lower roots per map, at most of the rows. Direct sampling uses the same solve; a chain keeps no draw at a lower root, whose likelihood is lower by at least 125 nats.
Skewed noise
The skewed law is with , and , the sinh-arcsinh law of Jones and Pewsey [25] with skewness parameter and tailweight parameter one, where and are the mean and standard deviation of . Its skewness is 1.004. The dataset is drawn at the validation ground truth of Table SM7 with this law in place of the Gaussian. Over its 20 radii, the realized standardized noise has mean and standard deviation 0.671, below the law’s unit standard deviation. Both Gaussian forms place the noise scale at a posterior mean of , close to 0.4\text{,}\mathrm{mm}$$. Table SM12 gives for every parameter. Outside the noise scale, the learned component stays below the split-half level of 0.125 in every parameter, and the Gaussian special case exceeds it in , and .
Table SM12: Skewed noise at the validation design: against direct sampling with the exact skewed likelihood. Learned: the component of subsection 4.2 trained on the re-noised forward solves. Gaussian: the two forms of Table SM8 fitted to the same solves. Split-half level: the largest between the two halves of the direct sample.
| Gaussian | |||
|---|---|---|---|
| parameter | learned | special case | mean refitted |
| 0.07 | 0.05 | 0.13 | |
| 0.02 | 0.06 | 0.02 | |
| 0.04 | 0.13 | 0.04 | |
| 0.02 | 0.14 | 0.07 | |
| 0.04 | 0.15 | 0.14 | |
| 0.03 | 0.10 | 0.10 | |
| 0.05 | 0.04 | 0.02 | |
| 0.02 | 0.02 | 0.04 | |
| 0.01 | 0.03 | 0.04 | |
| 0.08 | 0.07 | 0.14 | |
| 0.07 | 0.02 | 0.03 | |
| 0.10 | 0.05 | 0.05 | |
| 0.25 | 0.94 | 0.94 | |
| , posterior mean [mm] | 0.350 | 0.271 | 0.271 |
| , posterior mean, direct [mm] | 0.333 | ||
| split-half level of direct sampling, max | 0.125 |
Cost
Table SM13 counts forward-model evaluations. The second-to-last row prices a direct chain that stops once its slowest parameter reaches a bulk effective sample size of 200: the whole validation chain reaches in steps, and a linear extrapolation gives the length shown. This rate includes the early steps of the chain. At the rate of its last steps, a chain past its burn-in reaches 200 in about steps, and the ratio, with the burn-in left uncounted, falls to .
Table SM13: Forward-model evaluations of direct sampling against the training solves of the map, per posterior. Ratio: direct evaluations over training solves. Second-to-last row: a direct chain at the validation design that stops at a bulk effective sample size of 200. Last row: a calibration study of 200 such posteriors, in which both columns add one solve per cell for each simulated dataset; redrawn ground truths add solves for about of the datasets at this design (Table SM19).
| direct sampling | map | |||||
|---|---|---|---|---|---|---|
| design | cells | steps | walkers | evaluations | solves | ratio |
| validation | 4 | 40 | ||||
| scaling | 18 | 40 | ||||
| real data | 6 | 40 | ||||
| validation, ESS 200 | 4 | 40 | ||||
| validation, 200 posteriors | 4 | 8151$$ | 40 |
Table SM14 gives the wall-clock time of the same comparison, as a secondary measure that also depends on the implementation and the hardware.
Table SM14: Wall-clock time and process-hours of one posterior and of 200 posteriors at the validation design, both samplers stopped at a bulk effective sample size of 200. Direct sampling: the ensemble sampler with 40 walkers on 20 processes, at the time per step of the last steps of the validation chain, with the chain length of the second-to-last row of Table SM13. Map: the forward solves of the training rows and the training in one process, counted once. The No-U-Turn sampler of the map runs four chains on four processes, with its warm-up kept and its sampling shortened in proportion to its smallest bulk effective sample size. All runs on one 96-core server. Ratio: direct sampling over the map. The columns of 200 posteriors scale one posterior of the dataset of subsection 5.2. In the validation study of subsection 6.2, the 196 replications that finish took 0.4 to 15 hours of wall-clock time each, with a median of 1.6 hours; each ran its four chains in one process, with 88 replications at a time on the same server.
| wall-clock (h) | process-hours | |||
|---|---|---|---|---|
| one | 200 | one | 200 | |
| direct sampling | ||||
| map | ||||
| ratio |
Real-data posterior
Figure SM5 shows every marginal at the real-data design. Table SM15 gives for the four maps of subsection 7.2, the split-half level of direct sampling, and the ratio of the map’s posterior standard deviation to the prior standard deviation. For a contact angle, the prior standard deviation is that of the truncated normal of Table 3.1. For a capillary length , it is \sqrt{(0.1\text{,}\mathrm{mm}0.05\text{,}\mathrm{mm})^{2}}, from the prior on and the half-normal prior on .
Figure SM5: Posterior marginals at the real-data design, one panel per parameter. Shaded: direct sampling. Solid line: the map. Dashed line: the prior. Dotted line: the capillary length of water at .
Table SM15: The real-data design. against direct sampling for the map and its three replicate maps (rep. 1 to 3), the split-half level of direct sampling, and the posterior standard deviation under the map over the prior standard deviation.
| , learned component | direct | map | ||||
|---|---|---|---|---|---|---|
| parameter | map | rep. 1 | rep. 2 | rep. 3 | split half | sd ratio |
| 0.05 | 0.05 | 0.02 | 0.08 | 0.030 | – | |
| 0.01 | 0.01 | 0.02 | 0.02 | 0.070 | – | |
| 0.02 | 0.03 | 0.01 | 0.02 | 0.042 | – | |
| 0.03 | 0.02 | 0.03 | 0.02 | 0.028 | – | |
| 0.02 | 0.01 | 0.01 | 0.01 | 0.063 | – | |
| 0.02 | 0.02 | 0.02 | 0.04 | 0.066 | 0.56 | |
| 0.02 | 0.03 | 0.02 | 0.03 | 0.035 | 0.62 | |
| 0.01 | 0.02 | 0.02 | 0.03 | 0.076 | 0.66 | |
| 0.02 | 0.03 | 0.05 | 0.05 | 0.066 | – | |
| 0.02 | 0.02 | 0.02 | 0.05 | 0.076 | – | |
| 0.01 | 0.01 | 0.02 | 0.01 | 0.032 | – | |
| 0.01 | 0.03 | 0.01 | 0.01 | 0.012 | – | |
| 0.04 | 0.02 | 0.02 | 0.03 | 0.011 | – | |
| 0.03 | 0.05 | 0.04 | 0.05 | 0.075 | – | |
| 0.08 | 0.13 | 0.04 | 0.04 | 0.050 | – | |
| 0.86 | ||||||
| 0.84 | ||||||
| 0.83 |
SM6 Calibration statistics
Table SM16 gives, for each parameter, the -values of the chi-squared and Kolmogorov–Smirnov tests of subsection 6.1 on the replications that pass the convergence gate, and Table SM17 those of the ECDF test. On all replications that finish, without the gate, every study has the same departures. Figure SM6 shows the rank histograms of every parameter at the validation design.
Figure SM6: Rank histograms at the validation design, one panel per parameter of Table 3.1, drawn as in Fig. 6.1. The band spans 10 to 31 counts, and 10 to 32 in the last bin. Four bins lie at its lower limit, one each of , , and .
Table SM16: Simulation-based calibration, gated replications: -values of the chi-squared test on ten bins and of the Kolmogorov–Smirnov test. Real data: two independent studies. A star marks a departure, a -value below .
| validation | real, study 1 | real, study 2 | ||||
|---|---|---|---|---|---|---|
| parameter | KS | KS | KS | |||
| 0.03 | 0.15 | 0.15 | 0.30 | 0.07 | ||
| 0.58 | 0.78 | 0.71 | 0.20 | 0.36 | 0.22 | |
| 0.49 | 0.16 | 0.03 | 0.14 | 0.52 | 0.67 | |
| 0.32 | 0.55 | 0.35 | 0.52 | 0.13 | 0.55 | |
| – | – | 0.18 | 0.85 | 0.92 | 0.74 | |
| 0.48 | 0.43 | 0.28 | 0.17 | 0.63 | 0.98 | |
| 0.48 | 0.65 | 0.45 | 0.81 | 0.83 | 0.40 | |
| – | – | 0.58 | 0.63 | 0.05 | 0.62 | |
| 0.51 | 0.58 | 0.96 | 0.87 | 0.04 | 0.08 | |
| 0.58 | 0.77 | 0.30 | 0.12 | 0.06 | 0.45 | |
| 0.18 | 0.97 | 0.85 | 0.99 | 0.24 | 0.68 | |
| 0.58 | 0.11 | ∗ | 0.07 | 0.98 | 0.70 | |
| 0.18 | 0.07 | 0.16 | 0.05 | 0.65 | 0.12 | |
| 0.81 | 0.97 | 0.08 | 0.04 | ∗ | ||
| 0.40 | 0.17 | 0.10 | 0.03 | 0.55 | 0.64 | |
| replications, gated | 196 | 195 | 188 | |||
| replications, finished | 196 | 200 | 200 | |||
| threshold | 0.0038 | 0.0033 | 0.0033 |
Table SM17: The ECDF test of Säilynoja et al. [38] on the replications of Table SM16: Monte Carlo -value of its statistic against uniform rank samples of the same size. A star marks a departure at the level of Table SM16.
| parameter | validation | real, study 1 | real, study 2 |
|---|---|---|---|
| 0.084 | 0.010 | ||
| 0.89 | 0.46 | 0.23 | |
| 0.18 | 0.16 | 0.82 | |
| 0.88 | 0.73 | 0.41 | |
| – | 0.59 | 0.82 | |
| 0.18 | 0.30 | 0.97 | |
| 0.29 | 0.91 | 0.50 | |
| – | 0.84 | 0.38 | |
| 0.39 | 0.71 | 0.11 | |
| 0.67 | 0.23 | 0.23 | |
| 0.56 | 0.83 | 0.57 | |
| 0.30 | 0.051 | 0.61 | |
| 0.094 | 0.14 | 0.21 | |
| 1.00 | 0.015 | ∗ | |
| 0.17 | 0.098 | 0.54 |
At the validation design, with the ranks of the four replications that do not finish within placed at 0 or at , the smallest chi-squared or Kolmogorov–Smirnov -value over all parameters, gated or ungated, is 0.023, above the threshold . At the uncorrected level 0.05, the ECDF test also rejects at the validation design () and in real-data study 2, and in study 1.
Table SM18 gives the split of the validation study by the true noise scale (subsection 6.2).
Table SM18: The validation study split into thirds by the true noise scale, finished replications: range of the true , the mean of , the true value minus the posterior mean over the posterior standard deviation, and the Kolmogorov–Smirnov -value of the noise scale’s ranks within each third.
| third | true [mm] | replications | mean | KS |
|---|---|---|---|---|
| lower | 0.01–0.22 | 66 | 0.528 | |
| middle | 0.22–0.43 | 65 | 0.011 | |
| upper | 0.43–1.28 | 65 | 0.493 |
The departure in
Table SM19 gives the prior mass outside the domain of subsection 2.4 for prior draws per design. At the real-data design the mass is largest, and the draws outside the domain have a larger than those inside. Table SM20 gives per study , the true minus its posterior mean, over the posterior standard deviation, and the coverage of the central interval. Table SM20 also gives the coverage of the central credible interval of the noise scale, the share of truths strictly inside it. For , the mean of the same is , and in the validation study and real-data studies 1 and 2, each with a standard error of about 0.07, so only in real-data study 2 does its posterior mean lie clearly above the truth on average.
Table SM19: Prior mass outside the domain, from prior draws per design, and the mean of the draws inside and outside the domain (prior mass only at the scaling design).
| mean [mL] | |||
|---|---|---|---|
| design | outside [%] | inside | outside |
| validation | 0.2 | ||
| scaling | 0.7 | – | – |
| real data | 10.5 |
Table SM20: Coverage of the central interval for the noise scale, and for with the mean and standard deviation of , in each calibration study (gated replications).
| study | coverage | mean | sd | coverage |
| validation | 0.888 | 1.009 | 0.893 | |
| real data, study 1 | 0.887 | 0.862 | 0.918 | |
| real data, study 2 | 0.888 | 0.835 | 0.963 |
SM7 The real-data cells
Table SM21 lists the six cells used. The nominal volume of a session is its mean dispensed volume over substrates minus the volume 4.835\text{,}\mathrm{ml}$$ below the knife edge. The dispensed volumes of one session differ from its mean by at most about , small against the scale of the prior on .
Table SM21: The six cells used, one photograph each, with the nominal volume of its session. Substrates are numbered by their day of measurement, as in Fig. 2.1(a).
| substrate | day | session | dispensed [mL] | [mL] |
|---|---|---|---|---|
| 1 | 230509 | 1 | 21.99 | 17.18 |
| 2 | 230512 | 1 | 22.07 | 17.18 |
| 3 | 230519 | 1 | 21.99 | 17.18 |
| 1 | 230509 | 2 | 24.04 | 19.21 |
| 2 | 230512 | 2 | 24.07 | 19.21 |
| 3 | 230519 | 2 | 24.02 | 19.21 |
SM8 The standard component
The standard component of subsection 4.2, of total order three with the SoftPlus rectifier and the noise scale itself as an input, was fitted to the same forward solves as the maps of subsection 4.3, with one noisy radius per solve and the noise scale drawn from its prior. With the noise scale itself as an input, the polynomial stays bounded as while its target in subsection 4.2 diverges, so the argument there holds as well. Against direct sampling, its posterior places the noise scale low at the validation and scaling designs ( and ) and high at the real-data design (), and every other parameter stays within , and . In simulation-based calibration studies of 300 replications, gated as in subsection 6.1, the noise scale departs at the validation and real-data designs (chi-squared 65.59 and 36.60 on nine degrees of freedom, against Bonferroni thresholds of 24.30 and 24.69), and the population mean of the capillary length at the real-data design (28.24). The training data differ as well as the component, so the comparison shows that this standard component fails on this problem, and subsection 4.2 gives the reason.