Skip to content

Latest commit

 

History

History
72 lines (45 loc) · 4.02 KB

README.md

File metadata and controls

72 lines (45 loc) · 4.02 KB

QP-SBGD: Projected Stochastic Gradient Descent with Quantum Annealed Binary Gradients (BMVC 2024)

Maximilian Krahn1,2, Michele Sasdelli3, Fengyi Yang3, Vladislav Golyanik4, Juho Kannala1, Tat-Jun Chin3 and Tolga Birdal2

1 Aalto University , 2Imperial College London, 3 Adelaide University, 4 Max Plank Institute for Informatics.

This is the official repository for the project "Projected Stochastic Gradient Descent with Quantum Annealed Binary Gradients". In this work, we train binary neural networks with a quantum annealer deployable optimiser. The preprint can be found at https://arxiv.org/abs/2310.15128 and the project page can be found here. The code can be executed with PyTorch and the D-Wave ocean sdk. To run the code without a quantum annealer one can use D-Wave neal instead of a QPU Sampler or look at the experiments with gurobi.

arXiv Python PyTorch

Getting Started

  • The repository can be cloned with
    git clone https://github.com/mk2510/QPSBGD/
  • We recommend the user to set up a conda environment with
conda create --name QPSBGD --file requirements.txt

10 Layer MLP - Adult Dataset

To reproduce the experiments of the paper it is required to download the datasets:

  • wget https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/a1a
  • wget https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/a1a

place those files in the folder datafolder.

The experiments are then executed by running the 10layers.ipynb file.

2 Layer MLP DWave

To reproduce the experiments of the paper it is required to download the datasets:

  • wget https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/a1a
  • wget https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/a1a

place those files in the folder datafolder.

The experiments are then executed by running the 2layers.ipynb file.

License

Shield: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0