Manuscript Offprint
arXiv:2610.12437Density Ratio Estimation with Stein Displacement Fields
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Density ratios quantify distribution shift from a probability-mass point of view, whereas displacement fields describe, from a dynamical point of view, how one distribution is transported onto another. Although both offer complementary insights, they are usually estimated separately, and converting one into the other requires post-processing. In this paper, we estimate the density ratio between a target and a base distribution by parametrizing it through a displacement field acting on the base: the log-ratio is modeled as minus the Stein operator of the base applied to the field, up to a normalizing constant. This gives both statistical and dynamical descriptions of the distribution shift through a single convex optimization problem. Iterating this estimate-and-move step gives two inference algorithms: push-forward moves the model and corrects a pretrained sampler without retraining it, whereas pull-back moves the data closer to the base and fits a transformation model one layer at a time. Applications to distribution shift in simulation-based inference and to nonlinear independent component analysis illustrate the benefits and limitations of the approach.
1 INTRODUCTION
Many machine learning problems come down to comparing two distributions. Broadly speaking, there are two different ways to do so. The first is information-theoretic: a divergence, such as the Kullback–Leibler (KL) divergence or another f-divergence, measures how two distributions spread their probability mass differently. These divergences serve as training objectives for generative adversarial networks [25, 58], and their gradient flows move one distribution towards the other [39, 47, 53, 55]. An f-divergence is an expectation of a function of the density ratio [57, 78, 50]. Density ratio estimation (DRE) has therefore become a building block of this approach, as well as a tool in its own right for importance weighting, two-sample testing and likelihood-free inference [72, 18, 30]. However, ratio estimation is often fragile. When p and q are far apart, samples from one say little about the other, a problem known as the “density chasm” [64], and adversarial training is notoriously unstable [5].
The second approach compares distributions through transport. Rather than comparing densities, it learns how to move one distribution onto the other with a displacement field or a flow map. This view underlies optimal-transport domain adaptation [17] and flow-based generative modeling, where flow matching, rectified flows and stochastic interpolants fit the velocity of a prescribed path by least-squares regression [46, 51, 1]. These methods fit the velocity by regression, avoiding adversarial ratio estimation. Their prescribed paths, however, need not follow the gradient flow of a specified divergence.
Can we learn a divergence and, at the same time, a displacement field along which moving one distribution decreases that divergence? We show that this is feasible when the score of the base distribution can be evaluated and the target distribution is observed through samples. Stein's method connects the two views [70, 4]. The Langevin–Stein operator of the base maps a vector field to a scalar function that has zero mean under and depends on only through its score (Section 2.2). We model the log-ratio as , up to a constant. This modelling choice has two consequences. First, a convex optimization problem derived from the Donsker–Varadhan (DV) lower bound estimates both and a lower bound on using only samples of and the score of . Similar Stein-parametrized ratio models have been used to fit intractable statistical models [49]. Second, moving along the same field, with a small step size , changes its log-density by to first order. At a population optimum attaining the DV bound, this is equivalent, up to nor-malization and to first order, to multiplying by . The field that exactly represents the log-ratio therefore also gives a displacement towards . Its infinitesimal density change agrees with the Fisher–Rao gradient flow of , realized through transport.
This infinitesimal interpretation motivates repeating the refinement step, and there are two natural approaches. If is a pretrained generative model with a tractable density (e.g., flow models), we can move the model by appending displacement layers to the model, which correct the model without retraining it. If instead belongs to a simple parametric family that we want to fit, we can move the data, pulling them back towards the family through each displacement. We call the two algorithms push-forward and pull-back and show that they are naturally suited to model updating and latent independent source recovery tasks respectively.
In this paper, we first propose Stein displacement ratio estimation (SDRE), a convex density ratio estimator that estimates not only the ratio p/q but also a displacement field. When the population DV bound is attained, this field induces, to first order, a density update along the Fisher–Rao gradient flow of KL(q p) (Section 3). This result motivates the two inference algorithms of Section 4. Push-forward appends displacement layers to a pretrained sampler to fit the data while keeping its model frozen, and pull-back transforms the data through an invertible flow towards a prior from a simple parametric family. Finally, we apply both algorithms to two problems (Section 5). Push-forward adapts a pretrained diffusion posterior sampler to a new posterior target, performing on par with discriminator guidance while keeping an exact density. Pull-back refines pretrained ICA models and gives strong signal identification in synthetic and speech settings. We also discuss the limitations of the approach (Section 6).
2.1 Density ratio estimation
We first recall how a density ratio is estimated when samples of both distributions are available; our estimator in Section 3 modifies this construction. Suppose we have samples from two distributions,
The KL importance estimation procedure [KLIEP; 71] models the ratio by with non-negative basis functions and solves the constrained convex problem
The log-linear variant removes the constraints and gives the unconstrained convex problem [76]
This log-linear KLIEP closely resembles the Donsker–Varadhan (DV) representation of the KL divergence [20],
Restricting f to a log-ratio model that is linear in its parameters and replacing expectations with sample averages gives the log-linear KLIEP above.
When p and q are far apart, the samples of one say little about the other [the “density chasm”; 64]; recent methods bridge the gap with classifiers over intermediate or auxiliary distributions [64, 69], time score matching along a continuous path [14, 79], or a shared invertible feature map [13]. All of these methods, like (2) and (3), need samples from both distributions.
2.2 Stein's method
Stein’s method characterizes a distribution by an operator whose expectation under that distribution vanishes [70, 4]. For a smooth, positive density on with score , the Langevin–Stein operator acts on a vector field as
By the second form and the divergence theorem,
whenever vanishes sufficiently fast at infinity and is integrable; such fields form the Stein class of , and (5) is Stein's identity. The operator depends on only through its score, so it can be evaluated when the normalizing constant of is unknown.
Optimizing the expectation of under a data distribution over a class of fields gives Stein discrepancies
[26], used for goodness-of-fit tests through the closed-form kernelized Stein discrepancy (KSD) [48, 15]. Stein variational gradient descent [SVGD; 47] moves particles from a distribution towards a target with known score : under the map , the derivative of at is , so maximizing over the kernel ball gives the steepest descent direction within that class.
In these uses, the scalar function measures a discrepancy through its expectation or enters the directional derivative of the KL divergence. The vector field , selected by maximizing over the kernel ball, provides the particle descent direction in SVGD.
2.3 Stein density ratio estimation
Estimating the ratio between a data distribution and an unnormalized model is useful in statistical inference, and the Stein operator can help in this setting. Liu et al. [49] estimate where is an unnormalized model with a known score and is observed through samples. They take stacked scalar feature functions , apply the Stein operator to their gradient fields, and use the linear ratio model , where collects for . By Stein's identity, for every , so the normalization constraint of KLIEP holds automatically at the population level. The normalization constraint no longer requires samples from , leaving the objective
The logarithms restrict the domain to positive fitted ratios at the samples. The optimized value serves as an estimate of . Liu et al. [49] minimize this estimate over the parameters of q to fit intractable models. The linear model is not guaranteed to be positive away from the samples, which limits its use for out-of-sample ratio evaluation.
3 STEIN DISPLACEMENT RATIO ESTIMATION
Let be a base distribution on , for example a prior or a pretrained generative model, and let be a target. We can evaluate the score of the base, , which does not require its normalizing constant, and we observe the target only through samples . Our goal is to estimate the density ratio . Like the density ratio estimator in Section 2.3, our estimator uses no samples from . Throughout, is smooth and positive, and every vector field below belongs to the Stein class of (Section 2.2), so that Stein's identity (5) holds.
Consider the population objective of the log-linear KLIEP for the reciprocal ratio , i.e., (3) with p and q exchanged
The density now enters through a plain expectation. Choosing makes this expectation vanish by (5), and we obtain the lower bound
The right-hand side depends on an expectation under p and the score of q. The inequality (7) is tight when equals up to a constant.
Maximizing the right-hand side of (7) over gives an estimate , where is a constant. We next define a finite-sample estimator and explain its statistical and dynamical interpretations.
3.1 The regularized estimator
Let V be a class of vector fields with a norm . We estimate the field by minimizing the empirical version of with a ridge penalty,
The ridge level is a hyperparameter and is chosen using validation samples. Since is linear in , the objective is a log-sum-exp of linear functions of plus a convex squared-norm penalty. It is therefore convex whenever is a linear space, e.g., the span of finitely many fields or a reproducing kernel Hilbert space. For the finite basis and quadratic coefficient penalty used in our experiments, we solve this convex problem with Newton or quasi-Newton methods (Appendix F).
The lower bound (7) at , approximated using validation samples held out from (8),
can be used as a validation diagnostic: a well above its standard error suggests that q and p differ. The empirical is not itself a guaranteed lower bound. Finally, the log ratio estimate is
where subtracting normalizes the estimate so that .
Compared with Stein-parametrized linear ratio models used by Liu et al. [49], in SDRE, the Stein operator models a log ratio, not the ratio itself, and the field also defines a displacement of q, as we show next.
3.2 One estimate, two perspectives on distribution shift
We now show how the field connects ratio estimation with sample transport. The first result identifies the log ratio when the population bound is tight; the second describes how moving q along the field changes its log-density.
Proposition 1. Let . Then , with equality if and only if for -almost every .
When the population bound is attained, is the log-ratio shifted by the divergence . This also justifies subtracting in (10). The proof is in Appendix A.
The field also has a dynamical reading. Move every point of along the field, , where is a step size, and write for the distribution of with . The next result says how this displacement changes .
Proposition 2. Let with bounded first and second derivatives. For small enough, is a diffeomorphism and, for every ,
See Appendix A for the proof. In words, moving q by v changes its log-density by , the same quantity that models in (10). This change-of-variables argument also underlies the KL derivative used in SVGD [47].
Combining both propositions leads to an interesting interpretation of the optimal displacement . To state this, recall that the Fisher–Rao gradient flow of is : instead of moving mass, it reweights a density pointwise towards by the ratio . The exact solution of this gradient flow is the geometric interpolation .
Corollary 1. Let satisfy the assumptions of Proposition 2 and attain equality in Proposition 1. Then pointwise for -almost every . This agrees with an explicit Euler step of the Fisher–Rao gradient flow started at , up to . The normalized geometric interpolation has the same first-order log-density change.
The proof follows directly from Propositions 1 and 2; we give it in Appendix A. Simply speaking, at the optimum, moving every sample from q along the field v moves the base q closer to the target p along the Fisher–Rao gradient flow. This interpretation distinguishes our displacement field v from the “feature function” used by Liu et al. [49]. The field v is not only the function that best explains the density ratio r, but also a legitimate vector field whose displacement multiplies q by a small power of the ratio, thus moving q towards p.
A single convex problem therefore provides two interpretations of the shift: a statistical one (the ratio and the diagnostic ) and a dynamical one (the displacement ). Hence the name “Stein displacement ratio estimation”. The Fisher–Rao flow is usually simulated by reweighting or by birth–death of particles [53], or by a kernel-based transport that requires pointwise evaluation of the unnormalized target-to-reference density ratio [55]. Each moves existing mass through an invertible map. Restricted fields and small steps can limit how much mass is moved between separated modes; we return to this limitation in Section 6.
Proposition 2 also offers a principled way to incorporate dynamical prior knowledge into density ratio estimation: if we know that the distribution shift arises from a specific dynamical process, such as linear or low-rank transformations, we can restrict V to the corresponding family of fields. Therefore, a structured class encodes prior knowledge of the distribution shift. We use these restricted classes of transformations in our experiments, and they are explained in Appendix F.
Corollary 1 only describes a single Euler step . In applications where we would like the base model to approximate the target p, we might want to perform such a step repeatedly. In the next section, we study two different algorithms that perform such tasks.
4 INFERENCE ALGORITHMS
The first-order Fisher–Rao interpretation motivates alternating ratio estimation and displacement to bring a starting base model closer to the target samples. At iteration k, we evaluate the score of the current base, solve (8) for a field , estimate by (10), and construct a candidate layer . If the layer passes a validation criterion, we update the distributions and repeat; otherwise we stop.
We can carry out this estimation-and-transport loop from two different directions (Figure 1). Either move the model towards the data, which we call push-forward, or pull the data back towards a simple, in-terpretable base distribution, which we call pull-back.
4.1 Push-forward algorithm
Suppose our starting base model is a pretrained generative model and we want to adapt it so that it agrees with the target data. Let be a pretrained invertible generator with a simple input distribution , such as . We correct it by appending displacement layers to its output. After layers, the current base distribution is
with . At iteration , we fit SDRE using the new base and the target samples , then append the new layer at the output: .
Under the conditions of Corollary 1, with attaining equality in Proposition 1, this iteration performs the update to first order in and the subsequent updates discretize the Fisher–Rao flow towards . The pretrained generator remains fixed, and the accepted layers provide the correction.
At each iteration, the new estimate needs the score of the current model . When the sampler consists of invertible steps with tractable Jacobians, we obtain by inverting those steps and accumulating their log-determinants, then compute its score by an adjoint recursion (Appendix D). This back-traced score includes all corrections so far.
We keep a layer only when the validation criterion detects a discrepancy between and . We check for , where is the delta-method estimate over the validation samples. Finally, the procedure returns a corrected sampler whose density is available by change of variables. The pseudocode is given in Algorithm 1; Appendix C.1 gives further details.
Algorithm 1 Push-forward,
Require: pretrained invertible sampler with latent distribution ; target samples , split into training and validation samples; maximum number of layers
1: for do
2: Compute by back-tracing
3: with on training samples.
4: App. C.1
5: if on the validation samples then
return
6: end if
7:
8: end for
9: return
4.2 Pull-back algorithm
Suppose our goal is to find a latent representation of our data. The latent structure can be described by a simple, interpretable parametric prior q whose log-density and score are known in closed form.
Before layer , the current latent samples are , with distribution . We fit a field in this latent space and compose the resulting layer with the current map: . The updated representation is therefore .
If the prior has unknown parameters, we also need to align the prior and the current representation at every iteration. First, we fit on the current latent samples . We then solve (8) with base and , and pull the data back through the resulting layer: and update the forward map . Under the conditions of Corollary 1, with held fixed, the forward move of the base is to first order, where estimates . Thus the same Fisher–Rao step is used in the latent space, interleaved with the prior update. The score needed for (8) is evaluated directly from , without back-tracing the full map.
We accept or reject layer , chosen among several candidates (Appendix C.2), by the validation likelihood of the transformation model with ,
Algorithm 2 summarizes the procedure. Identifiability requires restricting the transformation: a sufficiently flexible can match the prior without recovering the intended latent structure (Appendix C.2).
Algorithm 2 Pull-back,
Require: starting map ; target samples , split into training and validation samples; base family ; maximum number of layers
1: for all target samples
2: for do
3:
4: Solve (8) with on training
5: App. C.2
6: if does not increase the validation likelihood (13) then return
7: end if
8: for all latent samples
9:
10: end for
11:
12: return
(a) Push-forward

