Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Learning to Predict Synchronization (L2PSync)

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.



** **


(Figure of firefly cellular automata (FCA) on 31^3 lattice for 8 colors iterating until synchronization with tree searching algorithm applied.)

Included Folders



  • - contains model implementation used for LRCN.
  • - contains training script applying GraphLRCN model
  • - contains example hyperparameter sweep script for GraphLRCN training and testing


  • - neural network model and training script for small 15/30 node graphs
  • - neural network model and training script for majority vote subgraph classifier on 300:600 node graphs


  • - gradient boosting model and training script
  • - random forest model and training script



  • - FCA simulation code and additional functions for generating animations
  • - Base Greenberg-Hastings simulation code
  • - Base Kuramoto simulation code
  • - code for generating data files and CSVs for graphs.g6 file type and coloring simulation features (detailed instructions below)


  • - Script for creating omega matrices for Graph LRCN on Kuramoto data (.npy)
  • - Script for creating omega matrices for Graph LRCN on FCA data (.npy)
  • - Script for creating omega matrices for Graph LRCN on Greenberg-Hastings data (.npy)


  • - Script for generating graphs and corresponding initial dynamics for 300:600 node graphs for {FCA,GH,KM}
  • - Modified copy of NNetwork library (Github users: jvendrow and hanbaeklyu)
  • - Script for generating random induced-subgraphs-induced-dynamics data

Instructions for Generating Graph and Initial-Dynamics Pairs

  1. Lines 20-24: insert sync/nonsync limits. AMOUNT_ITS is the number of dynamics iterations to be recorded. ACCESS_KEY and SECRET_KEY are the AWS keys used, and are optional for recording actual data to machine.
  2. 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.
  3. Line 154: set overshoot to desired number of graphs to test simulations on
  4. Line 155 (loop): defined pnorm parameters and edgesetN for number of NWS functions calls (this can be modified at user discretion)
  5. Line 178: define colperg as number of initial colorings to simulate per graph.
  6. 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}.
  7. User must decide whether to write to AWS S3 bucket or write to local; the latter option requires user to generate her own script.

For further inquiries email:

Hardeep Bassi ( and Richard Yim (