Social caterpillars
The collective behaviors of social caterpillars falls into five general categories: collective and cooperative foraging, group defense against predators and parasitoids, shelter building, thermoregulation and substrate silking to enhance steadfastness. The most behaviorally sophisticated of the insect societies are found among the ants, termites, bees, and wasps. While these insects are technically classified as eusocial insects they are commonly referred to simply as the social insects. In this scheme of classification, other non-eusocial, gregarious species of insects are referred to as presocial, subsocial, quasisocial, or in some other manner that has the unfortunate consequence of suggesting that are not quite social. Yet a significant number of  insect species that do not possess the defining criteria of eusociality are by any other standard of classification clearly social and it is in this sense of the term, that employed by zoologists in general, that larval aggregates of moths, butterflies and sawflies are considered social insects.
The collective behaviors of social caterpillars falls into five general categories: collective and cooperative foraging, group defense against predators and parasitoids, shelter building, thermoregulation and substrate silking to enhance steadfastness.
The most behaviorally sophisticated of the insect societies are found among the ants, termites, bees, and wasps. While these insects are technically classified as eusocial insects they are commonly referred to simply as the social insects. In this scheme of classification, other non-eusocial, gregarious species of insects are referred to as presocial, subsocial, quasisocial, or in some other manner that has the unfortunate consequence of suggesting that are not quite social. Yet a significant number of  insect species that do not possess the defining criteria of eusociality are by any other standard of classification clearly social and it is in this sense of the term, that employed by zoologists in general, that larval aggregates of moths, butterflies and sawflies are considered social insects.
The sibling societies of caterpillars exhibit collective behaviors that vary from simple interactions to more complex forms of cooperation.

Collective and cooperative foraging
Social caterpillars exhibit three basic foraging patterns. Patch-restricted foragers obtain all of the food required during the social phase of their larval development from the leaves found in a single contiguous patch or from several such closely spaced patches. The foraging arena is typically well defined by a protective silk envelope or by leaves bound together. On large trees, patches usually consist of the leaves found on a part of a branch, an entire branch, or on several closely situated branches. But on small trees and herbaceous plants the entire host may eventually be enveloped. Although there have been no surveys to determine the proportion of social caterpillars that exhibit each of these foraging patterns, patch-restricted foraging is probably the most common and also the least complex. Well known examples of patch restricted foragers include the Euonymus caterpillar, Yponomeuta cagnagella and the ugly nest caterpillar, Archips cerasivoranus. The fall webworm Hyphantria cunea, is a patch restricted forager during the initial stages of its development.
Nomadic foragers establish only temporary resting sites and make frequent moves from one patch to another. The forest tent caterpillar, Malacosoma disstria and the spiny elm caterpillar, Nymphalis antiopa are nomadic foragers.
Central-place foragers construct a permanent or semi-permanent shelter from which they launch intermittent forays to distant sites in search of food. Between bouts of feeding the caterpillars rest at the shelter. The best known of the social caterpillars that are central place foragers include the tent caterpillars other than M. disstria, and the processionary caterpillars of Europe (Thaumetopoea) and Australia (Ochrogaster), and the Madrone caterpillars of Mexico.The most sophisticated form of cooperative foraging exhibited by caterpillars is recruitment communication in which caterpillars recruit siblings to their trails and to their food-finds by marking pathways with pheromones much in the manner of ants and termites. The most sophisticated examples of recruitment communication have been described from the tent caterpillars (Malacosoma). Eastern tent caterpillars (M. americanum), for example, utilize a trail-based system of elective recruitment communication that enables the colonies to exploit the most profitable feeding sites.

Group defense against predators and parasitoids
Aggregation allows caterpillars to collectively defend themselves against the attacks of predators and parasitoids. Such defense may be passive or active. Passive modes of collective defense involve dilution effects since the mathematical probability that any one individual will be randomly singled out by a predator decreases with group size. Individuals also gain protection from predators by surrounding themselves with others.
Shelters collectively built by caterpillars play an important role in antipredator defense. The tough silk shell of the nest formed by a colony of E. socialis caterpillars is virtually impregnable to both birds and invertebrate predators. Like many other shelter builders, the resident caterpillars venture from the nest only under the cover of darkness when birds and predatory wasps are inactive. Bound-leaf shelters, and the more loosely spun shelters of the tent caterpillars and the fall webworm, Hyphantria cunea, cannot exclude predators completely but all are likely to be deterred to some degree, providing the residents with greater protection than they would enjoy resting in the open.
It is generally thought that aposematic coloration is most effective in deterring predators when insects group together. Indeed, the most common mode of active defense among social caterpillars is aposematic display, often combined with synchronous body rearing, flicking, and “en masse” regurgitation of toxic or unpalatable chemicals. Studies indicate that the spread of alarm through colonies of social caterpillars is mediated largely by tactile and, possibly, visual cues. Caterpillars can detect the airborne sounds generated by the beating wings of flying wasps and flies and respond with rapidly jerking movements. Vibrational signals set up by the agitated caterpillars and propagated by the communal web would appear the most likely means of alerting the colony to danger.

Shelter building
The preeminent silk-spinners are the lepidopterous caterpillars. Caterpillars spin silk prolifically and in comparison to other non-eusocial insects build large and relatively complex structures from the material. Moreover, they are the only insects outside of the Hymenoptera and Isoptera to exhibit true collective building behavior involving colony-wide synchronization of activity and periodic shelter expansion. Some social caterpillars such as Brassolis isthmia and Archips cervasivoranus employ silk to draw the leaves of their host plants into tightly bound shelters in which they rest between foraging bouts. But the most impressive structures collectively built by caterpillars, such as the remarkable bolsa of the social pierid Eucheira socialis and the tents of the lasiocampid caterpillars, are made exclusively of silk. The communal shelters of caterpillars are multifunctional, serving to facilitate basking and thermoregulation, molting, and antipredator defense. They may also serve as communication centers where hungry caterpillars are recruited to food finds. Little is known of the behavioral mechanisms that give rise to the architecturally distinct, collectively built shelters of caterpillars.
Unlike the complex, free-form structures of the eusocial insects, the ultimate shape that the nests of caterpillars take is determined to no small extent by exogenous factors. While colonies may actively select sites prior to the construction of a shelter, or abandon a site that proves inadequate after the shelter-building process has begun, all collectively built caterpillar shelters are formed either by pulling together plant parts or by spinning silk about a framework of branches and leaves. Studies suggest that subtle differences in the intrinsic properties of the silks of caterpillars, or the way they are spun, may be more important than overt differences in larval motor patterns in accounting for interspecific differences in the form of the web-nest.

Thermoregulation
Many social caterpillars are heliotherms, that is, they elevate their temperature by basking in the sun. Such basking behavior is markedly enhanced by the presence of siblings. Caterpillars that feed at times of the year when air temperatures are low are particularly likely to benefit from aggregative basking. The spring feeding larvae of the nymphalid butterfly Euphydryas aurinia, a non-shelter building species, bask “en masse” in the open, packing their bodies tightly together to minimize convective heat loss. Under high levels of solar radiation on cold days, gregariousness and the darkness of their cuticle enables the larvae to gain temperature excesses (Tbody − Tambient) as great as 30 °C. The construction of shelters that trap the heat of the sun enables social species to gain even more control over their body temperature. The extensive shelters of the tent caterpillars (Malacosoma) provide a surface large enough to enable the colony to bask “en masse” and the caterpillars oriented their nests to take full advantage of the sun.
The silk walls of the structures are dense enough to serve as barriers to convective heat loss, allowing them to function as miniature glasshouses. When the tents of M. americanum are shielded from the sun the caterpillars are unable to raise their body temperature above the cool ambient temperatures that prevail in the spring and they fail to grow. When tents are exposed to sunlight, their layered structure creates a  thermally heterogeneous microhabitat within which the caterpillars can thermoregulate by moving from compartment to compartment. In addition, studies show that caterpillars basking side-by-side in groups on the surface of the tent are able to achieve significantly higher body temperatures, due to boundary layer effects and convective shielding, than solitary caterpillars basking in the open on nearby branches. This behavior is demonstrated by the gregarious caterpillars of Eriogaster lanestris, the small eggar moth.
In the absence of a radiant heat source, the body temperature of aggregated social caterpillars may be several degrees Celsius above ambient temperature. This phenomenon was first reported in 1938 in Vanessa caterpillars. Subsequently, other studies showed that the shelter of the pine processionary caterpillar Thaumetopoea pityocampa rose 2 to 3 °C when occupied by the caterpillars and cooled down when they left the structure to feed. Studies of the social caterpillars of E. lanestris showed that the internal temperature of the nest exceed ambient temperature by as much as 6.7 °C, though the average temperature gains of  2 to 3 °C were in line with those reported for other species. These thermal gains reported for these species appear attributable to the trapping of the metabolic heat generated by the caterpillars as they process food.

Substrate silking to facilitate steadfastness
Caterpillars spin copious quantities of silk as they move over the branches of their host plants. The silk of some species contains a pheromone which channels the movement of the colony as they move from place to place. In other species, a trail pheromone is secreted independently of the silk. In either case, a primary function of the silk appears to be that of enhancing steadfastness as the caterpillars move over the smooth surfaces of the host plant

References
Costa, J. T. and N. E. Pierce. 1997. Social evolution in the Lepidoptera: ecological context and communication in larval societies. In J. C. Choe and B. J. Crespi (eds.) The evolution of social behavior in insects and arachnids. Cambridge University Press, Cambridge, 407-422.
Costa, J. T. 1997. Caterpillars as social insects. Amer. Scientist 85: 150-159.
Fitzgerald, T. D. and J. T. Costa. 1999. Collective behavior in social caterpillars. In C. Detrain, J. L. Deneubourg, and J. M. Pasteels (eds.) Information processing in social insects. Birkhauser Verlag, Basel, 379-400.
Fitzgerald, T. D. 1993. Social caterpillars. In N. E. Stamp and T. M. Casey (eds.) Caterpillars: ecological and evolutionary constraints on foraging. Chapman and Hall, New York, 372-403.
Fitzgerald, T. D. 1995. The Tent Caterpillars. Cornell University Press.
Fitzgerald, T. D. and S. C. Peterson. 1988. Cooperative foraging and communication in social caterpillars. Bioscience 38: 20-25.
Ruf, C. and K. Fiedler. 2000. Thermal gains through collective metabolic heat production in social caterpillars of Eriogaster lanestris. Naturwissenschaften 87: 193-196.

External links
http://web.cortland.edu/fitzgerald/index.html