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

Quadrature alternatives #1602

Open
st-- opened this issue Nov 3, 2020 · 1 comment
Open

Quadrature alternatives #1602

st-- opened this issue Nov 3, 2020 · 1 comment

Comments

@st--
Copy link
Member

st-- commented Nov 3, 2020

Feature request

We've made some strides improving the quadrature handling in GPflow. It would be amazing if we could also make it possible to use alternatives to the default Gauss-Hermite quadrature, for example Unscented Transform and Monte Carlo quadrature.

Motivation

Why does this matter?
The default Gauss-Hermite quadrature scales poorly with more dimensions. Performing quadrature with D dimensions and N points per dimension results in a summation over N^D terms. This can be problematic for example when using MultiLatent Likelihoods (introduced in #1559) with more than two dimensions.

Example:
A practical example would be a heteroskedastic StudentT likelihood with 3 latent GPs modelling the location, scale and degrees-of-freedom parameters.

Proposal

Describe the solution you would like

The implementation of other quadrature methods such as Monte Carlo quadrature and Unscented Transform would add great options to overcome dimensional scalability problems.

Ideally, it should be possible to alternate between quadrature methods inside the same likelihood. For example, It should be possible to, to run Gauss-Hermite quadrature after some optimization iterations computed with Unscented Transform to make sure that the approximations are in agreement.

What alternatives have you considered?

Are you willing to open a pull request? (We really appreciate contributions!)

@spectraldani
Copy link

Hi! I have been working on UT and MC sampling for the expectation module for GPflow 1.x for a while now, and I'm willing to help with quadrature code! I just need some time to get used to TF 2.x.

Ideally, it should be possible to alternate between quadrature methods inside the same likelihood. For example, It should be possible to, to run Gauss-Hermite quadrature after some optimization iterations computed with Unscented Transform to make sure that the approximations are in agreement.

I remember trying to implement like this back in GPflow 1.x, using the Strategy-like pattern I alluded at #1205 (comment), but because of graph mode, I needed to "rebuild" the model after swapping the quadratures to update the likelihood tensor. I assume this is no longer be a problem in GPflow 2.x, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants