A growing body of research suggests human behavior on social media is strikingly similar to collective behavior in nature.