Skip to content

sourav-roni/BCR-DE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BCR_DE

Code for "Controlled Differential Equations on Long Sequences via Non-standard Wavelets" (ICML 23)

Poster

Slide

Framework

Installation

The code is written to be compatible with Python3.6+ . We outlay steps to create the required environment and install dependencies, using Anaconda and pip. Please refer to their installations if you already don't have them.

conda create --name BCRDE python=3.9

Install dependencies using the provided requirement file.

pip install -r req.txt

Additionally, one needs to install the Pytorch Wavelets library. We list the install instruction below:

git clone https://github.com/fbcotter/pytorch_wavelets
cd pytorch_wavelets
pip install .

Code

All code resides in the folder BCR_DE, including model files, scripts to run the experiments in the paper as well as configuration files as and when required. Please check the corresponding README for instructions on running the experiments. We also include a notebook to demonstrate the non-standard wavelet decomposition.

We propose a variant of locally connected convolution in our paper termed as Partially Unshared Convolution (PUC) layer which helps in the paremeterization required for BCR-DE. We provide two implementations including one which is sufficiently faster to use via einops. Note that these classes are written using PyTorch and can be used as plug and play in relevant deep learning models, the code for which is present in the BCR-DE model file.

Data

Please find the datasets used for experiments reported in the paper here Google Drive. These include data from BIDMC32 dataset, Eigenworm dataset, and TSER, we include it here for the ease of use. Please download the folder, unzip it and place it parallel to the BCR_DE folder. This will allow to use the code out of the box, else you will need to provide the specific paths to the data while running the experiments.

The data for the Hodgkin–Huxley model was generated using code from pyHH. We have included the sample data used in the experiments in the above data folder, since it takes quite some to generate.

Citation

If you find our paper/code useful, please cite our paper at ICML 23

@InProceedings{pmlr-v202-pal23b,
  title = 	 {Controlled Differential Equations on Long Sequences via Non-standard Wavelets},
  author =       {Pal, Sourav and Zeng, Zhanpeng and Ravi, Sathya N. and Singh, Vikas},
  booktitle = 	 {Proceedings of the 40th International Conference on Machine Learning},
  pages = 	 {26820--26836},
  year = 	 {2023},
  volume = 	 {202},
  series = 	 {Proceedings of Machine Learning Research},
  publisher =    {PMLR},
}