Skip to content

lanl-ansi/NeurISE

Repository files navigation

NeurISE - Code for reproducibility

Graphical model learning with neural nets [1] [https://arxiv.org/abs/2006.11937]

We will demonstrate how to generate data for a binary model and then learn it using NeurISE.

Data generation

Samples are generated using Julia and written to disk.

General graphical models can be created using the FactorGraph data structure and it can be sampled from using raw_sampler_Potts.

Run the data_gen.jl script to generate samples for the binary model considered in the paper. The data is written to samples.csv

Learning with NeurISE

Learning is done using Tensorflow. This is best done on a GPU. Testing was done on a GTX 1050.

Run learn.py to do NeurISE on the saved samples. This script will learn, sample and calulate the error in TV and display it.

The hyperparamters of NeurISE model can be changed in this scipt.

Stucture Learning

The code demonstrating structure learning is inside the Strucutre Learning folder. Fit_model.ipynb is a jupyter notebook learning the fifth order model discussed in the supplementary material. Running this requires the NetworkX python library [2]. The data for learning can be generated by running the data_gen.jl script in the folder.

References

[1] Abhijith, J., Lokhov, A., Misra, S., and Vuffray, M., Learning of Discrete Graphical Models with Neural Networks, NeurIPS 2020.

[2] Hagberg, Aric, Pieter Swart, and Daniel S Chult. Exploring network structure, dynamics, and function using NetworkX. No. LA-UR-08-05495; LA-UR-08-5495. Los Alamos National Lab.(LANL), Los Alamos, NM (United States), 2008.

License

This code is provided under a BSD license as part of the Optimization, Inference and Learning for Advanced Networks project, C18014.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published