Implementing a GP Adapter #1983
Unanswered
prockenschaub
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to implement a Gaussian Process Adapter as described in Li and Marlin (2016). The basic idea is to use a GP to convert a dataset of N irregularly sampled time-series into a fixed time grid of size NxT, which is then coupled with a black-box model (e.g., RNN) for classification/regression.
A key difference in this setup is that the loss is not calculated on the "training data" (which are the irregularly sampled key-value-pairs) via a marginal log-likelihood but on the posterior predictions using a standard prediction loss (e.g., MSE or cross-entropy). That means model training moves from
gpytorch'sgp_model.train()togp_model.eval().I believe this currently does not work with an
gpytorch.models.ExactGPout of the box because of the caches used in the prediction strategy. As the kernel parameters still change, we must recalculate the train-train covariance at each iteration, precluding the use of caches. I have tried to do so by subclassingDefaultPredictionStrategyand forcing it to recalculate the cache each time (making "cache" a misnomer that's just left for compatibility):This custom prediction strategy is then set manually for each iteration of the training cycle.
When running the above on a toy example adapted from the Exact GP Tutorial, I mostly get sensible-ish results, although often with confidence limits that are a bit too narrow.
However, sometimes I get degenerate results like these
The full code for this example can be found here
Click to expand
I therefore have a couple of open questions left:
MSE + alpha * MLLfix this by explicitly incentivising a good fit of the predictors?gpytorch.settings.fast_pred_samples(True)andgpytorch.settings.fast_pred_samples(True)?I'd be super grateful for any feedback, comments, and insights you might have, particularly with regards to
gpytorch's internals!Edits: typos in the code and text
Beta Was this translation helpful? Give feedback.
All reactions