- Notifications
You must be signed in to change notification settings - Fork0
Dynamic Boltzmann Machine for Lattice Chemical Kinetics
License
physics-based-ml/DynamicBoltzmann
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Dependencies are automatically handled using theCPM.cmake package manager.There is no need to install anything extra, simply building the library through CMake will install the needed dependencies.
For the record, the dependencies installed are:
Usecmake:
mkdir buildcd buildcmake ..makeTwo libraries will be made:dblz (for learning dynamics) andbmla (for learning initial conditions).
make installThe default install locations are/usr/local/include and/usr/local/lib.
If not installing, make sure to move the library to somewhere it will be found, or at worst
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/absolute/path/to/libIn this case, you will also need to specify using-L the location of the library at linking time (-L is needed for finding the library at linking time;DYLD_LIBRARY_PATH is at runtime).
To access the headers, simply use:include <dblz> or `include .
Link your program using:
g++ -std=c++14 -O3 -ldblz -lq3c1 myprogram.cpp -o myprogram.og++ -std=c++14 -O3 -lbmla myprogram.cpp -o myprogram.o(this assumes you have install-lq3c1).
The namespace isdblz ("DynamicBoltzmann").
More documentation TBD!
Simulations can be generated using thelattgillespie library locatedhere.
To create the directory structure, use the included Python scriptcreate_data_dirs.py.
This takes 1 argument: the path of the directory (relative to local directory where you runcreate_data_dirs.py) that you want to create and create the substructure in.
For example, running:
python create_data_dirs.py datacreates in the working directory the following directories:
datadata/momentsdata/ixn_paramsdata/diff_eq_rhsThe guidelines for RBMs in Geoffrey Hintons guide "A Practical Guide to Training Restricted Boltzmann Machines" state:
"When the hidden units are being driven by data, always use stochastic binary states. When they are being driven by reconstructions, always use probabilities without sampling."
"Assuming the visible units use the logistic function, use real-valued probabilities for both the data and the reconstructions."
"When collecting the pairwise statistics for learning weights or the individual statistics for learning biases, use the probabilities, not the binary states, and make sure the weights have random initial values to break symmetry."
These rules lead to problems here - particularly the first rule:"When they are being driven by reconstructions, always use probabilities without sampling." Consider the following:
- The stochastic simulations are binary by nature.
- Assume we activate the hidden layer from these by also using binary units. Hence, when evaluating theawake phase moment
<v * h>between visible and hidden units will have many terms of the form0*1or1*0or0*0, leading to many null contributions tosum_i <v_i * h_i>. - Now we switch do using probabilistic units for doing the sampling for theasleep phase moment. In this case, in the contributions from before, we replace
0bysome small #. The upshot is that where contributions were null before, here they aregreater than zero.
Therefore, theasleep moment will always be larger than the awake phase moment. This drives the weightsW to-infinity!
Instead, we simply usebinary units everywhere, i.e.:
- The stochastic simulations are binary by nature.
- Use binary units for the hidden units for the first round of sampling (driven by data). We then compute the awake phase moment.
- Use binary units for other rounds of sampling both hidden and visible units, and to evaluate the asleep phase moments.
This avoids theinfinity problem.
About
Dynamic Boltzmann Machine for Lattice Chemical Kinetics
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Languages
- C++93.4%
- CMake6.5%
- Python0.1%