---
title: Contraction Width in Graph & Tensor Networks
url: https://www.emergentmind.com/topics/contraction-width
type: topic
---

# Contraction Width in Graph & Tensor Networks

Searching arXiv for the cited works to ground the synthesis.
{"query":"2210.08620 contraction width twin-width planar graphs 1908.11034 carving-width contraction trees tensor networks 1705.04544 distance-preserving graph contractions 2307.05811 graphs on surfaces twin-width 2509.05122 component twin-width 2206.08248 twin-width and types", "max_results": 10}
Contraction width denotes a family of context-dependent measurements attached to contraction processes. In graph structure theory, its most prominent incarnation is twin-width: a graph is viewed as a trigraph, vertices are merged until one vertex remains, and the width of a contraction sequence is the maximum red degree appearing along the sequence [2004.14789]. In tensor-network algorithms, contraction width is expressed through contraction trees and the induced space and time bottlenecks, most notably \(B_{\mathrm{s}}(G)\) and \(B_{\mathrm{t}}(G)\), with carving-width capturing the logarithm of the spatial bottleneck [1908.11034]. In distance-preserving graph compression, the term is not fixed as a single formal invariant, but the framework explicitly suggests width-like quantities based on how much edge or vertex mass can be contracted under a tolerance function \(\varphi(x)=x/\alpha-\beta\) [1705.04544]. This suggests that contraction width is best regarded as a family of contraction-based invariants rather than a single universally standardized parameter.

## 1. Twin-width as contraction width

