                   Addressing Misspecification in Simulation-based Inference
                              through Data-driven Calibration


             Antoine Wehenkel * 1 Juan L. Gamella * 2 3 Ozan Sener 1 Jens Behrmann 1 Guillermo Sapiro 1
                                       Jörn-Henrik Jacobsen 2 Marco Cuturi 1


                           Abstract                                 phenomena, it has also necessitated the development of new
                                                                    statistical inference methods. In particular, state-of-the-art
        Driven by steady progress in deep generative
                                                                    simulation-based inference (SBI, Cranmer et al., 2020) algo-
        modeling, simulation-based inference (SBI) has
                                                                    rithms leverage neural networks to learn surrogate models
        emerged as the workhorse for inferring the pa-
                                                                    of the likelihood (Papamakarios et al., 2019), likelihood
        rameters of stochastic simulators. However, re-
                                                                    ratio (Hermans et al., 2020), or posterior distribution (Pa-
        cent work has demonstrated that model misspec-
                                                                    pamakarios & Murray, 2016), from which one can extract
        ification can compromise the reliability of SBI,
                                                                    confidence or credible intervals over the parameters of in-
        preventing its adoption in important applications
                                                                    terest given an observation. While SBI has proven helpful
        where only misspecified simulators are available.
                                                                    when the simulator is a faithful description of the stud-
        This work introduces robust posterior estima-
                                                                    ied phenomenon, e.g., for scientific applications (Delaunoy
        tion (RoPE), a framework that overcomes model
                                                                    et al., 2020; Brehmer, 2021; Lückmann, 2022; Linhart et al.,
        misspecification with a small real-world calibra-
                                                                    2022; Hashemi et al., 2022; Tolley et al., 2023; Avecilla
        tion set of ground-truth parameter measurements.
                                                                    et al., 2022), recent work has also highlighted the unreliabil-
        We formalize the misspecification gap as the so-
                                                                    ity of SBI methods under model misspecification (Cannon
        lution of an optimal transport (OT) problem be-
                                                                    et al., 2022; Schmitt et al., 2023).
        tween learned representations of real-world and
        simulated observations, allowing RoPE to learn a            Addressing Misspecification with a Calibration Set. In
        model of the misspecification without placing ad-           this work, we target important applications of SBI in com-
        ditional assumptions on its nature. RoPE demon-             mon settings where (1) the goal is to estimate a hard-to-
        strates how OT and a calibration set provide a con-         measure variable from indirect but readily available mea-
        trollable balance between calibrated uncertainty            surements of other variables; (2) only misspecified sim-
        and informative inference, even under severely              ulators relating these variables are available; and (3) a
        misspecified simulators. Results on four synthetic          few ground-truth pairings of the hard-to-measure variables
        tasks and two real-world problems with ground-              and the related variables are available in a calibration set1 .
        truth labels demonstrate that RoPE outperforms              Such a setting can arise, for example, when inferring the
        baselines and consistently returns informative and          properties of a patient’s cardiovascular system from non-
        calibrated credible intervals.                              invasive and abundant measurements of other physiological
                                                                    signals (Wehenkel et al., 2023), or when developing soft
                                                                    sensors to monitor industrial processes in real time, where
1       Introduction                                                directly measuring the quantity of interest is costly and
                                                                    time consuming, for example, through laboratory analysis,
Many fields of science and engineering have shifted in re-          but where related variables can be measured quickly and
cent years from modeling real-world phenomena through               inexpensively (Jiang et al., 2021; Perera et al., 2023).
a few equations to relying instead on highly complex com-
puter simulations. While this shift has increased model             Our Contributions. We introduce robust posterior estima-
versatility and the ability to explain or replicate complex         tion (RoPE), an algorithm that addresses model misspecifi-
                                                                    cation to provide accurate uncertainty quantification for the
    *
    Equal contribution 1 Apple 2 Work done while being at Ap-       parameters of black-box simulators. In such misspecified
ple 3 ETH Zürich. Correspondence to: Antoine Wehenkel <awe-
                                                                       1
henkel@apple.com>.                                                      Note that our use of the term calibration set should not be
                                                                    confused with its usage in the context of model mis-calibration
Proceedings of the 42 nd International Conference on Machine        in well-specified SBI (Hermans et al., 2022), as we clarify in
Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025         Appendix A.
by the author(s).

                                                                1
                  Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

settings, the main challenge lies in the absence of a paired           neural posterior estimation NPE (Papamakarios & Murray,
dataset of simulated and corresponding real outputs. To han-           2016; Lueckmann et al., 2017; Radev et al., 2020) is a
dle this knowledge gap, RoPE estimates a coupling between              broadly applicable method that trains a conditional density
real and simulated observations using optimal transport (OT,           estimator of p(θ | xs ) from a dataset of parameter-simulation
Peyré et al., 2017; Villani et al., 2009). The algorithm ex-           pairs. In this paper, we focus on making NPE robust to
tends neural posterior estimation (Papamakarios & Murray,              model misspecification.
2016) and models misspecification using OT. We evaluate
                                                                       NPE usually parametrizes the posterior with a neural condi-
the performance of the algorithm on existing benchmarks
                                                                       tional density estimator (NCDE), which is composed of (1)
from the SBI literature and introduce four new benchmarks,
                                                                       a neural statistic estimator (NSE), denoted by hω : Xs → Rl ,
two of which are synthetic and two come from real physical
                                                                       that compresses observations into l-dimensional representa-
systems. To the best of our knowledge, the latter consti-
                                                                       tions and, (2) a normalizing flow (NF, Papamakarios et al.,
tute the first real-world benchmarks that directly provide
                                                                       2021; Tabak & Vanden-Eijnden, 2010) that parameterizes
a ground truth for the inferred parameters for SBI under
                                                                       the posterior density as pϕ (θ | hω (xs )). The parameters
misspecification. We conduct additional experiments to
                                                                       ϕ and ω of the NCDE are trained with stochastic gradient
investigate the impact on RoPE’s performance of varying
                                                                       ascent on the expected log-posterior probability, solving the
calibration set sizes, prior misspecification, and distribution
                                                                       following optimization problem
shifts, as well as various ablation studies.
                                                                         ϕ⋆ , ω ⋆ ∈ arg max E θ∼p(θ) log pϕ (θ | hω (S(θ, ε))) , (1)
                                                                                                                             
                                                                                       ϕ,ω
2     Background & Notation                                                                  ε∼U [0,1]
                                                                       where p(θ) denotes a prior over the parameters θ.
In this section, we first pose the machine learning problem
we are trying to solve and then formally introduce SBI,                Under the assumption that the class of functions represented
model misspecification, and OT, as our method lies at the              by the NCDE contains the true posterior, solving (1) leads
intersection of these fields.                                          to a surrogate pϕ⋆ (θ | hω⋆ (xs )) that matches exactly the pos-
                                                                       terior p(θ | xs ) corresponding to the simulator. In that case,
We consider a simulator, S : Rk × [0, 1] → Rd , that takes             θ ⊥ xs | hω⋆ (xs ), that is, the NSE hω⋆ is a sufficient statis-
in physical parameters θ ∈ Θ ⊆ Rk and a random seed                    tic of xs for the parameter θ (Chen et al., 2020; Wrede et al.,
ε ∈ [0, 1] to generate simulated measurements xs ∈ Xs ⊆ Rd .           2022; Chan et al., 2018). In practice, we can only approach
The simulator is a simplified version   of a real and unknown          perfect training by generating a sufficiently large number
generative process p⋆ (xo ) := p⋆ (θ)p⋆ (xo | θ)dθ that pro-
                                  R
                                                                       of pairs (θ, xs ) and doing a search on the NCDE’s architec-
duces real-world observations xo ∈ Xo ⊆ Rd . We assume                 ture and training hyperparameters. To simplify notation, we
this process depends on parameters with the same physical              denote the NCDE learned with NPE as p̃(θ | xs ).
meaning as the ones of the simulator and thus use the same
notation θ. Our task is to estimate a well-calibrated and              2.2   Model Misspecification
informative posterior distribution p(θ | xio ) for each observa-
                                                                       In statistics, where the model parameters do not necessarily
tion xio in a test set D, reducing uncertainty compared to the
                                                                       carry real-world meaning, model misspecification generally
prior distribution, assuming that the prior is well-specified.
                                                                       denotes the inability of a model to reproduce the observed
To achieve our goal, we have access to: 1. the misspeci-
                                                                       data distribution. Formally, a parametric model p(xo | θ)
fied simulator S that embeds domain knowledge and gen-
                                                                       is said to be misspecified with respect to some true data-
erates samples whose distribution approximates p⋆ (xo | θ),
                                                                       generating process p⋆ (xo ) if the latter does not fall within
2. a prior p(θ) that approximates the marginal distribution
                                                                       the family of distributions defined by the model, i.e. ∄θ ∈
p⋆ (θ) of parameters in the real-world, 3. a small calibration
                                                                       Θ : p(xo | θ) = p⋆ (xo ) ∀xo (Cannon et al., 2022). In
set of labeled real-world observations C := {(θi , xio )}ni=1c
                                                                       contrast, we are not necessarily interested in reproducing
composed of i.i.d. samples from p⋆ (θ, xo ), which enables
                                                                       the observed data xo but only in inferring the parameter
data-driven correction of the simulator’s misspecification, 4.
                                                                       value θ from an observation xo . For this goal, naively using
a test set D := {xio }ni=1
                         o
                            of real-world observations arising
        ⋆                                                              the standard definition is insufficient, as a model may be
from p (xo ) for which we want to estimate the posterior.
                                                                       well-specified but still produce incorrect credible intervals
2.1   Simulation-based Inference (SBI)                                 for the parameters of interest θ. This undesired behavior may
                                                                       happen, for example, if the model is over-parameterized, as
Applying statistical inference to simulators is challenged             illustrated in Appendix A.
by the absence of a tractable likelihood function (Cranmer
et al., 2020). As a solution, SBI algorithms leverage mod-             Thus, in this work, we define model misspecification dif-
ern machine learning methods to tackle inference in this               ferently and align it with the setting motivated in Section 1.
likelihood-free setting (Lueckmann et al., 2021; Delaunoy              Intuitively, we describe model misspecification as the non-
et al., 2022; Glöckler et al., 2022). Among SBI algorithms,            transferability of the posterior obtained from the simulator

                                                                   2
                     Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

to the prediction of real-world parameters. Formally, we                rely on OTT (Cuturi et al., 2022) to return such a coupling
assume that the pairs of parameters and observations (θ, xo )           P ⋆ , given the cost matrix C and the parameters γ and ρ,
are i.i.d. from an unknown distribution p⋆ (θ, xo ), which im-          parameterized as τ = ρ/(ρ + γ). Setting τ = 1 amounts to a
plicitly defines p⋆ (θ | xo ), the Bayes optimal predictor of the       perfectly balanced transport.
parameter given an observation. Under this premise, we say
a simulator is misspecified if ∃S ⊆ Θ × X : ∀(θ, xo ) ∈ S,              3    RoPE: Modeling Misspecification with OT
                 ⋆           ⋆
         p(θ) = p (θ) and p (θ | xo ) ̸= p(θ | xs = xo ).               In this section, we formally introduce our robust posterior
                                                                        estimation algorithm (RoPE) and highlight some benefits
Following this definition, we frame the problem of model
                                                                        of modeling misspecification with OT. RoPE approaches
misspecification in SBI as a learning task where our goal
                                                                        the problem of misspecification as a hybrid modeling task
is to find a good estimator of p⋆ (θ | xo ). As we assume the
                                                                        by combining the simulator with a misspecification model
simulator provides strong domain knowledge, we focus on
                                                                        learned from the few observations in the calibration set. The
the challenging settings where the dataset of labeled real
                                                                        main modeling assumption of RoPE is
observations D := {(θi , xio )}ni=1 that we have for learning
p⋆ (θ | xo ) is small. In such settings, most examples must                                       xo ⊥ θ | xs ,                      (3)
be saved for testing and only a small subset, denoted by the            that is, given the simulated observations xs , the real ob-
calibration set C , remains available for training.                     servations xo contain no additional information about the
                                                                        parameters θ. As a consequence, we can express the      pos-
2.3     Semi-balanced Optimal Transport (OT)                                                                                  R
                                                                        terior for real-world observations as p(θ | xo ) = p(θ |
As further motivated in Section 3, RoPE models the misspec-             xs )p(xs | xo )dxs , where p(θ | xs ) is easily approximated
ification between simulations and real-world observations as            with NPE. On the other hand, the conditional p(xs | xo ),
an OT coupling. For readers unfamiliar with OT, a coupling              which can be attributed to misspecification, is what RoPE
between two distributions—e.g., p(xs ) and p(xo )—is a dis-             intends to learn by estimating an OT coupling (that is then
tribution π ⋆ (xs , xo ) on the product space whose marginals           conditioned on x0 , c.f. 4).
coincide with those two distributions while minimizing an               While this assumption introduces an information bottleneck,
expected cost Eπ⋆ [c(xo , xs )]. The function c : Xo × Xs → R           it does not prevent the method from achieving calibrated
assigns a cost to any pair (xo , xs ) ∈ Xo × Xs .                       and informative posterior distributions—even if the assump-
In our setting, we can access a limited number no of                    tion is only partially met in practice (e.g., tasks E and F in
real-world observations {xio }ni=1   o
                                       , which we assume are            Figure 2). In fact, it acts as a regularizer, enabling the learn-
i.i.d. from the unknown distribution p⋆ (xo ). Writing                  ing of a generalizable misspecification model from only a
C := [c(xio , xjs )]ij for the cost matrix between observed and         small calibration set, and it ensures that predictions remain
simulated data, we solve the discrete semi-balanced (Rabin              grounded in the expert knowledge embedded in the simu-
et al., 2014) and entropy-regularized (Frogner et al., 2015)            lator. This bottleneck can be limiting for simulators that
OT problem. This formulation preserves a strict marginal                are highly misspecified and fail to model the dependencies
constraint on the observed data, but relaxes the marginal               between parameters and observations. However, when the
constraint on the simulated data, thus allowing certain simu-           simulator encodes phenomena the practitioner believes to
lations xs to be discarded or down-weighted. Namely, given              be invariant across different application environments, the
a set {xjs }nj=1
              s
                  of simulated observations, we search for the          assumption forestalls “shortcut learning” (Geirhos et al.,
non-negative transport matrix P ⋆ ∈ Bo that satisfies the left          2020) from the calibration data and improves generaliza-
marginal constraint,                                                    tion. In Appendix D, we illustrate this property using real
          n                                           o                 out-of-distribution data.
                no ×ns Pns
      Bo = P ∈ R+     : j=1 Pij = n1o ∀i = 1, ..., no
                                                                        Intuitively, the discrete OT coupling P ⋆ between the two
and solves                                                              point clouds {xis }ni=1
                                                                                             s
                                                                                                and {xis }ni=1
                                                                                                            o
                                                                                                               obtained from solving (2)
                            
                                      1n
                                         
                                                                        can be seen as an approximation of a joint distribution π ⋆ in
P ⋆ = arg min ⟨P, C ⟩ + ρ KL P T 1no ∥ s + γ⟨P, log P ⟩,                Xo × Xs when τ = 1 (see Appendix E for further discussion).
         P ∈Bo                        ns
                                                         (2)            Then, the modeled misspecification π ⋆ , together with our
where 1n is a vector of ones with size n and KL is the                  modeling assumption (3), defines the posterior distribution
Kullback-Leibler divergence. Therefore, a larger ρ > 0                  for real-world observations
                                                                                                 Z    as
promotes a coupling that fits the marginal of simulated data                       p(θ | xo ) =    p(θ | xs )π ⋆ (xs | xo )dxs ,     (4)
more closely, and γ > 0 is a hyperparameter that encourages
                                                                        where the posterior p(θ | xs ) can be approximated very pre-
entropic transport matrices. This problem can be solved
                                                                        cisely with NPE (Papamakarios & Murray, 2016) as NFs are
with a variant of the Sinkhorn algorithm (Cuturi, 2013) with
                                                                        universal density estimators of continuous distributions (We-
efficient GPU implementations. In our experiments, we

                                                                    3
                        Addressing Misspecification in Simulation-based Inference through Data-driven Calibration
                                                                                                                                         R
henkel & Louppe, 2019; Draxler et al., 2024).                                    terior distribution over the test set, i.e., p̃(θ) := p̃(θ |
                                                                                 xo )p⋆ (xo )dxo , converges to the prior distribution as the
