## Generalized Models

Generalized models are models in which one specifies the structure of interactions in a system but does not restrict the interactions to a particular functional form. Hence one generalized model can describe a family of different models. This is particularly useful for modelling systems on which we have limited information as the generalized model can capture the full range of potential relationships that might be realized in nature. Despite their generality, generalized models can be studied highly efficiently and often yield deep insights into the functioning of a system.

Generalized models have existed for a long time. Since the beginnings of modelling, some statements have been made over models that contain unspecified functions. In a sense all of bifurcation theory focusses on dynamical systems of the general form $$\dot{x}=f(x)$$. However, in a narrow sense generalized models refer to a class of general equation systems that are parameterized using one particular trick [1].

The particular parameterization that makes generalized models a versatile and powerful methodology was first proposed by Wolfgang Ebenhöh, and was further developed in Thilo's PhD thesis [2]. Accessible introductions to the method can be found in [1] and [3] and a deeper mathematical analysis is given in [4]. The definitive user's guide to generalized modelling is [5].

#### Applications

Generalized models are used in a wide variety of applications, but they are particularly useful in systems with many unknowns.

Generalized models were originally conceived for the exploration of ecological food webs. In [6] we derived a generalized food web model. This model uses the generalized modelling methodology while capturing many known properties of real world food webs including for example known allometric scaling laws and realistic nonlinear prey-switching dynamics.

The generalized food web model was used in [6] to explore structural properties that lend dynamical stability to food webs. This study showed that "weak links" who are often purported as a stabilizing factor only stabilize relatively small webs of 30 species or less. By contrast a general design principle for stable webs of any size is a structure in which generalist top-predators feed on specialist intermediate predators. Subsequently Plitzko et al. [7] showed that constraining the generalized parameters to ranges observed in nature yields food webs with positive complexity-stability relationships.

In a collaboration with Justin Yeakel and others we used generalized models to explore the dynamics of the food webs of ancient Egypt and their responses to climate change [8]. This revealed that a sequence of three aridification events over a 6000 year time period left reduced both size and the dynamical stability of the mammalian food web. Although the initial food web around 6000 BCE was very large and complex it was also relatively stable. Based on the structure of this web (which was reconstructed from Egyptian art) generalized models can be used to reconstruct the sensitivity of species to perturbations [9], which predicts the subsequent sequence of extinctions with surprising accuracy.

Other ecological applications include the analyses of multiple resource limitation by Stiefs et al. [10], predator-prey dynamics by Aldebert et al. [11,12], Yeakel and Mangel's model for stock recruitment in fish [13] reaction-diffusion mechanism of pattern formation in populations [14], Anna Doizy's study of bioinvasions [15], Dirk Stief's eco-epidemic model [16], Awender et al.'s study of foodweb stability [17], several analysis of meta-community models [18,19,20,21] and Helge Aufderheide's work on the effect of symmetries in food webs [22,23].

A second area where generalized models are frequently used is metabolic modelling in cell biology. In this field generalized models are often called "structural kinetic models" after the title of our initial publication in this field [24]. Generalized metabolic models have been used in particular to study the stability of metabolic cycles both in general [25] and for specific examples such as the the Calvin cycle [24], the TCA cycle [26], glycolysis [24,27], and leaf carbohydrate metabolism [28]. Nature has tuned metabolic systems so strongly for stability that simply finding the most stable configuration in a generalized model can often be used to forecast real world parameter values in these models.

Other applications in cell biology include a dynamical analysis of MAP-kinase cascades [29] and the RANKL/OPG pathway in bone remodeling [30], a model of systemic inflamation [31], Gehrmann and Drossel's study of gene regulation [32], and the dynamics of metabolic-genetic oscillators [33].

Some application to social systems include an analysis of the Chinese dynastic cycle [1], and Steven Lade's analysis of regime shifts in socio-ecological systems [34,35,36]. Recently, generalized models have also been used to analyze instabilities in complex manufacturing supply networks [37,38].

