"AssertionError: Original and re-transformed parameters must be close to each other." During multi-round inference #930
-
|
Hey everyone, I got the following error trying to do multi-round inference. I assume it's a problem on my end (too many simulator parameters / not enough samples?), because the linear Gaussian example (https://sbi-dev.github.io/sbi/tutorial/03_multiround_inference/) works. However, I did not find documentation on this error so I'd appreciate any pointers as to what might be going wrong. Thank you for your support. Best, |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
|
Hi Daniel, thanks for reporting the issue! With the assertion we check whether the parameter transform is working correctly. In your example, applying the transform and then applying the inverse transform changes the parameter, which should not happen. The problem lies in your simulations it seems. You are using 5000 simulations, but more than half of them contains |
Beta Was this translation helpful? Give feedback.
-
|
If you have NaNs, multi-round SNPE-C can be tricky, see Appendix Sec 6.5 "Leakage because of invalid data" here. You can use "Truncated proposals for scalable and hassle-free simulation-based inference" from here |
Beta Was this translation helpful? Give feedback.
-
|
Thank you both for the lightning fast response. I will look more into both of these references. The large number of |
Beta Was this translation helpful? Give feedback.
-
|
Using a restriction estimator is also fine. I would not recommend to combine the restriction estimator with multi-round inference. I.e., I would not do multiple rounds of the restriction estimator and multiple rounds of SNPE. |
Beta Was this translation helpful? Give feedback.
-
|
I resolved the issue and the most likely explanation is that I made a mistake in my prior. For some of the parameters I accidentally set low=high. With the prior range being a single point, I assume this caused leakage issues that even truncation could no fix. I now have the correct prior but I also changed some other things, so I cannot be certain this was the cause. Apologies for the avoidable error. |
Beta Was this translation helpful? Give feedback.
If you have NaNs, multi-round SNPE-C can be tricky, see Appendix Sec 6.5 "Leakage because of invalid data" here.
You can use "Truncated proposals for scalable and hassle-free simulation-based inference" from here