If you are here for normalizing flows may be interested by the repository https://github.com/AWehenkel/Normalizing-Flows.
# Unconstrained Monotonic Neural Networks (UMNN)
![](figures/archi.png)
Official implementation of Unconstrained Monotonic Neural Networks (UMNN) and the experiments presented in the paper:
> Antoine Wehenkel and Gilles Louppe. "Unconstrained Monotonic Neural Networks." (2019).
> [[arxiv]](https://arxiv.org/abs/1908.05164)
# Dependencies
The code has been tested with Pytorch 1.1 and Python3.6.
Some code to draw figures and load dataset are taken from
[FFJORD](https://github.com/rtqichen/ffjord)
and [Sylvester normalizing flows for variational inference](https://github.com/riannevdberg/sylvester-flows).
# Usage
## Simple Monotonic Function
This experiment is not described in the paper. We create the following dataset:
x = [x_1, x_2, x_3] is drawn from a multivariate Gaussian, y = 0.001(x_1^3 + x_1) + x_2 + sin(x_3).
We suppose that we are given the information about the monotonicity of y with respect to x_1.
```bash
python MonotonicMLP.py
```
In this experiment we show that a classical MLP won't be able to
model a function that is monotonic with respect to x_1 because its effect is small
in comparison to the other variables. The UMNN performs better than an MLP while
ensuring that the output is monotonic with respect to x_1.
![](figures/Monotonicity.png)
## Toy Experiments
![](figures/toy/all_flow.png)
```bash
python ToyExperiments.py
```
See ToyExperiments.py for optional arguments.
## MNIST
![](figures/MNIST/MNIST_3_075.png)
```bash
python MNISTExperiment.py
```
See MNISTExperiment.py for optional arguments.
## UCI Dataset
You have to download the datasets with the following command:
```bash
python datasets/download_datasets.py
```
Then you can execute:
```bash
python UCIExperiments.py --data ['power', 'gas', 'hepmass', 'miniboone', 'bsds300']
```
See UCIExperiments.py for optional arguments.
## VAE
You have to download the datasets:
* MNIST:
```
python datasets/download_datasets.py
```
* OMNIGLOT: the dataset can be downloaded from [link](https://github.com/yburda/iwae/blob/master/datasets/OMNIGLOT/chardata.mat);
* Caltech 101 Silhouettes: the dataset can be downloaded from [link](https://people.cs.umass.edu/~marlin/data/caltech101_silhouettes_28_split1.mat).
* Frey Faces: the dataset can be downloaded from [link](https://github.com/y0ast/Variational-Autoencoder/blob/master/freyfaces.pkl).
```bash
python TrainVaeFlow.py -d ['mnist', 'freyfaces', 'omniglot', 'caltech']
```
## Other Usage
All the files related to the implementation of UMNN (Conditionner network, Integrand Network and Integral)
are located in the folder models/UMNN.
- `NeuralIntegral.py` computes the integral of a neural network
(with 1d output) using the Clenshaw-Curtis(CC) quadrature, it computes sequentially the different evaluation points required by CC.
- `ParallelNeuralIntegral.py` processes all the evaluation points at once making the computation almost as fast as the forward evaluation
the net but to the price of a higher memory cost.
- `UMNNMAF.py` contains the implementation of the different networks required by UMNN.
- `UMNNMAFFlow.py` contains the implementation of flows made of UMNNs.
- Check [here](https://github.com/AWehenkel/generalized-UMNN/) if you are interested by modeling functions that are monotonic with respect to more than one input variable. Feel free to reach me for more details!
## Cite
If you make use of this code in your own work, please cite our paper:
```
@inproceedings{wehenkel2019unconstrained,
title={Unconstrained monotonic neural networks},
author={Wehenkel, Antoine and Louppe, Gilles},
booktitle={Advances in Neural Information Processing Systems},
pages={1543--1553},
year={2019}
}
```
没有合适的资源?快使用搜索试试~ 我知道了~
UMNN:无约束单调神经网络的实现及相关实验。 这些架构对于标准化流中的单调变换建模特别有用
共197个文件
py:43个
png:37个
woff2:21个
需积分: 45 1 下载量 43 浏览量
2021-05-31
10:23:21
上传
评论
收藏 25.71MB ZIP 举报
温馨提示
如果您在这里对流进行规范化,可能会对存储库感兴趣。 无约束单调神经网络 (UMNN) 无约束单调神经网络 (UMNN) 的官方实现和论文中提出的实验: Antoine Wehenkel 和 Gilles Louppe。 “不受约束的单调神经网络。” (2019)。 依赖关系 代码已经用 Pytorch 1.1 和 Python3.6 测试过。 从和中提取了一些用于绘制图形和载荷数据的代码以。 用法 简单单调函数 论文中没有描述这个实验。 我们创建以下数据集:x = [x_1, x_2, x_3] 是从多元高斯中提取的,y = 0.001(x_1^3 + x_1) + x_2 + sin(x_3)。 我们假设我们得到了关于 y 相对于 x_1 的单调性的信息。 python MonotonicMLP.py 在这个实验中,我们表明经典 MLP 无法对关于 x_1 单调的函数进行建模,
资源推荐
资源详情
资源评论
收起资源包目录
UMNN:无约束单调神经网络的实现及相关实验。 这些架构对于标准化流中的单调变换建模特别有用 (197个子文件)
katex.min.css 23KB
style.css 4KB
grid.css 2KB
fontawesome-webfont.eot 162KB
KaTeX_AMS-Regular.eot 70KB
KaTeX_Main-Regular.eot 67KB
KaTeX_Main-Bold.eot 59KB
KaTeX_Main-Italic.eot 43KB
KaTeX_Math-Italic.eot 41KB
KaTeX_Math-Regular.eot 41KB
KaTeX_Math-BoldItalic.eot 39KB
KaTeX_Fraktur-Bold.eot 35KB
KaTeX_Typewriter-Regular.eot 35KB
KaTeX_Fraktur-Regular.eot 34KB
KaTeX_SansSerif-Bold.eot 33KB
KaTeX_SansSerif-Italic.eot 31KB
KaTeX_SansSerif-Regular.eot 30KB
KaTeX_Script-Regular.eot 25KB
KaTeX_Caligraphic-Bold.eot 19KB
KaTeX_Caligraphic-Regular.eot 19KB
KaTeX_Size1-Regular.eot 13KB
KaTeX_Size2-Regular.eot 12KB
KaTeX_Size4-Regular.eot 11KB
KaTeX_Size3-Regular.eot 8KB
index.html 1KB
glouppe.jpg 337KB
tm.jpg 114KB
uliege-logo-gris-300.jpg 113KB
turing.jpg 24KB
awehenkel.jpg 18KB
remark-latest.min.js 650KB
katex.min.js 175KB
auto-render.min.js 10KB
LICENSE 1KB
LICENSE 1KB
LICENSE 1KB
talk.md 11KB
README.md 1KB
README.md 4KB
FontAwesome.otf 132KB
UMNN_Benelearn_2019.pdf 10.6MB
UMNN-PRAIRIE.pdf 2.42MB
UMNN-poster2.pdf 2.12MB
UMNN_Archi.pdf 83KB
UMNN_backward.pdf 41KB
UMNN_forward.pdf 34KB
net.pdf 32KB
rightarrow.pdf 26KB
8gaussians.pdf 23KB
noise.pdf 23KB
fx.pdf 10KB
dfx.pdf 10KB
fx_cloud.pdf 9KB
glouppe2.png 2.1MB
glouppe3.png 1.8MB
rightarrow.png 1.65MB
all_flow.png 948KB
all_flow.png 857KB
flow2.png 622KB
dfx.png 523KB
fx.png 484KB
fx_cloud.png 465KB
UMNN_Archi.png 414KB
net.png 307KB
density_estimation.png 249KB
density_2.png 210KB
density_1.png 209KB
density_3.png 209KB
Capture d’écran 2019-10-16 à 17.21.34.png 209KB
UMNN_backward.png 205KB
UMNN_forward.png 193KB
ulg.png 168KB
archi.png 122KB
8gaussians.png 100KB
jacobian_image.png 86KB
flow_3700.png 64KB
noise.png 60KB
awehenkel2.png 59KB
dif_temps.png 52KB
uncond_dif_temp_mnist.png 43KB
samples.png 38KB
right_arrow.png 36KB
Monotonicity.png 29KB
GMM.png 25KB
MNIST.png 20KB
MNIST_3_075.png 20KB
OutOfMemory.png 10KB
cubes.png 9KB
logo_ulg.png 8KB
fnrs.png 4KB
VAE.py 26KB
CNFVAE.py 14KB
TrainVaeFlow.py 13KB
MNISTExperiment.py 13KB
flows.py 11KB
loss.py 10KB
UCIExperiments.py 10KB
made.py 10KB
download_datasets.py 9KB
UMNNMAF.py 9KB
共 197 条
- 1
- 2
资源评论
雪地女王
- 粉丝: 96
- 资源: 4601
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功