This is the repository for the paper "Learning to Predict Synchronization of Coupled Oscillators on Heterogeneous Graphs" by Hardeep Bassi, Richard Yim, Joshua Vendrow, Rohith Koduluka, Cherlin Zhu and Hanbaek Lyu.
** https://arxiv.org/abs/2012.14048 **
(Figure of firefly cellular automata (FCA) on 31^3 lattice for 8 colors iterating until synchronization with tree searching algorithm applied.)(graph-lrcn)
GraphLRCN.py
- contains model implementation used for LRCN.GraphLRCN_train.py
- contains training script applyingGraphLRCN
modelsweep.py
- contains example hyperparameter sweep script forGraphLRCN
training and testing
(neural-network)
ffnn_15_30_node.py
- neural network model and training script for small 15/30 node graphsffnn_300_600_node.py
- neural network model and training script for majority vote subgraph classifier on 300:600 node graphs
(random-forest)
gradientboost.py
- gradient boosting model and training scriptrandom_forest.py
- random forest model and training script
(main)
firefly.py
- FCA simulation code and additional functions for generating animationsgreenberghastings.py
- Base Greenberg-Hastings simulation codekuramoto.py
- Base Kuramoto simulation codegenerate_graph_dynamics_pair.py
- code for generating data files and CSVs for graphs.g6 file type and coloring simulation features (detailed instructions below)
(LRCN-datagen)
DeltaKM.py
- Script for creating omega matrices for Graph LRCN on Kuramoto data (.npy)DeltaFCA.py
- Script for creating omega matrices for Graph LRCN on FCA data (.npy)DeltaGH.py
- Script for creating omega matrices for Graph LRCN on Greenberg-Hastings data (.npy)
(subgraphs-datagen)
large_graph_generator.py
- Script for generating graphs and corresponding initial dynamics for 300:600 node graphs for {FCA,GH,KM}NNetworkcop.py
- Modified copy of NNetwork library (Github users: jvendrow and hanbaeklyu)random_subgraph_generator.py
- Script for generating random induced-subgraphs-induced-dynamics data
- Lines 20-24: insert sync/nonsync limits.
AMOUNT_ITS
is the number of dynamics iterations to be recorded.ACCESS_KEY
andSECRET_KEY
are the AWS keys used, and are optional for recording actual data to machine. - Lines 120-130: insert information related to node count, k for kappa coloring when using discrete models, as well as number of iterations as upper bound of number iterations to be run.
- Line 154: set
overshoot
to desired number of graphs to test simulations on - Line 155 (loop): defined
pnorm
parameters andedgesetN
for number of NWS functions calls (this can be modified at user discretion) - Line 178: define
colperg
as number of initial colorings to simulate per graph. - Line 181 and 186: define whether the model is continuous or not to generate
initial states of graphs; then define
mod
corresponding simulation to use depending on your model, {FCA,GH,KM}. - User must decide whether to write to AWS S3 bucket or write to local; the latter option requires user to generate her own script.
Hardeep Bassi (hbassi21@gmail.com) and Richard Yim (richyim555@g.ucla.edu)