We approximate π ⋆ by computing the OT coupling P ⋆ be-
                                                                                 number of simulated observations Ns approaches infinity,
tween the test set D and a set {xjs }nj=1
                                       s
                                          of ns simulations
                                                                                 as expected from a well-estimated posterior distribution. A
generated by running the simulator on parameters from the
                                                                                 proof and further discussion of this self-calibration property
given prior θj ∼ p(θ). The cost function is defined in the
                                                                                 is given in Section F. Second, a control mechanism for the
next section. Thus, RoPE estimates the posterior for real-
                                                                                 posteriors’ confidence: the entropic regularization of OT
world observations as a mixture of the posteriors p̃ obtained
                                                                                 not only enables fast computation of the transport coupling
with NPE, that is,
                        ns                                                       but also provides an effective control mechanism to bal-
      p̃(θ | xio ) :=         αij p̃(θ | xjs ), where αij = no Pij
                                                                ⋆                ance the calibration of the posterior with its informativeness.
                        X
                                                                   .   (5)
                        j=1                                                      Indeed, for small entropic regularization, the estimated pos-
                                                                                 teriors have low entropy and may be overconfident, as they
3.1     Defining the OT Cost Function                                            are sparse mixtures of a few simulation posteriors p̃(θ | xjs ).
                                                                                 In contrast, for large values of γ in (2), the coupling matrix
In our setting, an ideal coupling would pair a real-world
                                                                                 becomes uniform and the corresponding posteriors tend to
observation with simulations generated by the same pa-
                                                                                 the prior, as p(θ | xo ) ≈ n1s nj s p̃(θ | xjs ) is a Monte-Carlo
                                                                                                               P
rameters. Hence, the cost function should be insensitive
                                                                                 approximation of Ep(xs ) [p̃(θ | xs )] ≈ p(θ). Thus, the practi-
to variation in the data (e.g., noise) that is independent of
                                                                                 tioner can optimize the hyper-parameter γ to find the right
θ. Formally, we can write c(xo , xs ) = c(ho (xo ), hs (xs )),
                                                                                 trade-off between calibration of the estimated posteriors,
where ho and hs are sufficient statistics for θ with respect
                                                                                 favored by higher γ , and their informativeness, favored by
to xo and xs , respectively.
                                                                                 lower γ . Finally, robustness to prior misspecification: by
A key concern is to find a meaningful way to learn ho , the                      enabling the transport to be unbalanced—that is, to discard
sufficient statistic for the real observations. As discussed                     simulated observations when τ < 1—RoPE can flexibly
in Appendix G, we can learn an approximate minimal suffi-                        depart from the assumed marginal distribution of p(θ) and
cient statistic hω⋆ for the simulated observations with NPE.                     be robust to prior misspecification. Thus, the parameter τ
Because the simulator carries information about the true                         can be seen as a control mechanism to account for the user’s
generative process, our approach is to fine-tune hω⋆ using                       confidence in the prior distribution. In the rest of the text,
the calibration set, which is otherwise too small to learn                       we denote the method as RoPE⋆ when τ < 1 and as RoPE
a representation from real-world data only. Denoting the                         when τ = 1. In Section 5.1, we provide guidance on how to
fine-tuned neural network as gφ : Xo → Rl , the fine-tuning                      set γ and τ in practice.
objective reads
                 nc                                                            4    Related Work
                        |gφ (xio ) − Eε∼U [0,1] [hω⋆ S(θi , ε) ]|2 , (6)
                 X
  L(φ; C) :=
                  i=1                                                            The problem we address shares fundamental similarities
where the expectation is approximated via a Monte-Carlo                          with sim2real transfer learning, where the goal is to bridge
approximation. The training of g starts from the weights                         the gap between simulated and real-world data. In robotics
ω ⋆ and optimizes (6) with gradient descent. Optimizing                          and computer vision, this challenge has been tackled
(6) enforces, at least on the calibration set, that g and h                      through domain randomization (Tobin et al., 2017), which
are close in L2 norm when applied to observations from                           increases simulation diversity to improve real-world gener-
the same parameter θ. Thus, we define the OT cost as                             alization, and domain adaptation techniques (Ganin et al.,
c(xo , xs ) := |gφ⋆ (xo ) − hω⋆ (xs )|2 , where gφ⋆ is the NSE                   2016; Long et al., 2015; Bousmalis et al., 2018) that learn
obtained after fine-tuning (6). Figure 4 in Appendix B                           domain-invariant representations. However, unlike these
depicts RoPE’s training and inference steps. We discuss the                      approaches that typically focus on point predictions, RoPE
computational cost of RoPE in Section H.                                         addresses the more challenging problem of transferring un-
                                                                                 certainty quantification from simulation to reality while
3.2     On the benefits of using optimal transport to                            preserving calibration properties.
        handle misspecification
                                                                                 The setting we consider also naturally connects to semi-
While we could have chosen other approaches to model                             supervised learning (Zhu, 2005), as both involve leveraging
p(xs | xo )—e.g., conditional deep generative models—                            abundant unlabeled data alongside limited labeled exam-
several attractive properties directly follow from modeling                      ples. Our setup with the calibration set resembles few-shot
the misspecification as an OT coupling between simulated                         learning scenarios (Wang et al., 2020), where rapid adapta-
and real-world measurements. First, a self-calibration                           tion occurs with minimal labeled examples. While classical
property: by modeling the posterior as (5), when τ = 1                           semi-supervised methods focus on exploiting unlabeled data
(i.e., the transport is perfectly balanced), the marginal pos-                   for classification or regression tasks, our approach differs in

                                                                             4
                  Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

that it leverages a large set of labeled data obtained through           Task A & B (synthetic): CS & SIR . We reproduce the
simulation. Crucially, unlike standard semi-supervised or                cancer and stromal cell development (CS) and the stochastic
few-shot learning, where labeled and unlabeled data come                 epidemic model (SIR) benchmarks from Ward et al. (2022).
from the same distribution, we must explicitly account for               We provide a description of the parameters, observations
the distributional mismatch between simulated and real ob-               and synthetic misspecification in Appendix I.1
servations.
                                                                         Task C (synthetic): Pendulum. The damped pendulum
In both likelihood-based and simulation-based inference set-             is a common benchmark for hybrid learning algorithms
tings, model misspecification has recently gained substan-               (Takeishi & Kalousis, 2021; Yin et al., 2021; Wehenkel et al.,
tial interest from the research community. Among devel-                  2022) that leverage both domain knowledge and real-world
oped strategies, works that take inspiration from generalized            data. The simulator outputs the horizontal position of a
Bayesian inference (Bissiri et al., 2016) are numerous (Del-             frictionless pendulum given its fundamental frequency ω0 ∈
laporta et al., 2022; Chérief-Abdellatif & Alquier, 2020;                R+ and amplitude A ∈ R+ , with randomness introduced via
Matsubara et al., 2022; Pacchiardi & Dutta, 2021; Schmon                 a phase shift and white measurement noise. As misspecified
et al., 2020; Gao et al., 2023; Frazier et al., 2023). In the spe-       “real-world” data, we generate observations from a damped
cific context of SBI, recent works (Ward et al., 2022; Huang             pendulum with friction.
et al., 2023; Kelly et al., 2023) have investigated solutions
                                                                         Task D (synthetic): Hemodynamics. Following Wehenkel
to improve the robustness of existing neural-network-based
                                                                         et al. (2023), we define the task of inferring the stroke vol-
SBI methods to model misspecification, detecting it at in-
                                                                         ume (SV) and the left ventricular ejection time (LVET)
ference time (Schmitt et al., 2023). Similarly, Frazier et al.
                                                                         from normalized arterial pressure waveforms. The simula-
(2020) studied the impact of misspecification on approxi-
                                                                         tor is a PDE solver (Melis, 2017) that produces an 8-second
mate Bayesian computation methods (ABC, Rubin, 1984),
                                                                         time-series xs sampled at 125Hz. As synthetic misspecifica-
introducing diagnostics to detect it and proposing strategies
                                                                         tion, the simulator assumes all arteries have constant length,
to make ABC robust. For the interested reader, Nott et al.
                                                                         whereas this parameter varies in the “real-world” data.
(2023) review restricted likelihood methods, Bayesian mod-
ular inference, and parametric projection methods, which                 Task E (real): Light Tunnel. We employ one of the light
are standard frameworks to handle model misspecification                 tunnel datasets from Gamella et al. (2025). The tunnel is an
in likelihood-based Bayesian inference.                                  elongated chamber with a controllable light source at one
                                                                         end, two linear polarizers mounted on rotating frames, and
In contrast to these approaches, we frame model misspecifi-
                                                                         a camera. Our task consists of predicting the color setting
cation in SBI as a learning problem, recognizing that if the
                                                                         of the light source ((R, G, B) ∈ [0, 255]3 ) and the dimming
ultimate goal is to perform inference over parameters for
                                                                         effect of the polarizers α ∈ [0, 1] from the captured images.
downstream decision-making, it is essential to have a test
                                                                         The simulator takes the parameters θ := [R, G, B, α] and
set to empirically validate the performance of any inference
                                                                         produces an image consisting of a hexagon roughly the size
procedure. RoPE leverages a small subset of this test set as
                                                                         of the light source, with a color equal to [αR, αG, αB].
a calibration set to overcome the modeled misspecification
in a supervised manner.                                                  Task F (real): Wind Tunnel. We employ one of the wind
                                                                         tunnel datasets from Gamella et al. (2025). The tunnel is
5    Experiments                                                         a chamber with two controllable fans that push air through
                                                                         it, and barometers that measure air pressure at different
Our experiments aim to (1) empirically validate the discus-
                                                                         locations. A hatch controls the area of an additional opening
sion in Section 3.2, and (2) illustrate settings in which RoPE
                                                                         to the outside. The dataset is a collection of pressure curves
enables uncertainty quantification under model misspeci-
                                                                         that result from applying a short impulse to the intake fan
fication and small calibration datasets. The experiments
                                                                         power and measuring the change in air pressure inside the
comprise two existing benchmarks from the SBI literature,
                                                                         tunnel. Our inference task consists of predicting the hatch
two synthetic benchmarks, and two new benchmarks from
                                                                         position, θ := H ∈ [0, 45] given a pressure curve. As a
real physical systems for which both labeled data and simu-
                                                                         simulator model, we adapt the physical model given in
lators are available. While these benchmarks remain simpli-
                                                                         Gamella et al. (2025, Appendix IV).
fied versions of real-world scenarios, they represent various
types of misspecification with varied parameter and obser-               Metrics. We consider two metrics to assess whether RoPE
vation spaces, allowing us to study RoPE’s performance                   provides reliable and useful uncertainty quantification. First,
under diverse configurations. We briefly describe each task              given a labeled test set {(θi , xio )}ni=1 , we compute the log-
                                                                         posterior probability (LPP) as LPP := n1 ni=1 log p̃(θi |
                                                                                                                            P
and provide examples of real vs. simulated observations
in Figures 1 and 2. Further details about the experimental               xio ) ≈ Ep(θ,xo ) [log p̃(θ | xo )] . The LPP, also called the neg-
setup can be found in Appendix I.                                        ative log probability of the true test parameter (NLTP), is


                                                                     5
                        Addressing Misspecification in Simulation-based Inference through Data-driven Calibration


  Task A CS
                                               LPP (better = higher values)                                    ACAUC (better = closer to zero)
  Synthetic benchmark
                                        SBI
                                                                                                                  tuning-only
                                                                                             J-NPE
                                                                                                     NPE-RS
                                                RoPE*                                                  NPE
  Observations                       OT-only
                                                                                                                                                     J-NPE
                                                RoPE                                                                MLP
                                                                             MLP                      NNPE

                                       Prior
                                      NNPE                                                              SBI                       RoPE
                                     NPE-RS                                                            Prior
                                        NPE                                                          OT-only
                                                                                                                                  RoPE*
                                                                                   tuning-only

     Simulated           Real




  Task B SIR                                   LPP (better = higher values)                                    ACAUC (better = closer to zero)
  Synthetic benchmark
                                        SBI
                                       NPE
                                     NPE-RS      tuning-only                                                      MLP
                                                                                 J-NPE
                                      NNPE
                                                                                                                                    J-NPE
  Observations                                  RoPE*             RoPE
                                     OT-only                                                         NPE-RS
                                                                                                                    tuning-only
                                                                                                       NPE
                                                                                                        SBI
                                       Prior
                                                                                                       Prior

                                                   MLP
                                                                                                                RoPE                            RoPE*
                                                                                                      NNPE
                                                                                                     OT-only
    Simulated           Real




 Task C Pendulum                               LPP (better = higher values)                                    ACAUC (better = closer to zero)
  Synthetic benchmark
                                        SBI
                                                                                                                                             HVAE
                                                                                                                                                    tuning-only
                                                                                                     NPE-RS
  Observations                                                    RoPE                                  NPE
                                                                                                      NNPE
                                                                    RoPE*                    J-NPE
                                     OT-only                                                                            MLP
                                       Prior                                                                                                         J-NPE
                                      NNPE        HVAE
                                       NPE                                                           OT-only
                                                               tuning-only
                                                                                                       Prior
                                                                 MLP                                    SBI     RoPE

                                                                                                                                             RoPE*

      Simulated          Real




 Task D Hemodynamics                           LPP (better = higher values)                                    ACAUC (better = closer to zero)
  Synthetic benchmark
                                        SBI

                                                                                                                   tuning-only
                                                                         J-NPE
                                                RoPE
                                     OT-only
  Observations                                                  RoPE*
                                                                                                       NPE
                                                                                 MLP                 NPE-RS
                                       Prior                                                                                         J-NPE
                                      NNPE
                                       NPE                                                                                    MLP
                                     NPE-RS                                                           NNPE
                                               tuning-only
                                                                                                       Prior
                                                                                                        SBI
                                                                                                     OT-only
                                                                                                                RoPE*             RoPE


       Simulated          Real




Figure 1: Results for our method (RoPE) and the competing baselines on six benchmark tasks. For each task, we show an example of
the real observations (xo ) and the observations produced by the misspecified simulator (xs ). We show each method’s LPP and ACAUC
metrics, as computed on a labeled test set of size 2000. Horizontal lines without markers correspond to the methods that do not use the
calibration set, producing a constant score. We report the average metrics and ±1 std. deviation over three random draws of the test set
and additional sources of randomness. In some instances, e.g., J-NPE or NPE-RS in task C, the likelihood can be −∞ and is not plotted.
For readability of the LPP metric, we use a linear scale between the SBI and the Prior and a logarithmic scale for values below that.



                                                                                         6
                         Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

  Task E Light Tunnel                              LPP (better = higher values)                                           ACAUC (better = closer to zero)
  Real-world benchmark
                                           SBI                                                                             J-NPE

                                                                                                                 NPE
                                                             RoPE*          tuning-only                                                    HVAE
  Observations                                                                                                  NNPE
                                                                                                J-NPE
                                                                     RoPE
                                                                                     MLP
                                                                                                               OT-only
                                           Prior
                                       OT-only                                                                 NPE-RS
                                       NPE-RS                                                                                      MLP                   tuning-only
                                         NNPE
                                                                                                                  SBI
                                                                                  HVAE                           Prior                   RoPE           RoPE*
                                          NPE

       Simulated           Real




 Task F Wind Tunnel                                LPP (better = higher values)                                           ACAUC (better = closer to zero)
  Real-world benchmark
                                          SBI
                                                                                                               NPE-RS
                                                                                                                                                                tuning-only

  Observations                                                                                                   NNPE
                                                                                          MLP
                                                                                                                                                                  J-NPE
                                                    RoPE*                                                                                         MLP
                                       OT-only

                                         Prior        RoPE
                                                                                                                                            RoPE*
                                        NNPE
                                                                                     tuning-only
                                                                                                                  Prior                     RoPE
                                                             J-NPE
                                                                                                                OT-only
                                      NPE-RS
                                        NPE                                                                        SBI

      Simulated            Real




                   Figure 2: Continuation of Figure 1 above. For task F, the ACAUC of the NPE baseline is -0.5 and not shown.
an empirical estimation of the expectation over possible                                           simulated data and thus provides an upper bound on the LPP
observations of the negative cross entropy between the true                                        for RoPE under the independence assumption xo ⊥ θ | xs
and estimated posterior; thus, for an infinite test set, it                                        (see Appendix I for more details); (NPE) a posterior esti-
is only maximized by the true posterior. LPP character-                                            mator fitted to the simulated data and applied to the real
izes the entropy reduction on the estimation of θ achieved                                         data; and (J-NPE) a posterior estimator trained jointly on
by a posterior estimator p̃ when given one observation,                                            the pooled simulated and real observations. The latter two
on average, over the test set. Second, the average cov-                                            baselines represent some first approaches that a practitioner
erage AUC (ACAUC) indicates the average calibration                                                may consider. Furthermore, to asses how a fully supervised
of k 1D credible intervals extracted from Rthe estimated                                           approach would fare if trained directly on the calibration set,
                                    1 Pk        Pn      1        i
posteriors, i.e., ACAUC := kn               j=1   i=1 0 α − 1[θj ∈                                 we compare the performance of RoPE to MLP, which trains
Θp̃(θj |xio ) (α)]dα, where Θp̃(θj |xio ) (α) denotes the credible in-                             a neural network to predict the mean and log-variance of a
terval for the jth dimension of the parameter θ at level α. Its                                    Gaussian posterior distribution by maximizing the calibra-
value is positive (resp. negative) if, on average over different                                   tion set log-likelihood. We train both the MLP and J-NPE
credible levels, parameter dimensionality, and observations,                                       baselines in a supervised way, and we thus expect these
the corresponding credible intervals are overconfident (resp.                                      baselines to perform strongly as the size of the calibration
underconfident). The ACAUC of a perfectly specified prior                                          set becomes sufficiently large and the test data is i.i.d. We
distribution is zero. The integral can be efficiently approxi-                                     also run NPE-RS (Huang et al., 2023), which trains a robust
mated, as described in Appendix J. ACAUC does not capture                                          version of NPE with a regularization loss that forces the dis-
joint calibration, as dependencies between parameters are                                          tributions of NSE on simulated and test data to match. For a
not explicitly assessed. Alternative dependence-sensitive                                          fair comparison with RoPE, we use the n = 2000 test exam-
metrics may require larger test sets to be stable. For all                                         ples to compute the regularization, informing NPE-RS as
experiments, we compute the LPP and ACAUC on labeled                                               much as possible. We additionally run Noisy NPE (NNPE,
test set containing 2000 pairs (θ, xo ).                                                           Ward et al., 2022), the amortized version of RNPE intro-
                                                                                                   duced in the same paper, which improves the robustness
Baselines. As a sanity check, we compare the performance                                           of NPE by introducing a Spike and Slab error model on
of RoPE against four reference baselines: the prior p(θ),                                          simulated data statistics. We also run HVAE (Takeishi &
which amounts to the lower bound on the LPP for any cali-                                          Kalousis, 2021), which constitutes a strong baseline when
brated posterior estimator when the prior is well-specified;                                       the simulator can be made differentiable (tasks C and E) but
the SBI posterior, which is an NPE trained and tested on                                           is not directly applicable otherwise. More details about the

                                                                                            7
                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

experimental setup can be found in Appendix I.                        we observe that the results for tuning-only are poor except
                                                                      for Task B, where misspecification is negligible. In con-
5.1   Results                                                         trast, for tasks A, D, and F, OT-only exhibits performance
Figure 1 compares the performance of RoPE and the other               on par with RoPE. Nevertheless, RoPE can significantly
methods and baselines on the six tasks we consider with               outperform OT-only, such as in tasks C and E where the
a correctly specified prior. To demonstrate that applying             misspecification is significant. We conclude that the OT
RoPE is straightforward, we deliberately fix γ = 0.5 for              step is crucial and fine-tuning is sometimes necessary. In
RoPE and τ = 0.9 for RoPE⋆ in all tasks. In Figure 3, we              practice, we recommend to first evaluate the performance
further study the role of these hyperparameters in optimizing         of OT-only on the test set, and optimize γ before using a
performance.                                                          subset of the test samples for fine-tuning.

RoPE achieves robust posterior estimation for all tasks.              Effect of entropic regularization—setting γ . In Figure 3a,
As mentioned above, the SBI and prior baselines provide               we study the effect of entropic regularization by varying the
upper and lower bounds on the expected performance of                 regularization parameter γ . For all values of γ , excluding
a well-calibrated posterior estimator, under the modeling             γ ≥ 5, we observe that both LPP and ACAUC consistently
assumption made in Section 3. For all tasks, even with                improve with the calibration set size. For large values of γ ,
minimal calibration budgets, RoPE is the only method that             the entropic regularization dominates and pushes toward a
consistently returns well-calibrated, or sometimes slightly           uniform mapping, resulting in posteriors that approximate
under-confident, posterior estimates while significantly re-          the prior distribution and are barely affected by the calibra-
ducing uncertainty compared to the prior distribution. As             tion set size. These empirical results are consistent with the
the size of the calibration set increases, we see that J-NPE          theoretical discussion in Subsection 3.2. As a recommen-
and MLP adapt and their performance improves and aligns               dation for practitioners, our empirical evaluation suggests
with or outperforms RoPE. This adaptability is an expected            that values between 0.1 and 1 provide well-calibrated and
behavior in i.i.d. settings, where real-world data eventu-            precise credible intervals. Ideally, the practitioner shall keep
ally allows finding the minimizer of empirical risk among             a portion of the calibration set for validation, using it to
a class of predictors. Nevertheless, these two baselines              optimize γ based on the metrics of interest. If this is not
tend to be overconfident even for larger calibration sets,            possible, we recommend employing γ = 0.5, which offers
as highlighted by their positive ACAUC numbers, which                 sharp and calibrated posteriors on all our benchmarks.
are significantly larger than RoPE’s in almost all configura-         RoPE⋆ for prior misspecification—setting τ . We now
tions. Moreover, on task E, where posteriors are complex              study the impact of prior misspecification on RoPE and its
conditional distributions—whose entropy increases with                unbalanced version RoPE⋆ . In Figure 3, we compare the per-
darker images and contain non-trivial dependencies between            formance of RoPE (γ = 0.5 and τ = 1) and RoPE⋆ (γ = 0.5
parameters—RoPE remains the best approach, even with                  and varying τ ) on extensions of Task E and C, where the
a calibration set containing more than 1000 examples. As              ground-truth parameters of the test dataset come from distri-
an outlier, we observe that NPE trained on simulated data             butions different to the assumed prior distributions. For task
achieves the best results for the SIR benchmark (Task B),             E, we observe that RoPE’s performance is robust to the prior
indicating that the misspecification of this benchmark is not         misspecification; it provides well-calibrated and informative
a challenging test case for existing SBI methods and may              posteriors, as is also visible in the corner plots of Figure 5
not be a meaningful test for methods that cope with model             in Appendix C. While the gap between RoPE and RoPE⋆ is
misspecification. Finally, because interpreting these metrics         negligible in the case of a well-specified prior (see Task E in
can be difficult, we complement these numerical results with          Figure 1), under prior misspecification RoPE⋆ leverages the
corner and calibration plots for all tasks in Appendix K.             additional flexibility in the OT solution and discards some of
Ablation study. RoPE combines two steps with distinct                 the simulated observations, achieving higher LPP. Similarly,
roles, shown in Figure 4, Appendix B: (1) a fine-tuning               for Task C in Figure 3c, when there is no prior misspecifica-
step, which improves the domain generalization of the NSE;            tion, RoPE (i.e, τ = 1) achieves the best performance; using
and (2) an OT step, aiming to model the misspecification              lower values of τ becomes preferable as prior misspecifi-
as a coupling between simulations and observations. To                cation increases. From these experiments, we recommend
better understand their respective contribution to the per-           leveraging τ as a hyperparameter describing the confidence
formance of RoPE, we look at two ablated versions of our              in the assumed prior distribution—setting its value to 0.9
algorithm: tuning-only which appends the fine-tuned NSE               offers robust performance for both well-specified and par-
to the NF trained on simulated data and directly applies it           tially misspecified priors. The user shall also explore lower
to the real observations without an OT step; and OT-only,             values when there is suspicion that the prior distribution is
which directly performs OT with L2-norm in the original               overly spread with respect to the correct prior.
NSE space c(xo , xs ) = |hω⋆ (xo ) − hω⋆ (xs )|2 . In Figure 1,

                                                                  8
                         Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

    A Entropic regularization          B Robustness to prior misspeciﬁcation                                                          C OT balance parameter
      Task E - Light Tunnel                   Task E - Light Tunnel                                                    LPP                Task C - Pendulum
                                LPP
                                                                                                                                                              LPP
                                             Simulator                Observations
                                               Prior A                   Prior B
                                             uniform dist.           betabinomial dist.




                              ACAUC
                                                                                                                     ACAUC
                                      min.                   max.   min.               max.
                                                                                                                                                              ACAUC



                                                                                                                                      Simulator prior

                                             real data                     real data                                                  True prior

                                                                                              ROPE     ROPE* - 0.9      ROPE* - 0.5


Figure 3: (a) Effect of γ on the LPP and ACAUC scores of RoPE on the light-tunnel task for different sizes of the calibration set. The
value of γ is shown by each curve. For reference, we plot the metrics achieved by the SBI posterior and prior distribution on simulated
data. (b-c) Effect of τ ∈ [0.1, 1] under a prior misspecification in Task E (b); and for various levels of prior misspecification in task C (c).
6      Discussion                                                                                    servations may cause the posterior to revert to the prior. In
                                                                                                     the more challenging scenario where p̃ and p⋆ have disjoint
While Section 5 demonstrates the effectiveness of RoPE,                                              support, even arbitrarily large calibration sets may fail to pro-
opportunities for future work remain, which we discuss now.                                          vide relevant training examples, making fine-tuning highly
Curse of dimensionality. While our experiments focused                                               dependent on out-of-distribution generalization. Here, the
on low-dimensional parameter spaces, as is common for                                                OT step is expected to highlight this issue, as the lack of
many applications of SBI, the dimensionality of θ may                                                meaningful matches will cause the transport matrix to be-
impact two critical parts of RoPE. First, with each addi-                                            come uniform, leading the posterior to revert to the prior.
tional parameter θk+1 , given xo , the NSE must encode up                                            Appendix L further investigate RoPE’s sensitivity to these
to K dependencies between θk+1 and the other dimensions                                              practical challenges, on the Light Tunnel task, using a cali-
θ1 , . . . , θk . While generating more simulations can address                                      bration set from a different prior than the test set, approxi-
the curse of dimensionality in the simulation space, fine-                                           mating the ’same support’ scenario.
tuning on a small calibration may no longer suffice to cope                                          Other extensions. Similar to incomplete labels, in certain
with misspecification. Second, the dimensionality of the                                             applications we may only have access to noisy labels, mea-
manifold on which the NSE projects the simulated and real-                                           sured with a well-modeled but noisy measurement process.
world observations will grow, and finding a meaningful                                               Further developing the fine-tuning stage to exploit such
coupling between the two populations may require larger                                              noisy labels would be necessary to make an approach simi-
sample sizes. A potential solution is to focus on marginal                                           lar to RoPE applicable. Our strategy of modeling misspec-
or 2D posterior distributions and ignore higher-dimensional                                          ification as an OT coupling opens up several avenues to
dependencies in p(θ | xo ). Nevertheless, extending RoPE to                                          address more specific problem setups. For example, we can
such settings certainly opens new questions, e.g., concern-                                          leverage the inductive bias in the neural network architec-
ing the development of better fine-tuning strategies that can                                        ture of neural OT to better cope with large test sets. This
leverage calibration sets with incomplete labels.                                                    appears as a promising direction to amortize the mapping
Non-iid Calibration Sets. An important assumption made                                               between simulation and real-world data.
by RoPE is that the calibration set contains i.i.d. samples                                          Conclusion. Motivated by important applications where
drawn from the same distribution p⋆ (θ, xo ) as the test data.                                       SBI is not applied due to its sensitivity to model misspecifi-
However, practical constraints may lead to calibration data                                          cation, we have introduced RoPE, a method that jointly ex-
being collected from a different, potentially biased, dis-                                           ploits a calibration set and optimal transport to extend neural
tribution p̃(θ, xo ). We identify two main scenarios. If p̃                                          posterior estimation for misspecified simulators. Our experi-
and p⋆ share the same support, the fine-tuning step can                                              ments on diverse benchmarks demonstrate RoPE’s ability to
still correct for the distributional shift, especially with a                                        estimate calibrated and informative posterior distributions
sufficiently large calibration set. For smaller sets, RoPE’s                                         for various simulators and real-world examples. Overall,
robustness hinges on the neural statistic estimator’s (NSE)                                          we have framed model misspecification as a challenge in
ability to generalize. Moreover, the optimal transport (OT)                                          transferring predictive models from simulated to real-world
step provides additional resilience: observations where the                                          data. Our work highlights the need for a labeled test set to
fine-tuned NSE performs well will be accurately matched,                                             validate inference quality, encouraging future research to
leading to reliable posteriors, while poorly generalized ob-                                         treat misspecification as a machine learning problem.

                                                                                                9
                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

Acknowledgements                                                       References
The authors would like to acknowledge Michal Klein for his             Avecilla, G., Chuong, J. N., Li, F., Sherlock, G., Gresham,
help with OTT library and Maria Cervera, Laura Manduchi,                 D., and Ram, Y. Neural networks enable efficient and
Joe Futoma, Andy Miller and Pierre Ablin for providing                   accurate simulation-based inference of evolutionary pa-
useful feedback on the manuscript.                                       rameters from adaptation dynamics. PLoS biology, 20(5):
                                                                         e3001633, 2022.
Impact statement
                                                                       Bissiri, P. G., Holmes, C. C., and Walker, S. G. A general
This paper presents a framework and an algorithm to address              framework for updating belief distributions. Journal of
model misspecification in simulation-based inference (SBI).              the Royal Statistical Society: Series B (Statistical Method-
SBI is predominantly applied in scientific fields where com-             ology), 78(5):1103–1130, 2016.
plex simulators of physical phenomena are available, such
as astronomy, medicine, particle physics, or climate mod-              Bousmalis, K., Irpan, A., Wohlhart, P., Bai, Y., Kelcey, M.,
eling. A priori, this circumscribes the application of our               Kalakrishnan, M., Downs, L., Ibarz, J., Pastor, P., Kono-
algorithm to highly specialized scientific domains in the                lige, K., et al. Using simulation and domain adaptation
natural sciences, precluding issues such as fairness or pri-             to improve efficiency of deep robotic grasping. In 2018
vacy. However, its application to the scientific domain is not           IEEE international conference on robotics and automa-
exempt from societal or ethical implications, particularly               tion (ICRA), pp. 4243–4250. IEEE, 2018.
when computer simulations may inform research or policy
decisions. In this regard, we find some properties of the al-          Brehmer, J. Simulation-based inference in particle physics.
gorithm particularly promising, such as uncertainty quantifi-            Nature Reviews Physics, 3(5):305–305, 2021.
cation and the limitation of not drawing conclusions beyond
the given expert model. However, more work is needed to                Cannon, P., Ward, D., and Schmon, S. M. Investigating the
deeply understand the reliability of these properties and how            impact of model misspecification in neural simulation-
they are affected by violations of the core assumptions, such            based inference. arXiv preprint arXiv:2209.01845, 2022.
as a well-specified prior. Such work should precede any sort
                                                                       Chan, J., Perrone, V., Spence, J., Jenkins, P., Mathieson,
of over-selling to practitioners about the benefits of the al-
                                                                         S., and Song, Y. A likelihood-free inference framework
gorithm. Rather, we see our work as a contribution towards
                                                                         for population genetic data using exchangeable neural
a more broad and successful application of SBI techniques;
                                                                         networks. Advances in neural information processing
success in this endeavor, as for the establishment of any
                                                                         systems, 31, 2018.
scientific tool, will require an iterative dialogue between the
scientists who develop the methodology and those who use               Chen, Y., Zhang, D., Gutmann, M., Courville, A., and Zhu,
it.                                                                      Z. Neural approximate sufficient statistics for implicit
                                                                         models. arXiv preprint arXiv:2010.10079, 2020.

                                                                       Chérief-Abdellatif, B.-E. and Alquier, P. Mmd-bayes: Ro-
                                                                         bust bayesian estimation via maximum mean discrepancy.
                                                                         In Symposium on Advances in Approximate Bayesian
                                                                         Inference, pp. 1–21. PMLR, 2020.

                                                                       Collett, E. Field guide to polarization. International society
                                                                         for optics and photonics, 2005.

                                                                       Cranmer, K., Brehmer, J., and Louppe, G. The frontier of
                                                                         simulation-based inference. Proceedings of the National
                                                                         Academy of Sciences, 117(48):30055–30062, 2020.

                                                                       Cuturi, M. Sinkhorn distances: Lightspeed computation
                                                                         of optimal transport. Advances in neural information
                                                                         processing systems, 26, 2013.

                                                                       Cuturi, M., Meng-Papaxanthos, L., Tian, Y., Bunne, C.,
                                                                         Davis, G., and Teboul, O. Optimal transport tools (ott):
                                                                         A jax toolbox for all things wasserstein. arXiv preprint
                                                                         arXiv:2201.12324, 2022.

                                                                  10
                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

Delaunoy, A., Wehenkel, A., Hinderer, T., Nissanke, S.,               Geirhos, R., Jacobsen, J.-H., Michaelis, C., Zemel, R., Bren-
 Weniger, C., Williamson, A., and Louppe, G. Lightning-                 del, W., Bethge, M., and Wichmann, F. A. Shortcut learn-
  fast gravitational wave parameter inference through neu-              ing in deep neural networks. Nature Machine Intelligence,
  ral amortization. In Machine Learning and the Physical                2(11):665–673, 2020.
  Sciences. Workshop at the 34th Conference on Neural
                                                                      Glöckler, M., Deistler, M., and Macke, J. H. Variational
  Information Processing Systems (NeurIPS), 2020.
                                                                        methods for simulation-based inference. In International
Delaunoy, A., Hermans, J., Rozet, F., Wehenkel, A., and                 Conference on Learning Representations 2022, 2022.
  Louppe, G. Towards reliable simulation-based inference
                                                                      Hashemi, M., Vattikonda, A. N., Jha, J., Sip, V., Woodman,
  with balanced neural ratio estimation. Advances in Neural
                                                                        M. M., Bartolomei, F., and Jirsa, V. K. Simulation-based
  Information Processing Systems, 35:20025–20037, 2022.
                                                                        inference for whole-brain network modeling of epilepsy
Dellaporta, C., Knoblauch, J., Damoulas, T., and Briol, F.-X.           using deep neural density estimators. medRxiv, pp. 2022–
  Robust bayesian inference for simulator-based models                  06, 2022.
  via the mmd posterior bootstrap. In International Confer-           Hermans, J., Begy, V., and Louppe, G. Likelihood-free
  ence on Artificial Intelligence and Statistics, pp. 943–970.          mcmc with amortized approximate ratio estimators. In
  PMLR, 2022.                                                           International conference on machine learning, pp. 4239–
                                                                        4248. PMLR, 2020.
Draxler, F., Wahl, S., Schnörr, C., and Köthe, U. On the
  universality of coupling-based normalizing flows. arXiv             Hermans, J., Delaunoy, A., Rozet, F., Wehenkel, A., and
  preprint arXiv:2402.06578, 2024.                                      Louppe, G. A crisis in simulation-based inference? be-
                                                                        ware, your posterior approximations can be unfaithful.
Falkiewicz, M., Takeishi, N., Shekhzadeh, I., Wehenkel, A.,            Transactions on Machine Learning Research, 2022.
  Delaunoy, A., Louppe, G., and Kalousis, A. Calibrat-
  ing neural simulation-based inference with differentiable           Huang, D., Bharti, A., Souza, A., Acerbi, L., and Kaski,
  coverage probability. Advances in Neural Information                  S. Learning robust statistics for simulation-based in-
  Processing Systems, 36, 2024.                                         ference under model misspecification. arXiv preprint
                                                                        arXiv:2305.15871, 2023.
Frazier, D. T., Robert, C. P., and Rousseau, J. Model mis-
  specification in approximate bayesian computation: con-             Jiang, Y., Yin, S., Dong, J., and Kaynak, O. A review on
  sequences and diagnostics. Journal of the Royal Statis-                soft sensors for monitoring, control, and optimization
  tical Society Series B: Statistical Methodology, 82(2):                of industrial processes. IEEE Sensors Journal, 21(11):
  421–444, 2020.                                                         12868–12881, 2021. doi: 10.1109/JSEN.2020.3033153.

Frazier, D. T., Kohn, R., Drovandi, C., and Gunawan, D.               Kelly, R. P., Nott, D. J., Frazier, D. T., Warne, D. J., and
  Reliable bayesian inference in misspecified models. arXiv             Drovandi, C. Misspecification-robust sequential neural
  preprint arXiv:2302.06031, 2023.                                      likelihood. arXiv preprint arXiv:2301.13368, 2023.
                                                                      Linhart, J., Rodrigues, P. L. C., Moreau, T., Louppe, G., and
Frogner, C., Zhang, C., Mobahi, H., Araya, M., and Poggio,
                                                                        Gramfort, A. Neural posterior estimation of hierarchical
  T. A. Learning with a wasserstein loss. In Advances
                                                                        models in neuroscience. In GRETSI 2022-XXVIIIème
  in Neural Information Processing Systems, volume 28.
                                                                        Colloque Francophone de Traitement du Signal et des
  Curran Associates, Inc., 2015.
                                                                        Images, 2022.
Gamella, J. L., Peters, J., and Bühlmann, P. Causal cham-             Long, M., Cao, Y., Wang, J., and Jordan, M. Learning
  bers as a real-world physical testbed for AI methodol-                transferable features with deep adaptation networks. In
  ogy. Nature Machine Intelligence, 2025. doi: 10.1038/                 International conference on machine learning, pp. 97–
  s42256-024-00964-x.                                                   105. PMLR, 2015.
Ganin, Y., Ustinova, E., Ajakan, H., Germain, P., Larochelle,         Lückmann, J.-M. Simulation-Based Inference for Neuro-
  H., Laviolette, F., March, M., and Lempitsky, V. Domain-              science and Beyond. PhD thesis, Universität Tübingen,
  adversarial training of neural networks. Journal of ma-               2022.
  chine learning research, 17(59):1–35, 2016.
                                                                      Lueckmann, J.-M., Goncalves, P. J., Bassetto, G., Öcal, K.,
Gao, R., Deistler, M., and Macke, J. H. Generalized                     Nonnenmacher, M., and Macke, J. H. Flexible statistical
  bayesian inference for scientific simulators via amortized            inference for mechanistic models of neural dynamics.
  cost estimation. Advances in Neural Information Process-              Advances in neural information processing systems, 30,
  ing Systems, 36:80191–80219, 2023.                                    2017.

                                                                 11
                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

Lueckmann, J.-M., Boelts, J., Greenberg, D., Goncalves, P.,           Rabin, J., Ferradans, S., and Papadakis, N. Adaptive color
  and Macke, J. Benchmarking simulation-based inference.                transfer with relaxed optimal transport. In 2014 IEEE
  In International Conference on Artificial Intelligence and            international conference on image processing (ICIP), pp.
  Statistics, pp. 343–351. PMLR, 2021.                                  4852–4856. IEEE, 2014.

Makkuva, A., Taghvaei, A., Oh, S., and Lee, J. Optimal                Radev, S. T., Mertens, U. K., Voss, A., Ardizzone, L., and
 transport mapping via input convex neural networks. In                 Köthe, U. Bayesflow: Learning complex stochastic mod-
 International Conference on Machine Learning, pp. 6672–                els with invertible neural networks. IEEE transactions on
 6681. PMLR, 2020.                                                      neural networks and learning systems, 33(4):1452–1466,
                                                                        2020.
Matsubara, T., Knoblauch, J., Briol, F.-X., and Oates, C. J.
 Robust generalised bayesian inference for intractable like-          Rubin, D. B. Bayesianly justifiable and relevant frequency
 lihoods. Journal of the Royal Statistical Society Series B:            calculations for the applied statistician. The Annals of
 Statistical Methodology, 84(3):997–1022, 2022.                         Statistics, pp. 1151–1172, 1984.

Melis, A. Gaussian process emulators for 1d vascular mod-             Schmitt, M., Bürkner, P.-C., Köthe, U., and Radev, S. T.
 els, 2017. URL https://etheses.whiterose.                              Detecting model misspecification in amortized bayesian
 ac.uk/19175/.                                                          inference with neural networks. In DAGM German Con-
                                                                        ference on Pattern Recognition, pp. 541–557. Springer,
Mensch, A. and Peyré, G. Online sinkhorn: Optimal trans-                2023.
 port distances from sample streams. Advances in Neural
 Information Processing Systems, 33:1657–1667, 2020.                  Schmon, S. M., Cannon, P. W., and Knoblauch, J. Gener-
                                                                        alized posteriors in approximate bayesian computation.
Nott, D. J., Drovandi, C., and Frazier, D. T. Bayesian                  arXiv preprint arXiv:2011.08644, 2020.
  inference for misspecified generative models. Annual
 Review of Statistics and Its Application, 11, 2023.                  Tabak, E. G. and Vanden-Eijnden, E. Density estimation
                                                                        by dual ascent of the log-likelihood. Communications in
Pacchiardi, L. and Dutta, R. Generalized bayesian                       Mathematical Sciences, 8(1):217–233, 2010.
  likelihood-free inference using scoring rules estimators.
  arXiv preprint arXiv:2104.03889, 2(8), 2021.                        Takeishi, N. and Kalousis, A. Physics-integrated variational
                                                                        autoencoders for robust and interpretable generative mod-
Papamakarios, G. and Murray, I. Fast ε-free inference of                eling. Advances in Neural Information Processing Sys-
  simulation models with bayesian conditional density es-               tems, 34:14809–14821, 2021.
  timation. Advances in neural information processing
  systems, 29, 2016.                                                  Tobin, J., Fong, R., Ray, A., Schneider, J., Zaremba, W.,
                                                                        and Abbeel, P. Domain randomization for transferring
Papamakarios, G., Sterratt, D., and Murray, I. Sequen-                  deep neural networks from simulation to the real world.
  tial neural likelihood: Fast likelihood-free inference with           In 2017 IEEE/RSJ international conference on intelligent
  autoregressive flows. In The 22nd International Confer-               robots and systems (IROS), pp. 23–30. IEEE, 2017.
  ence on Artificial Intelligence and Statistics, pp. 837–848.
  PMLR, 2019.                                                         Tolley, N., Rodrigues, P. L., Gramfort, A., and Jones, S. R.
                                                                        Methods and considerations for estimating parameters
Papamakarios, G., Nalisnick, E., Rezende, D. J., Mohamed,               in biophysically detailed neural models with simulation
  S., and Lakshminarayanan, B. Normalizing flows for                    based inference. bioRxiv, pp. 2023–04, 2023.
  probabilistic modeling and inference. The Journal of
  Machine Learning Research, 22(1):2617–2680, 2021.                   Villani, C. et al. Optimal transport: old and new, volume
                                                                        338. Springer, 2009.
Perera, Y. S., Ratnaweera, D., Dasanayaka, C. H., and
  Abeykoon, C. The role of artificial intelligence-driven             Wang, Y., Yao, Q., Kwok, J. T., and Ni, L. M. Generalizing
  soft sensors in advanced sustainable process industries:             from a few examples: A survey on few-shot learning.
  A critical review. Engineering Applications of Artificial            ACM computing surveys (csur), 53(3):1–34, 2020.
  Intelligence, 121:105988, 2023.
                                                                      Ward, D., Cannon, P., Beaumont, M., Fasiolo, M., and
Peyré, G., Cuturi, M., et al. Computational optimal transport.         Schmon, S. Robust neural posterior estimation and sta-
  Center for Research in Economics and Statistics Working              tistical model criticism. Advances in Neural Information
  Papers, 2017.                                                        Processing Systems, 35:33845–33859, 2022.

                                                                 12
                Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

Wehenkel, A. and Louppe, G. Unconstrained monotonic
 neural networks. Advances in neural information process-
 ing systems, 32, 2019.
Wehenkel, A., Behrmann, J., Hsu, H., Sapiro, G., Louppe,
 G., and Jacobsen, J.-H. Robust hybrid learning with
 expert augmentation. Transaction on Machine Learning
 Research, 2022.

Wehenkel, A., Behrmann, J., Miller, A. C., Sapiro, G.,
 Sener, O., Cuturi, M., and Jacobsen, J.-H. Simulation-
 based inference for cardiovascular models. arXiv preprint
 arXiv:2307.13918, 2023.

Wrede, F., Eriksson, R., Jiang, R., Petzold, L., Engblom,
 S., Hellander, A., and Singh, P. Robust and integrative
 bayesian neural networks for likelihood-free parameter
 inference. In 2022 International Joint Conference on
 Neural Networks (IJCNN), pp. 1–10. IEEE, 2022.
Yin, Y., Le Guen, V., Dona, J., de Bézenac, E., Ayed, I.,
  Thome, N., and Gallinari, P. Augmenting physical models
  with deep networks for complex dynamics forecasting.
  Journal of Statistical Mechanics: Theory and Experiment,
  2021(12):124012, 2021.
Zhu, X. J. Semi-supervised learning literature survey. 2005.




                                                               13
                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

A     Model misspecification
A.1   Mis-calibration vs Misspecification
To further elucidate the distinction between posterior calibration and model misspecification, it is essential to highlight their
respective scopes and the specific challenges they address.
Posterior calibration focuses on ensuring that the predicted posterior distributions accurately reflect the true uncertainty
in parameter estimates given the observations, under the assumption that the simulator is well-specified. Methods such as
those proposed by Falkiewicz et al. (2024); Delaunoy et al. (2022) address this by improving the alignment between the
expected and actual coverage probabilities of the posterior. These approaches generally assume that the simulator faithfully
represents the generative process of the observed data, enabling calibration to be evaluated and improved by leveraging
simulations. While important, these methods do not account for discrepancies between the simulator and real-world data,
which are precisely the scenarios we target in this work.
Model misspecification, on the other hand, arises when the simulator fails to capture the true generative process underlying
the observed data. This results in systematic discrepancies that cannot be corrected solely by optimizing posterior calibration
techniques. Misspecification introduces a gap between the simulated and real-world distributions, and this gap is only
observable when real-world data is available. Unlike posterior calibration, addressing misspecification requires methods
that can robustly leverage the simulator despite its inaccuracies, while incorporating real-world observations to mitigate the
impact of the mismatch.
In our work, we explicitly focus on handling model misspecification. This distinction is reflected in the design of our
approach and the evaluation scenarios we consider, such as Task E, where the simulated data diverges significantly from
the real-world measurements. While posterior calibration methods may perform well in a well-specified context, they
are not designed to cope with such gaps. Instead, we prioritize creating predictive models that balance informativeness
and robustness in the presence of misspecification, even if achieving perfect calibration remains an open and challenging
problem.
A.2   Comparison between model misspecification definitions

We provide a toy example to show how a simulator may be well-specified according to the standard definition of misspecifi-
cation but still provide biased estimates of the target parameter when applied to real data.
                                                                                                                             i.i.d.
Consider the following setting: a noisy sensor measures some physical quantity θ, producing measurements x1o , . . . , xno ∼
P⋆ , where P⋆ := N (θ⋆ , 1) is a normal distribution centered around the ‘true’ value θ⋆ . Let {Pθ : θ ∈ R} be a simulator of
this process with Pθ := N (µ, 1), where µ := θ + λ and λ > 0 is a fixed scalar constant, which is a misspecification in the
simulator that falsely accounts for a non-existing offset in the sensor that produced the real observations x1o , . . . , xno .
According to the standard definition of misspecification, the simulator is well specified, as setting θ ← θ⋆ − λ yields Pθ = P⋆ .
However, the posterior estimates we obtain with this simulator are biased with respect to the true parameter θ⋆ .
To see this, let us compute the posterior under a Gaussian prior N (θ⋆ , 1) over the parameter θ, centered on the true value θ⋆ .




                                                               14
                  Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

Taking advantage of the conjugate prior, the posterior p(θ | x1o , . . . , xno ) becomes

                  p(θ | x1o , . . . , xn            1            n
                                       o ) ∝ p(θ)p(xo , . . . , xo | θ)
                                                     n
                                                          p(xio | θ)
                                                     Y
                                           = p(θ)
                                                    i=1
                                                                    Y   n                                 
                                               1         1                     1               1
                                           = √ exp − (θ − θ⋆ )2               √ exp − (xio − µ)2
                                               2π        2                      2π             2
                                                                        i=1
                                                                      n
                                                                                      !
                                                    1             1X i
                                           ∝ exp − (θ − θ⋆ )2 −          (xo − µ)2
                                                    2             2
                                                                     i=1
                                                                                 n                           n
                                                      "                                                              #!
                                                    1 2       ⋆ 2          ⋆
                                                                               X       i 2         2
                                                                                                            X      i
                                           = exp −     θ + (θ ) − 2θθ +             (xo ) + nµ − 2µ              xo
                                                    2
                                                                                i=1                         i=1
                                                                                   n
                                                      "                                   #!
                                                    1 2        ⋆         2
                                                                                  X     i
               (drop const. terms)         ∝ exp −     θ − 2θθ + nµ − 2µ              xo
                                                    2
                                                                                  i=1
                                                                                                      n               n
                                                      "                                                                      #!
                                                    1 2
                                                       θ − 2θθ⋆ + nθ2 + nλ2 + 2nλθ − 2θ                  xio − 2λ        xio
                                                                                                     X               X
                        (µ = θ + λ)        = exp −
                                                    2
                                                                                                     i=1             i=1
                                                                                             n
                                                      "                                              #!
                                                    1 2
                                                       θ − 2θθ⋆ + nθ2 + 2nλθ − 2θ                xio
                                                                                           X
               (drop const. terms)         ∝ exp −
                                                    2
                                                                                           i=1
                                                                                        n
                                                      "                                          #!
                                                    1          2           ⋆
                                                                                      X       i
                                           = exp −     (n + 1)θ − 2θ(θ − nλ +              xo )
                                                    2
                                                                                       i=1
                                                                                                         n
                                                               "                                                #!
                                                         1         2             1         ⋆
                                                                                                        X      i
                                           = exp −               θ − 2θ                 (θ − nλ +            xo )
                                                    2(n + 1)−1                 n+1
                                                                                                        i=1
                                                                                                            #2 
                                                                                                     n
                                                                "               
                                                         1                   1
                                                                                    (θ⋆ − nλ +          xio )  ,
                                                                                                    X
                (complete square)          ∝ exp −               θ−
                                                    2(n + 1)−1            n+1
                                                                                                      i=1


that is, a normal distribution N (τ, γ 2 ) with mean
                                                                                      n
                                                                                                !
                                                                1
                                                                          θ⋆ − nλ +         xio
                                                                                      X
                                                     τ =
                                                               1+n
                                                                                      i=1

and variance γ 2 = (n + 1)−1 . Thus, the posterior is biased, e.g., the posterior mean τ is a biased estimator of θ⋆ with
E[θ⋆ − τ ] = θ⋆ − λ n+1
                      n
                           .




                                                                          15
                   Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

                       Problem setup                                                    ROPE algorithm
                                                                                                                      1   simulated
                                                                Simulated data
                                   Real observations                                                                      posterior
                                                                                    NSE
                Reality                                                                                     NPE
              (unknown)
                                                                  Calibration set
                                                                                      2 fine
             Physical                                                                tuning
                               Misspecification                                                    OT solution
             parameters
                                                                      Test set      NSE
                                                                                                                  Inference
               Simulator                                                                                            pipeline

                                 Simulated observations


Figure 4: (left) Problem setup: we consider a real-world process which depends on some physical parameters θ. Given real observations
xo of the process, our goal is to provide uncertainty quantification on the underlying parameters θ. To help us, we have access to a
misspecified simulator that takes parameters θ as input and produces simulated observations xs . (right) A visualization of RoPE. The
training consists of two steps: (1) given the simulated data, we approximate the posterior using NPE, resulting in the NSE hω⋆ ; (2) using
the calibration set, we fine-tune hω⋆ into gφ⋆ using the objective (6). At test time, we solve the optimal transport (OT) problem between
the representations {hω⋆ (xjs )}n                 i   no
                                 j=1 and {gφ (xo )}i=1 , resulting in our estimated posterior (5), the average of simulations’ posteriors
                                   s           ⋆
                                 ⋆
weighted by the OT solution P . See Algorithm 1 in Appendix B for more details.




                                                                   16
                      Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

B     The RoPE Algorithm

Algorithm 1 Posterior Inference using Robust Neural Posterior Estimation (RoPE)
    Input: Simulator S(θ, ε), prior distribution p(θ), calibration set C = {(xio , θi )}N                    i No
                                                                                        i=1 , test set D = {xo }i=1
                                                                                          c

                         i
    Output: p̃(θ | xo )∀xo ∈ D
    Step 1: Neural Posterior Estimation (NPE)
    Train neural network hω and conditional normalizing flow p(θ | ·) using NPE:

                                            p̃, ω ⋆ = arg max E θ∼π(θ) [log p(θ | hω (S(θ, ϵ)))]
                                                          p,ω
                                                                   ε∼U [0,1]

    Step 2: Fine-tune sufficient statistics hω⋆ on the Calibration Set
    gψ := COPY(hω⋆ )
    Ctrain , Cval = RandomSplit(C, 51 )
    bestval = ∞
    for Niter do      h                                          i
                       P
      ψ ← ψ − α∇ψ        (θ,xo )∈Ctrain |gψ (xo ) − Eε [hω (S(θ, ε))]|2
                                                          ⋆
                P
      curval = (θ,xo )∈Cval |gψ (xo ) − Eε [hω⋆ (S(θ, ε))]|2
      if curval < bestval then
         bestval = curval
         ψ⋆ = ψ
      end if
    end for
    Step 3: Generate Simulations for Test Set (Ns = No )
    S = {xjs }N
              j=1 ,
               s


    where xjs ∼ S(θj , ε) θj ∼ π(θ) ε ∼ U [0, 1]
    Step 4: Entropic-regularized OT

                                    Cij =|fω⋆ (xjs ) − gψ⋆ (xio )|
                                                                ∀i, j ∈ {1, . . . , No } × {1, . . . , Ns }
                                                                                    
                                                                                1N
                                     P ⋆ = arg min ⟨P, C ⟩ + ρ KL P T 1No ∥ s + γ⟨P, log P ⟩
                                              P ∈Bo                              Ns

    Step 5: Compute Posterior Distributions
                                                                   Ns                         
                                                    p(θ|xio ) :=          ⋆
                                                                             p̃ θ | hω⋆ (xjs )
                                                                   X
                                                                         Pij
                                                                   j=1


    Return p̃(θ|xio ) ∀xio ∈ D




                                                                       17
                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

C    Prior Misspecification Experiments
Prior misspecification on Task C. With this experiment we aim to better understand the role of τ when RoPE is applied
with different levels of prior misspecification. We thus re-use the same setup as in Figure 1 but add prior misspecification
as a mixture between the assumed prior and a much tighter uniform distribution. As the weight of the tighter uniform
distribution increases, the prior gets more misspecified. The experimental setup follows closely the one in the well-specified
case (see Section I.2), except calibration samples are drawn from the true prior (as this would be the case in a real-world
application) and we compute the OT coupling for values of τ ∈ [0.1, 1].
The results in Figure 3b demonstrate that RoPE can be robust to prior misspecification. In particular, we observe that τ plays
the expected role and that values below 1. enable RoPE to perform better when the true prior is only a subset of the prior
used to generated synthetic data.
Prior misspecification on Task E. In some practical settings, it is unlikely that the prior used to generate synthetic data will
match the distribution of the target parameters in the real data. For this reason, we consider a semi-balanced formulation of
OT, providing the flexibility to discard simulations with no corresponding real-world observations.
To evaluate the effect of a misspecified prior on RoPE and RoPE⋆, we perform an experiment that would resemble its use in
real applications like the ones we outline in the introduction. In such settings—e.g., inferring cardiac parameters or chemical
concentrations—the target parameters are limited to a range of validity, and a likely choice for the practitioner would be to
select a uniform prior over this range.
To replicate this setting, we collect a new real-world dataset from the light tunnel (Task E) and train RoPE on synthetic data
originating from a uniform prior, as we do for the results shown in Figure 1. However, we then apply RoPE to real data
generated from a different (betabinomial) distribution over the target parameters.




Figure 5: Visualization of estimated posteriors. Corner plots of the posteriors estimated by RoPE in the prior-
misspecification experiment from Fig. 1 above. We show, in different colors, the estimates for four observations sampled at
random from the test set, for RoPE (left) and RoPE⋆ (τ = 0.5) (right) formulation of the OT step, and a calibration set of
size 50; the horizontal and vertical lines correspond to the ground-truth value of the parameters.

                                                              18
                                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

D                       Robustness to Distribution Shifts

           Task E Light Tunnel
      Out-of-distribution performance                             Training distribution       Target distribution
                                                                                                                             ROPE
           Training distributionTarget distribution                                                                          J -NPE
                                      ﬂipped images                                                                          NPE
                                                                                                                             tuning-only
    real observations




                                                                                                                             OT-only
                                                                                                                             MLP
                                                      B LPP
    sim. observations




                                                      ACAUC




Figure 6: Out-of-distribution performance of RoPE and some baselines. We train RoPE and other baselines on the same
light-tunnel data as in task E (training distribution), but apply it to test sets originating from a target distribution where
the real-world images are flipped vertically. We compare the performance on test sets from both distributions, showing
the LPP and ACAUC scores for each method. For comparison, in the right plot we show again the LPP curve (light gray,
dotted) attained by RoPE under the training distribution. The performance of RoPE is barely affected as it cannot exploit
any signal in the real images (xo ) beyond what is encoded in the simulator, and the simulator output (xs ) is invariant to
the transformation we consider. Because NPE is not trained on real observations, its performance, although poor, also
remains virtually unchanged. On the other hand, the performance of MLP and J-NPE drops in the target distribution, as
these methods are not limited in what information they can exploit from the real observations on which they are trained,
potentially learning shortcuts that are not present in the target distribution. This results demonstrate that if the simulator
embeds the right invariances, our modeling assumption xo ⊥ θ | xs can be favorable to out-of-distribution generalization.


E                       Optimal Transport Coupling as a joint distribution
With our conditional independence assumption, the problem of modeling p(xo | θ) reduces to modeling p(xo | xs ) instead. If
we assume the prior   well-specified, this task is equivalent to modeling p(xo , xs ) under the constraint that the corresponding
                                                        | θ)dθ. By construction, the OT coupling, π ⋆ , respects the constraint
                    R                       R
