Pyro Integration

QPyTorch can optionally work with the Pyro probabilistic programming language. This makes it possible to use Pyro’s advanced inference algorithms, or to incorporate QEPs as part of larger probabilistic models. QPyTorch offers two ways of integrating with Pyro:

High-level Pyro Interface (for predictive models)

The high-level interface provides a simple wrapper around ApproximateQEP that makes it possible to use Pyro’s inference tools with QPyTorch models. It is best designed for:

  • Developing models that will be used for predictive tasks

  • QEPs with likelihoods that have additional latent variables

The Pyro + QPyTorch High-Level Introduction gives an overview of the high-level interface. For a more in-depth example that shows off the power of the integration, see the Clustered Multitask QEP Example.

Low-level Pyro Interface (for latent function inference)

The low-level interface simply provides tools to compute QEP latent functions, and requires users to write their own model() and guide() functions. It is best designed for:

  • Performing inference on probabilistic models that involve QEPs

  • Models with complicated likelihoods

The Pyro + QPyTorch Low-Level Introduction gives an overview of the low-level interface. The Cox Process Example is a more in-depth example of a model that can be built using this interface.