You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: interface for unconditional flow training #1432
we have interfaces to nflows and zuko for training conditional density estimators (see our ConditionalDensityEstimator class).
There are scenarios where one needs to train an unconditional flows, e.g., when learning a prior from data, or when learning the marginal p(x). We do not have straightforward way of doing this atm (e.g., only by setting context to ones throughout training).
To fix this issue, write an interface to zuko (because nflows is not maintained anymore) that enables unconditional flow training.
I have a question of how to organize the structure of the code for this issue. For instance, when doing NPE, we create a (conditional) density estimator as a child of ConditionalDensityEstimator and then do the actual training using the class PosteriorEstimator. I've created an UnconditionalDensityEstimator class and the assoziated Zuko code, but I don't know if I should simply do the training in the UnconditionalDensityEstimator or create another class analagous to PosteriorEstimator but for the unconditional case. @janfb ?
Just to keep track of exchanges, here is the response by @janfb over discord:
cool!
I think it should be orthogonal to PosteriorEstimator because we are just learning a marginal (but I guess that's what you meant).
then the question is whether we can should have a separate class, sth like MarginalEstimator (child of NeuralInference) for this purpose, right?
not sure.. I think you could start with coding it up in a custom training first and then decide whether it makes sense to have a dedicated class.
an intermediate goal would be just having a how-to-guide on how to use this unconditional DE to test for model missp.
afterwards we can decide how much high-level convenience API we want to put around it 🙂
Activity
plcrodrigues commentedon Mar 17, 2025
I would like to work on this :-)
plcrodrigues commentedon Mar 17, 2025
I have a question of how to organize the structure of the code for this issue. For instance, when doing NPE, we create a (conditional) density estimator as a child of
ConditionalDensityEstimatorand then do the actual training using the classPosteriorEstimator. I've created anUnconditionalDensityEstimatorclass and the assoziatedZukocode, but I don't know if I should simply do the training in theUnconditionalDensityEstimatoror create another class analagous toPosteriorEstimatorbut for the unconditional case. @janfb ?plcrodrigues commentedon Mar 18, 2025
Just to keep track of exchanges, here is the response by @janfb over discord:
janfb commentedon Mar 25, 2025
fixed with #1470