In BioND lab we frequently use generalized models as a foundation for other projects. For example it is easy to construct generalized models that have specific bifurcations at predetermined parameter values. These generalized model can then be quickly converted into a conventional model that can be simulated. Together this forms an effective pipeline for producing timeseries to test new data analysis methods.

For example we used generalized models to generate trial data for a method to reconstruct causality from ecological timeseries [39], the design of early warning signals for critical transitions [40], and for a method to construct dynamical network motifs that cause specific instabilities regardless of the network that they are coupled to [41].

Finally generalized models have been used in physical models such as a geophysical climate model [42], a model of laser dynamics [1] and a models of delay oscillations [43,44].

#### Method: An Example

Consider a population of animals, which reproduce and die at a certain rate. If we have little information about this system we might model it with an equation of the form $\dot{X}=G(X)-L(X),$ where $$X$$ is the size of the population, $$G$$ is the growth rate and $$L$$ is the mortality rate. We acknowledge that these rates are functions of the population size but we don't know their specific functional forms.

Eventually the system might approach a stationary state $$X^*$$. The steady state is stable if $\left.\frac{\partial\dot{X}}{\partial X} \right|_{X=X^\ast}< 0$ Without further information we cannot evaluate the derivative on the left. In any particular real system however, this derivative just evaluates to a number. We could consider this number as an unknown parameter of the system, but this lands us with a very unintuitive parameter.

There is a better way to parameterize the system without making additional assumptions: We define a normalized $x:=\frac{X}{X^*}$ and also normalized functions $g(x) := \frac{G(X)}{G(X^*)} \quad l(x) := \frac{L(X)}{L(X^*)}.$ These are just definitions that are harmless as long as rates and variables are positive. We can now write the equation in terms of the normalized variables, which yields $\dot{x} = \alpha \left( g(x) -l(x) \right)$ where $$\alpha=G^*/X^*=L^*/X^*$$. We now know where the steady state is ($$x^*=1$$). The price we had to pay for this was to introduce an unknown parameter $$\alpha$$, however this parameter has a nice interpretation; it's the per-capita turnover in the steady state, or if you like the inverse of the individual's life expectancy.

For the stability analysis it is useful to define also the derivatives of the normalized functions in the steady state as parameters $\gamma:=\left. \frac{\partial g}{\partial x}\right|_{x=x^*} \quad \mu:=\left. \frac{\partial l}{\partial x}\right|_{x=x^*}$ These parameters turn out to be logarithmic derivatives of the original functions. So for instance any linear function $$L(X)=aX$$ is characterized by a parameter value $$\mu=1$$ regardless of the value of $$a$$. More generally any power-law $$L(X)=aX^p$$ corresponds to a parameter value of $$\mu=p$$.

Such parameters are called elasticities. They are widely used in economic theory because they provide an easily interpretable way to describe the nonlinearity of functional response and due to their statistical properties they can be estimated exceptionally well from data.

In terms of the elasticities we can write our stability condition for the steady state as $\alpha(\gamma-\mu)<0$ hence stability requires $\gamma<\mu$ So in a few lines we have shown that in any system of the form $$\dot{X}=G(X)-L(X)$$ a given steady state is stable if the elasticity of the gain $$G$$ is smaller than the elasticity of the loss $$L$$.

Perhaps this is not such a surprising result, but then this was only a small example. Generalized modelling can be applied to much larger systems. Also if you have additional constraints on the functional they can generally be incorporated gracefully into the generalized model.

#### FAQ

> Can you actually do this? Is this legal?

Yes, it's mathematically sound. If you don't believe me check out Christian Kühn's paper [4].

> Any caveats I should know about?

Your model must be phrased as balance equations and all terms and variables must be positive. If variables can become zero dynamically this won't cause major problems (see here [3]), however your terms need to be either losses or gains, not both. Generalized models don't deal gracefully with transients, so the dynamics you are interested in must be in the long-term behavior. Also if there are conservation laws in your system you must take special care not to break them in the normalization procedure (they will become constraints on how you can chose your generalized parameters).

