Large-scale shifts in habitat during evolution require populations to respond to new selective pressures, often resulting in a cascade of novel morphologies. For example, the initial land invasion by marine tetrapods required significant changes in physiology, morphology, and life history, which led to the origin of amniotic eggs, modified limbs, scales to reduce water loss, and modified lungs (e.g. ). Distantly related lineages that transition to similar habitats are under the same kinds of selective pressures, often resulting in convergent structures. Canonical examples include spines in plants inhabiting arid environments and flight morphologies in insects, birds, and bats. Convergence remains largely understudied in many marine invertebrates, where continued habitat shifts and diversification have led to a number of diverse lineages that possess multiple potentially convergent characters.
Potentially adaptive morphological features shared between distantly related organisms inhabiting similar environments provide an opportunity to test for correlation between morphology and habitat to provide new hypotheses about the factors influencing evolution and diversification. For example, stickleback fish have long been studied for their numerous instances of convergent characters such as body shape, pelvis morphology, skeletal armor, and mating preferences, associated with transitions from marine to freshwater benthic and limnetic habitats (e.g. [2–5]). In sticklebacks, recent work by Jones et al.  identified a core set of genome-wide loci that are associated with the transition from marine to freshwater habitats, shedding light on the underlying genes that are responding to and driving adaptive evolution. In other marine taxa, numerous cases of convergent evolution have been found, including: very similar antifreeze glycoproteins that occur in phylogenetically distinct Arctic and Antarctic fishes , the presence of marine bioluminescence in almost all marine invertebrate phyla (e.g. [8–10]), and the thunniform body shape seen in whales, ichthyosaurs, and several species of large pelagic fishes . However, in cephalopods, studies that examine the potential for correlation between habitat and morphology have been largely limited to physiology. Childress  argued that many of the observed relationships between metabolism and depth in oceanic squids were the result of adaptation rather than phylogenetic history, because similar metabolic rates consistently coincide with depth, even across distantly related taxa. Seibel and Carlini  tested this hypothesis in a phylogenetic context using a molecular-based phylogeny, and found that correlation between changes in metabolism and depth existed in the pelagic squids.
The marine environment can be broadly divided into two macrohabitats, each promoting a suite of adaptations in the inhabitants. The largely two-dimensional demersal habitats include both the benthic and benthopelagic habitat, where organisms live on or just above the bottom, respectively. Demersal habitats are dominated by animals with defensive techniques that do not require extended periods of rapid movement, such as releasing ink and then jetting away, burrowing in sediment or emitting toxic substances. Many demersal fishes and cephalopods commonly utilize cryptic behaviors that involve changing body coloration, texture, and/or shape to avoid predation (e.g. [14, 15]). In contrast, the three-dimensional pelagic environment is dominated by animals that are capable of rapid movement, that often have body plans capable of responding to stimuli from several directions, and that use cryptic techniques such as transparency, reflection, and ventral bioluminescence (e.g. [14, 16]) to allow for improved predation, communication, and predator avoidance. Transitions between demersal and pelagic habitats during evolution should promote shifts in suites of morphological features, a hypothesis that can be examined with phylogenetic comparative analyses on lineages living in both habitats.
Modern cephalopods occupy nearly every habitat of the marine environment from the rocky intertidal to the deep sea, making them an excellent group in which to test for convergent evolution. The two most speciose lineages, Decapodiformes (pelagic squids, bobtail squids, and cuttlefishes) and Octopodiformes (octopuses and Vampyroteuthis infernalis) are each comprised of demersal and pelagic taxa. Although the two cephalopod lineages are morphologically very distinct, some features seem to appear consistently in species inhabiting similar environments. Demersal taxa generally tend to have a more bulbous body, corneas covering the eye, and exhibit some of the most advanced crypsis seen in the marine environment (e.g. [14, 17–19]). Pelagic cephalopods often possess photophores for communication and crypsis, fins to help with propulsion, the ability to become almost entirely transparent, and a flexible internal shell for stability. However, there are exceptions to these trends. For example, the squid family Loliginidae, the most common group in the lineage Myopsida (Decapodiformes) is an important fisheries group that lives in coastal waters and lays its eggs in the benthic environment, but feeds in the water column (e.g. ). Loliginids have a streamlined, muscular body morphology and internal shell similar to many pelagic squids, while bearing corneas reminiscent of benthic squids, bacteriogenic photophores (in some species), and accessory reproductive structures found largely in benthic species.
To study the phylogenetic and environmental forces driving character evolution requires a well-sampled phylogeny. In cephalopods, molecular data sets have provided many new phylogenetic hypotheses, but have either had limited taxon sampling (e.g. [13, 21]) or recovered limited resolution for some major extant lineages [22–25]. Here, we assemble previously published data from up to 10 genes for over 400 cephalopod taxa (representing 42 of 47 known families) to create the most comprehensive molecular analysis of cephalopod phylogeny to date, and subsequently use the phylogeny to test the hypothesis that habitat shifts drive convergent evolution in cephalopods. We first use the phylogeny to reconstruct ancestral character states for several characters whose evolutionary history remain elusive: the accessory nidamental gland, a specialized structure that provides antimicrobial protection to eggs laid on the ocean floor; the branchial canal, a structure often thought to be a synapomorphy uniting bobtail squids, cuttlefishes, and loliginids; the cornea, which covers the eye in many demersal taxa and whose status as a synapomorphy remains unclear; the presence of the right oviduct, another important potential synapomorphy for major clades; and photophores, which occur in many lineages of Cephalopoda (e.g. [22, 26, 27]). We then are able to test whether any of these characters are correlated with either demersal or pelagic lifestyles, thus providing new information regarding convergent evolution in the marine environment.