WorksPhysics and Astronomy
Phenotype-structured nonlocal aggregation models I: signal production and response
Abstract
Individuals within a cellular or ecological population can exhibit substantial variation in their traits or phenotype. Such heterogeneity can fundamentally alter population-level behaviour, including the ability to aggregate and form spatial patterns. We investigate these effects by extending nonlocal aggregation models, widely used to model cell–cell adhesion and collective animal movement, to incorporate phenotype structure. We characterise how heterogeneity and switching between phenotypes affect whether patterns form, how phenotypes are distributed within them, and whether they are stationary or exhibit spatio-temporal oscillations. We show that pattern formation is promoted when phenotypes that produce stronger interaction signals also respond more strongly to them, whereas specialisation towards either signal production or response inhibits pattern formation. Increasing rates of switching between phenotypes dampen these effects. Heterogeneity can also enable weakly interacting, and even repulsive, individuals to pattern as part of the collective. Furthermore, movement in phenotype and physical space can interact to restructure patterns and generate spatio-temporal oscillations. A further key message of this study is the value of considering both discrete -phenotype and continuous phenotype formulations. We develop both in parallel, demonstrating formal correspondences, but also advantages to each framework in terms of mathematical analyses and interpretability.
Introduction
Phenotypic heterogeneity is ubiquitous in cellular and ecological populations, where individuals can vary substantially in their morphology, behaviour, physiology and interactions with others. In ecology, within-population trait variation can influence population dynamics and species interactions [1], and has long been studied using structured-population models, particularly those dividing populations into discrete or continuous classes according to age, size, or behavioural strategy [2, 3]. Cellular populations similarly exhibit heterogeneity in traits such as signalling, motility, and proliferation, with particularly important consequences in cancer [4, 5, 6, 7]. Moreover, traits need not fall into a small number of discrete classes. For example, epithelial–mesenchymal plasticity can generate intermediate states along a phenotypic spectrum [8], motivating models in which populations are structured by a continuous phenotype variable [4, 9]. We will explore the impact of such phenotypic variation on the ability of populations to aggregate and form spatial niches, or patterns.
One widely used framework for studying how interacting populations organise in space is provided by nonlocal aggregation, or nonlocal advection–diffusion, models [10]. Initially developed to study animal swarms, where individuals respond to neighbours over finite distances [11], these models were subsequently adopted to describe cell–cell adhesion [12]. Here, interactions naturally occur across the cell membrane and can extend further through cellular protrusions such as pseudopodia [13]. Nonlocal aggregation models have since become an established framework for cell–cell adhesion and other forms of collective cell movement, as well as spatial organisation in ecological populations, for example driven by scent marking and memory [10, 14].
In a standard nonlocal aggregation model [10, 12, 13, 15, 16, 17, 18], the evolution of a single population with density on a -dimensional domain is described by a combination of random diffusion and directed motion induced by nonlocal interactions:
The interaction kernel determines the strength of interactions between individuals separated by a distance , while the saturation function can account for reduced motility due to crowding or volume-filling effects. In this formulation, however, all individuals are effectively interchangeable. Many studies extend this by considering two distinct species, with a few briefly exploring up to six [14, 19]. In this work, we will extend the framework to populations with arbitrarily many phenotypes, or even a continuum of phenotypic states.
Pattern formation in phenotype-structured models remains relatively underexplored, although early examples can be found in the structured-population literature [20]. More recently, interest in this area has grown, with studies considering phenotype-structured Keller–Segel chemotaxis models [21] and Shigesada–Kawasaki–Teramoto competition models [22].
Despite this increasing interest, the recent review by Lorenzi et al. [4] identifies only two examples of phenotype-structured nonlocal aggregation models. Engwer et al. [23] introduced a phenotype-structured model of acid-mediated tumour invasion, establishing existence of solutions for a biologically detailed system incorporating adhesion alongside additional processes specific to their application. More recently, Lorenzi et al. [24] derived a phenotype-structured nonlocal migration model from kinetic theory and investigated its behaviour in the context of a cell migration assay. Existence theory has also been developed for nonlocal aggregation models with an arbitrary finite number of interacting species [15].
Phenotype-structured aggregation models also introduce substantial analytical challenges. In a discrete description, the number of interacting phenotypes may be arbitrarily large, while a continuous description is doubly nonlocal, with nonlocal interactions in both physical and phenotype space [4]. Furthermore, stability analysis of pattern formation in phenotype-structured models is considerably more involved, since the relevant eigenfunctions are no longer simply those of the Laplacian and must instead be determined as part of the corresponding eigenvalue problem. Nevertheless, as we show here, considerable analytical progress remains possible.
In this work, we study the influence of phenotypic heterogeneity on how populations aggregate in space. We do so by extending nonlocal aggregation models to incorporate phenotype structure, focusing on interactions in which phenotype determines how strongly individuals produce interaction signals and how strongly they respond to them. We aim to characterise how these interactions influence the conditions for pattern formation, how the population is distributed across phenotype space within the resulting patterns, and whether these patterns are stationary or oscillate in time.
This study forms Part I of a two-part investigation into how phenotypic heterogeneity within a population affects pattern formation. While here we consider interactions that depend on the absolute phenotypes of individuals, in Part II [25] we will instead consider interactions that depend on relative phenotype, where interaction strength is determined by how similar two individuals are, as measured by their distance in phenotype space. Although both studies share much of the same mathematical framework, their biological interpretations and resulting behaviour differ substantially.
We develop both discrete and continuous phenotype formulations of the model in parallel, establishing the relationship between them. Whilst continuous phenotype formulations are prominent in recent cell and cancer modelling literature [4, 21, 22, 23], we show that an -phenotype discrete formulation is similarly useful and requires fewer assumptions. Rather than favouring either description, we demonstrate the benefits of considering both: doing so reveals complementary mathematical structures and allows us to use whichever formulation is more natural for a given aspect of the problem.
We begin in § 2 by defining how phenotype affects interactions and formulating the discrete and continuous models, deriving one from the other. In § 3, we develop the linear stability analysis of pattern formation in these models and establish the relationship between the two formulations. § 4 and § 5 analyse the limits of slow and fast phenotypic switching, respectively, before § 6 considers generic switching rates and the emergence of spatio-temporal behaviour. Finally, we discuss the broader implications and future directions in § 7. Readers primarily interested in the biological insights can focus on the “Biological insight” subsections of § 4, § 5 and § 6, together with the spatio-temporal results in Section (b) and the final Discussion.
Phenotype-structured nonlocal aggregation models
To incorporate phenotypic heterogeneity into the nonlocal aggregation model (1), we consider two complementary formulations. The first consists of discrete phenotypes (or species), whilst the second replaces the discrete phenotype index with a continuous phenotype variable. Studying these formulations side-by-side allows us to establish the relationship between them, compare the mathematical structures that arise in each, and assess the complementary insights that each provides into pattern formation.
Following the standard approach in the nonlocal aggregation literature [10, 12, 13, 15, 16, 17, 18], we assume periodic boundary conditions throughout, so that the physical domain is the torus, . This allows us to focus on behaviour arising from interactions in the bulk, rather than from boundary effects, while avoiding the need to prescribe how nonlocal interactions behave across a boundary. We choose the domain sufficiently large to minimise spurious interaction due to wrap-around effects.
Discrete phenotype formulation
The discrete formulation is a generalisation of (1) in which discrete phenotypes (or species), with densities , evolve according to the non-dimensional equations
for . Here, denotes the interaction kernel governing the movement of phenotype induced by phenotype when they are separated by a distance . We also allow for phenotypic switching through the last term in (2), where is the discrete switching rate and is the graph Laplacian on the one-dimensional phenotype lattice satisfying no-flux boundary conditions, defined by
This models uniform stochastic switching or mutation between neighbouring phenotypes and is a common modelling choice in phenotype-structured systems [4, 21, 26].
The saturation function depends on the local population density, , averaged over phenotype, and models reduced motility arising from crowding or volume-filling effects. A common choice is
which enforces .
Importantly, this discrete formulation allows for an arbitrary number of phenotypes, with potentially small or large, and requires no assumptions about continuity or smoothness with respect to phenotype.
Continuous phenotype formulation
In the continuous formulation, the discrete phenotype index is replaced by a continuous phenotype variable , where is referred to as the phenotype domain or phenotype space. The geometry of , together with the phenotypic dependence of the interaction kernel, encode our assumptions about how the population is structured by phenotype. The population density depends on phenotype as well as (physical) space and time, and evolves according to the non-dimensional equations
Throughout, subscripts of on differential operators indicate differentiation with respect to physical space only.
Here, the interaction kernel governs the movement of individuals with phenotype induced by individuals with phenotype , when they are separated by a physical distance . We allow for phenotypic switching through the last term in (4), where is the continuum switching rate. This represents linear diffusion in phenotype space and is the continuum analogue of the graph Laplacian in (3). Throughout, we impose no-flux conditions at the boundaries of the phenotype domain,
Analogously to the discrete formulation, the saturation function depends on the total local population density, with a common choice being
In both formulations, in order to investigate pattern formation, we typically consider initial conditions of a homogeneous state, , with a small random perturbation that is heterogeneous across physical space and phenotypes.
Although phenotype-structured models are often formulated using a continuous phenotype variable [4], we develop the discrete and continuous formulations in parallel throughout this work. This enables a direct comparison of their mathematical structures, as well as the analytical tractability and insight that each offers.
Derivation of the continuous formulation from the discrete formulation
The continuous phenotype model (4) arises naturally as a formal continuum limit of the discrete phenotype model (2) as the number of phenotypes tends to infinity. To construct this limit, we consider discrete models whose phenotypes increasingly finely sample a continuous phenotype space, and assume that the discrete phenotype densities and interaction kernels approach well-defined continuous functions. These additional assumptions are required only for the continuum limit; the general discrete formulation (2) has broader scope, allowing an arbitrary number of phenotypes without requiring their properties to vary continuously or smoothly. The specific regularity conditions needed to justify each limiting step are stated below.
We assume that the phenotype domain is partitioned into intervals of equal width
with phenotype associated with the midpoint of the th interval. The discrete phenotype densities are identified with samples of a phenotype density , where
Similarly, the discrete interaction kernels are identified with samples of an interaction kernel according to
The factor of reflects that each discrete phenotype represents an interval of phenotype space. Thus, represents the interaction contributed by individuals within the corresponding phenotype interval and consequently scales as . With these definitions, the interaction term in (2) becomes
Provided is continuous in , this is a midpoint Riemann sum and, in the limit , converges to
where in the continuum limit.
Finally, we relate the discrete and continuous switching rates by
where is the continuous switching rate. Assuming is twice continuously differentiable with respect to , the graph Laplacian in (3) is the standard centred finite-difference approximation to the phenotype Laplacian,
as . The discrete no-flux boundary conditions similarly converge to the continuous boundary condition (5).
Substituting these limits into (2) yields the continuous phenotype model (4). The same construction extends naturally to multidimensional phenotype spaces.
Separable spatial and phenotypic kernels
The interaction kernels and determine how interactions depend on physical separation and phenotype. In the most general case, the strength, direction, and spatial scale may all vary with the phenotypes of both interacting individuals. Within this broad framework, we focus on several biologically relevant interaction structures that allow us to isolate and understand how different aspects of phenotypic heterogeneity influence aggregation and pattern formation.
We assume that the spatial and phenotypic dependence of the interaction kernel are separable. Hence, in the discrete formulation,
where is a common spatial interaction kernel and are the entries of the phenotype interaction matrix. Correspondingly, in the continuous formulation,
where is the phenotype interaction kernel. We assume that the spatial interaction kernel satisfies , so that the sign of the interaction is determined entirely by the phenotype kernel. Positive values of or therefore correspond to attraction, whilst negative values correspond to repulsion. The fully attractive case is the most common in applications such as aggregation and cell–cell adhesion, whereas repulsive interactions arise naturally in contexts such as contact inhibition or fleeing [13, 14, 17].
Thus, with the above assumption, phenotype determines the strength and direction of interactions, but not their dependence on physical separation. This is natural when phenotypes differ in their overall adhesive, attractive, or signalling strength whilst sharing a characteristic interaction length scale. For example, cells may differ in adhesive strength through differences in cadherin expression whilst interacting over a common range set by cell–cell contact [27]. Similarly, through differences in receptor expression, chemotaxing cells can vary in their sensitivity despite responding to the same signalling molecule, and hence over the same spatial scale [21, 28, 29]. Even when different extracellular signalling molecules are involved, those of comparable size can have similar diffusivities [30]. Likewise, individual animals within a group may differ in their responsiveness to neighbours whilst using the same sensory cues to coordinate their movement [31]. Other choices are possible; for example, Lorenzi et al. [24] instead assume that phenotype determines the interaction length scale.
For convenience, we introduce overall interaction strength parameters, in the discrete formulation and in the continuous formulation, and, without loss of generality, choose the normalisation
This separates the functional form of the interactions from their overall magnitude: the phenotype kernel (or ) determines the phenotype dependence, the spatial kernel the spatial dependence, and (or ) the overall interaction strength. To ensure consistency between the discrete and continuous formulations under the correspondence (8), we define .
We next assume that the phenotypic effects of the two interacting individuals are themselves separable. Hence, in the discrete formulation,
while in the continuous formulation,
Here, and are referred to as the response and signal functions, respectively. The response function determines how strongly an individual responds (or, equivalently, its susceptibility) to an interaction, while the signal function determines how strongly an individual contributes to that interaction through its signal production. One way of interpreting (2.14)–(2.15) is as a “no preferential treatment" assumption: interactions depend only on two independent factors, how strongly one phenotype emits a signal and how strongly the other responds to that signal. That is, individuals distinguish only the total strength of an incoming signal, not the phenotype from which it originated.
The present study (Part I) focuses on this class of separable phenotype interactions, in which phenotype represents an absolute aggregation strength. In the follow-up to this study (Part II [25]), we will instead consider interactions that depend only on phenotypic similarity, so that in the discrete formulation and in the continuous formulation. These interactions possess a fundamentally different mathematical structure and biological interpretation.
Interactions with a response–signal separation structure arise naturally across different biological contexts. For example, could describe how much aggregation pheromone an animal releases, while describes how strongly another individual moves towards it. Similarly, in a cell–cell adhesion setting, could represent the abundance of membrane-bound adhesive ligands presented by a cell. Meanwhile, represents the strength of the signal induced by ligand binding to membrane-bound receptors on the responding cell, depending, for example, on receptor abundance and replenishment. The product then provides a simple mass-action-type approximation in which interaction strength increases with both ligand availability and receptor-mediated responsiveness.
We consider monotonic response and signal functions so that phenotype has a unique biological interpretation. If both functions increase with phenotype, then larger phenotype values correspond to individuals that both produce stronger interaction signals and respond more strongly to signals produced by others. Alternatively, one function may increase while the other decreases, representing a trade-off between signal production and response susceptibility. Both cases are considered in this work, inspired by the phenotype-structured chemotaxis model of Lorenzi and Painter [21], in which phenotype simultaneously specifies chemoattractant secretion and chemotactic sensitivity.
Pattern formation through linear instability
To investigate how phenotypic heterogeneity influences aggregation, we perform a linear stability analysis of the homogeneous steady states of the discrete and continuous phenotype models (2) and (4). Our first aim is to determine when small spatially heterogeneous perturbations grow, leading to the spontaneous formation of spatial patterns. We then investigate the structure of these patterns in both physical and phenotype space.
Unlike standard linear stability analyses of pattern formation, however, the presence of phenotype structure introduces an additional layer of complexity. In physical space, perturbations may still be decomposed into eigenfunctions of the Laplacian (in the present setting, Fourier modes), but in phenotype space the appropriate eigenfunctions are generally not known a priori. Instead, they depend on both the phenotype kernel and the rate of phenotypic switching. For this reason, unlike the standard approach to linear stability analysis used in most studies of pattern-forming models, which assumes a complex exponential ansatz from the outset [16, 32], we proceed more carefully from first principles. We therefore first derive the appropriate eigenvalue problems, before specialising to particular classes of phenotype interactions and switching regimes.
As is standard in linear stability analyses of pattern formation, the eigenvalues, , are the growth rates of perturbations with spatial wavenumber . Linear instability, and hence pattern formation, occurs whenever for some .
Discrete phenotype formulation
Beginning with the discrete model (2), we linearise about a homogeneous steady state 1 by taking , where is a small perturbation that is heterogeneous in both physical space and phenotype index. Retaining only leading order terms gives
for . We then expand the perturbation using its Fourier transform in physical space,
For simplicity, throughout the linear stability analysis we work as though , treating the wavenumber as continuous. The same dispersion relation applies on the periodic domain , but with wavenumbers restricted to the discrete set of admissible Fourier modes. Substituting the above transform into (17) and projecting onto the Fourier mode using the orthogonality of Fourier modes yields
where the second line follows from the separability assumption (13), and
is the -dimensional Fourier transform of the spatial interaction kernel. Since is isotropic, depending only on the separation distance , its Fourier transform depends only on the wavenumber magnitude . We assume throughout that , as this holds for many commonly used interaction kernels, such as an exponential decay kernel and a Gaussian kernel, and is a reasonable assumption for interactions that weaken sufficiently with distance. Further discussion of this assumption and its relaxation is given in [16, 17].
It follows from equation (18) that the linear growth rates of perturbations with spatial wavenumber are given by the eigenvalues, , of the stability matrix with elements
The challenge is therefore to determine the spectrum of . Its eigenvalues govern the growth of perturbations and hence the capacity for pattern formation, while the corresponding eigenvectors determine the phenotype structure of the resulting patterns. Both depend critically on the phenotype interaction matrix and the phenotypic switching rate . We now investigate how these ideas translate to the continuous phenotype formulation.
Continuous phenotype formulation
The corresponding analysis for the continuous phenotype model (4) proceeds similarly. Linearising about a homogeneous steady state using gives
in Section 4.
Expanding with a Fourier transform in physical space, projecting onto the Fourier mode , and using the separability assumption (14) yields
To determine the linear growth rates, we seek separable solutions in terms of and of the form
where describes the temporal growth of the perturbation, while the phenotype eigenfunction describes the distribution of phenotypes within the corresponding physical space Fourier mode. Separating variables yields
where is the growth rate, which has no dependence, and satisfies
The no-flux boundary condition (5) also requires that
Where the discrete formulation reduces to determining the spectrum of a finite-dimensional matrix, the continuous formulation requires the solution of the integrodifferential eigenvalue problem (22)–(23). In both formulations, the eigenvalues govern the capacity for pattern formation, while the phenotype structure of the resulting patterns is determined by the corresponding eigenvectors (discrete) or eigenfunctions (continuous). Although both formulations could be unified using operator and inner-product notation, we deliberately retain their explicit discrete and continuous forms. Doing so makes their distinct mathematical structures and associated analytical tools transparent, allowing us to use whichever formulation is more natural for a given calculation. We exploit this flexibility throughout the remainder of the paper, using the separability assumption (15)–(16) and considering different phenotypic switching regimes to make analytical progress.
Slow phenotypic switching regime
In this section, we consider the regime of negligibly slow phenotypic switching, , or equivalently . We take this limit before the continuum phenotype limit, ensuring that switching remains negligible as . We then solve the discrete and continuous spectral problems derived in the previous section to obtain explicit conditions for pattern formation. Finally, we compare these analytical predictions with numerical simulations and discuss the biological insight that they provide.
Pattern formation conditions
Discrete formulation
In the limit , the stability matrix (19) reduces to
Since the first term is proportional to the identity matrix, determining the growth rates reduces to finding the eigenvalues of the phenotype interaction matrix . Using the response–signal separation assumption (15),
the phenotype interaction matrix is the outer product of two vectors and therefore has rank one [33]. Furthermore,
for , showing that is an eigenvector of with eigenvalue
Since has rank one, this is its only non-zero eigenvalue, while the remaining eigenvalues are zero. Consequently, the dispersion relation consists of a single potentially pattern-forming branch,
while the remaining branches satisfy
and therefore do not contribute to pattern formation.
Continuous formulation
We now show how the above analysis is mirrored in the continuous phenotype formulation. In the limit , the phenotype eigenvalue problem (22) reduces to
Using the response–signal separation assumption (16),
we then have
Since the right-hand side is proportional to the response function , any non-trivial eigenfunction satisfying must also be proportional to . Taking and substituting this into (28) gives
This is the continuous analogue of the discrete dispersion relation (26), with the finite sum over phenotypes replaced by an integral over phenotype space.
Biological insight
We now interpret the biological insights provided by the theory in the slow phenotypic switching regime and supplement these predictions with numerical simulations.
Although the analytical calculations use both discrete and continuous phenotype formulations, all numerical simulations are performed by discretising the continuous phenotype variable, allowing comparison with both theories. We therefore present all simulation results using the continuous notation , , and , together with the number of phenotype classes , even when comparing with the discrete theory. Full
details of the numerical implementation, initial conditions, and parameters are given in Appendix § 9.
Despite the complexity of having phenotypes, or even a continuum of phenotypes, the structure imposed by response–signal separation greatly simplifies the pattern-forming dynamics: for each spatial wavenumber , there is only one phenotype mode that can drive pattern formation. Both its phenotype structure and growth rate can be characterised explicitly, with the latter given by the dispersion relations (26) and (29).
We see that the growth rate, , depends on the inner product of the response and signal functions, and . Pattern formation is therefore promoted when signal production and response are positively correlated, so that the individuals that produce stronger signals are also those that respond more strongly. Conversely, negative correlation, in which phenotypes specialise towards either signal production or response, suppresses pattern formation. This is illustrated in Figure 1, where the positively correlated cases (a) and (d) have larger growth rates than the negatively correlated cases (b) and (c). The theoretical dispersion relations closely agree with those inferred directly from the simulations using dynamic mode decomposition (DMD; Appendix (c)).
Figure 1. Numerical simulations in the slow phenotypic switching regime (). Simulations with are visually indistinguishable (not shown). Each of the columns (a)–(d) corresponds to a different combination of increasing or decreasing response and signal functions. For each case, the top panel shows the late-time () solution , with physical space on the horizontal axis and phenotype on the vertical axis. In (a), all phenotypes above the green dashed horizontal line would form patterns in isolation. In (b), the green and red dashed horizontal lines mark the lower and upper thresholds, respectively, so that only phenotypes between the two thresholds would form patterns in isolation. Nevertheless, in all cases, phenotypes outside these ranges are recruited into the collective pattern through coupling to the rest of the population. The lower panels compare the dispersion relation predicted by (26) & (29) with that inferred directly from the simulations using dynamic mode decomposition. The icons below each column indicate whether the response function and signal function increase or decrease with phenotype. Panels (e) and (f) show the functional forms used for increasing and decreasing response or signal functions, namely and , respectively. Parameters: , , .
The phenotype structure of the resulting patterns has an even simpler dependence: the phenotype eigenvector or eigenfunction is proportional to the response function . Thus, determines how strongly each phenotype participates in the pattern. In contrast, how much signal each phenotype produces, , still affects the growth rate but has no effect on the structure of the pattern. In Figure 1(a,Figure 1b), where increases with phenotype, the more responsive phenotypes aggregate with greater amplitude; this structure is reversed in (c,d), where decreases. Comparing (a) with (b), or (c) with (d), shows that changing does not alter this phenotype structure.
Comparing with a model containing only a single phenotype, we see that phenotypic heterogeneity allows weakly interacting phenotypes to participate in pattern formation. Phenotypes that would be unable to pattern in isolation can nevertheless be incorporated into a collective pattern through their interactions with the rest of the population. Examples include phenotypes below the green dashed lines in Figure 1(a,Figure 1b), whose response is too weak to support pattern formation in isolation, and those above the red dashed line in Figure 1(b), whose signal production is too weak. This collective patterning even extends to phenotypes that are themselves repulsive.
To illustrate this, in Figure 2 we allow the response function to change sign. Phenotypes below the critical value therefore respond by moving away from all phenotypes, including themselves. Since the phenotype eigenfunction is proportional to , these repulsive phenotypes nevertheless aggregate as part of the collective pattern, but out of phase with the attracting phenotypes, with density peaks at different spatial locations. In contrast, in cases where remains positive while changes sign, the phenotype eigenfunction remains positive and all phenotypes aggregate in phase.
Figure 2. Numerical simulation illustrating out-of-phase aggregation when the response function changes sign. The response and signal functions are shown in the third panel, with , so that phenotypes with have negative response, thereby repelling from all phenotypes, including themselves. The first panel shows the late-time () solution , while the second compares the dispersion relation predicted by (26) and (29) with that inferred directly from the simulation using dynamic mode decomposition. In the first panel, phenotypes below the green dashed line would not form patterns in isolation, while those below the cyan dashed line are additionally repulsive. Nevertheless, coupling between phenotypes drives the entire population into a collective pattern, with the repulsive phenotypes aggregating out of phase with the attracting phenotypes. Parameters: , , .
An important additional result is that the slow-switching dispersion relations are purely real, so linear instability cannot generate temporal oscillations under the response–signal separation assumption. This does not preclude oscillations arising through nonlinear mechanisms. Examples of such behaviour are presented later in Section (b), although we have only observed them at intermediate phenotypic switching rates.
None of the above conclusions rely on having a finely resolved phenotype space. The discrete theory applies equally to small , as illustrated in Figure 3, where choosing 3, 4, 6, 24, or 50 phenotype classes reproduces the same qualitative behaviour and shows close agreement between the theoretical and numerically inferred dispersion relations.
Figure 3. Results from simulations using the same parameters as Figure 1(a), but with the phenotype discretisation coarsened from to , , , and . Gray horizontal lines delimit the different phenotype classes. Each heatmap in (a) shows the late-time () solution . Differences in aggregate location arise only from different realisations of the random initial conditions, since the periodic system is translationally invariant and therefore has no preferred location. Panel (b) compares the dispersion relation predicted by (26) with that inferred directly from each simulation using dynamic mode decomposition. The close agreement between the theory and the simulations for every illustrates that the discrete theory remains accurate for both small and large . Parameters: , .
For completeness, we also extend our analysis beyond steady states that are homogeneous in phenotype, , to those with an arbitrary phenotype distribution, or . For any , phenotypic switching enforces homogeneity, whereas at strictly zero switching, , spatially homogeneous steady states may retain an arbitrary phenotype distribution. Repeating the linear stability analysis about such states simply rescales the response function according to or , with . Thus, although the zero-switching case can retain dependence on the initial conditions, this introduces no fundamentally new linear behaviour and can be readily accounted for within the existing analysis.
Fast phenotypic switching regime
In this section, we consider the regime of asymptotically fast phenotypic switching, , or equivalently . In this regime, phenotypic switching occurs on a much faster timescale than movement in physical space, rapidly homogenising the phenotype distribution. We determine the corresponding pattern formation conditions for the discrete and continuous phenotype formulations, before comparing the analytical predictions with numerical simulations and discussing the biological insight that they provide.
Pattern formation conditions
Discrete formulation
Unlike the slow switching limit, the fast switching limit cannot be obtained simply by taking the limit of the stability matrix. Instead, we consider the limit and expand the Fourier amplitudes in powers of the inverse switching rate,
At leading order, the phenotypic switching term in (18) requires
for . Thus, the leading-order Fourier amplitudes lie in the nullspace of the graph Laplacian. From (3), this implies
The only solution is the constant vector
Physically, this corresponds to rapid phenotypic switching homogenising each spatial Fourier mode across phenotype space.
At the next order, substituting the expansion into (18) gives
Summing (31) over all phenotypes and using the fact that the column sums of the graph Laplacian vanish eliminates the unknown correction , giving
This summation can equivalently be understood as imposing the solvability condition for the next-order equation. Since the graph Laplacian is symmetric and has the constant vector as its zero eigenvector, the Fredholm alternative requires the terms not involving in (31) to be orthogonal to this vector, i.e. they must sum to zero.
Equation (32) implies that the leading-order fast-switching dispersion relation is
With the response–signal separation assumption (15),
this simplifies to
Continuous formulation
We now show how the above analysis is mirrored in the continuous phenotype formulation. As , we similarly expand the phenotype eigenfunction
At leading order, the phenotypic switching term in (22) requires
subject to the no-flux boundary conditions (23). The only solution is the -independent function
As in the discrete formulation, rapid phenotypic switching homogenises the phenotype eigenfunction.
At the next order, integrating (22) over phenotype space and using the no-flux boundary conditions eliminates the phenotype diffusion term containing the unknown correction , giving
Again, this step can equivalently be understood as imposing the Fredholm solvability condition.
With the response–signal separation assumption (16),
the dispersion relation simplifies to
This is the continuous analogue of the discrete dispersion relation (34), with finite sums over phenotype replaced by integrals over phenotype space.
Biological insight
We now interpret the biological insights provided by the theory in the fast phenotypic switching regime and compare its predictions with numerical simulations. A central consequence of rapid phenotypic switching is that the pattern-forming dynamics again reduce to a single phenotype mode. In contrast to the slow-switching regime, however, this simplification does not arise from or require response–signal separation. Instead, rapid switching homogenises the population across phenotype space, irrespective of the structure of the phenotype interactions.
The dispersion relations (33) and (37) show that the growth rate, , and hence the capacity for pattern formation, is determined only by the total interaction strength in the system, rather than by how those interactions are structured between phenotypes. Here, we use total interaction strength to refer to the double sum of , or equivalently the double integral of . Under response–signal separation, equations (34) and (38) show that the growth rate therefore depends only on the total response and total signal, not on their correlation. This is illustrated in Figure 4: despite the different combinations of increasing and decreasing and , all four cases have the same dispersion relation, with close agreement between theory and that inferred from simulations using DMD. This contrasts with the slow-switching regime, where correlations between response and signal strongly influence pattern formation.
Figure 4. Numerical simulations in the fast phenotypic switching regime (). Each of the columns (a)–(d) corresponds to a different combination of increasing () or decreasing () response and signal functions, indicated by the icons below each column. For each case, the top panel shows the late-time () solution , with physical space on the horizontal axis and phenotype on the vertical axis. In (a), all phenotypes above the green dashed horizontal line would form patterns in isolation. In (b), the green and red dashed horizontal lines mark the lower and upper thresholds, respectively, so that only phenotypes between the two thresholds would form patterns in isolation. In contrast to Figure 1, the patterns are homogeneous in phenotype, reflecting the rapid mixing induced by fast phenotypic switching. The lower panels compare the dispersion relation predicted by (34) and (38) with that inferred directly from the simulations using dynamic mode decomposition. As predicted by the theory, the dispersion relation is identical in all four cases. Parameters: , , .
Rapid switching homogenises the resulting patterns across phenotype space. Since the leading-order phenotype eigenvector or eigenfunction is constant, all phenotypes aggregate with equal amplitude, as seen in Figure 4. Consequently, phenotypes that would be unable to pattern in isolation are fully incorporated into the collective pattern, in contrast to the slow-switching regime, where less responsive phenotypes aggregate with smaller amplitude. This extends even to repulsive phenotypes: in Figure 5, rapid switching causes the repulsive and attracting phenotypes to aggregate in phase, in contrast to the out-of-phase aggregation observed under slow switching.
Figure 5. Numerical simulation illustrating in-phase aggregation under fast phenotypic switching () when the response function changes sign. The response and signal functions are shown in the third panel, with , so that phenotypes with have negative response, thereby repelling from all phenotypes, including themselves. The first panel shows the late-time () solution , while the second compares the dispersion relation predicted by (34) and (38) with that inferred directly from the simulation using dynamic mode decomposition. In the first panel, phenotypes below the green dashed line would not form patterns in isolation, while those below the cyan dashed line are additionally repulsive. Nevertheless, rapid phenotypic switching drives the entire population into a pattern that is uniform across phenotype space, with even the repulsive phenotypes aggregating in phase with the attracting phenotypes. Parameters: , , .
As in the slow-switching regime, the dispersion relation is purely real, and so linear instability cannot generate temporal oscillations. We have also verified numerically that the fast-switching theory remains accurate for small (results not shown), consistent with the discrete formulation.
Generic phenotypic switching
Having analysed the limiting cases of slow and fast phenotypic switching, we now tackle the more generic case where , or equivalently . In this regime, calculating the phenotype eigenfunctions and the corresponding growth rates is substantially more involved than in the previous limiting cases. Indeed, analysis of phenotype-structured models with generic switching rates has been identified as particularly challenging [21], with some studies instead focusing on limiting cases [22, 24]. To overcome these analytical challenges, having the choice between the discrete and continuous phenotype formulations becomes particularly valuable, allowing whichever mathematical tools are more familiar or convenient to be used. We illustrate this with two calculations, each of which naturally lends itself to a different formulation. Together, these demonstrate that substantial analytical progress is still possible in some cases, providing further insight into how phenotypic switching influences both the capacity for pattern formation and whether the resulting patterns can be oscillatory.
Pattern formation
General dispersion relation
To derive the dispersion relation governing pattern formation in the generic switching regime, we use the continuous phenotype formulation. With the response–signal separation assumption (16),
the phenotype eigenvalue problem (22) can be written as
where we have defined
Fixing and treating as a constant, equation (39) is a linear second-order ODE in with constant coefficients and forcing proportional to . This ODE can be solved directly for particular choices of , with its solution then used to solve for for particular choices of . Instead, we first take a more general Green’s function approach, and only later specify and . This leads to an implicit condition for the growth rates through the self-consistency relation defining .
Let denote the Green’s function for the differential operator
defined by
The solution to (39) is therefore
Already, this solution suggests that the phenotype eigenfunction is a smoothed version of the response function, , with the extent of the smoothing depending on, among other things, the switching rate, . This provides a natural intermediary between the slow switching regime, where the phenotype eigenfunction is exactly , and the fast switching regime, where the phenotype eigenfunction is averaged to a constant.
Substituting (41) into the definition of gives
Hence, non-trivial solutions satisfy
where we have defined the integral
To determine the growth rates, we derive the Green’s function and substitute it into (43)–(44). We then specialise to particular choices of the signal and response functions, and , compute the resulting integrals (44), and solve for .
In Appendix (a) we derive the Green’s function, showing that it takes the form
provided , where .
Positively correlated response and signal functions
We first consider a case in which individuals with higher phenotype values both emit stronger signals and respond more strongly to signals. We choose the positively correlated response and signal functions
With these choices, the integral (44) evaluates to
The calculation of this integral is given in Appendix (b)i. Substituting this into (43) and rearranging for yields the dispersion relation
Despite the analytical challenges associated with generic switching rates, we have obtained a closed-form expression for the growth rate . There are two branches of the dispersion relation, with the second corresponding to taking the negative square root in (46). However, this branch satisfies for all and therefore cannot drive pattern formation. We therefore focus on the positive branch.
Equation (46) recovers the limiting regimes derived previously. As ,
recovering (29), whilst as ,
recovering (37). An important observation is that decreases monotonically with and continuously interpolates between these two limits.
Negatively correlated response and signal functions
We now consider a case in which there is a trade-off between signal production and response, such that individuals with higher phenotype respond more strongly to signals but emit less of them. We choose
Here, the integral (44), whose calculation is described in Appendix (b)ii, evaluates to
Substituting this into (43) and rearranging for yields the dispersion relation
We once again obtain a closed-form expression for the growth rate . There are again two branches of the dispersion relation, with the branch corresponding to the negative square root unable to drive pattern formation.
As in the positively correlated case, taking appropriate limits of (47) recovers the slow- and fast-switching dispersion relations. Here, however, increases monotonically with , again continuously interpolating between the two limits.
Discrete equivalent
Having used the continuous formulation to derive the dispersion relation governing pattern formation for generic phenotypic switching, we now briefly compare this calculation with its counterpart in the discrete formulation.
An equivalent equation to (43) can be found in the discrete formulation by treating as a rank-one perturbation in (19), giving
where is the tridiagonal matrix with entries . In principle, (48) can be solved for by first inverting . While this is certainly possible [34], it relies on tools that are perhaps less familiar than those used in the continuous analogue, where the corresponding problem reduced to solving a second-order linear ODE with constant coefficients. The Green’s function approach adopted above provides a general solution, while for particular choices of and , an even simpler approach based on combining the homogeneous solution with an appropriate particular integral would suffice.
Biological insight
The above results provide a clear picture of how phenotypic switching modifies the effect of correlations between response and signal production. As seen in the slow-switching limit, positive correlation promotes pattern formation, whereas negative correlation inhibits it. Equations (46) and (47) show that increasing the switching rate progressively averages out the effect of these correlations, and therefore has opposite effects in the two cases: it inhibits pattern formation when response and signal are positively correlated, but promotes it when they are negatively correlated. In the fast-switching limit, the effect of correlation is lost entirely and the two cases become equivalent.
Figure 6 summarises this behaviour in the plane. The slow- and fast-switching limits bound the behaviour, while the generic-switching dispersion relations show that the growth rate varies monotonically between them as increases. Together, these results provide a complete classification, for the interaction structures considered here, of how phenotypic switching affects the capacity for pattern formation.
Figure 6. Phase diagram showing the onset of pattern formation in the plane. The bifurcation curves, defined by , are computed from the slow-switching dispersion relation (29), the fast-switching dispersion relation (37), and the generic-switching dispersion relations (46) and (47). Pattern formation occurs above each curve. Positive correlation between the response and signal functions lowers the critical interaction strength required for pattern formation, whereas negative correlation raises it. The generic-switching bifurcation curves interpolate continuously between the slow- and fast-switching limits, with the transition occurring over only a narrow range of switching rates.
The theoretical predictions are corroborated in Figure 7, where the growth rates predicted by (46) and (47) closely match those inferred directly from the simulations.
Figure 7. Numerical simulations at an intermediate phenotypic switching rate (). Rows (a) and (b) correspond to positively correlated response and signal functions, , and negatively correlated functions, and , respectively, as indicated by the icons on the left. The middle panels compare the slow- and fast-switching limits with the generic-switching dispersion relations (46) and (47), together with growth rates inferred directly from simulations using DMD. In both cases, the generic-switching prediction lies between the two limiting regimes and closely agrees with the simulation. Increasing the switching rate decreases the growth rate for positive correlation, while the opposite occurs for negative correlation. The right panels show the corresponding late-time () solutions . Parameters: , , .
For positive correlation, the intermediate-switching growth rates lie below the slow-switching limit and above the fast-switching limit, with the ordering reversed for negative correlation.
Finally, for both choices of response and signal functions considered above, the growth rates remain purely real for all switching rates. Thus, in these cases, linear instability cannot generate spatio-temporal oscillations. Next, we ask more generally: when can spatio-temporal oscillations arise? In contrast to the above analysis, this question is more naturally addressed using the discrete phenotype formulation, as we will show below.
Spatio-temporal oscillations
Conditions for linear spatio-temporal oscillations
We first show that linear spatio-temporal oscillations cannot arise when all cross-phenotype interactions are attractive. Assuming
the growth rate with largest real part is real for every . This result is considerably more general than those above, since it does not require the response–signal separation assumption (15). The proof is simpler in the discrete formulation, where it follows directly from the Perron–Frobenius theorem. This states that any square matrix with strictly positive entries possesses a unique eigenvalue with largest real part, which is real, simple, and has an associated eigenvector whose components all have the same sign [35].
For , the off-diagonal entries of the stability matrix (19) satisfy
For the diagonal elements, we can choose a sufficiently large constant such that
Thus, the shifted matrix with entries
is strictly positive. The Perron–Frobenius theorem therefore applies, so its eigenvalue with largest real part is real, simple, and has an associated eigenvector whose components all have the same sign. Since adding merely shifts every eigenvalue by without changing the eigenvectors, the same conclusions hold for the stability matrix (19). Hence, the fastest-growing mode is always non-oscillatory, and every phenotype aggregates in phase.
Moreover, the only assumption required is that all cross-phenotype interactions are attractive, as would naturally arise in applications to cell–cell adhesion. We conjecture that an analogous result also holds in the continuous formulation, although establishing it would likely require more abstract functional analysis, such as the Krein–Rutman theorem [36]. This therefore provides an example where the discrete formulation requires less heavy machinery and is arguably the more natural choice.
These results place strong restrictions on spatio-temporal oscillations arising through linear instability. Even without response–signal separation, an oscillatory instability requires some repulsive interactions, together with sufficient attraction to drive pattern formation. Under response–signal separation, our slow- and fast-switching results impose the additional requirement of an intermediate phenotypic switching rate. These are necessary but not sufficient conditions for the presence of an oscillation. Moreover, these conclusions concern only linear mechanisms and do not preclude oscillations generated by nonlinear dynamics.
Example of linear spatio-temporal oscillations
We now demonstrate that repulsive cross-phenotype interactions, sufficient attraction to drive pattern formation, and intermediate switching rates can together give rise to an oscillatory instability. As a simple proof of concept, Figure 8 considers phenotypes with an intermediate switching rate, , and a response function containing negative values, corresponding to repulsive phenotypes. The stability matrix (19) predicts that the fastest-growing mode has a complex growth rate with positive real part and non-zero imaginary part, corresponding to a Turing–Hopf (or wave) instability.
Figure 8. Numerical simulation of spatio-temporal oscillations arising from a Turing–Hopf (wave) instability. The stability matrix (19) predicts a fastest-growing mode with a growth rate that has a non-zero imaginary part. We consider phenotypes at an intermediate switching rate, , with a sign-changing response , allowing both attractive and repulsive phenotypes. Panel (a) shows the phenotype densities , , at successive times, while (b) shows a kymograph of the phenotype-averaged density , with a magnified section highlighting the oscillations. Parameters: , , , . Videos are available at [37].
Consistent with this prediction, the numerical simulation develops a spatio-temporally oscillating pattern. This provides an example of how coupling between movement in phenotype space and movement in physical space can generate oscillations when the two occur on comparable timescales.
Nonlinear spatio-temporal oscillations
Spatio-temporal oscillations can also arise through nonlinear mechanisms that are not predicted by the linear stability analysis. Figure 9 shows examples with an intermediate phenotypic switching rate and a sign-changing response function, allowing both attractive and repulsive phenotypes. For these parameters, the linear growth rates are purely real for all , and the spatio-temporal dynamics emerge only once the initially growing patterns reach sufficiently large amplitude, confirming their nonlinear origin.
Figure 9. Numerical simulations illustrating nonlinear spatio-temporal behaviour at an intermediate phenotypic switching rate, , with the sign-changing response function , allowing both attractive and repulsive phenotypes. In (a)–(c), the upper panels show the total population density at successive times, the middle panels show the corresponding distributions in physical and phenotype space, with the cyan dashed line separating repulsive from attractive phenotypes, and the lower panels show kymographs of the total population density. Despite having only phenotypes in (a), compared with in (c), both exhibit similar stop–start travelling patterns. In contrast, the larger domain in (b), rather than , produces irregular spatio-temporal dynamics resembling chaos. Parameters: , , . Videos are available at [37].
The spatio-temporal behaviour arises through a nucleation–merging mechanism similar to that observed in other aggregation models [13, 16, 38]. However, whilst nucleation in these cited models is driven by proliferation, here there is no proliferation, the population is conserved, and nucleation is instead driven by switching between attractive and repulsive phenotypes. Attractive phenotypes initially form a first aggregate, driving repulsive phenotypes away to form a second aggregate out of phase. At the first aggregate, diffusion in phenotype space switches individuals from attractive to repulsive, causing them to be driven towards the second aggregate, increasing its size. At the second aggregate, phenotypic diffusion has the opposite effect, switching individuals towards attractive phenotypes. The two aggregates then attract, move together and merge, after which the cycle repeats. Thus, movement in phenotype space continually restructures the spatial pattern, which in turn determines where switching generates attractive and repulsive individuals. Such coupling appears to rely on movement in phenotype and physical space occurring on comparable timescales.
This mechanism can occur with either a small or large number of phenotypes: the and simulations in Figure 9(a,Figure 9c) exhibit very similar stop–start travelling dynamics. The character of these dynamics, however, depends strongly on the size of the physical domain. On the smaller domain, repeated nucleation and merging produce periodic stop–start motion, whereas the larger domain in Figure 9(b) supports multiple aggregates and develops irregular dynamics resembling chaos. Indeed, applying the 0–1 test for chaos [39, 40] to the simulated time series provides numerical evidence that these dynamics are chaotic. We conjecture that increasing the domain size may lead to a period-doubling route to chaos, similar to that observed in [38], although we leave a systematic investigation for future work.
Interestingly, although this mechanism is nonlinear, it occurs under the same three conditions identified above as necessary for linear oscillatory instabilities under response–signal separation: intermediate phenotypic switching, repulsive interactions, and sufficient attraction to drive aggregation. This provides a further example of how coupling between movement in phenotype and physical space can generate complex spatio-temporal behaviour when the two processes occur on comparable timescales.
Discussion
Phenotypic heterogeneity can fundamentally alter how populations organise collectively in space. In this work, we explored these effects using phenotype-structured nonlocal aggregation models, characterising how heterogeneity influences whether patterns form, how populations are distributed across phenotype space within them, and whether the resulting patterns are stationary or oscillatory. We considered interactions in which phenotype determines how strongly individuals produce signal and how strongly they respond to others. We analysed regimes in which phenotypic switching is slow and fast, providing useful bounds on the onset of pattern formation, before considering generic switching rates and showing how the linear growth rates interpolate monotonically between these limits.
A central result is that correlations between signal production and response strongly influence pattern formation. When individuals that produce stronger signals are also those that respond more strongly, pattern formation is promoted. Conversely, negative correlation, in which individuals specialise towards either signal production or response, inhibits pattern formation. Increasing phenotypic switching progressively dampens this effect: switching inhibits pattern formation under positive correlation but promotes it under negative correlation, with the distinction disappearing in the fast-switching limit. Similar effects have recently been observed in a phenotype-structured Keller–Segel model [21]. Under slow phenotypic switching, positive correlation between chemotactic sensitivity and chemoattractant secretion promotes pattern formation, whereas negative correlation inhibits it; under fast switching, the influence of these correlations again disappears. The emergence of the same qualitative behaviour in a different aggregation framework suggests that our insights may have broader generality.
We also characterised how patterns are structured in phenotype space. Under slow switching, this structure follows the response function: more responsive individuals become more concentrated at the centre of an aggregate, while less responsive individuals remain more spatially dispersed. In contrast, signal production has no effect on the phenotype structure of the pattern. Increasing phenotypic switching progressively homogenises this structure until, in the fast-switching limit, the pattern becomes uniform across phenotype space. An important consequence is that aggregation is collective: weakly interacting individuals that could not pattern in isolation can nevertheless be recruited into an aggregate through their interactions with the wider population. This extends even to individuals whose interactions are repulsive.
Another theme of this study is how phenotypic complexity can be introduced, and under what conditions this leads to spatio-temporal oscillations. Generally in interacting systems, increasing the number of components can lead to increasingly complex eigenvalue spectra and dynamical behaviour. For example, Turing–Hopf (wave) instabilities in standard reaction–diffusion systems require three or more components [41], while work on complex ecological systems has demonstrated how stability depends on both the number and structure of interactions [42, 43]. This raises an interesting challenge in contexts such as developmental patterning, where the desired outcome is often a stable spatial structure whilst populations contain substantial phenotypic complexity.
Our results provide several examples of interaction structures that can maintain stationary patterns even with substantial phenotypic complexity. If all cross-phenotype interactions are attractive, the leading eigenvalue is always real, so spatio-temporal oscillations cannot arise through linear instability, even in the presence of phenotypic switching. Even if some interactions are repulsive, sufficiently fast switching can homogenise the phenotypes to behave effectively as one, preventing oscillatory linear instabilities. Finally, under slow or negligible switching, response–signal separation similarly gives only real pattern-forming growth rates. This leaves the possibility for spatio-temporal oscillations under response–signal separation only when some cross-phenotype interactions are repulsive, sufficient attraction remains to drive pattern formation, and phenotypic switching occurs on a comparable timescale to movement in physical space. Indeed, under these conditions we observe spatio-temporal behaviour arising through both linear and fully nonlinear mechanisms. In the nonlinear case, we observe a nucleation–merging mechanism similar to that seen in previous models [13, 16, 38]. However, the underlying mechanism appears to be novel, driven by switching between attractive and repulsive phenotypes rather than proliferation. Both the linear and nonlinear spatio-temporal behaviour discussed above are examples of how movement in phenotype and physical space can couple to continually restructure patterns in both spaces.
Other interaction structures can similarly restrict oscillatory behaviour; for example, detailed balance between species interactions can give rise to gradient-flow structures [18]. More broadly, identifying interaction structures that constrain oscillatory dynamics may help to explain how complex heterogeneous populations maintain stationary spatial organisation.
Throughout this study, we considered both discrete and continuous phenotype formulations, each offering distinct mathematical advantages. The continuous formulation naturally lends itself to PDE and continuum methods, as illustrated by our calculation in Section (a) for generic switching rates. The discrete formulation is more general, applying for arbitrary without requiring interactions to vary smoothly with phenotype, while also allowing the use of finite-dimensional matrix methods. For systems with many discrete phenotypes, this formulation may additionally open the door to random matrix theory, which has long been used to relate the spectra of large interaction matrices to ecological complexity and stability [42, 43, 44, 45, 46]. Our results highlight the benefits of considering both formulations, allowing whichever mathematical tools are most straightforward for a given problem to be used.
There are many compelling directions for future work. In Part II [25], the follow-up to this work, we will move from interactions that depend on absolute phenotype to those that depend on phenotypic distance, allowing interaction strength to depend on how similar individuals are to one another. Beyond this, our treatment of phenotypic switching as homogeneous linear diffusion is a simplification. Studies of epithelial–mesenchymal plasticity have shown that phenotypic states can differ substantially in their stability and transition properties [8], motivating phenotype-dependent switching rates. Nonlocal switching kernels provide another natural extension, allowing transitions between distant phenotypes [22]. Incorporating phenotype-dependent proliferation and death would be particularly relevant for modelling cancer, where proliferation, migration and phenotypic state can be strongly coupled [47].
Declaration of AI use
During the preparation of this work, the authors used OpenAI’s GPT-5.5 large language model to assist with grammar, phrasing, proofreading, and aspects of coding, including debugging author-written code and assisting with the implementation of selected functions. After using this tool, the authors reviewed and edited the content and code as needed and take full responsibility for the content of the published article.
Acknowledgements. Thomas Jun Jewell is supported by funding from the Edmund J. Crampin Scholarship at Linacre College, University of Oxford; and the Engineering and Physical Sciences Research Council [EP/W524311/1].
Numerical simulations
As discussed in Section (b), discretising the continuous phenotype variable recovers the discrete formulation at the numerical level. We therefore report simulations using the continuous notation , , and , with the corresponding discrete parameters given by and .
Parameters
Unless otherwise specified, we take the phenotype domain as with no-flux boundary conditions and the physical domain as , with and periodic boundary conditions. The phenotype domain is discretised into classes. Initial conditions consist of the homogeneous state perturbed independently at gridpoints across physical and phenotype space by zero-mean Gaussian noise with standard deviation .
For all simulations presented in this study, we use the exponential spatial interaction kernel
The kernel is truncated at half the domain length, , so that each pair of points interacts only once across the periodic domain. We have verified that our qualitative results are robust to changing the kernel to a tophat kernel, and to variations in the interaction length scale .
Numerical scheme
We discretise the physical domain using 256 grid points, giving a system of ordinary differential equations. This system is integrated in time using the explicit adaptive Runge–Kutta method of order 5(4) implemented by SciPy. Convolutions in physical space are evaluated using Fast Fourier Transforms (FFT). The full code and further details are available at [37].
Dynamic Mode Decomposition
To independently validate the analytical dispersion relations, we infer linear growth rates directly from the numerical simulations of the full nonlinear system using Dynamic Mode Decomposition (DMD) [48]. DMD approximates the linear evolution between successive snapshots of a dynamical system and extracts its eigenmodes and associated eigenvalues directly from time-series data.
We first subtract the homogeneous state and Fourier transform the simulation data in physical space. Exact DMD is then applied independently to the dynamics associated with each spatial Fourier mode , yielding a set of discrete-time eigenvalues , indexed by . For snapshots separated by , the corresponding continuous-time exponential growth rates are
The numerically inferred dispersion relation is then given by the largest real growth rate at each wavenumber,
DMD is applied to snapshots from the early stages of each simulation, when perturbations remain small and the dynamics are approximately linear, while excluding the earliest times associated with relaxation of the random initial condition. In practice, we use the time window with (i.e. typically ). The analysis requires no knowledge of the model parameters beyond the physical domain geometry and provides an independent numerical test of the analytical dispersion relations. We implement DMD using the PyDMD package.
Solving the eigenvalue problem for generic switching
Deriving the Green’s function
For generic phenotypic switching, , solving the phenotype eigenvalue problem (22) requires solving the second-order ODE (39). In the main text, we do this by introducing the Green’s function, , defined in (40). Here, we derive this Green’s function.
Let
Since it is not known a priori whether is real or satisfies , we do not assume that is real. Accordingly, the hyperbolic functions below are interpreted in the usual way for complex arguments. Equation (40) implies that, for , the Green’s function satisfies
Assuming that , the general solution to the above ODE for and is
The Neumann boundary conditions imply . Continuity at requires that
Finally, integrating the defining equation (40) across a small neighbourhood of yields the jump condition
Provided , combining these conditions gives
The Green’s function is thus given by
Calculating Green’s function integrals
Positively correlated response and signal functions
With the choice
the Green’s function integral (44) becomes
Since the Green’s function (B.1) is symmetric under interchange of and , the integrand is also symmetric, and so the double integral may be written as
Evaluating the inner integral and then the outer integral using standard trigonometric and hyperbolic integral identities gives
Negatively correlated response and signal functions
We next consider the negatively correlated choice
Noting that
the Green’s function integral (44) can be written, using linearity, as
Since was evaluated in Appendix (b)i, it remains only to calculate
From the Green’s function (B.1),
Evaluating the two integrals gives
where for the second equality, we used hyperbolic addition identities.
Hence,
Together with the result for from Appendix (b)i, this gives
References
- [1]Bolnick DI, Amarasekare P, Araújo MS, Bürger R, Levine JM, Novak M, Rudolf VH, Schreiber SJ, Urban MC, Vasseur DA. 2011 Why intraspecific trait variation matters in community ecology. Trends in ecology & evolution 26, 183–192.DOI
- [2]Tuljapurkar S, Caswell H. 2012 Structured-population models in marine, terrestrial, and freshwater systems vol. 18. Springer Science & Business Media.
- [3]Cushing JM. 1998 An introduction to structured population dynamics. SIAM.DOI
- [4]Lorenzi T, Painter KJ, Villa C. 2025 Phenotype structuring in collective cell migration: a tutorial of mathematical models and methods. Journal of Mathematical Biology 90, 61.DOI
- [5]Carter B, Zhao K. 2021 The epigenetic basis of cellular heterogeneity. Nature Reviews Genetics 22, 235–250.DOI
- [6]Ackermann M. 2015 A functional perspective on phenotypic heterogeneity in microorganisms. Nature Reviews Microbiology 13, 497–508.DOI
- [7]Keller L, Pantel K. 2019 Unravelling tumour heterogeneity by single-cell profiling of circulating tumour cells. Nature Reviews Cancer 19, 553–567.DOI
- [8]Hari K, Ullanat V, Balasubramanian A, Gopalan A, Jolly MK. 2022 Landscape of epithelial–mesenchymal plasticity as an emergent property of coordinated teams in regulatory networks. Elife 11, e76535.DOI
- [9]Yang J, Antin P, Berx G, Blanpain C, Brabletz T, Bronner M, Campbell K, Cano A, Casanova J, Christofori G et al.. 2020 Guidelines and definitions for research on epithelial–mesenchymal transition. Nature Reviews Molecular Cell Biology 21, 341–352.DOI
- [10]Painter KJ, Hillen T, Potts JR. 2024 Biological modeling with nonlocal advection–diffusion equations. Mathematical models and methods in applied sciences 34, 57–107.
- [11]Mogilner A, Edelstein-Keshet L. 1999 A non-local model for a swarm. Journal of mathematical biology 38, 534–570.DOI
- [12]Armstrong NJ, Painter KJ, Sherratt JA. 2006 A continuum approach to modelling cell–cell adhesion. Journal of theoretical biology 243, 98–113.pubmed.ncbi.nlm.nih.gov/16860344
- [13]Painter KJ, Bloomfield J, Sherratt JA, Gerisch A. 2015 A nonlocal model for contact attraction and repulsion in heterogeneous cell populations. Bulletin of mathematical biology 77, 1132–1165.DOI
- [14]Potts JR, Lewis MA. 2019 Spatial memory and taxis-driven pattern formation in model ecosystems. Bulletin of mathematical biology 81, 2725–2747.DOI
- [15]Giunta V, Hillen T, Lewis M, Potts J. 2023 Positivity and global existence for nonlocal advection-diffusion models of interacting populations. arXiv preprint arXiv:2312.09692.arxiv.org/abs/2312.09692
- [16]Jewell TJ, Krause AL, Maini PK, Gaffney EA. 2023 Patterning of nonlocal transport models in biology: the impact of spatial dimension. Mathematical Biosciences 366, 109093.arxiv.org/abs/2307.03117
- [17]Jewell TJ, Krause AL, Maini PK, Gaffney EA. 2025 Chase-and-run and chirality in nonlocal models of pattern formation. Bulletin of Mathematical Biology 87, 160.arxiv.org/abs/2505.17372
- [18]Carrillo JA, Salmaniw Y. 2026 Long-time behaviour and bifurcation analysis of a two-species aggregation-diffusion system on the torus. Calculus of Variations and Partial Differential Equations 65, 19.arxiv.org/abs/2507.03431
- [19]Giunta V, Hillen T, Lewis MA, Potts JR. 2025 A phylogeny of biological patterns formed by nonlocal advection. arXiv preprint arXiv:2506.00489.arxiv.org/abs/2506.00489
- [20]Gourley SA, Liu R, Wu J. 2008 pp. 165–208. In Spatiotemporal Patterns of Disease Spread: Interaction of Physiological Structure, Spatial Movements, Disease Progression and Human Intervention, pp. 165–208. Berlin, Heidelberg: Springer Berlin Heidelberg. (10.1007/978-3-540-78273-5_4)
- [21]Lorenzi T, Painter KJ. 2025 Pattern formation within phenotype-structured chemotactic populations. Proceedings of the Royal Society A 481, 20250483.arxiv.org/abs/2506.03389
- [22]Cusseddu D, Gambino G, Lorenzi T. 2026 On a phenotype-structured Shigesada–Kawasaki–Teramoto model: Turing instability and pattern selection under fast phenotype switching. arXiv preprint arXiv:2605.28976.arxiv.org/abs/2605.28976
- [23]Engwer C, Stinner C, Surulescu C. 2017 On a structured multiscale model for acid-mediated tumor invasion: the effects of adhesion and proliferation. Mathematical Models and Methods in Applied Sciences 27, 1355–1390.DOI
- [24]Lorenzi T, Loy N, Villa C. 2024 Phenotype-structuring of non-local kinetic models of cell migration driven by environmental sensing. arXiv preprint arXiv:2412.16258.arxiv.org/abs/2412.16258
- [25]Jewell TJ, Krause AL, Maini PK, Gaffney EA. 2026 Phenotype-structured nonlocal aggregation models II: similarity-dependent interactions. Manuscript in preparation.
- [26]Chisholm RH, Lorenzi T, Lorz A, Larsen AK, Almeida LNd, Escargueil A, Clairambault J. 2015 Emergence of drug tolerance in cancer cell populations: an evolutionary outcome of selection, nongenetic instability, and stress-induced adaptation. Cancer research 75, 930–939.DOI
- [27]Foty RA, Steinberg MS. 2005 The differential adhesion hypothesis: a direct evaluation. Developmental biology 278, 255–263.pubmed.ncbi.nlm.nih.gov/15649477
- [28]Chang SL, Cavnar SP, Takayama S, Luker GD, Linderman JJ. 2015 Cell, isoform, and environment factors shape gradients and modulate chemotaxis. PloS one 10, e0123450.DOI
- [29]Salek MM, Carrara F, Fernandez V, Guasto JS, Stocker R. 2019 Bacterial chemotaxis in a microfluidic T-maze reveals strong phenotypic heterogeneity in chemotactic sensitivity. Nature communications 10, 1877.DOI
- [30]Fleury ME, Boardman KC, Swartz MA. 2006 Autologous morphogen gradients by subtle interstitial flow and matrix interactions. Biophysical journal 91, 113–121.pubmed.ncbi.nlm.nih.gov/16603487
- [31]Herbert-Read JE. 2016 Understanding how animal groups achieve coordinated movement. Journal of Experimental Biology 219, 2971–2983.
- [32]Murray JD. 2003 Spatial Pattern Formation with Reaction Diffusion Systems. In Mathematical Biology II: Spatial Models and Biomedical Applications, Interdisciplinary Applied Mathematics, vol. 18, pp. 71–140. New York: Springer 3 edition.
- [33]Strang G. 2022 Introduction to linear algebra. SIAM.
- [34]Usmani RA. 1994 Inversion of a tridiagonal Jacobi matrix. Linear Algebra and its Applications 212, 413–414.DOI
- [35]Meyer CD. 2023 Perron–Frobenius and Nonnegative Matrices. In Matrix Analysis and Applied Linear Algebra , pp. 797–898. Philadelphia, PA: Society for Industrial and Applied Mathematics (SIAM) 2 edition. (10.1137/1.9781611977448.ch7)
- [36]Du Y. 2006 Order structure and topological methods in nonlinear partial differential equations: Vol. 1: Maximum principles and applications vol. 2. World Scientific.DOI
- [37]Jewell TJ. 2026 Phenotype Structured Nonlocal Advection Diffusion Simulations. https://github.com/JunJewell/PhenotypeStructuredNonlocalAdvectionDiffusion.
- [38]Painter KJ, Hillen T. 2011 Spatio-temporal chaos in a chemotaxis model. Physica D: Nonlinear Phenomena 240, 363–375.DOI
- [39]Gottwald GA, Melbourne I. 2016 The 0-1 test for chaos: A review. Chaos detection and predictability pp. 221–247.DOI
- [40]Gottwald GA, Melbourne I. 2009 On the implementation of the 0–1 test for chaos. SIAM Journal on Applied Dynamical Systems 8, 129–145.DOI
- [41]Villar-Sepúlveda E, Champneys AR. 2023 General conditions for Turing and wave instabilities in reaction-diffusion systems: E. Villar-Sepúlveda, AR Champneys. Journal of Mathematical Biology 86, 39.
- [42]May RM. 1972 Will a large complex system be stable?. Nature 238, 413–414.pubmed.ncbi.nlm.nih.gov/4559589
- [43]Allesina S, Tang S. 2012 Stability criteria for complex ecosystems. Nature 483, 205–208.DOI
- [44]Piskovsky V, Maini PK. 2024 Will a large complex system form Turing patterns?. bioRxiv.
- [45]Baron JW, Jewell TJ, Ryder C, Galla T. 2022 Eigenvalues of random matrices with generalized correlations: A path integral approach. Physical Review Letters 128, 120601.DOI
- [46]Baron JW, Jewell TJ, Ryder C, Galla T. 2023 Breakdown of random-matrix universality in persistent Lotka-Volterra communities. Physical Review Letters 130, 137401.
- [47]Sadhu G, Jolly MK, Maini PK. 2026 Traveling Wave Analysis of a Go-or-Grow Invasion Model with ECM-Regulated Phenotypic Switching. Physica D: Nonlinear Phenomena p. 135332.DOI
- [48]Schmid PJ. 2010 Dynamic mode decomposition of numerical and experimental data. Journal of fluid mechanics 656, 5–28.








