Cephalopods such as the octopus and squid have the largest brains of any invertebrates.