
Cephalization is an evolutionary trend in animals that, over a sufficient number of generations, concentrates the special sense organs and nerve ganglia towards the front of the body where the mouth is located, often producing an enlarged head. This is associated with the animal's movement direction and bilateral symmetry. Cephalization of the nervous system has led to the formation of a brain with varying degrees of functional centralization in three phyla of bilaterian animals, namely the arthropods, cephalopod molluscs, and vertebrates. Hox genes organise aspects of cephalization in the bilaterians.
Bilateria

Cephalization is both a characteristic feature of any animal that habitually moves in one direction, thereby gaining a front end, and an evolutionary trend which created the head of these animals. In practice, this primarily means the bilaterians, a large group containing the majority of animal phyla. These have the ability to move, using muscles, and a body plan with a front end that encounters stimuli first as the animal moves forwards, and accordingly has evolved to contain many of the body's sense organs, able to detect light, chemicals, and gravity. There is often a collection of nerve cells able to process the information from these sense organs, forming a brain in several phyla and one or more ganglia (clusters of nerve cells) in others.
Complex active bodies
The philosopher Michael Trestman noted that three bilaterian phyla, namely the arthropods, the molluscs in the shape of the cephalopods, and the chordates, were distinctive in having "complex active bodies", something that the acoels and flatworms did not have. Any such animal, whether predator or prey, has to be aware of its environment—to catch its prey, or to evade its predators. These groups are exactly those that are most highly cephalized. These groups, however, are not closely related: in fact, they represent widely separated branches of the Bilateria, as shown on the phylogenetic tree; their lineages split hundreds of millions of years ago. Other (less cephalized) phyla are omitted for clarity.
Arthropods
In arthropods, cephalization progressed with the gradual incorporation of trunk segments into the head region. This was advantageous because it allowed for the evolution of more effective mouth-parts for capturing and processing food. Insects are strongly cephalized, their brain made of three fused ganglia attached to the ventral nerve cord, which in turn has a pair of ganglia in each segment of the thorax and abdomen, the parts of the trunk behind the head. The insect head is an elaborate structure made of several segments fused rigidly together, and equipped with both simple and compound eyes, and multiple appendages including sensory antennae and complex mouthparts (maxillae and mandibles).

Cephalopods
Cephalopods including the octopus, squid, cuttlefish and nautilus are the most intelligent of molluscs. They are highly cephalized, with well-developed senses, including advanced 'camera' eyes and large brains.
Vertebrates
Cephalization in vertebrates, the group that includes mammals, birds, reptiles, amphibians and fishes, has been studied extensively. The heads of vertebrates are complex structures, with distinct sense organs for sight, olfaction, and hearing, and a large, multi-lobed brain protected by a skull of bone or cartilage. Cephalochordates like the lancelet (Amphioxus), a small fishlike animal with very little cephalization, are closely related to vertebrates but do not have these structures. In the 1980s, the new head hypothesis proposed that the vertebrate head is an evolutionary novelty resulting from the emergence of neural crest and cranial placodes (thickened areas of the embryonic ectoderm layer), which result in the formation of all sense organs outside the brain. However, in 2014, a transient larva tissue of the lancelet was found to be virtually indistinguishable from the neural crest-derived cartilage (which becomes bone in jawed animals) which forms the vertebrate skull, suggesting that persistence of this tissue and expansion into the entire head space could be a viable evolutionary route to forming the vertebrate head. Advanced vertebrates have increasingly elaborate brains.

Anterior Hox genes
Bilaterians have many more Hox genes controlling the development, including of the front of the body than do the less cephalized Cnidaria (two Hox clusters) and the Acoelomorpha (three Hox clusters). In the vertebrates, duplication resulted in the four Hox clusters (HoxA to HoxD) of mammals and birds, while another duplication gave teleost fishes eight Hox clusters. Some of these genes, those responsible for the front (anterior) of the body, helped to create the heads of both arthropods and vertebrates. However, the Hox1-5 genes were already present in ancestral arthropods and vertebrates that did not have complex head structures. The Hox genes therefore most likely assisted in cephalization of these two bilaterian groups independently by convergent evolution, resulting in similar gene networks.
Partly cephalized phyla

The Acoela are basal bilaterians, part of the Xenacoelomorpha. They are small and simple animals with flat bodies. They have slightly more nerve cells at the head end than elsewhere, not forming a distinct and compact brain. This represents an early stage in cephalization.
Also among the bilaterians, Platyhelminthes (flatworms) have a more complex nervous system than the Acoela, and are lightly cephalized, for instance having an eyespot above the brain, near the front end.
Among animals without bilateral symmetry, the Cnidaria, such as the radially symmetrical (roughly cylindrical) Hydrozoa, show some degree of cephalization. The Anthomedusae have a head end with their mouth, photoreceptor cells, and a concentration of nerve cells.