---
title: Neighborhood-Preserving Treemaps
url: https://www.emergentmind.com/topics/neighborhood-preserving-treemaps
type: topic
---

# Neighborhood-Preserving Treemaps

Searching arXiv for recent and foundational papers on neighborhood-preserving treemaps.
Neighborhood-preserving treemaps are treemap constructions in which neighborhood information is treated as a primary visual variable rather than an incidental by-product of packing. In the most explicit recent formulation, geometric adjacency of cells encodes similarity in the underlying data, and the algorithm actively preserves these adjacencies during optimization [2508.03445]. Across the literature, this objective appears in several forms: rectangular spatial treemaps that preserve original map adjacencies as far as possible [1105.0398], orthogonal Voronoi treemaps in which adjacency emerges from a site-based orthogonal metric [1904.02348], and topology-guided TreeMap views that encode the merge hierarchy of high-dimensional data [2409.07257]. The common problem is to reconcile hierarchy, area, shape quality, and neighborhood structure in a two-dimensional layout; the general embedding theory now shows that constant-dimensional visualizations cannot, in general, faithfully preserve arbitrary neighborhood graphs [2508.07119].

## 1. Conceptual scope and definitions

An important antecedent is qualitative metric visualization, where two- and three-dimensional representations are studied with emphasis on “the accurate representation of the linear order among the distances rather than their actual values” [0201298]. In treemap research, that shift from exact metric preservation to structural preservation reappears as a distinction between similarity in data space and neighborhood in layout space.

In the Voronoi-treemap formulation, similarity is a data property: each node has a feature vector \(s \in [0,1]^d\), and a similarity function
$$
f_{\text{sim}} : [0,1]^d \times [0,1]^d \rightarrow [0,1]
$$
maps two nodes’ feature vectors to a scalar similarity value [2508.03445]. Neighborhood, by contrast, is a property of the layout: two cells are neighbors if they lie on the same hierarchy level and share a common boundary segment. A neighborhood-preserving treemap, in this sense, is one in which similar pairs of nodes should be mapped to adjacent cells, and these adjacency relations are maintained as much as possible during iterative optimization.

The rectangular-cartographic line of work defines neighborhood more combinatorially. There, the relevant structure is the adjacency graph of rectangles, refined by orientation: left, right, top, and bottom [1105.0398]. This yields a stricter notion of preservation, because the target is not only that two regions remain adjacent, but potentially that they remain adjacent with the same directional relation.

TopoMap++ uses a different, topological notion of neighborhood. Its TreeMap-based representation is derived from the binary merge tree induced by the Euclidean Minimum Spanning Tree and the \(0\)-dimensional persistence diagram of the Rips filtration [2409.07257]. In that setting, the treemap preserves the hierarchy of connected components and their merge relations, not a metric neighborhood graph in the ordinary Voronoi or rectangular-cartogram sense.

## 2. Major geometric models

The literature contains several distinct models under the same broad theme.

| Model | Core geometry | Neighborhood notion |
|---|---|---|
| Adjacency-preserving spatial treemap | Nested axis-aligned rectangles | Rectangle adjacency and orientation |
| Orthogonal Voronoi treemap | Orthogonal polygons from axis-aligned bisectors | Valid neighbors induced by sites |
| Neighborhood-preserving Voronoi treemap | Recursive Voronoi cells | Similarity constraints realized as shared edges |
| TopoMap++ TreeMap representation | Space-filling boxes over a merge tree | Parent–child and merge-tree topology |

Adjacency-preserving spatial treemaps start from a rectangular layout and a clustering of its rectangles, and transform them into a two-level spatial treemap that respects the clustering and preserves as many adjacencies of the input layout as possible [1105.0398]. The bottom level is a full rectangular subdivision; the top level is a clustering of these rectangles into complexes. The resulting treemap must make every top-level cluster a rectangle while preserving all internal bottom-level adjacencies and maximizing preservation of external bottom-level adjacencies.

Orthogonal Voronoi treemaps introduce an orthogonal Voronoi diagram as a partition of a bounded region into cells driven by sites and weights, with the additional constraint that all bisectors between neighboring sites are horizontal or vertical line segments [1904.02348]. The diagram is recursive, as in a treemap or Voronoi treemap, but its neighborhood structure is site-based and metric-driven. Two sites are valid neighbors if no other site lies in the axis-aligned rectangle having them as opposite corners. Adjacency in the final subdivision reflects that valid-neighbor relation.

Neighborhood-Preserving Voronoi Treemaps use centroidal Voronoi tessellation, assignment, swapping, and similarity-aware movement to align geometric adjacency with attribute similarity [2508.03445]. Their cells are Voronoi polygons rather than rectangles, which allows more potential neighbors per cell and therefore more capacity to encode similarity constraints as shared edges.

TopoMap++ is not a Voronoi method. It builds a TreeMap-based representation directly from the topological hierarchy induced by the Euclidean Minimum Spanning Tree and the \(0\)-dimensional persistence structure of the data [2409.07257]. Its treemap is therefore a space-filling summary of component hierarchy, with area proportional to component size and color encoding persistence.

## 3. Algorithmic constructions

The most explicit pipeline for neighborhood preservation is the Voronoi-treemap pipeline that integrates similarity at every stage [2508.03445]. The input is a tree \(T=(V,E)\) with node weights \(V^w\) and similarity features \(V^s\). Similarity and weights are propagated bottom-up:
$$
V^s =
\begin{cases}
V^s, & \text{if } V \text{ is a leaf} \\
\dfrac{1}{|children(V)|} \sum\limits_{V_c \in children(V)} V_c^s, & \text{otherwise}
\end{cases}
$$
and
$$
V^w =
\begin{cases}
V^w, & \text{if } V \text{ is a leaf} \\
\sum\limits_{V_c \in children(V)} V_c^w, & \text{otherwise}.
\end{cases}
$$
Pairwise similarities on each level are then binned, strongest similarities are retained as undirected constraints, and layout proceeds top-down. For each parent region, a centroidal Voronoi tessellation with equal cell sizes is generated. Data nodes are assigned to CVT cells by Kuhn–Munkres matching, using a cost matrix that aligns distances in similarity space with distances between CVT centroids. Greedy swapping then improves the number of constraints realized as cell adjacencies. The subsequent optimization recomputes neighborhoods on each iteration and, for each cell, first performs a similarity-driven move and only otherwise falls back to a Lloyd step toward the centroid. Weight optimization is deferred to the last \(20\%\) of iterations and uses additively weighted power Voronoi diagrams:
$$
C(p_i) = \{ x \in \mathbb{R}^2 \mid \|x - p_i\|^2 - w_i \le \|x - p_j\|^2 - w_j \ \forall j \neq i \}.
$$

Orthogonal Voronoi treemaps replace Euclidean or power-diagram geometry with an orthogonal distance defined relative to site pairs [1904.02348]. If two sites differ more in \(x\) than in \(y\), horizontal distance is used; otherwise vertical distance is used. For weighted sites:
$$
dist_{o}(p, s_i) =
\begin{cases}
|x_p - x_{s_i}| - w_i, & \text{if } x_{\Delta ij} > y_{\Delta ij}, \\
|y_p - y_{s_i}| - w_i, & \text{if } x_{\Delta ij} < y_{\Delta ij}.
\end{cases}
$$
The associated sweepline+skyline algorithm processes sites in increasing \(x\)-order, generates horizontal or vertical segmentation lines for valid neighbor pairs, maintains a skyline as the current vertical profile of active interfaces, and closes cells when their bounding polygon becomes determined. Adaptation of weights and positions is performed in one pass by moving sites toward cell centroids and updating weights according to the target/current area ratio.

Adjacency-preserving spatial treemaps proceed differently because the central object is a given rectangle complex rather than a site set [1105.0398]. A key structural lemma states that every rectangle complex has a rectangular extension preserving its internal adjacency graph and adjacency orientations. For a fixed global layout, the algorithm identifies which rectangles are \(d\)-extensible and \(d\)-engaged, constructs rectangular extensions in which all such rectangles lie on the required side of their top-level region, and then aligns boundary segments to realize all external adjacencies that are geometrically possible for that global arrangement. When the global layout is not fixed, the optimization ranges over rectangular layouts represented by regular edge labelings; the objective is expressed by local capacities \(\omega(\mathcal{R},\mathcal{S},d)\), and the optimal oriented layout is found by solving a maximum-weight closure problem on the flip partial order.

TopoMap++ begins from the Euclidean Minimum Spanning Tree, or an approximate MST obtained from a sparse approximate Relative Neighborhood Graph using Vamana, and uses the ordered MST edges as the merge sequence of the \(0\)-dimensional filtration [2409.07257]. The resulting binary merge tree is simplified by a size threshold \(\eta\): if a leaf node has size \(< \eta\) and its sibling is also a leaf, they are merged into their parent, and the process repeats. The surviving leaves define components of interest. A modified Shneiderman treemap includes boxes for a component if and only if the component satisfies the threshold criterion. In the coordinated projection view, selected components are enlarged by
$$
\alpha = \min\left\{ c \frac{l_{max}}{L},\ \alpha_{max}\right\},
$$
where \(L\) is the average internal MST edge length of the component and \(l_{max}\) is the maximum edge length in the MST.

## 4. Evaluation and observed behavior

Neighborhood-preserving Voronoi treemaps are evaluated by area error, aspect ratio, constraint preservation rate, and graph-distance metrics on unrealized constraints [2508.03445]. On the lowest level, the primary neighborhood metric counts how many similarity constraints are realized as geometric neighbors. Unrealized constraints are evaluated on the dual graph by shortest-path distance. Quantitative examples illustrate the range of outcomes. On “Country Population” with \(18\) constraints, random CVT initialization preserves \(5\) constraints, projection-and-scaling preserves \(11\), matching plus swapping preserves \(15\), and the full method preserves \(15\), with maximum graph distance \(2\). On “SP500 Variance” with \(1798\) constraints, the corresponding counts are \(103\), \(112\), \(178\), and \(179\), with maximum graph distance \(21\). Area error remains low and average aspect ratios remain close to \(1\).

Orthogonal Voronoi treemaps are evaluated by computation time, converge rate, and aspect ratio, rather than by an explicit numeric metric for adjacency preservation [1904.02348]. The paper reports that Voronoi treemap has the best aspect ratio in all tests, while OVT has aspect ratio comparable to treemaps, especially with treemap-based initialization. OVT with designed initialization starts with lower area error, reaches a strict error threshold such as \(0.01\) within about \(200\) iterations, and converges faster than Voronoi treemap; OVT with random initialization converges more slowly and may not reach the same threshold in \(500\) iterations. The method is flexible under data changes, but the authors explicitly note that some site positions may move in a large range and that no strategy preserves relative site positions.

TopoMap++ evaluates the approximation of its MST surrogate through bottleneck distance between \(0\)-dimensional persistence diagrams and relative weight error, and uses the treemap primarily as an exploration interface rather than as a separate geometric-neighborhood benchmark [2409.07257]. Its empirical role is to expose significant components that would otherwise remain small in a sparse TopoMap layout.

## 5. Complexity and theoretical limits

Algorithmic complexity varies sharply by model. The neighborhood-preserving Voronoi-treemap method estimates complexity roughly as \(O(d \cdot n^3)\), where \(d\) is tree depth and \(n\) is the number of leaf nodes; Kuhn–Munkres matching is the dominant \(O(n^3)\) component, and evaluation uses up to \(150\) iterations per level [2508.03445]. Orthogonal Voronoi treemap construction has expected complexity \(O(n \log n)\) per iteration, and \(O(k\,n \log n)\) for \(k\) iterations [1904.02348]. In adjacency-preserving spatial treemaps, the fixed-global-layout oriented case is solvable in \(O(n)\) time, and the unconstrained oriented case in \(O(k^4 \log k + n)\), where \(k\) is the number of top-level regions [1105.0398]. If external adjacency must be preserved without preserving orientation, the optimization becomes NP-hard even with two top-level regions; the paper also gives a linear-time algorithm preserving at least \(1/18\) of all bottom-level external adjacencies and at least \(1/6\) of the optimum, and shows instances where no layout can preserve more than \(1/4\) of them.

Beyond algorithmics, there are general impossibility results for neighborhood-preserving visualization. In the graph-embedding formalism, an embedding \(\alpha\)-preserves a graph if there exists a threshold \(r>0\) such that neighbors map closer than \(r\) and non-neighbors map at least \(\alpha r\) apart [2508.07119]. For \(\alpha \in (0,2)\), an overwhelming fraction of graphs on \(n\) vertices require doubling dimension \(\Omega(\log n)\); sparse regular graphs still require \(\Omega(\log n / \log\log n)\). In normed spaces, almost all graphs require dimension \(\Theta(n)\) for neighborhood recoverability, and even planted-partition graphs with salient cluster structure typically require \(\Omega(\log n)\). The paper explicitly notes that treemaps correspond to embedding into a \(2\)-dimensional metric space, so these lower bounds apply directly to neighborhood-preserving treemaps. This implies that complete preservation of arbitrary neighborhood graphs is not a realistic objective for two-dimensional treemap layouts.

## 6. Applications, trade-offs, and open directions

The application spectrum is broad. Similarity-driven Voronoi treemaps are demonstrated on country borders, CIFAR-10 concept embeddings, file hierarchies annotated by author contributions, stock correlations, and movie-genre overlap [2508.03445]. Adjacency-preserving spatial treemaps are motivated by hierarchical cartograms such as boroughs and wards, where preserving adjacency is essential for reasoning about spatial clusters and neighboring regions [1105.0398]. Orthogonal Voronoi treemaps target cases where treemap-like orthogonal geometry and Voronoi-like flexibility are both desired [1904.02348]. TopoMap++ applies its topology-guided TreeMap representation to urban data, large-language-model embeddings, and StreetAware visual embeddings, using the treemap to identify and select significant topological components [2409.07257].

The main trade-off is that different treemap families preserve different neighborhood objects. Rectangular adjacency-preserving methods preserve internal adjacencies exactly and optimize inter-cluster adjacencies, but they are restricted to two levels in the current theory and rely on orthogonal-convexity assumptions [1105.0398]. Orthogonal Voronoi treemaps preserve neighborhoods only in a metric-driven and emergent sense: they do not take a desired adjacency graph as input, and no explicit numeric metric for adjacency preservation is defined [1904.02348]. Similarity-aware Voronoi treemaps explicitly optimize adjacency as the target realization of similarity constraints, but they sacrifice some regularity of cell shape and cannot realize all constraints in planar, area-constrained settings [2508.03445]. TopoMap++ preserves topological hierarchy and component merge structure, but its treemap does not attempt to preserve geometric distances between boxes; the strong topological guarantee of the original TopoMap is retained locally around highlighted components after scaling rather than globally [2409.07257].

The open problems stated in the literature are correspondingly heterogeneous. For similarity-aware Voronoi treemaps, proposed directions include improved planar embedding of similarity graphs under hierarchical constraints, richer edge encodings, more efficient algorithms, and broader user studies [2508.03445]. For orthogonal Voronoi treemaps, preserving relative site positions during updates is explicitly identified as future work [1904.02348]. For adjacency-preserving rectangular treemaps, extending from two to multiple hierarchical levels and improving approximation factors remain unresolved [1105.0398]. The theoretical barriers for low-dimensional embeddings indicate that these developments will necessarily remain selective: they can improve which neighborhoods are preserved and how those neighborhoods are prioritized, but not eliminate the intrinsic compression limits of two-dimensional visualization [2508.07119].

Source: https://www.emergentmind.com/topics/neighborhood-preserving-treemaps