|A dense group of fall webworms (Hyphantria cunea) inside a silk nest.|
In order to construct and extend the sheets of silk, some of the caterpillars spend time exposed on the outside of the nest. There, they take advantage of their numbers to defend themselves in another way -- by making a coordinated, threatening display.
The synchronized action of the caterpillars is thought to discourage predators and parasites. Though the twitching sometimes appears to begin spontaneously, it can also be triggered when something approaches the caterpillars. For example, in the video above, the last bout of twitching appears to be in response to the arrival of a small fly or wasp on the other side of the nest (~1:44).