From schools of fish darting away from sharks to flocks of starlings swirling through the sky, the animal kingdom is full of examples of how group behavior offers a survival advantage. Through collective behaviors, animals can more effectively spot approaching predators and coordinate their escape, increasing their odds of survival and making foraging more efficient. Although we can observe such group dynamics everywhere, the genetic and neural mechanisms underlying collective behaviors remain largely unknown.