How phenotypic matching based on neutral mating cues enables speciation in locally adapted populations

Abstract Maynard Smith's (American Naturalist, 1966, 100, 637) suggestion that in some cases a prerequisite for speciation is the existence of local ecological adaptations has not received much attention to date. Here, we test the hypothesis using a model like that of Maynard Smith but differing in the way animals disperse between niches. In previous studies, males disperse randomly between niches but females stay put in their natal niche. As a first step toward generalizing the model, we here analyze the case that equal proportions of the two sexes disperse between niches before breeding. Supporting Maynard Smith's (1966) hypothesis, we find that once local adaptations are established, a neutral mating cue at an independent locus can rapidly enable speciation in populations with a suitable mechanism for phenotype matching. We find that stable ecological polymorphisms are relatively insensitive to the strength of selection, but depend crucially on the extent of dispersal between niches, with a threshold of ~5% if population sizes in two niches are equal. At higher levels of dispersal, ecological differentiation is lost. These results contrast with those of earlier studies and shed light on why parapatric speciation is limited by the extent of gene flow. Our testable model provides a candidate explanation for the rapid speciation rates, diversity of appearance and occurrence of “species flocks” observed among some African cichlids and neotropical birds and may also have implications for the occurrence of punctuational change on phylogenies.

here quantitative conditions for speciation, in the presence of gene flow between ecological niches, that is consistent with established mechanisms of mate choice. Two such mechanisms are sexual imprinting and phenotype matching achieved through self-referential pleiotropy we term Matchmaker.
Sexual imprinting is a process by which young animals learn, generally from their parents, cues such as plumage patterns they later use to recognize potential mates. Although known in some insects, amphibians, fish, and mammals, sexual imprinting has been most studied in birds where it is thought to occur in 33 families and over half the avian orders (ten Cate & Vos, 1999). Outstanding questions in imprinting research discussed here are as follows: Why would imprinting be a widespread mechanism in mate choice (ten Cate & Vos, 1999)?
The other mechanism we consider, which we call Matchmaker, produces phenotype matching so that individuals with a novel cue (e.g., plumage coloration) prefer to mate with others with the same cue. Matchmaker involves a hypothetical self-referent phenotypematching gene that affects both the expression of a cue and its recognition, in such a way that the matching system is unchanged when new mutations encode new cue patterns (Edwards & Sibly, 2017). Matchmaker is a particular candidate mechanism for mate choice in species lacking parental care, for which imprinting is unlikely. Pleiotropy in mate recognition has been demonstrated using modern genetic tools (McNiven & Moehring, 2013;Shaw, Ellison, Oh, & Wiley, 2011). For example, a single gene, desaturase1, plays a significant role in both emission and perception of a mating pheromone in Drosophila melanogaster (Bousquet et al., 2012). In Heliconius butterflies, a single gene encodes both female wing pattern (white or yellow spot color) and male preference for that pattern (Naisbit, Jiggins, & Mallet, 2003).
Both sexual imprinting and Matchmaker can produce assortative mating, but despite extensive theoretical effort (reviewed in Butlin et al., 2012;Gavrilets, 2004;Gavrilets, 2014;Kopp et al., 2018;Yeh & Servedio, 2015), more analysis is needed of how these mate-choice mechanisms affect speciation in the presence of local genetic adaptation to differing ecological niches. Servedio, Saether, and Saetre (2009) analyzed the case where after allopatry hybrid matings have reduced fitness, and Yeh and Servedio (2015) analyzed learning of self-referent phenotype matching-a proxy for some types of sexual imprintingand showed that divergence between populations can be maintained if traits are learnt from father, but the only way the cue can spread initially is if the cue is itself under natural selection, that is, is a magic trait.
Magic-trait mate choice is known to produce speciation in the presence of ecological divergence between niches ( van Doorn, Edelaar, & Weissing, 2009;Kopp et al., 2018). Here, we deal with a different case, in which the mating cue is not under natural selection.
Following a suggestion of Maynard Smith (1966), we here analyze the conditions under which assortative mating based on a neutral cue can enable speciation in a population that is already undergoing disruptive ecological selection. We follow Maynard Smith (1966) in analysing the case of two diploid loci and two niches. The two alleles at one locus confer adaptation to one or other of the two niches-we refer to this as ecological adaptation. The two alleles at the other locus control assortative mating in which individuals mate with others of the same phenotype with given probability; otherwise, they mate at random. Our model differs from Maynard Smith in the way animals disperse between niches. Maynard Smith considered the case that males disperse randomly between niches but females stay put in their natal niche and showed the possibility of speciation in a numerical simulation. Subsequent studies generalized the Maynard Smith model for cases of particular relevance to plants in which again the females do not disperse but males do (Caisse & Antonovics, 1978;Dickinson & Antonovics, 1973). Maynard Smith's model has the advantage of analytical tractability, particularly in the haploid version (Gavrilets, 2004(Gavrilets, , 2006, but it lacks generality. 40% of birds, for example, show no sex difference in at least one measure of dispersal, and overall, female birds disperse more than males (Clarke, Saether, & Roskaft, 1997). So there is need for further analysis of the effect of dispersal rules on speciation by phenotypic matching based on neutral mating cues in locally adapted populations.
As a first step to generalizing the Maynard Smith model, we here develop a diploid population genetic model and use it to analyze the case that equal proportions of the two sexes disperse between niches before breeding. Given the differences in assumptions about dispersal rules, it is not surprising we find markedly different quantitative conditions for speciation from those reported by previous workers. We consider priorities for future theoretical work, suggest field testing of predictions of where higher diversity is to be expected, and discuss the implications of our results for rates of speciation, factors promoting diversity, and the selective forces that keep the underlying neurophysiological mechanisms in place.

| ME THODS
Our model has two loci and two alleles at each locus in an environment consisting of two niches with some dispersal between niches prior to mating, as depicted in Figure 1. One locus determines a mating cue, and the other locus determines ecological adaptation to one niche or the other. The two loci are unlinked and assort independently. We first describe the basic model for Matchmaker. In our model, a proportion α of individuals mate as directed by Matchmaker but a small proportion 1 − α in each niche mate at random. We assume a large population so that the dynamics are deterministic.
Generations are discrete. In each generation, each individual that survives to breed produces a number of offspring proportional to the product of its fitness and that of its sole partner, and then dies.
Its fitness is determined by its genotype and the niche in which it breeds.
Under Matchmaker, at the mating cue locus, allele C is dominant and, except for the random maters, its carriers mate only with other individuals carrying the C allele; the alternate allele is D. Except for random maters, DD homozygotes only mate with other DD individuals. At the unlinked ecological adaptation locus, allele Q is dominant. Its carriers obtain a fitness advantage in niche 2 (f 2 > 1), but Q has lower fitness in niche 1 (f 1 = 1/f 2 < 1); the alternate allele is P. PP homozygotes have a fitness set to 1 in both niches.
Our method is to derive recurrence equations that give the frequencies of the nine genotypes in successive generations in each niche. To make it easier to follow, we start with the case of isolated niches and α = 1, and calculate the number of surviving offspring of each of the 9 × 9 = 81 possible genotype crosses in one of the niches.
These are given in Table 1. The first step is to calculate the frequency of each cross, which depends on the frequencies of the two genotypes involved. For example in the top left cell, the frequency of the CCQQ × CCQQ cross is r 2 /A (for definition of A see Table 1). To see this, suppose without loss of generality that females are the choosing sex. CCQQ occurs with frequency r and all CCQQ males get mates.
Females carrying C only mate with males carrying C, so the proportion of the male's mates that are CCQQ is r/A, giving the frequency of the CCQQ × CCQQ cross as r 2 /A. The number of offspring of each cross is proportional to the product of the fitnesses of its parents, so since CCQQ parents have fitness f, there are f 2 offspring from each CCQQ × CCQQ breeding pair. So in total in the next generation, there will be f 2 r 2 /A individuals from the CCQQ × CCQQ cross. This is the term in the top left cell of Table 1.
The frequencies in the next generation are obtained from Table 1. Now allowing a proportion 1 − α of individuals to mate at random, in an isolated niche the frequencies of offspring of each genotype at the end of the next generation, before normalization to relative frequencies, are as follows: Conceptual overview of the model. For clarity, the niches are shown distinct, but in nature may be contiguous or overlap. Population sizes in each niche are constant. m 12 and m 21 specify the proportion of individuals in one niche that disperse to the other each generation after viability selection has occurred. Breeding occurs after dispersal. Number of offspring is determined by the product of the fitnesses of the male and the female partners. Carriers of the Q allele have fitnesses f 1 and f 2 in niches 1 and 2, respectively, and the fitness of PP homozygotes is set at 1 throughout m 12 m 21 Niche 1 P advantageous Niche 2 Q advantageous TA B L E 1 Relative frequencies of the genotypes of the surviving offspring of all possible genotype crosses in an isolated niche for the case α = 1 Note: The first column gives the genotypes and frequencies of fathers, and those of mothers are in the top row. The table is symmetrical. The genotypes are as follows: CCQQ, CCQP, CCPP; CDQQ, CDQP, CDPP; and DDQQ, DDQP, DDPP, and their frequencies are as follows: r, s, t, u, v, w, x, y, and These equations apply to an isolated niche, but need modification if some individuals disperse between niches. We let the fitness of carriers of the dominant Q allele be f 1 and f 2 in niches 1 and 2, respectively, and the fitness of PP is 1 in both niches. Let To model sexual imprinting, we assume individuals imprint on the phenotype of one parent-the father, say. Suppose the original mutation is C in a male in a population of DD homozygotes. His genotype is CD, and we will suppose he mates with a DD with probability (1 − α) and their offspring are CD and DD, all imprinted on the C phenotype.
The DD offspring from this cross are unlikely to mate (the probability is 1 − α) because they prefer a C phenotype mate but C pheno-

| RE SULTS
There are two alleles at the local ecological adaptation locus, P and Q, with P advantageous in niche 1 and Q in niche 2, and some Results of running the model when the proportion of individuals in each niche that disperse to the other each generation is 3% per generation, and α = 1. Only three of the nine genotypes are shown. The P and Q alleles are initially at dynamic equilibrium determined by the balance between local adaptation and dispersal between the two niches as shown in Table 2. The C allele is absent before being introduced into niche 2 at a frequency of 1% CDQQ in generation 1. The fitness of carriers of Q in niche 2, f 2 equals 1.1; their fitness in niche 1, f 1 = 1/f 2 . Population sizes are the same in the two niches

Time in generaƟons
Genotype frequency dispersal between niches as shown in Figure 1. At the independent mating cue locus, there are alleles C and D, with D being fixed prior to the origination by mutation of the dominant C allele. Our model allows for a small proportion (1 − α) of individuals in each niche to mate at random, but we begin by presenting results for Matchmaker for the asymptotic case α = 1.
Before the introduction of the mating cue C allele, the population consists of genotypes DDQQ, DDPQ, and DDPP at equilibrium frequencies given by the balance between selection and dispersal ( Table 2). The P allele predominates in niche 1 and the Q allele in niche 2 as a result of ecological adaptation.
When a C allele is introduced at low frequency (1%) into niche 2 as a CDQQ genotype, it spreads rapidly (Figure 2), and the population speciates into C homozygotes and D homozygotes, with CCQQ predominating in niche 2 (solid green line), and DDPP in niche 1 (dashed red line). Eventually, all other genotypes are lost. C spreads in niche 2 because its carriers do not mate with most of the incomers from niche 1, who are predominately P-carriers, so the population of C-carriers has fewer disadvantageous PP genotypes than the rest of the population in niche 2.
Conversely, the C-allele incomers migrating into niche 1 from niche 2 carry disproportionately fewer PP genotypes which alone are advantageous in niche 1, and they mate only with other C-carrying individuals. The result is that DDPP genotypes are favoured over other genotypes in niche 1 (Figure 2, Figure 3 upper panels). The same mechanisms account for the spread of C alleles in the scenario that CDPP is introduced into niche 1 leading to spread of C alleles in niche 1 and their loss from niche 2 (Figure 3 lower panels). In both scenarios, the C allele gains an advantage over D in the niche into which it is introduced because its carriers mate less with incomers from the other niche, who carry a disproportionate load of deleterious genotypes.
Speciation here consists in replacement of the species described in Table 1, comprising genotypes DDPP, DDPQ, and TA B L E 2 Equilibrium frequencies of genotypes DDQQ, DDPQ, and DDPP before the introduction of the mating cue C allele for the scenario shown in Figure 2, in which m 12 = m 21 = 3%, f 2 = 1. Note: Equilibrium frequencies were calculated using our recurrence equations. PP genotypes have higher fitness than the other genotypes in niche 1 but lower fitness in niche 2; this is ecological adaptation. The asymmetry in genotype frequencies between niches result from Q being dominant to P. Results for a range of fitness effects are shown in Figure 3. CCQQ in niche 2 DDQQ in niche 2 DDPP in niche 2 CCPP in niche 2 CCQQ in niche 1 DDQQ in niche 1 DDPP in niche 1 CCPP in niche 1 DDQQ, by two species, CCQQ and DDPP, that predominate in niches 2 and 1, respectively. It is noteworthy that speciation occurs in our diploid model despite males and females migrating equally between niches, which prevents speciation in haploid models (Gavrilets, 2004(Gavrilets, , 2006. Altering the relative population sizes in the two niches affects how much dispersal can occur before speciation is lost (Figure 4a,b). When the population in niche 1 is 10x larger than the population in niche 2, dispersal can be as high as 18% before speciation is lost. Conversely, if the population in niche 1 is 1/10th that of niche 2, speciation is lost at around 0.3% dispersal. The differences to the case of equal population sizes reflect the average fitnesses of DDPP genotypes and CCQQ genotypes when population sizes are unequal. With niche 1 ten times the size of niche 2, the average fitness (across niches) of P homozygotes exceeds that of Q carriers. This means that at high levels of dispersal P goes to fixation in both niches (Figure 4a), and the C allele cannot confer any advantage. Prior to that point, DDPP genotypes are sufficiently selected against in niche 2 as to allow CCQQ to predominate there. When niche 1 is 1/10th the size of niche 2, Q has higher average fitness and so at high levels of dispersal QQ goes to fixation and once again C cannot confer any mating advantage.  Figure 3b for dispersal rates 1%-3%, but when dispersal rate is 4%, the Q allele goes to fixation and ecological differentiation is lost.

| Imprinting
We introduce the C allele as with Matchmaker. We assume offspring imprint on one of the parents (here, without loss of generality, fathers). We suppose that matings occur with probability α if the prospective mate is of the imprinted phenotype. This model differs from Matchmaker only for the case of DD offspring of CD × CD parents.
These offspring, having imprinted, will seek C-carrying mates, but the C-carriers would not want to mate with them. As a consequence, DD offspring of CD × CD parents only mate if α < 1. DD offspring of DD homozygotes, however, do mate with each other. This scenario yields results numerically nearly identical to those for Matchmaker because as C spreads, CD × CD matings become less and less common.

| D ISCUSS I ON
Our results support Maynard Smith's (1966) suggestion that in some cases a prerequisite for speciation is the existence of local ecological adaptations. If a new mating cue then arises by mutation at an independent locus, given phenotype matching it can spread rapidly, producing reproductive isolation between the niches and allowing adaptive genes to spread further in the niches in which they are F I G U R E 4 Final frequencies of key genotypes plotted against the % individuals in niche 2 that disperse to niche 1 for the case that (a) niche 1 is 10 times the size of niche 2; (b) niche 1 is one tenth the size of niche 2. Numbers moving each way are assumed the same within each panel. Symbols and initial values calculated as in Figure 3. f 2 = 1.2; f 1 = 1/f 2 and α = 1. C allele absent before being introduced into niche 2 at a frequency of 1% CDQQ % Dispersal from niche 2 to niche 1 each generation Genotype frequency  (Figure 3). At higher levels of dispersal, ecological differentiation is lost and it becomes impossible for the mating cue to identify locally adapted prospective mates.
More work is needed to establish, in relation to dispersal rules and cases of incomplete dominance, the conditions for stable ecological polymorphisms to occur. Analytical approaches appear to be intractable, so this may need a numerical approach.
The reason for requiring local ecological adaptation prior to the introduction of a new mating cue is that, without it, new mating cues do not increase in frequency except by genetic drift, and so speciation does not occur. With our dispersal rules, in which equal proportions of the two sexes disperse between niches before breeding, stable ecological polymorphism is only possible if dispersal rates between niches are low. By contrast in the earlier analyses of the Maynard Smith model in which males disperse at random but females stay put in their natal niches, stable ecological polymorphisms and speciation can occur whatever the level of male dispersal (Gavrilets, 2004(Gavrilets, , 2006Maynard Smith, 1966). So dispersal rules crucially affect whether or not speciation occurs.
Our simulations show that under certain conditions mating cues spread even without complete assortative mating. Our model allows a proportion (1 − α) of individuals in each niche to mate not as directed by Matchmaker/Imprinting, but at random. The existence of these heterospecific matings prevents complete speciation but much of the benefit of locally adapted ecological genotypes mating with each other is still obtained if α is close to 1. Occasional heterospecific matings are necessary under Imprinting since otherwise an individual with a new mating cue just arisen by mutation could not find a mate. This suggests that under Imprinting there may be some optimal level of heterospecific mating, sufficient to allow individuals with new cues to find mates, but low enough to achieve near-complete speciation and so realize the benefit of adapted ecological genotypes mating with each other. Our unreported simulations suggest the level of heterospecific matings should be less than 1%, and it would be interesting to discover from field observations its level in nature. It is perhaps relevant that the origination of a new species of Darwin's finch (Lamicchaney et al.,2018) in the Galapagos arose from a cross of two different species, one of which had not been seen before on the study island. After this bird bred with a bird of a resident species, their offspring mated with each other in the F1 generation, and since then, the new and the resident species have not interbred.
Sexual imprinting is widespread in nature, and our results suggest this may be because it allows mating cue alleles to enable ecological specialization. But surprisingly little is known of exactly who imprints on whom. Offspring of one or both sexes can imprint on parental phenotypes, but imprinting on siblings may also be important (Irwin & Price, 1999;ten Cate & Vos, 1999;Verzijden et al., 2012). Our approach potentially offers insight into the types of sexual imprinting that are likely to be found in nature, but further work is needed to modify the current model to compare the possibility and speed of speciation if, for example: (a) Both daughters and sons imprint on their father's phenotype, the case discussed in Results; (b) daughters imprint on their father's phenotype, sons do not imprint; (c) daughters imprint on father and sons on mother; (d) siblings imprint on siblings; and (e) imprinting on more different relatives. Preliminary analysis suggests that assortative mating is most likely if offspring imprint on one parental sex or on siblings, but is unlikely if they imprint on opposite-sex parents or on relatives more distant than siblings. Further, theory development is needed to quantify these likelihoods and to compare our results with those of very different models (Invernizzi & Gilman, 2015;Verzijden, Lachlan, & Servedio, 2005) which suggest that speciation occurs most easily if daughters imprint on their mothers. Experiments have shown that female but not male cichlids in the genera Pundamilia and Mbipia imprint on their mothers' phenotypes (Verzijden & ten Cate, 2007;Verzijden, Korthof, & Cate, 2008;Verzijden, Zwinkels, & Cate, 2009)-as in case (b) above -raising the intriguing possibility that imprinting is part of the explanation of the spectacular speciosity of cichlids in the African rift valley lakes. Mate choice in Darwin's finches too is largely determined by sexual imprinting .
Our results might give insight into the high avian species diversity in, for example, the Neotropics, where avian species are relatively sed- Speciation can occur at higher dispersal rates when population sizes differ (Figure 4), for example when a larger population abuts a smaller one in a different habitat, such as may have been the case in the evolution of the endemic blue chaffinch (Fringilla teydea) of Tenerife. This species currently lives in a relatively small area of pine forest at high elevations where its deeper beak gives it an advantage cracking pine nuts compared to the chaffinch Fringilla coelebs with whom it shares a common ancestor (Grant, 1979). Sexual imprinting and/or Matchmaker pleiotropy allow speciation to occur at times when opportunities are afforded by local ecological adaptation. We therefore expect over evolutionary time to see patterns of rapid parapatric speciation in between longer stable periods-a form of punctuational evolution. Such punctuational changes have been detected in phylogenetic analyses (e.g., McEntee, Tobias, Sheard, & Burleigh, 2018;Pagel, Venditti, & Meade, 2006), and in birds Mason et al. (2017) have shown that evolutionary bursts in rates of speciation coincide with bursts in song evolution in two clades of co-distributed passerines. When selection acts on new cues, the genes coding for the underlying neurophysiology are selected too, helping to maintain the mate-choice mechanisms intact.
Further work is needed to analyze this phenomenon, perhaps deploying the methods of Chaffee et al. (2013) to incorporate costs of being choosy, which will make speciation harder (Gavrilets, 2014).
The novel insights above suggest several quantitative predictions which require testing. Tests should include the following: (a) Analysis of the bird literature to estimate dispersal distances, from natal to breeding locations, in relation to species' ranges. This analysis is needed because theoretically speciation depends on dispersal between niches being low as shown in Figures 3 and 4. Our idea is that species with wider ranges are likely on average to contain more ecological differentiation and so would have speciated unless they had larger dispersal distances. So wide range should go with further dispersal. Preliminary results show some support (Claramunt, Derryberry, Remsen, & Brumfield, 2012;Weeks & Claramunt, 2014). (b) Phylogenetic analyses of species plumage colors to test the predictions that (i) some color traits that distinguish species evolved within the range of the ancestral species. This is worth investigating because the new theory suggests that speciation can occur within species that contain local ecological adaptations. (ii) Color traits evolved at the time of speciation. This is predicted because given local ecological adaptations, it is the evolution of the novel color traits that drives speciation.
Our analysis of a simple population genetic model has wide implications for the study of biodiversity hotspots which may occur where dispersal distances are short, for rates of speciation, and for the study of mate choice, which may play an important evolutionary role and contribute to the generation of biodiversity (Kozak, Head, & Boughman, 2011;Verzijden et al., 2012). It is possible that we might even be able to witness incipient speciation related to mate choice in populations such as birds where heritable song dialects demarcate adjacent populations (Slabbekoorn & Smith, 2002).

ACK N OWLED G M ENTS
We are grateful to Joe Tobias and several anonymous referees for suggestions that have improved this paper.

CO N FLI C T O F I NTE R E S T
The authors declare no competing financial interests.

AUTH O R S ' CO NTR I B UTI O N S
This paper developed from an original idea by JE. All authors contributed to development of the model, RMS ran the simulations, and all authors contributed to writing the paper.

DATA AVA I L A B I L I T Y S TAT E M E N T
There are no data associated with this paper.