Quadratic models for understanding neural network dynamics