An example of a shoaling defense is flash expansion: a ball of fish "explodes" in all directions, confusing a predator.
Sometimes a few individuals break away from a school to engage in predator inspection, and return to the school to share information about the predator.