Abstract
The comparison and categorization of tree diagrams is fundamental to large parts of biology, linguistics, computer science, and other fields, yet the indices currently applied to describing tree shape have important flaws that complicate their interpretation and limit their scope. Here we introduce a new system of indices with no such shortcomings. Our indices account for node sizes and branch lengths and are robust to small changes in either attribute. Unlike currently popular phylogenetic diversity, phylogenetic entropy, and tree balance indices, our definitions assign interpretable values to all rooted trees and enable meaningful comparison of any pair of trees. Our self-consistent definitions further unite measures of diversity, richness, balance, symmetry, effective height, effective outdegree, and effective branch count in a coherent system, and we derive numerous simple relationships between these indices. The main practical advantages of our indices are in 1) quantifying diversity in non-ultrametric trees; 2) assessing the balance of trees that have non-uniform branch lengths or node sizes; 3) comparing the balance of trees with different leaf counts or outdegrees; 4) obtaining a coherent, generic, multidimensional quantification of tree shape that is robust to sampling error and inferential error. We illustrate these features by comparing the shapes of trees representing the evolution of HIV and of Uralic languages, and trees generated by computational models of tumour evolution. Given the ubiquity of tree structures, we identify a wide range of applications across diverse domains.
Keywords: tree indices, tree shape, tree balance, phylogenetic diversity, phylogenetic entropy, rooted trees
Tree shape indices that quantify key properties of rooted trees – such as the effective number of leaves, average out-degree, and balance – have myriad applications. Conservation biologists use phylogenetic diversity values to determine which actions will preserve the most biodiversity (Tucker et al., 2017; Veron et al., 2019). Tree balance indices are used to compare models and to infer parameter values in systematic biology (Mooers and Heard, 1997; Purvis and Agapow, 2002), virology (Chindelevitch et al., 2021; Barzilai and Schrago, 2023), epidemiology (Leventhal et al., 2012; Colijn and Gardy, 2014), and oncology (Scott et al., 2020; Noble et al., 2022). Computer scientists seek to balance binary trees to make them more efficient as data structures (Albers and Westbrook, 2005). Numerous indices designed for such tasks have previously been proposed (Pavoine and Bonsall, 2011; Tucker et al., 2017; Fischer et al., 2023). However, no existing index provides a general purpose method for fairly evaluating the shape of any rooted tree. This paper introduces a system of such indices.
Rather than simply adding to a profusion of indices, our aim here is to solve important open problems: How can we modify existing phylogenetic diversity and entropy indices so that they are meaningful when applied to non-ultrametric trees? How can we define a tree balance index that accounts for both branch lengths and node sizes? How can we likewise generalize the concepts of outdegree, branch count, and node count? How can we unite all these types of tree shape index in a coherent system, so that their interrelationships can be easily understood? Only by solving these problems can we arrive at a general purpose method for fairly evaluating the shape of any rooted tree.
Among current diversity indices for generic rooted trees, arguably the most sophisticated are those introduced by Chao et al. (2010), which generalize and unify previous definitions of Hill (1973), Faith (1992), Jost (2006) and Allen et al. (2009). In quantifying the effective number of types in a data set, tthe indices of Chao et al. (2010) account for both node sizes (type frequencies) and branch lengths (degree of dissimilarity between types). Nevertheless, a critical shortcoming of these indices, which limits their applications, is that they assign meaningful values only to leafy ultrametric trees (that is, trees in which the only non-zero-sized nodes are leaves, all equally distant from the root) (Chao et al., 2010; Leinster and Cobbold, 2012). We will further show that the indices of Chao et al. (2010) are not fully self-consistent and have peculiar properties for . Moreover, the relationships between these diversity indices and other types of index, such as tree balance indices, are generally opaque, which thwarts multi-dimensional analysis.
Conventional tree balance and imbalance indices – including those attributed to Sackin (1972) and Colless (1982), the total cophenetic index of Mir et al. (2013), and others reviewed by Fischer et al. (2023) – are also flawed. These indices, which are meant to quantify the extent to which each internal node splits its descendants into equally sized subtrees, are not defined for all rooted trees, do not permit meaningful comparison of trees with differing leaf counts, and are highly sensitive to the addition or removal of rare types (Noble et al., 2022; Lemant et al., 2022). We recently introduced a family of tree balance indices that solve these problems and that have additional desirable properties (Lemant et al., 2022). Our previous definitions are defined for any degree distribution, account for node sizes, and enable meaningful comparison of trees with different numbers of leaves. But our previous definitions do not account for branch lengths, which restricts their applications because branch lengths often convey important information (for example, genetic distance in virus evolution, or elapsed time in the evolution of species).
Here we define a new system of indices that resolve all the aforementioned problems by accounting for node sizes and branch lengths, being robust to small changes to the tree, assigning meaningful values to all rooted trees, and belonging to a coherent framework, so that mathematical relationships between the indices are well characterized. Our system captures fundamental properties such as diversity (effective number of leaves), tree balance (the extent to which each internal node splits its descendants into equally sized subtrees), and bushiness (average effective outdegree). Given that our indices share the desirable properties but not the flaws of prior indices, we discuss their potential to supersede current methods in a wide range of applications.
Materials and Methods
Hill numbers as a basis for defining robust, universal, interpretable tree indices
A rooted tree is a tree in which one node is designated the root and all branches are directed away from the root. Our aim is to define indices that are useful for categorizing and comparing the shapes of unlabelled rooted trees that have three attributes: tree topology, non-negative node sizes, and non-negative branch lengths. These indices should be generic and model-agnostic, meaning that they make no assumptions about what the tree represents or the process by which it was generated. In evolutionary trees, for example, the size of a node can correspond to the population size of the respective biological type, or simply to whether a type is extant (node size 1) or extinct (0), while branch lengths can represent genetic distance, morphological difference, or elapsed time. Linguists use similar structures with unequal branch lengths to study the evolution of languages (Honkola et al., 2013; Atkinson and Gray, 2005). In computing, the size of a search tree node corresponds to the probability of it being visited.
In this general context, a useful index should be robust, universal, and interpretable. A loose definition of robustness is that small changes to the tree have only small effects on the index value, except where sensitivity is desirable; universal means that the index is defined for all rooted trees; and interpretable implies a simple, consistent interpretation, enabling meaningful comparison of any pair of rooted trees. Lemant et al. (2022) provides more rigorous, axiomatic definitions. We follow these axiomatic definitions and call a tree index with all three properties an RUI index. In practical terms, robustness implies that an index is relatively insensitive to the effects of issues such as sampling error, inferential error, omission of rare types, imperfect genetic sequencing, and incomplete resolution of ancestral relationships. All our indices are dimensionless but the diversity indices can be re-scaled in terms of the branch length unit where desired.
We begin by recalling the family of diversity indices attributed to Hill (1973). These Hill numbers are functions of a set of proportions with for all and . Every Hill number of order can be written as
Hence is the exponential of the Rényi entropy of order (Rényi, 1961), which we will denote , and is Shannon’s entropy (Shannon, 1948). Another important special case is
which is simply the number of types, or richness. Following Pielou (1966) and Jost (2010), we further define the evenness indices
For completeness, we set and .
We can apply these indices to a rooted tree simply by equating to the proportional sizes of the nodes of , including the internal nodes. Assigning non-zero sizes to internal nodes makes sense, for example, in the case of a tumour clone tree (Noble et al., 2022). The richness index then quantifies the number of non-zero-sized nodes in the tree, which we will refer to as the counted nodes. In an evolutionary tree, counted nodes correspond to extant types. For each , the diversity index can be interpreted as an effective number of counted nodes, while gauges the evenness of the counted node sizes.
Clearly and are insensitive to small changes to proportional node sizes. For , is also generally robust to the addition or removal of relatively small nodes (and the degree of robustness increases with ), whereas and are not, as is appropriate for indices that are meant to quantify richness and evenness. and are universal because they can be applied to any set of node sizes, and they are interpretable as described above. Yet although these indices are RUI, they are inadequate for assessing tree shape because they depend only on node sizes, ignoring both tree topology and branch lengths.
Many indices that capture aspects of tree shape have previously been defined (surveys include Pavoine and Bonsall (2011); Tucker et al. (2017); Fischer et al. (2023)) but, to the best of our knowledge, none is RUI (Table 1). We address this deficiency by developing new RUI tree indices that extend the basic indices and to account for tree topology and branch lengths. We do this using three types of weighted mean, which we refer to as the longitudinal mean, the node-wise mean, and the star mean (Table 2). Our consistent definitions ensure that our indices can be precisely related to each other and to and in numerous meaningful ways, so that all the indices belong to a single coherent system.
Table 1.
Properties of some previously defined non-RUI tree indices (see main text for definitions and citations.)
Robust | Universal | Interpretable | |||
---|---|---|---|---|---|
| |||||
Robustly accounts for node sizes? | Robustly accounts for branch lengths? | Defined for all rooted trees? | Has a simple, consistent interpretation? | Can meaningfully compare any pair of rooted trees? | |
| |||||
Faith’s PD | No | Yes | |||
| |||||
Allen et al’s | Yes | Only for leafy ultrametric trees | |||
Chao et al’s | |||||
| |||||
Sackin’s index | No | Yes | No | ||
Colless’s index | |||||
Total cophenetic index | |||||
| |||||
Lemant et al’s | Yes | No | Yes | Only if uniform branch lengths |
Table 2.
Nature, notation and interpretation of RUI tree indices, including prior indices (top row) and new indices (second, third and fourth rows). Counted nodes are those with non-zero size.
Branches or nodes | Type of average | Richness | Diversity (with q > 0) | Evenness (with q > 0) |
---|---|---|---|---|
| ||||
Nodes | None | = number of counted nodes | = effective number of counted nodes | = evenness of counted node sizes |
Branches | Longitudinal mean | = average branch count across the tree | = effective number of maximally distant leaves | = evenness of branch sizes across the tree (tree symmetry if leafy and ultrametric) |
Branches | Node-wise mean | = average effective outdegree, ignoring branch sizes | = average effective outdegree, accounting for branch sizes | = tree balance |
Branches | Star mean | = effective number of non-root nodes | = effective number of branches, accounting for branch sizes | = evenness of all branch sizes |
Further preliminary definitions
In a rooted tree, the depth of a node is the sum of the branch lengths along the unidirectional path from the root to the node. The height of the tree is the maximum depth of its non-zero-sized nodes. Nodes with no descendants are called leaves and non-leaves are called internal nodes. We define the size of a branch as the sum of the proportional node sizes that descend (directly or indirectly) from the branch. For example, in the three-leaf tree depicted in Figure 1a, the branches descending from the root have sizes and , and the other two branches each have size . The size of any segment of a branch is the same as the size of the branch.
Fig. 1.
a) A leafy bifurcating ultrametric tree with three equally sized leaves. In this and every subsequent tree diagram, open circles indicate zero-sized nodes. b) Index values versus branch length for the three-leaf tree. The y-axis is log-transformed so that the curves for all diversity indices appear piecewise linear. is slightly greater than whenever .
A leafy tree is such that all internal nodes have zero size (equivalently, all counted nodes are leaves). A tree is ultrametric if all its leaves have the same depth after the removal of all subtrees that contain only zero-sized branches (corresponding to extinct lineages in an evolutionary tree). A caterpillar tree is a bifurcating tree in which every internal node except one has exactly one child leaf. A star tree is a tree in which all non-zero-sized branches are attached to the root. We define a piecewise star tree as a tree that can be divided into transverse intervals such that, within each interval, all the non-zero-sized branches are attached to a common node. For example, the leafy ultrametric tree in Figure 1a is a star tree if or and is otherwise a caterpillar tree. To simplify our notation, we will usually omit the tree as a function argument (for example, writing instead of ).
It will be helpful to recall that, for a sequence of positive real numbers , real number , and set of positive weights , the weighted power mean of exponent is
is defined from the limit as
, and are respectively the weighted harmonic, geometric, and arithmetic means. and respectively return the minimum and the maximum. Power means are closely related to Hill numbers as, for all and any sequence of proportions ,
(0.1) |
Prior tree balance and imbalance indices
The most popular conventional tree imbalance indices can be expressed in the form
where is the set of all internal nodes and is the number of leaves that descend from node , and is a function that defines a particular index. For (Sackin’s index), (Colless’ index) and (the total cophenetic index) we have
where is the proportion of the leaves that descend from the left child branch of , and is the proportion that descend from the right child branch. Being imbalance indices, these three indices assign higher values to less balanced trees. is defined only for bifurcating trees (in which all internal nodes have outdegree two). and are defined only for trees in which all internal nodes have outdegree greater than one. By convention, each index is normalized over the set of trees on leaves by subtracting its minimum value over such trees and then dividing by the difference between its maximum and its minimum. The minima of , and are , 0 and 0, and the maxima are , and , respectively (Shao and Sokal, 1990; Rogers, 1993; Mir et al., 2013).
Lemant et al. (2022) proposed instead defining tree balance or imbalance indices in the form of the weighted arithmetic mean
where is the weight assigned to node , and quantifies the degree to which node splits its descendants into equally sized subtrees. For example, we can obtain an alternative normalization of Colless’ index by setting and . The normalizing factor is then Sackin’s index. An advantage of this approach is that it allows us to compare the balance of any pair of trees for which is defined, rather than only trees with equal leaf counts.
Definition of the normalizing factor
Consistent with Lemant et al. (2022), our new index definitions are based on weighted means. Our preferred weights require us to define the normalizing factor
where is the set of all branches in the tree, is the size of branch , is the length of branch , and is the tree height. We can interpret (denoted in Chao et al. (2010)) as the effective tree height or as the average counted node depth. In computer science, is called the weighted path length (Albers and Westbrook, 2005). For leafy trees with uniform leaf sizes and uniform branch lengths, , where is the branch length and is Sackin’s index. Hence can also be considered a generalization of Sackin’s index. Indeed, we have previously argued that Sackin’s index is best interpreted not as a general imbalance index but rather as a normalizing factor, which works as an imbalance index only in the special case of trees with uniform node sizes, uniform branch lengths, and uniform outdegree (Lemant et al., 2022). if and only if the tree is leafy and ultrametric.
Definition of the longitudinal mean
The basic idea of the longitudinal mean is that we split the tree into transverse intervals, calculate an index value based on the proportional sizes of the branch segments within each interval, and then take a weighted average of these within-interval index values. Let denote the set of transverse intervals created by locating an interval boundary at every node depth (dashed lines in Figure 1a), excluding intervals that contain only zero-sized branches. Each interval then contains a set of branch segments, all of the same length, which we will refer to as the interval height . Let
where is the size of branch segment . Then for all intervals if and only if the tree is leafy and ultrametric. It follows that
Now for each , define the within-interval proportional branch size and let . Then for all intervals .
Finally, for index and tree , we define the longitudinal mean of order of as the functional such that
(0.2) |
where the weight is a function of that remains to be specified. Hence is a weighted power mean of the values assigned to the intervals. For succinctness, we will omit the argument and specify only where necessary.
Example 0.1
For the function we have
New longitudinal mean indices
We define new tree indices as longitudinal means of and with , so that the index value assigned to each interval is weighted by the product of the length and the summed sizes of the branch segments that contains. First, we define
(0.3) |
This is equivalent to with . In particular,
We can interpret as the average tree width or, more precisely, as the geometric mean number of branches counted across the tree. In an evolutionary tree where branch lengths correspond to elapsed time, equates to average richness across time, excluding extinct lineages. For , can be interpreted as the effective number of counted nodes maximally distant from the root or – because all maximally distant counted nodes must be leaves – as the effective number of maximally distant leaves. In biological terms, this corresponds to the effective number of extant types maximally distinct from the root type.
Second, we define
(0.4) |
Just as measures the evenness of node sizes, so measures the average evenness of branch sizes across the tree. If the tree is leafy and ultrametric then for if and only if the tree is fully symmetric. Hence, when applied to leafy ultrametric trees, can be interpreted as a symmetry index (also known as a sound balance index (Mir et al., 2018)).
Figure 1b illustrates how , and (and other index values yet to be defined) vary with branch length for the three-leaf tree of Figure 1a.
Definition of the node-wise mean: first special case
In the special case in which all branches have the same length , we can obtain a node-wise mean by calculating an index value for each node, based on the node’s child branch sizes, and then taking a weighted average of these node index values. We previously used this approach to define new tree balance indices (Lemant et al., 2022).
Let denote the set of all internal nodes, excluding nodes with only zero-sized descendants. Let denote the subtree containing only and its children. For and , let denote the size of and define
Then for all nodes if and only if the tree is a leafy piecewise star tree. It follows that
Now for each , define the proportional branch size and let . We then define the node-wise mean of order of index as the weighted power mean of the values assigned to the nodes:
(0.5) |
where the weight is a function of that remains to be specified.
Definition of the node-wise mean: second special case
In the case of a piecewise star tree with , we can set the index value of each internal node as the longitudinal mean index value of the subtree . We then have
(0.6) |
where is the exponent of the across-nodes power mean, is the weight assigned to node , contains the proportional sizes of all branch segments that belong to both subtree and interval , and is the weight assigned to associated with interval .
To keep our system internally consistent we would like, in the case of piecewise star trees, the node-wise mean of any index to be equal to the longitudinal mean of the same index. Comparing Equation 0.6 with the definition of the longitudinal mean (Equation 0.2), we see that the right-hand sides are equivalent if and only if three conditions hold:
Under these conditions, summing index values across subtree intervals and then across nodes gives the same result as summing across tree intervals. We then have for any piecewise star tree with ,
In the particular case , the index value assigned to each node (that is, the longitudinal mean index value of the subtree ) measures the diversity of the child branches of . When has branches of equal length and size, the node diversity of is . In the case , as one branch length is reduced towards zero while all else is kept constant, the node diversity of decreases continuously to . Decreasing instead the size of one branch has the same effect provided . Hence the diversity value assigned to each node can be interpreted as an effective outdegree, and the node-wise mean diversity can be interpreted as an average effective outdegree. When the effective outdegree ignores branch sizes. As increases, the effective outdegree gives less weight to branches of smaller size. We would like to retain this interpretation as we generalize the definition of the node-wise mean.
Definition of the node-wise mean: general case
In extending the definition to all rooted trees, we want to ensure that, as with the longitudinal mean, the node-wise mean changes continuously as we vary branch lengths. We illustrate this general issue with an example.
Example 0.2
Consider a leafy ultrametric tree with six leaves such that the root has two descendant branches each of length , and both non-root internal nodes have three descendant branches, all of length . When (Figure 2a), it follows from our special-case definition (Equation 0.5) that the root has richness 2, the internal nodes each have richness 3, and the node-wise mean richness is intermediate between 2 and 3. As increases from to 1, the node richness values should remain unchanged but the root node richness should be given greater weight, so that the node-wise mean richness (which we will denote ) approaches 2 continuously as (Figure 2b).
Fig. 2.
a) The six-leaf tree considered in Example 0.2 with branch length . b) As , the tree approaches a two-leaf star tree. c) As , the tree approaches a six-leaf star tree.
At the other extreme, as decreases from to 0, we would like to increase continuously to 6 (Figure 2c). Given that the weight assigned to the root node richness should decrease as decreases, the only way to achieve the required increase in is to increase the richness value assigned to each non-root internal node . We can do this by making the richness value assigned to depend not only on the child branches of but also, to an increasing degree as decreases, on the other branches that run alongside the branches of .
Generalizing from the example we conclude that, when the distance between node and any ancestor of (in the example, the root) is less than the height of (in the example, when ), the index value assigned to should depend not only on the branches of (the child branches of ) but also on branch segments that descend from and that coexist in transverse intervals with the branches of . The weight assigned to depends only on but the index value assigned to is a weighted average of index values across and all ancestors of .
To formalize this concept, we first define, for interval and node ,
where is the subtree containing and all its descendants. This implies
where is the root (and hence is the entire tree). is a generalization of the used in our previous definitions, whereas is a new concept. For each , let
and define . We then define the node-wise average as the triple power mean
where is the set containing and all ancestors of , is the exponent of the across-ancestors power mean, and are the ancestor weights. This expression is consistent with Equation 0.6 if and only if
(0.7) |
We then arrive at a simpler general definition
Integral forms of the node-wise and longitudinal means
Since our preferred ancestor weights are best expressed as integrals, we will find it useful to define the longitudinal and node-wise means even more generally by integrating over depths instead of summing over intervals. Suppose we assign a non-negative density to every branch at every depth , with for every at which is absent. Define the tree height , where is the set of all branches. We can then define branch size as the non-increasing function of depth :
where is the set containing and all branches that descend from . Let
For each , define the proportional branch size
Let . We then define the node-wise mean of an index as
where is the weight assigned to node at depth , and
The longitudinal mean can similarly be defined in terms of integrals as
where ,
Our previous definitions are included as special cases in which the branch density is zero except at each counted node, where it is equal to the node size. In an evolutionary tree, branch density corresponds to population size, and branch size corresponds to number of extant descendants. Although it is beyond the scope of the current manuscript, we note that the integral forms would permit us to apply our indices to a more general class of tree, such that the size of any branch is allowed to vary along its length.
New node-wise mean indices
To define new tree indices as node-wise means of and , we first set , where
and we define the normalization factor
Let denote the depth of node and let denote the distance from to . Let denote the parent of node . The ancestor weight function should have three properties. First, as an assumption of our general definition (Equation 0.7),
Second, should decrease as decreases. Third, should increase as the overlap between and increases. A simple way to satisfy all three conditions is to set
where and
Given the above choices of and , we define the node-wise mean diversity of order as
(0.8) |
This is equivalent to with . In particular,
where
As previously explained, we can interpret as an average effective outdegree (branching factor in computer science) that accounts for branch lengths only or for both branch lengths and branch sizes . Less formally, quantifies the bushiness of the tree.
With the same and , we define the universal tree balance as
(0.9) |
In the case of uniform branch lengths, this definition simplifies to
where and are defined as in Equation 0.5. This means that for trees with uniform branch lengths, is identical to our previous definition of the tree balance index (Lemant et al., 2022), excepting one important difference. Whereas our prior index assigns a balance score of zero to any node that has outdegree 1, the above definition instead assigns a balance score of one. Therefore linear trees are considered maximally unbalanced according to but maximally balanced according to . This difference ensures that all our new evenness indices have consistent definitions and interpretations.
Example 0.3
Consider the perfectly balanced, bifurcating, leafy tree with four leaves and branch lengths (upper two branches) and (lower four branches), as shown in Figure 3a. For all , if then , and otherwise , as shown in Figure 3b (dark blue curve). A step-by-step derivation is in the Appendix.
Fig. 3.
a) The four-leaf tree considered in Examples 0.3 and 0.6. b) Index values versus branch length for the tree of Example 0.6. Curves for indices with parameter are independent of the value of . The y-axis is log-transformed so that the curves for all diversity indices except and appear piecewise linear. c) and values for the four-leaf tree considered in Example 0.6, for varied with .
The above example illustrates that, for leafy ultrametric trees, the node-wise mean diversity, like the longitudinal mean diversity, is a piecewise exponential function of branch lengths. Equivalently, the entropy indices are piecewise linear. This property depends on our defining the ancestor weight function as an integral of . Because is a step function, the integrals in all our node-wise mean index definitions are simply sums of areas of rectangles, and the widths of these rectangles are linear functions of branch lengths. Our definitions are designed so that, although Equations 0.8 and 0.9 might appear complicated, in practice they produce relatively simple expressions.
The star mean and new star mean indices
Like the longitudinal and node-wise means, the star mean is based on branch sizes. Unlike those other two means, but in common with the node-size indices and , the star mean ignores tree topology. The idea is that, in effect, we rearrange the tree by reattaching all branches to the root to form a star tree, while retaining branch sizes and lengths, and then calculate the longitudinal (equivalently node-wise) mean index value of the star tree. For index and tree , we define the star mean of order of such that
(0.10) |
where ,
and is the depth of the parent node of branch . Note that
With , we define the star mean diversity of order as
(0.11) |
which is equivalent to with . In particular,
quantifies the effective number of branches in the tree, either accounting for branch lengths only or for both branch lengths and branch sizes . Because every non-root node has exactly one parent branch, and because accounts for branch lengths but not sizes, can also be interpreted as an effective number of non-root nodes. We also define an index that quantifies the evenness of all branch sizes:
(0.12) |
Figures 1b and 3b illustrate how , and values vary with branch lengths for three- and four-leaf trees.
Non-normalized indices
Although our focus is on indices that describe shape, rather than size, we note that every longitudinal, node-wise, or star mean diversity index can be converted into a non-normalized diversity index simply by omitting the normalization factor. Such indices are useful in applications where the unit of branch length should be retained, such as when assessing loss of richness or diversity due to the removal of a node. In particular, we will find it useful to define the non-normalized entropy index
(0.13) |
Results
improves on prior indices for non-ultrametric trees
Our indices and are similar to well-known pre-existing indices but with important improvements (Table 3). The phylogenetic diversity of Faith (1992) – which is popular among conservation biologists – is defined as
Table 3.
Advantages of using our indices instead of previously-defined indices.
Prior index | Proposed replacement | Equation | Advantages of replacement |
---|---|---|---|
| |||
Allen et al’s | 0.13 | Interpretable for non-ultrametric trees | |
Chao et al’s | 0.3 | Bounded and interpretable for non-ultrametric trees; more self-consistent; more intuitive for q > 1 | |
All prior tree balance and imbalance indices | 0.9 | Defined for all rooted trees; can meaningfully compare any pair of trees; accounts for node sizes and branch lengths |
Phylogenetic entropy (Allen et al., 2009) – a previous generalization of Shannon’s entropy – is defined in our notation as
Chao et al. (2010) defined normalized versions of these indices that can be written as
where .
A first problem with these definitions is that, for non-ultrametric trees, phylogenetic entropy lacks a clear interpretation. This issue is due to being defined in terms of sets of branch sizes instead of sets of within-interval proportional branch sizes , as illustrated by the following example.
Example 0.4
Consider the three-node, two-leaf tree with leaf sizes and , and leaf depths and , respectively (Figure 4a). For this tree, as ,
Fig. 4.
a) The two-leaf tree considered in Examples 0.4 and 0.5. b) Index values for the tree of Example 0.5 with . As branch length decreases, the previously defined indices and (grey curves) increase monotonically until both and . In contrast, our new indices and (black curves) decrease monotonically as decreases, with and for all values of .
Therefore behaves as expected but, except when or , approaches a limit greater than 1. Hence (which is supposed to be a measure of diversity) is greater than (a measure of richness). Moreover, whereas we expect diversity to be maximal when node sizes are equal, is maximal when the node sizes are unequal (specifically, when ). If we instead use our index (Equation 0.13) then we obtain
as we would expect.
A second problem is that if the tree is not ultrametric then and do not correspond to weighted means. If and only if the tree is leafy and ultrametric, and for all and so
with in both cases. Otherwise, the numerator weights are unequal to the denominator weights . As previously noted (Chao et al., 2010; Leinster and Cobbold, 2012), this implies that and can take values exceeding the number of counted nodes when applied to non-ultrametric (or non-leafy) trees. Therefore these normalized indices lack a universal interpretation in terms of effective numbers of counted nodes (or extant types) (Leinster and Cobbold, 2012).
We avoid both problems by defining our richness and diversity indices as weighted means of the within-interval proportional branch sizes in all cases. As illustrated by the following example, the differences between and and between and are generally unbounded and can be relatively large even when branch sizes and node sizes are not very unequal.
Example 0.5
Consider the three-node tree of Figure 4a with . We have , , and
It follows that for all , and we can choose sufficiently small such that also (Figure 4b, grey curves). For the same three-node tree, our new indices are instead
Therefore and for all , as we would expect (Figure 4b, black curves). As , both and approach 1, consistent with the fact that the tree has exactly one non-root node when . As , the tree becomes increasingly close to being an ultrametric star tree, and hence and (convergence between dashed curves and between solid curves in Figure 4b).
is more self-consistent and intuitive than the of Chao et al. (2010)
Additional problems with the indices of Chao et al. (2010) are that they are not self-consistent, and that they have counter-intuitive properties when . The general definition can be expressed as
which can be restructured as
Hence for leafy ultrametric trees we have
with . We have thus shown that, in the case of leafy ultrametric trees, every can be expressed as a weighted mean of within-interval diversities. But is the weighted arithmetic mean, is the weighted geometric mean, and in general is the weighted power mean of exponent . One consequence is that, for ultrametric trees in which every transverse interval contains branches of equal size, the set of within-interval values will be the same for every value but the values will be different. Moreover, as becomes larger, increasingly gives larger weight to smaller within-interval diversities. As , the value assigned to each interval approaches the reciprocal of the maximum branch size within the interval. Counter-intuitively, approaches the minimum of these within-interval values.
These peculiar properties of are unnecessary and have no obvious advantages. The Hill numbers , which are used to assign a diversity value to each interval, necessarily relate to different types of weighted mean (Equation 0.1). But the method of averaging between intervals need not depend on the method of calculating diversity within intervals. Every Hill number can be extended to account for tree shape using the weighted arithmetic mean, the weighted geometric mean, or any other weighted power mean of the within-interval diversities by varying exponent of the longitudinal mean diversity index
The same choice exists when defining node-wise means and star means. To avoid incompatibilities within our system, we define all our diversity indices as weighted geometric means (). The following example illustrates the problem and our solution.
Example 0.6
Consider again the four-leaf tree of Example 0.3 (Figure 3a). The longitudinal mean diversity values assigned to this tree are
which are unequal except when or (Figure 3b, black and grey curves). In particular, in the case of uniform branch lengths , we find and (Figure 3c, dashed curve). As derived in Example 0.3, the node-wise mean diversity for this tree is
for all . Choosing the arithmetic mean instead of the geometric mean would instead give
for all and all with (Figure 3b, dark blue and pale blue curves). As , (Figure 3c, dashed curve), while remains constant (Figure 3c, solid line).
improves on all prior tree balance and imbalance indices
As previously explained (Lemant et al., 2022) and as summarized in Tables 1 and 3, conventional tree balance and imbalance indices including Sackin’s index, Colless’ index, the total cophenetic index, and others (reviewed by Fischer et al. (2023)) have important shortcomings. In the first place, these indices account for neither node sizes nor branch lengths. This means, for example, that these indices consider all star trees maximally balanced and all caterpillar trees maximally imbalanced, even as the relative sizes of some nodes or the relative lengths of some branches approach zero (Figure 5, green lines). The tree balance index defined by Lemant et al. (2022) varies continuously with changing node sizes but is independent of branch lengths (Figure 5, dashed purple curves). improves on by also varying continuously with branch lengths (Figure 5, solid purple curves).
Fig. 5.
Values of three tree balance indices for a tree undergoing continuous changes. is the index introduced by Lemant et al. (2022), which is equal to in the central third of the plot. is the normalized Sackin index, which is undefined for the leftmost, linear tree. We plot for fair comparison because is an imbalance index whereas and are balance indices. The normalized Colless index is equal to in the rightmost third of the plot and is otherwise undefined. The normalized total cophenetic index is equal to throughout the plot.
Lemant et al. (2022) further showed that, even when restricted to the tree types on which conventional tree balance indices are defined, and even when all node sizes are equal, enables a more meaningful comparison of trees with different degree distributions or different numbers of leaves. For example, when applied to leafy caterpillar trees with uniform branch lengths and uniform node sizes, considers long trees (those with many leaves) to be less balanced than short ones, whereas conventional indices consider them equally imbalanced. , as an extension of , shares this useful property.
Inequalities between indices
Choosing self-consistent definitions ensures that our diversity indices are related by simple sets of inequalities, which formalize and generalize the results of previous sections (Figure 6a). Hill (1973) showed that for all . Because and are geometric weighted means of values with weights independent of , it follows that they obey corresponding inequalities:
Fig. 6.
a) Inequalities between diversity indices for all and all . b) Examples of leafy trees with uniform branch lengths for which various index values are equal for all . The top left corner of each panel contains a grid, whose twelve squares correspond to the twelve indices shown in the key. A line connecting two grid squares indicates that the corresponding indices are equal for the tree shown in the panel. Instances where evenness indices are equal to 1 are indicated in the third grid column. c) A tree for which and .
Property 0.1
For all rooted trees, , and for all .
Additional inequalities exist between different types of diversity index but not among the evenness indices:
Proposition 1
For all rooted trees, for all . For all leafy ultrametric trees, but not for all rooted trees, for all .
Proposition 2
For all rooted trees, for all .
Proposition 3
For , no single ordering of , and applies to all leafy ultrametric trees.
Proofs of these three propositions can be found in the Appendix. Informally, the reason why the second inequality in Proposition 1 applies only to leafy ultrametric trees is that , unlike , is independent of the size of the root node (and any node arbitrarily close to the root).
Special cases
Our consistent definitions further yield numerous simple equations that unite our indices in special cases. To simplify the statement of these results, we will assume that all branch sizes are greater than zero. This assumption implies no loss of generality because our index definitions are invariant to the addition or removal of subtrees containing only zero-sized branches (which in an evolutionary tree correspond to extinct lineages). The properties in this section hold for all , .
We begin with cases in which diversities based on the same type of average but with different values are equal. These first four properties, which are illustrated by simple examples in the top row of Figure 6b, follow immediately from the definitions.
Property 0.2
if and only if all counted nodes have equal size.
Property 0.3
if and only if the branch sizes at every depth are equal. This also implies and .
Property 0.4
if and only if every internal node’s child branches have equal size.
Property 0.5
if and only if the branch sizes at every depth are equal and all node sizes are equal. This implies that the tree is ultrametric and perfectly symmetric, and that and .
In other special cases, we find equality among diversities of different types but with equal values. Again, these properties are directly implied by the definitions. Simple examples are shown in the middle row of Figure 6b.
Property 0.6
if and only if the tree is a leafy ultrametric tree in which no non-root node has outdegree greater than 1. This also implies .
Property 0.7
if and only if the tree is a piecewise star tree. This also implies .
Property 0.8
if and only if the tree is a star tree. This also implies .
Property 0.9
if and only if the tree is a leafy ultrametric star tree. This also implies .
It follows that equality both within and between types applies under more restrictive conditions, as illustrated in the bottom row of Figure 6b:
Property 0.10
if and only if the tree is a leafy ultrametric tree with equally sized leaves in which only the root has outdegree greater than 1. This also implies , and .
Property 0.11
if and only if the tree is a piecewise star tree with equal branch sizes at every depth. This also implies .
Property 0.12
if and only if the tree is a star tree with equally sized leaves. This also implies .
Property 0.13
if and only if the tree is a leafy ultrametric star tree with equally sized leaves. This also implies .
In yet another set of special cases, the evenness formulas simplify to ratios. The following two results are immediate consequences of or being constant under the specified conditions.
Property 0.14
If the branch count across the tree is constant and greater than one then
Property 0.15
If the tree has uniform outdegree greater than one and the branches present at every depth in the tree have equal lengths then
All properties described in this section would also hold if we were to define all our richness and diversity indices as weighted arithmetic, rather than geometric, means of interval or node values (or indeed any other weighted power mean). Our preference for geometric means will be justified in the next section.
The leafy tree identity
For an important class of trees, our index definitions lead to a surprisingly simple, fundamental connection between tree balance, Shannon’s diversity index, Sackin’s index, and outdegree. This result is less obvious than the properties of the previous section and requires a more substantial proof. We term this unifying relationship the leafy tree identity.
Lemma 0.7
If the tree is leafy and all branches have equal length then
If additionally all leaves have equal size then
where is Sackin’s index.
Proof.
The proof is identical to the proof of Proposition 6 in Lemant et al. (2022), except for the base of the logarithms and the additional factor .
Proposition 4
(The leafy tree identity; generalization of Proposition 6 in Lemant et al. (2022)) If the tree is leafy and has uniform branch lengths and all internal nodes have outdegree then
(0.14) |
If additionally all leaves have equal size then
(0.15) |
Proof.
The result follows immediately from Lemma 0.7 and Property 0.15.
The leafy tree identity implies that, among leafy trees with uniform branch lengths and uniform outdegrees, tree balance depends only on node sizes and node depths. If two such trees have equal effective heights relative to branch length , equal outdegrees , and equal node size Shannon entropy values then they must have equal balance , irrespective of topology and number of leaves. For example, Figure 7a and 7b show a pair of bifurcating leafy ultrametric trees with uniform leaf sizes and uniform branch lengths. Because these trees have equal outdegrees, leaf counts, and Sackin’s index values, the special form of the leafy tree identity (Equation 0.15) implies they must be equally balanced (other equal index values are recorded in Figure 7f). The following example applies the more general form of the leafy tree identity (Equation 0.14) to trees that are less obviously similar.
Fig. 7.
a-b) Two leafy bifurcating trees with uniform node sizes and uniform branch lengths, which differ in topology but are equally balanced. c-e) Three leafy bifurcating trees with uniform branch lengths, which differ in topology and number of leaves but are equally balanced. Nodes are labelled with their sizes. f) Table recording where pairs of trees have equal or unequal index values. Parameter can take any non-negative value.
Example 0.8
Consider the bifurcating leafy ultrametric tree with four leaves, uniform branch lengths, and leaf sizes , , and (Figure 7c). Now suppose we retain the leaf sizes but rearrange the nodes and branches to form a caterpillar tree with the node of size at depth and one of the nodes of size at depth (Figure 7d). Finally, consider a six-leaf caterpillar tree with uniform branch lengths and proportional leaf sizes (in order of increasing depth) , , , , and , with (Figure 7e). All three trees have identical values of , and (see Appendix for derivation). Hence the leafy tree identify implies that they have equal and values. All three trees also have equal values of and . Other index values shared by pairs of trees are indicated in Figure 7f.
Equation 0.15 is especially useful because the numerator is the minimum value that can attain on leafy -leaf trees with uniform branch lengths, uniform node sizes, and uniform outdegree . Hence lies between 0 and 1 and is equal to 1 if and only if the tree is fully balanced. We previously showed (Proposition 7 in Lemant et al. (2022)) that, among all node-wise arithmetic mean indices with , is the only index that satisfies Equation 0.15. Our previous proof can be straightforwardly generalized to show that Equation 0.15 cannot hold for any index of the form with or . Therefore is the only tree balance index for which this useful, unifying identity holds.
An example cross-disciplinary application
We illustrate the universality of our methods by using them to compare the shapes of two trees from different fields of research, representing dissimilar processes and constructed using different methods. The first of these trees depicts the evolution of the Human Immunodeficiency Virus (HIV) within a host, as inferred from molecular data and as used in another recent study of tree shape indices (Barzilai and Schrago, 2023). The second tree represents the diversification of the Uralic language family (Honkola et al., 2013). To simplify the exposition we assign size zero to all internal nodes and an equal size to all leaves.
If we disregard the inferred branch lengths then it is difficult by eye to assess which tree is the more diverse or more balanced (Figure 8a, b). These apparent similarities are borne out in the shape index values (Figure 8c, d). Excepting one node, both trees are bifurcating and therefore both have . The two trees have similar branch counts in total ( and 32) and at each depth . The , and values are somewhat lower than the corresponding richness values due to imbalances, as captured by our evenness indices, which are likewise similar for the two trees ( and between 0.7 and 0.8; ). Lemma 0.7 further implies similar values (93 and 97).
Fig. 8.
a-b) Trees with equalized branch lengths representing the within-host evolution of HIV (a) and the evolutionary history of the Uralic languages (b). c) Diversity index values for the two trees with equalized branch lengths. d) Evenness index values for the two trees with equalized branch lengths. e-f) The same trees but with the originally inferred branch lengths. g) Diversity index values, accounting for branch lengths. h) Evenness index values, accounting for branch lengths. In all cases, leaves are assigned equal size and internal nodes are assigned size zero. The HIV tree was sourced from the GitHub repository associated with Barzilai and Schrago (2023) (file PIC38051.tre) and the languages tree from the D-PLACE database (Kirby et al., 2016) (folder honkola et al2013).
When we restore the inferred branch lengths, the two trees no longer look alike (Figure 8e, f). The HIV phylogeny approximates a non-ultrametric star tree, with long branches originating close to the root. The average effective out-degree of the HIV tree, accounting for unequal branch lengths, is substantially higher than two (); the effective number of branches is three times lower than when branch lengths are ignored ; and there are more than twice as many parallel branches (). Because the HIV tree is approximately a star tree with equal node sizes, all its diversity indices are approximately equal and all its evenness indices are close to one (Property 0.12). In the case of the languages tree, accounting for the inferred branch lengths – which are approximately exponentially distributed and not nearly so depth-dependent – has only a small effect on most index values. The diversity indices for the languages tree remain far from equal. Altogether our indices thus show that the HIV tree is much bushier, has a larger number of effective types, and is in every sense more balanced than the languages tree (Figure 8g, h).
In summary, the clear differences between these two trees, implying different modes of evolution, are captured only by indices that account for their different branch length distributions. An analysis based on prior tree balance indices, which ignore branch lengths, would incorrectly conclude that the trees have very similar shapes and plausibly resulted from similar processes.
An example application to model-generated trees
As a final demonstration of the potential for our indices to distinguish trees generated by different processes, we reanalyse results of a recent computational modelling study of tumour evolution by Lewinsohn et al. (2023). The original study sought to infer differences between the shapes of evolutionary trees corresponding to alternative modes of tumour expansion – boundary-driven growth (BDG) versus unrestricted growth. On average, the BDG model was found to generate ultrametric time trees with higher variance in their terminal branch lengths, and non-ultrametric gene trees with higher variance in their leaf depths (mutations per cell).
To see how our tree shape indices vary with simulated tumour growth mode, we consider the two representative simulated tumours from Figure 1 of Lewinsohn et al. (2023). The time trees (Figure 9a-c) have the same number of leaves and almost identical effective numbers of non-root nodes ( and 118). However, the BDG time tree has 22% higher effective branch count ( versus 53), 26% higher branch count across the tree ( versus 22), and 25% higher leaf diversity ( versus 17).
Fig. 9.
a-b) Time trees generated by computational models of tumour evolution with boundary-driven growth (a) or unrestricted growth (b). Leaves represent extant cells and branch lengths are proportional to time elapsed between cell division events. c) Tree shape index ratios for the two time trees. d-e) Gene trees generated by the same simulations as the time trees. Leaves represent extant cells and branch lengths are proportional to genetic distances. f) Tree shape index ratios for the two gene trees. All tree data was obtained from the GitHub repository associated with Lewinsohn et al. (2023).
The gene trees (Figure 9d-f) likewise have the same number of leaves and almost identical effective numbers of non-root nodes ( in both cases). But the BDG gene tree, being less star-like, has substantially lower average effective outdegree ( versus 3.0; versus 2.6), 20% fewer branches across the tree ( versus 21), and 26% lower leaf diversity ( versus 15). The BDG gene tree is also less balanced ( versus 0.84).
Whereas well chosen problem-specific indices might give greater statistical power for distinguishing particular tree types, an advantage of our multi-dimensional system is that it is designed to be universally applicable, to facilitate comparisons between studies and data sets. Leaf depth variance, for instance, cannot by itself tell apart ultrametric trees, while terminal branch length variance is inapplicable to trees with uniform (or unknown) branch lengths.
Discussion
The seminal paper of Hill (1973) cautions that there is “almost unlimited scope for mathematical generality in relation to measures of diversity and taxonomic difference” and therefore “Simple and well-understood indices should be used”. In accordance with this advice, here we have constructed new tree shape indices as weighted means of the most standard, basic diversity and evenness indices. This systematic approach ensures that all our indices are not only robust and universally applicable but also have simple, consistent interpretations and clear interrelationships.
Some of the indices we have defined here are refinements of prior approaches to assessing tree shape. Our and are similar to the of Chao et al. (2010) and the phylogenetic entropy of Allen et al. (2009), respectively, but are more self-consistent and can be meaningfully applied to non-ultrametric trees. builds on the ideas of Lemant et al. (2022) but, by accounting for branch lengths – a key advantage of prior phylogenetic diversity and phylogenetic entropy indices, not shared by any prior tree balance indices – generalizes the concept of tree balance to a wider class of trees. These new indices share all the desirable properties but not the shortcomings of their predecessors and can therefore universally supersede them (Table 3). For the remainder of our indices describing average effective out-degree, effective numbers of nodes and branches, and evenness of branch sizes, we know of no precedents. In combination, our indices provide a more sophisticated, general, multidimensional description of tree shape than has previously been possible.
Whereas we have focussed on a system built around and , it is easy to use our general definitions of the longitudinal, node-wise, and star means to quantify other aspects of tree shape. A parallel, self-consistent system of indices can be defined by setting instead of in Equations 0.3 and 0.4, and setting instead of in Equations 0.8 and 0.9. These indices, which are robust to small changes in branch lengths but not node sizes, are normalized by dividing by instead of . Alternatively, can be replaced by another basic diversity index, or by another evenness index, such as the ratio preferred by Hill (1973) (see also Smith and Wilson (1996); Jost (2010); Tuomisto (2012)). Based on the means, we can also straightforwardly derive expressions for higher moments to obtain indices that, for example, quantify how much effective out-degree varies across all nodes or varies with node depth.
There are nevertheless several reasons for preferring our specific definitions. First, the foundational and are the most popular diversity and evenness indices among biologists (Tucker et al., 2017; Tuomisto, 2012). Second, defining entropy and evenness indices as weighted arithmetic means, and diversity indices as weighted geometric means, results in relatively simple expressions, especially in the case of leafy ultrametric trees. Third, is the only universal tree balance index for which the unifying leafy tree identity holds. In summary, we have taken the best of the existing indices, improved them, unified them, and filled in the gaps to create a coherent system (Table 2).
Given the ubiquity of tree structures, we expect our multidimensional method of describing tree shape to empower research and inform decision making in diverse domains. Our initial development of universal, robust indices was motivated by the need to compare and categorize non-leafy, non-ultrametric trees representing the clonal evolution of human tumours, where node sizes (corresponding to cell subpopulation sizes) and branch lengths (genetic distances) convey valuable information (Noble et al., 2022). Tree structures with node sizes and branch lengths are likewise centrally important in community ecology, conservation biology, systematic biology, and the study of microbial evolution. For instance, our indices can be used instead of conventional tree balance indices to evaluate alternative models of speciation, or to investigate how the mode of evolution of a pathogenic virus varies with geographical location, time period, or strain. In place of phylogenetic diversity and phylogenetic entropy, our non-normalized diversity indices could be used to inform policy making by quantifying how different actions would affect biodiversity. Beyond biology, obvious subjects for analysis include phylogenetic trees of language evolution, hierarchical organizational structures, and the tree data structures that abound in computing. As we have illustrated, our generic indices can be used not only within but also across domains to uncover similarities and differences in, say, the evolution of organisms, languages, and technologies.
One key topic for further theoretical research is to derive the expected values and covariances of our indices under standard tree generation models, such as the uniform model and the Yule process, for comparison with empirical data. Relationships between our indices and distance-based metrics such as the mean pairwise distance (which lacks a universal normalization (Tsirogiannis et al., 2012)) also remain to be examined. In the same vein as Figure 7, we are investigating sets of distinct trees to which our indices assign equal values, to determine whether additional indices might ever be needed to distinguish between trees in typical applications. Towards establishing a universal standard for describing tree shape, we are developing software packages for calculating index values that can be integrated with popular tree inference methods. Just as the first step in analysing a set of measurements is to calculate the mean and variance, so we propose that, whenever one encounters a rooted tree, a useful first step will be to describe its shape by evaluating our indices.
Acknowledgements
We are grateful to Kerry Manson for helpful comments on an earlier draft of this manuscript, to Lucia Barzilai and Chiara Barbieri for helping us obtain suitable empirical tree data, and to anonymous reviewers for suggesting various improvements.
Funding
This work was supported by the National Cancer Institute at the National Institutes of Health (grant number U54CA217376) to RN. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.
APPENDIX
Derivation of in Example 0.3
For the root , we have and . For either of the other internal nodes , we have and . The subtree weights are
The ancestor weights are
The node diversity values are, for all ,
Hence
For all , it follows from Equation 0.8 that if then
and otherwise
Proof of Proposition 1
Proof.
For , let such that for all , and let denote the non-zero-sized branches in the interval . Then, by a basic property of generalized means,
For the first part of the proposition, we note that for any interval , the number of non-zero-sized branches in is , which cannot exceed the number of counted nodes . Hence, for any rooted tree and all ,
We now turn to the second part. By definition, for all , if then branch size , where is the set of all nodes that descend from , and is the proportional size of node . For all rooted trees we have for all with . For ultrametric trees, , where is the set of all leaves in the tree. For leafy ultrametric trees, for all and hence for all . Then for any leafy ultrametric tree and all ,
Finally we will prove that this inequality does not hold for all rooted trees. We will do so in a more general context to show that the result is independent of our choice of weight function and exponent . Let for real , where is a continuous, monotonically increasing function of and such that when or , and as or . First consider the leafy but non-ultrametric three-leaf star tree in which one leaf has size and depth , and the other two leaves have size and depth (as in Figure 4 but with one more leaf). Now
Since depends only on and depends only on , we can make a function of such that as and , in which case as and . Also, for all , as . Hence as and . Instead setting makes ultrametric but non-leafy, with and as as before.
Proof of Proposition 2
Proof.
For every node , every , and at every depth , we have and so for all . Hence
Proof of Proposition 3
Proof.
The top left panel of Figure 6b shows a leafy ultrametric tree for which , and . The third panel in the top row of Figure 6 b shows a leafy ultrametric tree for which , and . Now consider the four-leaf, bifurcating, leafy ultrametric tree with uniform branch lengths, such that the sizes of each pair of sibling leaves are and (Figure 6c). As , we have , and . The different orderings of , and for three trees are inconsistent with any universal ordering.
Derivation of index values in Example 0.2
Since the tree of Figure 7c is ultrametric, , where is the branch length. The node size entropy is
The tree of Figure 7d has the same node sizes and therefore the same value as the previous tree. It also has the same relative effective height, as
For the tree of Figure 7e, since proportional node sizes must sum to unity we have
For this tree to have the same and values as the four-leaf trees we additionally require
The first two equations together imply and . After substituting these results into the third equation we obtain the numerical solution . Since all three trees have identical values of , and , the leafy tree identify implies that they have equal values and equal balance:
Data and code availability
All data sets used in this study have previously been published; the captions of Figures 8 and 9 provide precise references. An open source R package to calculate our new tree shape indices for trees in Newick, NEXUS or phylo format is at https://github.com/kimverity/RUIindices.
References
- Albers Susanne and Westbrook Jeffery. Self-organizing data structures. Online Algorithms: The state of the art, pages 13–51, 2005. [Google Scholar]
- Allen Benjamin, Kon Mark, and Bar-Yam Yaneer. A New Phylogenetic Diversity Measure Generalizing the Shannon Index and Its Application to Phyllostomid Bats. The American Naturalist, 174(2):236–243, 2009. [DOI] [PubMed] [Google Scholar]
- Atkinson Quentin D. and Gray Russell D.. Curious Parallels and Curious Connections—Phylogenetic Thinking in Biology and Historical Linguistics. Systematic Biology, 54(4):513–526, 2005. [DOI] [PubMed] [Google Scholar]
- Barzilai Lucia P and Schrago Carlos G. Signatures of natural selection in tree topology shape of serially sampled viral phylogenies. Molecular Phylogenetics and Evolution, 183:107776, 2023. [DOI] [PubMed] [Google Scholar]
- Chao Anne, Chiu Chun Huo, and Jost Lou. Phylogenetic diversity measures based on Hill numbers. Philosophical Transactions of the Royal Society B: Biological Sciences, 365 (1558):3599–3609, 2010. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chindelevitch Leonid, Hayati Maryam, Poon Art FY, and Colijn Caroline. Network science inspires novel tree shape statistics. Plos one, 16(12):e0259877, 2021. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Colijn Caroline and Gardy Jennifer. Phylogenetic tree shapes resolve disease transmission patterns. Evolution, medicine, and public health, 2014(1):96–108, 2014. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Colless Donald H. Review of Phylogenetics, The Theory and Practice of Phylogenetic Systematics. Systematic Zoology, 31(1):100–104, 1982. [Google Scholar]
- Faith Daniel P.. Conservation evaluation and phylogenetic diversity. Biological Conservation, 61(1):1–10, 1992. [Google Scholar]
- Fischer Mareike, Herbst Lina, Kersting Sophie, Kühn Luise, and Wicke Kristina. Tree Balance Indices: A Comprehensive Survey. Springer Nature, 2023. [Google Scholar]
- Hill Mark. Diversity and Evenness: A Unifying Notation and Its Consequences. Ecology, 54:427–432, 1973. [Google Scholar]
- Honkola Terhi, Vesakoski Outi, Korhonen Kalle, Lehtinen Jyri, Kaj Syrjänen, and Niklas Wahlberg. Cultural and climatic changes shape the evolutionary history of the uralic languages. Journal of Evolutionary Biology, 26(6):1244–1253, 2013. [DOI] [PubMed] [Google Scholar]
- Jost Lou. Entropy and diversity. Oikos, 113(2):363–375, 2006. [Google Scholar]
- Jost Lou. The Relation between Evenness and Diversity. Diversity, 2(2):207–232, 2010. [Google Scholar]
- Kirby Kathryn R, Gray Russell D, Greenhill Simon J, Jordan Fiona M, Gomes-Ng Stephanie, Bibiko Hans-Jörg, Blasi Damián E, Botero Carlos A, Bowern Claire, Ember Carol R, et al. D-place: A global database of cultural, linguistic and environmental diversity. PloS one, 11(7):e0158391, 2016. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Leinster Tom and Cobbold Christina A.. Measuring diversity: the importance of species similarity. Ecology, 93(3):477–489, 2012. [DOI] [PubMed] [Google Scholar]
- Lemant Jeanne, Sueur Cécile Le, Manojlović Veselin, and Noble Robert. Robust, Universal Tree Balance Indices. Systematic Biology, 71(5):1210–1224, 2022. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Leventhal Gabriel E, Kouyos Roger, Stadler Tanja, Von Wyl Viktor, Yerly Sabine, Böni Jürg, Cellerai Cristina, Klimkait Thomas, Günthard Huldrych F, and Bonhoeffer Sebastian. Inferring epidemic contact structure from phylogenetic trees. PLoS computational biology, 8(3):e1002413, 2012. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lewinsohn Maya A, Bedford Trevor, Müller Nicola F, and Feder Alison F. State-dependent evolutionary models reveal modes of solid tumour growth. Nature Ecology & Evolution, 7(4):581–596, 2023. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Mir Arnau, Rosselló Francesc, and Rotger Lucía. A new balance index for phylogenetic trees. Mathematical Biosciences, 241(1):125–136, 2013. arXiv: 1202.1223. [DOI] [PubMed] [Google Scholar]
- Mir Arnau, Rotger Lucía, and Rosselló Francesc. Sound Colless-like balance indices for multifurcating trees. PLoS ONE, 13(9):559–560, 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Mooers Arne O. and Heard Stephen B.. Inferring Evolutionary Process from Phylogenetic Tree Shape. The Quarterly Review of Biology, 72(1):31–54, 1997. [Google Scholar]
- Noble Robert, Burri Dominik, Sueur Cécile Le, Lemant Jeanne, Viossat Yannick, Kather Jakob Nikolas, and Beerenwinkel Niko. Spatial structure governs the mode of tumour evolution. Nature Ecology & Evolution, 6(2):207–217, 2022. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Pavoine Sandrine and Bonsall Michael B. Measuring biodiversity to explain community assembly: a unified approach. Biological Reviews, 86(4):792–812, 2011. [DOI] [PubMed] [Google Scholar]
- Pielou E. C.. The measurement of diversity in different types of biological collections. Journal of Theoretical Biology, 13:131–144, 1966. [Google Scholar]
- Purvis Andy and Agapow Paul-Michael. Phylogeny imbalance: taxonomic level matters. Systematic Biology, 51(6):844–854, 2002. [DOI] [PubMed] [Google Scholar]
- Rényi Alfréd. On measures of entropy and information Proceedings of the fourth Berkeley symposium on mathematical statistics and probability, Volume 1: Contributions to the theory of statistics, 4:547–562, 1961. [Google Scholar]
- Rogers James S.. Response of Colless’s Tree Imbalance to Number of Terminal Taxa. Systematic Biology, 42(1):102–105, 1993. [Google Scholar]
- Sackin M. J.. “Good” and “Bad” Phenograms. Systematic Biology, 21(2):225–226, 1972. [Google Scholar]
- Scott Jacob G, Maini Philip K, Anderson Alexander RA A, and Fletcher Alexander G. Inferring Tumor Proliferative Organization from Phylogenetic Tree Measures in a Computational Model. Systematic Biology, 69(4):623–637, 2020. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Shannon C. A.. A mathematical theory of communication. The Bell System Technical Journal, 27(3):379–423, 1948. [Google Scholar]
- Shao Kwang-Tsao and Sokal Robert R. Tree Balance. Systematic Zoology, 39(3):266, 1990. [Google Scholar]
- Smith Benjamin and J. Bastow Wilson. A Consumer’s Guide to Evenness Indices. Oikos, 76(1):70–82, 1996. [Google Scholar]
- Tsirogiannis Constantinos, Sandel Brody, and Cheliotis Dimitris. Efficient computation of popular phylogenetic tree measures. In International Workshop on Algorithms in Bioinformatics, pages 30–43. Springer, 2012. [Google Scholar]
- Tucker Caroline M., Cadotte Marc W., Carvalho Silvia B., Davies T. Jonathan, Ferrier Simon, Fritz Susanne A., Grenyer Rich, Helmus Matthew R., Jin Lanna S., Mooers Arne O., Pavoine Sandrine, Purschke Oliver, Redding David W., Rosauer Dan F., Winter Marten, and Mazel Florent. A guide to phylogenetic metrics for conservation, community ecology and macroecology. Biological Reviews, 92(2):698–715, 2017. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Tuomisto Hanna. An updated consumer’s guide to evenness and related indices. Oikos, 121(8):1203–1218, 2012. [Google Scholar]
- Veron Simon, Saito Victor, Padilla-García Nélida, Forest Félix, and Bertheau Yves. The use of phylogenetic diversity in conservation biology and community ecology: A common base but different approaches. Quarterly Review of Biology, 94(2):123, 2019. [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
All data sets used in this study have previously been published; the captions of Figures 8 and 9 provide precise references. An open source R package to calculate our new tree shape indices for trees in Newick, NEXUS or phylo format is at https://github.com/kimverity/RUIindices.