marginal p(xs ) = R p(xs , xo )dxo equals p(θ)p(x   R s⋆
                       ⋆
on the marginals, π (xs , xo )dxo = p(xs ) and π (xs , xo )dxs = p(xo ) , and the exact instantiation π ⋆ depends also on
the  chosen cost function which can always be defined to yield any given conditional p(xo | xs ) that respects the constraint
  p(xo | xs )p(xs )dxs = p(xo ). π ∗ can thus model the "right" posterior, provided the right cost function is used. In the case,
R

where the prior cannot be trusted, we suggest to use τ < 1 and relax the OT formulation. In this case, we only enforce that
all elements of p(xo ) are matched to a subset of the elements of p(xs ). This implicitly assumes that the assumed prior p(θ)
is overly conservative and covers p⋆ (θ). We believe this is a reasonable assumption as it is often easy to derive physical
bounds for the parameter values and use a uniform distribution.




                                                                             19
                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

F    Self-calibration Property
We say RoPE is self-calibrating because, by design, the posterior distribution marginalized over observations tends to the
prior as the number of simulation increases, that is,
                                                 Z
                                                         p̃(θ | xo )p(xo )dxo = p(θ).                                     (7)
                                                     X

This property is also called marginal calibration, and is a necessary condition for a posterior estimation method to be
calibrated. Considering NPE, p̃(θ | xs ), is marginally calibrated
                                                         R
                                                                   and observations xo are generated from the assumed prior,
that is sampled from an unknown distribution p(xo ) = p(xo | θ)p(θ), we can show RoPE is marginally calibrated. Indeed,
considering the Monte-Carlo approximation of the marginalized posterior distribution over the test set Do := {xio }N
                                                                                                                   i=1 , we
                                                                                                                     o


have,
                                    Z
                                         p̃(θ | xo )p(xo )dxo = Ep(xo ) [p̃(θ | xo )]                                     (8)
                                     X
                                                                           No
                                                                     1 X
                                                                 ≈       p̃(θ | xio )                                     (9)
                                                                     No
                                                                           i=1
                                                                           No Ns
                                                                   1 XX           ⋆
                                                                 =            No Pij p̃(θ | xjs )                       (10)
                                                                   No
                                                                      i=1 j=1
                                                                   N
                                                                      "N       #
                                                                    s    o
                                                                             ⋆
                                                                           Pij p̃(θ | xjs )
                                                                   X X
                                                                 =                                                      (11)
                                                                     j=1    i=1
                                                                           Ns
                                                                     1 X
                                                                 =       p̃(θ | xjs )                                   (12)
                                                                     Ns
                                                                           j=1

                                                                 ≈ p(θ),                                                (13)

where we use the definition of the transport matrix to get N      ⋆   1
                                                                 P
                                                            i=1 Pij = Ns . The last approximation tends to be exact as the
                                                              o


number of simulations increases, if the NPE is marginally calibrated.

G    Learning Minimal Sufficient Statistics with Neural Posterior Estimation
  We now discuss why NPE may learn a minimal sufficient statistic under perfect training. First, under a sufficiently large
validation set, NPE’s objective function is only optimal on the validation set if NPE models the true posterior as defined
implicitly by the prior p(θ) and the likelihood corresponding to the simulator S . This consistency has been proven in
(Papamakarios & Murray, 2016) and is the motivation to use such an objective when estimating density. Second, some
normalizing flows, such as autoregressive UMNN flows (Wehenkel & Louppe, 2019), are universal approximators of
continuous densities. In addition, neural networks are also universal function approximators. As such, we can claim that
it is always possible to parameterize the NCDE pθ (θ | hω (x)) such that the class of functions its parameters represent
contains the true posterior. We directly observe that x is only used by the NCDE through hω (x). Thus, under perfect training
pθ⋆ (θ | hω⋆ (x)) = p(θ | x) and hω⋆ (x) is a sufficient statistic for θ given x under the simulator’s model.

Without additional constraints, we cannot claim anything about the minimality of hω⋆ (x). Nevertheless, we can enforce the
neural network hω⋆ (x) to have an information bottleneck and thus reduce the information carried. In practice, we choose the
output dimension of hω⋆ (x) so that the NCDE achieves optimal performance on the test set. Because in the context of SBI
we can generate as many (simulated) samples as needed, we can obtain estimators that closely approach the simulation’s
posterior and a minimal sufficient statistic.




                                                                     20
                  Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

H     Computational cost of RoPE
 Running NPE is broadly recognized as having a low computational cost: once the upfront training is complete, the cost
of inverting the normalizing flow to sample from the posterior during inference becomes negligible as the number of test
observations increases. This makes NPE more efficient than methods like Approximate Bayesian Computation or Markov
Chain Monte Carlo (when the simulator allows likelihood evaluation). RoPE introduces additional computational costs
on top of running NPE: (1) the OT coupling computation, i.e., solving (2), and (2) obtaining samples from the estimated
posterior distributions, to compute the posterior estimate defined in (5). The computational cost of solving the transport
problem with the Sinkhorn algorithm (Cuturi, 2013) is quadratic in the number of real-world observations. The sampling
step has a negligible cost as it directly sub-samples from the set of points generated with NPE.
In our experiments, solving the OT optimization for 2000 test examples takes less than a minute on an M1 MacBook Pro.
Sampling from the mixture of posterior distributions involves caching 10,000 samples for each simulation and generating
5,000 samples by sub-sampling from the mixture using the OT coupling matrix. This caching process takes under three
minutes, and is comparable to the cost of running NPE alone.
Extending RoPE to handle larger test sets or an online setting (processing test examples one at a time) is outside the scope
of this work. Nevertheless, mehtods like Neural OT (e.g., (Makkuva et al., 2020)) and online Sinkhorn (Mensch & Peyré,
2020) should provide good solutions to make RoPE fully amortized.

I     Experimental Setup
In this section, we provide more details on our experiments. For completeness, we provide details on the neural architectures
and training hyperparameters. However, we encourage the reader interested in reproducing our experiments to examine our
code directly (a link to the code will be made available in the public version of the paper).
For all methods training on calibration set we keep always keep 20% of the calibration to monitor validation performance
and we select the best model based on this metric.
For the MLP we use the same architecture as the NSE for all our experiments and optimize its parameters on the calibration
set with Adam and a learning rate equal to 0.0003, we select the best model based on the LPP attributed to the validation
subset of the calibration set.
Computing the SBI baseline. We take the ground-truth labels {(θi }N                              i i N
                                                                         i=1 from the test set {θ , xo )}i=1 on which we compute
                                                     i                                        i
all the metrics for Figure 1; for each label θ , we simulate a synthetic observation xs := S(θi ), collecting them into a
“synthetic” test set {(θi , xis )}N
                                  i=1 ; then, we apply to it the NSE+NPE pipeline (simulated posterior in Figure 4, right) to obtain
the posterior estimates which we then evaluate. In this way, the baseline represents the performance we would hope to
achieve if there was no misspecification and the simulator perfectly replicated the real observations (up to the stochasticity
of the simulator itself).
I.1   Task A: CS & Task B: SIR

Task A (synthetic): CS. We reproduce the cancer and stromal cell development benchmark from Ward et al. (2022). The
simulator emulates the development of cancer and stromal cells in a 2D environment as a function of three Poisson rate
parameters (λc , λp , λd ). The observations are vectors composed of the number of cancer and stromal cells and the mean and
maximum distance between stromal cells and their nearest cancer cell. Synthetic misspecification is introduced by removing
cancer cells that are too close to their generating parent.
Task B (synthetic): SIR. We also use the stochastic epidemic model from Ward et al. (2022), which describes epidemic
dynamics through the infection rate β and recovery rate γ . Each observation is a vector composed of the mean, median, and
maximum number of infections, the day of occurrence of the maximum number of infections, the day at which half the total
number of infections was reached, and the mean auto-correlation (lag 1) of the infections. Misspecification is a delay in
weekend infection counts, of which 5% are added to the count of the following Monday.
We refer the reader to Ward et al. (2022) for more details about the simulator and prior distribution. We use the exact same
setting as theirs.




                                                                21
                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

N EURAL ARCHITECTURE & T RAINING H YPERPARAMETERS
For all methods we use the same backbone MLP as the NSE with ReLU activations and layers composed of
[4K, 16K, 16K, 12K, 3K] neurons, where K is the dimensionality of θ. The NF is a 1-step UMNN-MAF (Wehenkel
& Louppe, 2019) with [100, 100, 100] neurons for both the autoregressive conditioner and normalizer. For NNPE, we train
the UMNN-MAF on simulations poluted by Spike and Slab errors. We train models with Adam and a learning rate equal to
0.0005 and all other parameters set to default. We optimize the SBI model for 106 gradient steps and select the best model
on random validation sets containing 105 simulations.
I.2   Task C: Pendulum
D ESCRIPTION
The first task is inspired from the damped pendulum benchmark commonly used to assess hybrid learning algorithms.
Given a 2D physical parameter θ := [ω0 , A], where ω0 ∈ R+ denotes the fundamental frequency and A ∈ R+ the amplitude
of a friction-less pendulum, the simulator generates the horizontal position of the pendulum at 200 discrete times during
uniformly sampled in a 10 seconds interval as

                                              xs := [θ(t = 0), . . . , θ(t = 10s)] ∈ R200
                                       where θ(t) = A cos(ω0 t + φ)        φ ∼ U(−π, π).                                     (14)

The relationship between the parameters and the simulation is thus stochastic as φ accounts for an unknown phase shift
when the measurements start. We generate real-world observations synthetically by replacing θ(t) from (14) by

                                  θ̃(t) = eαt A cos(ω0 t + φ)    φ ∼ U[−π, π]     α ∼ U[0, 1],

where α represents the effect of friction. We also add Gaussian noise on both simulated and real-world data to represent
the inaccuracy of a sensor measuring the pendulum’s position. The prior distribution is a product of uniform distribution,
p(θ := [ω0 , A]) = U[0, 3] × U [0.5, 10].

N EURAL ARCHITECTURE & T RAINING H YPERPARAMETERS
Neural Posterior Estimator. The NSE is a 1D convolutional neural network, with the architecture described in Algorithm 2.
The NCDE is a one-step discrete normalizing flow with an autoregressive conditioner and a UMNN (Wehenkel & Louppe,

Algorithm 2 Convolutional Neural Network for Tasks A and D.

 1: Conv1d(1, 16, 3, 1, dilation = 2, padding = 1)                   14: ReLU()
 2: ReLU()                                                           15: AvgPool1d(3, 1)
 3: Conv1d(16, 64, 3, 2, dilation = 2, padding = 1)                  16: Conv1d(128, 128, 3, 1, dilation = 2, padding = 1)
 4: ReLU()                                                           17: ReLU()
 5: AvgPool1d(3, 1)                                                  18: Flatten()
 6: Conv1d(64, 128, 3, 1, dilation = 2, padding = 1)                 19: Linear(2048, 512)
 7: ReLU()                                                           20: ReLU()
 8: Conv1d(128, 128, 3, 2, dilation = 2, padding = 1)                21: Linear(512, 128)
 9: ReLU()                                                           22: ReLU()
10: AvgPool1d(3, 1)                                                  23: Linear(128, 32)
11: Conv1d(128, 128, 3, 1, dilation = 2, padding = 1)                24: ReLU()
12: ReLU()                                                           25: Linear(32, 10)
13: Conv1d(128, 128, 3, 2, dilation = 2, padding = 1)



2019) as the normalizer. The autoregressive conditioner is a MADE with ReLU activation and 3 layers of 100 neurons
that output a 10 dimensional vector to the UMNN. The UMNN has an integrand net with 3 layers of 100 neurons with
ReLU activations. For training the NPE, we use a batch size of 100 and a learning factor equal to 1e-4. NPE is trained until
convergence. Other parameters are set to default values and should marginally impact the NPE obtained.

                                                                22
                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration


Algorithm 3 UNet1D Architecture                                      Algorithm 4 Block1D(in_channels, out_channels)
 1: Unet1D :                                                          1: Conv1d(in_channels, out_channels, kernel_size=3,
 2:   Encoder1D :                                                        padding=1)
 3:     Block(in_channels = 1, out_channels = 64)                     2: ReLU()
 4:     Block(in_channels = 64, out_channels = 128)                   3: Conv1d(out_channels,                   out_channels,
 5:     Block(in_channels = 128, out_channels = 256)                     kernel_size=3, padding=1)
 6:     Block(in_channels = 256, out_channels = 512)                  4: ReLU()
 7:     Block(in_channels = 512, out_channels = 1024)
 8:     MaxPool1d(2)
 9:   Decoder1D :                                                    Algorithm 5 2D Convolutional Neural Network
10:     ConvTranspose1d(1024 + 5, 512, 2, stride = 2)
11:     Block(in_channels = 1024, out_channels = 512)                 1: Conv2d(3, 64, 3, 2, dilation=1), ReLU()
12:     ConvTranspose1d(512, 256, 2, stride = 2)                      2: Conv2d(64, 128, 3, 2, dilation=1), ReLU()
13:     Block(in_channels = 512, out_channels = 256)                  3: MaxPool2d(3)
14:     ConvTranspose1d(256, 128, 2, stride = 2)                      4: Conv2d(128, 128, 3, 2, dilation=1), ReLU()
15:     Block(in_channels = 256, out_channels = 128)                  5: Conv2d(128, 64, 1, 1, dilation=1), ReLU()
16:     ConvTranspose1d(128, 64, 2, stride = 2)                       6: Conv2d(64, 3, 1, 1, dilation=1), ReLU()
17:     Block(in_channels = 128, out_channels = 64)                   7: Flatten()
18:     ConvTranspose1d(64, 1, 2, stride = 2)                         8: Linear(27, 100), ReLU()
19:     Block(in_channels = 64, out_channels = 1)                     9: Linear(100, 20)
20:     Conv1d(64, 1, 1)




RoPE NSE. We have selected the best NPE based on the validation set with 10000 examples generated with the simulator.
The NPE is fixed to one best-of-all model. We fine-tune the NCDE with a learning rate equal to 1e-5 for 5000 gradient steps
on 80% the full calibration set. We use a 1-sample Monte Carlo estimate of the expectation in (6).
J-NPE. To train J-NPE, we simply randomly use a batch composed of 50% of simulated pairs (θ, xs ) and of 50% (θ, xo )
from the calibration set. We use the same architecture and hyper-parameters as the SBI NPE. The best model is selected
based on the best training set performance. We do 50 epochs with 50000 simulated examples for each epoch. The batch size
is 100.
HVAE. For the HVAE, we re-use the NPE model as the physics encoder and replace the decoder with a deterministic
version of the simulator, thus removing the Gaussian noise on a random phase shift. In addition, we follow the approach of
Takeishi & Kalousis (2021) and have 1) a real-world encoder that maps xo to za , 2) a reality-to-physics encoder, and 3) a
physics-to-reality decoder. The real-world encoder has the same architecture as the NSE of the NPE and outputs the mean
and log-variance of a 5D latent vector za . The reality-to-physics and physics-to-reality also have the same architectures and
are two conditional 1D U-Net with neural network architecture described in Algorithm 3.
To train the HVAE, we freeze the parameters of the NPE and optimizes the ELBO as well as a calibration loss that evaluates
the likelihood assigned to the true physical parameters. All distributions are parameterized by Gaussian with mean and
log-variance predicted by the neural networks. We do not use any additional losses as we expect constraining NPE and
using the calibration set should already provide the necessary support to use the physics in a meaningful way. The HVAE is
trained on the 2000 test examples as it is the only real-world data, calibration set aside, that we have access to. We use a
batch size equal to 100 and a learning rate equal to 1e-3. We believe obtaining a better HVAE is possible. However, we
emphasize the complexity of setting up a good HVAE for the only purpose of statistical inference over parameters.

DATASETS
For this task, we can generate samples (θ, xs ) on the fly to train the NPE. The calibration and test sets are also generated
randomly by sampling from the prior distribution and using the damped pendulum simulator.

                                                             23
                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

I.3   Task D: Hemodynamics

D ESCRIPTION
Inspired by Wehenkel et al. (2023), we define the task of inferring important cardiovascular parameters from normalized
arterial pressure waveforms measured at the radial artery. The simulator uses many physiological parameters that modulates
the heart function, physical properties of the 116 main arterial segments, and behavior of the vascular beds. Our inference
concerns two parameters of the heart function, θ := [SV, LVET], the stroke volume (SV) is the amount pumped out from the
left ventricle over the heart beat modeled, and the left ventricular ejection time (LVET) is the time interval between opening
and closure of the aortic valve. Other parameters, such as the heart rate or arteries’ stiffness, are considered as nuisance
effects and are randomly sampled from a realistic population distribution. An additional source of randomness is added by
modeling measurement errors with a white Gaussian noise and randomizing the starting recording time with respect to the
cardiac cycle. The simulator produces 8-second timeseries xt ∈ R1000 sampled at 125Hz . As synthetic misspecification, the
simulator assumes all arteries have the same length over the population considered, whereas "real-world" data are artificially
generated by also varying the length of arteries and account for the effect of human’s height. The simulator is based on the
openBF PDE solver (Melis, 2017) specialized for hemodynamics, which is not differentiable and takes approximately one
minute to simulate one sample on a standard CPU. This synthetic tasks represent a common scenario in which a simulator,
although faithful to the effect of certain parameters, misses additional degrees of freedom that exists for the real-world data.

N EURAL ARCHITECTURE & T RAINING H YPERPARAMETERS


Algorithm 6 CNN Architecture for Task C.
 1: Conv1d(1, 16, 3, 1, dilation=2, padding=1), ReLU()
 2: Conv1d(16, 64, 3, 2, dilation=2, padding=1), ReLU()
 3: AvgPool1d(4, 2)
 4: Conv1d(64, 128, 3, 1, dilation=2, padding=1), ReLU()
 5: Conv1d(128, 128, 3, 2, dilation=2, padding=1), ReLU()
 6: AvgPool1d(4, 2)
 7: Conv1d(128, 128, 3, 1, dilation=2, padding=1), ReLU()
 8: Conv1d(128, 128, 3, 2, dilation=2, padding=1), ReLU()
 9: AvgPool1d(4, 1)
10: Conv1d(128, 128, 3, 1, dilation=2, padding=1), ReLU()
11: Flatten()
12: Linear(1024, 512), ReLU()
13: Linear(512, 128), ReLU()
14: Linear(128, 32), ReLU()
15: Linear(32, 5)



Neural Posterior Estimator. The NSE is the 1D convolutional neural network described in Algorithm 6. The NCDE is a
5-step discrete normalizing flow with an autoregressive conditioner and affine normalizers. Each of the 5 autoregressive
conditioners is a MADE with ReLU activations and 4 layers of 300 neurons that output 4 dimensional vectors used to
parameterize the affine transformations. For training the NPE, we use a batch size of 100 and a learning factor equal to 5e-4.
NPE is trained until convergence. Other parameters are set to default values and should marginally impact the NPE obtained.
RoPE NSE. We have selected the best NPE based on the validation set with 2000 examples generated with the simulator.
The NPE is fixed to one best-of-all model. We fine-tune the NCDE with a learning rate equal to 1e-5 for 2000 gradient steps
on 80% of calibration set. We use a 1-sample Monte Carlo estimate of the expectation in (6).
J-NPE. To train J-NPE, we simply randomly use a batch composed of 50% of simulated pairs (θ, xs ) and of 50% (θ, xo )
from the calibration set. We use the same architecture and hyper-parameters as the SBI NPE. The best model is selected
based on the best training set performance. We do 50 epochs with 6000 simulated examples for each epoch. The batch size
is 100.
HVAE. There is no HVAE for this experiment as the simulator is non-differentiable.

                                                              24
                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

DATASETS
For this task, we cannot generate samples (θ, xs ) on the fly to train the NPE. For the purpose of this experiment, we
have generated 10000 simulations and real-world observations. Our fine-tuning strategy approximates (6) by finding the
simulations with the closest parameter value.
I.4   Task E: Light Tunnel

D ESCRIPTION
We use one of the light-tunnel datasets from the causal chamber project (Gamella et al., 2025, causalchamber.org).
In particular, we use the data from the ap_1.8_iso_500.0_ss_0.005 experiment in the lt_camera_v1 dataset.
The light tunnel is an elongated chamber with a controllable light source at one end, two linear polarizers mounted on
rotating frames, and a camera that takes images of the light source through the polarizers. We refer the reader to Gamella
et al. (2025, Figure 2) for a complete schematic. Our task consists of predicting the color setting of the light source
((R, G, B) ∈ [0, 255]3 ) and the dimming effect of the linear polarizers α ∈ [0, 1] from the captured images. As a misspecified
simulator of the image-generating process, we adopt the simple model described in Gamella et al. (2025, Model F1,
Appendix D). A Python implementation is available through the causalchamber package (models.model_f1); visit
causalchamber.org for more details. As input, the simulator takes the parameters θ := [R, G, B, α] and produces
an image consisting of a hexagon roughly the size of the light source, with an RGB color vector equal to [αR, αG, αB].
The factor α := cos2 (θ1 − θ2 ), where θ1 , θ2 denote the angles of the two polarizers, corresponds to Malus’ law (e.g. ,
Collett, 2005), which models the dimming effect of the polarizers as a function of their relative angle. Besides the obvious
misspecification with respect to image realism (see Figure 1), the model ignores other important physical aspects, such as
the spectral response of the camera sensor or the non-uniform effect of the polarizers on the different colors—more details
can be found in Gamella et al. (2025, Appendix D.IV.2.2). The prior is uniform over colors and polarizer angles, which
leads to a non-uniform prior over the dimming effect α.

