Antarctic krill form the biggest biomass swarms on Earth. “You can even see them from space,” says Alicia Burns, a behavioral biologist at Taronga Conservation Society Australia. Krill swarms play a vital role in the food chain and in cycling atmospheric carbon into the depths of the Southern Ocean. How these tiny, shrimplike creatures form and maintain massive clusters is poorly understood. But Burns and her colleagues describe in the Proceedings of the Royal Society B that unique and mathematically predictable social rules govern the seemingly chaotic crustacean crowds.

To observe swarming behavior, the researchers teamed up with the Australian Antarctic Division’s aquarium in Tasmania—one of only two facilities worldwide capable of raising krill. There the researchers filmed krill from different angles to track individuals in 3-D and then statistically determined the patterns of each animal’s movements in relation to its neighbors. “Matching the mathematics with the biology is the new part,” Burns says.

Geraint Tarling, a biological oceanographer at the British Antarctic Survey, who was not involved in the study, agrees: “This is the first leap that we’ve had from a theoretical expectation—what we expect [krill] to do—to an absolute observed identification of what the behavioral rule is.”

Swarming can help animals evade predators, find mates and food, and travel more efficiently. The new study revealed that in forming these clusters, the krill (like many swarming species) adjusted their speed based on that of their neighbors in front—similar to a driver in traffic. But unlike other species, krill most often changed direction based on neighbors in the vertical plane, swimming toward peers ahead and below but away from those ahead and above. Ryan Lukeman, a St. Francis Xavier University mathematician who studies swarming but was not involved in the study, says this is fundamentally different from what has been seen in fish and birds: for them, “there tends to be little information transfer vertically.”

The researchers are still picking apart why this might be. Krill eyes point upward, and the animals’ undersides flash with bioluminescence when startled, Tarling says; these characteristics may help explain their vertical focus while swarming. Many of their predators attack vertically, and krill might be watching one another for signs of incoming danger. They might also be avoiding vortices produced by neighbors’ paddling, which—unlike a fish’s swim method—pushes water downward and behind.

Burns says the next goal is confirming that the newly found swarming rules apply in the wild, using a “krill cam” slung from a buoy. Lukeman says scientists could one day use the rules to simulate how changing ocean temperatures and currents might affect these crucial crustaceans’ ability to stick together.