Minimax and Hamiltonian Dynamics of Excitatory-Inhibitory Networks