N EURAL ARCHITECTURE & T RAINING H YPERPARAMETERS
Neural Posterior Estimator. The NSE is the 2D convolutional neural network described by Algorithm 5.
The NCDE is also a one-step discrete normalizing flow with an autoregressive conditioner and a UMNN (Wehenkel &
Louppe, 2019) as the normalizer. The autoregressive conditioner is a MADE with ReLU activation and 3 layers of 500
neurons that outputs a 10 dimensional vector to the UMNN. The UMNN has an integrand net with 4 layers of 150 neurons
with ReLU activations. For training the NPE, we use a batch size of 100 and a learning factor equal to 5e-4. NPE is trained
until convergence. Other parameters are set to default values and should marginally impact the NPE obtained.
RoPE NSE. We have selected the best NPE based on the validation set with 10000 examples generated with the simulator.
The NPE is fixed to one best-of-all model. We fine-tune the NCDE with a learning rate equal to 1e-4 for 2000 gradient steps
on on 80% of the calibration set. We use a 1-sample Monte Carlo estimate of the expectation in (6).
J-NPE. To train J-NPE, we simply randomly use a batch composed of 50% of simulated pairs (θ, xs ) and of 50% (θ, xo )
from the calibration set. We use the same architecture and hyper-parameters as the SBI NPE. The best model is selected
based on the best training set performance. We do 50 epochs with 1000 simulated examples for each epoch. Simulations are
generated randomly for each batch by sampling the prior and simulating for the corresponding parameters. The batch size is
100.
HVAE. For the HVAE, we re-use the NPE model as the physics encoder and use the simulator as is as it is differentiable
without additional effort. In addition, we follow the approach of Takeishi & Kalousis (2021) and have 1) a real-world encoder
that maps xo to za , 2) a reality-to-physics encoder, and 3) a physics-to-reality decoder. The real-world encoder has the same
architecture as the NSE of the NPE and outputs the mean and log-variance of a 5D latent vector za . The reality-to-physics
and physics-to-reality also have the same architectures and are two conditional 2D U-Net with the architecture described by
Algorithm 7.
To train the HVAE, we freeze the parameters of the NPE and optimizes the ELBO as well as a calibration loss that evaluates
the likelihood assigned to the true physical parameters. All distributions are parameterized by Gaussian with mean and
log-variance predicted by the neural networks. We do not use any additional losses as we expect constraining NPE and
using the calibration set should already provide the necessary support to use the physics in a meaningful way. The HVAE is


                                                              25
                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration


Algorithm 7 2D UNet                                                    Algorithm 8 Block2D(in_channels, out_channels)
 1: Encoder2D:                                                          1: Conv2d(in_channels, out_channels, kernel_size=3,
 2:   Block2D(in_channels=3, out_channels=64)                               padding=1, bias=False)
 3:   Block2D(in_channels=64, out_channels=128)                         2: BatchNorm2d(num_features=out_channels)
 4:   Block2D(in_channels=128, out_channels=256)                        3: ReLU(inplace=True)
 5:   Block2D(in_channels=256, out_channels=512)                        4: Conv2d(out_channels,           out_channels,
 6:   Block2D(in_channels=512, out_channels=1024)                           kernel_size=3, padding=1, bias=False)
 7:   MaxPool2d(2)                                                      5: BatchNorm2d(num_features=out_channels)
 8: Decoder2D:                                                          6: ReLU(inplace=True)
 9:   ConvTranspose2d(1024 + 5, 512, 2, stride=2)
10:   Block2D(in_channels=1024, out_channels=512)
11:   ConvTranspose2d(512, 256, 2, stride=2)
12:   Block2D(in_channels=512, out_channels=256)
13:   ConvTranspose2d(256, 128, 2, stride=2)
14:   Block2D(in_channels=256, out_channels=128)
15:   ConvTranspose2d(128, 64, 2, stride=2)
16:   Block2D(in_channels=128, out_channels=64)
17:   ConvTranspose2d(64, 1, 2, stride=2)
18:   Block2D(in_channels=64, out_channels=1)
19:   Conv2d(64, 1, 1)




trained on the 2000 test examples as it is the only real-world data, calibration set aside, that we have access to. We use a
batch size equal to 100 and a learning rate equal to 1e-3. We believe obtaining a better HVAE is possible. However, we
emphasize the complexity of setting up a good HVAE for the only purpose of statistical inference over parameters.

DATASETS
For this task, we can generate samples (θ, xs ) on the fly to train the NPE. However, the calibration and test sets are real-world
data. We ensure there is not overlap between calibration and test set. The is no randomization and the test set is constant for
all experiments, the calibration set are also fixed for a given calibration set size.
I.5   Task F: Wind Tunnel
D ESCRIPTION
We use one of the wind-tunnel datasets from the causal chamber project (Gamella et al., 2025, causalchamber.org). In
particular, we use the data from the load_out_0.5_osr_downwind_4 experiment in the wt_intake_impulse_
v1 dataset. The tunnel is a chamber with two controllable fans that push air through it and barometers that measure air
pressure at different locations. A hatch precisely controls the area of an additional opening to the outside (see Gamella
et al., 2025, Figure 2). The data is a collection of pressure curves that result from applying a short impulse to the intake fan
load and measuring the change in air pressure using one of the barometers inside the tunnel. Our inference task consists of
predicting the hatch position, θ := [H] ∈ [0, 45] given a pressure curve (see Figure 1). As a simulator model, we combine
the models A2 and C3 described in Gamella et al. (2025, Appendix D); we numerically solve the ODE in model A2, and
add stochastic components to simulate the sensor noise and the unknown time point at which the impulse is applied. This
results in the simulator being neither differentiable nor deterministic. A Python implementation of the complete simulator
is available in the causalchamber package (models.simulator_a2_c3); visit causalchamber.org for more
details. Misspecification arises from the many simplifying assumptions needed to model the complex dynamics of the
airflow inside the tunnel—more details can be found in Gamella et al. (2025, Appendix D.IV.1.2).
Neural Posterior Estimator. The NSE and NCDE have the same 1D convolutional neural network as for Task A. For
training the NPE, we use a batch size of 100 and a learning factor equal to 5e-4. NPE is trained until convergence. Other
parameters are set to default values and should marginally impact the NPE obtained.

                                                               26
                 Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

RoPE NSE. We have selected the best NPE based on the validation set with 10000 examples generated with the simulator.
The NPE is fixed to one best-of-all model. We fine-tune the NCDE with a learning rate equal to 1e-4 for 20000 gradient
steps on on 80% of the calibration set. We use a 1-sample Monte Carlo estimate of the expectation in (6).
J-NPE. To train J-NPE, we simply randomly use a batch composed of 50% of simulated pairs (θ, xs ) and of 50% (θ, xo )
from the calibration set. We use the same architecture and hyper-parameters as the SBI NPE. The best model is selected
based on the best training set performance. We do 50 epochs with 10000 simulated examples for each epoch. The batch size
is 100.
HVAE. There is no HVAE for this experiment as the simulator is non-differentiable.

DATASETS
For this task, although slightly slower than Task A and B, we can generate samples (θ, xs ) on the fly to train the NPE.
However, the calibration and test sets are real-world data. We ensure no overlap between the two sets for all calibration set
sizes. All sets are fixed for all experiments.




                                                             27
                  Addressing Misspecification in Simulation-based Inference through Data-driven Calibration

                                           0                       Task E Light Tunnel                Task F Wind Tunnel                  Task E Light Tunnel
                                                                   Posterior estimates                Posterior estimates                 Entropic regularization
                                         128
                                                                                                                                           LPP

                                         256

                                           0



                                         128



                                         256
                                                                                                                                           ACAUC
                                           1




                                         0.5


                                                                                                           ROPE             tuning-only
                                           0
                                                                                                           J-NPE            OT-only
                                               0   128   256   0       128     256   0    128   256
                                                                                                           MLP              HVAE



Figure 7: Credible intervals of the posterior estimates at levels 65% and 90%, for a single test sample from the light-tunnel task. The
black stars denote the true value of the parameter. (center) Posterior estimates for a single test sample from the wind-tunnel task, where
the true parameter is denoted by a vertical black line.
J     Computing ACAUC

Algorithm 9 Statistical Calibration of Posterior Distribution
Input: Dataset of pairs D = {(θi , xi )}, Posterior estimator p̃(θ | x), Number of samples N .
Output: ACAUC
 1: AVG_CALIBRATION = 0
 2: for k ∈ {1, . . . , K}) do
 3:   Initialize an empty list CredLevels
 4:   for (θi , xi ) ∈ D do
 5:      Initialize an empty list Samples
 6:      for j = 1 to M do
 7:         Sample θj from p̃(θ | xi )
 8:         Append θj to Samples
 9:      end for
10:      Sort Samples
11:      Compute the rank (position in ascending order) r of θ in Samples
12:      Set CredLevels = Nr
13:      Append CredLevel to CredLevels
14:   end for
15:   Sort CredLevels
      CALIBRATION = N                                i
                              P
16:                            i=1 CredLevels[i] − N
17:   AVG_CALIBRATION = AVG_CALIBRATION + CALIBRATION               K
18: end for
Return: AVG_CALIBRATION

K     Additional Results
K.1    Corner plots

K.2    Calibration plots

L     Non-iid Calibration Sets
We provide additional results reflecting the behavior of RoPE when the calibration set is not sampled from the "true" prior
distribution, on the light tunnel task, when the calibration set comes from a subset of the true distribution. We use the beta
distribution of Figure 3b as the calibration set distribution. Figure 15 reports the main metrics (ACAUC and LPP). We
observe that, even in this extreme case, RoPE achieves performance that outperforms the prior distribution on the LPP while
still being calibrated for calibration set size that are greater than 10. Figure 16 studies how good/bad estimated posteriors are
as a function of whether similar samples belongs to the calibration set. As expected, RoPE performs strongly for samples

                                                                                         28
                                                                Addressing Misspecification in Simulation-based Inference through Data-driven Calibration
     20




                                                                                                                                                               20




                                                                                                                                                                                                                                                                                                                         20
     16




                                                                                                                                                               16




                                                                                                                                                                                                                                                                                                                         16
λp




                                                                                                                                                          λp




                                                                                                                                                                                                                                                                                                                    λp
     12




                                                                                                                                                               12




                                                                                                                                                                                                                                                                                                                         12
      8




                                                                                                                                                                8




                                                                                                                                                                                                                                                                                                                          8
      4




                                                                                                                                                                4




                                                                                                                                                                                                                                                                                                                          4
      .0




                                                                                                                                                                .0




                                                                                                                                                                                                                                                                                                                          .0
     20




                                                                                                                                                               20




                                                                                                                                                                                                                                                                                                                         20
      .5




                                                                                                                                                                .5




                                                                                                                                                                                                                                                                                                                          .5
     17




                                                                                                                                                               17




                                                                                                                                                                                                                                                                                                                         17
λd




                                                                                                                                                          λd




                                                                                                                                                                                                                                                                                                                    λd
      .0




                                                                                                                                                                .0




                                                                                                                                                                                                                                                                                                                          .0
     15




                                                                                                                                                               15




                                                                                                                                                                                                                                                                                                                         15
      .5




                                                                                                                                                                .5




                                                                                                                                                                                                                                                                                                                          .5
     12




                                                                                                                                                               12




                                                                                                                                                                                                                                                                                                                         12
      .0




                                                                                                                                                                .0




                                                                                                                                                                                                                                                                                                                          .0
     10




                                                                                                                                                               10




                                                                                                                                                                                                                                                                                                                         10
                 0



                             0



                                  0


                                              00



                                                        00



                                                                4



                                                                          8



                                                                                 12



                                                                                         16



                                                                                              20


                                                                                                       .0



                                                                                                              .5



                                                                                                                           .0



                                                                                                                                       .5



                                                                                                                                                     .0




                                                                                                                                                                           0



                                                                                                                                                                                       0



                                                                                                                                                                                            0


                                                                                                                                                                                                        00



                                                                                                                                                                                                                  00



                                                                                                                                                                                                                          4



                                                                                                                                                                                                                                    8



                                                                                                                                                                                                                                           12



                                                                                                                                                                                                                                                   16



                                                                                                                                                                                                                                                        20


                                                                                                                                                                                                                                                                 .0



                                                                                                                                                                                                                                                                        .5



                                                                                                                                                                                                                                                                                     .0



                                                                                                                                                                                                                                                                                                 .5



                                                                                                                                                                                                                                                                                                               .0




                                                                                                                                                                                                                                                                                                                                     0



                                                                                                                                                                                                                                                                                                                                                 0



                                                                                                                                                                                                                                                                                                                                                      0


                                                                                                                                                                                                                                                                                                                                                                  00



                                                                                                                                                                                                                                                                                                                                                                            00



                                                                                                                                                                                                                                                                                                                                                                                    4



                                                                                                                                                                                                                                                                                                                                                                                              8



                                                                                                                                                                                                                                                                                                                                                                                                     12



                                                                                                                                                                                                                                                                                                                                                                                                             16



                                                                                                                                                                                                                                                                                                                                                                                                                  20


                                                                                                                                                                                                                                                                                                                                                                                                                           .0



                                                                                                                                                                                                                                                                                                                                                                                                                                  .5



                                                                                                                                                                                                                                                                                                                                                                                                                                               .0



                                                                                                                                                                                                                                                                                                                                                                                                                                                           .5



                                                                                                                                                                                                                                                                                                                                                                                                                                                                         .0
             30



                            60



                                 90




                                                                                                                                                                       30



                                                                                                                                                                                      60



                                                                                                                                                                                           90




                                                                                                                                                                                                                                                                                                                                 30



                                                                                                                                                                                                                                                                                                                                                60



                                                                                                                                                                                                                                                                                                                                                     90
                                                                                                     10



                                                                                                             12



                                                                                                                          15



                                                                                                                                      17



                                                                                                                                                   20




                                                                                                                                                                                                                                                               10



                                                                                                                                                                                                                                                                       12



                                                                                                                                                                                                                                                                                    15



                                                                                                                                                                                                                                                                                                17



                                                                                                                                                                                                                                                                                                             20




                                                                                                                                                                                                                                                                                                                                                                                                                         10



                                                                                                                                                                                                                                                                                                                                                                                                                                 12



                                                                                                                                                                                                                                                                                                                                                                                                                                              15



                                                                                                                                                                                                                                                                                                                                                                                                                                                          17



                                                                                                                                                                                                                                                                                                                                                                                                                                                                       20
                                             12



                                                    15




                                                                                                                                                                                                       12



                                                                                                                                                                                                              15




                                                                                                                                                                                                                                                                                                                                                                 12



                                                                                                                                                                                                                                                                                                                                                                        15
                                 λc                                              λp                                       λd                                                               λc                                              λp                                       λd                                                               λc                                              λp                                       λd




                                                                                      Figure 8: Three corner plots for task A with a calibration set with 50 samples.
             5




                                                                                                                                                                       5




                                                                                                                                                                                                                                                                                                                                 5
           0.4




                                                                                                                                                                     0.4




                                                                                                                                                                                                                                                                                                                               0.4
              0




                                                                                                                                                                        0




                                                                                                                                                                                                                                                                                                                                  0
           0.3




                                                                                                                                                                     0.3




                                                                                                                                                                                                                                                                                                                               0.3
β




                                                                                                                                                          β




                                                                                                                                                                                                                                                                                                                    β
              5




                                                                                                                                                                        5




                                                                                                                                                                                                                                                                                                                                  5
           0.1




                                                                                                                                                                     0.1




                                                                                                                                                                                                                                                                                                                               0.1
              0




                                                                                                                                                                        0




                                                                                                                                                                                                                                                                                                                                  0
           0.0




                                                                                                                                                                     0.0




                                                                                                                                                                                                                                                                                                                               0.0
                        0




                                         5




                                                            0




                                                                             5




                                                                                         0




                                                                                                       5




                                                                                                                      0




                                                                                                                                              5




                                                                                                                                                                                  0




                                                                                                                                                                                                   5




                                                                                                                                                                                                                      0




                                                                                                                                                                                                                                       5




                                                                                                                                                                                                                                                   0




                                                                                                                                                                                                                                                                 5




                                                                                                                                                                                                                                                                                0




                                                                                                                                                                                                                                                                                                        5




                                                                                                                                                                                                                                                                                                                                            0




                                                                                                                                                                                                                                                                                                                                                             5




                                                                                                                                                                                                                                                                                                                                                                                0




                                                                                                                                                                                                                                                                                                                                                                                                 5




                                                                                                                                                                                                                                                                                                                                                                                                             0




                                                                                                                                                                                                                                                                                                                                                                                                                           5




                                                                                                                                                                                                                                                                                                                                                                                                                                          0




                                                                                                                                                                                                                                                                                                                                                                                                                                                                  5
                     0.0




                                      0.1




                                                         0.3




                                                                          0.4




                                                                                      0.0




                                                                                                    0.1




                                                                                                                   0.3




                                                                                                                                           0.4




                                                                                                                                                                               0.0




                                                                                                                                                                                                0.1




                                                                                                                                                                                                                   0.3




                                                                                                                                                                                                                                    0.4




                                                                                                                                                                                                                                                0.0




                                                                                                                                                                                                                                                              0.1




                                                                                                                                                                                                                                                                             0.3




                                                                                                                                                                                                                                                                                                     0.4




                                                                                                                                                                                                                                                                                                                                         0.0




                                                                                                                                                                                                                                                                                                                                                          0.1




                                                                                                                                                                                                                                                                                                                                                                             0.3




                                                                                                                                                                                                                                                                                                                                                                                              0.4




                                                                                                                                                                                                                                                                                                                                                                                                          0.0




                                                                                                                                                                                                                                                                                                                                                                                                                        0.1




                                                                                                                                                                                                                                                                                                                                                                                                                                       0.3




                                                                                                                                                                                                                                                                                                                                                                                                                                                               0.4
                                                   γ                                                          β                                                                                              γ                                                          β                                                                                              γ                                                          β




                                                                                      Figure 9: Three corner plots for task B with a calibration set with 50 samples.
            .0




                                                                                                                                                                      .0




                                                                                                                                                                                                                                                                                                                                .0
           10




                                                                                                                                                                     10




                                                                                                                                                                                                                                                                                                                               10
           7.5




                                                                                                                                                                     7.5




                                                                                                                                                                                                                                                                                                                               7.5
