Evolutionary feedbacks between genes and their extended effects under limited gene flow and biased ecological inheritance

Organisms continuously modify their living conditions via extended genetic effects on their environment, microbiome, and in some species culture. These effects can impact the fitness of current but also future conspecifics due to non-genetic ecological inheritance. As previously established, biased ecological inheritance towards offspring or spatial structure are relevant to the evolution of extended genetic effects as each leads to kin selection. However the combined effects of these two factors remain unexplored. Here, we mathematically investigate selection on a genetic trait with extended effects in a patch-structured population, when extended effects experience biased transmission within patches and dispersal between patches is limited. Our analysis reveals that the interaction between these two factors opens previously undescribed pathways for nongenetic modifications to feed back on relatives. By disentangling these feedbacks, our results help understand adaptation via non-genetic modifications. As an illustration, we apply our analysis to a gene-culture coevolution scenario in which genetically-determined learning strategies coevolve with adaptive knowledge. We show that vertical cultural transmission combined with limited dispersal favour strategies that generate significant levels of knowledge. More broadly, our theory yields insights into the interplay between genetic and non-genetic inheritance, with implications for how organisms evolve to transform their environments.


Introduction
Genes often exert effects that extend beyond the organism in which they are expressed, for instance by modifying the physical environment (as with the building of nests), by altering ecological interactions (as when immunity genes influence an organism's pathogens or microbiotic symbionts), or by creating cultural knowledge (as with the collection and dissemination of information about the environment; Dawkins, 1982;Lewontin, 1983;Odling-Smee et al., 2003;Bailey, 2012). When genetic variation causes variation in some external characteristics that in turn leads to variation in reproductive success, these external characteristics can be considered as part of an organism's extended phenotype (Dawkins, 1982). This further opens a feedback where changes in the genetic composition of a population depend on external conditions themselves influenced by genes. Owing to this feedback, adaptation then involves changes not only in genetic characters, but also changes beyond the organisms that express these characters.
While feedbacks between genes and the environment can impact evolutionary dynamics in various ways (Robertson, 1991), their relevance depends on the associations between genes, their extended effects and fitness (Dawkins, 1982(Dawkins, , 2004Brodie, 2005;Govaert et al., 2019). To see this, consider for instance a genetic locus that influences the quality of individual nests. For selection at this locus to causally depend on feedback effects, genetic variation must be linked to nest variation such that over generations, genes associated with "good" nests replicate at the expense of competitor genes associated with "bad" nests (to paraphrase Dawkins, 2004, p. 379).
One consideration that is particularly relevant for associations between genes and their extended effects is whether genetic effects extend further across generations. In other words, whether individuals can transmit elements of their extended phenotype to downstream generations via non-genetic pathways. This can occur under a variety of scenarios: material resources that have been modified by organisms are transferred to future generations; altered microbiomes are transmitted to offspring via physical contact; and cumulated cultural knowledge is passed down from older to younger individuals by imitation (Odling-Smee et al., 2003). In such cases, genes expressed in current individuals affect future generations through trans-generational extended effects, a phenomenon sometimes coined as "ecological inheritance" (Odling-Smee et al., 2003, or "cultural inheritance" when extended effects are specifically on cultural characteristics, Boyd and Richerson, 1985).
The influence of ecological inheritance on the association between genes and their extended effects depends on the mode of such non-genetic transmission. Vertical transmission from parent to offspring, for instance due to maternal effects (Kirkpatrick and Lande, 1989;Mousseau and Fox, 1998), inheritance of acquired traits (Pál and Miklós, 1999) or preferential learning from parents (Boyd and Richerson, 1985), ties together the paths of genetic and non-genetic transmission and thus bolsters the association between genes and their extended effects (Day and Bonduriansky, 2011). The evolutionary feedback between them is in turn strengthened owing to kin selection effects (Mullon and Lehmann, 2017). By contrast, oblique transmission from non-parental individuals of the older generation to offspring, owing to for instance contagion of microbes (Brandvain et al., 2011) or oblique cultural learning (Boyd and Richerson, 1985), generally saps the association between genes and their extended effects. Where recipients of extended genetic effects via oblique ecological inheritance turn out to be genetic relatives, however, the evolutionary feedback between genes and their extended effects can nevertheless materialise albeit indirectly through non-vertical kin (Lehmann, 2008). Since such bias towards kin emerges as soon as a population is subdivided and gene flow among subpopulations is limited, it is common in nature (Rousset, 2004).
By leading to kin selection effects, vertical and oblique ecological transmission combined with limited gene flow are therefore important for the evolutionary dynamics of genetic traits and their extended effects. While a wide variety of models has studied how feedbacks between genes and extended effects (on the environment, microbiomes or culture for e.g.) impacts evolutionary change, most are concerned with panmictic or wellmixed populations in the absence of any transmission bias (e.g., Bailey, 2012;Odling-Smee et al., 2013;Govaert et al., 2019, for reviews). Otherwise, the evolutionary dynamics of genetic traits and extended effects have been examined either under vertical transmission in panmictic populations (e.g., Kirkpatrick and Lande, 1989;Pál and Miklós, 1999;Bonduriansky and Day, 2009;Mullon and Lehmann, 2017), or under random transmission combined with limited gene flow (e.g., Brown and Hastings, 2003;Hui et al., 2004;Silver, M and Di Paolo, E, 2006;Wakano, 2007;Lehmann, 2008;Han et al., 2009;Best et al., 2010;Débarre et al., 2012;Horns and Hood, 2012;Lion and Gandon, 2015;Mullon and Lehmann, 2018;Joshi et al., 2020, but see Ohtsuki et al., 2017 for a specific model of biased cultural inheritance under limited dispersal). More precisely, models in the latter category assume that transmission within groups (or spatial clusters) that include parents and their offspring occurs randomly. But interactions between parents and their offspring typically differ than among other individuals, leading to biased patterns of ecological inheritance.
Here, we explore the evolution of a genetic trait with extended effects on a non-genetic trait (e.g., nest quality, pathogen load or cultural information) in a patch-structured population, where the non-genetic trait can be transmitted across generations in a biased manner within patches and dispersal among patches is limited. We show that selection depends on complicated feedbacks between the genetic trait and its extended effects over multiple generations, especially when ecological inheritance is biased and gene flow is limited. By disentangling and quantifying these feedbacks, our framework helps understand the interplay between genetic traits and their extended effects, and the nature of adaptation via non-genetic modifications. To illustrate this, we apply our framework to a model of gene-culture coevolution in which a genetically determined learning strategy coevolves with knowledge about the environment. We show that the evolution of learning and the concomitant amount of knowledge generated by such evolution depends on the interaction between the degree of bias for cultural transmission within groups and the level of dispersal among groups. Finally, we discuss how our framework can be applied to other biological problems, such as host evolution to pathogens, symbiotic mutualism and niche construction.

Figure 1: Genetic and non-genetic traits under limited gene flow: pathways of inheritance, interactions and fitness effects. (a)
The population consists of patches each home to n individuals. Every individual in the population is characterized by the genetic and non-genetic traits it carries. Both traits can influence any step of the life cycle, which is as follows: (1) First, adults reproduce (in sufficient numbers to ignore demographic stochasticity); (2) Independently of one another, offspring either remain in their natal patch or disperse to a randomly chosen patch (so there is no isolation-by-distance); (3) Adults die and offspring compete locally for n open breeding spots in each patch. (b) While genetic traits are always inherited from parent to offspring, non-genetic traits can be transmitted both: from the genetic parent when offspring remain in their natal patch (vertically) and from other individuals in the parental generation (obliquely). Once inherited, the non-genetic trait of an individual can be modified directly by its own genetic trait (DGEs) and by the genetic trait of its neighbours (IGEs). Finally, the individual fitness of an individual depends on its own genetic and non-genetic traits, as well as those expressed by neighbors in its patch.

Population and traits
We consider a population of haploids subdivided among a large (ideally infinite) number of patches, all of size n (i.e., Wright's island model). The population follows a discrete-time life-cycle consisting of three stages: adult reproduction; offspring dispersal; and competition among offspring to replace adults (see Figure 1a). Generations are non-overlapping but we allow for interactions between adults and offspring within a generation. Each individual in the population is characterised by a quantitative genetic trait (e.g., breeding value for nest building, resistance to pathogen, social learning strategy) generically denoted by z ∈ R (see Table 1 for a list of symbols) and a non-genetic trait that we call ∈ R ( for extended trait, e.g., nest quality, pathogen load, adaptive information about the environment; see section 4 for a specific example). We are interested in the joint evolution of both traits when the genetic trait influences the non-genetic trait via extended effects within generations, and the non-genetic trait can be transmitted between generations through ecological inheritance.

Extended genetic effects
Within a generation, the non-genetic trait of a focal individual can be influenced by genes via two pathways. First, it can be modified by the genetic trait this focal individual carries (direct genetic effects, DGEs, Figure 1b); and second, by the genetic trait of other patch members of the same generation (indirect genetic effects, IGEs, Figure 1b). These direct and indirect extended genetic effects capture how interactions between individuals of the same generation affect non-genetic traits. For instance, if the genetic trait z is the production of extracellular antimicrobial agents, then the pathogen load of an individual, which in our context is its non-genetic trait , would depend on its own production and that of its patch neighbours.

Ecological inheritance
Non-genetic traits can be transmitted between individuals across generations via ecological inheritance (Figure 1b). We assume that such ecological inheritance occurs after dispersal. This assumption is natural when the non-genetic trait consists of material resources that are physically tied to the patch so that an individual cannot disperse with it. For non-genetic traits that can disperse with their carriers and are transmitted via social interactions, such as pathogens or cultural knowledge, our assumption entails that these interactions take place primarily after dispersal (we discuss this assumption at greater length in the Discussion). To specify ecological inheritance further in terms of vertical and oblique transmission, we consider philopatric and immigrant individuals separately below.

Philopatric individuals
The non-genetic trait of a philopatric individual can be transmitted from individuals of the previous generation both: (1) vertically from its genetic parent (vertical ecological inheritance, Figure 1b); and (2) obliquely from other individuals of the parental generation present in the patch (oblique ecological inheritance, Figure  1b). This distinction between vertical and oblique ecological inheritance allows to capture biased transmission due to non-random interactions within patches. The non-genetic trait t of a focal philopatric individual at a generation t can thus be written as a function F of four variables, These four variables are: the genetic trait of the focal individual, z • ; the average genetic trait in its patch at generation t , z t ; the non-genetic trait of its genetic parent, t −1 (that lived at generation t − 1); and the average non-genetic trait in the parental generation within its patch, t −1 * .

Immigrants
If an offspring disperses, its genetic parent is absent from the patch it immigrates into. From our assumption that non-genetic transmission occurs after dispersal, the non-genetic trait of an immigrant cannot depend on the non-genetic trait of its parent. In addition, we assume that in the absence of family connections, an offspring interacts at random with adults of the previous generation. The non-genetic trait of an immigrant individual at generation t is then given by where F 's third argument is now the average non-genetic trait in the parental generation in the patch the focal individual has immigrated into (instead of parental non-genetic trait in eq. (1) for philopatric individuals). * Because the genetic average z t includes the focal genetic trait z• and because the non-genetic average t −1 includes the non-genetic trait of its parent t −1 , F does not completely distinguish between direct and indirect genetic effects or vertical and oblique ecological inheritance; such formulation simplifies mathematical analysis and all our results can be straightforwardly applied to cases where ecological inheritance is strictly oblique or extended genetic effects are strictly indirect by correctly defining the relevant averages in term of focal phenotype and that of its neighbours, see eq. (20) for e.g.

Symbol Meaning
Eq. † n Patch size.
m Dispersal probability.
z Quantitative genetic trait (z • , trait of a focal individual; z t , patch average at generation t ; z m , trait of a rare mutant).
Quantitative non-genetic trait ( t , of a focal individual at generation t ; t , patch average at generation t ).
Equilibrium non-genetic trait in a population monomorphic for genetic trait z.
F Mapping for the modifications of the non-genetic trait from one generation to the next. (1)-(2) Effect of vertical ecological inheritance on the non-genetic trait of a philopatric individual in a population monomorphic for z. (4) Effect of oblique ecological inheritance on an individual's non-genetic trait in a population monomorphic for z. (4) Direct extended genetic effects in a population otherwise monomorphic for z.
Indirect extended genetic effects in a population otherwise monomorphic for z.
Fitness of a focal individual.
r Average within-patch relatedness (i.e., probability that two genes sampled at random with replacement within a patch are identical-by-descent). (9)

E(z)
Extended genetic effect on carriers of a genetic mutation (decomposed as within-and trans-generational effects, E W (z) and E B (z), respectively). (10),(11)

E(z)
Extended genetic effect on the average non-genetic trait in the patch of carriers of a genetic mutation (decomposed as within-and trans-generational effects, E W (z) and E B (z), respectively). (10),(16)

Trans-generational transformations of non-genetic traits
The combination of modifications within generations and ecological inheritance can lead to cumulative carryover effects across generations, whereby individuals inherit modified non-genetic traits that are then further modified and in turn transmitted to the next generation. Such dynamics, which are given by eqs.
(1)-(2), unfold even in the absence of genetic evolution (see fig. 2b-c for e.g.). For our analysis, we assume these dynamics do not lead to the unlimited transformation of the non-genetic trait in the absence of genetic variation. In fact, we assume that in a genetically monomorphic population (so when all individuals have the same genetic trait z), the dynamics of the non-genetic trait converge to an equilibriumˆ (z). This equilibrium, which depends on the genetic trait z but which we write asˆ =ˆ (z) for short, must then satisfŷ as well as the stability condition ofˆ : where F v (z) captures the effect of vertical ecological inheritance on the non-genetic trait of a philopatric individual over one generation; and F o (z), the effect of oblique ecological inheritance. In particular, when ecological inheritance is random within a patch, then F v (z) = 0. Otherwise, effects of biased transmission between parents and offspring occur when F v (z) ≠ 0. As it will prove useful later, we also introduce the following notation to capture extended genetic effects, where F d (z) and F i (z) respectively measure the direct and indirect extended genetic effects on the non-genetic trait (i.e., F d (z) is the marginal effect of an individual changing its genetic trait on its own non-genetic trait, and F i (z), the effect of a change in the average genetic trait in the patch).

Individual fitness
We assume that individuals with different combination of genetic and non-genetic traits have different reproductive success. Specifically, the fitness w of an individual (defined as its expected number of successful offspring produced over one iteration of the life-cycle) depends on its genetic and non-genetic traits, as well as those carried by its patch neighbours ( fig. 1b). To capture this, we write the fitness of a focal individual at generation t with genetic and non-genetic traits, z • and t respectively, as a function where z t and t are the average genetic and non-genetic traits, respectively, in the patch of the focal individual.

Evolutionary dynamics
To investigate the genetic and concommitant non-genetic evolution of our population, we derive the selection gradient, s(z), on the genetic trait z. This gradient gives the direction of selection, and thus information on the gradual evolution of z and its effect on non-genetic trait . Specifically, the selection gradient determines singular genetic strategies (i.e., trait values z * such that s(z * ) = 0) and their convergence stability (i.e., whether these singular strategies will be approached due to selection and the rare input of mutations with weak effects -when s ′ (z * ) < 0 -or not -when s ′ (z * ) > 0), Rousset, 2004;Dercole and Rinaldi, 2008). Equilibrium eq. (3) in turn allows investigating the non-genetic trait expressed at such strategies and thus non-genetic transformations concomitant to genetic evolution.
The selection gradient can generally be computed as the marginal change in the basic reproductive number, R 0 (z m , z), of a rare mutant with genetic trait z m in a resident population that is otherwise monomorphic for genetic trait z, In the island model, this reproductive number is defined as the expected number of successful offspring produced by an individual that is randomly sampled from a local lineage (i.e., a lineage of individuals that reside in the same patch) of rare mutants with genetic trait z m in a resident population with genetic trait z Lehmann et al., 2016, see Appendix A for details). Although the selection gradient can be straightforwardly computed numerically for a given model using eq. (7), our goal here is to unpack selection in a biologically meaningful way. Specifically, we aim to disentangle selection that arises due to extended genetic effects and ecological inheritance under limited gene flow.

Results
We show in Appendix B that the selection gradient on a genetic trait that influences a non-genetic one can be partitioned as the sum of two terms, The first term, s g (z), is due to genetic effects on fitness only (i.e., ignoring extended genetic effects), while the second, s f (z), is due to extended genetic effects and how such effects feedback on fitness (see eqs. (B-8)-(B-9) for general expressions). We expand these two components of selection in the next sections.

Selection due to genetic effects on fitness
Selection due to genetic effects on fitness is in fact given by the standard selection gradient on traits with fitness effects only (Frank, 1998;Rousset, 2004, for textbook treatments), i.e., where r is average within-patch relatedness (here the probability that two individuals randomly sampled with replacement within the same patch carry an allele that is identical-by-descent at a neutral locus, see eq. (B-12)). Eq. (9) gives the standard decomposition of selection in subdivided populations, as a weighted sum of two genetic effects on fitness: the first is the direct effect of a focal individual changing its genetic trait on its own fitness; whereas the second is the indirect effect of a change in the focal on the fitness of an average patch member, weighted by average relatedness. As such, eq. (9) captures selection due to the the marginal fitness effects of genetic interactions between individuals of the same generation, some of whom may be genetically related due to limited gene flow.

Selection due to extended genetic effects and their feedback on fitness
Meanwhile, selection due to extended genetic effects on the non-genetic trait operates according to where E(z) is the effect of a genetic change on the non-genetic trait expressed by a representative carrier of this change, and E(z) the effect of a genetic change on the average non-genetic trait expressed by members of the patch in which a representative carrier of this change resides (in this context, "representative" refers to an average carrier of a rare genetic variant or mutation, where the average is taken over all possible genetic fluctuations that can occur within a patch; see eqs. (B-14)-(B-15) for mathematical definition). Eq. (10) reveals that evolutionary feedbacks via non-genetic traits can occur in two non-exclusive ways. First, a carrier of a mutation may express a different non-genetic trait compared to non-carriers (difference whose magnitude is E(z)). This difference then feeds back on the fitness of carriers and thus selection on the mutation (according to the first fitness derivative in eq. (10), which corresponds to the effect of a change in the non-genetic trait of an individual on its own fitness). Second, carriers may reside in patches in which individuals (including non-carriers) on average express a different non-genetic trait compared to individuals in other patches (with magnitude E(z)), and it is this difference in social environments that in turn feeds back on the fitness of carriers (according to the second fitness derivative in eq. (10), which measures the effect of a change in the patchaverage non-genetic trait on the fitness of a member of that patch). We detail these two paths through which selection acts by expanding the relevant extended genetic effects, E(z) and E(z).

Extended genetic effects on the non-genetic trait of carriers
The first evolutionary feedback captured by eq. (10) depends on E(z), which is the effect of a genetic change on the non-genetic trait expressed by a representative carrier of this change. We find that this effect can be decomposed as, where E W (z) occurs within and E B (z) between generations (see Appendix C for derivation).
Intra-generational effects. The intra-generational term consists of i.e., of the direct extended genetic effect, F d (z), that a carrier of a genetic change has on its own non-genetic trait, and of the extended indirect effect on current relatives so fellow carriers, r F i (z). The term E W (z) thus captures the notion that within a generation, an individual may modify its own non-genetic trait, as well as the non-genetic trait of its patch neighbours, some of whom may be relatives owing to limited gene flow.
Trans-generational effects. Due to ecological inheritance and limited gene flow, an individual may also influence the non-genetic trait of downstream philopatric relatives. These trans-generational transformations are also under selection and reflected in eq. (11) by the term E B (z), which is given by where m is the backward probability of dispersal (i.e., the probability that an individual is an immigrant in the absence of selection); F G (z) = F d (z) + F i (z), is the total extended genetic effects on non-genetic traits; , is the total effect of ecological inheritance; and is due to the effect of random local genetic fluctuations on the non-genetic trait (see eq. (C-42) in Appendix C for how we obtain this decomposition). Because in our later application (section 4) this latter term ∆ (z) only influences trait evolution quantitatively and not qualitatively (not shown), we focus our attention on the rest of eq. (13), which also connects more easily to existing results.
The first trans-generational effect in eq. (13) measures the effect that an individual has on its own non-genetic trait, F d (z), and how this modification affects the non-genetic trait of downstream philopatric descendants via vertical transmission in a cumulative way. To see this more clearly, we can unpack said term as where the sum accumulates the direct extended genetic effects originating from one individual across downstream philopatric generations via vertical transmission. In the limiting case m = 0, eq. (15) is in fact equal to the trans-generational effects under selection calculated for a well mixed population with vertical transmission only (see eqs. 15-17 of Mullon and Lehmann, 2017). With limited gene flow, an individual can also influence the non-genetic traits of downstream relatives by influencing the non-genetic traits of its patch neighbours via indirect extended genetic effects, which are then transmitted across generations due to ecological inheritance.
Selection on such trans-generational effects is captured by the second term of eq. (13) (where the term within square brackets consists of the difference between the effects of all trans-generational modifications originating from one individual and those that are specifically due to its direct extended genetic effects transmitted vertically).

Extended genetic effects on the average non-genetic trait in the patch of carriers
Because the fitness of an individual also depends on the average non-genetic trait in the patch, feedback selection can further occur via extended genetic effects on the average non-genetic trait in the patch of carriers (second term of eq. (10)). Such effects can also be decomposed according to whether they occur within-or between-generations, (see Appendix C for derivation).
Intra-generational effects. Intra-generational transformation of the average non-genetic trait are simply given by i.e., by the total extended genetic effects of an individual weighted by average relatedness.
Trans-generational effects. The trans-generational transformation of the average non-genetic trait, meanwhile, can be decomposed as where is again a term due to stochastic local genetic fluctuations. The first term of eq. (18) consists of the product between extended genetic effects among current relatives, r F G (z), and how such effects impact the non-genetic trait expressed by the downstream philopatric descendants of all these relatives via ecological inheritance (see right hand side eq. (18) for expansion of trans-generational effects into a sum). Eq. (18) aligns with previous analyses of selection on trans-generational effects of traits that influence local ecology or more generally traits that affect all individuals in a group equally (specifically, in the absence of preferential direct genetic effects -F d (z) = 0 -and vertical transmission -F v (z) = 0 -each individual in a group expresses the same non-genetic trait, then eq. (18) reduces exactly to eq. (29) of Mullon and Lehmann, 2018; see also eq. (9) of Lehmann, 2007 and eq. (4.11) of Sozou, 2009 for similar expressions). By contrast to these previous studies, we allow here for differential expression of the non-genetic trait within a patch due to direct genetic effects and/or vertical ecological inheritance, which opens previously undescribed paths for evolutionary feedbacks and selection.

Summary
In summary, we have shown that under limited gene flow, selection at a genetic locus with extended effects depends on multiple feedbacks on the fitness of relatives via non-genetic traits (eqs. (8)-(10)). This is because a carrier of a genetic mutation not only modifies (i) its own non-genetic trait, but also (ii) the non-genetic trait of individuals it interacts with during its lifetime via indirect extended genetic effects, as well as (iii) the nongenetic trait of individuals in downstream generations via ecological inheritance (see fig. 1b). Due to limited gene flow, these other affected individuals are either carriers of the genetic mutation (i.e., relatives) or noncarriers that interact with relatives. In either case, the non-genetic modifications initiated by a carrier of a genetic mutation feeds back on the fitness of current and downstream relatives. Our analysis thus disentangles the various pathways via which such evolutionary feedbacks occur, owing to direct and indirect extended genetic effects combined with vertical and oblique ecological inheritance (eq. (11)- (18)). As we show in the next section by applying our framework, this decomposition can help understand how natural selection shapes genetic and non-genetic traits.

Gene-culture coevolution under limited gene flow
To illustrate our general result and some of its implications, we investigate a model of gene-culture coevolution, whereby a genetically determined learning behavior co-evolves along culturally transmitted information (Feldman and Cavalli-Sforza, 1976;Lumsden and Wilson, 1981;Boyd and Richerson, 1985;Aoki, 1986;Feldman and Laland, 1996;van Schaik, 2016).

Assumptions
We assume that after dispersal, offspring acquire adaptive culture or information (e.g., foraging skills). They acquire such information via two routes: first, they learn socially from the adults in their patch (e.g., by imitation) and second individually (e.g., by trial and error). The evolving genetic trait is the investment 0 ≤ z ≤ 1 of time or energy into social learning (so that 1−z is invested in individual learning) and the non-genetic trait ≥ 0 is the amount of knowledge held by an individual. The combination of social and individual learning allows for the accumulation of knowledge across generations, i.e., cumulative culture, which is thought to be a hallmark of human populations (Boyd et al., 2011;van Schaik, 2016). If a body of theoretical literature has helped better understand the conditions that favour cumulative culture, most models assume that populations are well mixed and/or that individuals learn socially from one another at random (Boyd and Richerson, 1995;Enquist et al., 2007;Borenstein et al., 2008;Aoki et al., 2012;Lehmann et al., 2013;Nakahashi, 2013;Wakano and Miura, 2014;Aoki and Feldman, 2014;Kobayashi et al., 2015;Mullon and Lehmann, 2017; but see Rendell et al., 2010;Ohtsuki et al., 2017). Here, we use our framework as a platform to investigate the evolution of learning strategies and cumulative culture under the joint effects of limited gene flow among groups and non-random social learning within groups. Further, we allow for social learning by different individuals to interact with one another in a synergistic or antagonistic manner. Synergy could for instance occur when social learners help one another while antagonism could arise where gathering adaptive information from the social environment is competitive.

Cultural dynamics
In terms of within generation cultural dynamics, an offspring is born with zero knowledge and after dispersal, first learns socially from the adults present in the patch (in contrast with Ohtsuki et al., 2017, who assumed that social learning occurred before dispersal). A focal offspring accumulates knowledge via this route in a way that decelerates with the amount of investment z • made into social learning and plateaus to the level of knowledge carried by present adults ( fig. 2a), reflecting that an offspring cannot gain more knowledge than the individuals it learns from. We allow for philopatric offspring to preferentially learn vertically from their parent, with weight v, compared to a random adult (with weight 1 − v, see Table 2 for list of symbols used specifically for the gene-culture coevolution model). The parameter v controls how biased transmission is towards parents and thus how vertical cultural transmission is compared to oblique ( fig. 1b). We also allow for the efficiency with which an individual learns socially to depend on the investment of other patch members into social learning according to a parameter γ. Specifically, we assume that the amount of knowledge obtained socially by a philopatric individual investing z • into social learning at generation t when its patch neighbours where the first term within square brackets is the effective transmission efficiency of social information and the second term in square brackets is the maximum target knowledge that can be socially transmitted (which is a weighted average of parental knowledge in the patch). In eq. (20), the parameter γ > −1 controls interference among social learners: when γ = 0, there is no interference and social information is transmitted with baseline efficiency β (as in e.g., Lehmann et al., 2013;Wakano and Miura, 2014;Kobayashi et al., 2015;Ohtsuki et al., 2017;Mullon and Lehmann, 2017); when γ < 0, social transmission is enhanced by other individuals; and when γ > 0, it is impaired. In the context of our general framework, the parameter γ therefore modulates the direction and strength of indirect extended genetic effects ( fig. 1b).
Equilibrium knowledge a monomorphic population according to investment into social learning (given by eq. (23), with β = 2.5, α = 1, γ = −0.5,−0.4,0,2). As α = 1 here, the maximum knowledge that an individual can obtain in its lifetime via individual learning alone is 1. Any strategy that generates knowledge above 1 therefore entails the presence of cumulative culture. The learning strategy that generates maximum knowledge when expressed in the whole population is denoted by z MAX (see eq. (24)).
The knowledge that a philopatric individual has at the time of reproduction at generation t is then given by the sum of socially and individually acquired information, Eq. (22) allows us to determine the equilibrium level of knowledge carried by individuals in a population genetically monomorphic for learning strategy z (from eq. 3), which reads aŝ (it is straightforward to show that this equilibrium is stable, i.e., that eq. 4 holds). Eq. (23) displays characteristic effects of social learning on culture (see also fig. 2b-c): knowledge initially increases with social learning (provided β > 1), leading to knowledge being accumulated across generations (i.e., individuals acquire more knowledge than they would have been able to by individual learning alone,ˆ > α), but past a threshold of social learning, knowledge decreases and eventually collapses as no individuals in the population produce knowledge via individual learning (i.e.,ˆ = 0 when z = 1). Interference among social learners (γ ≠ 0) does not change this relationship between equilibrium knowledge and learning strategy ( fig. 2c), but knowledge reaches greater levels when social learning is synergistic (γ < 0) than when it is antagonistic (γ > 0).
The relationship between equilibrium knowledge and learning strategy in a monomorphic population (eq. (23), fig. 2c) implies that there exists a learning strategy such that if adopted by the whole population, generates the maximum possible level of knowledge. This optimal strategy, say z MAX , is determined bŷ In the absence of interference (γ = 0) this strategy simply is z MAX = 1 − 1 β, i.e., as social learning efficiency increases, more resources invested into social learning generate greater knowledge. Compared to this baseline, synergistic interactions among social learners (γ < 0) increase z MAX , and antagonistic interactions decrease it (eq. (24), fig. 2c). Whether selection favours the evolution of such an optimal strategy, however, depends on the fitness effects of learning and knowledge, which we describe next.

Symbol Meaning
Eq. † z Learning strategy (investment into social learning; z • , by a focal individual;z t , average among the neighbours of a focal individual at generation t ).
z MAX Learning strategy that generates the maximum level of knowledge when adopted by the whole population.
z OPT Learning strategy that maximises knowledge of an individual when adopted by this individual.
z W Learning strategy favoured by intra-generational effects.
Adaptive cultural knowledge.
l S Contribution of social learning by a focal individual on its own knowledge.
l I Contribution of individual learning by a focal individual on its own knowledge.
v Weight of parental knowledge during social learning (i.e., strength of vertical cultural transmission).
β Baseline efficiency of social learning.
α Efficiency of individual learning.
c Fecundity cost of individual learning.
r Within-patch relatedness (i.e., probability that two genes sampled at random without replacement within a patch are identical-by-descent). (27)

W(z)
Selection due to intra-generational feedbacks.

B(z)
Selection due to trans-generational feedbacks.
(32), (36) Marginal effect of a change in learning strategy in a focal individual on its own knowledge when the rest of the population is monomorphic for z.

Fitness effects
In terms of fitness, we assume that an individual's fecundity increases with the amount of adaptive information it has collected but decreases with the amount of resources invested into individual learning. Social learning, by contrast, is assumed to be cost free for simplicity. These assumptions reflect the notion that social learning is cheap compared to individual learning as it outsources risk and helps avoiding fatal mistakes (Boyd and Richerson, 1985). One way to formalise this is to write the fecundity of an individual with information level t and social learning strategy z • as a sum of these two factors, where c > 0 is a parameter tuning the cost of individual learning (we also explored multiplicative effects on fecundity and this did not influence our results qualitatively, not shown). The opposite effects of knowledge and individual learning on fecundity (eq. (25)), combined with the fact that knowledge ultimately breaks down when individual learning is absent in the population (eq. (23), fig. 2c), lead to a social dilemma: on one hand, individuals have an incentive to invest all their resources into social learning, but on the other, if every individual in the population does so, then there is no adaptive information to actually learn.
The fitness of a focal individual with fecundity f (z • , t ) in the island model of dispersal is then given by, (e.g., Rousset, 2004), where the first summand represents philopatric fitness (i.e., the expected number of offspring that secure a breeding spot in their natal patch), which is given by the ratio of the focal's offspring that remain in their natal patch ((1 − m) f (z • , t ) with m as the probability of dispersal) to the total number of offspring that enter competition in this patch, consisting of all philopatric offspring ((1 − m) f (z t , t )) and immigrants from other patches (m f (z,ˆ ), where z is the investment in social learning in other patches, which can be assumed to be monomorphic with resulting equilibrium knowledgeˆ given by eq. (23)); and the second summand is dispersal or allopatric fitness (i.e., the expected number of offspring that secure a breeding spot in non-natal patches), which is the ratio of the focal's offspring that emigrate to the expected total number of offspring in a non-natal patch.
To perform the analysis of selection elaborated in section 3, we further need to specify average within-patch relatedness, r (see below eq. (9) for definition). This relatedness coefficient can be decomposed as where r is the probability that two individuals randomly sampled without replacement within the same patch carry an allele that is identical-by-descent at a neutral locus. Such probability, which is connected to the classical notion of F ST from population genetics (Rousset, 2002), can be derived from standard coalescence arguments, yielding in the island model of dispersal with non-overlapping generations (e.g., Rousset, 2004).

Selection on social learning 4.2.1 Genetic effects on fitness
To understand how selection shapes social learning and adaptive knowledge in our model, let us first investigate selection on social learning ignoring its extended effects on knowledge (so focusing on eq. (9)). Substituting eqs. (25)-(28) into eq. (9), we find that selection due to the genetic effects of social learning on fitness can    (36) and (D-1), with β = 2.5, c = α = 1, γ = 0, v = 1, m = 0.01, n = 10). The evolutionary convergent strategy z * = 0.7 (where s(z * ) = 0) corresponds to a balance between selection due to genetic effects s g (z), which favours investing all resources into social learning, and feedback selection s f (z), which favours greater levels of individual learning. (b) Evolutionary convergent learning strategy in a well-mixed population as a function of interference parameter γ (z W in blue, computed from eq. (35), same parameters as (a)). Also shown are the strategies that maximise adaptive information at the individual-(z OPT , full gray line, eq. (34)) and population-level (z MAX , dashed gray line, eq. (24)). be expressed as, Because individual learning is more expensive than social learning (c > 0), this selection component is always positive (see red curve in fig. 3a), indicating that in the absence of feedback, selection always favours an increase in social learning, leading to individuals investing all their resources into social learning and none into individual learning (z = 1).

