The nervous system of molluscs varies in complexity. Gastropods and bivalves do not have a single brain but, rather, several sets of ganglia, or ''local brains'', clusters of nerve cells located in different parts of the body.
Cephalopods have the most complex nervous system not just of molluscs but of all invertebrates. Some of the separate local brains of other molluscs are fused into a single, large brain that coordinates and stores information received from the environment. Different functions and behaviors of cephalopods are controlled by particular regions of the brain, as in humans. Giant nerve fibers rapidly conduct impulses, allowing cephalopods to capture prey or escape at amazing speeds. The stringly complex eyes of cephalopods reflect the development of their nervous system. Octopuses and cuttlefishes have a remarkable capacity for learning. Most cephalopods, especially cuttlefishes, display color changes correlated with particular behaviors and moods, from intricate sexual displays to camouflage. Some cuttlefishes flash two large, black spots resembling eyes, perhaps to fool potential predators. Some octopuses even change color and behavior to mimic, or imitate, poisonous fishes and sea snakes!