-
Notifications
You must be signed in to change notification settings - Fork 14
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
Refactor cvi projection marginal rule (with proposal distribution) #430
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #430 +/- ##
==========================================
+ Coverage 74.42% 74.75% +0.33%
==========================================
Files 195 198 +3
Lines 5623 5721 +98
==========================================
+ Hits 4185 4277 +92
- Misses 1438 1444 +6 ☔ View full report in Codecov by Sentry. |
@Nimrais ping |
@Nimrais do we want to merge this? |
@bvdmitri This PR works in principle. I have an example (in a model notebook) that this PR allows to run. I also added tests that show the convergence with the marginal approach. However, I am currently refactoring the ExponentialFamilyManifolds to address one of the reviews. If you could review it and suggest the minimal possible changes needed before merging, it would be nice, as I am using this branch locally because CVIProjection works better in this branch for deterministic nodes with many interfaces. More importantly, this PR solves an important problem: it's not always possible to sample from the messages; however, in some sense, it's always possible from marginals. |
Conjugate Variational Inference Enhancement PR
Overview
This PR enhances the Conjugate Variational Inference (CVI) projection method by adding proposal distribution support and flexible sampling strategies. These improvements address practical limitations in the current implementation, specifically for deterministic nodes with multiple interfaces.
Key Features
1. Proposal Distribution Support
ProposalDistributionContainer
to maintain and update proposal distributions across iterations2. Flexible Sampling Strategies
CVISamplingStrategy
enum with two options:FullSampling
: Traditional approach with multiple samples (better accuracy)MeanBased
: Uses only distribution means (significantly faster)Benefits
Testing
The PR includes some tests covering: