https://github.com/ermongroup/hyperspn
PyTorch implementation for "HyperSPNs: Compact and Expressive Probabilistic Circuits", NeurIPS 2021
https://github.com/ermongroup/hyperspn
density-estimation probabilistic-circuits pytorch regularization sum-product-networks
Last synced: about 1 year ago
JSON representation
PyTorch implementation for "HyperSPNs: Compact and Expressive Probabilistic Circuits", NeurIPS 2021
- Host: GitHub
- URL: https://github.com/ermongroup/hyperspn
- Owner: ermongroup
- Created: 2021-10-05T03:16:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-26T03:02:58.000Z (over 4 years ago)
- Last Synced: 2025-03-31T16:13:17.176Z (about 1 year ago)
- Topics: density-estimation, probabilistic-circuits, pytorch, regularization, sum-product-networks
- Language: Python
- Homepage:
- Size: 17.6 MB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HyperSPN
This repository contains code for the paper:
HyperSPNs: Compact and Expressive Probabilistic Circuits
```
"HyperSPNs: Compact and Expressive Probabilistic Circuits"
Andy Shih, Dorsa Sadigh, Stefano Ermon
In Proceedings of the 35th Conference on Neural Information Processing Systems (NeurIPS), 2021
@inproceedings{ShihSEneurips21,
author = {Andy Shih and Dorsa Sadigh and Stefano Ermon},
title = {HyperSPNs: Compact and Expressive Probabilistic Circuits},
booktitle = {Advances in Neural Information Processing Systems 34 (NeurIPS)},
month = {december},
year = {2021},
keywords = {conference}
}
```
## Installation
```
conda env create -f environment.yml
```
Optionally, for EinsumNetworks:
```
cd EinsumNetworks
pip3 install -r requirements.txt
```
## Datasets and Repos
The Twenty Datasets benchmark is from [here](https://github.com/arranger1044/DEBD).
The Amazon Baby Registries benchmark is from [here](https://github.com/cgartrel/LowRankDPP.jl/tree/master/data/Amazon-baby-registry). The dataset was converted from the set format into the binary format.
The Einsum Network repository is from [here](https://github.com/cambridge-mlg/EinsumNetworks).
## Commands
Experiments can be launched with the helper bash files
```
runid=0
bash bashfiles/run_hyperspn.bash ${runid} 5
bash bashfiles/run_hyperspn.bash ${runid} 10
bash bashfiles/run_hyperspn.bash ${runid} 20
bash bashfiles/run_spn.bash ${runid} 1e-3
bash bashfiles/run_spn.bash ${runid} 1e-4
bash bashfiles/run_spn.bash ${runid} 1e-5
```
```
cd EinsumNetworks/src/
python train_svhn_mixture.py --run=0
python train_svhn_mixture.py --nn --run=0
```