(b) Pull-back
Figure 1: Layer construction in the push-forward and pull-back algorithms. Push-forward appends to the model output; pull-back applies to the current latent samples and refits the base between layers. In both panels, maps the latent base to data.
4.3 Choosing between push-forward and pull-back
The choice depends on the objective of inference. Push-forward corrects a model to match the data. Pull-back transforms the data to fit an interpretable prior. Their acceptance rules reflect these goals: push-forward changes the model when the criterion detects a discrepancy, whereas pull-back keeps a layer when it improves the validation likelihood.
Their computational costs also differ. Push-forward recomputes the score through the full sampler, including all previous layers. Pull-back evaluates the prior score directly, carrying forward the latent samples and accumulated log-determinants. In the next section, we use push-forward for guidance of a pretrained posterior sampler in simulation-based inference, and pull-back for source recovery in nonlinear ICA.
5 APPLICATIONS
In this section, we examine the proposed algorithms (PUSH, PULL) on simulation-based inference and nonlinear ICA tasks. Specifically, we use push-forward to correct a posterior sampler and pull-back to recover independent sources, from scratch or by refining pretrained models.
We use conditional variants of PUSH and PULL. We apply (8) to joint target samples, with the Stein operator acting only on the transported variable (Appendix B). In the experiments, SDRE denotes our methods.
5.1 Correcting a posterior sampler in simulation-based inference
In simulation-based inference, a parameter is drawn from a prior and passed through a simulator to produce an observation . An amortized posterior sampler trained on these pairs can then generate samples for unseen observations. If the prior changes to or the simulator differs from the target process , the pretrained model now targets the wrong posterior. We want to adapt our pretrained model to using target pairs while keeping the pretrained network parameters fixed.
We consider the pretrained sampler to be a diffusion sampler [67, 65]. Since diffusion sampling is a multi-level procedure, we apply PUSH to correct its deterministic predictor steps at all noise levels, with a conditional field . At noise level , the current sampler is compared with the target noised to the same level: the target parameters become , where and are the signal and noise scales and ; the observations are unchanged. The score is back-traced through the predictor steps and all accepted corrections. The result is a sampler corrected for the target prior and simulator with a density available by change of variables at all steps. Appendix G gives the full procedure.
We use a neural posterior score estimator (NPSE) as the starting base model and adapt it on two sbibm tasks [54]: gaussian_linear and bernoulli_glm (GLM), under three shifts (Table 1). Prior change: the prior of gaussian_linear is shifted or replaced by a bimodal mixture; the GLM prior has a shifted bias and smoother filter. Target pairs are resampled from existing simulations with weights proportional to , without new simulations. Simulator change: target pairs are generated by a GLM with a steeper spiking nonlinearity. Partial coverage: target pairs from this modified simulator cover only negative-bias neurons; we evaluate on both covered and uncovered regions. We measure posterior accuracy by the classifier two-sample test (C2ST) against reference samples (0.5 means indistinguishable). Retraining on new target simulations provides a reference.
Table 1: Posterior correction in simulation-based inference: C2ST against reference posteriors (0.5 = indistinguishable; mean ± std). Best per column in bold, second best underlined (reference rows excluded). *No tractable density. †Hyperparameters selected by test C2ST. ×: not applicable; -: not evaluated. The last row reports retraining on new target simulations as a reference. Experimental details are in Appendix I.
| Method | Prior change | Simulator change | Partial coverage | ||||
|---|---|---|---|---|---|---|---|
| unimodal | bimodal | GLM | covered | uncovered | |||
| Frozen NPSE | |||||||
| PriorGuide, ODE | ✕ | ✕ | ✕ | ✕ | |||
| PriorGuide + Langevin*† | ✕ | ✕ | ✕ | ✕ | |||
| Classifier DRE + SIR* | |||||||
| DG + Langevin* | |||||||
| Fine-tuned NPSE | |||||||
| Fine-tuned, sim. + real | ✕ | ✕ | ✕ | - | - | ||
| Frozen NPSE + SDRE | |||||||
| Retrained on target sim. | |||||||
We compare with PriorGuide, with and without Langevin refinement [77], classifier-based DRE with sampling-importance resampling (SIR) [8], discriminator guidance with Langevin refinement [42], and fine-tuning on target pairs, alone or mixed with simulations. PriorGuide applies only to prior changes; methods marked * in Table 1 have no tractable density. A tractable density can be useful in downstream SBI applications. Appendix I gives the experimental setup, baseline implementations and evaluation protocol.
For a unimodal prior change, the correction reduces C2ST from 0.724 to 0.523, close to retraining on new target simulations (0.511), while using only the existing simulations. PriorGuide with Langevin refinement achieves lower mean C2ST in all three prior-change settings, although its advantage over SDRE is statistically significant only in the bimodal setting. PriorGuide with Langevin refinement uses hyperparameters selected by test C2ST and does not retain a tractable density. Under simulator misspecification, target pairs improve the frozen sampler, with accuracy comparable to discriminator guidance and better than fine-tuning. With partial coverage, the correction improves accuracy in both the covered and uncovered regions. Table 1 gives the comparison; the experimental setup and statistical tests are in Appendix I.
5.2 Recovering sources in nonlinear ICA
In independent component analysis (ICA), observations are for an invertible mixing and latent sources . We want to recover from observations . In auxiliary variable ICA, we assume that the sources are independent given a time segment , . Under suitable regularity conditions across segments, the inverse mixing is identifiable up to a permutation and componentwise invertible transformations [34, 37, 41]. The goal is to recover these sources from the observations and segment labels.
Since the latent signals are conditionally independent, we use a factorized conditional base . Its parameters vary across segments, while the field and hence the learned transformation are shared across segments. The sources are read off as . We use Gaussian or smooth super-Gaussian bases and restrict the fields to structured classes that are linear in their parameters (Appendix F). Each candidate field is therefore fitted by a convex problem, and the restrictions express assumptions about the mixing. We also test two different starting configurations: starting from learns the model from scratch; starting from a pretrained model performs refinement by appending layers to its existing transformation.
Our experiments use synthetic Gaussian sources and real speech recordings from CMU ARCTIC [43] and LibriSpeech [60], all mixed by a random invertible nonlinear network (Appendix H). The two synthetic settings use samples per segment. We measure recovery by the mean correlation coefficient (MCC) between estimated and true sources after optimal matching.
We compare with three estimators trained end to end by maximum likelihood or its bound. iVAE [41] is a variational autoencoder whose prior on the latent variables is conditioned on the segment label; its exact likelihood is intractable. GIN [68] is a volume-preserving normalizing flow with a conditional Gaussian base. The oracle-structured flow (OSF) uses oracle knowledge of the mixing structure, which is not available in practice (Appendix H). We refine GIN and
Table 2: Nonlinear ICA: validation MCC (mean std). Top: standalone estimators; bottom: pretrained models refined by SDRE. Best per column within each block is bold, excluding the starred standalone row. *Uses oracle knowledge of the mixing architecture. Experimental details are in Appendix H.
| Method | Synthetic () | CMU ARCTIC | LibriSpeech | |||
|---|---|---|---|---|---|---|
| iVAE | ||||||
| GIN | ||||||
| SDRE (from scratch) | ||||||
| OSF* | ||||||
| GIN + SDRE | ||||||
| OSF* + SDRE | ||||||
Table 3: Refinement versus extended training: validation MCC (seed means). Extended training uses the original training steps; “wins” counts seeds on which refinement beats extended training. Best per column within each model is bold. Experimental details are in Appendix H.
| Synthetic | ARCTIC | LibriSpeech | wins | ||||
|---|---|---|---|---|---|---|---|
| GIN | |||||||
| Extended training | |||||||
| + SDRE | |||||||
| OSF | |||||||
| Extended training | |||||||
| + SDRE | |||||||
OSF, both with tractable exact likelihoods.
As Table 2 shows, refinement with SDRE improves the mean MCC of every pretrained model in all six settings. For example, OSF improves from 0.762 to 0.887 on the synthetic benchmark (). To check whether this gain merely reflects additional training, we also train each model for four times the original number of steps (extended training). Table 3 shows that refinement with SDRE gives higher MCC in 39 of 44 paired runs. These comparisons support using pull-back to improve pretrained representations.
Trained from scratch, SDRE achieves the highest mean MCC among the evaluated estimators without oracle knowledge in five of the six settings. OSF, which has access to the mixing architecture, achieves higher mean MCC in all six settings. Appendix H gives the data, models and detailed comparisons; Appendix H.4 examines stopping rules, selection among refined models and further datasets.
6 CONCLUSION AND LIMITATIONS
We propose SDRE, which models the log density ratio as minus the Stein operator applied to a displacement field, up to a normalizing constant. This connects two views of distribution shift. A convex fit estimates both the ratio and a KL lower bound. When the population bound is attained, the estimated field gives a first-order Fisher–Rao update. Repeating the fit-and-update step yields push-forward and pull-back inference algorithms, which we evaluate on posterior correction in SBI and source recovery in nonlinear ICA.
Our method has theoretical and computational limitations. Moving mass between separated modes may require complex displacement fields. Restricting can limit such transport, whereas highly flexible, unregularized fields can make ratio estimation numerically unstable in high dimensions. Push-forward also requires back-tracing the score through all previous corrections, so its cost grows with the number of layers.
Due to space constraints, we defer a detailed discussion of related work to Section J. There, we compare SDRE with existing density ratio estimators, discuss its transport-based approximation of Fisher–Rao dynamics in relation to kernel-based approaches, and contrast greedy, layer-wise pull-back estimation with end-to-end nonlinear ICA methods such as GIN [68].
References
[1] Michael S. Albergo and Eric Vanden-Eijnden. Building normalizing flows with stochastic interpolants. In International Conference on Learning Representations, 2023.
[2] Shun-ichi Amari, Andrzej Cichocki, and Howard Hua Yang. A new learning algorithm for blind signal separation. In Advances in Neural Information Processing Systems 8, 1996.
[3] Shun-ichi Amari, Tian-Ping Chen, and Andrzej Cichocki. Stability analysis of learning algorithms for blind source separation. Neural Networks, 10(8):1345–1351, 1997.
[4] Andreas Anastasiou, Alessandro Barp, François-Xavier Briol, Bruno Ebner, Robert E. Gaunt, Fatemeh Ghaderinezhad, Jackson Gorham, Arthur Gretton, Christophe Ley, Qiang Liu, Lester Mackey, Chris J. Oates, Gesine Reinert, and Yvik Swan. Stein's method meets computational statistics: A review of some recent developments. Statistical Science, 38(1):120–139, 2023.
[5] Martin Arjovsky and Léon Bottou. Towards principled methods for training generative adversarial networks. In International Conference on Learning Representations, 2017.
[6] Mohamed Ishmael Belghazi, Aristide Baratin, Sai Rajeswar, Sherjil Ozair, Yoshua Bengio, Aaron Courville, and R. Devon Hjelm. Mutual information neural estimation. In Proceedings of the 35th International Conference on Machine Learning (ICML), 2018.
[7] Anthony J. Bell and Terrence J. Sejnowski. An information-maximization approach to blind separation and blind deconvolution. Neural Computation, 7(6):1129–1159, 1995.
[8] Steffen Bickel, Michael Brückner, and Tobias Scheffer. Discriminative learning under covariate shift. Journal of Machine Learning Research, 10: 2137–2155, 2009.
[9] Jean-François Cardoso. Infomax and maximum likelihood for blind source separation. IEEE Signal Processing Letters, 4(4):112–114, 1997.
[10] Jean-François Cardoso and Beate Hvam Laheld. Equivariant adaptive source separation. IEEE Transactions on Signal Processing, 44(12):3017–3030, 1996.
[11] Scott Shaobing Chen and Ramesh A. Gopinath. Gaussianization. In Advances in Neural Information Processing Systems 13, 2001.
[12] Lénaïc Chizat, Gabriel Peyré, Bernhard Schmitzer, and François-Xavier Vialard. An
interpolating distance between optimal transport and Fisher–Rao metrics. Foundations of Computational Mathematics, 18:1–44, 2018.
[13] Kristy Choi, Madeline Liao, and Stefano Ermon. Featurized density ratio estimation. In Proceedings of the 37th Conference on Uncertainty in Artificial Intelligence (UAI), 2021.
[14] Kristy Choi, Chenlin Meng, Yang Song, and Stefano Ermon. Density ratio estimation via infinitesimal classification. In Proceedings of the 25th International Conference on Artificial Intelligence and Statistics (AISTATS), 2022.
[15] Kacper Chwialkowski, Heiko Strathmann, and Arthur Gretton. A kernel test of goodness of fit. In Proceedings of the 33rd International Conference on Machine Learning (ICML), 2016.
[16] Pierre Comon. Independent component analysis, a new concept? Signal Processing, 36(3):287–314, 1994.
[17] Nicolas Courty, Rémi Flamary, Devis Tuia, and Alain Rakotomamonjy. Optimal transport for domain adaptation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(9):1853–1865, 2017.
[18] Kyle Cranmer, Johann Brehmer, and Gilles Louppe. The frontier of simulation-based inference. Proceedings of the National Academy of Sciences, 117(48):30055–30062, 2020.
[19] Biwei Dai and Uroš Seljak. Sliced iterative normalizing flows. In Proceedings of the 38th International Conference on Machine Learning (ICML), 2021.
[20] Monroe D. Donsker and S. R. Srinivasa Varadhan. Asymptotic evaluation of certain Markov process expectations for large time. IV. Communications on Pure and Applied Mathematics, 36(2):183–212, 1983.
[21] Jerome H. Friedman. Exploratory projection pursuit. Journal of the American Statistical Association, 82(397):249–266, 1987.
[22] Juan L. Gamella, Simon Bing, and Jakob Runge. Sanity checking causal representation learning on a simple real-world system. In Proceedings of the 42nd International Conference on Machine Learning (ICML), volume 267 of Proceedings of Machine Learning Research, pages 18143–18169, 2025.
[23] Juan L. Gamella, Jonas Peters, and Peter Bühlmann. Causal chambers as a real-world physical testbed for AI methodology. Nature Machine Intelligence, 2025.
[24] Robert Giaquinto and Arindam Banerjee. Gradient boosted normalizing flows. In Advances in Neural Information Processing Systems 33, 2020.
[25] Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems 27, 2014.
[26] Jackson Gorham and Lester Mackey. Measuring sample quality with Stein's method. In Advances in Neural Information Processing Systems 28, 2015.
[27] Luigi Gresele, Julius von Kügelgen, Vincent Stimper, Bernhard Schölkopf, and Michel Besserve. Independent mechanism analysis, a new concept? In Advances in Neural Information Processing Systems 34, 2021.
[28] Michael Gutmann and Aapo Hyvärinen. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models. In Proceedings of the 13th International Conference on Artificial Intelligence and Statistics (AISTATS), 2010.
[29] Hermanni Hälvä and Aapo Hyvärinen. Hidden Markov nonlinear ICA: Unsupervised learning from nonstationary time series. In Proceedings of the 36th Conference on Uncertainty in Artificial Intelligence (UAI), 2020.
[30] Joeri Hermans, Volodimir Begy, and Gilles Louppe. Likelihood-free MCMC with amortized approximate ratio estimators. In Proceedings of the 37th International Conference on Machine Learning (ICML), 2020.
[31] Jiayuan Huang, Arthur Gretton, Karsten M. Borgwardt, Bernhard Schölkopf, and Alexander J. Smola. Correcting sample selection bias by unlabeled data. In Advances in Neural Information Processing Systems 19, 2007.
[32] Aapo Hyvärinen. Fast and robust fixed-point algorithms for independent component analysis. IEEE Transactions on Neural Networks, 10(3): 626–634, 1999.
[33] Aapo Hyvärinen. Estimation of non-normalized statistical models by score matching. Journal of Machine Learning Research, 6:695–709, 2005.
[34] Aapo Hyvärinen and Hiroshi Morioka. Unsupervised feature extraction by time-contrastive learning and nonlinear ICA. In Advances in Neural Information Processing Systems 29, 2016.
[35] Aapo Hyvärinen and Hiroshi Morioka. Nonlinear ICA of temporally dependent stationary sources.
In Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (AISTATS), 2017.
[36] Aapo Hyvärinen and Petteri Pajunen. Nonlinear independent component analysis: Existence and uniqueness results. Neural Networks, 12(3):429–439, 1999.
[37] Aapo Hyvärinen, Hiroaki Sasaki, and Richard E. Turner. Nonlinear ICA using auxiliary variables and generalized contrastive learning. In Proceedings of the 22nd International Conference on Artificial Intelligence and Statistics (AISTATS), 2019.
[38] David I. Inouye and Pradeep Ravikumar. Deep density destructors. In Proceedings of the 35th International Conference on Machine Learning (ICML), 2018.
[39] Richard Jordan, David Kinderlehrer, and Felix Otto. The variational formulation of the Fokker–Planck equation. SIAM Journal on Mathematical Analysis, 29(1):1–17, 1998.
[40] Takafumi Kanamori, Shohei Hido, and Masashi Sugiyama. A least-squares approach to direct importance estimation. Journal of Machine Learning Research, 10:1391–1445, 2009.
[41] Ilyes Khemakhem, Diederik P. Kingma, Ricardo Pio Monti, and Aapo Hyvärinen. Variational autoencoders and nonlinear ICA: A unifying framework. In Proceedings of the 23rd International Conference on Artificial Intelligence and Statistics (AISTATS), 2020.
[42] Dongjun Kim, Yeongmin Kim, Se Jung Kwon, Wanmo Kang, and Il-Chul Moon. Refining generative process with discriminator guidance in score-based diffusion models. In Proceedings of the 40th International Conference on Machine Learning, 2023.
[43] John Kominek and Alan W. Black. The CMU Arctic speech databases. In Fifth ISCA Workshop on Speech Synthesis, 2004.
[44] Valero Laparra, Gustavo Camps-Valls, and Jesús Malo. Iterative Gaussianization: From ICA to random rotations. IEEE Transactions on Neural Networks, 22(4):537–549, 2011.
[45] Matthias Liero, Alexander Mielke, and Giuseppe Savaré. Optimal entropy-transport problems and a new Hellinger–Kantorovich distance between positive measures. Inventions Mathematicae, 211:969–1117, 2018.
[46] Yaron Lipman, Ricky T. Q. Chen, Heli Ben-Hamu, Maximilian Nickel, and Matt Le. Flow matching for generative modeling. In International Conference on Learning Representations, 2023.
[47] Qiang Liu and Dilin Wang. Stein variational gradient descent: A general purpose Bayesian inference algorithm. In Advances in Neural Information Processing Systems 29, 2016.
[48] Qiang Liu, Jason Lee, and Michael Jordan. A kernelized Stein discrepancy for goodness-of-fit tests. In Proceedings of the 33rd International Conference on Machine Learning (ICML), 2016.
[49] Song Liu, Takafumi Kanamori, Wittawat Jitkrittum, and Yu Chen. Fisher efficient inference of intractable models. In Advances in Neural Information Processing Systems 32, pages 8790–8800, 2019.
[50] Song Liu, Jiahao Yu, Jack Simons, Mingxuan Yi, and Mark Beaumont. Minimizing f-divergences by interpolating velocity fields. In Proceedings of the 41st International Conference on Machine Learning (ICML), 2024.
[51] Xingchao Liu, Chengyue Gong, and Qiang Liu. Flow straight and fast: Learning to generate and transfer data with rectified flow. In International Conference on Learning Representations, 2023.
[52] David Lopez-Paz and Maxime Oquab. Revisiting classifier two-sample tests. In International Conference on Learning Representations, 2017.
[53] Yulong Lu, Jianfeng Lu, and James Nolen. Accelerating Langevin sampling with birth-death. arXiv preprint arXiv:1905.09863, 2019.
[54] Jan-Matthis Lueckmann, Jan Boelts, David S. Greenberg, Pedro J. Gonçalves, and Jakob H. Macke. Benchmarking simulation-based inference. In Proceedings of the 24th International Conference on Artificial Intelligence and Statistics, pages 343–351, 2021.
[55] Aimee Maurais and Youssef Marzouk. Sampling in unit time with kernel Fisher–Rao flow. In Proceedings of the 41st International Conference on Machine Learning (ICML), 2024.
[56] Chenlin Meng, Yang Song, Jiaming Song, and Stefano Ermon. Gaussianization flows. In Proceedings of the 23rd International Conference on Artificial Intelligence and Statistics (AISTATS), 2020.
[57] XuanLong Nguyen, Martin J. Wainwright, and Michael I. Jordan. Estimating divergence functionals and the likelihood ratio by convex risk minimization. IEEE Transactions on Information Theory, 56(11):5847–5861, 2010.
[58] Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-GAN: Training generative neural samplers using variational divergence minimization. In Advances in Neural Information Processing Systems 29, 2016.
[59] Nikolas Nüsken. Stein transport for Bayesian inference. arXiv preprint arXiv:2409.01464, 2024.
[60] Vassil Panayotov, Guoguo Chen, Daniel Povey, and Sanjeev Khudanpur. Librispeech: An ASR corpus based on public domain audio books. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2015.
[61] George Papamakarios, Eric Nalisnick, Danilo Jimenez Rezende, Shakir Mohamed, and Balaji Lakshminarayanan. Normalizing flows for probabilistic modeling and inference. Journal of Machine Learning Research, 22(57): 1–64, 2021.
[62] Dinh Tuan Pham and Philippe Garat. Blind separation of mixture of independent sources through a quasi-maximum likelihood approach. IEEE Transactions on Signal Processing, 45(7):1712–1725, 1997.
[63] Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In Proceedings of the 32nd International Conference on Machine Learning (ICML), 2015.
[64] Benjamin Rhodes, Kai Xu, and Michael U. Gutmann. Telescoping density-ratio estimation. In Advances in Neural Information Processing Systems 33, 2020.
[65] Louis Sharrock, Jack Simons, Song Liu, and Mark Beaumont. Sequential neural score estimation: Likelihood-free inference with conditional score based diffusion models. In Proceedings of the 41st International Conference on Machine Learning, 2024.
[66] Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In International Conference on Learning Representations, 2021.
[67] Yang Song, Jascha Sohl-Dickstein, Diederik P. Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. In International Conference on Learning Representations, 2021.
[68] Peter Sorrenson, Carsten Rother, and Ullrich Köthe. Disentanglement by nonlinear ICA with general incompressible-flow networks (GIN). In International Conference on Learning Representations (ICLR), 2020.
[69] Akash Srivastava, Seungwook Han, Kai Xu, Benjamin Rhodes, and Michael U. Gutmann. Estimating the density ratio between distributions with high discrepancy using multinomial logistic regression. Transactions on Machine Learning Research, 2023.
[70] Charles Stein. A bound for the error in the normal approximation to the distribution of a sum of dependent random variables. In Proceedings of the Sixth Berkeley Symposium on Mathematical Statistics and Probability, volume 2, pages 583–602, 1972.
[71] Masashi Sugiyama, Shinichi Nakajima, Hisashi Kashima, Paul von Bünau, and Motoaki Kawanabe. Direct importance estimation with model selection and its application to covariate shift adaptation. In Advances in Neural Information Processing Systems 20, 2008.
[72] Masashi Sugiyama, Taiji Suzuki, and Takafumi Kanamori. Density Ratio Estimation in Machine Learning. Cambridge University Press, 2012.
[73] Esteban G. Tabak and Cristina V. Turner. A family of nonparametric density estimation algorithms. Communications on Pure and Applied Mathematics, 66(2):145–164, 2013.
[74] Esteban G. Tabak and Eric Vanden-Eijnden. Density estimation by dual ascent of the log-likelihood. Communications in Mathematical Sciences, 8(1):217–233, 2010.
[75] Anisse Taleb and Christian Jutten. Source separation in post-nonlinear mixtures. IEEE Transactions on Signal Processing, 47(10):2807–2820, 1999.
[76] Yuta Tsuboi, Hisashi Kashima, Shohei Hido, Steffen Bickel, and Masashi Sugiyama. Direct density ratio estimation for large-scale covariate shift adaptation. Journal of Information Processing, 17:138–155, 2009.
[77] Yang Yang, Severi Rissanen, Paul E. Chang, Nasrulloh Loka, Daolang Huang, Arno Solin, Markus Heinonen, and Luigi Acerbi. PriorGuide: Test-time prior adaptation for simulation-based inference. In International Conference on Learning Representations (ICLR), 2026.
[78] Mingxuan Yi, Zhanxing Zhu, and Song Liu. MonoFlow: Rethinking divergence GANs via the perspective of Wasserstein gradient flows. In Proceedings of the 40th International Conference on Machine Learning (ICML), 2023.
[79] Hanlin Yu, Arto Klami, Aapo Hyvärinen, Anna Korba, and Omar Chehab. Density ratio estimation with conditional probability paths. In Proceedings of the 42nd International Conference on
Machine Learning (ICML), volume 267 of Proceedings of Machine Learning Research, pages 73146–73174, 2025.
[80] Roland S. Zimmermann, Yash Sharma, Steffen Schneider, Matthias Bethge, and Wieland Brendel. Contrastive learning inverts the data generating process. In Proceedings of the 38th International Conference on Machine Learning (ICML), 2021.
Density Ratio Estimation with Stein Displacement Fields: Supplementary Materials
A PROOFS
Proof of Proposition 1. Write and . If , then and the inequality is immediate. Otherwise, and the tilted density is well defined. Stein's identity gives
Equality holds exactly when almost everywhere, or equivalently for -almost every . Taking the -expectation yields . Thus equality is equivalent to , as claimed.
Proof of Proposition 2. Let and take with . For each , the map is a contraction on , so it has a unique fixed point . The Jacobian is nonsingular and has positive determinant, since it varies continuously from without becoming singular. The inverse function theorem therefore makes a diffeomorphism.
Fix and put . The inverse equation and the Lipschitz bound give , and hence
Expanding the log-density and log-determinant separately gives
Subtracting these expressions in the change-of-variables formula yields
All remainders are pointwise in ; their constants may depend on .
Proof of Corollary 1. Combining Propositions 1 and 2 gives
At , the Fisher–Rao log-density velocity is
Thus the displacement agrees with an explicit Euler step for this velocity up to .
The geometric interpolation has the same first-order change after normalization. To see this, write , where and . Multiplying by adds to the log-density; we only need to account for the normalizing constant. Its change at is
This derivative is well defined under the finite-KL assumption: , since when . Also, for , is bounded by a constant times , so we may differentiate inside the expectation.
Thus , and normalizing gives
The coefficient of is exactly the Fisher–Rao velocity above.
B CONDITIONAL DISTRIBUTIONS
Both applications in Section 5 are conditional. Let be a conditioning variable with distribution , and let and be a base and a target distribution for every . The Stein operator acts on the transported variable for each fixed ,
and Stein's identity holds for every . Given joint target samples , the estimator (8) is applied with in place of , and the population Stein–DV objective lower-bounds the expected divergence,
Indeed, (7) applied for each gives with , and averaging over and applying Jensen's inequality, , gives (14). A single target sample per conditioning value therefore suffices to form the empirical objective, and no samples from the base are needed. Under the assumptions of Proposition 2, its expansion holds at each fixed . The Fisher–Rao conclusion of Corollary 1 additionally requires equality in the conditional DV bound at that . A restricted field shared across conditions need not attain these equalities. Since a single is shared across conditions, (10) provides a pooled normalization; condition-specific constants remain. In simulation-based inference the transported variable is the parameter , the conditioning variable is the observation , and the field depends on both; in nonlinear ICA only the base depends on the segment label , and the field is shared across segments.
C DETAILS OF THE INFERENCE ALGORITHMS
This appendix collects the details of the two algorithms of Section 4. Each layer is , where solves (8) for the current pair of distributions. When the population bound is attained, Corollary 1 identifies the layer with a first-order Fisher–Rao update. The step size must also keep invertible, which guarantees.
Figure 2 summarizes the iteration loops.