> Does this work with more than two terms in an equation?

You can have as many terms as you like as long as each equation has at least one gain and one loss term. For example $\dot{X}=A(X)+B(X)-C(X)$ normalizes to $\dot{x}=\alpha (\beta a(x) + \bar{\beta} b(x) - c(x) ).$ Here $$\alpha$$ is a parameter that describes the total turnover rate, $$\beta$$ is the proportion of the gain that comes from source A (in the steady state) and $$\bar{\beta}$$ is the proportion of the gain that comes from source B.

> ... and multiple variables?

No problem, you just normalize every dynamical equation independently. There are generalized models with hundreds of variables [15].

> For a large system this would give you the Jacobian matrix as a function terms of the generalized parameters, then what?

If you have up to ten variables (or so) you can typically still find the bifurcations at which the stability changes analytically and explore the stability and how it is lost in beautiful three-parameter bifurcation diagrams. In larger systems you can sample the generalized parameter space randomly. Because the generalized parameters have clear interpretations it is typically easy to determine the right distributions to draw parameter values from. For each randomly drawn parameter set one can then check the stability of the Jacobian numerically. Using iterative solvers that can done highly efficiently. For example the image shown on this pages shows the figure on this page uses data from 100 billion ($$10^{11}$$) random food webs. More on this here [6].

> This starts to sound like a random matric model?

Yes, and you can use generalized models like you would random matrix models. The difference is that the rules for generating the random matrix are not postulated, but derived from a dynamical model. As a result of this derivation you get a much better interpretability of the results.

> So what if there are multiple steady states?

The generalized model describes all of them at the same time. Since the parameters of the generalized model are locally defined steady states that you see at the same time in a conventional model typically occur at different parameter values in the generalized model and hence may have different stability properties. Dirk Stiefs came up with a brilliant visualization of this in [10] and Justin Yeakel discusses it in detail in [3].

> You talk a lot about steady states, does this work for other attractors such as limit cycles?

Yes, but it gets a bit more difficult, we explored this here [45].

> Did you say you can detect chaos using generalized modelling?

Yes, generalized models use a local analysis, but a deep local analysis can reveal some non-local properties of the dynamics. For example the existence seeing a Takens-Bogdanov bifurcation reveals the existence of a homoclinic orbit; finding a Bautin bifurcation reveals a fold bifurcation of cycles; and seeing a double-Hopf proves there are chaotic dynamics. More on this can be found in this paper [46].

> So what if I don't want my model to be too general?

If you know something about your system then there is generally a way to build this insight into a generalized model. For example if a predator feeds on two prey species then the consumption of one is dependent on the other due to saturation effects. We build this into our foodweb model by defining $$H(X,Y)$$ as the total food supply of the predator $$Z$$, $$C_X(X)$$ is the contribution of species $$X$$ to $$H$$ and $$C_Y(Y)$$ is the contribution of $$Y$$. The defining equation of $$H$$, $H(X,Y)=C_X(X)+C_Y(Y)$ can be normalized exactly like the differential equations. You can then express the predation as a function of predator density and food supply, e.g. $$F(Z,H)$$. In this case the normalization yields a number of interesting ecological variables, for example the elasticities of the contributions allow us to control the prey switching behavior and the elasticities of $$F$$ encode predator saturation effects. This is described in detail here ((gross2006generalized,yeakel2011generalized))

> Ok final question, why go to all this length? Isn't $$\dot{x}=f(x)$$ already the most general model conceivable?

The answer to this is interpretability. If we had all the information about a system we wouldn't want a general model but a specific one. Generalized models are meant to be used for the system where we lack information and in these systems they help us consider different possibilities of how the real world system might work at the same time. The more we know about the system the more we are able to break down the general dynamics into specific processes, variables and constraints, and by this process we get a closer and closer understanding of what our variables actually mean. So putting more specific insights on processes and variables into a generalized model is good because you get much better interpretability of results in return.