Evo-devo dynamics of hominin brain size

Brain size tripled in the human lineage over four million years, but why this occurred remains uncertain. To advance our understanding of what caused hominin-brain expansion, I mechanistically replicate it in-silico by modelling the evolutionary and developmental (evo-devo) dynamics of hominin-brain size. I show that, starting from australopithecine brain and body sizes, the model recovers the evolution of brain and body sizes of seven hominin species, the evolution of the hominin brain-body allometry, and major patterns of human development and evolution. Analysis shows that in this model the brain expands because it is “socio-genetically” correlated with developmentally late preovulatory ovarian follicles, not because brain size is directly selected for. The socio-genetic correlation causing the recovered hominin brain expansion is generated over development by ecology and possibly culture. Thus, in this model, direct selection that does not favour brain expansion provides a force that developmental constraints divert causing hominin-brain expansion.


Introduction 1
The human brain provides the hardware for stunning 2 achievements, but why it evolved remains unresolved.dence that a challenging ecology 7;15;22 and possibly culture 14;19;21 rather than social interactions 6;9;12;16 could have caused hominin brain expansion.In the model, a challenging ecology, where individuals need brainsupported skills to obtain energy, promotes brain expansion 36 .If additionally, learning has weakly, not strongly, diminishing returns, then human-sized brains and bodies can evolve 37 .Although the model does not explicitly model cultural dynamics, weakly diminishing returns of learning could in principle arise from culture if skilled individuals can keep learning from accumulated knowledge in the population 37 .Thus, in the model, hominin brain expansion needs both a challenging ecology and possibly culture, presumably to reap the benefits in adulthood of investing in growing large brains during childhood.In contrast, conflicting interests between social partners enable evolutionary arms races in brain size as proposed by influential hypotheses 6;9;16 , but the arms races fail to yield evolutionarily stable human-sized brains and bodies given their metabolic costs 37 .In turn, cooperation 12 disfavours brain size evolution as individuals can rely on social partners' brains to overcome ecological challenges and so can avoid investing in growing an expensive brain 37 .The model has incorporated basic aspects of leading hypotheses without explicitly modelling every aspect such as information manipulation or relationship management 12 .Doing so has not been necessary to obtain the evolution of human-sized brains and bodies given the data used for parameter values.
The brain model makes quantitative predictions by explicitly considering development, that is, the construction of the phenotype over life.In particular, the model describes the construction of brain and body sizes over life using energy conservation analysis following the approach of West et al. 38 .West et al. use energy conservation analysis to obtain an equation describing the developmental dynamics of body size depending on param-eters measuring metabolic costs that can be easily estimated from data 38 .The brain model implements West et al.'s approach to obtain equations describing the developmental dynamics of brain, reproductive, and somatic tissue sizes depending additionally on genotypic traits controlling energy allocation to the production of each tissue at each age 36 .For simplicity, reproductive tissue is defined in the model as preovulatory ovarian follicles which determine fertility given that the model considers only females.The developmentally dynamic equations define the developmental constraints, as the phenotype is constrained to satisfy such equations.The brain model thus depends on parameters measuring brain metabolic costs, which are thought to be a key reason not to evolve large brains 11;17 and which are easily estimated from existing data 39 .In the model, the genotypic traits evolve, which leads to the evolution of brain and body sizes in kg, whose units arise from the empirically estimated metabolic costs.The model has identified key parameters that have strong effects on brain size evolution and particular parameter values that enable the evolution of human-scale brains and bodies 36;37 (Table 1).
However, further understanding from the brain model has been hindered by the long-standing lack of mathematical synthesis between development and evolution [40][41][42] .To consider developmental dynamics, the brain model was evolutionarily static: it had to assume evolutionary equilibrium where fitness is maximised and so was analysed using dynamic optimisation, specifically using optimal control theory as is standard in life history theory [43][44][45][46] .This was done because of the longstanding lack of mathematical integration of development and evolution, which meant that there were no tractable methods to mathematically model the evolutionary and developmental dynamics of the brain model.Indeed, approaches available at the time that mathematically integrated developmental and evolutionary dynamics required computation of functional derivatives and solution of integro-differential equations 47;48 , both of which are prohibitively challenging for the relatively complex brain model.Yet, considering the evolutionary dynamics could yield richer insight.For instance, a debated topic is the roles of selection and constraint in brain evolution, often studied with correlational approaches [49][50][51][52][53] .Considering the evolutionary dynamics in the brain model could enable causal analyses of these roles in hominin brain expansion.Indeed, the short-term evolutionary dynamics can be described as the product of direct selection and genetic covariation assuming negligible genetic evolution 54;55 , where genetic covariation is a key descriptor of evolutionary constraints 54;56;57 .Using this separation, Grabowski found that selection for brain size drove brain and body size increases from A. afarensis to H. sapiens assuming constant genetic covariation for the duration of a species existence 58 .Yet, the lack of mathematical integration of developmental and evolutionary dynamics has meant that there is a lack of tools to separate selection from constraint in long-term evolution, without assuming negligible genetic evolution.
A solution to these difficulties is offered by a recent mathematical framework -hereafter, evo-devo dynam-ics framework -that integrates evolutionary and devel-134 opmental (evo-devo) dynamics allowing for mathemati-135 cally modelling the evo-devo dynamics for a broad class 136 of models 59 .This framework provides equations that 137 separate the effects of selection and constraint for long-138 term evolution under non-negligible genetic evolution 139 and evolving genetic covariation.Moreover, the frame-140 work provides equations to analyse what selection acts 141 on in the model, how brain metabolic costs translate into 142 fitness costs, and how brain size development translates 143 into genetic covariation.

144
To gain a deeper understanding of why hominin brain 145 expansion could have occurred, here I implement the 146 brain model 37 in the evo-devo dynamics framework 59 .147 This yields a model of the evo-devo dynamics of hominin 148 brain size that mechanistically recovers in silico the ho-149 minin brain expansion from australopithecines to mod-150 ern humans and multiple observations of human evo-151 lution and development.This evo-devo dynamics ap-152 proach enables deeper analysis showing that hominin 153 brain expansion occurs in the model because of direct 154 selection on follicle count rather than on brain size (Ex-155 tended Data Fig. 1).The brain expands in the model 156 because ecology and possibly culture make brain size 157 and developmentally late follicle count "mechanistically 158 socio-genetically" correlated.This notion is similar to 159 that of genetic covariation in quantitative genetics but 160 differs in two aspects.First, "mechanistic" genetic co-161 variation arises from a mechanistic description of devel-162 opment rather than from a regression-based description 163 as in quantitative genetics, which allows one to model 164 long-term rather than only short-term phenotypic evo-165 lution 59;60 .Second, "socio-genetic" covariation consid-166 ers not only heredity but also the stabilization (legacy) of 167 the phenotype due to social development, that is, how 168 phenotype construction depends on social partners 59;60 , 169 which includes a mechanistic description of indirect ge-170 netic effects 61 .Social development in the brain model oc-171 curs because of cooperation and competition for energy 172 extraction.This mechanistic treatment shows that brain 173 metabolic costs in the model are not direct fitness costs 174 but affect mechanistic socio-genetic covariation, and that 175 the evolutionary role of ecology and culture in the recov-176 ered hominin brain expansion is not to affect direct fit-177 ness costs or benefits but to generate the socio-genetic 178 covariation that causes brain expansion.

179
I provide an overview of the model in Methods.I de-180 scribe the model in detail and derive the necessary equa-181 tions for the evo-devo analysis in the Supplementary In-182 formation (SI).I provide in the SI the computer code 62 written in the freely accessible and computationally fast 184 Julia programming language 63 .tion.
Letting evolution proceed, I find that the evolved brain and body sizes strongly depend on the ancestral genotypic traits.For instance, under the sapiens scenario, the ancestral genotypic traits must develop large bodies, otherwise brain size may collapse over evolution (Figs.S4).This may be interpreted as a requirement to evolve from ancestors that had a genotype capable of leading to body growth while facing cooperative and between-group competition challenges.Moreover, the developmental patterns that evolve strongly depend on the ancestral genotypic traits, even if the evolved adult brain and body sizes are the same.The dependence of the evolved traits on ancestral conditions is sometimes called phylogenetic constraints, which are typically assumed to disappear with enough evolutionary time 67 .The evodevo dynamics framework finds that phylogenetic constraints do not necessarily disappear with enough time because genetic constraints are necessarily absolute in long-term evolution 59 .This is because there is sociogenetic covariation only along the path where the developmental constraint is met (so L z in Eq.M5, a mechanistic, generalised analogue of Lande's 54 G matrix, is singular) which means that the evolutionary outcome depends on the evolutionarily initial conditions 68;59 .
To identify suitable ancestral genotypic traits to model hominin brain expansion, I consider naive ancestral genotypic traits (termed somewhatNaive2) under the afarensis scenario.These naive ancestral genotypic traits are such that ancestrally each individual has a high energy allocation to somatic growth at birth and developmentally increasing thereafter, a small allocation to brain growth at birth and developmentally decreasing thereafter, nearly zero allocation to follicle production from birth to 10 years of age, and very small but larger allocation to follicle production from 10 years of age onwards (blue dots in Fig. S1d-f ).These ancestral genotypic traits cause individuals to develop brain and body sizes of australopithecine scale, most closely approaching those of Paranthropus boisei (initial evolutionary time of bottom trajectory in Fig. 2b and blue dots in Extended Fig. 2a,c).With this ancestral genotype, letting evolution proceed under the afarensis scenario yields the evolution of australopithecine brain and body sizes, most closely approaching those of P. robustus (bottom trajectory in Fig. 2b).Setting the evolved genotypic traits under this afarensis scenario as ancestral genotypic traits and switching parameter values to the sapiens scenario yields an immediate plastic change in the developed brain and body sizes approaching those seen in habilis (initial evolutionary time of top trajectory in Fig. 2b).Letting evolution proceed yields the evolution of H. sapiens brain and body sizes (top trajectory in Fig. 2b).This evolutionary trajectory approaches the observed brain-body allometry in hominins starting from brain and body sizes of australopithecine scale, with a slope of 1.03 (Fig. 2b).
The switch from the afarensis to the sapiens scenario involves a sharp decrease in cooperative challenges, a sharp increase in ecological challenges, and a shift from strongly to weakly diminishing returns of learning (Fig. 1).While these changes are here implemented suddenly and so lead to an immediate plastic response, the changes may be gradual allowing for genetic evolution.

Evo-devo dynamics of brain size
Further detail of the recovered hominin brain expansion is available by examining the evo-devo dynamics that underlie the sapiens trajectory in Fig. 2b.Such trajectory arises from the evolution of genotypic traits controlling energy allocation to growth.This evolution of energy allocation yields the following evo-devo dynamics in the phenotype.
Adult brain size more than doubles from around 0.6 kg to around 1.3 kg closely approaching that observed in modern human females 69;70;39 (Fig. 3a).
In the model, the developmental onset of reproduction occurs when follicle count (in mass units) becomes appreciably non-zero and gives the age of "menarche".
Body size ancestrally grows quickly over development and reaches a small size of around 30 kg (blue dots in Fig. 3c), and then evolves so it grows more slowly to a bigger size of around 50 kg (red dots in Fig. 3c), consistent with empirical analyses 71;76 .Body size evolves from a smooth developmental pattern with one growth spurt to a kinked pattern with multiple growth spurts, which are most easily seen as peaks in a weight velocity plot 77;71;78 (Fig. S2o inset).The evolved number and pattern of growth spurts strongly depend on the ancestral genotype (Fig. S6o inset).The evolved age at menarche occurs before the last growth spurt (Fig. 3b,c), in contrast to observation 71 and previous results 37 .
Adult skill level evolves expanding from around 2 TB to 4 TB, the units of which arise from the used value of the metabolic cost of memory which is within an empirically informed range 79 (Fig. 3d).
The evolved developmental growth rates of phenotypic traits are slower than and somewhat different from those observed and those obtained in the previous optimisation approach 37 , which was already delayed possibly because the developmental Kleiber's law I use underestimates resting metabolic rate at small body sizes (Fig. C in ref. 36 ; Fig. S2B in ref. 80 ).The added developmental delays could be partly due to my use of relatively coarse age bins (0.1 year) rather than the (nearly) continuous age used previously 37 , but halving age bin size (0.05 year) yields the same results (Fig. S3).The added developmental delays might also be partly because of slow evolutionary convergence to equilibrium, and because the evolved ontogenetic pattern depends on the ancestral genotypic traits (compare the red dots of Figs.3a and S6h).
These patterns generate associated expansions in adult brain, body, and encephalisation quotient (EQ) 49 (Fig. 3eg).EQ measures here brain size relative to the expected brain size for a given mammal body size 81 .Adult brain size expands more sharply than adult body size (Fig. 3e,f).
Consequently, adult brain size evolves from being ancestrally slightly over 4 times larger than expected to being about 6 times larger than expected (Fig. 3g).Thus, the 370 brain expands beyond what would be expected from body 371 expansion alone.

372
The evo-devo dynamics of brain and body sizes that 373 underlie the afarensis trajectory in Fig. 2b are shown in 374 Extended Data Fig. 2. The evolved body size under the 375 afarensis scenario shows mild indeterminate body growth 376 (red dots in Extended Data Fig. 2c), reminiscent of that 377 in female bonobos (Fig. 6 of ref. 82 ).Such indetermi-378 nate body growth disappears with the plastic change in-379 duced by changing to the conditions of the sapiens sce-380 nario (blue dots in Fig. 3c).

Analysis of the action of selection 382
To understand what causes the obtained brain expan-383 sion, I now analyse direct selection and genetic covaria-384 tion which formally separate the action of selection and 385 constraint on evolution.Such formal separation was first 386 formulated for short-term evolution under the assump-387 tion of negligible genetic evolution 54;55 and is now avail-388 able for long-term evolution under non-negligible ge-389 netic evolution 59 .

390
I first analyse the action of selection.In the brain 391 model, fertility is proportional to follicle count whereas 392 survival is constant as a first approximation.Then, in the 393 brain model there is always positive direct selection for 394 ever-increasing follicle count, but there is no direct se-395 lection for brain size, body size, skill level, or anything 396 else (Fig. 4a-d; Eq.M3; Extended Data Fig. 1).The fitness 397 landscape has no internal peaks and direct selection only 398 favours an ever higher follicle count (Fig. 5).Since there 399 is only direct selection for follicle count, the evolutionary 400 dynamics of brain size xba at age a satisfy where ι is a non-negative scalar measuring mutational in-402 put, L x ba ,x r j is the mechanistic additive socio-genetic co-403 variance between brain size at age a and follicle count at 404 age j , w j is fitness at age j , and ∂w j /∂x r j is the direct se-405 lection gradient of follicle count at age j .Eq. ( 1) shows 406 that brain size evolves in the brain model because brain 407 size is socio-genetically correlated with follicle count (i.e., 408 setting the socio-genetic covariation between brain and 409 follicle count to zero in Eq. 1, so L x ba ,x r j = 0 for all ages a 410 and j , yields no brain size evolution).

411
Brain size and follicle count are socio-genetically cor-412 related in the model because of development.To see this, 413 consider the mechanistic additive socio-genetic cross-414 covariance matrix of the phenotype, given by 415 (L for legacy).Here b x is the mechanistic breeding value of 416 the phenotype and b s x is the stabilised mechanistic breed-417 ing value, which is a generalisation of the former and con-418 siders the effects of social development.In turn, H y is the 419 mutational covariance matrix, dx /dy is the matrix of to-420 tal effects of the genotype on the phenotype, and sx/sy 421 is the matrix of stabilised effects of the genotype on the phenotype, where stabilised effects are the total effects af-  ancestrally very small and decreases toward zero as evo-473 lution proceeds (Fig. 4f ).This means evolution stops be-474 cause there is no longer socio-genetic variation in the direction of direct selection.The population size expands 476 as the brain expands (Fig. 4g), although it decreases when 477 shifting from the afarensis scenario to the sapiens sce-478 nario due to the plastic change in phenotype (Fig. S7n).

Analysis of the action of constraint
To gain further insight into what causes the recovered brain expansion, I now analyse the action of constraint.Since there is only direct selection for follicle count, the equation describing long-term evolution (Eq.M5) entails that whether or not a trait evolves in the model is dictated by whether or not there is mechanistic socio-genetic covariation between the trait and follicle count (e.g., Eq. 1).
Examination of such covariation shows that brain expansion in the model is caused by positive socio-genetic covariation between brain size and developmentally late follicle count.The mechanistic socio-genetic covariation of brain size with follicle count, and how such covariation evolves, is shown in Fig. 6.Ancestrally, socio-genetic covariation between brain size and developmentally early follicle count is negative (black area in Fig. 6a), but between brain size and developmentally late follicle count is slightly positive (orange area in Fig. 6a).This positive covariation is what causes brain expansion.This pattern of socio-genetic covariation is maintained as brain expansion proceeds, but developmentally early brain size becomes less socio-genetically covariant with follicle count and so stops evolving, whereas developmentally later brain size becomes socio-genetically covariant with increasingly developmentally later follicle count.The magnitude of covariation also evolves (Fig. 6a-d).
Hence, direct selection on developmentally late follicle count provides a force for follicle count increase, and socio-genetic covariation between brain size and developmentally late follicle count diverts this force and causes brain expansion.This occurs even though the force of selection is weaker at advanced ages 84 (i.e., slopes are negative in Fig. 4b), which is compensated by developmentally increasing socio-genetic covariation with follicle count.Such covariation can arise because of developmental propagation of phenotypic effects of mutations 60 .Therefore, ecology and culture cause brain expansion in the model by generating positive socio-genetic covariation over development between brain size and developmentally late follicle count.
The socio-genetic covariation between body size and follicle count, and between skill level and follicle count follow a similar pattern (Extended Data Fig. 4a-h).Hence, the evolutionary expansion in body size and skill level in the model are also caused by their positive socio-genetic covariation with developmentally late follicle count.
The evolution of follicle count is governed by a different pattern of socio-genetic covariation.Developmentally early follicle count evolves smaller values because of negative socio-genetic covariation with developmentally late follicle count (Extended Data Fig. 4i-l).In turn, developmentally late follicle count evolves higher values because of positive socio-genetic covariation with developmentally late follicle count (Extended Data Fig. 4i-l).Positive socio-genetic covariance between follicle count of different ages is clustered at the ages where follicle count developmentally increases most sharply (Fig. 3b).This cluster of positive socio-genetic covariation evolves to later ages (Extended Data Fig. 4j-l), corresponding to the evolved ages of peak developmental growth in follicle count (Fig. 3b).This cluster of positive socio-genetic covariation has little effect on follicle count evolution as fol- The findings here show that while constraints do prevent evolutionary change in some directions, constraints can be "generative" 88 in the sense that they can divert evolutionary change in a direction that causes brain expansion, such that without those constraints brain expansion is not favoured by selection and does not evolve.
The results above contrast with a previous study finding that direct selection on brain size drove brain expansion in hominins 58 .Such a study used the short-term restricted Lande equation 54;55 for this long-term inference.I used analogous equations 59 that describe longterm evolution and that separate the evolutionary effects of developmental constraints and direct selection -a separation that has otherwise not been clear-cut 57 .
My approach illustrates why the human brain size could have evolved, but it has not established why it did.Yet, this approach can be built upon to pursue that goal.There is scope for refinement of the model, for improved parameter estimates, and for other models to improve predictions as those obtained are near but do not exactly match observation, particularly in the ontogenetic patterns.Rapidly advancing techniques of simulation-based inference may then be used for model selection, parameter estimation, and uncertainty quantification 31 .These techniques have been instrumental in multiple fields such as in the discovery of the Higgs boson 31 or in establishing that humans are causing climate change.Such simulation-based inference was impractical with the previous dynamic optimisation approach, as a single run took approximately 3 days 37 , the runs are not easy to parallelise as suitable initial guesses are needed for the genotypic traits, and simulation-based inference needs hundreds of thousands of runs.This meant that simulation-based inference would have taken about 800 years.In contrast, a run here took approximately 4 minutes, indicating that simulation-based inference with the evo-devo dynamics approach could take months.This computational speed suggests that simulation-based inference 31 of human brain size evolution may now be feasible.

Methods
Model overview.The evo-devo dynamics framework I use 59 is based on standard adaptive dynamics assumptions 89;90 .The framework considers a resident, wellmixed, finite population with deterministic population dynamics where individuals can be of different ages, reproduction is clonal, and mutation is rare (mutants arise after previous mutants have fixed) and weak (mutant genotypes are marginally different from the resident genotype).Under these assumptions, population dynamics occur in a fast ecological timescale and evolutionary dynamics occur in a slow evolutionary timescale.Individuals have genotypic traits, collectively called the genotype, that are under direct genetic control.As mutation is weak, there is vanishingly small variation in genotypic traits (marginally small mutational variance).Also, individuals have phenotypic traits, collectively called the phenotype, that are developed, that is, constructed over life.A function g a , called the developmental map, describes how the phenotype is constructed over life and gives the developmental constraint.The developmental map can be non-linear, evolve, change over development, and take any differentiable form with respect to its arguments, but the phenotype at the initial age (here, newborns) is constant and does not evolve as is standard in life history theory.Mutant individuals of age a have fertility f a (rate of offspring production) and survive to the next age with probability p a .The evo-devo dynamics framework provides equations describing the evolutionary dynamics of genotypic and phenotypic traits in gradient form, thus describing long-term genotypic and phenotypic evolution as the climbing of a fitness landscape while guaranteeing that the developmental constraint is met at all times.
The brain model 36;37 provides a specific developmental map g a , fertility f a , and survival p a , which can be fed into the evo-devo dynamics framework to model the evolutionary dynamics of the developed traits studied.More specifically, the brain model considers a female population, where each individual at each age has three tissue types -brain, reproductive, and remaining somatic tissues -and a skill level.Reproductive tissue is defined as referring to pre-ovulatory ovarian follicles, so that reproductive tissue is not involved in offspring maintenance, which allows for writing fertility as being proportional to follicle count (in mass units), in accordance to observation 91 .As a first approximation, the brain model lets the survival probability at each age be constant.At each age, each individual has an energy budget per unit time, her resting metabolic rate B rest , that she uses to grow and maintain her tissues.The part of this energy budget used in growing her tissues is her growth metabolic rate B syn .
A fraction of the energy consumed by the preovulatory follicles is for producing offspring, whereas a fraction of the energy consumed by the brain is for gaining (learning) and maintaining (memory) skills.Each individual's skill level emerges from this energy bookkeeping rather than being assumed as given by brain size.Somatic tissue does not have a specific function but it affects body size, thus affecting the energy budget because of Kleiber's law 92 which relates resting metabolic rate to body size by a power law.Genes control the individual's energy allocation effort into producing brain tissue, preovulatory follicles, and somatic tissue at each age.The causal dependencies in the brain model are described in Extended Data Fig. 1, which uses the insights from the evo-devo dynamics framework, in particular, the separation of direct and total effects on fitness in the model.
I write the brain model with the notation of the evodevo dynamics framework as follows.The model considers four phenotypic traits (i.e., N p = 4): brain mass, follicle count (in mass units), somatic tissue mass, and skill level at each age.For a mutant individual, the brain size at age a ∈ {1, . . ., N a } is x ba (in kg), the follicle count at age a is x ra (in kg), the size of the remaining somatic tissue at age a is x sa (in kg), and the skill level at age a is x ka (in terabytes, TB).The units of phenotypic traits (kg and TB) arise from the units of the parameters measuring the unit-specific metabolic costs of maintenance and growth of the respective trait.The vector x a = (x ba , x ra , x sa , x ka ) 717 is the mutant phenotype at age a.Additionally, the model 718 considers three genotypic traits (i.e., N g = 3): the effort to 719 produce brain tissue, preovulatory follicles, and somatic 720 tissue at each age.For a mutant individual, the effort at 721 age a to produce: brain tissue is y ba , follicles is y ra , and 722 somatic tissue is y sa .These growth efforts are dimension-723 less and can be positive or negative, so they can be seen as 724 measured as the difference from a baseline growth effort.725  The vector y a = (y ba , y ra , y sa ) is the mutant growth effort 726 at age a, which describes the mutant genotypic traits at 727 that age.;37 ; we consider y's rather than 731 q's as the genotypic traits as the y's do not need to be be-732 tween zero and one nor add up to one, so numerical so-733 lution is simpler).To describe the evolutionary dynamics 734 of the phenotype as the climbing of a fitness landscape, 735 the evo-devo dynamics framework defines the mutant 736 geno-phenotype at age a as the vector z a = (x a ; y a ) (the 737 semicolon indicates a linebreak).The mutant phenotype 738 across ages is x = (x 1 ; . . .; x N a ), and similarly for the other 739 variables.While x a is a mutant's phenotype across traits 740 at age a, we denote the mutant's i -th phenotype across 741 ages as x i • = (x i 1 , . . ., x i N a ) for i ∈ {b, r, s, k}.The mutant's 742 i -th genotypic trait across ages is y i • = (y i 1 , . . ., y i N a ) for 743 i ∈ {b, r, s}.The resident traits are analogously denoted 744 with an overbar (e.g., x).

745
The brain model describes development by providing 746 equations describing the developmental dynamics of the 747 phenotype.That is, the mutant phenotype at age a + 1 is 748 given by the developmental constraint 749 x a+1 = g a (x a , y a , xka ). (M1) The equations for the developmental map g a are given in 750 section S1.The evo-devo dynamics are described by the devel-762 opmental dynamics of the phenotypic traits given by 763 Eq. (M1) and by the evolutionary dynamics of the geno-764 typic traits.The latter are given by the canonical equation 765 of adaptive dynamics  since z = (x; y) includes the phenotype x and genotypic traits y.The vector ∂w/∂z is the direct selection gradient of the geno-phenotype (as in Lande's 54 selection gradient of the phenotype).The matrix L z is the mechanistic additive socio-genetic cross-covariance matrix of the geno-phenotype, for which the evo-devo dynamics framework provides formulas that guarantee that the developmental constraint (M1) is met at all times.The matrix L z is asymmetric due to social development; if individuals face only ecological challenges, development is not social and L z reduces to H z , the mechanistic additive genetic covariance matrix of the geno-phenotype, which is symmetric (H x is a mechanistic version of Lande's 54 G matrix: whereas H x involves total derivatives describing the total effect of genotype on phenotype, G is defined in terms of regression of phenotype on genotype; hence, H x and G have different properties including that mechanistic heritability can be greater than one).The matrix L z is always singular because it considers both the phenotype and genotypic traits, so selection and development jointly define the evolutionary outcomes even with a single fitness peak 60 .Eq. (M5) and the formulas for L z entail that evolution proceeds as the climbing of the fitness landscape in geno-phenotype space, where the developmental constraint (M1) provides the admissible evolutionary path, such that evolutionary outcomes occur at path peaks rather than landscape peaks if there are no absolute mutational constraints 60 .
I implement the developmental map of the brain model into the evo-devo dynamics framework to study the evolutionary dynamics of the resident phenotype x, including the resident brain size xb• .
Seven hominin scenarios.It was previously found 37 that, at evolutionary equilibrium, the brain model recovers the evolution of the adult brain and body sizes of six Homo species and less accurately of Australopithecus afarensis.The parameter values yielding these seven outcomes are described in Fig. 1.I call each such parameter combination a scenario.The sapiens, neardenthalensis, and heidelbergensis scenarios use weakly diminishing returns of learning and submultiplicative cooperation: specifically, these scenarios use exponential competence with parameter values given in Regime 1 of Table S2 (Eq.S5).I call ecological scenario that with such weakly diminishing returns of learning and submultiplicative cooperation but setting the proportion of ecological challenges to one (P 1 = 1), which was previously 36 found to yield the evolution of brain and body sizes of Neanderthal scale at evolutionary equilibrium.The erectus, ergaster, and habilis scenarios use strongly diminishing returns of learning and additive cooperation: specifically, these scenarios use power competence with parameter values given in Regime 2 of Table S2 and with additive cooperation (Eq.S5).The afarensis scenario uses strongly diminishing returns of learning and submultiplicative cooperation; that is, power competence with parameter values given in Regime 2 of Table S2 (Eq.S5).In the main text, I primarily describe results under the sapiens scenario.In the SI, I also give analogous results under the afarensis (Figs.S1, S7, and S9) and ecological (Fig. S5) scenarios.
becoming totally selected for throughout life (Extended Data Fig. 3c).Total selection for skill level ancestrally fluctuates but decreases across life, decreasing but remaining positive throughout life as evolution proceeds (Extended Data Fig. 3d).Thus, total selection still favours evolutionary change in the phenotype at evolutionary equilibrium, but change is no longer possible (red dots in Extended Data Fig. 3a-d are at non-zero values).This means that evolution does not and cannot reach the favoured total level of phenotypic change in the model.
Although evolution does not reach the favoured total level of phenotypic change in the model, it does reach the favoured total level of genotypic change because of the assumption of no absolute mutational constraints.Total selection for the genotypic trait of brain growth effort is ancestrally positive early in life and evolves toward zero (Extended Data Fig. 3e).Total genotypic selection for follicle production is also ancestrally positive early in life, transiently evolves to negative, and eventually approaches zero (Extended Data Fig. 3f).Total genotypic selection for somatic growth effort is ancestrally negative early in life and evolves toward zero (Extended Data Fig. 3g).The evolved lack of total genotypic selection means that evolution approaches the favoured total level of genotypic change.This also means that evolution stops at a path peak on the fitness landscape (Fig. 5).
The occurrence of total selection for brain size or skill level may suggest that this total selection causes brain expansion in the model, but in the recovered brain expansion total selection can change the evolved brain size only due to change in the developmental constraints.This is because total selection equals the product of direct selection and total developmental bias (Eqs.M4 and S34), and in the model changing EETBs or the shape of EEE does not affect the direction of direct selection but only the direction of total developmental bias by affecting the developmental constraints.Thus, varying EETBs or the shape of EEE affects total selection in the evolved brain and body sizes only because the developmental constraints are changed rather than direct selection.
Total fitness effects of metabolic costs.While brain metabolic costs do not entail direct fitness costs in the model (i.e., ∂w/∂B b = 0), they may entail total fitness costs (i.e., dw/dB b = 0) and these can be computed using formulas from the evo-devo dynamics framework (SI section S8).Using these formulas shows that metabolic costs of maintenance may be total fitness costs at some ages but benefits at some other ages over the sapiens trajectory (Fig. S12).Consequently, the metabolic cost of brain maintenance is a total fitness benefit at evolutionary time 1 (dw/dB b = N a a=1 dw/dB ba = 2.1 × 10 −6 kg y/MJ), and a total fitness cost at evolutionary times 10, 100, and 500 (−1.5 × 10 −5 kg y/MJ, −2 × 10 −5 kg y/MJ, and −1.7 × 10 −5 kg y/MJ, respectively).Moreover, among tissues, the metabolic cost of somatic maintenance (i-l) has some of the most substantial total fitness effects even tough it is the smallest metabolic cost of maintenance (Fig. S12), perhaps due to the large size of somatic tissue.Total fitness costs also confound the action of se-lection and constraint as they depend on development rather than only on selection.That is, total fitness costs share components with genetic covariation.
Table 1: Key parameters.Human-scale brains and bodies evolve under these parameter values in the brain model.Changing one of these parameters at a time may substantially change the evolved brain or body sizes or their ontogenetic growth, even causing the evolutionary collapse of brain size (Figs.6 and R of ref. 36 and Extended Data Fig. 3 of ref. 37 ).*Estimated from empirical data 97;39 .†Empirically informed 98;79  e r e c t u s a f a r e n s is 90% 10% Data Model Figure 1: Evolution of brain and body sizes of seven hominin species solely by changing socio-genetic covariation.Adult brain and body sizes of seven hominin species evolve in the model only by changing the EETB, the returns of learning, and how the skills of cooperating partners interact.;69;99-103 ).Dots are the evolved values in the model for a 40-year-old using the evo-devo dynamics approach.Pie charts give the EETB used in each scenario.The returns of learning are either strongly diminishing (power competence) for the left 4 scenarios or weakly diminishing (exponential competence) for the right 3 scenarios.Cooperation is either submultiplicative for the afarensis and right 3 scenarios, or additive for the remaining scenarios.These EETBs and shapes of EEE were previously identified as evolving best fitting adult brain and body sizes for the corresponding species assuming evolutionary equilibrium 37 .In principle, weakly diminishing returns of learning might arise from culture.I will show that varying EETBs and the shape of EEE only varies sociogenetic covariation L z , but not the direction of direct selection ∂w/∂z or where it is zero (it never is).I refer to the particular EETB and shape of EEE yielding the evolution of adult brain and body sizes of a given species as the species scenario.For the afarensis scenario, the ancestral genotypic traits are somewhatNaive2 (Eqs.S46).For the remaining six scenarios, the ancestral genotypic traits are the final genotypic traits of the afarensis scenario started from the somewhatNaive2 genotypic traits.The final evolutionary time is 500 for all seven scenarios., growth efforts, drawn from the normal distribution with mean 0 and standard deviation 4) using the parameter values of the sapiens scenario.Only "non-failed" organism are shown, that is, those having a body not entirely composed of brain at 40 years of age, which are approximately 4% of 10 6 .The remaining 96% are "failed" organisms (not shown) at 40 years of age, having small bodies (< 100 grams) entirely composed of brain tissue due to tissue decay from birth (Fig. S8).Coloured regions encompass extant and fossil primate species.b, Brain-body allometry with evolution.Dots are the brain size at 40 years of age vs body size at 40 years of age over evolutionary time in log-log scale for two trajectories.The bottom trajectory uses the parameter values of the afarensis scenario (Fig. 1) and somewhatNaive2 ancestral genotypic traits; in the bottom trajectory, adult and brain body sizes evolve from those approaching P. boisei to those approaching P. robustus.The top trajectory uses the parameter values of the sapiens scenario (Fig. 1) and the evolved genotypic traits of the bottom trajectory as ancestral genotypic traits; in the top trajectory, adult and brain body sizes evolve from those approaching H. habilis toward those of H. sapiens.A linear regression over this trajectory yields a slope of 1.03 (red line).Adult values for 13 hominin species are shown in green squares.Brain and body size data for non-hominins are from ref. 64 excluding three fossil, outlier cercophitecines; brain and body size data for hominins are from refs.e, The angle between the direction of evolution and direct selection, both of the geno-phenotype (i.e., genotype and phenotype), is nearly 90 degrees over evolutionary time.f, Evolvability is small (η 0 is small) and decreases over evolutionary time.Evolvability equal to 0 here means no evolution despite selection; SI section S7; Eq. 1 of ref. 83 ).g, Population size increases over evolutionary time (plot of 1 2 µ n * η 0 , so the indicated multiplication yields population size).Mutation rate µ and parameter η 0 can take any value satisfying 0 < µ 1 and 0 < η 0 1/(N g N a ), where the number of genotypic traits is N g = 3 and the number of age bins is N a = 47y/0.1y.If µ = 0.01 and η 0 = 1/(3 × 47y/0.1y),then a population size of 1000×2/(µη 0 ) is 2.82 billion individuals (which is unrealistically large due to the assumption of marginally small mutational variance to facilitate analysis).All plots are for the sapiens trajectory of Fig. 2b.The fitness landscape w is a linear function (Eq.M3) of the follicle count x ra = g r,a−1 (x a−1 , y a−1 , xk,a−1 ), which is a recurrence over age.The slope of the fitness landscape with respect to x ra is positive and decreases with age a (Fig. 4b).Evaluating the recurrence at all possible genotypic trait values y j ∈ R N g for all ages j < a gives values x ra,min and x ra,max that depend on development g r j for all ages j < a, the various parameters influencing it, and the developmentally initial conditions.The admissible follicle count ranges from x ra,min to x ra,max .The admissible path on the landscape is given by the admissible follicle count.As there are no absolute mutational constraints, evolution converges to the peak of the admissible path 60 (dot), where total genotypic selection vanishes, dw/dy = 0 (Extended Data Fig. 3).

423
ter social development has stabilised in the population.variation between brain size and follicle count.Hence, 429 such socio-genetic covariation can only arise from the to-430 tal and stabilised effects of the genotype on the pheno-431 type, which arise from development.432 Therefore, the various evolutionary outcomes match-433 ing the brain and body sizes of seven hominin species 37 434 (Fig. 1) arise in this model exclusively due to change in 435 developmental constraints and not from change in di-436 rect selection on brain size or cognitive abilities.In the 437 model, EETBs and the shape of EEE only directly affect 438 the developmental map (g a ) but not fitness, so varying 439 EETBs and the shape of EEE does not affect the direc-440 tion of direct selection, but only its magnitude (Eqs.S38).441 Moreover, from the equation that describes the long-term 442 evolutionary dynamics (Eq.M5) it follows that varying 443 EETBs and the shape of EEE only affects evolutionary out-444 comes (i.e., path peaks; Fig. 5) by affecting the mecha-445 nistic socio-genetic covariation L z (Eq.S29).That socio-446 genetic covariation determines evolutionary outcomes 447 despite no internal fitness landscape peaks is possible be-448 cause there is socio-genetic covariation only along the 449 admissible path where the developmental constraint is 450 met (so L z is singular 59 ) and consequently evolution-451 ary outcomes occur at path peaks rather than landscape 452 peaks 60 (Fig. 5).That is, the various evolutionary out-453 comes matching the brain and body sizes of seven ho-454 minin species 37 (Fig. 1) are exclusively due to change in 455 mechanistic socio-genetic covariation described by the 456 L z matrix, by changing the position of path peaks on 457 the peak-invariant fitness landscape.Therefore, ecology and possibly culture cause hominin brain expansion in 459 the model by affecting developmental and consequently 460 socio-genetic constraints rather than direct selection.Ad-461 ditionally, brain metabolic costs directly affect the de-462 velopmental map (g a ) and so affect mechanistic socio-463 genetic covariation (L z ) but do not directly affect fitness 464 (w) and so do not constitute direct fitness costs (Eqs.S8, 465 S10, S2, S9, and M3).Yet, in the model, brain metabolic 466 costs often constitute total fitness costs and, occasionally, 467 total fitness benefits (Methods; Fig. S12; SI section S8).

468
Evolution is almost orthogonal to direct selection469 throughout hominin brain expansion in the model 470 (Fig. 4e).Evolvability 83 , measuring the extent to which 471 evolution proceeds in the direction of direct selection, is 472

541
licle count around the evolving age of menarche mostly 542 decreases over evolution, so such covariation is mostly 543 compensated by the negative socio-genetic covariation 544 with developmentally later follicle count.Socio-genetic 545 covariation between other phenotypes exists (Figs.S10 and S11) but has no evolutionary effect as only that with 547 follicle count does.Several of the above patterns of socio-548 genetic covariation emerge during the afarensis trajectory 549 (Fig. S9).550 Discussion 551 I modelled the evo-devo dynamics of hominin brain ex-

812 notypic selection in the brain model. 813
While I use Eqs.(M1) and (M2) to compute the evo-814 devo dynamics, those equations do not describe pheno-815 typic evolution as the climbing of an adaptive topogra-816 phy.To analyse phenotypic evolution as the climbing of 817 an adaptive topography, I use the following.The evo-818 devo dynamics framework 59 shows that long-term phe-819 notypic evolution can be understood as the climbing of a 820 fitness landscape by simultaneously following genotypic 821 and phenotypic evolution, which for the brain model is 822

Figure 2 :
Figure2: Static, non-evolutionary and evo-devo dynamic brain-body allometries.a, Brain-body allometry without evolution.Dots are the brain size at 40 years of age vs body size at 40 years of age in log-log scale, developed under the brain model from 10 6 randomly sampled genotypes (i.e., growth efforts, drawn from the normal distribution with mean 0 and standard deviation 4) using the parameter values of the sapiens scenario.Only "non-failed" organism are shown, that is, those having a body not entirely composed of brain at 40 years of age, which are approximately 4% of 10 6 .The remaining 96% are "failed" organisms (not shown) at 40 years of age, having small bodies (< 100 grams) entirely composed of brain tissue due to tissue decay from birth (Fig.S8).Coloured regions encompass extant and fossil primate species.b, Brain-body allometry with evolution.Dots are the brain size at 40 years of age vs body size at 40 years of age over evolutionary time in log-log scale for two trajectories.The bottom trajectory uses the parameter values of the afarensis scenario (Fig.1) and somewhatNaive2 ancestral genotypic traits; in the bottom trajectory, adult and brain body sizes evolve from those approaching P. boisei to those approaching P. robustus.The top trajectory uses the parameter values of the sapiens scenario (Fig.1) and the evolved genotypic traits of the bottom trajectory as ancestral genotypic traits; in the top trajectory, adult and brain body sizes evolve from those approaching H. habilis toward those of H. sapiens.A linear regression over this trajectory yields a slope of 1.03 (red line).Adult values for 13 hominin species are shown in green squares.Brain and body size data for non-hominins are from ref.64 excluding three fossil, outlier cercophitecines; brain and body size data for hominins are from refs. 2;3;39;69;99-103;64;104;105 using only female data when possible.Fossil data may come from a single individual and body size estimates from fossils are subject to additional error.H.: Homo, A.: Australopithecus, and P.: Paranthropus.

Figure 4 :
Figure4: The action of selection.a-d, There is only direct selection for follicle count, and such selection decreases with age.e, The angle between the direction of evolution and direct selection, both of the geno-phenotype (i.e., genotype and phenotype), is nearly 90 degrees over evolutionary time.f, Evolvability is small (η 0 is small) and decreases over evolutionary time.Evolvability equal to 0 here means no evolution despite selection; SI section S7; Eq. 1 of ref.83  ).g, Population size increases over evolutionary time (plot of 1 2 µ n * η 0 , so the indicated multiplication yields population size).Mutation rate µ and parameter η 0 can take any value satisfying 0 < µ 1 and 0 < η 0 1/(N g N a ), where the number of genotypic traits is N g = 3 and the number of age bins is N a = 47y/0.1y.If µ = 0.01 and η 0 = 1/(3 × 47y/0.1y),then a population size of 1000×2/(µη 0 ) is 2.82 billion individuals (which is unrealistically large due to the assumption of marginally small mutational variance to facilitate analysis).All plots are for the sapiens trajectory of Fig.2b.

FollicleF
it n e s s la n d s c a p e A d m is s ib le p a th x ra, min

Figure 5 :
Figure 5: Illustration of the fitness landscape in the brain model.The fitness landscape w is a linear function (Eq.M3) of the follicle count x ra = g r,a−1 (x a−1 , y a−1 , xk,a−1 ), which is a recurrence over age.The slope of the fitness landscape with respect to x ra is positive and decreases with age a (Fig.4b).Evaluating the recurrence at all possible genotypic trait values y j ∈ R N g for all ages j < a gives values x ra,min and x ra,max that depend on development g r j for all ages j < a, the various parameters influencing it, and the developmentally initial conditions.The admissible follicle count ranges from x ra,min to x ra,max .The admissible path on the landscape is given by the admissible follicle count.As there are no absolute mutational constraints, evolution converges to the peak of the admissible path60 (dot), where total genotypic selection vanishes, dw/dy = 0 (Extended Data Fig.3).

Figure 6 :Extended Data Figure 3 :Extended Data Figure 4 :
Figure 6: The action of constraint on brain expansion.Mechanistic socio-genetic cross-covariance matrix between brain size and follicle count over evolutionary time τ.For instance, in panel b, the highlighted box gives the sociogenetic covariance between brain size at 20 years of age and follicle count at each of the ages at the top horizontal axis.Thus, at evolutionary time τ = 10, socio-genetic covariation between brain size at 20 years of age and follicle count at 6 years of age is negative (bottom bar legend), but between brain size at 20 years of age and follicle count at 30 years of age is positive.The positive socio-genetic covariation between brain size and follicle count (e.g., yellow areas in b and c) causes brain expansion.Bar legends have different limits so that patterns are visible (bar legend limits are {−l , l }, where l = max(|L x ba ,x r j |) over a and j for each τ).All plots are for the sapiens trajectory of Fig. 2b.
38of the SI and were previously derived from 751 mechanistic considerations of energy conservation fol-752 lowing the reasoning of West et al.'s metabolic model of 753 ontogenetic growth38and phenomenological considera-754 tions of how skill relates to energy extraction36;37.The de-755 velopmental map of the brain model depends on the skill 756 level of social partners of the same age (i.e., peers), xka , 757 because of social challenges of energy extraction (where 758 P 1 < 1) so we say that development is social.When indi-759 viduals face only ecological challenges (i.e., P 1 = 1), de-760 velopment is not social.
93use matrix calculus notation93as defined in Eq. S1(φ a f a + π a p a ), where f a and p a are a mutant's fertility and survival probability at age a, T is 775 generation time, and φ a and π a are the forces 84;94;95 of se-776 lection on fertility and survival at that age (T , φ a , and π a 777 are functions of the resident but not mutant trait values).
where τ is evolutionary time, ι is a non-negative scalar 767 measuring mutational input and is proportional to the 768 mutation rate and carrying capacity, and H y = cov[y, y] is 769 the mutational covariance matrix (H for heredity; deriva-770 tives are evaluated at resident trait values throughout and 771 I a=1 791 constraints by using total derivatives (d).Lande's selec-792 tion gradient thus measures the direction in which se-793 lection favours evolution to proceed without considering 794 any constraint, whereas total selection gradients measure 795 the direction in which selection favours evolution consid-796 ering the developmental constraint (M1).From the first 797 and last equalities in Layer 4, Eq.S21 of ref. 59 , the total 798 selection gradient of genotypic traits for the brain model 801 ten in terms of either total phenotypic selection (dw/dx) 802 or direct phenotypic selection (∂w/∂x).Eqs.(M1) and 803 (M2) together describe the evo-devo dynamics.Eq. (M2) 804 entails that total genotypic selection vanishes at evolu-805 tionary equilibria if there are no absolute mutational con-806 straints (i.e., if ι > 0 and H y is non-singular).Moreover, 807 since in the brain model there are more phenotypic traits 808 than genotypic traits (N p > N g ), the matrices ∂x /∂y and 809 dx /dy have fewer rows than columns and so are singular; 810 hence, setting Eq. (M4) to zero implies that evolutionary 811 equilibria can occur with persistent direct and total phe- 2;3;39;69;99-103;64;104;105 using only female data when possible.Fossil data may come from a single individual and body size estimates from fossils are subject to additional error.H.: Homo, A.: Australopithecus, and P.: Paranthropus.