Graph optimization algorithm | Synapse