Feedback selection
Selection however also depends on the way that social learning influences knowledge and how this feeds back on the fitness of relatives (eq. (10)). Plugging eqs. (20)-(28) into eq. (10) (with eqs. (11)-(14), (16)-(19)), we find that selection due to such feedbacks can be partitioned as where corresponds to selection due to intra-generational feedbacks, and due to trans-generational feedbacks. At the broad scale described by eq. (31)-(32), selection on learning due to feedbacks depends on the effect that social learning by an individual has (i) on the knowledge of its current and downstream relatives in its patch (including itself, E W (z) + E B (z)), and (ii) on the average knowledge in its patch and experienced by its downstream relatives ( (E W (z) + E B (z))), which is weighted by −(1 − m) 2 owing to kin competition (because for e.g. when an individual increases adaptive information for all patch members, such an increase exacerbates competition for current and future relatives within the patch).
Intra-generational feedback. In terms of model parameters, selection due to intra-generational feedbacks reads as, where F L (z) gives how a change in an individual's learning strategy influences its own knowledge in a population otherwise monomorphic for z. As a result, the component of selection W(z) alone favours a combination of individual and social learning, that maximises the level of adaptive information an individual collects within its own lifetime for itself (i.e., so that F L (z OPT ) = 0, eq (33), see full green curve fig. 3a). In the absence of interference among social learners (γ = 0), this strategy also maximises knowledge when expressed by the entire population (i.e., z OPT = z MAX , eq. (24), fig. 3b). When social learning is synergistic (γ < 0), however, the individual-strategy that maximises individual knowledge consists of less social learning than the population-strategy that maximises knowledge at the population-level (z OPT < z MAX , fig. 3b). This is because the latter considers changes in learning strategy in all individuals, rather than just in a focal one. With synergy, all individuals performing more social learning generates more knowledge than when performed by a single individual, leading to z OPT < z MAX . Conversely, when social learning is antagonistic (γ > 0), then z OPT > z MAX ( fig. 3b).
Total intra-generational effects. If we add selection due to intra-generational feedback effects (eq. (30) with B(z) = 0) and selection due to genetic effects on fitness (which also occur within generations, eq. (29)), we obtain the selection gradient on social learning due its total intra-generational effects. Such selection favours the evolution of a learning strategy, z W , given by, (i.e., such that c + F L (z W ) = 0, Fig. 3b). Under this strategy, less resources are invested into individual learning than under z OPT (eq. (34)) due to the fitness cost c of individual learning. Note that total selection on intragenerational effects favours the same learning strategy z W in a well-mixed and dispersal-limited population (i.e., eq. (35) does not depend on m). This is due to our assumptions that generations are non-overlapping and patches are of constant size, in which case the benefits from interacting with relatives are exactly offset by the cost of competing with them under limited gene flow (Taylor, 1992). Further, selection on intra-generational effects is independent from the mode of cultural transmission (i.e., eq. (35) is independent from v).
Trans-generational feedback. Owing to cultural inheritance and limited gene flow, however, feedbacks between relatives can also occur across generations. We find that selection due to such feedbacks can be expressed as where φ(z) ≥ 0 and ψ(z) ≥ 0 are complicated non-negative functions of z and model parameters (see eq. (D-1) in appendix D for details). Inspecting the term within square brackets of eq. (36) reveals that selection due to trans-generational feedbacks is composed of two forces: one that favours the strategy z OPT (according to F L (z)); and another z MAX (according toˆ ′ (z)). Both of these forces are proportional to φ(z), which can be interpreted as the strength of selection on trans-generational effects. The function ψ(z), meanwhile, characterises the strength of selection towards the strategy z MAX relative to the strength towards z OPT due to transgenerational effects.
To better understand the nature of selection on trans-generational effects, let us first consider a scenario where there is no interference among social learners, γ = 0. In this case z OPT = z MAX (Fig. 3b), so B(z) favours a single strategy that maximises knowledge both at the individual and population level, with strength proportional to φ(z) (eq. 36). Since z OPT = z MAX < z W (Fig. 3b), selection due to trans-generational feedbacks favours less investment into social learning and more into individual learning compared to selection due to intragenerational effects (see green dashed curve Fig. 3a). In addition, numerical exploration of φ(z) reveals that selection on trans-generational effects increases as dispersal becomes limited and cultural transmission becomes vertical (i.e., φ(z) increases as m → 0 and v → 1, Fig. 3c). We therefore expect that under these conditions, selection leads to greater investment into individual learning and greater levels of adaptive knowledge, which aligns with the results of Ohtsuki et al. (2017, who assumed that γ = 0). Intuitively, this is because as dispersal becomes limited and cultural transmission becomes vertical, the association between genetic and non-genetic variation increases, so that the effects of a change in learning strategy are increasingly tied to individuals that express this change. As a result, the effects of learning on knowledge are increasingly apparent to selection.
When social learners interfere with one another (γ ≠ 0), however, the learning strategies that maximise knowledge at the individual and population level disagree (z OPT ≠ z MAX ). This raises the question: when does selection due to trans-generational effects favours the strategy z MAX that leads to the greatest level of knowledge when expressed in the whole population? Numerical examination of ψ(z) shows that selection due to transgenerational effects tends to promote the evolution of z MAX rather than z OPT when cultural inheritance is random and relatedness is high within groups (i.e., ψ(z) increases as m, n and v all decrease, Fig. 3d). This can be understood by considering a rare mutant who invests more resources into social learning than a common resident who expresses z OPT , when social learning is synergistic (γ < 0, so that the mutant strategy is between z OPT and z MAX ). This change in strategy decreases the knowledge of the mutant (as strategy is different to z OPT ) but increases the knowledge of contemporary neighbours due to synergy. In turn, when cultural transmission is vertical (v = 1), this difference extends to descendants: philopatric offspring of the mutant receive less knowledge than other philopatric offspring. By contrast, when cultural transmission is random within patches (v = 0), offspring of the mutant benefit from the increased knowledge of neighbours while other offspring suffer from learning poorer knowledge from the mutant. Further, these mitigating effects of random transmission on the difference in knowledge between different offspring increase as dispersal becomes limited and as there are fewer adults in the patch. Accordingly, trans-generational effects then disfavour any strategy other than z OPT when v = 1 but favour strategies closer to z MAX when v = 0 and relatedness within patches is high.
At a superficial level, our analysis of ψ(z) suggests that in the presence of interference among social learners (γ ≠ 0), the evolution of learning leads to more knowledge when cultural inheritance is random rather than vertically biased. It is however important to keep in mind that ψ(z) is a relative measure of the strength of selection favouring z MAX compared to z OPT (eq. (36)). The overall strength of selection due to trans-generational effects is given by φ(z) (eq. (36)), which increases as cultural inheritance becomes vertically biased. Vertical cultural inheritance therefore has antagonistic effects on knowledge accumulation through learning evolution when γ ≠ 0: on one hand, it increases the relevance of trans-generational effects compared to intra-generational effects, but on the other it favours the evolution of strategies that do not maximise knowledge at the population level. We investigate the outcome of such antagonistic effects in greater depth in the next section. which is the threshold above which cumulative culture occurs (see Fig. 2c), shown as a black dashed line (lighter colours mean greater knowledge in the population, see colour figure legend).

Evolutionary convergent strategies and cumulative culture
To investigate trans-generational effects further, we computed numerically the evolutionary convergent learning strategy, z * , which satisfies, as well as the resulting levelˆ (z * ) (using eq. (23)) of knowledge such a strategy yields for various model parameters (see Fig. 4). In the absence of interference among social learners (γ = 0), we find that individual learning is favoured when gene flow is limited (m is small) and cultural transmission is vertical (v is large, Fig. 4a) which is in line with our analysis of eqs. (36) when γ = 0. In turn, the evolution of such learning strategies leads to the accumulation of greater levels of adaptive information in the population (Fig. 4b). Note that since selection due to intra-generational effects are independent from vertical cultural inheritance and dispersal (eq. (35)), the effects observed in Fig. 4 are entirely driven by trans-generational effects.
While synergistic learning (γ < 0) favours greater investment into social learning (Fig. 4c) that can nonetheless lead to high levels of cumulative knowledge (Fig. 4d), antagonistic learning (γ > 0) favours greater individual learning (Fig. 4e) but engenders low levels of non-cumulative knowledge (Fig. 4f). In agreement with our analysis of the antagonistic effects of cultural inheritance bias on knowledge accumulation through learning evolution, we observe that knowledge in the population is not maximised by full vertical cultural inheritance in the presence of synergistic social learning, γ < 0 (see top left corner of Fig. 4d). Rather, there exist intermediate levels of vertical cultural inheritance and gene flow that maximise the accumulation of knowledge (Fig. 5). Such intermediate levels ensure that inter-generational effects are strong enough to offset the costs c of individual learning, but not so strong that they lead to investing so many resources into individual learning that knowledge in the population decreases (i.e., intermediate levels ensure that c + (1 + φ(z MAX ))F L (z MAX ) = 0, where z MAX is given by eq. (24)). To check our analyses, we also performed individual based simulations that track gene-culture coevolution under the assumptions of our model (see Appendix E for details). We observed a very good match between these simulations and analytical predictions (Fig. 6), confirming our approach.

Discussion
In this paper we investigated the evolution of a genetic trait with extended effects on a non-genetic trait that can be transmitted across generations via ecological inheritance, when such transmission is biased within patches and gene flow between patches is limited. Our analyses revealed that the combination of biased transmission of non-genetic traits and limited dispersal opens previously unattended transgenerational pathways for genedriven modifications to feed back on the fitness of relatives and thereby influence selection (eq. (10) onward). This variety reflects the multiple ways that can associate genetic variation to variation in non-genetic traits and fitness. A carrier of a genetic variant with extended effects may directly modify its own non-genetic trait, as well as indirectly those of current and downstream relatives living in its patch (eq. (12)). As a result, selection depends on trans-generational modifications cumulated over a genetic philopatric lineage (eqs. (13)-(15)) and how such modifications feed back on the fitness of members of this lineage (first term of eq. (10)). Due to social interactions within patches and oblique ecological inheritance, a carrier of a genetic variant can also modify the non-genetic trait of non-relatives within its patch even in the distant future. Selection then also depends on how this modification feeds back on the fitness of current and downstream relatives (second term of eq. (10), see also eqs. (16)-(19)). As illustrated in our gene-culture coevolution example, this decomposition in terms of trans-generational kin selection effects allows for an intuitive appreciation of the selective forces at play when individuals interact within patches, both directly and indirectly via extended effects.
While giving formal support to the notion that the evolutionary relevance of feedbacks between genetic traits and their extended effects is contingent on their association (Dawkins, 1982(Dawkins, , 2004Brodie, 2005), our model further quantifies these associations and how they affect selection in subdivided populations. This is particularly useful to investigate the influence of limited gene flow and local transmission patterns on the evolution of gene-driven modifications to non-genetic features. In our application to gene-culture coevolution for instance, we found that provided cultural information is mostly passed vertically, populations with even moderate levels of dispersal (so that genetic relatedness within patches is low) can evolve a costly learning strategy that generates high levels of adaptive culture benefiting others (Figure 4). Less intuitively perhaps, we further found that when social interactions have synergistic effects on social learning (equivalent to non-additive indirect genetic effects), evolution leads to greater levels of adaptive knowledge in the population under intermediate levels of both vertical transmission and dispersal ( Figure 5). As these features are characteristic of human populations (van Schaik, 2016), it would be interesting to investigate in greater depth the nature of synergistic effects on learning, in particular their behavioural basis and evolution. More generally, this suggests that indirect extended genetic effects and ecological inheritance under limited gene flow interact in a non-trivial way, and that this interaction can have significant qualitative impacts on the evolution of extended traits.
Beyond gene-culture coevolution, our framework may offer insights into other evolutionary problems involving modifications of external features that can be transmitted between individuals. Of particular relevance are questions regarding host evolution to pathogens or microbiotic symbionts with mixed modes of transmission (Ebert, 2013). If much theory has highlighted the importance of kin selection emerging from spatial structure for such evolution, this theory typically focuses on random transmission patterns within spatial clusters (e.g., Brown and Hastings, 2003;Ferdy, 2009;Best et al., 2010;Horns and Hood, 2012;Débarre et al., 2012;Lion and Gandon, 2015). But preferential interactions between parents and their offspring are ubiquitous in social organisms, leading to vertically biased modes of transmission. Intuitively from our results, such transmission bias should favour the evolution of costly resistance to pathogens or maintenance of symbionts. This broad brush prediction aligns with population genetics models looking at the dynamics of host resistance (Schliekelman, 2007) or symbiotic alleles (Fitzpatrick, 2014). These population genetics approaches, however, do not allow for gradual transgenerational modifications to pathogens or symbionts owing to interactions with hosts. By contrast, our framework can investigate how host's traits evolve in response to, and modify, quantitative characteristics of the microorganisms they carry such as pathogen load, virulence or symbiotic community composition.
Another relevant line of inquiry that can be pursued with our framework is the evolution of transmission bias itself. As the transmission function F in our model can depend on those individuals who pass their non-genetic trait (and those who inherit them, eqs. (1)-(2)), it is straightforward to investigate whether selection favours organisms to transmit (and/or receive) extended effects in a more vertical or oblique manner. Under gene-culture coevolution, models have studied how neutral evolution (Takahasi, 1999) and fluctuating environments (McElreath and Strimling, 2008) can lead organisms to rely on vertically-rather than obliquely-collected information when populations are well-mixed and information is fixed (i.e., does not accumulate). Here we suggest exploring how selection moulds the transmission of cumulative culture depending on limited dispersal. Selection in this case presumably depends on who controls the flow of adaptive information: parents should favour transmission to their offspring only, while offspring should favour whatever strategy maximising the information they receive. By homogenizing the genes and culture of individuals belonging to the same patch, limited disperal can resolve this parent-offspring conflict and should therefore be especially relevant for the evolution of transmission bias. Dispersal patterns and conflicts between interacting hosts should also be relevant to the evolution of host's traits that influence the transmission of symbionts and pathogens. Existing literature on this topic has been mostly focused on the evolution of microbiotic strategies that favour one mode of transmission between hosts over another (e.g., Ferdy and Godelle, 2005;Boldin and Kisdi, 2012;Antonovics et al., 2017). Nonetheless hosts can also evolve remarkable strategies that influence transmission dynamics, such as altruistic suicide to limit kin exposure (Débarre et al., 2012;Berngruber et al., 2013;Humphreys and Ruxton, 2019). But the conditions that lead hosts to evolve behaviours favouring vertical over horizontal transmission or vice versa remain largely unexplored, especially for subdivided populations (Antonovics, 2017, for review).
Although our model allows to better understand the nature of selection under a broad set of evolutionary scenarios involving extended genetic effects, it relies on several assumptions that should be kept in mind (e.g., homogeneous patch structure, random dispersal, infinite number of patches). In particular, our assumption that transmission of non-genetic traits occurs after dispersal precludes strict maternal effects or more generally strict vertical ecological inheritance (as only philopatric individuals can be subject to these effects in our model). Put differently, extended genetic effects cannot disperse between patches in our model. In such a case, we expect kin effects on feedback selection to be weaker as individuals from different patches are less related than individuals from the same patch. In fact, a model of gene-culture coevolution showed that even moderate transmission of information between patches via dispersal can hinder the accumulation of adaptive culture (Ohtsuki et al., 2017). Extending our framework to include transmission before dispersal would therefore be an interesting avenue for future research. This would for instance offer the possibility to study host evolution in response to pathogens that can be directly transmitted from mothers to offspring in subdivided populations (Busenberg and Cooke, 1993, for epidemiological models in well-mixed populations), as well as dispersal evolution in response to pathogen load (Iritani and Iwasa, 2014). Another assumption we made that is especially relevant in the context of host-pathogen interactions is that patches have a fixed size. Our model therefore cannot track demographic changes due to infection. Such demographic changes are interesting from an epidemiological point of view but can also have pronounced effects on evolutionary dynamics (Lion and Gandon, 2015, for review). It would therefore be useful albeit challenging to include gene-driven demographic changes through extended effects to our conceptual model (see Mullon and Lehmann, 2018, for a possible step in this direction).
In sum, we have developed a theoretical framework to analyze how selection acts on genetic traits with extended effects that can be non-randomly transmitted across generations due to preferential interactions and limited dispersal. Our analysis disentangles the many paths via which selection can act due to limited dispersal and biased transmission, helping understand the nature of adaptation via trans-generational feedback effects between relatives. As illustrated by our gene-culture coevolution model, such feedback effects can affect evolutionary dynamics in significant and non-trivial ways. More broadly, our theory can help understand the interplay between genetic and non-genetic ecological inheritance, with implications for how organisms evolve to transform their culture, microbiome and external environments.

Appendices A Basic reproductive number in the island model of dispersal
In this appendix, we specify the reproductive number R 0 (z m , z), which lies at the basis of our analysis. In the island model of dispersal, the reproductive number R 0 (z m , z) (sometimes referred to as "lineage fitness proxy") is defined as the expected number of successful offspring produced by an individual that is randomly sampled from a local lineage of rare mutants with genetic trait z m in a resident population with genetic trait z (see Mullon et al., 2016, for homogeneous groups;and Lehmann et al., 2016, for heterogeneous groups).
To connect the above definition of R 0 (z m , z) with our model, let us first introduce M t ∈ {0,1,2,...,n} as the random variable for the number of mutant individuals with trait z m at generation t = 0, 1, 2, ... in a mutant patch (i.e., a patch in which the mutant arose as a single copy at time t = 0). As the mutant arose as a single copy at time t = 0, we have M 0 = 1. The remaining n − M t individuals in this mutant patch at generation t are residents with genetic trait z. However, these resident individuals can express different non-genetic traits than residents from resident patches due to their interactions with genetic mutants (via indirect extended genetic effects and oblique ecological inheritance). To capture this variation among carriers of the resident genetic trait in the mutant patch, we distinguish between different cohorts of residents, varying in when their ancestors first arrived in the mutant patch. Specifically, we let R t ,0 denote the number of residents who had an ancestor in the mutant patch when the first mutant arose at time t = 0, and R t ,t −h be a random variable for the number of residents at generation t in the mutant patch whose local lineage was initiated exactly h (< t ) generations ago. By definition, these random variables sum to the total number of residents at time t , ∑ t h=0 R t ,t −h = n − M t (and as there is a single mutant at time t = 0, R 0,0 = n − 1).
With the above notation, the genetic-demographic state S t of the mutant patch at time t is described by a non-negative partition of the integer n into t + 2 distinctive cohorts: where M t + ∑ t h=0 R t ,t −h = n. A realization of the stochastic process from time 0 to t is thus characterized by a collection of such partitions, which we denote by H t ≡ {S τ } 0≤τ≤t , i.e., H t describes the genetic-demographic history of the mutant patch from time 0 to t . We let H t represent the set of all possible genetic-demographic histories from time 0 to t in a mutant patch (so that H t ∈ H t ), and Pr(H t ) be the probability that the history H t is realized.
The probability that an individual randomly sampled from the mutant lineage (over the lifetime of this lineage in the patch) is sampled at time t with patch history H t is then given by where we have deliberately stressed the trivial dependence of M t (H t ) on H t , and is the expected cumulative size of the local mutant lineage over its lifetime (note that owing to the fact that extinction of a local mutant lineage is certain, i.e., lim t →∞ Pr(M t = 0) = 1, and that n L is bounded; see eq. A19 in Mullon et al., 2016, for equivalence with eq. (A-2) in the absence of historical effects). For our analysis, it will be sometimes convenient to re-write eq. (A-2) as , (A-4) which is proportional to the fraction M t (H t ) n of mutants in the mutant patch at time t .
(i.e., w(z, z,ˆ ,ˆ ) = 1), and that q satisfies ∂(∑ ∞ eq. (A-2)). Since there is no distinction between mutants and residents under neutrality (z m = z), the quantity r defined by eq. (B-12) is equal to the probability that two individuals sampled with replacement from the same patch at the same generation belong to the same local lineage, i.e., the probability that they carry an allele that is identical-by-descent at a neutral locus, which corresponds to the definition of patch-average relatedness (e.g., Rousset, 2004). Thus, we find as required that eq. (B-11) is eq. (9) of the main text.

B.3 Feedback effects
We now turn our attention to feedback selection effects, eq. (B-9), which can be re-written as eq. (10) of the main text, is by definition the influence of the genetic mutant on the expected non-genetic trait expressed by a representative member of the local mutant lineage (i.e., randomly sampled from the local mutant lineage), and similarly, is the influence of the genetic mutant on the expected average non-genetic trait in the mutant patch experienced by a representative mutant. We evaluate these expectations in Appendix C.

C Effects of a genetic mutant on non-genetic traits
Here, we evaluate the effects of a genetic mutant on non-genetic traits that are under selection, E and E

C.1 Dynamics of non-genetic traits C.1.1 Mutant non-genetic trait
As the genetic mutant is globally rare, any carrier of this mutation in the mutant patch is necessarily philopatric in the island model of dispersal. Using eq. (1) of the main text, the non-genetic trait expressed by a carrier of the genetic mutation at generation t in the mutant patch is thus given by where recall that z m is the genetic trait carried by the focal mutant; z t , the average genetic trait in the mutant patch at generation t (see eq. A-6); m t −1 , the non-genetic trait expressed by the parent of this mutant at generation t − 1 (which is necessarily in the same patch as we are considering a local mutant lineage); and t −1 , the average extended phenotype at the previous generation (which is characterised in eq. (C-4)).

C.1.2 Resident non-genetic trait in the mutant patch
The non-genetic trait of individuals carrying the resident genetic trait z can be modified by the genetic mutant z m via indirect extended genetic effects and oblique ecological inheritance. We therefore also need to charac-terize the mutant-induced dynamics of the non-genetic traits of carriers of the resident trait z in the mutant patch. These dynamics are complicated as, in contrast to carriers of the genetic mutant, individuals carrying the resident genetic trait z in the mutant patch may be philopatric or immigrants. In addition, effects of the genetic mutant on the non-genetic trait of a resident individual will depend on when the local lineage of this resident individual was initiated into the mutant patch (i.e., when the ancestor of a resident individual first immigrated in the mutant patch). We thus have to consider different classes of resident individuals in the mutant patch.
New resident immigrant. Let us first consider a carrier of the resident trait z at generation t that has just immigrated into the focal patch. By r t ,t , we denote the non-genetic trait of a carrier of the resident at generation t (first subscript of r t ,t ) that has immigrated into the mutant patch at generation t (second subscript of r t ,t ; as a reminder, the number of such carriers is R t ,t , see Appendix A). From eq. (2) of the main text, the non-genetic trait of such a new resident immigrant is, which reflects that a new immigrant cannot experience vertical ecological inheritance (as its genetic parent is absent from the patch it lands in).
Philopatric resident. By contrast, philopatric carriers of the resident genetic trait do have a local parent and their non-genetic trait can therefore be preferentially transmitted vertically from their parent. However, the dynamics of the non-genetic trait along such a local resident lineage depends on precisely when this lineage was initiated, i.e., when its first local ancestor immigrated into the mutant patch. To distinguish between these different cohorts of residents, we let r t ,t −h denote the non-genetic trait of a carrier of the genetic resident at generation t whose local lineage in the mutant patch was initiated 1 ≤ h ≤ t generations before (as a reminder, the number of such carriers is R t ,t −h , see Appendix A). Using eq. (1) of the main text, such non-genetic trait is given by so that at any generation, carriers of the resident genetic trait can potentially express many different nongenetic traits in the mutant patch, depending on the history of the interactions between their local lineage and the lineage of the mutant.

C.1.3 Average non-genetic trait in the mutant patch
For our analysis of selection, we further need to characterise, t , the average non-genetic trait in the mutant patch at time t . From the above definitions (eqs. (C-1)-(C-3)), the patch average non-genetic trait is given by

C.2 Conditional effects of the genetic mutant on non-genetic traits in the mutant patch
Next, we use eqs. (C-1)-(C-4) to characterize the effect of the genetic mutant z m on the genetic traits expressed in the mutant patch at an arbitrary generation t , conditional on a specific sequence of genetic-demographic states H t . Specifically, our goal here is to characterize: given a realized sequence H t in the mutant patch. We will then marginalise these effects over the relevant mutant-experienced distribution, q ○ t (H t ), of such genetic-demographic states H t to finally obtain E and E in section C.3 ( eqs. (B-14)-(B-15)).
First, we take the derivative of both sides of equations (C-1), (C-2) and (C-3) to obtain the following recursions for the effect of the genetic mutant on non-genetic traits in the mutant patch, (4) and eq. (5); all these effects depend on resident z, but we do not write these dependencies explicitly in the appendix). Similarly, by taking the derivative of both sides of eq. (C-4), the effect on the average non-genetic trait at time t is (C-7) The dynamical system described by eq. (C-6) has initial conditions, where M 0 = 1 as a single mutant appears in the mutant patch at time t = 0. Combining eqs. (C-7)-(C-8), the initial condition of the average effect is ∂ 0 Given a realized sequence of genetic-demographic states H t , eqs. (C-6)-(C-9) describe a discrete dynamical system in time t whose solution gives us eq. (C-5). In principle, one could therefore solve this system and then marginalise the solution over q ○ t (H t ) to obtain E and E (eqs. (B-14)-(B-15)). However, given the dimensionality of the dynamical system we are considering (up to t +2 dimensions at each time step t = 0, 1, . . .), such a strategy seems to be extremely complicated. We will therefore rely on an alternative argument, as elaborated in the next section.

C.3 Unconditional effects of the genetic mutant on non-genetic traits in the mutant patch
We proceed to marginalise eq. (C-5) over q ○ t (H t ) using eqs. (C-6)-(C-9) to obtain E and E (eqs. (B-14)-(B-15)). To do so, note first that using eq. (B-3), we can re-write E and E as , (C-10) where E ○ [⋅] represents expectation taken under neutrality (over Pr ○ (H t )), and Our strategy is to first derive I and J , which we will then plug back into eq. (C-10).
We start by characterising I . Multiplying both sides of the equation on the first line of eq. (C-6) by M t n and taking expectation under neutrality, we obtain using eqs. (B-12) and (C-10).
We proceed similarly to derive an identity for E from J (eq. (C-11)). First, we multiply both sides of eq. (C-7) by M t n to give, into which we substitute eq. (C-6) to obtain, for t ≥ 1. Re-arranging the above and using the fact that n = M t + ∑ t h=0 R t ,t −h , we get, n .
(C-25) Taking the expectation of both sides of eq. (C-25) leads us to (C-26) which can be rewritten as (C-27) using the properties of conditional expectation (eq. (C-13)).
We can then use eq. (C-15) to evaluate the conditional expectations that appear in eq. (C-27), Substituting eqs. (C-17) and (C-28)-(C-30) into eq. (C-27) and some re-arrangements allows us to write, n . (C-31) However, note that from eq. (C-7), the term within the expectation operator on the second line of eq. (C-31) can be re-written as for eq. (C-31). Summing both sides of eq. (C-33) from t = 1 to infinity and using eq. (C-11) then gives us i.e., an identity in terms of E and E.
Solving eqs. (C-22) and (C-37) simultaneously for E and E, we eventually get, -38) which are equivalent to eqs. (11)- (14) and (16)- (19) of the main text, in which we have decomposed eq. (C-38) into different components according to effects that occur within-and between-generations, as well as effects due to deterministic or stochastic genetic fluctuations. To see how we obtain this decomposition, consider first eqs. (C-22) and (C-37) in the absence of trans-generational effects (i.e., no ecological inheritance, F v = F o = 0), (C-39) These are precisely the intra-generational effects, E W and E W , given in the main text (eq. (12) and (17)). Second, let us ignore stochasticity stemming from genetic fluctuations in the mutant patch, i.e., instead of eqs. (C-28)-(C-30), we use a deterministic approximation, (C-40) so that in effect, we ignore variance in genetic-demographic state in the mutant patch and just consider deterministic changes in state. Substituting eqs. (C-17) and (C-40) into eq. (C-27) and following the same argument as above, we eventually obtain the system (C-41) The solution of this system is , (C-42) i.e., the sum of within-generation effects (eq. (C-39)) and deterministic trans-generational effects as described in the main text (eq. (13) without ∆ (z) and eq. (18) without ∆ (z)). Finally, deducting eq. (C-42) from eq. (C-38), we are left with ∆ (z) and ∆ (z) as given in the main text, eqs. (14) and (19), which thus capture trans-generational effects due to stochastic fluctuations in the genetic-demographic state of the mutant patch.

D Trans-generational feedback effects of social learning
The functions, φ(z) and ψ(z), which feature in the expression for the trans-generational effects of social learning eq. (36) of the main text, are given by