In the twin-width setting, the basic object is a trigraph: a graph in which some edges are marked red. Starting from an ordinary graph \(G\) with no red edges, one repeatedly contracts pairs of vertices. If \(x_1,x_2\) are contracted into \(x_0\), then the full neighborhood of \(x_0\) is
\[
N_{G'}(x_0)=\bigl(N_G(x_1)\cup N_G(x_2)\bigr)\setminus\{x_1,x_2\},
\]
while the red neighborhood is
\[
N_{G'}^r(x_0)=\bigl(N_G^r(x_1)\cup N_G^r(x_2)\cup (N_G(x_1)\Delta N_G(x_2))\bigr)\setminus\{x_1,x_2\}.
\]
Red edges therefore record neighborhood disagreements created by contraction [2210.08620].

A contraction sequence is a sequence
\[
G=G_0,G_1,\dots,G_{n-1},
\]
where each \(G_{i+1}\) is obtained from \(G_i\) by contracting a pair of vertices and the final trigraph has one vertex. The width of such a sequence is
\[
d=\max_i\max_{v\in V(G_i)} \deg_{G_i}^r(v),
\]
that is, the maximum red degree ever attained. Twin-width is the minimum possible width:
\[
\operatorname{tww}(G)=\min\{d:\text{ there exists a }d\text{-contraction sequence of }G\}.
\]
Equivalently, \(G\) has twin-width at most \(d\) if and only if it admits a contraction sequence in which the red degree of every vertex, at every step, is at most \(d\) [2210.08620].

An equivalent formulation uses partitions and impurity graphs. For a partition \(\mathcal P\) of \(V(G)\), the quotient trigraph \(G/\mathcal P\) has one vertex per part, with an impure pair corresponding to a red edge. The width of a contraction sequence is then the maximum degree of the impurity graphs \(\mathrm{Imp}(G/\mathcal P_t)\) over all times \(t\); the twin-width of \(G\) is the minimum such width [2206.08248]. In this sense, “contraction width” in the twin-width literature is exactly the maximal local irregularity generated during iterative merging.

## 2. Explicit contraction-width bounds in graph classes

A major line of work studies explicit bounded-width contraction sequences for concrete graph classes. For planar graphs, the twin-width is at most \(8\), and a witnessing contraction sequence can be found in linear time [2210.08620]. The same paper also proves explicit upper bounds of \(6\) for simple bipartite planar graphs, \(16\) for simple 1-planar graphs, \(63\) for the square of any bipartite planar graph, and \(38\) for map graphs, all via a recursive decomposition based on skeletal trigraphs, BFS trees, wrapped faces, and level-respecting contractions [2210.08620].

For graphs embeddable in a surface of Euler genus \(g\), the twin-width is at most
\[
6\cdot \max\{3\sqrt{47g}+1,2^{24}\}=18\sqrt{47g}+O(1),
\]
and the proof yields a quadratic-time algorithm to construct a corresponding contraction sequence [2307.05811]. The same work gives a lower bound of
\[
\sqrt{\frac{3g}{2}-O(g^{3/8})},
\]
so the dependence on \(g\) is asymptotically \(\Theta(\sqrt g)\) [2307.05811].

For posets, the paper on width-bounded posets defines a natural twin-width directly on red posets and proves that a poset of width \(d\) has natural twin-width at most \(9d-6\), hence symmetric twin-width at most \(9d-5\); the corresponding contraction sequence can be constructed in time \(\mathcal O(dn^2)\) [2106.15337]. This is asymptotically tight up to constants, since there exists a poset of width \(d\) whose natural twin-width is at least \(d-1\) [2106.15337]. In the special case of width \(2\), the worst-case value is exactly \(2\), and a width-\(2\) contraction sequence can be computed in linear time [2106.15337].

Bounded VC-dimension yields sub-linear contraction width. For graphs with VC-dimension at most \(k\), the twin-width is
\[
O\!\left(n^{1-\frac{1}{2k+1}}\right),
\]
obtained by partitioning the vertex set into blocks whose members have similar neighborhoods toward later blocks [2606.21640]. Interval graphs admit a sharper upper bound \(\operatorname{tww}(G)\in O(\sqrt n)\), while there also exist \(n\)-vertex interval graphs with twin-width at least
\[
\left(\frac{n+2}{12}\right)^{1/4}-1
\]
[2606.21640].

## 3. Variants of contraction width and relations to other width parameters

The contraction-sequence viewpoint supports several refinements of twin-width. Component twin-width measures the maximum size of a red-connected component; total twin-width measures the number of red edges; total vertex twin-width measures the number of vertices incident to a red edge [2509.05122]. These variants admit unexpectedly tight comparisons with clique-width parameters:
\[
\mathbf{cw}(G)\le \mathbf{ctww}(G)+1 \le 2\,\mathbf{cw}(G),
\]
and
\[
\mathbf{lcw}(G)-1 \le \mathbf{tvtww}(G)\le \mathbf{lcw}(G),
\]
while total twin-width satisfies
\[
\mathbf{lcw}(G)-1 \le 2\,\mathbf{ttww}(G)\le \mathbf{lcw}(G)\bigl(\mathbf{lcw}(G)+1\bigr)
\]
[2509.05122]. A separate synthesis through contraction sequences shows that component twin-width is functionally equivalent to rank-width, and total twin-width is functionally equivalent to linear rank-width [2111.00282].

These relations clarify that the width measured along a contraction sequence can be tuned to recover older decomposition paradigms. In sparse regimes, this becomes particularly sharp. If a graph class excludes \(K_{t,t}\) and has twin-width at most \(2\), then its tree-width is bounded by a polynomial in \(t\), more precisely by \(O(t^{20})\) [2307.01732]. Conversely, there is a \(K_{2,2}\)-free graph class of twin-width \(3\) and unbounded tree-width, showing that the twin-width-\(2\) threshold is structurally special [2307.01732].

The “lens of contraction sequences” perspective also introduces oriented twin-width, where newly created red edges are oriented away from the contracted vertex and only the red out-degree is bounded. Although this looks weaker, bounded oriented twin-width and bounded twin-width coincide as graph classes [2111.00282]. The same paper defines spanning twin-width and shows that, for monotone classes, bounded spanning twin-width is equivalent to being proper minor-closed [2111.00282].

## 4. Logical and algorithmic significance of bounded contraction width

Bounded contraction width is algorithmically meaningful only when a witnessing sequence is available. For graphs of bounded twin-width, given a \(d\)-contraction sequence, FO model checking is fixed-parameter tractable in the formula size and runs in time
\[
f(d,|\phi|)\cdot |D|,
\]
where \(f\) is computable and \(D\) is the domain of the input binary structure [2004.14789]. The same framework is preserved under FO interpretations and transductions, including operations such as squaring and complementation [2004.14789].

A more refined local-type methodology shows that bounded contraction width supports much stronger data-structural consequences. For a fixed FO formula \(\varphi(x_1,\ldots,x_k)\) and fixed width bound \(d\), one can, from a graph \(G\) together with a contraction sequence of width at most \(d\), build in \(O(n)\) time a data structure answering tuple queries in \(O(\log\log n)\) time; with \(O(n^{1+\varepsilon})\)-time preprocessing, the query time can be reduced to \(O(1/\varepsilon)\) [2206.08248]. After \(O(n)\)-time preprocessing, one can also enumerate all satisfying tuples with \(O(1)\) delay [2206.08248]. The same local-type machinery yields the VC-density bound that, for a graph \(G\) of twin-width \(d\), a subset \(A\subseteq V(G)\), and an FO formula \(\varphi(x_1,\ldots,x_k,y_1,\ldots,y_l)\), the number of subsets of \(A^k\) definable by \(\varphi\) using \(l\)-tuples of parameters is \(O(|A|^l)\) [2206.08248].

On the algorithmic side of computing contraction sequences, the feedback-edge-number parameterization gives concrete positive results. If \(k=\operatorname{fen}(G)\), then deciding whether \(G\) has twin-width at most \(2\) admits a linear bikernel, and a corresponding 2-contraction sequence can be computed in time
\[
2^{O(k\log k)}+n^{O(1)}
\]
[2310.08243]. More generally, there is an algorithm running in time \(f(k)\cdot n^{O(1)}\) that outputs a contraction sequence of width at most \(\operatorname{tww}(G)+1\) [2310.08243]. The same paper also proves that every graph with feedback edge number \(\ell\ge 1\) has twin-width at most \(1+\ell\) [2310.08243].

## 5. Tensor-network contraction width

In tensor-network algorithms, contraction width is formalized through contraction trees rather than red-degree sequences. A tensor network is modeled as an undirected weighted graph \(G=(V,E,w)\), and a contraction ordering is represented by a rooted or free contraction tree whose leaves correspond to tensors and whose arcs and internal nodes are labeled by cuts of the original graph [1908.11034].

For a contraction tree \(T\), the paper defines the spatial and temporal bottlenecks. If an arc \(a\) induces a bipartition \((X_a,\overline{X}_a)\), its weight is
\[
w(a)=w(X_a,\overline{X}_a),
\]
which is the size of the corresponding intermediate tensor. The space bottleneck is
\[
B_{\mathrm{s}}(T)=\max_a w(a).
\]
If an internal node \(n\) induces a tripartition \((X_n,Y_n,\overline{X_nY_n})\), then
\[
w(n)=w(X_n,Y_n,\overline{X_nY_n}),
\]
and the time bottleneck is
\[
B_{\mathrm{t}}(T)=\max_n w(n).
\]
The total time is
\[
C_{\mathrm{t}}(T)=\sum_n w(n)
\]
[1908.11034].

In this setting, contraction width is best understood as these bottleneck quantities, especially \(B_{\mathrm{s}}(G)\) and \(B_{\mathrm{t}}(G)\). The paper proves
\[
B_{\mathrm{s}}(G)\le B_{\mathrm{t}}(G)\le (B_{\mathrm{s}}(G))^{1.5},
\]
and identifies carving-width as the logarithm of the spatial bottleneck:
\[
\operatorname{carw}(G)=\log B_{\mathrm{s}}(G)
\]
[1908.11034]. For planar tensor networks, the Ratcatcher algorithm of Seymour and Thomas computes carving-width, and the resulting contraction trees provide a practical heuristic for controlling both memory and time in exact contraction [1908.11034].

## 6. Distance-preserving contractions and adjacent contraction-centered notions

A different notion arises in metric compression. Given an edge-weighted graph \(G=(V,E)\) with positive lengths and a tolerance function \(\varphi\), a set of edges \(C\subseteq E\) is a strong \(\varphi\)-distance-preserving contraction if
\[
\mathrm{dist}_{\ell_C}(u,v)\ge \varphi(\mathrm{dist}_\ell(u,v))
\qquad\text{for all }u,v\in V,
\]
where \(\ell_C\) sets contracted edges to length \(0\) [1705.04544]. For affine tolerances
\[
\varphi(x)=\frac{x}{\alpha}-\beta,\qquad \alpha\ge 1,\ \beta\ge 0,
\]
the framework studies how much a graph can be compressed subject to multiplicative and additive distortion [1705.04544].

The paper explicitly remarks that it does not use the term “contraction width,” but it naturally suggests width-like parameters such as edge-contraction width
\[
\mathrm{cw}_E^{(\alpha,\beta)}(G):=\max\{\Phi(C): C\subseteq E \text{ is an }(\alpha,\beta)\text{-contraction}\},
\]
vertex-contraction width
\[
\mathrm{cw}_V^{(\alpha,\beta)}(G):=\min\{n(G/C): C \text{ is an }(\alpha,\beta)\text{-contraction}\},
\]
and tolerance width for a target compressed size [1705.04544]. In this metric setting, contraction width quantifies compressibility under distortion rather than red-degree irregularity. The paper gives linear-time greedy algorithms for paths and cycles with unit lengths, dynamic programming for strong contractions on trees in \(O(n^3)\) time and for weak contractions in \(O(n^5)\) time, as well as NP-hardness and inapproximability results on more general graph classes [1705.04544].

Adjacent literature uses contraction as an algorithmic mechanism even when no standalone “contraction width” parameter is defined. A contraction-recursive treewidth algorithm interleaves an exact treewidth routine with recursive calls on edge contractions \(G/e\), and may return a minimal contraction \(H\) of \(G\) such that \(\operatorname{tw}(H)>k\) as a certificate [2307.01318]. By contrast, clique-width behaves badly under unrestricted edge contraction: graphs of clique-width at most \(3\) can yield, after edge contractions, graphs of unbounded clique-width; however, contractions of edges incident with a degree-2 vertex preserve bounded clique-width up to the bound \(2^{k+1}-1\) when the original graph has clique-width \(k\) [1306.6168]. These neighboring results reinforce a general lesson: contraction is a pervasive operation across graph theory and algorithms, but the width quantity it induces depends sharply on what structural information is preserved and on which contractions are allowed.

Source: https://www.emergentmind.com/topics/contraction-width