The generalized distributive law | Synapse