Skip to content
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

Implement AutoGaussian guide #2929

Merged
merged 45 commits into from
Oct 4, 2021
Merged

Implement AutoGaussian guide #2929

merged 45 commits into from
Oct 4, 2021

Conversation

fritzo
Copy link
Member

@fritzo fritzo commented Sep 13, 2021

Addresses #2813
Replaces #2926 #2928
See design doc

Tasks

  • Parametrize sparse precision matrices. This is statistically optimal.
  • Implement "dense" backend. This is fully general but computationally expensive.
  • Implement "funsor" backend. This is asymptotically cheaper than the dense backend but has two restrictions (from TVE):
    • For any dependency u --> d, plates(u) <= plates(d).
    • For any pair of transitive dependencies u1 --> d <-- u2, either plates(u1) <= plates(u2) <= plates(d) or plates(u2) <= plates(u1) <= plates(d).

After this first implementation, I plan to switch to forward_filter_backward_precondition() and either compile or trace the funsor computation to reduce overhead.

Tested

  • added to existing autoguide tests
  • smoke test on pyro-cov model variants
  • test equality of elbo to AutoMultivariateNormal (on a gaussian model)
  • test on lots of dependency structures

@fritzo fritzo marked this pull request as ready for review October 4, 2021 00:55
@fritzo fritzo added awaiting review and removed WIP labels Oct 4, 2021
@fritzo fritzo requested a review from eb8680 October 4, 2021 00:55
eb8680
eb8680 previously approved these changes Oct 4, 2021
Copy link
Member

@eb8680 eb8680 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good per zoom review pending updated serialization test

@fritzo
Copy link
Member Author

fritzo commented Oct 4, 2021

OK, I've added serialization tests and fixed a few serialization issues they exposed.

eb8680
eb8680 previously approved these changes Oct 4, 2021
@eb8680 eb8680 merged commit e71145a into dev Oct 4, 2021
@eb8680 eb8680 deleted the auto-gaussian branch October 4, 2021 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants