MagNet: Discovering multi-agent interaction dynamics using neural network