A recent study looked at a species of caterpillar called Pieris brassicae which when attacked by a predator will regurgitate its last meal, producing a foul smelling compound that often causes the predator to avoid the caterpillar. However, by doing this, the caterpillar loses out on valuable nutrients from the meal and often experiences stunted growth as a result. As a result, the caterpillar only employs this defensive mechanism when it is absolutely necessary because the individual cost to doing so is very high.
For a previously unknown reason, it has been shown that forming groups of these caterpillars for the purpose of protection does not result in a greater chance of survival on an individual basis. To explain this, the study looked at the individual behavior of the caterpillars alone and in groups. What they found was that when in a group, the caterpillar's rate and volume of regurgitation decreased significantly as opposed to in an isolated environment. This shows that the caterpillar is able to modulate its response based on if there are other individuals who are capable of performing the same act. This also shows that each individual reduces their contribution towards group protection, which in this case is enough to cancel out the supposed benefit that group formation gives for fitness.
The full article can be read at http://onlinelibrary.wiley.com/doi/10.1111/j.1461-0248.2012.01770.x/full
-Eric Baeuerle