A




                                                                                                                                                          A




                                                                                                                                                                                                                                                                                                                    A
           5.0




                                                                                                                                                                     5.0




                                                                                                                                                                                                                                                                                                                               5.0
           2.5




                                                                                                                                                                     2.5




                                                                                                                                                                                                                                                                                                                               2.5
                     0.0




                                  0.8




                                                   1.6




                                                                    2.4




                                                                                              2.5




                                                                                                            5.0




                                                                                                                                7.5




                                                                                                                                                     .0




                                                                                                                                                                               0.0




                                                                                                                                                                                            0.8




                                                                                                                                                                                                             1.6




                                                                                                                                                                                                                              2.4




                                                                                                                                                                                                                                                        2.5




                                                                                                                                                                                                                                                                      5.0




                                                                                                                                                                                                                                                                                          7.5




                                                                                                                                                                                                                                                                                                               .0




                                                                                                                                                                                                                                                                                                                                         0.0




                                                                                                                                                                                                                                                                                                                                                      0.8




                                                                                                                                                                                                                                                                                                                                                                       1.6




                                                                                                                                                                                                                                                                                                                                                                                        2.4




                                                                                                                                                                                                                                                                                                                                                                                                                  2.5




                                                                                                                                                                                                                                                                                                                                                                                                                                5.0




                                                                                                                                                                                                                                                                                                                                                                                                                                                    7.5




                                                                                                                                                                                                                                                                                                                                                                                                                                                                         .0
                                                                                                                                                  10




                                                                                                                                                                                                                                                                                                            10




                                                                                                                                                                                                                                                                                                                                                                                                                                                                      10




                                                   ω0                                                         A                                                                                              ω0                                                         A                                                                                              ω0                                                         A




                                                                                  Figure 10: Three corner plots for task C with a calibration set with 50 samples.


that belong to the calibration set while it struggles to generalize to sample that are OOD. Finally, we also show corner plots
of the learned posterior in Figure 17 for both samples that are (a) unlikely under the calibration set distribution, and (b)
likely under that distribution.




                                                                                                                                                                                                                                29
                                                                                                                                                  α                                B                              G                                                                                                                              α                                B                            G                                                                                                                                  SV
                                                                                                                              0.0    0.2    0.5       0.7    1.0             12        18    24              12       18    24                                                                                                  0.0    0.2    0.5    0.7    1.0             12        18     24             12     18     24
                                                                                                                                 0      5      0         5      0   0   60     0         0      0   0   60     0        0     0                                                                                                    0      5      0      5      0   0   60     0          0     0   0   60      0      0     0
                                                                                                                          0                                                                                                                                                                                                0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              12    18       24        30     36
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0        0     0          0     0
                                                                                                                     60                                                                                                                                                                                                   60


                                                                                                                    12                                                                                                                                                                                                   12
                                                                                                                      0                                                                                                                                                                                                    0




                                                                                                                R
                                                                                                                                                                                                                                                                                                                     R
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         50
                                                                                                                    18                                                                                                                                                                                                   18
                                                                                                                      0                                                                                                                                                                                                    0

                                                                                                                    24                                                                                                                                                                                                   24
                                                                                                                      0                                                                                                                                                                                                    0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         75

                                                                                                                          0                                                                                                                                                                                                0




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   HR
                                                                                                                     60                                                                                                                                                                                                   60
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          0
                                                                                                                    12                                                                                                                                                                                                   12
                                                                                                                      0                                                                                                                                                                                                    0




                                                                                                                G
                                                                                                                                                                                                                                                                                                                     G
                                                                                                                    18                                                                                                                                                                                                   18
                                                                                                                      0                                                                                                                                                                                                    0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          5
                                                                                                                    24                                                                                                                                                                                                   24
                                                                                                                      0                                                                                                                                                                                                    0


                                                                                                                          0                                                                                                                                                                                                0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          0
                                                                                                                     60                                                                                                                                                                                                   60


                                                                                                                    12                                                                                                                                                                                                   12
                                                                                                                      0                                                                                                                                                                                                    0




                                                                                                                B
                                                                                                                                                                                                                                                                                                                     B
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        18
                                                                                                                    18                                                                                                                                                                                                   18                                                                                                                                                                                               0
                                                                                                                      0                                                                                                                                                                                                    0

                                                                                                                    24                                                                                                                                                                                                   24
                                                                                                                      0                                                                                                                                                                                                    0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        24
                                                                                                                    0.0                                                                                                                                                                                                  0.0                                                                                                                                                                                              0
                                                                                                                         0                                                                                                                                                                                                  0




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   SV
                                                                                                                    0.2                                                                                                                                                                                                  0.2
                                                                                                                         5                                                                                                                                                                                                  5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        30
                                                                                                                    0.5                                                                                                                                                                                                  0.5                                                                                                                                                                                              0




                                                                                                                α
                                                                                                                                                                                                                                                                                                                     α
                                                                                                                         0                                                                                                                                                                                                  0

                                                                                                                    0.7                                                                                                                                                                                                  0.7
                                                                                                                         5                                                                                                                                                                                                  5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        36
                                                                                                                    1.0                                                                                                                                                                                                  1.0                                                                                                                                                                                              0
                                                                                                                         0                                                                                                                                                                                                  0




                                                                                                                                                  α                                B                              G                                                                                                                              α                                B                            G                                                                                                                                  SV
                                                                                                                              0.0    0.2    0.5       0.7    1.0             12        18    24              12       18    24                                                                                                  0.0    0.2    0.5    0.7    1.0             12        18     24             12     18     24
                                                                                                                                 0      5      0         5      0   0   60     0         0      0   0   60     0        0     0                                                                                                    0      5      0      5      0   0   60     0          0     0   0   60      0      0     0
                                                                                                                          0                                                                                                                                                                                                0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              12    18       24        30     36
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0        0     0          0     0
                                                                                                                     60                                                                                                                                                                                                   60


                                                                                                                    12                                                                                                                                                                                                   12
                                                                                                                      0                                                                                                                                                                                                    0




                                                                                                                R
                                                                                                                                                                                                                                                                                                                     R
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         50
                                                                                                                    18                                                                                                                                                                                                   18
                                                                                                                      0                                                                                                                                                                                                    0

                                                                                                                    24                                                                                                                                                                                                   24
                                                                                                                      0                                                                                                                                                                                                    0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         75

                                                                                                                          0                                                                                                                                                                                                0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   HR




                                                                                                                     60                                                                                                                                                                                                   60
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          0
                                                                                                                    12                                                                                                                                                                                                   12
                                                                                                                      0                                                                                                                                                                                                    0




                                                                                                                G
                                                                                                                                                                                                                                                                                                                     G
                                                                                                                    18                                                                                                                                                                                                   18
                                                                                                                      0                                                                                                                                                                                                    0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          5
                                                                                                                    24                                                                                                                                                                                                   24
                                                                                                                      0                                                                                                                                                                                                    0




30
                                                                                                                          0                                                                                                                                                                                                0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          0
                                                                                                                     60                                                                                                                                                                                                   60


                                                                                                                    12                                                                                                                                                                                                   12
                                                                                                                      0                                                                                                                                                                                                    0




                                                                                                                B
                                                                                                                                                                                                                                                                                                                     B
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        18
                                                                                                                    18                                                                                                                                                                                                   18                                                                                                                                                                                               0
                                                                                                                      0                                                                                                                                                                                                    0

                                                                                                                    24                                                                                                                                                                                                   24
                                                                                                                      0                                                                                                                                                                                                    0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        24
                                                                                                                    0.0                                                                                                                                                                                                  0.0                                                                                                                                                                                              0
                                                                                                                         0                                                                                                                                                                                                  0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   SV




                                                                                                                    0.2                                                                                                                                                                                                  0.2
                                                                                                                         5                                                                                                                                                                                                  5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        30
                                                                                                                    0.5                                                                                                                                                                                                  0.5                                                                                                                                                                                              0




                                                                                                                α
                                                                                                                                                                                                                                                                                                                     α
                                                                                                                         0                                                                                                                                                                                                  0

                                                                                                                    0.7                                                                                                                                                                                                  0.7
                                                                                                                         5                                                                                                                                                                                                  5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        36
                                                                                                                    1.0                                                                                                                                                                                                  1.0                                                                                                                                                                                              0
                                                                                                                         0                                                                                                                                                                                                  0




                                                                                                                                                  α                                B                              G                                                                                                                              α                                B                            G                                                                                                                                  SV
                                                                                                                              0.0    0.2    0.5       0.7    1.0             12        18    24              12       18    24                                                                                                  0.0    0.2    0.5    0.7    1.0             12        18     24             12     18     24
                                                                                                                                 0      5      0         5      0   0   60     0         0      0   0   60     0        0     0                                                                                                    0      5      0      5      0   0   60     0          0     0   0   60      0      0     0
                                                                                                                          0                                                                                                                                                                                                0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              12    18       24        30     36
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                0        0     0          0     0
                                                                                                                     60                                                                                                                                                                                                   60


                                                                                                                    12                                                                                                                                                                                                   12
                                                                                                                      0                                                                                                                                                                                                    0




                                                                                                                R
                                                                                                                                                                                                                                                                                                                     R
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         50
                                                                                                                    18                                                                                                                                                                                                   18
                                                                                                                      0                                                                                                                                                                                                    0

                                                                                                                    24                                                                                                                                                                                                   24
                                                                                                                      0                                                                                                                                                                                                    0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         75

                                                                                                                          0                                                                                                                                                                                                0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   HR




                                                                                                                     60                                                                                                                                                                                                   60
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          0
                                                                                                                    12                                                                                                                                                                                                   12
                                                                                                                      0                                                                                                                                                                                                    0




                                                                                                                G
                                                                                                                                                                                                                                                                                                                     G




                                                                                                                                                                                                                                  Figure 12: Three corner plots for task E with a calibration set with 50 samples.
                                                                                                                                                                                                                                                                                                                                                                                                                                Figure 11: Three corner plots for task D with a calibration set with 50 samples.




                                                                                                                    18                                                                                                                                                                                                   18
                                                                                                                      0                                                                                                                                                                                                    0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          5
                                                                                                                    24                                                                                                                                                                                                   24
                                                                                                                      0                                                                                                                                                                                                    0


                                                                                                                          0                                                                                                                                                                                                0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Addressing Misspecification in Simulation-based Inference through Data-driven Calibration




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          0
                                                                                                                     60                                                                                                                                                                                                   60


                                                                                                                    12                                                                                                                                                                                                   12
                                                                                                                      0                                                                                                                                                                                                    0




                                                                                                                B
                                                                                                                                                                                                                                                                                                                     B




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        18
                                                                                                                    18                                                                                                                                                                                                   18                                                                                                                                                                                               0
                                                                                                                      0                                                                                                                                                                                                    0




     Figure 13: Three corner plots for task E with distribution shift with a calibration set with 50 samples.
                                                                                                                    24                                                                                                                                                                                                   24
                                                                                                                      0                                                                                                                                                                                                    0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        24
                                                                                                                    0.0                                                                                                                                                                                                  0.0                                                                                                                                                                                              0
                                                                                                                         0                                                                                                                                                                                                  0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   SV




                                                                                                                    0.2                                                                                                                                                                                                  0.2
                                                                                                                         5                                                                                                                                                                                                  5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        30
                                                                                                                    0.5                                                                                                                                                                                                  0.5                                                                                                                                                                                              0




                                                                                                                α
                                                                                                                                                                                                                                                                                                                     α




                                                                                                                         0                                                                                                                                                                                                  0

                                                                                                                    0.7                                                                                                                                                                                                  0.7
                                                                                                                         5                                                                                                                                                                                                  5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        36
                                                                                                                    1.0                                                                                                                                                                                                  1.0                                                                                                                                                                                              0
                                                                                                                         0                                                                                                                                                                                                  0
                      Addressing Misspecification in Simulation-based Inference through Data-driven Calibration




                           (a)                                      (b)                                            (c)




                           (d)                                      (e)                                             (f)

Figure 14: Calibration plots of the different methods on the 6 benchmarks, the coverage at each level is the average of the
coverage of the marginal distributions. Each color indicates a different algorithm and the opacity is proportional to the size
of the calibration set which ranges from 10 to 1000. We observe that RoPE and OT-only are consistently well calibrated for.




                0.5
                                                                           2
                0.4
                                                                           3
                0.3
                                                                           4
        ACAUC




                                                                     LPP




                0.2                                                        5
                0.1                                                        6                                    p() p()
                                                                                                                p ( )=p ( )
                0.0                                                        7                                    SBI
                                                                                                                Prior
                0.1                                                        8
                      10           50          200           1000              10      50                 200             1000
                                                                                        Calib. set size
         Figure 15: Comparison of ACAUC and LPP for calibration set that is different from the test distribution.




                                                                    31
                                     Addressing Misspecification in Simulation-based Inference through Data-driven Calibration




                                                                            160                       Rolling Average

                                                                            140
                                          MAE (between normalized colors)

                                                                            120
                                                                            100
                                                                             80
                                                                             60
                                                                             40
                                                                             20
                                                                                 0
                                                                                                      0.2                    0.4            0.6                          0.8                     1.0
                                                                                                                             Distance from center of p
Figure 16: Accuracy of the predicted RGB values (normalized by alpha) as a function of the distance between the analyzed
sample from the center of the calibration set distribution.
         0
         30




                                                                                                                                                          0
                                                                                                                                                          24
         0
         20




                                                                                                                                                          0
 G




                                                                                                                                                  G
                                                                                                                                                          16
         0
         10




                                                                                                                                                          80
         0




                                                                                                                                                          0
         0
         10
         0
         30




                                                                                                                                                          0
                                                                                                                                                          24
         0
         20
 B




                                                                                                                                                  B
                                                                                                                                                          0
                                                                                                                                                          16
         0
         10




                                                                                                                                                          80
         0




                                                                                                                                                          0
         1.2




                                                                                                                                                          1.2
                                                                                                                                                          0.9
         0.8
 alpha




                                                                                                                                                  alpha
                                                                                                                                                          0.6
         0.4




                                                                                                                                                          0.3
         0.0




                                                                                                                                                          0.0
               0

                   0

                            0

                                0

                                     0
                                          0

                                                                0

                                                                            0

                                                                                     0

                                                                                         0

                                                                                             0

                                                                                                      0

                                                                                                          0


                                                                                                               0.0

                                                                                                                     0.4

                                                                                                                           0.8

                                                                                                                                 1.2




                                                                                                                                                                0

                                                                                                                                                                    80

                                                                                                                                                                          0

                                                                                                                                                                               0


                                                                                                                                                                                    0

                                                                                                                                                                                        80

                                                                                                                                                                                             0

                                                                                                                                                                                                   0

                                                                                                                                                                                                       0

                                                                                                                                                                                                           80

                                                                                                                                                                                                                0

                                                                                                                                                                                                                     0


                                                                                                                                                                                                                          0.0
                                                                                                                                                                                                                                0.3
                                                                                                                                                                                                                                      0.6
                                                                                                                                                                                                                                              0.9
                                                                                                                                                                                                                                                    1.2
                   10

                        20

                                30

                                     10



                                                          10

                                                                            20

                                                                                 30



                                                                                             10

                                                                                                  20

                                                                                                          30




                                                                                                                                                                         16

                                                                                                                                                                               24




                                                                                                                                                                                             16

                                                                                                                                                                                                  24




                                                                                                                                                                                                                16

                                                                                                                                                                                                                     24




                        R                                            G                            B                  alpha                                                R                  G                   B                    alpha


                                                                                 (a)                                                                                                               (b)

Figure 17: corner plots for three distinct observations that are very (a) that are very unlikely under the "bad" calibration set.
(b) likely under the "bad" calibration set.



                                                                                                                                       32
