Variational Multitask GP with correlated outputs
See original GitHub issueHi,
I noticed in the tutorials that you can create an exact multi-task GP with correlated outputs:
Is it possible to do this with a variational GP? I have tried the following which doesn’t work:
class MultitaskSVGP(gpytorch.models.ApproximateGP):
def __init__(self, inducing_points, input_dim, output_dim):
batch_shape = torch.Size([output_dim])
variational_distribution = CholeskyVariationalDistribution(inducing_points.size(-2),
batch_shape=batch_shape)
variational_strategy = MultitaskVariationalStrategy(
VariationalStrategy(self, inducing_points,
variational_distribution,
learn_inducing_locations=True),
num_tasks=output_dim)
super().__init__(variational_strategy)
self.mean_module = gpytorch.means.MultitaskMean(
gpytorch.means.ConstantMean(), num_tasks=output_dim
)
self.covar_module = gpytorch.kernels.MultitaskKernel(
gpytorch.kernels.RBFKernel(ard_num_dims=input_dim), num_tasks=output_dim, rank=1
)
def forward(self, x):
mean_x = self.mean_module(x)
covar_x = self.covar_module(x)
return gpytorch.distributions.MultitaskMultivariateNormal(mean_x, covar_x)
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Variational GPs w/ Multiple Outputs - GPyTorch's documentation
In this example, we will demonstrate how to construct approximate/variational GPs that can model vector-valued functions (e.g. multitask/multi-output GPs).
Read more >Collaborative Multi-output Gaussian Processes
We introduce the collaborative multi-output Gaussian process (GP) model for learning dependent tasks with very large datasets. The model fosters task ...
Read more >Variational Dependent Multi-output Gaussian Process ...
(2011) employed convolution processes to account for the correlations among outputs to construct a convolved multiple outputs GP (CMOGP) which can be ...
Read more >Multi-Output - GP Model Zoo
Literature & Code for all things GP. ... Are there correlations between the outputs or independent? Is there missing data? ... Multi-Task.
Read more >Learning Multi-Task Gaussian Process Over Heterogeneous ...
known non-parametric Bayesian model for learning correlated tasks effectively by transferring ... dependent multi-output GP has been introduced in the.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Right - so we’re working on a feature that will add ICM and LCM-type variational multitask models. At the moment this kind of example won’t work - because the
MultitaskVariationalStrategy
assumes it’s getting a batch of indepenent prior GPs rather than a multi-output GP.For now, if you try the SVGP multitask example you can learn a multi-output SVGP model. It doesn’t assume any correlations
@dinithins There isn’t a straightforward way to exploit Kronecker structure for variational models. This is because - even though the prior has Kronecker structure - there isn’t any immediately obvious structure that can be assigned to the variational distribution.
The variational multitask GP implementation - which implements the linear model of coregionalization - is actually quite efficient though!