Papers
Topics
Authors
Recent
Search
2000 character limit reached

TriNet: Metric for Level-1 Phylogenetics

Updated 19 July 2026
  • TriNet is a trinet-based metric for comparing binary level-1 phylogenetic networks by analyzing tidied three-leaf subnetworks.
  • It encodes local reticulate structure uniquely, ensuring that zero trinet distance implies isomorphic network reconstructions.
  • An optimal cubic-time algorithm computes trinets using precomputed binets and lsa tables, yielding finer resolution than traditional methods.

TriNet denotes a trinet-based metric and computational framework for comparing binary level-1 phylogenetic networks on a common leaf set. Its central principle is to replace direct comparison of large reticulate networks by comparison of all displayed labeled trinets, that is, the tidied three-leaf subnetworks induced by each taxon triple. In this setting, disagreement is measured by a symmetric set difference on trinet sets, and the key theoretical justification is that the full set of displayed trinets encodes a level-1 network, so the resulting distance is a proper discriminator of reticulate structure rather than a coarse tree-derived surrogate (Moulton et al., 2017).

1. Formal setting and basic objects

Let XX be a finite leaf set of size nn. A rooted phylogenetic network NN on XX is a simple acyclic digraph with a unique root, no degenerate vertices, and leaves bijectively labeled by XX. The binary restriction used by TriNet requires that each non-leaf vertex has indegree and outdegree at most two, and that each vertex with indegree two has outdegree one. A level-kk network is one in which every biconnected component contains at most kk reticulations; in particular, a level-1 network is binary and has the property that all cycles in its underlying graph are pairwise disjoint. This class is slightly more general than trees and includes networks often termed galled trees (Moulton et al., 2017).

Two ancestor notions govern trinet extraction. For a subset Y⊆XY \subseteq X, the lowest common ancestor lca(Y)\mathrm{lca}(Y) is the common ancestor not above any other common ancestor of YY. A stable ancestor of nn0 is a vertex contained in every dipath from the root to some taxon in nn1, and the lowest stable ancestor nn2 is the unique vertex below all stable ancestors of nn3. In level-1 networks, nn4 exists and is unique, and either nn5, or there is a unique dipath from nn6 down to nn7 that contains no cut arc. For pairs nn8, the nn9 table stores NN0 and is the main auxiliary structure used by TriNet (Moulton et al., 2017).

Given a triple NN1, the displayed trinet NN2 is obtained by restricting NN3 to the part reachable from NN4 on dipaths to leaves in NN5, then repeatedly suppressing degree-2 vertices and replacing parallel arcs by single arcs until no further tidying applies. Up to relabeling there are eight trinet types, but TriNet compares labeled trinets on the fixed leaf set by canonical encoding after suppression of degree-2 vertices and parallel edges. Equality is label-preserving isomorphism on the tidied three-taxon subnetworks (Moulton et al., 2017).

2. Trinets as an encoding device

TriNet is rooted in the observation that triplets and trinets play fundamentally different roles in reticulate phylogenetics. Triplets are rooted three-leaf trees and suffice to encode rooted phylogenetic trees, but they generally do not encode rooted phylogenetic networks. Distinct level-1 networks can share all triplets, so triplet distance can be zero even when the underlying networks are different. Trinets generalize triplets by retaining local reticulation structure, and for level-1 networks the set of displayed trinets NN6 encodes NN7 (Moulton et al., 2017).

This encoding perspective predates the cubic-time distance algorithm. For 1-nested networks, displayed trinets were shown to determine the network uniquely and to support a polynomial-time construction algorithm from dense trinet sets (Huber et al., 2011). Subsequent work extended identifiability beyond level-1: recoverable binary level-2 networks and binary tree-child networks are also encoded by their trinets, via decomposition theorems based on cut-arc sets and biconnected components (Iersel et al., 2012). These results place TriNet within a broader line of work in which three-taxon subnetworks are not merely local summaries but complete invariants for several important network classes.

A common misconception is that trinets are simply a network analogue of rooted triplets and therefore inherit the same limitations. The theory suggests the opposite for level-1 networks: triplets discard reticulation and cut-arc information, whereas trinets preserve enough local structure to determine the global network. A plausible implication is that TriNet’s discriminative power is a direct consequence of identifiability, not merely of using more local configurations.

3. Distance definition and metric properties

For a level-1 network NN8 on leaf set NN9, TriNet considers the set of displayed labeled trinets

XX0

For two level-1 networks XX1 and XX2 on the same leaf set, the trinet distance is

XX3

where XX4 is symmetric difference (Moulton et al., 2017).

Because there are exactly XX5 triples and each triple contributes at most one trinet to each network’s set, the diameter satisfies

XX6

Equality is achievable, for example when one network is a tree and the other is a saturated level-1 network in which every interior vertex lies in a 3-cycle. This cubic scaling is intrinsic to the comparison unit: TriNet counts local disagreements over all three-taxon views, not just over vertex-induced clusters (Moulton et al., 2017).

The metric interpretation is strengthened by the encoding theorem. Since the set of displayed trinets uniquely determines a level-1 network, zero trinet distance implies isomorphism of the compared networks. This is precisely the respect in which TriNet improves on triplet-based comparison: it is a proper metric on the target class rather than a pseudo-metric that can collapse distinct reticulate topologies.

A worked four-leaf example illustrates the counting mechanism. If XX7 is the rooted binary tree with topology XX8 and XX9 is obtained by introducing a reticulation forming a reticulate cherry between XX0 and XX1, then the displayed trinets differ on XX2 and XX3 but agree on XX4 and XX5. Hence XX6 (Moulton et al., 2017).

4. Cubic-time algorithm and implementation

The principal algorithmic contribution associated with TriNet is an optimal XX7 procedure for computing XX8, and hence the distance between two level-1 networks. The algorithm has two stages. First, it precomputes binets and the XX9 table in kk0 time. A binet is a displayed subnetwork on two taxa; up to relabeling there are two types, the cherry kk1 and the reticulate cherry kk2. The algorithm topologically orders tree vertices, computes clusters kk3, and inspects the two child clusters kk4 and kk5 of each interior vertex. If kk6 and kk7, then kk8 is displayed with splitting ancestor kk9, and kk0 is set to kk1. If kk2 and kk3, then kk4 is displayed with kk5; if kk6 has not been recorded previously, it is set to kk7 (Moulton et al., 2017).

The structural facts behind this preprocessing are specific to level-1 networks. For any pair kk8, the network has a unique kk9. Moreover, Y⊆XY \subseteq X0 occurs if and only if Y⊆XY \subseteq X1, equivalently if there is no splitting ancestor of Y⊆XY \subseteq X2 and Y⊆XY \subseteq X3. By contrast, Y⊆XY \subseteq X4 occurs if and only if Y⊆XY \subseteq X5, equivalently if Y⊆XY \subseteq X6 is the unique splitting ancestor. These equivalences allow the algorithm to represent each pair by a binet type plus an Y⊆XY \subseteq X7 entry.

Second, the algorithm infers the displayed trinet for each unordered triple in Y⊆XY \subseteq X8 time per triple. For Y⊆XY \subseteq X9, it examines the three binets lca(Y)\mathrm{lca}(Y)0, counts the number lca(Y)\mathrm{lca}(Y)1 of cherries among them, orders the taxa so that lca(Y)\mathrm{lca}(Y)2, and checks whether lca(Y)\mathrm{lca}(Y)3 is lca(Y)\mathrm{lca}(Y)4 or lca(Y)\mathrm{lca}(Y)5. The resulting case analysis decides among the eight trinet types. When lca(Y)\mathrm{lca}(Y)6, the trinet is lca(Y)\mathrm{lca}(Y)7; when lca(Y)\mathrm{lca}(Y)8, it is lca(Y)\mathrm{lca}(Y)9; when YY0, the outcome is one of YY1, YY2, YY3, or YY4 depending on YY5 relations and whether YY6; when YY7, the outcome is YY8 or YY9 depending on the same binet membership test (Moulton et al., 2017).

The total runtime is therefore nn00, with nn01 preprocessing and constant-time inference for each of the nn02 triples. Space usage is nn03 for the nn04 table plus nn05 to store all trinet encodings or hashed signatures. The bound is optimal in the standard exact model because any exact algorithm must in general inspect all triples, which are nn06 in number. Auxiliary size bounds for saturated level-1 networks, namely nn07 and nn08, support the preprocessing analysis (Moulton et al., 2017).

The algorithms were implemented in Java in the TriLoNet package. The implementation supports parsing level-1 networks with labeled leaves, computing nn09 by the cubic procedure, evaluating nn10 and the restricted Robinson–Foulds distance, and running simulation workflows akin to those used in the original empirical study (Moulton et al., 2017).

5. Comparison with the restricted Robinson–Foulds network metric

TriNet was evaluated against the Robinson–Foulds network metric restricted to level-1 networks. In that setting, nn11 is defined as the size of the symmetric difference of the cluster multisets induced by interior vertices. Using the bound nn12 and noting that root and leaf clusters are identical, one obtains

nn13

The contrast with TriNet is immediate: the trinet diameter scales as nn14, whereas the restricted RF diameter scales as nn15 (Moulton et al., 2017).

Conceptually, the two metrics summarize different structures. RF compares vertex-induced clusters, which can be coarse in reticulate regions. TriNet compares all displayed three-leaf subnetworks and is therefore sensitive to local reticulate arrangements such as reticulate cherries and their position relative to nn16 and nn17. This suggests why TriNet is typically more discriminative, though computationally more expensive.

The empirical comparison used three datasets of level-1 networks with 50 leaves. Lev(1) and Lev(10) were generated with the lev1athan model using one versus ten seeds, and Ran was generated by repeatedly attaching leaves to randomly chosen arcs via three operations. Distances were normalized to nn18 using the diameters nn19 for nn20 and nn21 for nn22. Across datasets, the trinet metric exhibited a broader range and larger variance than RF, whereas the RF distributions were tighter (Moulton et al., 2017).

Metric Normalized diameter Average time on 50-leaf datasets
nn23 nn24 140, 145, and 231 minutes
nn25 nn26 16, 21, and 58 minutes

Timing measurements were obtained on a machine with an i7 CPU and 16 GB RAM. The results indicate a practical trade-off rather than a contradiction: RF is faster in practice, but TriNet captures more local reticulate disagreement and therefore yields a broader discriminatory range (Moulton et al., 2017).

6. Scope, limitations, and later developments

TriNet, as defined in the cubic-time algorithm, is restricted to binary level-1 networks. This is not an incidental technical choice: the existence and uniqueness of nn27, the structure of splitting ancestors, and the fact that displayed trinets encode the network are all used directly in the algorithm and in the metric’s correctness arguments (Moulton et al., 2017).

Extensions beyond level-1 are nontrivial. Trinets determine recoverable binary level-2 networks and binary tree-child networks, which suggests that trinet-based comparison may remain meaningful on broader classes, but the general statement that higher-level networks are determined by their trinets is not available. Indeed, the data explicitly notes that general higher-level networks are not necessarily determined by their trinets (Iersel et al., 2012). A plausible implication is that the TriNet metric remains most principled when identifiability by displayed trinets is established for the class under study.

Related reconstruction results clarify the surrounding landscape. Dense trinet sets can be used to decide displayability by a 1-nested network and to construct that network in polynomial time (Huber et al., 2011). By contrast, for nondense collections of binets and trinets, deciding whether a binary level-1 network displays a given trinet set is NP-hard, although binet-only instances and certain restricted mixed instances remain polynomial-time solvable (Huber et al., 2014). These results underscore that TriNet occupies the comparison side of a broader program in which trinets serve both as local encodings and as algorithmic primitives.

From a practical perspective, exact TriNet computation is optimal but cubic, so it is feasible for moderate numbers of leaves rather than very large networks. The original study notes that the method is usable up to dozens of leaves, while RF may be preferable for rapid screening. The same study also leaves several directions open, including faster approximate trinet distances, normalization and diameter results for other network metrics, and better random generators for level-1 networks (Moulton et al., 2017).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to TriNet.