Skip to content

Phylogenetic Tree Rearrangement Comparison

NNI, SPR, and TBR define nested unrooted tree-move neighborhoods without prescribing a search policy.

Version
v1 · 2026-11-14 · History
Domain-specific #
14874
Domain group
Natural Sciences
Origin domain
Biology & Ecology
Subdomain
Phylogenetics → Biology & Ecology

Core Idea

A tree rearrangement changes the connections of a phylogenetic tree while retaining its labeled leaves. Nearest-neighbor interchange (NNI), subtree pruning and regrafting (SPR), and tree bisection and reconnection (TBR) specify different ways to produce neighboring trees. Here the common frame is an unrooted binary phylogenetic tree: its leaves carry the taxa and its internal vertices have degree three.[1]

A move defines a candidate or a neighborhood; it is not a search objective or a guarantee of improvement. A search procedure can score candidates under a chosen criterion and decide which to explore, but the move itself does not select a best tree or prove that a global optimum has been found.

How would you explain it like I'm…

Moving Branches on Family Trees

Scientists draw trees that show how different animals are related, with the animals' names at the tips of the branches. To try out other possible trees, they move branches around in certain ways, but keep the same names at the tips. Moving a branch just makes a new tree to look at; it doesn't tell you which tree is best.

Rearranging Family Trees

Biologists draw family trees, called phylogenetic trees, to show how living things might be related. The tips of the tree have the names of the living things. A tree rearrangement changes how the branches connect while keeping the same names at the tips. There are different kinds of moves: a small swap of nearby branches, cutting off a branch and attaching it somewhere else, or cutting the tree in two and joining the pieces in a new way. Each move just gives new trees to check. Scientists still need a separate way to score the trees and decide which ones are better.

Tree Rearrangement Moves

A tree rearrangement changes how a phylogenetic tree is connected while keeping the same labeled leaves, which represent the taxa (species or groups). The usual setting is an unrooted binary tree, where each internal point connects exactly three branches. Three standard moves produce "neighboring" trees in different ways. Nearest-neighbor interchange (NNI) swaps subtrees around a single internal branch. Subtree pruning and regrafting (SPR) cuts off a subtree and reattaches it elsewhere. Tree bisection and reconnection (TBR) splits the tree into two pieces and reconnects them at any pair of branches. A move only defines candidates, not a goal: a search method scores candidates with some criterion and decides which to explore, but the move itself doesn't choose a best tree or prove the best overall has been found.

 

In phylogenetics, a tree rearrangement is an operation that alters the topology of a phylogenetic tree while preserving its set of labeled leaves. The standard frame is an unrooted binary phylogenetic tree, whose leaves are labeled by taxa and whose internal vertices have degree three. Nearest-neighbor interchange (NNI) exchanges subtrees across a single internal edge; subtree pruning and regrafting (SPR) detaches a subtree and reattaches it on another edge; tree bisection and reconnection (TBR) removes an edge to split the tree into two subtrees and reconnects them by a new edge between any pair of their edges. Each operation defines a neighborhood of trees reachable in one move. Crucially, a move only defines candidates or a neighborhood; it is not a search objective and does not guarantee improvement. A search procedure must score candidates under a chosen criterion and decide which to explore, and the move itself neither selects a best tree nor certifies a global optimum.

Comparing the Moves

Move Change under this unrooted tree convention Comparison
NNI Around an internal edge, exchange adjacent subtrees across that edge. A local reconnection of the four incident subtrees.
SPR Cut an edge, prune one resulting subtree, and reattach it at another edge of the remaining tree. Can make moves beyond a single NNI.
TBR Cut an edge into two trees and reconnect them by a new edge at chosen locations in both components. Allows reconnections beyond a single SPR.

Under the stated unrooted tree convention, every one-move NNI neighbor is an SPR neighbor, and every one-move SPR neighbor is a TBR neighbor. These are set inclusions for a fixed tree and convention; they do not assert that every inclusion is proper for every tree size, or that a larger neighborhood always yields a better or faster search.[1]

Worked Quartet

Let four labeled leaves be A, B, C and D. Write AB|CD for the unrooted binary tree whose single internal edge separates A and B from C and D. Its two distinct NNI alternatives at that edge have splits AC|BD and AD|BC. The leaf labels are unchanged; the internal split changes. This is a small illustrative move, not a claim about which tree fits any dataset best.[1]

Rooted and Search Boundaries

Rooted SPR has an orientation constraint: the portion pruned and regrafted must respect the root. Bordewich and Semple distinguish rooted from unrooted SPR and show why a move valid after forgetting the root need not be a valid single rooted SPR move. Definitions can encode the root differently, so name the convention before comparing distances or neighborhoods.[2]

The move family is separate from a search policy. A hill-climbing search, for example, could evaluate neighbors and retain an improvement; a different policy could explore a candidate with a worse score to escape a local optimum. Neither policy is inherent in NNI, SPR or TBR. Other operations such as combining parts of two trees, and specific distance or complexity theorems, require their own definitions.

Relationships to Other Abstractions

Local relationship map for Phylogenetic Tree Rearrangement ComparisonParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Phylogenetic Tree Re…DOMAINPrime abstraction: Comparison — presupposesComparisonPRIME

Current abstraction Phylogenetic Tree Rearrangement Comparison Domain-specific

Parents (1) — outgoing typed relations

  • Phylogenetic Tree Rearrangement Comparison presupposes Comparison Prime

    The entry aligns three tree moves in one frame and reads off their neighborhood relations.

Hierarchy path (1) — routes to 1 parentless root

  • Phylogenetic Tree Rearrangement Comparison → presupposes Comparison

Neighborhood in Abstraction Space

Phylogenetic Tree Rearrangement Comparison sits in a sparse region of the domain-specific corpus (97th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Data Structures & Graph Variants (18 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14

References

[1] Remie Janssen and Jonathan Klawitter, “Rearrangement operations on unrooted phylogenetic networks,” Theory and Applications of Graphs 6 (2019), article 6, author preprint, version 2, doi:10.20429/tag.2019.060206. registry ↩a ↩b ↩c

[2] Magnus Bordewich and Charles Semple, “On the computational complexity of the rooted subtree prune and regraft distance,” Annals of Combinatorics 8 (2005), 409–423, author-hosted paper, doi:10.1007/s00026-004-0229-z. registry ↩