Cross-Fitting for Neural Posterior Estimation
Jeffrey Regier
NeurIPS 2026
TL;DR. K-fold cross-fitting and decoupled mean estimation improves Neural Posterior Estimation
Abstract. Neural Posterior Estimation (NPE) trains an amortized conditional density estimator to approximate posterior distributions in simulation-based inference. Each training pair is a single draw from the joint distribution of latent and observation, so posterior variance at an observation must be inferred from variation across pairs rather than within them. However, with a sufficiently flexible variational distribution, the NPE training objective is unbounded, and standard optimizers yield arbitrarily small variance. Regularizers like early stopping, dropout, and weight decay constrain network capacity without targeting the correct posterior variance. We propose Cross-Fitting NPE (CF-NPE), which separates mean estimation from higher-moment estimation via sample splitting. Concretely, CF-NPE estimates a conditional-mean ensemble by -fold cross-fitting, then fits a conditional density to the resulting out-of-fold residuals. The conditional variance of an out-of-fold residual is bounded below by the true posterior variance, giving CF-NPE a well-defined population-level target that standard NPE lacks. Across eight synthetic benchmarks and a cosmological application, CF-NPE achieves higher held-out log-likelihood than standard NPE, with gains that grow with the latent dimension.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:44 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
This paper is based on the observation that SBI with models like normalizing flows can fail due to the training objective being unboounded above. To counter this, they propose a two-stage procedure where first the posterior mean is learned using cross-validation, and then a conditional density estimator is trained on residuals. The major concerns brought up by reviewers was: The evaluation is given in terms of held-out log-likelihood. This is of interest, but other measured were suggested that might give more insight into the issues being brought up (over-dispersion vs under-dispersion). Would the authors be able to describe any results along these lines?
There are also many detailed comments (e.g. regarding clarity and computational overhead) but my judgement is that the above is the issue where feedback is most likely to change reviewer opinion.
Final justification
Thank you to the authors for the detailed rebuttal. The reviewer consensus was that these issues were adequately addressed and that the proposed algorithm is correct and interesting. The automated review does reveal one hallucinated citation which I view as a "real" hallucination resulting from careless use of LLMs, but it is only one citation. I would speculate that the text appears substantially LLM-written, but it is nevertheless clear, and NeurIPS guidelines do not seem to call for making decisions on the basis of such speculation. I recommend acceptance.
Read meta-review
Meta-review
This paper is based on the observation that SBI with models like normalizing flows can fail due to the training objective being unboounded above. To counter this, they propose a two-stage procedure where first the posterior mean is learned using cross-validation, and then a conditional density estimator is trained on residuals. The major concerns brought up by reviewers was: The evaluation is given in terms of held-out log-likelihood. This is of interest, but other measured were suggested that might give more insight into the issues being brought up (over-dispersion vs under-dispersion). Would the authors be able to describe any results along these lines?
There are also many detailed comments (e.g. regarding clarity and computational overhead) but my judgement is that the above is the issue where feedback is most likely to change reviewer opinion.
Final justification
Thank you to the authors for the detailed rebuttal. The reviewer consensus was that these issues were adequately addressed and that the proposed algorithm is correct and interesting. The automated review does reveal one hallucinated citation which I view as a "real" hallucination resulting from careless use of LLMs, but it is only one citation. I would speculate that the text appears substantially LLM-written, but it is nevertheless clear, and NeurIPS guidelines do not seem to call for making decisions on the basis of such speculation. I recommend acceptance.
2 comments
calibration metrics - notes
Notes and caveats:
- The submitted manuscript reports on 7 problems, and here I only report 4. These were not cherry-picked; 7 seemed excessive for a response, and these 4 problems were the ones with results in the submitted manuscript that weren’t solely in the appendix.
- The submitted manuscript reported on multiple versions of each problem of varying latent dimensions. Here I focus on the highest dimension tested, which previously showed the largest gap in performance between the proposed method and the comparator.
- In the submitted manuscript, I tuned network hyperparameters jointly based on a basket of problems to keep runtime tractable, giving similar budgets to the proposed method and standard NPE. In the table above, I ran hyperparameter sweeps for each row using Optuna with a budget of 100 trials per network, which improved log-likelihoods across the board.
- Most test log-likelihoods moved in lockstep with focused tuning effort, with the proposed method maintaining a clear lead. However, for the Deconvolution problem with the NSF head, standard NPE made a major advance in test log-likelihood, jumping from -52 nats to -8.6 nats, whereas CF-NPE improved only from -14 nats to -11 nats. For standard NPE and CF-NPE stage 1, the sweep had selected a zero-hidden-layer architecture, precisely matching the form of the exact posterior’s conditional mean. CF-NPE stage 2 was overfitting noise, whereas the exact posterior’s variance has no dependence on the data. I added a weight-decay hyperparameter specific to the encoding layers of the stage 2 network, allowing it to effectively shut off its inputs, thus achieving -7.9 nats. In some sense, the flexibility to regularize uncertainty while preserving meaning estimation points to the strength of the CF-NPE’s decoupled formulation. But it’s also a non-standard problem-specific technique, so I wanted to divulge it here. In a camera-ready version, I would prefer to feature better-conditioned problems.
- In the submitted manuscript, I proposed ensembling the conditional mean predictions (line 153) and highlighted in the discussion (limitations subsection) that this creates a subtle train/test mismatch and a way to remove it (lines 296--302). For the table above, I removed this train/test mismatch by ensembling across three replicates of the stage 1 mean ensemble, trained with different seeds but with the same data split across folds, rather than ensembling across folds. Without the change, CF-NPE still shows some calibration advantages, but they are not as clear-cut; in a camera-ready revision, given the reviewers’ focus on calibration, I would treat this in-distribution version as CF-NPE’s default mode
- Rating
- 5/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 4/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
- Standard NPE can produces approximate posterior whose mass concentrate on the training target , when density estimator is flexible enough.
- Standard regulariser could prevent this to some extent. But the posterior variance is still underestimated because data used to estimate posterior mean is also reused to estimate posterior variance.
- They suggest a method to estimate posterior mean and variance / residuals separately using different data to avoid this problem.
Basic workflow is as follow:
- Split data into K-fold
- Predict posterior mean using cross validation so that for in fold , mean estimate is estimated from the fold .
- Compute residual .
- Train conditional estimator on the residuals by maximising: with respect to
After the training, where is a observed data of interest.
Strengths and weaknesses
Strengths
- The paper is well motivated.
- It starts from the problem of mass concentrating behaviour of NPE. The authors show that standard regularisers could prevent this, but there still remains in-sample residual bias due to using same sample to estimate posterior mean and variance. This leads to underestimation of posterior variance. To prevent this, they suggest the separate estimation of mean and variance, which makes a lot of sense.
- They also empirically show this in Figure 2, where they demonstrate that standard NPE cannot have good estimation of mean and variance at the same time.
- The methods gives underconfident posterior which is usually preferred over overconfident posterior.
- The proposition 1 suggest that estimated residual variance upper-bound the true posterior variance. And under the perfect fit, it gives the exact posterior variance (Corollary 2).
- They conduct extensive amount of experiments.
- It has rich amount of ablation studies in appendix including comparison with various methods (appendix D4-6)
- It also include evaluation of the method in various setting including different amount of simulation budget (appendix D3) and different number of the folds (D7).
- It also has an interesting real world application on reconstruction of lensed galaxies.
Weaknesses
- Evaluation metric could be improved.
- I think the emphasis of the paper was the unbiased estimation of the posterior variance, but the selected metrics (log-likelihood, MSE) does not evaluate biases directly.
- Assumptions on the preposition 3 is not clear.
- “ contains a sequence…” (line 420-421). Not very clear when this assumption applies.
- Quality of Figure 2 could be improved.
- It is not clear why you are showing MSE for the mean but the ratio for the variance.
- Size of the font can be increased.
- It is not clear what “MSE-only minimum” is.
Questions
- Could you provide other metric for some of the experiments which could capture the quality of posterior variance estimation?
- It could be something like figure 2 for your method, simulation-based calibration [1], coverage curve used in [2], or C2ST used in [3] (when ground truth posterior samples are available).
- Could you clarify the assumption for preposition 3? Does it hold for gaussian or NSF used in the paper?
[1] Talts, S., Betancourt, M., Simpson, D., Vehtari, A., & Gelman, A. (2018). Validating Bayesian inference algorithms with simulation-based calibration. arXiv preprint arXiv:1804.06788.
[2] Hermans, J., Delaunoy, A., Rozet, F., Wehenkel, A., Begy, V., & Louppe, G. (2021). A trust crisis in simulation-based inference? your posterior approximations can be unfaithful. arXiv preprint arXiv:2110.06581.
[3] Lueckmann, J. M., Boelts, J., Greenberg, D., Goncalves, P., & Macke, J. (2021, March). Benchmarking simulation-based inference. In International conference on artificial intelligence and statistics (pp. 343-351). PMLR.
Limitations
yes
Final justification
Paper is well motivated and clearly written with extensive amount of experiments. During rebuttal, the author addressed my main concern about the use of test likelihood as a main evaluation metric and also provided additional metrics, which demonstrate consistently better performance of the proposed method over the baseline methods. I therefore increase my initial score and recommend acceptance.
Formatting concerns
None
4 comments
author response
Thank you for the feedback and for taking the time to consider my manuscript.
Evaluation metric could be improved. I think the emphasis of the paper was the unbiased estimation of the posterior variance, but the selected metrics (log-likelihood, MSE) does not evaluate biases directly.
I agree that additional metrics will strengthen the manuscript and will include them. Please see my response to Area Chair Bjf2, which includes results for four additional calibration-oriented metrics and shows CF-NPE performing well across the board.
That said, let me make the case that test log-likelihood is a uniquely important metric in this work. This work compares the proposed method to standard NPE, in which maximizing test log-likelihood (which equivalently minimizes the expected KL divergence from the posterior to its approximation) is what connects the posterior approximation to the posterior. It is only because NPE minimizes this KL divergence that we expect NPE posterior approximations to be at least somewhat calibrated and to perform well at secondary metrics of posterior approximation quality.
Further, although the paper was motivated by an observation about posterior variance collapsing without regularization, once regularization is added, the effects of the identified pathology extend to the conditional means too and are no longer solely about calibration. The combined effects are quantified by test log likelihood, whereas many alternative metrics only quantify the calibration side of performance.
Assumptions on the preposition 3 is not clear. “ contains a sequence…” (line 420-421). Not very clear when this assumption applies.
This condition is a bit cryptic, but I needed a way to formalize that the class of posterior approximations needs to be sufficiently flexible for the optimizer to be degenerate. Essentially any useful family of posterior approximations has this property. Gaussian families satisfy this condition because a sequence of Gaussian distributions with progressively smaller variances can concentrate mass on the training points. Neural spline flows also have this property because they are universal function approximators (asymptotically) and can concentrate mass sharply even with a finite number of transformations (with a sufficiently expressive encoder, etc., etc.) Simply stating this sequence exists is an attempt to avoid getting bogged down in conditions. I’ll try to provide more intuition for it beforehand.
Quality of Figure 2 could be improved. It is not clear why you are showing MSE for the mean but the ratio for the variance. Size of the font can be increased. It is not clear what “MSE-only minimum” is.
I will increase the font size and the clarity of the figure. The point I’m trying to make in this figure is that in standard NPE, early stopping (and regularization more generally) involves a trade-off between variance and mean estimation. CF-NPE fits two networks, the first with MSE, and thus faces no such trade-off.
Thank your for your responses.
Test log-likelihood being a uniquely important metric.
Now I understand that test log-likelihood is the primary evaluation metric in this work.
This raises the question of whether similar improvements could be obtained by applying ensembling directly to standard NPE as done in [1] as ensembling is known to reduce overfitting by itself. For example, one could split training data into K-fold, train NPE on K-1 fold, early stopping on the hold-out fold, and return ensemble of density estimator as a final model. Now you have CF-NPE without ensembling and CF-NPE without cross-fitting as baselines. However, I believe that the standard NPE with a comparable ensembling would be an important additional baseline. This comparison would highlight the effect of using two separate network to avoid overfitting, which I believe is the main contribution of the paper.
I appreciate if the author could give insights on if the ensembling for NPE I described above could solve the issues of over-/under-dispersion that motivated this work.
One follow-up questions about experiments: In the response to the AC, you mention "I ran hyperparameter sweeps for each row using Optuna". What are the hyperparameters here? I am asking because another potential way to reduce overfitting would be to use simpler architecture, and the architecture could be also selected with hyperparameter optimisation.
[1] Hermans, J., Delaunoy, A., Rozet, F., Wehenkel, A., Begy, V., & Louppe, G. (2021). A trust crisis in simulation-based inference? your posterior approximations can be unfaithful. arXiv preprint arXiv:2110.06581.
ensembles and hyperparameters
Thank you for continuing to engage with my submission. I'm happy you've come to think of test log-likelihood as a primary evaluation metric. I'll integrate some of what I wrote to you into the manuscript so future readers aren't surprised by test log-likelihood's centrality, and I'll also include the new calibration results.
Ensembling
Ensembling is a powerful and perhaps under-appreciated NPE technique. The ensembling method of Hermans et al. (2021) is roughly equivalent to the technique of Lakshminarayanan et al. (2017), so I used the "Deep Ensembles" (DE) terminology of the earlier publication in my manuscript. In my manuscript, Table C.3 (Appendix C) compares the performance of DE and CF-NPE (the proposed method). DE is a significant improvement over standard NPE, but it is outperformed by CF-NPE in every problem.
DE partially/imperfectly addresses the problem with standard NPE that I use to motivate my work (namely, that standard NPE forced an unnecessary trade-off between mean and variance estimation quality). In DE, a final posterior approximation is produced by ensembling multiple posterior approximations from standard NPE, each fitted with a different seed. The ensemble is typically more dispersed than its components, which is often better. But there's no reason to think that this ensemble's variance will match the variance of the exact posterior when the component variances don't. Ensembling here is papering over the core problem that standard NPE creates by forcing a trade-off between mean underfitting and variance overfitting.
Another related limitation of DE: forming a mixture of distributions that individually underestimate posterior means (due to over-regularization) also produces a mixture that underestimates posterior means. So while DE can help with underdispersed components (in an untargeted way), it has no answer to the other side of the performance problems of standard NPE.
That said, ensembling is highly effective at overcoming seed noise. CF-NPE can make use of it too. I've explored ensembling both CF-NPE's Stage 1 network (for conditional mean estimation) and Stage 2 separately, with good results. I didn't include these results in the manuscript because 1) DE-style ensembling is an orthogonal technique to what I'm proposing, 2) even in a compute-matching setting (Table C.3), I didn't need this technique to outperform the existing methods. However, CF-NPE stage 1 and 2 can each be given ensemble-size configuration "knobs" (with 1 as a special case recreating the results in the manuscript) to further boost performance.
Hyperparameters
I've tried to keep the inference network architectures pretty standard so that my results aren't overly architecture-specific. Then I use automatic hyperparameter tuning to set 1) learning rate, 2) weight decay, 3) hidden layer width, 4) depth, and 5) dropout rate. The neural spline flow head has three additional tuning parameters: 1) number of transforms, 2) number of bins, and 3) half-width tail bound ("bound" in the zuko flow package). Each method (standard NPE and CF-NPE) is tuned independently and then uses the set of hyperparameters best for it. If a simpler architecture (or more dropout) were better for standard NPE, it should have been selected at this stage. The gains from CF-NPE really are complementary to ("stack with") these other ways of optimizing network performance.
Thank you for your detailed response!
My questions and concerns have been addressed. I appreciate the clarification.
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 2/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper studies the overconfidence problem in neural posterior estimation (NPE) when a flexible neural density estimator is used to approximate the posterior . The authors argue that standard NPE uses the same training pairs to learn both the posterior mean and posterior variance, which can lead to underestimated training residuals and posterior variance collapse. To address this issue, the paper proposes Cross-Fitting NPE (CF-NPE). CF-NPE first estimates the conditional mean using K-fold cross-fitting, and then fits a residual density model using out-of-fold residuals. This construction gives the Stage 2 variance target a population-level lower bound. The authors evaluate the method on several benchmarks and showing improved test log-likelihood compared with standard NPE.
Strengths and weaknesses
Strengths:
-
The motivation is clear and important. The paper identifies a real issue in NPE: when the model is sufficiently flexible, the training objective can encourage overly small posterior variance and overconfident posterior estimates. The proposed CF-NPE method is also fairly general and can be combined with different conditional density estimators.
-
Proposition 1 provides a simple and convincing theoretical explanation for the method. It shows that the out-of-fold residual second moment satisfies a lower bound relative to the true posterior variance. This gives Stage 2 a clearer population-level target, while standard NPE does not have an analogous guarantee on the training points.
-
The empirical evaluation is fairly comprehensive. The authors test the method on multiple benchmark problems, and include useful ablation studies.
Weaknesses:
-
The empirical evidence for posterior calibration could be more direct. The main reported metric is test log-likelihood. This is a proper scoring rule and is certainly relevant, but the main motivation of the paper is overconfidence and variance underestimation. It would make the paper more convincing to also report calibration-oriented metrics, such as coverage, posterior variance ratios, or marginal calibration on benchmarks where the true posterior is known.
-
The computational cost is a practical limitation. CF-NPE requires training runs. The authors argue that this overhead is acceptable when simulation is the main bottleneck and the fold networks can be trained in parallel. However, this may not hold in all applications. For example, in the strong-lensing experiment, CF-NPE with the Gaussian head takes 12.8min compared with 56sec for standard NPE, although it achieves better test log-likelihood. A more explicit discussion of the compute tradeoff would be helpful.
-
Reproducibility could be strengthened. Although the paper describes the implementation details, no code appears to be included with the current submission. Since CF-NPE involves a multi-stage training pipeline and several important hyperparameter choices, providing anonymized code or reproduction scripts would make the empirical results easier to verify.
Questions
-
Proposition 1 is written in terms of . Could the authors clarify how this result should be interpreted when is vector-valued? Is the result meant coordinate-wise, or as a covariance matrix inequality?
-
CF-NPE is currently developed for single-round amortized NPE. Since sequential methods such as [1,2,3] are widely used in simulation-based inference, could the authors discuss more concretely what difficulties arise when combining cross-fitting with proposal updates across rounds?
-
Since the central concern is variance collapse and overconfidence, could the authors include additional uncertainty or calibration metrics beyond test log-likelihood?
[1]. Greenberg et al., "Automatic posterior transformation for likelihood-free inference", 2019
[2]. Papamakarios et al., "Sequential neural likelihood: Fast likelihood-free inference with autoregressive flows", 2019
[3]. Lueckmann et al., "Benchmarking simulation-based inference", 2021
Limitations
-
The method is currently limited to single-round amortized NPE. The interaction between out-of-fold residuals and proposal updates in sequential NPE is not addressed, which limits the applicability of the method to some common SBI workflows.
-
The computational overhead can be substantial. Since CF-NPE requires training runs, its practical advantage depends on the relative cost of simulation versus network training.
Final justification
I thank the author for the clarification and additional experiments. The response addresses my main concerns, especially the lack of direct calibration metrics in the original submission.
I still have some minor reservations. The method is currently limited to single-round amortized NPE, the computational overhead can be substantial in some settings. I also think the new calibration experiments and implementation details should be clearly incorporated into the revised paper.
Formatting concerns
No concerns
4 comments
Rebuttal
Thank you for the high-quality review and the encouraging feedback. Let me try to address your remaining concerns.
Calibration metrics
Log-likelihood is a uniquely important metric in this work comparing approaches to NPE because NPE optimizes log-likelihood. We expect NPE to produce posterior approximations that are at least somewhat calibrated because maximizing held-out log-likelihood minimizes the expected KL divergence from the posterior to the approximation. That said, in an attempt to keep the manuscript’s narrative simple, I seem to have overdone it by only reporting test log-likelihood (all three reviewers and the AE comment on it). Thus, I’m pleased to report here that the proposed method performs very well across all the suggested calibration metrics:
- -- the squared error of the posterior mean divided by the posterior variance, averaged over test points and coordinates; 1 indicates calibrated uncertainty and values above 1 indicate over-confidence.
- SBC KS -- the Kolmogorov-Smirnov statistic comparing the pooled SBC rank distribution against the uniform distribution; 0 indicates perfect calibration.
- TARP -- the largest absolute gap between nominal and empirical coverage across all levels of the TARP curve; 0 indicates perfect calibration.
- C2ST -- the held-out accuracy of a classifier trained to separate true parameters from those drawn from the estimated posterior given the data; 0.5 indicates that the two are indistinguishable.
| Method | LL ↑ | (→1) | SBC KS ↓ | TARP ↓ | C2ST (→0.5) |
|---|---|---|---|---|---|
| Gaussian problem, Gaussian head | |||||
| Standard NPE | −140.60 ± 0.13 | 1.171 ± 0.003 | 0.018 ± 0.000 | 0.175 ± 0.006 | 0.598 ± 0.004 |
| CF-NPE | −128.46 ± 0.08 | 1.002 ± 0.001 | 0.004 ± 0.000 | 0.110 ± 0.003 | 0.555 ± 0.001 |
| Gaussian problem, NSF head | |||||
| Standard NPE | −164.78 ± 1.27 | 1.079 ± 0.004 | 0.015 ± 0.001 | 0.259 ± 0.006 | 0.827 ± 0.027 |
| CF-NPE | −128.35 ± 0.08 | 1.009 ± 0.001 | 0.004 ± 0.000 | 0.024 ± 0.003 | 0.553 ± 0.002 |
| Deconvolution problem, Gaussian head | |||||
| Standard NPE | −48.38 ± 0.14 | 1.061 ± 0.004 | 0.008 ± 0.000 | 0.049 ± 0.002 | 0.722 ± 0.001 |
| CF-NPE | −47.45 ± 0.11 | 0.996 ± 0.003 | 0.004 ± 0.000 | 0.039 ± 0.003 | 0.718 ± 0.003 |
| Deconvolution problem, NSF head | |||||
| Standard NPE | −8.60 ± 0.23 | 1.063 ± 0.004 | 0.010 ± 0.000 | 0.061 ± 0.004 | 0.620 ± 0.015 |
| Funnel problem, Gaussian head | |||||
| Standard NPE | 10.56 ± 0.11 | 0.944 ± 0.011 | 0.018 ± 0.001 | 0.126 ± 0.004 | 0.513 ± 0.001 |
| CF-NPE | 12.58 ± 0.10 | 0.998 ± 0.012 | 0.011 ± 0.002 | 0.108 ± 0.005 | 0.505 ± 0.001 |
| Funnel problem, NSF head | |||||
| Standard NPE | 10.26 ± 0.08 | 0.997 ± 0.007 | 0.009 ± 0.001 | 0.072 ± 0.004 | 0.506 ± 0.001 |
| CF-NPE | 14.09 ± 0.08 | 1.032 ± 0.007 | 0.013 ± 0.001 | 0.050 ± 0.002 | 0.505 ± 0.001 |
| Mixture problem, Gaussian head | |||||
| Standard NPE | −4.49 ± 0.05 | 1.003 ± 0.005 | 0.008 ± 0.001 | 0.027 ± 0.003 | 0.797 ± 0.004 |
| CF-NPE | −3.80 ± 0.05 | 0.994 ± 0.005 | 0.008 ± 0.001 | 0.019 ± 0.001 | 0.758 ± 0.005 |
| Mixture problem, NSF head | |||||
| Standard NPE | −3.52 ± 0.02 | 0.902 ± 0.005 | 0.016 ± 0.001 | 0.040 ± 0.004 | 0.692 ± 0.005 |
| CF-NPE | −0.49 ± 0.02 | 1.022 ± 0.005 | 0.010 ± 0.000 | 0.015 ± 0.002 | 0.515 ± 0.002 |
In some settings, only CF-NPE produces calibrated posterior approximations. The magnitude of some of the differences in is striking.
Notes and caveats:
- The submitted manuscript reports on 7 problems, and here I only report 4. These were not cherry-picked; 7 seemed excessive for a response, and these 4 problems were the ones with results in the submitted manuscript that weren’t solely in the appendix.
- The submitted manuscript reported on multiple versions of each problem of varying latent dimensions. Here I focus on the highest dimension tested, which previously showed the largest gap in performance between the proposed method and the comparator.
- In the submitted manuscript, I tuned network hyperparameters jointly based on a basket of problems to keep runtime tractable, giving similar budgets to the proposed method and standard NPE. In the table above, I ran hyperparameter sweeps for each row using Optuna with a budget of 100 trials per network, which improved log-likelihoods across the board.
- Most test log-likelihoods moved in lockstep with focused tuning effort, with the proposed method maintaining a clear lead. However, for the Deconvolution problem with the NSF head, standard NPE made a major advance in test log-likelihood, jumping from -52 nats to -8.6 nats, whereas CF-NPE improved only from -14 nats to -11 nats. For standard NPE and CF-NPE stage 1, the sweep had selected a zero-hidden-layer architecture, precisely matching the form of the exact posterior’s conditional mean. CF-NPE stage 2 was overfitting noise, whereas the exact posterior’s variance has no dependence on the data. I added a weight-decay hyperparameter specific to the encoding layers of the stage 2 network, allowing it to effectively shut off its inputs, thus achieving -7.9 nats. In some sense, the flexibility to regularize uncertainty while preserving meaning estimation points to the strength of the CF-NPE’s decoupled formulation. But it’s also a non-standard problem-specific technique, so I wanted to divulge it here. In a camera-ready version, I would prefer to feature better-conditioned problems.
- In the submitted manuscript, I proposed ensembling the conditional mean predictions (line 153) and highlighted in the discussion (limitations subsection) that this creates a subtle train/test mismatch and a way to remove it (lines 296--302). For the table above, I removed this train/test mismatch by ensembling across three replicates of the stage 1 mean ensemble, trained with different seeds but with the same data split across folds, rather than ensembling across folds. Without the change, CF-NPE still shows some calibration advantages, but they are not as clear-cut; in a camera-ready revision, given the reviewers’ focus on calibration, I would treat this in-distribution version as CF-NPE’s default mode.
NSF optimization trajectory
A more subtle note: as far as I understand it, the theoretical guarantee covers only the second moment, i.e., Prop 1 debiases the residual second moment. This is ideal for the diagonal-Gaussian head in stage 2. However, for the more flexible NSF head, the residual density is learned in-sample on the same residuals it scores, and, as noted in Section 7, a flexible stage 2 family can therefore concentrate mass on training residuals and underestimate spread for the same reason standard NPE does, no?
It's not so bad! The Gaussian head in stage 2 is indeed more principled in that, by construction, its mean can be set to zero. The NSF head, however, at initialization, produces approximately mean-zero posteriors because neural networks are initialized with symmetric weights and biases. Thus, in CF-NPE, the conditional means are already nearly optimal at the beginning of the optimization trajectory. Then, during optimization, they don’t change much because their optimal value is also around zero. Because these conditional means stay roughly constant throughout optimization, the early stopping mechanism engages whenever the variance and other higher-order moments are best, without having to trade off their goodness against the goodness of the current iterate’s conditional means. I will make this (somewhat subtle) point clearer in the manuscript.
Simulation budget
On compute parts, I suggest the authors separate the simulation-budget counting from the training wall-clock because the latter is head-dependent (Gaussian tends to be much faster and show more gains compared to the slower NSF head). I also want to note that the "simulation cost >> training cost" condition is never quantified for the strong lensing example. This could be another easy transparency fix by just reporting lensing simulation time.
The simulations are performed before the timer begins and saved to disk for consistency across runs; the reported times are for the inference alone. The simulator used, lenstromy, generates images of lensing systems fairly quickly, which makes development easier with finite computing resources, but limits the application’s relevance to the “simulation cost >> training cost" regime. That said, lenstronomy may be thought of as a surrogate for more computationally expensive high-fidelity simulations of strong lensing systems, which can take on the order of one day each [1], performing ray tracing and PDE solving and so forth, so there is a connection to the “simulation cost >> training cost" regime. I will be clearer about the extent of this connection in the manuscript.
[1] Gilman, D., Birrer, S., Nierenberg, A., & Oh, M. S. H. (2024). Turbocharging constraints on dark matter substructure through a synthesis of strong lensing flux ratios and extended lensed arcs. Monthly Notices of the Royal Astronomical Society, 533(2), 1687–1713.
I will follow up with multiseed strong lensing results in a subsequent post.
author response 1 of 2
Reviewer WRXX -- Thank you for the thoughtful review. My previous response was intended for Reviewer NuBT, but appears as a reply to your review. Sorry for any confusion. Here are my responses to your questions and concerns.
Calibration metrics
The empirical evidence for posterior calibration could be more direct. The main reported metric is test log-likelihood. This is a proper scoring rule and is certainly relevant, but the main motivation of the paper is overconfidence and variance underestimation. It would make the paper more convincing to also report calibration-oriented metrics, such as coverage, posterior variance ratios, or marginal calibration on benchmarks where the true posterior is known.
Although it’s fair to say the paper is motivated by the overconfidence of an unregularized standard NPE method, once regularization is added to the standard NPE’s objective, as it always is in both my experiments and in practice, the overconfidence of the NPE optimizer is mitigated while the conditional mean becomes undertrained; avoiding extreme overconfidence requires stopping the optimizer before the posterior approximation’s mean has reached the exact posterior’s means (for many data points). So although I think your suggestion to report metrics other than test log likelihood is a good one, I do want to stress that calibration metrics do not tell the entire story because the pathology this paper identifies shows up in both the posterior approximation’s mean and higher moments. Test log-likelihood is a uniquely important metric in this work because the comparator in my experiments is the standard formulation of NPE, whose validity as a posterior approximator stems from maximizing log-likelihood (and thus minimizing the expected KL divergence from the posterior to its approximation). That NPE approximately minimizes this KL divergence is the reason we expect NPE may also produce posterior approximations with favorable calibration properties.
That said, you’re clearly right that the manuscript would be strengthened by reporting additional metrics; readers will want to know whether the observed test log likelihood gains come primarily from improved mean estimation or improved calibration. Please see my response to Area Chair Bjf2 which includes four additional calibration-oriented metrics and shows CF-NPE performing well across the board. Although CF-NPE’s improved estimation of the conditional mean improves test log likelihood, better calibration evidently contributes too.
Computational cost
The computational cost is a practical limitation. CF-NPE requires training runs. The authors argue that this overhead is acceptable when simulation is the main bottleneck and the fold networks can be trained in parallel. However, this may not hold in all applications. For example, in the strong-lensing experiment, CF-NPE with the Gaussian head takes 12.8min compared with 56sec for standard NPE, although it achieves better test log-likelihood. A more explicit discussion of the compute tradeoff would be helpful.
There’s some discussion of this on lines 279--287. CF-NPE is a more computationally expensive method than standard NPE. It’s a bit tricky to say exactly how much, because the stage 1 networks (MSE loss) are cheaper than NSFs and calculations done in parallel are essentially “free” up until you run out of parallel compute resources. But one order of magnitude is the right ballpark. Spending 12.8 minutes training rather than 56 seconds scarcely matters, however, if your simulations require thousands of CPU hours to generate. In this setting, CF-NPE can either let you get better results with the same number of situations, or comparable results faster. Appendix D.3 explores the tradeoff between the number of simulations and held-out log likelihood for both CF-NPE and standard NPE, with CF-NPE sometimes requiring as few as 20% as many simulations to achieve the same held-out log likelihood.
Software availability
Reproducibility could be strengthened. Although the paper describes the implementation details, no code appears to be included with the current submission. Since CF-NPE involves a multi-stage training pipeline and several important hyperparameter choices, providing anonymized code or reproduction scripts would make the empirical results easier to verify.
I am committed to releasing all code along with the publication. I don’t have any major reservations about releasing my code earlier, but I prefer to organize and polish it upon acceptance and to incorporate all feedback for the review before making a release.
author response 2 of 2
Proposition 1
Proposition 1 is written in terms of . Could the authors clarify how this result should be interpreted when is vector-valued? Is the result meant coordinate-wise, or as a covariance matrix inequality?
Thank you for pointing out this ambiguity. The result was intended to be coordinate-wise, not as a matrix inequality. (The result could also have been expressed as a matrix inequality, but the surrounding text doesn’t seem to require it.) I’ll revise Proposition 1 to state that, for each coordinate , $ \mathbb E[r_{i\ell}^2\mid x_i] \geq \operatorname{Var}(z_{i\ell}\mid x_i).$
Sequential NPE
CF-NPE is currently developed for single-round amortized NPE. Since sequential methods such as [1,2,3] are widely used in simulation-based inference, could the authors discuss more concretely what difficulties arise when combining cross-fitting with proposal updates across rounds?
There may not be any difficulties, but I didn’t treat the sequential setting as in scope for this work because, as far as I know, the sequential algorithm doesn’t have any convergence guarantees. Without them, the proposed techniques could work better for individual steps in the sequence but lead to worse results overall. It’s also plausible that CF-NPE would improve individual steps in the sequence as well as the overall result, or that whether it helps or hurts would be dependent on the specific problem. In my own applied work, I’ve found single-round NPE to be a more reliable basis for inference.
Thank the author for the clarification and additional experiments. I am therefore raising my rating to reflect it.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 4/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper identifies a problem in the common training scheme for neural posterior
estimation-based SBI: for a flexible-enough density estimator, e.g., a normalizing flow
and limited simulated training data, the empirical log-likelihood training objective is
unbounded above because mass can concentrate on individual training targets. The authors
propose that as a consequence, NPE posteriors tend to underestimate the true posterior
variance, as shown empirically previously (Hermans et al. 2022). As a fix, the authors
suggest a new two-stage NPE training scheme called CF-NPE. In stage 1, only the posterior mean is
learned via K-fold cross-fitting using a mean squared error (MSE) loss; in stage 2, a
conditional density estimator is trained to predict the residual condition on the data
and the stage 1 means. At test time, the actual posterior approximation is obtained by
shifting it with the learned mean and passing it to the residual estimator.
CF-NPE is evaluated against a set of tractackle benchmarking tasks using
log-likelihood-based metrics, and a real-world, high-dimensional SBI problem from
strong-lensing source reconstruction.
Strengths and weaknesses
Strengths
Quality: the paper gives a clear diagnosis of an underappreciated problem in amortized NPE. The unbounded-likelihood argument (Prop 3) and the out-of-fold residual decomposition (Prop 1) are clean and, as far as I can tell, correct. I appreciate that the empirical section is thorough and in a way adversarial the main claims of the paper itself: the authors do not just show that their methods beats the standard NPE baseline but actively try to make NPE win (10x epochs, 10x training data, temperature scaling, beta-NLL, stop-gradient, etc). This makes the comparison more convincing. Also the component ablations are well-chosen.
On significance and originality: the paper identifies the problem clearly and proposed solution via cross-fitting is a useful and to my knowledge new approach to the issue. The authors scope the novelty honestly: the cross-fitting and sample-splitting research (jackknife, DML / Chernozhukov et al. 2018) is credited and their methodological step is not oversold. The strong-lensing source reconstruction is a good demonstration that the method can be applied beyond toy problems.
The paper is clearly written and well structured. Notation is used consistently and Figures 1 and 2 motivate the problem concretely. The limitations section is honest and prominent, and I even contains a negative results, which is less common in other submissions, e.g., with a cheap simulator that can draw fresh pairs each iteration during training, standard NPE tends to be well-calibrated and CF-NPE provides no additional benefit.
Weaknesses
My main concern is that the paper’s motivation is posterior variance collapse and miscalibration, but the empirical comparison relies primarily on held-out log-likelihood. Test log-likelihood is a proper scoring rule and is relevant, but it compresses calibration and sharpness into a single scalar and does not reveal whether CF-NPE corrects overconfidence or becomes conservative. This matters because Proposition 1 lower-bounds the population OOF residual second moment by the true posterior variance, suggesting possible conservative bias.
The authors actually should have the methods to do this comparison available in the experiments already: in Figure 2 they plot the calibration ratio sigma_hat/sigma* of predicted to true posterior standard deviation, but only for standard NPE in order to demonstrate the collapse. One addition should be to extend this comparison to CF-NPE on benchmarks where the true posterior variance or reliable reference posterior is available. Additionally, I would encourage adding standard SBI calibration methods like SBC / rank statistics (Talts et al. 2018, or expected coverage), and a high-dimensional coverage test on the 256-d lensing posterior (SBC or TARP). Furthermore, there are no posterior predictive checks done anywhere. Especially for the strong lensing application, it would be good to see a check beyong the mean MSE is point-estimate accuracty, i.e., a full PPC.
A more subtle note: as far as I understand it, the theoretical guarantee covers only the second moment, i.e., Prop 1 debiases the residual second moment. This is ideal for the diagonal-Gaussian head in stage 2. However, for the more flexible NSF head, the residual density is learned in-sample on the same residuals it scores, and, as noted in Section 7, a flexible stage 2 family can therefore concentrate mass on training residuals and underestimate spread for the same reason standard NPE does, no? So, cross-fitting solves the collapse at the level of the mean in stage 1, but the same empirical-likelihood pathology could in principle reappear in Stage 2 unless validation regularization controls it. As the NSF head is where the resuls are strongest, I would suggest to run an additional experiment varying the expressiveness of the estimator in stage 2, e.g., diagonal Gaussian -> small flow -> large flow. Together with the coverage diagnostics, one could check whether coverage is affected as the estimator becomes more expressive.
I also want to note that the high-dimensional strong-lensing application is reported for a single seed, whereas all synthetic benchmarks use 10 seeds. Given that the authors write that "gains grow with dimension" lensing is the main example here I think this result needs more seeds and uncertainty quantification.
On compute parts, I suggest the authors separate the simulation-budget counting from the training wall-clock because the latter is head-dependent (Gaussian tends to be much faster and show more gains compared to the slower NSF head). I also want to note that the "simulation cost >> training cost" condition is never quantified for the strong lensing example. This could be another easy transparency fix by just reporting lensing simulation time.
Questions
- Based on the point I made above about stage 2 in-sample density fitting: Does coverage degrade when adding more flexibility in the density estimator head? And could a nested cross-fitting inside stage 2 remove such degradation?
- CF-NPE is by construction conservative rather than overconfident. This is the safer failure mode, but it is still a miscalibration, and I would find it informative to see the this quantified. By Prop 1 the stage 2 target exceeds the true posterior variance by b^2 + eps_mu^2. Additionally, there is a second contribution from the train/test mean mismatch. Could you report both quantities, and ideally compare the single-fold-at-test variant against the ensemble variant on an actual coverage metric (expected coverage or SBC)?
- CF-NPE may produce conservative posteriors due to the OOF residual excess variance and the ensemble train/test mismatch. How does this relate to SBI methods that target reliability or coverage directly?(e.g. balanced NRE, Delaunoy et al. 2022)?
Limitations
Yes.
Final justification
I recommend acceptance. The paper identifies a real, previously underappreciated pathology in amortized NPE and proposes a clean cross-fitting fix, and the rebuttal resolved my main concern: the added calibration metrics show CF-NPE is near-calibrated rather than conservative, and the flagship lensing result was extended to 10 seeds with a convincing robustness gain. Two minor items remain for revision, a wording fix on lensing (where the gain is log-likelihood, not calibration) and one low-cost stage-2 ablation, but neither is blocking and I weight them lightly against the overall contribution.
Formatting concerns
no comments.
4 comments
author response 1 of 2
Thank you for the high-quality review and the encouraging feedback. Let me try to address your remaining concerns.
My main concern is that the paper’s motivation is posterior variance collapse and miscalibration, but the empirical comparison relies primarily on held-out log-likelihood. Test log-likelihood is a proper scoring rule and is relevant, but it compresses calibration and sharpness into a single scalar and does not reveal whether CF-NPE corrects overconfidence or becomes conservative. This matters because Proposition 1 lower-bounds the population OOF residual second moment by the true posterior variance, suggesting possible conservative bias.
Yes, this is a good point. I had initially written my response to you, but because the concern is widely shared, I have made it my response to the AE. Would you review it there? In brief, I think the test log-likelihood is underappreciated as a metric given that standard NPE is the chief comparator here. However, I agree that calibration metrics would be useful and have provided them. CF-NPE is well calibrated across the board.
A more subtle note: as far as I understand it, the theoretical guarantee covers only the second moment, i.e., Prop 1 debiases the residual second moment. This is ideal for the diagonal-Gaussian head in stage 2. However, for the more flexible NSF head, the residual density is learned in-sample on the same residuals it scores, and, as noted in Section 7, a flexible stage 2 family can therefore concentrate mass on training residuals and underestimate spread for the same reason standard NPE does, no?
It's not so bad! The Gaussian head in stage 2 is indeed more principled in that, by construction, its mean can be set to zero. The NSF head, however, at initialization, produces approximately mean-zero posteriors because neural networks are initialized with symmetric weights and biases. Thus, in CF-NPE, the conditional means are already nearly optimal at the beginning of the optimization trajectory. Then, during optimization, they don’t change much because their optimal value is also around zero. Because these conditional means stay roughly constant throughout optimization, the early stopping mechanism engages whenever the variance and other higher-order moments are best, without having to trade off their goodness against the goodness of the current iterate’s conditional means. I will make this (somewhat subtle) point clearer in the manuscript.
I also want to note that the high-dimensional strong-lensing application is reported for a single seed, whereas all synthetic benchmarks use 10 seeds. Given that the authors write that "gains grow with dimension" lensing is the main example here I think this result needs more seeds and uncertainty quantification.
I have produced strong lensing results with the NSF head and 10 seeds, following hyperparameter tuning with Optuna. The metrics reported are the same as in my response to the AE, except I have omitted C2ST because the test set was not large enough to train an informative discriminator (both methods score 0.5).
| Method | LL ↑ | (→1) | SBC KS ↓ | TARP ↓ |
|---|---|---|---|---|
| Standard NPE | 10.71 [−62.32, 13.33] | 1.149 ± 0.005 | 0.0170 ± 0.0005 | 0.052 ± 0.005 |
| CF-NPE | 72.16 [69.61, 73.06] | 1.097 ± 0.022 | 0.0141 ± 0.0016 | 0.121 ± 0.025 |
In my reading, here it’s a wash as to which method is better calibrated. and SBC KS favor CF-NPE whereas TARP . The version of CF-NPE here uses an ensemble of three ensembles for posterior mean estimation, although using one ensemble instead does not have much effect on calibration.
The larger story here is about test log-likelihood. By decoupling mean estimation from estimation of the higher moment, CF-NPE substantially outperforms standard NPE. For CF-NPE, all 10 seeds converge to optimizers within 10 nats of the median (lowest: 67.73). For standard NPE, 3 of 10 seeds converge to an optimum around -67 nats, and the remaining 7 are clustered around 10 nats.
CF-NPE is considerably more computationally expensive, particularly in this example, where stage 1 network training cannot be parallelized over seeds and folds on a single GPU (a single seed already saturates the GPU), so there is a trade-off. But standard NPE does not have a “knob” for increasing accuracy to the level CF-NPE attains in this application, for any computational budget. These standard NPE results already reflect sweeps over network depths, and even a mixture of standard NPE posterior approximations does not approach the results CF-NPE attains in this setting.
author response 2 of 2
On compute parts, I suggest the authors separate the simulation-budget counting from the training wall-clock because the latter is head-dependent (Gaussian tends to be much faster and show more gains compared to the slower NSF head). I also want to note that the "simulation cost >> training cost" condition is never quantified for the strong lensing example. This could be another easy transparency fix by just reporting lensing simulation time.
The simulations are performed before the timer begins and saved to disk for consistency across runs; the reported times are for the inference alone. The simulator used, lenstromy, generates images of lensing systems fairly quickly, which makes development easier with finite computing resources, but limits the application’s relevance to the “simulation cost >> training cost" regime. That said, lenstronomy may be thought of as a surrogate for more computationally expensive high-fidelity simulations of strong lensing systems, which can take on the order of one day each [1], performing ray tracing and PDE solving and so forth, so there is a connection to the “simulation cost >> training cost" regime. I will be clearer about the extent of this connection in the manuscript.
[1] Gilman, D., Birrer, S., Nierenberg, A., & Oh, M. S. H. (2024). Turbocharging constraints on dark matter substructure through a synthesis of strong lensing flux ratios and extended lensed arcs. Monthly Notices of the Royal Astronomical Society, 533(2), 1687–1713.
Response to rebuttal
Thank you, this addresses my main concern directly. The calibration metrics resolve the question test log-likelihood left open: CF-NPE lands near-calibrated rather than overshooting into conservatism, which was the failure mode I was concernced about. I also take your point that test log-likelihood is not just one metric among many here, since it is what ties the approximation to the posterior through the KL objective; reporting both is simply more complete.
The 10-seed lensing results resolve my seed concern. One note for the text: on this flagship high-dimensional example the calibration is, by your own reading, a tie between methods, so the gain here is about log-likelihood and robustness, not calibration. I would state that explicitly rather than let "gains grow with dimension" carry a calibration reading it does not support on lensing.
My one open item is the stage-2 (NSF head) concern. Your argument is plausible, but it still rests on early stopping controlling in-sample density concentration, which is the exact mechanism I was worried about. The clean check is cheap: vary stage-2 expressiveness (diagonal Gaussian, small flow, large flow) and show coverage does not degrade. I would like this in the revision, though I do not treat it as blocking.
With the main concern resolved and the lensing experiment delivered, this moves my assessment upward.
lensing gains & stage-2 expressiveness
Thank you for the thoughtful response. I'm glad the additional calibration and lensing results addressed your main concerns, and that my case for the centrality of the test log-likelihood metric resonated. In a revision, I will note that for the lensing application, the gains appear to be more about log-likelihood and robustness than calibration. I will also include an appendix, summarized and referenced in the discussion section, that reports whether/how calibration varies with the expressiveness of the stage-2 normalizing flow.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
calibration metrics
Thank you for the feedback and for overseeing the review. I have prepared new results that include four additional calibration-oriented metrics and show CF-NPE performing well across the board.
Before presenting them, however, allow me to make the case for the singular importance of test log-likelihood in this work, which goes beyond log-likelihood being a proper scoring rule. In standard NPE (the chief comparator), maximizing the test log-likelihood (and, equivalently, minimizing the expected KL divergence from the posterior to its approximation) is what connects the posterior approximation to the posterior. It is only because NPE minimizes this KL divergence that we expect NPE posterior approximations to be at least somewhat calibrated and to perform well at other secondary metrics of posterior approximation quality.
Furthermore, once early stopping and other regularization techniques are combined with log likelihood to form the standard NPE objective, the degeneracy the manuscript identifies, whereby the NPE posterior approximation concentrates mass on the training data, no longer manifests solely in miscalibration: early stopping trades off variance estimation error for mean estimation error. The combined effects are quantified by test log likelihood, whereas many alternative metrics only quantify the calibration side of performance. (CF-NPE avoids this trade-off by fitting multiple networks.)
That said, in an attempt to keep the manuscript’s narrative simple, I seem to have overdone it by only reporting test log-likelihood. Thus, I’m pleased to report here that the proposed method performs very well across diverse calibration metrics:
In some settings, only CF-NPE produces calibrated posterior approximations. The magnitude of some of the differences in χred2 is striking.