-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rethinking AdvancedVI #24
Comments
Hi, is there any update on a complete rewrite of AdvancedVI? Or even an expected time frame for release? |
Hey, there is no update and I would say that this has gone stale. I don't have the bandwidth for it anymore and neither does @torfjelde (I guess), so unless someone takes over... |
Hi @theogf , that's sad news. Then at the given moment, the VI ecosystem of |
I really hope @torfjelde has the time for it (we haven't talked in a while). If the package becomes easier to work with I would definitely be happy to add a couple of algorithms like SVGD and others. But I generally think that a revamping is very necessary. The ML ecosystem evolved a lot and there are now new solutions like ParametersHandling.jl for problems we had here. |
Is there a straightforward way to deal with the covariance of a full-rank multivariate normal variational family though? I have been using |
You should have a look at |
@theogf That looks great. I would really like to know about the future/current state of Turing.jl's model API before doing anything though. |
I will start pursuing a PhD starting this Fall, and this might give me some bandwidth to work full-time on
@theogf could you list of changes that you planned to introduce into AdvancedVI? I might be able to pick them up at some point. |
Hey! I'm back now; been away for the past 4 months, so sorry for not being responsive here.
So it depends on what we're talking about here. The work I'm doing on the model-side of Turing.jl will be very useful for any interaction AdvancedVI.jl wants to have with Turing.jl-models, e.g. perform VI on a Turing.jl model, use a Turing.jl model to define a variational approximation, etc. But solely for AdvancedVI.jl, i.e. ignoring any relation to the rest of Turing.jl-ecosystem, we're still not happy with what we have set-up this far; the general API needs to improve, as partially outlined by @theogf above. There are also some significant improvements in the ecosystem that we might want to take advantage of here in AdvancedVI.jl:
And so on. It requires a bit more thought and outlining what we want here though, but I'm keen on getting something rolling now!:) |
Hi @torfjelde , nice to have you back. If you haven't noticed, I'm one of the guys that was on the Some additional thoughts: People have been talking about SVGD in this repo for quite some time, but I don't think it will make a good fit here. Its algorithmic structure is quite different from BBVI/MCVI such that I don't see good abstraction opportunities. And given that we'll not see a shortage of variational particle methods any time soon, I think it will be good to have a separate package like |
I don't agree, the representation is different but just as relevant. Even if we move it to a different package, we would still need a common API. So it's probably preferable to think of this in one package before starting to split things up. |
No I think it's probably better to start back from scratch, you can eventually take ideas from there if you want |
Okay. Thanks, @theogf @torfjelde the discussions were really helpful. |
Hi @torfjelde , I'm thinking about how to restructure the overall project. I'm thinking to restructure the project as:
Currently, Under For diagonstics, I'm thinking of the various VI-specific diagnostics that have been proposed over the years, like the ones in [3], and the R-hat diagnostics [4]. Though [4] would need an online version of R-hat. I think I saw some heresay about this but not sure what happened on that front. [1] "A Rule for Gradient Estimator Selection, with an Application to Variational Inference," https://arxiv.org/abs/1911.01894 |
Hi @Red-Portal, it looks like a sensible plan. I suggest we keep things simple until there is a genuine need for generalisation. For example, estimators and algorithms can be kept the same if they are always coupled in practice. Some diagnostics are definitely helpful, but this is likely a challenging area as we don't have good ways of checking convergence from the VI approximation to the true target. One way is to run expensive MCMC simulations and compute the divergence between VI approximation and MCMC samples. But we don't have guarantees that MCMC converges either. For a concrete start, maybe you can focus on refactoring the current algorithms to improve clarity, documentation, and design consistency. We can add new algorithms or diagnostics at an advanced project stage. |
Hi @yebai ,
Absolutely! With the talk around I'll start with refactoring the existing functionalities. |
Hi @yebai @torfjelde , What is the current policy about |
That sounds good. |
Alright! It's time to seriously take care of AdvancedVI :D
Here are some of the things we talked about in the meeting back in October:
update_q
) or a distribution from which the parameters change.step!
functionAnd here are some more personal points (disclaimer: I will be happy to take care of these different points)
ELBO
approach is good, the ELBO can always be splitted between an entropy term (depending only of the distribution) and an expectation term over the log joint. Most VI methods take advantage of this by computing the entropy gradient analytically (and smartly!), see "Doubly Stochastic Variational Inference" by Titias for instance. My proposition would be to split the gradient into two parts (grad_entropy + grad_expeclog), where one can specialize given the problem.update_q
only makes sense with the current obsolete implementation using distributions with immutable fields likeTuringMvNormal
. See again Titsias using the reparametrization trick.The text was updated successfully, but these errors were encountered: