Evolution of irreversible somatic differentiation

A key innovation emerging in complex animals is irreversible somatic differentiation: daughters of a vegetative cell perform a vegetative function as well, thus, forming a somatic lineage that can no longer be directly involved in reproduction. Primitive species use a different strategy: vegetative and reproductive tasks are separated in time rather than in space. Starting from such a strategy, how is it possible to evolve life forms which use some of their cells exclusively for vegetative functions? Here, we develop an evolutionary model of development of a simple multicellular organism and find that three components are necessary for the evolution of irreversible somatic differentiation: (i) costly cell differentiation, (ii) vegetative cells that significantly improve the organism’s performance even if present in small numbers, and (iii) large enough organism size. Our findings demonstrate how an egalitarian development typical for loose cell colonies can evolve into germ-soma differentiation dominating metazoans.


Introduction
In complex multicellular organisms, different cells specialise to execute different functions. These functions can be generally classified into two kinds: reproductive and vegetative. Cells performing reproductive functions contribute to the next generation of organisms, while cells performing vegetative function contribute to sustaining the organism itself. In unicellular species and simple multicellular colonies, these two kinds of functions are performed at different times by the same cellsspecialization is temporal. In more complex multicellular organisms, specialization transforms from temporal to spatial (Mikhailov et al., 2009), where groups of cells focused on different tasks emerge in the course of organism development.
Typically, cell functions are changed via differentiation, such that a daughter cell performs a different function than the maternal cell. The vast majority of metazoans feature a very specific and extreme pattern of cell differentiation: any cell performing vegetative functions forms a somatic lineage, that is, producing cells performing the same vegetative function -somatic differentiation is irreversible. Since such somatic cells cannot give rise to reproductive cells, somatic cells do not have a chance to pass their offspring to the next generation of organisms. Such a mode of organism development opened a way for deeper specialization of somatic cells and consequently to the astonishing complexity of multicellular animals. Outside of the metazoans -in a group of green algae Volvocales serving as a model species for evolution of multicellularity -the emergence of irreversibly differentiated somatic cells is the hallmark innovation marking the transition from colonial life forms to multicellular species (Kirk, 2005).
While the production of individual cells specialized in vegetative functions comes with a number of benefits (Grosberg and Strathmann, 2007), the development of a dedicated vegetative cell lineage that is lost for organism reproduction is not obviously a beneficial adaptation. From the perspective of a cell in an organism, the guaranteed termination of its lineage seems the worst possible evolutionary outcome for itself. From the perspective of an entire organism, the death of somatic cells at the end of the life cycle is a waste of resources, as these cells could in principle become parts of the next generation of organisms. For example, exceptions from irreversible somatic differentiation are widespread in plants (Lanfear, 2018) and are even known in simpler metazoans among cnidarians (DuBuc et al., 2020) for which differentiation from vegetative to reproductive functions has been reported. Therefore, the irreversibility of somatic differentiation cannot be taken for granted in the course of the evolution of complex multicellularity.
Terminal differentiation is a type of cell differentiation different from irreversible cell differentiation. Unlike irreversibly differentiated cells who are capable of cell division, terminally differentiated cells lose the ability to divide. Terminally differentiated cells often perform tasks too demanding to be compatible with cell division. For example heterocysts of cyanobacteria perform nitrogen fixation, which requires anaerobic conditions, therefore these cells are very limited in resources and do not divide. In the scope of this study, we do not consider terminal differentiation but focus on somatic cells that are able to divide while being part of an organism (or cell colony) but not able to grow into a new organism, that is, irreversible somatic differentiation.
The majority of the theoretical models addressing the evolution of somatic cells focuses on the evolution of cell specialization, abstracting from the developmental process how germ (reproductive specialists) and soma are produced in the course of the organism growth. For example, a large amount of work focuses on the optimal distribution of reproductive and vegetative functions in the adult organism (Michod, 2007;Willensdorfer, 2009;Rossetti et al., 2010;Rueffler et al., 2012;Ispolatov et al., 2012;Goldsby et al., 2012;Solari et al., 2013;Goldsby et al., 2014;Amado et al., 2018;Tverskoi et al., 2018). However, these models do not consider the process of organism development. Other work takes the development of an organism into account to some extent: In Gavrilets, 2010, the organism development is considered, but the fraction of cells capable of becoming somatic is fixed and does not evolve. In Erten and Kokko, 2020, the strategy of germ-to-soma differentiation is an evolvable trait, but the irreversibility of somatic differentiation is taken for granted. In Rodrigues et al., 2012, irreversible differentiation was found, but both considered cell types pass to the next generation of organisms, such that the irreversible specialists are not truly somatic cells in the sense of evolutionary dead ends. Finally, in Cooper and West, 2018 a broad scope of cell differentiation patterns has been investigated in the context of evolution of cooperation. However, irreversible somatic differentiation was not considered in the study. Hence, the theoretical understanding of the evolution of irreversibly differentiated somatic cell lines is limited so far.
In the present work, we developed a theoretical model to investigate conditions for the evolution of the irreversible somatic differentiation. In the model, we suppose there are two cell types: germrole and soma-role, where only germ-role cells pass to the next generation of organisms while somarole cells are responsible for vegetative functions. Both germ-role cells and soma-role cells can divide and they may switch to each other during growth. In our model, we incorporate factors including (i) costs of cell differentiation, (ii) benefits provided by presence of soma-role cells, (iii) maturity size of the organism. We ask under which circumstances irreversible somatic differentiation is a strategy that can maximize the population growth rate compared to strategies in which differentiation does not occur or somatic differentiation is reversible.

Model
We consider a large population of clonally developing organisms composed of two types of cells: germ-role and soma-role. The roles differ in the ability to survive beyond the end of the organism life cycle: soma-role cells die at the end, while germ-role cells continue to live. Each organism is initiated as a single germ-role cell. In the course of the organism growth, germ-role cells may differentiate to give rise to soma-role cells and vice versa, see Figure 1A,B. After n rounds of synchronous cell divisions, the organism reaches its maturity size of 2 n cells. Immediately upon reaching maturity, the organism reproduces: germ-role cells disperse and each becomes a newborn organism, while all soma-role cells die and are thus lost, see Figure 1A. We assume that soma-role cells are capable to accelerate growth: an organism containing more somatic cells grows faster, so having soma-role cells during the life cycle is beneficial for the organism.
To investigate the evolution of irreversible somatic differentiation, we consider organisms in which the functional role of the cell (germ-role or soma-role) is not necessarily inherited. When a cell divides, the two daughter cells can change their role, leading to three possible combinations: two germ-role cells, one germ-role cell plus one soma-role cell, or two soma-role cells. We allow all these outcomes to occur with different probabilities, which also depend on the parental type, see Figure 1B. If the parental cell had the germ-role, the probabilities of each outcome are denoted by g gg , g gs , and g ss respectively. If the parental cell had the soma-role, these probabilities are s gg , s gs , and s ss . Altogether, six probabilities define a stochastic developmental strategy D ¼ g gg ; g gs ; g ss ; s gg ; s gs ; s ss À Á . In our model, it is the stochastic developmental strategy that is inherited by offspring cells rather than the functional role of the parental cell.
To feature irreversible somatic differentiation, the developmental strategy must allow germ-role cells to give rise to soma-role cells (g gg <1) and must forbid soma-role cells to give rise to germ-role cells (s ss ¼ 1). All other developmental strategies can be broadly classified into two classes. Reversible somatic differentiation describes strategies where cells of both roles can give rise to each other: g gg <1 and s ss <1. In the strategy with no somatic differentiation, soma-role cells are not produced in the first place: g gg ¼ 1, see Table 1.
In our model, evolution of the developmental strategy is driven by the growth competition between populations executing different strategies -these populations able to produce more offspring and/or complete their life cycle faster gain a selective advantage. Specifically, we measure  No somatic differentiation = 1 irrelevant the fitness in the growth competition by the population growth rate in a stationary regime of exponential growth (Pichugin et al., 2017;Gao et al., 2019). The rate of population growth is determined by the number of offspring produced by an organism (equal to the number of germ-role cells at the end of life cycle) and the time needed for an organism to develop from a single cell to maturity (improved with the number of soma-role cells during the life cycle).
To obtain these growth rates, we simulate the process of the organism growth. Here, we assume that resource distribution among cells is coordinated at the level of the organism: Cells which need more resources will get more, such that cell division is synchronous. In our model, we consider synchronous cell division of organisms and our main results are dependent on this assumption. However, we shortly explore the effects of asynchronous cell division in Appendix G. Any organism is born as a single germ-role cell and passes through n rounds of simultaneous cell divisions. Each round starts with every cell independently choosing the outcome of its division with probability of each outcome given by the developmental strategy (D). This step determines what composition will the organism have at the next round of cell division. Then, the length of the cell doubling round (t) is computed as a product of two independent effects: the differentiation effect F diff representing costs of changing cell roles (Gallon, 1992) and the organism composition effect F comp representing benefits from having soma-role cells (Grosberg and Strathmann, 1998;Shelton et al., 2012;Matt and Umen, 2016), Both F diff and F comp are re-calculated at every round of cell division. The cell differentiation effect F diff represents the costs of cell differentiation. The differentiation of a cell requires efforts to modify epigenetic marks in the genome, recalibration of regulatory networks, synthesis of additional and utilization of no longer necessary proteins. This requires an investment of resources and therefore an additional time to perform cell division. Hence, any cell, which is about to give rise to a cell of a different role, incurs a differentiation cost c g!s for germ-to-soma and c s!g for soma-to-germ transitions (and double of these if both offspring take a role different from the parent), see Figure 1C. The differentiation cost is the averaged differentiation cost among all cells in an organism where N s!gs is the number of soma-roll cells that produce a germ-role cell and a soma-role cell in a cell division step. N s!gg , N g!gs and N g!ss are defined in the analogous way. N is the number of total cells. As organisms undergo synchronous cell division, we have N ¼ 2 n cells after the n th cell division. The composition effect profile F comp ðxÞ captures how the cell division time depends on the proportion of soma-role cells x ¼ s=ðs þ gÞ present in an organism (s and g are the numbers of soma-role and germ-role cells). In this study, we use a functional form illustrated in Figure 1D and given by With the functional form (3), soma-role cells can benefit to the organism growth, only if their proportion in the organism exceeds the contribution threshold x 0 . Interactions between soma-role cells may lead to the synergistic (increase in the number of soma-role cells improves their efficiency), or discounting benefits (increase in the number of soma-role cells reduces their efficiency) to the organism growth, controlled by the contribution synergy parameter a. The maximal achievable reduction in the cell division time is given by the maximal benefit b, realized beyond the saturation threshold x 1 of the soma-role cell proportion. A further increase in the proportion of soma-role cells does not provide any additional benefits. With the right combination of parameters, (3) is able to recover various characters of soma-role cells contribution to the organism growth: linear (x 0 ¼ 0; , and a huge range of other scenarios. Previous works have shown that convex (accelerating) performance functions favour cell differentiation (Michod, 2006;Rueffler et al., 2012;Cooper and West, 2018). The performance functions measure the performance of organisms with respect to different traits, such as fertility and viability. Lately, the form of functions favoring cell differentiation has been extended to be concave (decelerating) by including topological constraints in organisms (Yanni et al., 2020). Our model extends the form of performance functions by allowing it has a contribution threshold and saturation threshold.
Once the outcome of all cell divisions is known and the time needed to complete the current cell doubling round is computed, the current round ends and the next starts. The development completes after n rounds. At this stage, the number of germ-role cells (organism offspring number) and the cumulative length of the life cycle are obtained.
In Gao et al., 2019, we have shown that the growth rate (l) of a population, in which organisms undergo a stochastic development and fragmentation, is given by the solution of X i G i P i e ÀlTi ¼ 1: Here, i is the developmental trajectory -in our case, the specific combination of all cell division outcomes; G i is the number of offspring organisms produced at the end of developmental trajectory i, equal to the number of germ-role cells at the moment of maturity; P i is the probability that an organism development will follow the trajectory i; T i is the time necessary to complete the trajectory i -from a single cell to the maturity size of 2 n cells.
For a given combination of differentiation costs (c g!s , c s!g ) and a composition effect profile (determined by four parameters: x 0 , x 1 , b, and a), we screen through a number of stochastic developmental strategies D and identify the one providing the largest growth rate (l) to the population. In this study, we searched for those parameters under which irreversible strategies lead to the fastest growth and are thus evolutionary optimal, see model details in Appendix A.

Results
For irreversible somatic differentiation to evolve, cell differentiation must be costly We found that irreversible somatic differentiation does not evolve when cell differentiation is not associated with any costs (c s!g ¼ c g!s ¼ 0), see Figure 2A. Only reversible differentiation evolves there, see Figure 2B. This finding comes from the fact that when somatic differentiation is irreversible, the fraction of germ-role cells can only decrease in the course of life cycle. As a result, irreversible strategies deal with the tradeoff between producing more soma-role cells at the beginning of the life cycle, and having more germ-role cells by the end of it. On the one hand, irreversible strategies which produce a lot of soma-role cells early on, complete the life cycle quickly but preserve only a few germ-role cells by the time of reproduction. On the other hand, irreversible strategies which generate a lot of offspring, can deploy only a few soma-role cells at the beginning of it and thus their developmental time is inevitably longer. By contrast, reversible somatic differentiation strategies do not experience a similar tradeoff, as germ-role cells can be generated from soma-role cells. As a result, reversible strategy allows higher differentiation rates and can develop a high soma-role cell fraction in the course of the organism growth and at the same time have a large number of germrole cells by the moment of reproduction. Under costless cell differentiation, for any irreversible strategy, we can find a reversible differentiation counterpart, which leads to faster growth: the development proceeds faster, while the expected number of produced offspring is the same, see Appendix 2 for details. As a result, costless cell differentiation cannot lead to irreversible somatic differentiation.
To confirm the reasoning that reversible strategies gain an edge over irreversible strategies by having larger differentiation rates, we asked which reversible and irreversible strategies become optimal at various cell differentiation costs (c ¼ c s!g ¼ c g!s ). At each value of costs, we found evolutionarily optimal developmental strategy for 3000 different randomly sampled composition effect profiles F comp ðxÞ. We found that evolutionarily optimal reversible strategies feature much larger rates of cell differentiation than evolutionarily optimal irreversible strategies, see Figure 2D. Even at large costs, where frequent differentiation is heavily penalized, the distinction between differentiation rates of reversible and irreversible strategies remains apparent.
We screened through a spectrum of germ-to-soma (c g!s ) and soma-to-germ (c s!g ) differentiation costs, see Figure 2A-C. Irreversible somatic differentiation is most likely to evolve when it is cheap to differentiate from germ-role to soma-role (low c g!s ) but it is expensive to differentiate back (high c s!g ), see Figure 2A. Irreversible strategies are insensitive to high soma-to-germ costs, since somarole cells never differentiate. At the same time, reversible strategies are heavily punished by high costs of soma-role differentiation.
It is not very surprising to find irreversible differentiation where the differentiation costs are highly asymmetric. However, irreversible strategies are consistently observed in other regions of the costs space, even including these, where the asymmetry is opposite (it is hard to go from germ to soma but easy to return back), see Figure  (D) Cumulative cell differentiation rate g ss þ 1 2 g gs þ s gg þ 1 2 s gs À Á in developmental strategies evolutionarily optimal at various differentiation costs (c s!g ¼ c g!s ), separated by class (irreversible somatic differentiation, reversible somatic differentiation, or no somatic differentiation). Thick lines represent median values within each class, shaded areas show 90% confidence intervals. For each cost value, 3000 random profiles are used in this panel. Evolutionary optimal reversible strategies (orange) have much higher rates of cell differentiation than irreversible strategies (green). Consequently, reversible strategies are penalized more under costly differentiation. (E-H) Shapes of composition effect profiles (compare Figure 1D) promoting irreversible (green lines), reversible (orange lines), and no differentiation (black lines) strategies at four parameter sets indicated in panel A. The maturity size used in the calculation is 2 10 cells.
can lead to evolution of irreversible somatic differentiation, below we focus on the scenario of equal differentiation costs c s!g ¼ c g!s ¼ c.

Evolution of irreversible somatic differentiation is promoted when even a small number of somatic cells provides benefits to the organism
The composition effect profiles F comp ðxÞ that promote the evolution of irreversible somatic differentiation have certain characteristic shapes, see Figure 2E-H. We investigated what kind of composition effect profiles can make irreversible somatic differentiation become an evolutionary optimum. We sampled a number of random composition effect profiles with independently drawn parameter values and found optimal developmental strategies for each profile for a number of differentiation costs (c) and maturity size (2 n ) values. We took a closer look at the instances of F comp ðxÞ which resulted in irreversible somatic differentiation being evolutionarily optimal.
We found that irreversible strategies are only able to evolve when the soma-role cells contribute to the organism cell doubling time even if present in small proportions, see Figure 3A,B. Analysing parameters of the composition factors promoting irreversible differentiation, we found that this effect manifests in two patterns. First, the contribution threshold value (x 0 ) has to be small, see Figure 3D -irreversible differentiation is promoted when soma-role cells begin to contribute to the organism growth even in low numbers. Second, the contribution synergy was found to be large (a>1) or, alternatively, the saturation threshold (x 1 ) was small, see Figure 3C.
Both the contribution threshold x 0 and the contribution synergy a control the shape of the composition effect profile at intermediary abundances of soma-role cells. If the contribution synergy a exceeds 1, the profile is convex, so the contribution of soma-role cells quickly becomes close to maximum benefit (b). A small saturation threshold (x 1 ) means that the maximal benefit of soma is achieved already at low concentrations of soma-role cells (and then the shape of composition effect profile between two close thresholds has no significance). Together, these patterns give an evidence that the most crucial factor promoting irreversible somatic differentiation is the effectiveness of soma-role cells at small numbers, see Appendix 4 for more detailed data presentation.
These patterns are driven by the static character of differentiation strategies we use: the chances for a cell to differentiate are the same at the first and the last round of cell division. Therefore, the optimal germ-to-soma differentiation rate is found as a balance between the needs to deploy somarole cells early on and to keep the high number of germ-role by the end of the life cycle. This implies that irreversible somatic differentiation strategies produce soma-role cells at lower rate than reversible strategies, see Figure 2D. With irreversible differentiation, an organism spends a significant amount of time having only a few soma-role cells. Hence, the irreversible strategy can only be evolutionarily successful, if the few soma-role cells have a notable contribution to the organism growth time.
We also found that profiles featuring irreversible differentiation do not possess neither extremely large, nor extremely small maximal benefit values b, see Figure 3D. When the maximal benefit is too small, the cell differentiation just does not provide enough benefits to be selected for and the evolutionarily optimal strategy is no differentiation. In the opposite case, when the maximal benefit is very close to one, the cell doubling time approaches zero, see Equation (3). Then, the benefits of having many soma-role cells outweighs the costs of differentiation and the optimal strategy is reversible, see Appendix 4.
For irreversible somatic differentiation to evolve, the organism size must be large enough By screening through the maturity size (2 n ) and differentiation costs (c), we found that the evolution of irreversible somatic differentiation is heavily suppressed at small maturity sizes, Figure 4A. We found that either reversible strategies or the no differentiation strategy evolve in small organisms. Since reversible strategies can quickly reach a fixed fraction of soma-role cells, thus they can obtain maximised benefits from soma-role cells with small maturity sizes (Appendix 2- figure 1). Since the no differentiation strategy does not involve cell differentiation, they do not have cell differentiation costs. In contrast, irreversible strategies increase the fraction of soma-roles and increase the benefits of soma-role cells gradually as maturity size increases. Meanwhile, the cell differentiation costs for irreversible strategies decrease as maturity size increases as the fraction of germ-role cells decreases.  Thus compared with other strategies, the irreversible strategies have advantages in large organisms. We found that under c s!g ¼ c g!s , the minimal maturity size allowing irreversible somatic differentiation to evolve is 2 n ¼ 64 cells. At the same time, organisms performing just a few more rounds of cell divisions are able to evolve irreversible differentiation at a wide range of cell differentiation costs, see also Appendix 5. This indicates that the evolution of irreversible somatic differentiation is strongly tied to the size of the organism.
Evolution of irreversible strategies at sizes smaller than 64 cells is possible for c s!g >c g!s . For instance, at c s!g ¼ 2c g!s some irreversible strategies were found to be optimal at the maturity size 2 5 = 32 cells, Figure 4B. However, irreversible strategies were found in a narrow range of cell differentiation costs and the fraction of composition effect profiles that allow evolution of irreversible differentiation there was quite low -about 1%. The evolution of irreversible strategies at such small maturity sizes becomes likely only at extremely unequal costs of transition between germ and some roles c s!g ) c g!s , see Figure 4C. Hence, for irreversible somatic differentiation to evolve, the organism size should exceed a threshold of roughly 64 cells.

Irreversible somatic differentiation can also evolve when cell differentiation is risky
In our main model, we considered differentiation costs in a specific form of cell division delay. However, the process of cell differentiation may impact the organism development in another way. Differentiation requires modifications in DNA regulation, which in turn poses a risk of dysregulation resulting in an emergence of selfish mutants that could for example cause cancer. The disposable soma theory suggests that cells performing vegetative functions form separate lineages to contain emerging mutations and prevent them from passing to the next generations of organisms. In line with this hypothesis, we also considered a model of risky cell differentiation, where the transition between germ and soma roles incurs a risk of getting cancer that kills the entire organism, see Appendix 6.
The results obtained with a model of risky differentiation are very similar to the outcomes of our main model, where cell differentiation cause delay, see Figure 5. In both models, irreversible differentiation only evolves if cell differentiation does not come for free but brings costly side-effects (delay or risk). Also, in both models irreversible differentiation is prevalent when costs of soma-to-

A B
Fraction of irreversible strategies c s→g = c g→s c s→g = 2c g→s n = 5 C c g→s Figure 4. Irreversible differentiation can evolve if organism grows to a large enough size in the course of its life cycle. (A) The fraction of composition effect profiles promoting irreversible strategies at various cell differentiation costs (c ¼ c s!g ¼ c g!s ) and maturity sizes (2 n ). Irreversible strategies were only found for maturity size 2 6 = 64 cells and larger. (B) The fraction of composition effect profiles promoting irreversible strategies at unequal differentiation costs c s!g ¼ 2c g!s . A rare occurrences of irreversible strategies (~1%) was detected at the maturity size 2 5 ¼ 32 cells in a narrow range of cell differentiation costs but not at the smaller sizes. (C) The range of cell differentiation costs allowing evolution of irreversible strategies at at the maturity size 2 n ¼ 32 (n ¼ 5) cells. For irreversible strategies to evolve at such a small size, the differentiation from soma-role to germ-role must be much more costly than the opposite transition (c s!g ) c g!s ).
germ transitions are intense; reversible differentiation is prevalent when costs of both transitions are low; and no differentiation is prevalent when costs of germ-to-soma transitions are intense Figure 2A-C.

Discussion
The vast majority of cells in a body of any multicellular being contains enough genetic information to build an entire new organism. However, in a typical metazoan species, very few cells actually participate in the organism reproduction -only a limited number of germ cells are capable of doing it. The other cells, called somatic cells, perform vegetative functions but do not contribute to reproduction -somatic differentiation is irreversible. We asked for the reason for the success of such a specific mode of organism development. We theoretically investigated the evolution of irreversible somatic differentiation with a model of clonally developing organisms taking into account benefits provided by soma-role cells, costs arising from cell differentiation, and the effect of the raw organism size.
Our key findings are: . The evolution of irreversible somatic differentiation is inseparable from costly cell differentiation or risky cell differentiation.
. For irreversible somatic differentiation to evolve in organisms with synchronous cell division, somatic cells should be able to contribute to the organism performance already when their numbers are small.
. Only large enough organisms tend to develop irreversible somatic differentiation.
According to our results, cell differentiation costs are essential for the emergence of irreversible somatic differentiation, see Figure 2A. The costs punish strategies with high rate of cell differentiation. As a result, irreversible strategies gain an advantage because their overall differentiation rate is low, see Figure 2D, and soma-role cells do not differentiate at all. Most models focus on traits that lead to benefits for the organism, while the cost of cell differentiation are rarely considered. For cells in a multicellular organism, differentiation costs arise from the material needs, energy, and time it takes to produce components necessary for the performance of the differentiated cell, which were

Reversible somatic di erentiation
No somatic di erentiation absent in the parent cell. For instance, in filamentous cyanobacteria nitrogen-fixating heterocysts develop much thicker cell wall than parent photosynthetic cells had. Also, reports indicate between 23% (Ow et al., 2008) and 74% (Sandh et al., 2014) of the proteome changes its abundance in heterocysts compared against photosynthetic cells. Similarly, the changes in the protein composition in the course of cell differentiation was found during the development of stalk and fruiting bodies of Dictyostelium discoideum (Bakthavatsalam and Gomer, 2010;Czarna et al., 2010).
An alternative to differentiation costs in terms of slower growth is a model with a risky differentiation, where we found similar patterns, see Figure 5. These results indicate that the exact mechanism of the differentiation costs does not play a major role in the evolution of irreversible somatic differentiation.
Our model demonstrates that irreversible somatic differentiation is more likely to evolve when a few soma-role cells are able to provide a substantial benefit to the organism, see Figure 3. Volvocales algae demonstrate that a significant contribution by small numbers of somatic cells might indeed be found in a natural population: In Eudorina illinoiensis, only four out of thirty-two cells are vegetative (Sambamurty AVSS, 2005) (soma-role in our terms). This species has developed some reproductive division of labour and a fraction of only 1=8 of vegetative cells is sufficient for colony success. Thus, it seems possible that highly-efficient soma-role cells open the way to the evolution of irreversible somatic differentiation. Several patterns of how cells proved the benefit to an organism have been previously considered (Michod, 2007;Willensdorfer, 2009;Rossetti et al., 2010;Rueffler et al., 2012;Cooper and West, 2018;Yanni et al., 2020). The majority of papers focuses on the resource allocation toward different tasks in each cell in an organism and how divergent different cells can be. In our model, we assume that the germ-role and soma-role cell are different in function and focus on the relationship between the number of soma-role cells and their impact, e.g. the character of their interactions. While the found F comp curves exhibit convex-like shape, see Figure 3A,B, this finding has a different nature from the convex trade-off between fertility and viability found in the models of cell differentiation (Michod, 2007).
Our model shows that irreversible somatic differentiation does not evolve if the organism size is small, see Figure 4A. The maturity size plays an important role in an organism's life cycle (Amado et al., 2018;Erten and Kokko, 2020): Large organisms have potential advantages to optimize themselves in multiple ways, such as to improve growth efficiency (Waters et al., 2010), to avoid predators (Matz and Kjelleberg, 2005;Fisher et al., 2016;Hiltunen and Becks, 2014), to increase problem-solving efficiency (Morand-Ferron and Quinn, 2011), and to exploit the division of labour in organisms (Carroll, 2001;Matt and Umen, 2016). Moreover, the maximum size has been related to the reproduction of the organism from the onset of multicellularity in Earth's history (Ratcliff et al., 2012). Our results suggest that the smallest organism able to evolve irreversible somatic differentiation should typically be about 32-64 cells (unless the cost of soma-to-germ differentiation is extremely large and the cost of the reverse is low). This is in line with the pattern of development observed in Volvocales green algae. In Volvocales, cells are unable to move (vegetative function) and divide (reproductive function) simultaneously, as a unique set of centrioles are involved in both tasks (Wynne and Bold, 1985;Koufopanou, 1994). Chlamydomonas reinhardtii (unicellular) and Gonium pectorale (small colonies up to 16 cells) perform these tasks at different times. They move towards the top layers of water during the day to get more sunlight. At night, however, these species perform cell division and/or colony reproduction, slowly sinking down in the process. However, among larger Volvocales, a division of labour begins to develop. In Eudorina elegans colonies, containing 16-32 cells, a few cells at the pole have their chances to give rise to an offspring colony reduced (Marchant, 1977;Hallmann, 2011). In P. californica, half of the 128-celled colony is formed of smaller cells, which are totally dedicated to the colony movement and die at the end of colony life cycle (Kikuchi, 1978;Hallmann, 2011). In Volvox carteri, most of a 10,000 cell colony is formed by somatic cells, which die upon the release of offspring groups (Hallmann, 2011).
In a majority of our tests, we used the maturity size of 2 10 = 1024 cells. This is significantly larger than the minimal necessary size for evolution of irreversible somatic differentiation. However, the body size of the order of 1000 cell attracts attention because at this scale organisms of very diverse degrees of complexity are observed: from undifferentiated colonies (ocean algae Phaeocystis antarctica), to intermediary life forms (slime molds slugs), to paradigm multicellular organisms (higher Volvocales and nematode Caenorhabditis elegans).
The model presented in our study focuses on the transition from colonial life forms to multicellular beings. Further development of complexity opens multiple new ways for optimization of life cycle. For example, a maternal organism can provide protection and nurture for offspring at their early stages of growth, like in V. carteri (10,000 cells) in which offspring colonies develop inside the parental organism. There, the rate of offspring growth depends mostly on the performance of the maternal organism and much less on the differentiation strategy of offspring. Having maternal protection allows to relax the conditions for evolution of irreversible differentiation indicated in our study. How much these conditions can be relaxed is a very interesting question.
One of the most significant assumptions we took is the synchronicity of cell divisions even if division outcomes are different. This is only possible if cell actions are coordinated at the level of organism -otherwise, cells that do not differentiate may complete their divisions before differentiating cells. When in the history of multicellularity such a coordination emerges is an open question. However, in a number of rather simple species, a synchronicity of cell divisions paired with cell differentiation is observed. One example is the green algae Eudorina illinoiensis -one of the simplest species demonstrating the first signs of reproductive division of labour, in which four out of 32 cells are differentiated (Sambamurty AVSS, 2005). Another example is 128-celled algae Pleodorina californica, half of the cells are differentiated. And still, the cell divisions are synchronous (Kikuchi, 1978). Even the size of the mature organism being a power of two indicates that cells do not divide independently, but their actions are controlled at the level of the organism.
To peek at the impact of the cell division synchronicity, we developed a model with asynchronous cell division, where cell differentiation costs are paid individually by each differentiating cell, see Appendix. G. We found that the evolution of irreversible differentiation is significantly suppressed even under the most favourable conditions (c s!g ) c g!s ) -the frequency of composition profiles promoting irreversible somatic differentiation is much smaller and the maturity size restriction is higher.
Another assumption, which shapes the results of our study, is the static differentiation strategy the probability of each division outcome does not depend on the stage of life cycle. On the one hand, the static nature of differentiation strategy puts irreversible differentiation in disadvantage, as it creates a trade-off between the fraction of soma-role cells at the early stage of life cycle and the number of germ-role cells at the end of life cycle. On the other hand, a set of fully flexible dynamic differentiation strategies present an efficient but hardly realistic solution to the life cycle optimization problem: at the first round of cell divisions organism converts to all-soma state and remains so until the last round, when all cells convert back to germ-state. Theoretically, this strategy provides simultaneously the fastest possible development rate (100% soma-role cells during life cycle) and the largest possible number of offspring (100% germ-role cells at the end of life cycle). Still, we cannot provide an example of such a developmental program in nature. Nevertheless, the differentiation strategy of higher Volvocales is not static Kirk, 2005 and the exploration of a vast space of dynamic differentiation strategies warrants further investigation.
We acknowledge that our discussion of natural examples of germ-soma differentiation relies heavily on Volvocales algae. This merely reflects the bias in the empirical literature about evolution of germ/soma differentiation towards this group. We should note that our model is not a model of Volvocales life cycle. Instead, we aim to answer the question about emergence of irreversible somatic differentiation in a broad context without tailoring it to the features of a single group.
Our study originated from curiosity about driving factors in the evolution of irreversible somatic differentiation: Why does the green algae Volvox from the kingdom Plantae shed most of its biomass in a single act of reproduction? And why, in another kingdom, Animalia, in most of the species the majority of body cells is outright forbidden to contribute to the next generation? Our results show which factors makes a difference between the evolution of an irreversible somatic differentiation and other strategies of development. One of these factors, the maturity size, is known in the context of the evolution of reproductive division of labour (Kirk, 2005). Another factor, the costs of cell differentiation, is, in general, discussed in a greater biological scope but is hardly acknowledged as a factor contributing to the evolution of organism development. Finally, the early contribution of soma-role cells to the organism growth, even if they are small in numbers, is an unexpected outcome of our investigation, overlooked so far as well. Despite the simplistic nature of our model (we did not aim to model any specific organism), all our results find a confirmation among the Volvocales clade. Hence, we expect that the findings of this study reveal general properties of the evolution of irreversible somatic differentiation, independently of the clade where it evolves. The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.
Search for the evolutionarily optimal developmental program Finding the population growth rate for a given developmental program In Gao et al., 2019, we have shown that a population of organisms, which begin their life cycle from the same state but have a stochastic development, eventually grows exponentially with the rate l given by the solution of X i e ÀlTi G i P i ¼ 1: Here, i is the developmental trajectory -in our case, the specific combination of all cell division outcomes; P i is the probability that an organism development will follow the trajectory i; T i is the time necessary to complete the trajectory i -from a single cell to the maturity size of 2 n cells; G i is the number of offspring organisms produced at the end of developmental trajectory i, equal to the number of germ-role cells at the moment of maturity.
In order to find the population growth rate, we need to know G i , T i , and P i (how many offspring are produced, how long did it take to mature, and how likely is this developmental trajectory, respectively). The complete set of developmental trajectories is huge as it scales exponentially with the number of divisions n.
In our study, for each developmental strategy, we sampled M ¼ 300 developmental trajectories at random. To get each trajectory, we simulated the growth of the single organism according to the rules of our model. For each trajectory, the developmental time T i was computed as a sum of cell doubling times at each of the n synchronous cell divisions, the number of offspring G i was given by the count of germ-role cells at the end of development. The resulting ensemble of trajectories (with P i ¼ 1=M) was plugged into (5) to compute the population growth rate l.

Finding the developmental program with the largest population growth rate
We assume that evolution occurs by growth competition between populations executing different developmental strategies. These strategies, which provide larger population growth rate will outgrow others. To find evolutionarily optimal strategies under given conditions, we screened through a large set of developmental strategies and identified the one with the maximal population growth rate l. Since the probabilities of cell division outcomes sum into one (g gg þ g gs þ g ss ¼ 1 and s gg þ s gs þ s ss ¼ 1), these probabilities can be represented as a point on two simplexes, one for the division of germ-role cells, and one for the division of soma-role cells. Consequently, we choose the set of developmental strategies as a Cartesian product of two triangular lattices -one for division probabilities of germ-role cells (g gg ; g gs ; g ss ) and one for soma-role cells (s gg ; s gs ; s ss ). The lattice space was set to 0.1, so each of two independent lattices contained 11 Â 12=2 ¼ 66 nodes, and the whole set of developmental strategies comprised 66 Â 66 = 4356 different strategies. For each of these strategies, the population growth rate l was calculated and the strategy with the largest growth rate was identified as evolutionarily optimal.
In our investigation, parameters such as differentiation costs (c s!g , c g!s ) and maturity size (2 n ) were used as control parameters. In other words, we either fix them at the specific values, or screened through a range of values to obtain a map (see Figures 2 and 3 in the main text). However, the parameters that controlled the shape of composition effect profile (x 0 , x 1 , a, and b) were treated differently. For each combination of control parameters, we randomly sampled a number (between 200 and 3000) of combinations of these parameters. The thresholds (0 x 0 x 1 1) were sampled as a pair of independent distributed random values from the uniform distribution Uð0; 1Þ. The contribution threshold x 0 was set to the minimum of the pair, and the saturation threshold x 1 was set to the maximum. The contribution synergy (a>0) corresponds to the concave shape of the profile at a<1 and to the convex shape at a>1. Therefore, log 10 ðaÞ was sampled from the uniform distribution UðÀ2; þ2Þ, so the profile has an equal probability to demonstrate concave and convex shape. Finally, the maximum benefit (0 b<1) was sampled from a uniform distribution, Uð0; 1Þ. For each tested combination of control parameters, we found the optimal developmental strategy for every sampled profile. We then classified these as irreversible somatic differentiation, reversible somatic differentiation, or no somatic differentiation.

1
(8) The matrix has two eigenvalues: 1 and 1 À m g À m s , with associated right eigenvectors ðm g ; m s Þ T and ð1; À1Þ T , respectively. Hence, the expected composition after j divisions can be obtained in the explicit form r s ðjÞ ¼ 1 m g þ m s m g À m g ð1 À m g À m s Þ j Â Ã ; r g ðjÞ ¼ 1 m g þ m s m s þ m g ð1 À m g À m s Þ j Â Ã : For an arbitrary irreversible somatic differentiation strategy D, m s ¼ 0, the expected number of soma-role cells changes as r s;D ðjÞ ¼ 1 À ð1 À m g Þ j ; (10) which is a monotonically increasing function of the number of cell divisions t, see the green line in Fig. B. In the life cycle involving j cell divisions, the fraction of soma-role cells at the end of life cycle is r s;D ðjÞ ¼ 1 À ð1 À m g Þ j . Now, we consider another developmental strategy D 0 with reversible somatic differentiation in which m 0 g ¼ r s;D ðnÞ and m 0 s ¼ 1 À r s;D ðnÞ. Using m 0 g þ m 0 s ¼ 1 in (9), it can be shown that the expected fraction of soma-role cells in D 0 after the very first cell division is exactly r s;D ðnÞ and stays constant thereafter, see the orange line in Fig. B. Thus, the number of offspring produced is the same for both development strategies.
If cell differentiation is costless (d s ¼ d g ¼ 0), then the cell doubling time depends only on the fraction of soma-role cells. As all soma-role cells are then present already after the first cell division, organisms following the reversible strategy D 0 will grow faster than organisms using the irreversible strategy D at any stage of organism development, independently of the choice of the composition effect profile (F comp ). At the end of the life cycle, both strategies have the same expected number of offspring. Therefore, under costless cell differentiation, for any irreversible strategy, we can find a reversible strategy that leads to a larger population growth rate. , c s!g =c g!s ¼ 1 (E), and c s!g =c g!s ¼ 0:5 (F). Even with unequal differentiation costs, the minimal maturity size allowing the evolution of irreversible differentiation stays roughly the same -2 5 À 2 6 cells. Dashed lines indicate overlap between panels. The legend is the same as that in Figure 2A-C.

Evolution of irreversible somatic differentiation under various maturity sizes and unequal cell differentiation costs
The differentiation strategy considered above (s ss ¼ 0) is an extreme case where a dynamic equilibrium between cell differentiations is not possible. Still, Equation 17 demonstrates that a balance between germ-role and soma-role cells is still achieved here. Therefore, in the asynchronous model with highly asymmetric differentiation costs, the reversible strategies keep all components that make them successful in the no costs scenario: the early production of soma-role cells due to high differentiation rates, the necessary fraction of soma-role cells during the life cycle (Equation 17), and the overall fast growth of the whole organism, despite having non-dividing soma-role cells (Equation 16).
Note that in irreversible strategies, soma-role cells do not differentiate and therefore divide at a normal rate. Therefore, the characteristic trade-off of irreversible strategies between having more soma-role cells early and more germ-role cells later in life cycle remains in place even in the asynchronous model. As a result, in this model, reversible strategies are not punished by asymmetric costs and outcompete irreversible ones.