Figure 2: Iteration loops for the two inference algorithms of Section 4.
C.1 Push-forward
Step size and acceptance. The step size is , with the maximum over the target samples. This sample-based rule does not by itself guarantee global invertibility. The ridge level is chosen from a set by the validation value of , and and are then computed on the same validation samples (Appendix I gives the values used in our experiments). Because the validation samples also choose , the test is somewhat optimistic.
C.2 Pull-back
Candidate layers. Every layer is selected by likelihood. For each candidate field class in a set (Appendix F), ridge level in a set and step size in a set , we pull the validation samples back through the candidate layer and evaluate their likelihood (13) with (Appendix E). Nonlinear candidates whose Jacobian determinant falls below a small threshold at a training sample are discarded. This checks local nonsingularity at the sampled points; it does not establish global injectivity. A linear layer is globally invertible whenever . We keep the candidate with the highest validation likelihood, and we stop when no candidate increases it. After the last layer, is refitted by maximum likelihood on the final . The sets , and used for nonlinear ICA are listed in Appendix H.
Restricted transports. Pull-back fits the transformation model by maximum likelihood in a greedy way: every layer is proposed by SDRE and selected by validation likelihood. However, this is only informative for a restricted class of transports. For an unconditional base, a sufficiently flexible map can compensate for changes in , producing the same data density from different latent representations. The data likelihood alone then cannot identify the base parameters or the sources. Conditional structure and restrictions on the shared map can resolve this ambiguity under additional identifiability assumptions. The field classes in F, the number of layers and the selection by validation likelihood restrict the transport, and they form part of our model assumption. Push-forward does not have this problem, because the target is to fit a model to the target data points.
Relation to known constructions. First, the model is assembled from small ratio estimates between consecutive intermediate distributions, in the spirit of telescoping density ratio estimation [64], but the bridges are produced by transport rather than fixed in advance. Second, at the population level, the first-order term in of the objective corresponding to (8) at layer is . With the base held at , composing the layer changes the average log-likelihood (13) of the data by to first order (the score term comes from and the divergence term from the log-determinant), so minimizing the objective follows the ascent direction of the likelihood-based normalizing flows of Tabak and Vanden-Eijnden [74]. The log-moment objective also captures higher-order variation beyond this linear term. We also fit a field using a restricted family and use (9) as an empirical estimate of the population lower bound on the remaining divergence, rather than a guaranteed finite-sample bound.
D BACK-TRACED SCORE
Let the sampler be a composition of invertible residual maps, with , applied to a latent variable with latent distribution , and let . The maps are the predictor steps of the pretrained sampler and the layers appended so far. Given , invert the maps one at a time, and , so that ; then
Differentiating (15) through the inverses gives the adjoint recursion
with for ; the recursion keeps one Jacobian in memory at a time. Each is computed by a damped Newton iteration. Target samples at which the inversion does not converge (residual of the recovered above ) are treated as outside the sampler's image and are dropped before the field is fitted.
E PULL-BACK: LIKELIHOOD AND INVERSES
At step of Algorithm 2, each sample carries its current latent value and the accumulated log-determinant , initialized at and updated after an accepted layer as with . For a candidate layer , the validation likelihood after the pull-back is
and adding no layer corresponds to . A nonlinear candidate is discarded if is close to singular at a training sample (determinant or, for the coordinatewise class, a diagonal entry below a threshold ; Appendix H); a linear candidate is invertible whenever . The inverse is computed by the fixed-point iteration , which is one-dimensional for the rank-one class of Appendix F, and by Newton's method for the rank- class.
F FIELD CLASSES
Finite bases. With basis fields collected in , a field is with coefficients , and the Stein operator is linear in ,
where is the column-wise divergence. We call the Stein features, following the tradition of Liu et al. [49]. With , (8) becomes , a log-sum-exp of linear functions plus a quadratic, which is strictly convex and solved by L-BFGS or damped Newton. It is the log-linear KLIEP problem (2) with the roles of and exchanged, in which the linear term, an average over samples of , is replaced by its expectation, which is zero by Stein's identity.
Classes for pull-back. With a Gaussian radial basis function with bandwidth on fixed centers , we use five classes, each linear in its parameters. In pull-back they act on the latent variable ; we index its coordinates, and the random directions, by :
• linear : , with Stein features ;
• coordinatewise (dL): with ; diagonal Jacobian, reshapes the marginals;
• joint : linear plus coordinatewise, with separate parameters A and ;
-
rank-one (dL): , , a planar-flow-like layer [63] with , where is the derivative in the first argument; the problem is convex for a fixed direction , which is chosen among random candidates by the value of (8);
-
rank-d : for a random orthogonal , a nonlinearity in a rotated coordinate system with a full-rank Jacobian.
The linear class has no translation term; translations are absorbed by the segment-wise means of the base.
Relation to maximum-likelihood ICA. Holding the base q fixed, for the linear field ,
where the expectation is over the current pulled-back samples. A gradient-ascent step from therefore gives . In the linear ICA setting , pulling back through updates the unmixing matrix as
Thus, to first order, this recovers the relative-gradient update for maximum-likelihood ICA with source score [2, 10]. In practice, SDRE solves the regularized optimization problem (8) to obtain the optimal refinement field, rather than taking a single gradient step from A = 0.
Gated conditional field for push-forward. For a conditional sampler (Appendix B) we use an affine part in plus a local residual,
with the Gaussian kernel centered at target pairs , a kernel density estimate of the target observations, and a low quantile of on them. The field is linear in , so (8) stays convex, and because the gate depends on only, the derivatives of the local part in are simply scaled by . The affine part carries a global correction to observations with few or no target samples; the local part is suppressed there.
G PUSH-FORWARD ON A DIFFUSION SAMPLER
Algorithm 3 interleaves the predictor steps of a pretrained deterministic diffusion sampler with calls to PUSH (Algorithm 1). At noise level , the sampler should match the target noised to the same level, whose samples , , come for free. The level represents the starting base distribution .
Algorithm 3 Push-forward on a diffusion sampler
Require: invertible predictor steps of a pretrained sampler, from noise level to , with the starting base distribution ; target pairs ; at most correction layers per noise level
1:
2: for do
3:
4: with at most layers
5: end for
6: return ; the model has the exact log-density (15)
▷ predictor step
H NONLINEAR ICA: EXPERIMENTS AND ADDITIONAL RESULTS
This appendix gives the experimental details and comparisons for Section 5.2. In the tables, “+SDRE” denotes pull-back refinement of the pretrained model, and “SDRE from scratch” starts from .
H.1 Data and evaluation
In our experiments, sources are mixed by a random 4-layer leaky-ReLU network (slope 0.2, square weight matrices with condition number below 5), and each observed coordinate is standardized. The label is one of 20 segments, and 80% of the samples are used for training and 20% for validation, on which all numbers are reported. The synthetic benchmark has Gaussian sources with segment-wise means and standard deviations , samples per segment, and 5 mixing seeds. The speech benchmarks use real recordings as sources, resampled to 2 kHz, 5 s ( samples) per source, segments of 0.25 s, and 3 mixing seeds: five speakers of CMU ARCTIC [43] and five utterances of one LibriSpeech dev-clean speaker [60]. Speech sources are heavy-tailed and only approximately segment-wise Gaussian, so the conditional Gaussian model is misspecified there. Identification is measured by the mean correlation coefficient (MCC) after optimal matching of estimated and true sources.
Recordings and licenses. CMU ARCTIC speakers bdl, slt, awb, clb, rms (utterances a0001-a0002 concatenated; d = 3 uses the first three); LibriSpeech dev-clean speaker 1272, utterances 128104-0004, 135031-0024, 141231-0002, 128104-0009, 135031-0002. Audio is resampled from 16 kHz to 2 kHz with an anti-aliasing filter and the first 5 s are used. Licenses: LibriSpeech and the Causal Chambers data (1t_walks_v1) are released under CC BY 4.0; the CMU ARCTIC databases are distributed under a permissive free license. The sbibm task definitions are re-implemented from the sbibm benchmark, and the iVAE baseline is a JAX port of the official implementation; both are released under the MIT license. Our code is submitted with the paper as supplementary material.
H.2 Models and estimation
Conditional base. We call PULL with a conditional base and share the field across segments. The base is either the Gaussian family , whose parameters are segment-wise means and standard deviations, or a smooth super-Gaussian log-cosh family. For the log-cosh family, instead collects segment-wise locations and positive scales , with density and score
Here is a scale parameter, not the standard deviation. Both location and scale are fitted by maximum likelihood separately for each coordinate and segment. The fitted map estimates the mixing , up to the indeterminacy described in Section 5.2, and the sources are read off as . The model class is that of GIN-type flows with a conditional base [68]; what differs is the estimator, a sequence of convex problems instead of end-to-end stochastic gradient descent.
Restricted fields. We restrict the transport, as Section 4.2 requires, to fields that are linear in their parameters and of a few structured kinds: linear fields , coordinatewise nonlinearities of single coordinates, their sum (joint), and nonlinearities along one (rank-one) or (rank-d) random directions (Appendix F). With linear fields, the first-order version of one step of (8) is the relative (natural) gradient update of maximum-likelihood ICA with source score [2, 10]; solving (8) exactly instead gives a convex Fisher-scoring-type update (Appendix F).
Estimators. We compare five standalone estimators. The first is iVAE [41], using our JAX port of the official implementation (MLPs with two hidden layers of 200 units each and an output layer, training steps). The second is GIN [68], with 8 volume-preserving affine coupling blocks, a conditional Gaussian base, and Adam steps. The next two are structured flows with the inverse architecture of the generating network, , where is an elementwise invertible activation. Both have an exact log-determinant and a conditional Gaussian base, and are trained end to end by maximum likelihood using Adam ( steps; the best of four learning-rate/initialization configurations is selected by validation likelihood). The true-architecture flow uses leaky ReLU with a learnable slope, matching the activation family of the generating network. The tanh flow uses the smooth activation , . The main text reports the tanh flow as the oracle-structured flow (OSF), since its architecture uses knowledge of the generating network. Results for the true-architecture flow are reported in Table 4.
The fifth estimator is SDRE trained from scratch. We run PULL from with at most layers. At each iteration, the candidate field classes are linear, coordinatewise, joint, and rank-one; rank-d is not used in this configuration. The base family is conditional Gaussian for synthetic data and conditional log-cosh for speech.
We also use SDRE to refine GIN and the two structured flows, all of which have tractable exact likelihoods. For each model, PULL starts from its pretrained transformation and selects candidate layers from all five field classes: linear, coordinatewise, joint, rank-one, and rank-d. Across all datasets, including speech, refinement uses the conditional Gaussian base family used to train these models. Thus, refinement differs from training SDRE from scratch in its initialization, candidate field classes, and, for speech, base family. We allow at most refinement layers, except for speech with , where . In both configurations, the base-family parameters are re-estimated by maximum likelihood on the current pulled-back training samples before fitting each new layer. Refinement starting from iVAE is discussed in Section H.4.
SDRE layers. The RBF classes of Appendix F use centers equally spaced on with bandwidth (data are standardized). Ridge levels (mean squared norm of the Stein features); rank-one layers draw 15 random unit directions, keep the 3 best by the value of (8) and refit them at two ridge levels; rank-d layers draw 8 random orthogonal matrices and keep the best 2. Step sizes ; a nonlinear candidate is rejected if, at some training point, (joint, rank-one, rank-d) or a diagonal entry of is below (coordinatewise); linear candidates are not screened. Inverses: fixed-point iteration for the coordinatewise, joint and rank-one classes (one-dimensional for rank-one), Newton's method for rank-d. The base family is re-estimated before every layer: segment-wise means and standard deviations (Gaussian) or one-dimensional maximum likelihood (log-cosh). From scratch on speech, up to three retries with fresh random directions are allowed before stopping. Convex problems are solved by L-BFGS (NumPy/SciPy) or damped Newton (JAX); both implementations give the same layer sequence on most runs and the same table entries within 0.004.
Optimization of the baselines. iVAE: encoder/decoder MLPs with two hidden layers of 200 units each and an output layer, learning rate with plateau decay, steps, ELBO objective. GIN: 8 affine coupling blocks with mean-zero log-scales (volume preserving), 2 hidden layers of 64 units, Adam with learning rate , batch 500, steps. Structured flows: Adam with cosine schedule, batch 500, steps, learning rate and initialization , the configuration with the best validation likelihood is reported. Extended training uses the same configuration with the original number of steps.
Compute. The reported SDRE estimates used the NumPy/SciPy implementation on a laptop CPU (AMD Ryzen AI MAX+ 395, 16 cores, one core per run). The iVAE, GIN and structured-flow baselines use JAX. The run times quoted for the JAX implementation of SDRE were measured on a single NVIDIA RTX 4090. Each layer solves a few dozen convex problems (field classes × ridge levels × random directions) with at most parameters on points, where is the number of radial basis functions per direction (Appendix F); with this takes a fraction of a second per layer on a GPU. A full refinement of 40–100 layers runs in 6–29 s on one RTX 4090 with our JAX implementation, or 1.5–6 min on one CPU core.
H.3 Main results and training controls
Table 2 gives the main comparison, and Table 4 adds the true-architecture flow. As a standalone estimator, SDRE is second only to the tanh flow on synthetic data and above the true-architecture flow on LibriSpeech with d = 3, but it falls behind both structured flows in the other speech settings. Used as a refiner, it improves the mean MCC of every pretrained model in every column, and refining the tanh flow gives the best result in all six settings, with a smaller seed-to-seed spread than the pretrained model in every speech column. Interestingly, the true-architecture flow is not the best pretrained model to refine: extended training changes its mean MCC by at most 0.06 (Table 4), whereas refinement adds 0.02–0.18.
Table 4: The true-architecture structured flow (leaky-ReLU activation), complementing Tables 2 and 3: validation MCC (mean std over mixing seeds). Last column: seeds on which refinement beats extended training.
| Synthetic | ARCTIC | LibriSpeech | wins | ||||
|---|---|---|---|---|---|---|---|
| Structured flow (true arch.) | |||||||
| Extended training | |||||||
| + SDRE | |||||||
Refinement adds further training, so a natural objection is that the pretrained model was merely under-trained. To test this, we use extended training for every pretrained model (Tables 3 and 4). Extended training changes the mean MCC by to ; even its largest gain ( for the tanh flow on synthetic ) stays below refinement (0.887). Overall, refinement is better on 58 of 66 seeds over the three pretrained models (39 of 44 in Table 3, 19 of 22 for the true-architecture flow), and on speech extended training can even reduce MCC (4 of the 12 speech entries).
H.4 Additional analyses
Starting from iVAE. Starting from the encoder mean of iVAE, which is neither invertible nor equipped with a log-determinant, changes MCC by at most 0.025 on the synthetic benchmark ( and ) and by to on speech (ARCTIC and , LibriSpeech and for ). It improves 12 of the 22 seeds, so there is no systematic gain.
Stopping by the discrepancy. Can we use to decide when to stop? The value of each accepted layer estimates a lower bound on the remaining divergence. Computed on the samples used to fit the layer, it is about for a layer with parameters even when the pulled-back samples already follow the base, which suggests stopping once for a constant . On 42 traced refinements (Table 5), this rule is counter-productive: running all 40 layers gives mean MCC 0.770, stopping with or 4 gives 0.736 or 0.717, and even an oracle that stops at the best layer only reaches 0.777. Later layers still help although each is individually insignificant. This does not argue against the test in push-forward algorithm: there the pretrained model is trusted and every change must be justified by a detected discrepancy, whereas here the pretrained model is known to be imperfect.
Table 5: Stopping refinement by , post hoc on 42 traced 40-layer refinements (ARCTIC and LibriSpeech , ARCTIC , synthetic ). Mean validation MCC at the stopping layer (mean number of accepted layers).
| Pretrained model | no refinement | all 40 layers | oracle layer | |||
|---|---|---|---|---|---|---|
| all | ||||||
| GIN | ||||||
| Structured (true) | ||||||
| Structured (tanh) |
Selecting among refined pretrained models. In the following experiments, final validation likelihood is effective for choosing among refined pretrained models. Over the 22 seeds of Table 2 and the six seeds of the 20 s ARCTIC setting below, refining every pretrained model and keeping the one with the highest final validation likelihood gives mean MCC 0.857, against 0.855 for always refining the tanh flow, and is never worse than the latter on any seed. Selecting the pretrained model by its likelihood before refinement instead picks the flexible GIN in 7 of 28 cases and drops to 0.810.
Longer recordings and a failure of refinement. More data do not always help, and refinement can fail. With 20 s instead of 5 s per source (seven ARCTIC speakers, with speaker subsets varying across seeds), MCC does not improve systematically (Table 6): only iVAE and the unrefined true-architecture flow gain in both dimensions, and the comparison is confounded by the change of speakers. The refined tanh flow remains best (0.865 and 0.791 for ) and beats extended training on all 6 seeds. Refining the true-architecture flow, however, beats the control on only 2 of 6 seeds, and on one seed MCC collapses from 0.698 to 0.502 while the validation likelihood rises from to . From a poor pretrained model, the likelihood itself can lead away from the sources, which no likelihood-based signal, including , can detect. This is the caveat of Section 4.2 in practice: the likelihood of a transformation model does not by itself say which transformation recovers the sources.
Table 6: ARCTIC with 5 s versus 20 s per source (validation MCC, mean std over 3 seeds). The 20 s setting uses seven speakers with a different speaker subset per seed. One iVAE run diverged; mean over 2 seeds.
| Method | ||||
|---|---|---|---|---|
| 5 s | 20 s | 5 s | 20 s | |
| iVAE | ||||
| GIN | ||||
| Structured flow (true arch.) | ||||
| Structured flow (tanh) | ||||
| SDRE (from scratch) | ||||
| GIN + SDRE | ||||
| Structured (true) + SDRE | ||||
| Structured (tanh) + SDRE | ||||
Physical mixing. Real physical mixing remains hard. On the light tunnel of the Causal Chambers [23], the actuators (LED intensities and a polarizer angle) are mixed by physics and recorded by photodiodes. All nonlinear methods, including ours, stay below linear FastICA [32] (MCC 0.878 and 0.815 on two experiments, against at most 0.798 and 0.623; Table 7), in line with Gamella et al. [22]. The sources are strongly sub-Gaussian within segments (excess kurtosis ) and their distribution changes little across segments, so the Gaussian and super-Gaussian base families are misspecified in the direction that matters for ICA [3]; a base family that can be sub-Gaussian is needed here.
Table 7: Causal Chambers light tunnel (1t_walks_v1): photodiode readings projected on their top three principal components (the six sensors come in near-duplicate pairs), 20 time segments, validation MCC against the recoverable actuators, mean std over 3 train/validation splits. Targets: red, blue and of the polarizer angle (smooth_polarizers); red, green, blue (color_mix). The supervised bound regresses each target on the inputs with random Fourier features.
| Method | smooth_polarizers | color_mix |
|---|---|---|
| Supervised bound | ||
| Principal components (no unmixing) | ||
| FastICA (linear) | ||
| iVAE | ||
| GIN | ||
| Structured flow (true arch.) | ||
| Structured flow (tanh) | ||
| SDRE from scratch (Gaussian / log-cosh) | ||
| GIN / true / tanh + SDRE |
Stock returns. We use the MSFT, IBM, SBUX, AAPL and S&P 500 price series in Plotly's public stockdata.csv. We take first differences of the log prices as supplied, with no additional price adjustment, and discard the final incomplete quarter. This leaves 2,265 daily returns from 4 January 2007 to 31 December 2015, grouped into 36 calendar-quarter segments. Each return series is standardized, and the observations are randomly split into 80% training and 20% validation data. With a log-cosh base family, 23 SDRE layers reached a validation log-likelihood of per day, compared with and for four-layer structured flows with
https://github.com/plotly/datasets/blob/master/stockdata.csv a tanh and a leaky-ReLU activation (best of four learning-rate and initialization configurations by validation likelihood), -6.27 for GIN (which overfits: -4.43 on the training data) and -6.31 for independent marginals. The recovered components are one market factor (correlation 0.99 with the S&P 500) and four idiosyncratic ones, each correlated with one stock (0.69–0.79) and almost uncorrelated with the index ( ).
I SIMULATION-BASED INFERENCE: EXPERIMENTS AND COMPARISONS
In Table 1, “+SDRE” denotes push-forward correction of the frozen posterior sampler.
I. 1 Tasks and target samples
Tasks and references. Both sbibm tasks [54] have 10-dimensional parameters and observations. gaussian_linear: , ; all posteriors (including those under mixture priors) are analytic. bernoulli_glm: bias and nine filter weights, a fixed white-noise stimulus of 100 time bins, Bernoulli spikes with logit in time bin , summary statistics the spike count and the spike-triggered sum; prior as in sbibm. In the modified target simulator used for the simulator-change and partial-coverage experiments, the spike probability is sigmoid(1.3 ) instead of sigmoid( ). Reference posteriors are drawn by Hamiltonian Monte Carlo preconditioned with the Hessian at the MAP (64 chains, 10 leapfrog steps, 2000 warm-up iterations, thinning 5; acceptance 0.99); two independent runs give C2ST 0.49. The sufficient-statistic likelihood was checked against the raw Bernoulli likelihood. New priors: and the mixture (gaussian_linear); bias and the filter precision doubled (bernoulli_glm).
For prior changes, target pairs are resampled with replacement from the existing simulations, with probabilities proportional to the prior ratio, without new simulations. For simulator change, we generate target pairs from the modified simulator. For partial coverage, we generate pairs from that simulator restricted to neurons with negative bias; evaluation covers both negative-bias (covered) and positive-bias (uncovered) neurons.
All evaluated corrections use the same target pairs as SDRE; Table 1 specifies which settings are evaluated for each baseline.
I. 2 Sampler and corrections
Pretrained sampler. On each task, we train NPSE [67, 65] on simulations and freeze its network during correction. We use VP diffusion (linear noise schedule from 0.1 to 20) with a noise-prediction MLP (4 hidden layers of 512 SiLU units, sinusoidal time embedding, skip term for the noised parameter ) on standardized parameters and observations; denoising score matching for , Adam steps with batch 1024, exponential moving average 0.999 and early stopping on validation simulations. Sampling uses 25 deterministic DDIM steps [66] on the grid , , so that is the level of the latent distribution. Training is deterministic given the seed.
SDRE layers. We use the gated field (17) and the acceptance rule of Algorithm 1, with hyperparameters selected on validation target samples. The field has 300 centers drawn from the noised target pairs, one bandwidth pair , (standardized units), and the 5% quantile of on the target observations. Unlike in (8), the penalty is (no factor ), and the bandwidth pair and are chosen jointly by the validation at every layer (all combinations are fitted). L-BFGS is stopped at the best validation value of the objective: with about coefficients and these small , the empirical objective keeps decreasing long after the validation one starts to increase. Step with the spectral norm and the maximum over the target samples; up to layers per noise level; 80% of the target samples fit the field and 20% decide acceptance. Target sample sizes: 3000 simulations drawn with replacement with probabilities proportional to the prior ratio (prior change), and the training part of the target pairs, each noised several times to about 3000 points per level (simulator change and partial coverage).
I. 3 Evaluation and baselines
We measure accuracy by the classifier two-sample test [C2ST; 52]: the accuracy of a classifier trained to separate samples of the sampler from reference samples, with chance accuracy 0.5 and lower values indicating a closer match. It is averaged over 10 observations drawn from the target (20 for partial coverage, 10 in each half), with three seeds for the network, the target samples and the push-forward layers.
Baselines. PriorGuide [77] is evaluated only for prior changes. The prior ratio is one Gaussian (unimodal and bernoulli_glm) or a two-component mixture, so its mixture representation is exact; reverse kernel with the Tweedie estimate of the clean parameter; the gradient of the guidance term is computed exactly through , so the guided ODE is an invertible sampler with a tractable density. Langevin refinement: steps per level, signal-to-noise ratio , best by the test C2ST. DG [42]: 25 discriminators (4 hidden layers of 512 units, Adam steps, learning rate , fresh forward noise every 25 steps) between noised target pairs and noised model pairs with the same observations, model samples from a 100-step DDIM sampler; guidance adds the discriminator-logit gradient to the score with weight 1, followed by Langevin refinement on the same grid, selected by the maximum mean discrepancy on validation pairs (selection by the test C2ST changes the numbers by at most 0.006). Classifier DRE + SIR [8]: MLPs with and units between the target pairs and as many simulated pairs, the one with the lowest validation log-loss; SIR on samples of the frozen sampler. The simulated pairs are a uniform subsample of the existing simulations under a prior change, so that no new simulation is run, fresh simulations under a simulator change, and fresh simulations from the same half of the prior (negative bias) under partial coverage, so that the classifier estimates the change of likelihood on the covered half. Fine-tuning on the target pairs: Adam steps at learning rate from the pretrained weights with early stopping on validation pairs; the sim. + real variant is evaluated only under partial coverage, as a rehearsal baseline for the uncovered region. It mixes original simulations with oversampled target pairs in equal proportion. The retrained reference uses the same architecture, trained from scratch on new target simulations, beyond the correction budget; under partial coverage, it is the network retrained for the simulator change, evaluated on the partial-coverage observations.
I. 4 Statistical comparisons and limitations
For Table 1, paired t-tests over seeds compare SDRE with PriorGuide + Langevin under prior change (p = 0.092, 0.003 and 0.56 for unimodal, bimodal and GLM, respectively). PriorGuide + Langevin has lower mean C2ST in all three settings, with a statistically significant difference only for the bimodal prior; its hyperparameters are selected by test C2ST. Under simulator change, the comparisons with DG give p = 0.42 and 0.43, while SDRE outperforms fine-tuning with p = 0.004 and 0.009 for and 2000, respectively. Under partial coverage, SDRE outperforms fine-tuning on both the covered and uncovered regions (p = 0.020 and 0.024, respectively).
Separated modes. Push-forward only transports the samples that the sampler already produces. When the target needs mass moved between separated modes, as for the bimodal prior in Table 1 or for a pretrained sampler that misses a mode altogether, each layer can only make a small, invertible, locally Lipschitz move. The per-layer discrepancy then quickly falls below the detection threshold, and push-forward stops short (C2ST 0.573 against 0.510 for retraining); a stochastic correction that is not limited to small invertible moves, such as the Langevin refinement of PriorGuide, is better suited to this case.
Compute. Between two and eleven correction layers were accepted per task. One GH200. Per run: SDRE 3–4 min, DG 9–13 min (dominated by the discriminators), PriorGuide with Langevin 4–7 min, fine-tuning under 1 min, retraining 2 min.
J RELATED WORK
Direct density ratio estimation fits the ratio without modeling either density: moment matching in an RKHS [31], KLIEP and its log-linear form [71, 76], least-squares importance fitting [40], convex risk minimization for f-divergences [57], and probabilistic classification [8, 28]; see Sugiyama et al. [72] for a monograph. Neural variational bounds [6] use the same DV representation as (7). When the two distributions are far apart, telescoping DRE chains classifiers along fixed bridging distributions [64], Choi et al. [14] take the infinitesimal limit of such bridges, and featurized DRE estimates the ratio in the latent space of a shared flow [13]. The pull-back estimator is also a product of small ratios, but the intermediate distributions are produced by transport and adapted to the data, and the final map is itself a flow, as in featurized DRE. All of these methods need samples from both distributions; we need samples from one and the score of the other. Stein-parametrized ratio models were introduced for fitting intractable models [49]; we add the displacement interpretation, the connection to the Fisher–Rao flow, and the push-forward and pull-back algorithms. Score-based alternatives such as score matching [33] and Stein discrepancies [26, 48, 15] compare a model with data through the model score, but return a discrepancy rather than a ratio or a transport.
Among gradient flows, Wasserstein gradient flows of the KL divergence [39], and their particle approximation SVGD [47], need the score of the target. Fisher–Rao and Wasserstein–Fisher–Rao flows [12, 45] are simulated by birth–death dynamics [53] or by kernel-based transport [55, 59], which we compare with next.
The closest works to SDRE are kernel Fisher–Rao flow [55] and Stein transport [59]. Both move particles along a tempered path from a reference to a target , , with a velocity field that solves the same equation as our optimal field: the continuity equation with , which in Stein form reads (compare Proposition 1). Kernel Fisher–Rao flow takes the solution of minimal kinetic energy, a gradient field obtained from a Poisson equation in an RKHS, and needs only evaluations of ; Stein transport fits the Stein equation by kernel ridge regression and also uses the scores along the path. In both, the log-ratio is known (in Bayesian inference, it is the log-likelihood) and serves as the right-hand side of the equation. In our setting the target is observed only through samples, so the log-ratio is unknown: SDRE estimates it together with the field. Moreover, both methods traverse a prescribed path in unit time, whereas push-forward and pull-back take one estimated step at a time and re-estimate the ratio after each.
Pulling the data back, one simple map at a time, until they look like a simple base distribution is a classic idea. Projection pursuit removes structure along one direction at a time by Gaussianizing the projection [21]; it is the counterpart of our rank-one class. Gaussianization alternates linear ICA with marginal Gaussianization [11], the counterpart of our linear and coordinatewise classes, and RBIG replaces the ICA step by random rotations and shows convergence [44], the counterpart of our rank-d class. Tabak and Vanden-Eijnden [74] and Tabak and Turner [73], whose work introduced the term normalizing flow, compose simple maps that each increase the likelihood of the pulled-back samples under a standard normal base. As shown in Appendix C.2, their ascent direction is the linear Stein functional of which (7) is the log-moment counterpart. Density destructors [38], sliced iterative normalizing flows [19] and gradient-boosted flows [24] develop the greedy construction further, and Gaussianization flows make iterative Gaussianization trainable end to end [56]. Our construction differs in three ways: each layer is the solution of a convex problem whose value estimates a lower bound on the remaining divergence; the base is a parametric family re-estimated at every step and may be conditional on an auxiliary variable; and every step is at the same time a density ratio estimate. See Papamakarios et al. [61] for normalizing flows in general.
In independent component analysis, linear ICA [16] is identified by non-Gaussianity; maximum-likelihood and infomax estimators [7, 9, 62] are optimized by the relative gradient [2], whose stability depends on matching the sign of the source kurtosis [3]; FastICA [32] adapts to this sign. Nonlinear ICA is not identifiable without further assumptions [36]; post-nonlinear mixtures [75] are a classical exception. Auxiliary variables restore identifiability: time-contrastive learning [34], temporal dependence [35], generalized contrastive learning [37], iVAE [41], GIN [68] and hidden-Markov variants [29]; other routes constrain the mixing [27] or use contrastive objectives [80]. We use the same model class as GIN—a conditional base and an exact-likelihood flow—but replace end-to-end training by convex layer-wise estimation, and use it to refine end-to-end estimators. Real-world checks of these methods remain sobering [22], as our light-tunnel results confirm.