PyTorch and GPyTorch implementation of the paper "Conditioning Sparse Variational Gaussian Processes for Online Decision-making."

Overview

Conditioning Sparse Variational Gaussian Processes for Online Decision-making

This repository contains a PyTorch and GPyTorch implementation of the paper "Conditioning Sparse Variational Gaussian Processes for Online Decision-making."

Introduction

Online variational conditioning (OVC) provides closed form conditioning (e.g. updating a model's posterior predictive distribution after having observed new data points) for stochastic variational Gaussian processes. OVC enables the development of ``fantasization" (predicting on data and then conditioning on a random posterior sample) for variational GPs, thereby enabling SVGPs to be used for the first time in advanced, look-ahead acquisitions such as the batch knowledge gradient, entropy search, and look-ahead Thompson sampling (which we introduce).

In this repo, we provide an implementation of a SVGP model with OVC hooked up as the get_fantasy_model function, allowing it to be natively used with any advanced acquisition function in BoTorch (see the experiments in the experiments/std_bayesopt folder).

Installation

python setup.py develop

See requirements.txt for our setup. We require Pytorch >= 1.8.0 and used the master versions of GPyTorch and BoTorch installed from source.

File Structure

.
+-- volatilitygp/
|   +-- likelihoods/
|   |   +-- _one_dimensional_likelihood.py (Implementation of Newton iteration and the base class for the others)
|   |   +-- bernoulli_likelihood.py
|   |   +-- binomial_likelihood.py
|   |   +-- fixed_noise_gaussian_likelihood.py
|   |   +-- multivariate_normal_likelihood.py
|   |   +-- poisson_likelihood.py
|   |   +-- volatility_likelihood.py
|   +-- mlls/
|   |   +-- patched_variational_elbo.py (patched version of elbo to allow sumMLL training)
|   +-- models/
|   |   +-- model_list_gp.py (patched version of ModelListGP to allow for SVGP models)
|   |   +-- single_task_variational_gp.py (Our basic model class for SVGPs)
|   +-- utils/
|   |   +-- pivoted_cholesky.py (our pivoted cholesky implementation for inducing point init)
+-- experiments/
|   +-- active_learning/ (malaria experiment)
|   |   +-- qnIPV_experiment.py (main script)
|   +-- highd_bo/ (rover experiments)
|   |   +-- run_trbo.py (turbo script)
|   |   +-- run_gibbon.py (global model script, Fig 10c)
|   |   +-- rover_conditioning_experiment.ipynb (Fig 10b)
|   |   +-- trbo.py (turbo implementation)
|   +-- hotspots/ (schistomiasis experiment)
|   |   +-- hotspots.py (main script)
|   +-- mujoco/ (mujoco experiments on swimmer and hopper)
|   |   +-- functions/ (mujoco functions)
|   |   +-- lamcts/ (LA-MCTS implementation)
|   |   +-- turbo_1/ (TurBO implementation)
|   |   run.py (main script)
|   +-- pref_learning/ (preference learning experiment)
|   |   +-- run_pref_learning_exp.py (main script)
|   +-- std_bayesopt/ (bayes opt experiments)
|   |   +-- hartmann6.py (constrained hartmann6)
|   |   +-- lcls_optimization.py (laser)
|   |   +-- poisson_hartmann6.py (poisson constrained hartmann6)
|   |   +-- utils.py (model definition helpers)
|   |   +-- weighted_gp_benchmark/ (python 3 version of WOGP)
|   |   |   +-- lcls_opt_script.py (main script)
+-- tests/ (assorted unit tests for the volatilitygp package)

Commands

Please see each experiment folder for the larger scale experiments.

The understanding experiments can be found in:

  • Figure 1a-b: notebooks/svgp_fantasization_plotting.ipynb
  • Figure 1c: notebooks/SABR_vol_plotting.ipynb
  • Figure 2b-d: experiments/std_bayesopt/knowledge_gradient_branin_plotting.ipynb
  • Figure 6: notebooks/ssgp_port.ipynb
  • Figure 7: notebooks/ssgp_time_series_testing_pivcholesky.ipynb
  • Figure 8: notebooks/streaming_bananas_plots.ipynb
  • Figure 10b: experiments/highd_bo/rover_conditioning_experiment.ipynb

Code Credits and References

  • BoTorch (https://botorch.org). Throughout, many examples were inspired by assorted BoTorch tutorials, while we directly compare to Botorch single task GPs.
  • GPyTorch (https://gpytorch.ai). Our implementation of SVGPs rests on this implementation.
  • LA-MCTS code comes from here
  • laser WOGP code comes from here
  • hotspots data comes from here
  • malaria active learning script comes from here. Data can be downloaded from here.
Owner
Wesley Maddox
PhD student at New York University.
Wesley Maddox
This is the code for the paper "Motion-Focused Contrastive Learning of Video Representations" (ICCV'21).

Motion-Focused Contrastive Learning of Video Representations Introduction This is the code for the paper "Motion-Focused Contrastive Learning of Video

11 Sep 23, 2022
PyTorch implementation of CDistNet: Perceiving Multi-Domain Character Distance for Robust Text Recognition

PyTorch implementation of CDistNet: Perceiving Multi-Domain Character Distance for Robust Text Recognition The unofficial code of CDistNet. Now, we ha

25 Jul 20, 2022
Activating More Pixels in Image Super-Resolution Transformer

HAT [Paper Link] Activating More Pixels in Image Super-Resolution Transformer Xiangyu Chen, Xintao Wang, Jiantao Zhou and Chao Dong BibTeX @article{ch

XyChen 270 Dec 27, 2022
Inverse Rendering for Complex Indoor Scenes: Shape, Spatially-Varying Lighting and SVBRDF From a Single Image

Inverse Rendering for Complex Indoor Scenes: Shape, Spatially-Varying Lighting and SVBRDF From a Single Image (Project page) Zhengqin Li, Mohammad Sha

209 Jan 05, 2023
Here we present the implementation in TensorFlow of our work about liver lesion segmentation accepted in the Machine Learning 4 Health Workshop

Detection-aided liver lesion segmentation Here we present the implementation in TensorFlow of our work about liver lesion segmentation accepted in the

Image Processing Group - BarcelonaTECH - UPC 96 Oct 26, 2022
DeepFaceLab fork which provides IPython Notebook to use DFL with Google Colab

DFL-Colab — DeepFaceLab fork for Google Colab This project provides you IPython Notebook to use DeepFaceLab with Google Colaboratory. You can create y

779 Jan 05, 2023
clDice - a Novel Topology-Preserving Loss Function for Tubular Structure Segmentation

README clDice - a Novel Topology-Preserving Loss Function for Tubular Structure Segmentation CVPR 2021 Authors: Suprosanna Shit and Johannes C. Paetzo

110 Dec 29, 2022
TensorFlow implementation of Barlow Twins (Barlow Twins: Self-Supervised Learning via Redundancy Reduction)

Barlow-Twins-TF This repository implements Barlow Twins (Barlow Twins: Self-Supervised Learning via Redundancy Reduction) in TensorFlow and demonstrat

Sayak Paul 36 Sep 14, 2022
ImVoxelNet: Image to Voxels Projection for Monocular and Multi-View General-Purpose 3D Object Detection

ImVoxelNet: Image to Voxels Projection for Monocular and Multi-View General-Purpose 3D Object Detection This repository contains implementation of the

Visual Understanding Lab @ Samsung AI Center Moscow 190 Dec 30, 2022
Notebook and code to synthesize complex and highly dimensional datasets using Gretel APIs.

Gretel Trainer This code is designed to help users successfully train synthetic models on complex datasets with high row and column counts. The code w

Gretel.ai 24 Nov 03, 2022
Causal Influence Detection for Improving Efficiency in Reinforcement Learning

Causal Influence Detection for Improving Efficiency in Reinforcement Learning This repository contains the code release for the paper "Causal Influenc

Autonomous Learning Group 21 Nov 29, 2022
Code for the AAAI 2022 paper "Zero-Shot Cross-Lingual Machine Reading Comprehension via Inter-Sentence Dependency Graph".

multilingual-mrc-isdg Code for the AAAI 2022 paper "Zero-Shot Cross-Lingual Machine Reading Comprehension via Inter-Sentence Dependency Graph". This r

Liyan 5 Dec 07, 2022
UNAVOIDS: Unsupervised and Nonparametric Approach for Visualizing Outliers and Invariant Detection Scoring

UNAVOIDS: Unsupervised and Nonparametric Approach for Visualizing Outliers and Invariant Detection Scoring Code Summary aggregate.py: this script aggr

1 Dec 28, 2021
Supplementary code for SIGGRAPH 2021 paper: Discovering Diverse Athletic Jumping Strategies

SIGGRAPH 2021: Discovering Diverse Athletic Jumping Strategies project page paper demo video Prerequisites Important Notes We suspect there are bugs i

54 Dec 06, 2022
This application is the basic of automated online-class-joiner(for YıldızEdu) within the right time. Gets the ZOOM link by scheduled date and time.

This application is the basic of automated online-class-joiner(for YıldızEdu) within the right time. Gets the ZOOM link by scheduled date and time.

215355 1 Dec 16, 2021
Official code for "EagerMOT: 3D Multi-Object Tracking via Sensor Fusion" [ICRA 2021]

EagerMOT: 3D Multi-Object Tracking via Sensor Fusion Read our ICRA 2021 paper here. Check out the 3 minute video for the quick intro or the full prese

Aleksandr Kim 276 Dec 30, 2022
Imagededup - 😎 Finding duplicate images made easy

imagededup is a python package that simplifies the task of finding exact and near duplicates in an image collection.

idealo 4.3k Jan 07, 2023
This repository contains the code for TABS, a 3D CNN-Transformer hybrid automated brain tissue segmentation algorithm using T1w structural MRI scans

This repository contains the code for TABS, a 3D CNN-Transformer hybrid automated brain tissue segmentation algorithm using T1w structural MRI scans. TABS relies on a Res-Unet backbone, with a Vision

6 Nov 07, 2022
An extremely simple, intuitive, hardware-friendly, and well-performing network structure for LiDAR semantic segmentation on 2D range image. IROS21

FIDNet_SemanticKITTI Motivation Implementing complicated network modules with only one or two points improvement on hardware is tedious. So here we pr

YimingZhao 54 Dec 12, 2022
Model parallel transformers in Jax and Haiku

Mesh Transformer Jax A haiku library using the new(ly documented) xmap operator in Jax for model parallelism of transformers. See enwik8_example.py fo

Ben Wang 4.8k Jan 01, 2023