Isomorphism Testing Parameterized by Genus and Beyond

We give an isomorphism test for graphs of Euler genus $g$ running in time $2^{O(g^4 \log g)}n^{O(1)}$. Our algorithm provides the first explicit upper bound on the dependence on $g$ for an fpt isomorphism test parameterized by the Euler genus of the input graphs. The only previous fpt algorithm runs in time $f(g)n$ for some function $f$ (Kawarabayashi 2015). Actually, our algorithm even works when the input graphs only exclude $K_{3,h}$ as a minor. For such graphs, no fpt isomorphism test was known before. The algorithm builds on an elegant combination of simple group-theoretic, combinatorial, and graph-theoretic approaches. In particular, we introduce $(t,k)$-WL-bounded graphs which provide a powerful tool to combine group-theoretic techniques with the standard Weisfeiler-Leman algorithm. This concept may be of independent interest.


Introduction
Determining the computational complexity of the Graph Isomorphism Problem is a longstanding open question in theoretical computer science (see, e.g., [13]). The problem is easily seen to be contained in NP, but it is neither known to be in PTIME nor known to be NP-complete. In a breakthrough result, Babai [1] recently obtained a quasipolynomial-time algorithm for testing isomorphism of graphs (i.e., an algorithm running in time n O((log n) c ) where n denotes the number of vertices of the input graphs, and c is a constant), achieving the first improvement over the previous best algorithm running in time n O( √ n/ log n) [3] in over three decades. However, it remains wide open whether GI can be solved in polynomial time.
In this work, we are concerned with the parameterized complexity of isomorphism testing. While polynomial-time isomorphism tests are known for a large variety of restricted graph classes (see, e.g., [4,7,9,11,18,24]), for several important structural parameters such as maximum degree or the Hadwiger number 1 , it is still unknown whether isomorphism testing is fixed-parameter tractable (i.e., whether there is an isomorphism algorithm running in time f (k)n O (1) where k denotes the graph parameter in question, n the number of vertices of the 1 The Hadwiger number of a graph G is the maximum number h such that K h is a minor of G.
input graphs, and f is some function). On the other hand, there has also been significant progress in recent years. In 2015, Lokshtanov et al. [17] obtained the first fpt isomorphism test parameterized by the tree-width k of the input graph running in time 2 O(k 5 log k) n 5 . This algorithm was later improved by Grohe et al. [8] to a running time of 2 O(k·(log k) c ) n 3 (for some constant c). In the same year, Kawarabayashi [14] obtained the first fpt isomorphism test parameterized by the Euler genus g of the input graph running time f (g)n for some function f . While Kawarabayashi's algorithm achieves optimal dependence on the number of vertices of the input graphs, it is also extremely complicated and it provides no explicit upper bound on the function f . Indeed, the algorithm spans over multiple papers [14,15,16] and builds on several deep structural results for graphs of bounded genus.
In this work, we present an alternative isomorphism test for graphs of Euler genus g running in time 2 O(g 4 log g) n O (1) . In contrast to Kawarabayashi's algorithm, our algorithm does not require any deep graph-theoretic insights, but rather builds on an elegant combination of well-established and simple group-theoretic, combinatorial, and graph-theoretic ideas. In particular, this enables us to provide the first explicit upper bound on the dependence on g for an fpt isomorphism test. Actually, the only property our algorithm exploits is that graphs of genus g exclude K 3,h as a minor for h ≥ 4g + 3 [25]. In other words, our main result is an fpt isomorphism test for graphs excluding K 3,h as a minor. For this class of graphs, the best existing algorithm runs in time n O((log h) c ) for some constant c [21], and no fpt isomorphism test was known prior to this work.
For the algorithm, we combine different approaches to the Graph Isomorphism Problem. On a high-level, our algorithm follows a simple decomposition strategy which decomposes the input graph G into pieces such that the interplay between the pieces is simple. The main idea is to define the pieces in such a way that, after fixing a small number of vertices, the automorphism group of G restricted to a piece D ⊆ V (G) is similar to the automorphism group of a graph of maximum degree 3. This allows us to test isomorphism between the pieces using the group-theoretic graph isomorphism machinery dating back to Luks's polynomial-time isomorphism test for graphs of bounded maximum degree [18].
In order to capture the restrictions on the automorphism group, we introduce the notion of (t, k)-WL-bounded graphs which generalize so-called t-CR-bounded graphs. The class of t-CRbounded graphs was originally defined by Ponomarenko [23] and was recently rediscovered in [21,10,22] in a series of works eventually leading to an algorithm testing isomorphism of graphs excluding K h as a topological subgraph in time n O((log h) c ) . Intuitively speaking, a graph G is t-CR-bounded if an initially uniform vertex-coloring χ can be turned into a discrete coloring (i.e., a coloring where every vertex has its own color) by repeatedly (a) applying the standard Color Refinement algorithm, and (b) splitting all color classes of size at most t. We define (t, k)-WL-bounded graphs in the same way, but replace the Color Refinement algorithm by the well-known Weisfeiler-Leman algorithm of dimension k (see, e.g., [5,12]). Maybe surprisingly, this natural extension of t-CR-bounded has not been considered so far in the literature, and we start by building a polynomial-time isomorphism test for such graphs using the group-theoretic methods developed by Luks [18] as well as a simple extension due to Miller [20]. Actually, it turns out that isomorphism of (t, k)-WL-bounded graphs can even be tested in time n O(k·(log t) c ) using recent extensions [21] of Babai's quasipolynomial-time isomorphism test. However, since we only apply these methods for t = k = 2, there is no need for our algorithm to rely on such sophisticated subroutines. Now, as the main structural insight, we prove that each 3-connected graph G that excludes K 3,h as a minor admits (after fixing 3 vertices) an isomorphism-invariant rooted tree decomposition (T, β) such that the adhesion width (i.e., the maximal intersection between two bags) is bounded by h. Additionally, each bag β(t), t ∈ V (T ), can be equipped with a set γ(t) ⊆ β(t) of size |γ(t)| ≤ h 4 such that, after fixing all vertices in γ(t), G restricted to β(t) is (2, 2)-WL-bounded. Given such a decomposition, isomorphisms can be computed by a simple bottom-up dynamic programming strategy along the tree decompositions. For each bag, isomorphism is tested by first individualizing all vertices from γ(t) at an additional factor of |γ(t)|! = 2 O(h 4 log h) in the running time. Following the individualization of these vertices, our algorithm can then simply rely on a polynomial-time isomorphism test for (2, 2)-WL-bounded graphs. Here, we incorporate the partial solutions computed in the subtree below the current bag via a simple gadget construction.
To compute the decomposition (T, β), we also build on the notion of (2, 2)-WL-bounded graphs. Given a set X ⊆ V (G), we define the (2, 2)-closure to be the set D = cl G 2,2 (X) of all vertices appearing in a singleton color class after artificially individualizing all vertices from X, and performing the (2, 2)-WL procedure. As one of the main technical contributions, we can show that the interplay between D and its complement in G is simple (assuming G excludes K 3,h as a minor). To be more precise, building on various properties of the 2-dimensional Weisfeiler-Leman algorithm, we show that |N G (Z)| < h for every connected component Z of G − D. This allows us to choose D = cl G 2,2 (X) as the root bag of (T, β) for some carefully chosen set X, and obtain the decomposition (T, β) by recursion.

Graphs
A graph is a pair G = (V (G), E(G)) consisting of a vertex set V (G) and an edge set E(G). All graphs considered in this paper are finite and simple (i.e., they contain no loops or multiple edges). Moreover, unless explicitly stated otherwise, all graphs are undirected. For an undirected graph G and v, w ∈ V (G), we write vw as a shorthand for {v, w} ∈ E(G).
If the graph G is clear from context, we usually omit the index and simply write N (v), deg(v) and N (X). We write K ℓ,h to denote the complete bipartite graph on ℓ vertices on the left side and h vertices on the right side. For two sets denotes the graph with vertex set A ∪ B and edge set E G (A, B).
denotes the induced subgraph on A, and G − A the subgraph induced by the complement of A, that is, the graph we also define G − F to be the graph obtained from G by removing all edges contained in F (the vertex set remains Isomorphism Testing Parameterized by Genus and Beyond from G to H. Also, Iso(G, H) denotes the set of all isomorphisms from G to H. The automorphism group of G is Aut(G) := Iso(G, G). Observe that, if Iso(G, H) ̸ = ∅, it holds that Iso(G, H) = Aut(G)φ := {γφ | γ ∈ Aut(G)} for every isomorphism φ ∈ Iso(G, H).
A vertex-colored graph is a tuple (G, χ V ) where G is a graph and χ V : V (G) → C is a mapping into some set C of colors, called vertex-coloring. Similarly, an arc-colored graph is a tuple (G, χ E ), where G is a graph and χ E : {(u, v) | {u, v} ∈ E(G)} → C is a mapping into some color set C, called arc-coloring. Observe that colors are assigned to directed edges, i.e., the directed edge (v, w) may obtain a different color than (w, v). We also consider vertexand arc-colored graphs (G, χ V , χ E ) where χ V is a vertex-coloring and χ E is an arc-coloring. Typically, C is chosen to be an initial segment [n] := {1, . . . , n} of the natural numbers. To be more precise, we generally assume that there is a linear order on the set of all potential colors which, for example, allows us to identify a minimal color appearing in a graph in a unique way. Isomorphisms between vertex-and arc-colored graphs have to respect the colors of the vertices and arcs.

Weisfeiler-Leman Algorithm
The Weisfeiler-Leman algorithm, originally introduced by Weisfeiler and Leman in its 2dimensional version [28], forms one of the most fundamental subroutines in the context of isomorphism testing.
Let χ 1 , χ 2 : V k → C be colorings of k-tuples, where C is a finite set of colors. We say χ 1 refines We describe the k-dimensional Weisfeiler-Leman algorithm (k-WL) for all k ≥ 1. For an input graph G let χ k (0) [G] : (V (G)) k → C be the coloring where each tuple is colored with the isomorphism type of its underlying ordered subgraph. More precisely, If the graph is equipped with a coloring the initial coloring χ k (0) [G] also takes the input coloring into account. More precisely, for a vertex-coloring χ V , it additionally holds that . And for an arc-coloring χ E , it is the case that . We then recursively define the coloring χ k (i) [G] obtained after i rounds of the algorithm.
is the tuple obtained fromv by replacing the i-th entry by w (and {{. . . }} denotes a multiset). For k = 1 the definition is similar, but we only iterate over neighbors of v, i.e., is the k-stable coloring of G. The k-dimensional Weisfeiler-Leman algorithm takes as input a (vertex-or arc-)colored graph G and returns (a coloring that is equivalent to) χ k WL [G]. This can be implemented in time O(n k+1 log n) (see [12]).

Group Theory
We introduce the group-theoretic notions required in this work. We refer to [26,6] for further background.
Permutation groups. A permutation group acting on a set Ω is a subgroup Γ ≤ Sym(Ω) of the symmetric group. The size of the permutation domain Ω is called the degree of Γ. If Ω = [n], then we also write S n instead of Sym(Ω). For γ ∈ Γ and α ∈ Ω we denote by α γ the image of α under the permutation γ.
For A ⊆ Ω and a bijection θ : Ω → Ω ′ we denote by θ Groups with restricted composition factors. We shall be interested in a particular subclass of permutation groups, namely groups with restricted composition factors. Let Γ be a group.
. The length of the series is k and the groups Γ i−1 /Γ i are the factor groups of the series, i ∈ [k]. A composition series is a strictly decreasing subnormal series of maximal length. For every finite group Γ all composition series have the same family (considered as a multiset) of factor groups (cf. [26]). A composition factor of a finite group Γ is a factor group of a composition series of Γ.
Let us point out the fact that there are two similar classes of groups usually referred by Γ d in the literature. The first is the class denoted by Γ d here originally introduced by Luks [18], while the second one, for example used in [2], in particular allows composition factors that are simple groups of Lie type of bounded dimension.

Group-Theoretic Tools for Isomorphism Testing.
In this work, the central group-theoretic subroutine is an isomorphism test for hypergraphs where the input group is a Γ d -group. Two denotes the power set of V 1 ). We write φ : H 1 ∼ = H 2 to denote that φ is an isomorphism from H 1 to H 2 . Consistent with previous notation, we denote by Iso(H 1 , H 2 ) the set of isomorphisms from H 1 to H 2 . More generally, for Γ ≤ Sym(V 1 ) and a bijection θ : In this work, we define the Hypergraph Isomorphism Problem to take as input two hypergraphs H 1 = (V 1 , E 1 ) and H 2 = (V 2 , E 2 ), a group Γ ≤ Sym(V 1 ) and a bijection θ : V 1 → V 2 , and the goal is to compute a representation 2 of Iso Γθ (H 1 , H 2 ). The following algorithm forms a crucial subroutine.

72:6
Isomorphism Testing Parameterized by Genus and Beyond ▶ Theorem 3 (Miller [20]). Let H 1 = (V 1 , E 1 ) and H 2 = (V 2 , E 2 ) be two hypergraphs and let Γ ≤ Sym(V 1 ) be a Γ d -group and θ : Observe that both algorithms given by the two theorems tackle the same problem. The second algorithm is asymptotically much faster, but it is also much more complicated and the constant factors in the exponent of the running time are likely to be much higher. Since this paper only applies either theorem for d = 2, it seems to be preferable to use the first algorithm. Indeed, the first result is a simple extension of Luks's well-known isomorphism test for bounded-degree graphs [18], and thus the underlying algorithm is fairly simple. For all these reasons, we mostly build on Theorem 3. However, for future applications of the techniques presented in this work, it might be necessary to build on Theorem 4 to benefit from the improved run time bound. For this reason, we shall provide variants of our results building on Theorem 4 wherever appropriate.

Allowing Weisfeiler and Leman to Split Small Color Classes
In this section, we introduce the concept of (t, k)-WL-bounded graphs and provide a polynomial-time isomorphism test for such graphs for all constant values of t and k. The final fpt isomorphism test for graphs excluding K 3,h as a minor builds on this subroutine for The concept of (t, k)-WL-bounded graphs is a natural extension of t-CR-bounded graphs which were already introduced by Ponomarenko in the late 1980's [23] and which were recently rediscovered in [21,10,22]. Intuitively speaking, a graph G is t-CR-bounded, t ∈ N, if an initially uniform vertex-coloring χ (i.e., all vertices receive the same color) can be turned into the discrete coloring (i.e., each vertex has its own color) by repeatedly performing the Color Refinement algorithm (expressed by the letters "CR"), and taking a color class χ | ≤ t and assigning each vertex from the class its own color.
A very natural extension of this idea to replace the Color Refinement algorithm by the Weisfeiler-Leman algorithm for some fixed dimension k. This leads us to the notion of (t, k)-WL-bounded graphs (the letters "CR" are replaced by "k-WL"). In particular, (t, 1)-WL-bounded graphs are exactly the t-CR-bounded graphs. Maybe surprisingly, it seems that this simple extension has not been considered so far in the literature.

▶ Definition 5. A vertex-and arc-colored graph
and Also, for the minimal i ∞ ≥ 0 such that χ i∞ ≡ χ i∞+1 , we refer to χ i∞ as the (t, k)-WLstable coloring of G and denote it by At this point, the reader may wonder why (χ i ) i≥0 is chosen as a sequence of vertexcolorings and not a sequence of colorings of k-tuples of vertices (since k-WL also colors k-tuples of vertices). While such a variant certainly makes sense, it still leads to the same class of graphs. Let G be a graph and let χ : In other words, one can not achieve any additional splitting of color classes by also considering non-diagonal color classes.
We also need to extend several notions related to t-CR-bounded graphs. Let G be a graph and let X ⊆ V (G) be a set of vertices. Let χ * V : V (G) → C be the vertex-coloring obtained from individualizing all vertices in the set X, i.e., We define the (t, k)-closure of the set X (with respect to G) to be the set If the input graph is equipped with a vertex-or arc-coloring, all definitions are extended in the natural way. Now, we concern ourselves with designing a polynomial-time isomorphism test for (t, k)-WL-bounded graphs. Actually, we shall prove a slightly stronger result which turns out to be useful later on. The main idea for the algorithm is to build a reduction to the isomorphism problem for (t, 1)-WL-bounded graphs for which such results are already known [23,21]. Indeed, isomorphism of (t, 1)-WL-bounded graphs can be reduced to the Hypergraph Isomorphism Problem for Γ t -groups. Since one may be interested in using different subroutines for solving the Hypergraph Isomorphism Problem for Γ t -groups (see the discussion at the end of Section 2.3), the main result is stated via an oracle for the Hypergraph Isomorphism Problem on Γ t -groups. ▶ Theorem 6. Let G 1 , G 2 be two vertex-and arc-colored graphs and let Moreover, using oracle access to the Hypergraph Isomorphism Problem for Γ t -groups, in time n O(k) one can compute a Γ t -group Γ ≤ Sym(P 1 ) and a bijection θ : P 1 → P 2 such that In particular, Aut(G 1 )[P 1 ] ∈ Γ t . ▶ Corollary 7. Let G 1 , G 2 be two (t, k)-WL-bounded graphs. Then a representation for Iso(G 1 , G 2 ) can be computed in time n O(k·(log t) c ) for some absolute constant c.

Structure Theory and Small Color Classes
Having established the necessary tools, we can now turn to the isomorphism test for graphs excluding K 3,h as a minor. We start by giving a high-level overview on the algorithm. The main idea is to build on the isomorphism test for (2, 2)-WL-bounded graphs described in the last section. Let G 1 and G 2 be two (vertex-and arc-colored) graphs that exclude K 3,h as a minor. Using well-known reduction techniques building on isomorphism-invariant decompositions into triconnected 3 components (see, e.g., [11]), we may assume without loss of generality that G 1 and G 2 are 3-connected.

72:8 Isomorphism Testing Parameterized by Genus and Beyond
The algorithm starts by individualizing three vertices. To be more precise, the algorithm picks three distinct vertices v 1 , v 2 , v 3 ∈ V (G 1 ) and iterates over all choices of potential images w 1 , w 2 , w 3 ∈ V (G 2 ) under some isomorphism between G 1 and G 2 . Let X 1 := {v 1 , v 2 , v 3 } and X 2 := {w 1 , w 2 , w 3 }. Also, let D i := cl Gi 2,2 (X i ) denote the (2, 2)-closure of X i , i ∈ {1, 2}. Observe that D i is defined in an isomorphism-invariant manner given the initial choice of X i . Building on Theorems 3 and 6 it can be checked in polynomial time whether G 1 and G 2 are isomorphic restricted to the sets D 1 and D 2 . Now, the central idea is to follow a decomposition strategy. Let Z i 1 , . . . , Z i ℓ denote the vertex sets of the connected components of G i − D i , and let S i j := N Gi (Z i j ) for j ∈ [ℓ] and i ∈ {1, 2}. We recursively compute isomorphisms between all pairs of graphs G i [Z i j ∪ S i j ] for all j ∈ [ℓ] and i ∈ {1, 2}. To be able to determine whether all these partial isomorphisms can be combined into a global isomorphism, the crucial insight is that |S i j | < h for all j ∈ [ℓ] and i ∈ {1, 2}.
▶ Lemma 8. Let G be a graph that excludes K 3,h as a minor. Also let X ⊆ V (G) and define Indeed, this lemma forms one of the main technical contributions of the paper. I remark that similar statements are exploited in [10,21,22] eventually leading to an isomorphism test running in time n O((log h) c ) for all graphs excluding K h as a topological subgraph. However, all these variants require the (t, k)-closure to be taken for non-constant values of t (i.e., t = Ω(h)). For the design of an fpt-algorithm, this is infeasible since we can only afford to apply Theorem 6 for constant values of t and k (since D i might be equal to V (G i )).
The lemma above implies that the interplay between D i and V (G i ) \ D i is simple which allows for a dynamic programming approach. To be more precise, we can recursively list all elements of the set Iso( In order to realize this recursive strategy, it remains to ensure that the algorithm makes progress when performing a recursive call. Actually, this turns out to be a non-trivial task. Indeed, it may happen that To circumvent this problem, the idea is to compute an isomorphism-invariant extension γ(X i ) ⊋ X i such that |γ(X i )| ≤ h 4 . Assuming such an extension can be computed, we simply extend the set X i until the algorithm arrives in a situation where the recursive scheme discussed above makes progress. Observe that this is guaranteed to happen as soon as |X i | ≥ h building on Lemma 8. Also note that we can still artificially individualize all vertices from X i at a cost of 2 O(h 4 log h) (since any isomorphism can only map vertices from X 1 to vertices from X 2 ).
To compute the extension, we exploit the fact that G i is (h − 1, 1)-WL-bounded by [21, Corollary 24] (after individualizing 3 vertices). Simply speaking, for every choice of three distinct vertices in X i , after individualizing these vertices and performing the 1-dimensional Weisfeiler-Leman algorithm, we can identify a color class of size at most h − 1 to be added to the set X i . Overall, assuming |X i | ≤ h, this gives an extension γ(X i ) of size at most This completes the description of the general strategy. In the following sections, we provide more detailed arguments. We first provide a sketch on the proof of Lemma 8 in the next section. Afterwards, we compute the entire decompositions of the input graphs in Section 6. Finally, the dynamic programming strategy along the computed decompositions is implemented in Section 7.

Finding Disjoint and Connected Subgraphs
In this section, we give some details on the proof of Lemma 8. Let us start by introducing some additional notation for the 2-dimensional Weisfeiler-Leman algorithm. Let G be a graph and let χ := χ 2 WL [G] be the coloring computed by the 2-dimensional Weisfeiler-Leman algorithm. We denote by The next lemma builds the main technical step in the proof of Lemma 8.

Proof Idea. Let F be a spanning tree of G[[χ]] and fix an arbitrary root node
First, suppose that δ = 1. Then G[V d , V c ] is isomorphic to a disjoint union of ℓ stars K 1,h , for some ℓ ≥ 3 and h ≥ 2. In this situation, it is possible to contract the connected components of G[V d , V c ] to single vertices, and proceed by induction. At this point, we crucially exploit that using the 2-dimensional Weisfeiler-Leman algorithm allows us to show that all color classes in the contracted graph still have size at least 3 (such a statement is not true when using the Color Refinement algorithm). By induction, we obtain graphs If there are at least 3 twinclasses, then it is again possible to contract the twin-classes to single vertices and proceed by induction. Here, the crucial observation is that the c-twin-classes are non-trivial since The critical case occurs if there are exactly 2 twin-classes meaning that G[V d , V c ] is isomorphic to a disjoint union of 2 copies of K 2,h , for some h ≥ 3 (in this case |V c | = 4). Now, the basic idea is to ensure that v 1 , v 2 , v 3 cover both connected components (which means there are vertices w 1 , w 2 , w 3 as above). However, this additional requirement comes with severe additional complications. First, information of this type needs to be propagated up the tree (i.e., vertices in the root color class may already need to be chosen appropriately to avoid problematic situations later on). But much more problematically, each child of c may add a different restriction which all need to be met at the same time. Here, we again crucially rely on the 2-dimensional Weisfeiler-Leman algorithm to show that all requirements can indeed be met at the same time. Unfortunately, this comes at the price that each vertex of V d has to be contained in one of the graphs H r , r ∈ {1, 2, 3} (this allows us to choose different triples (v 1 , v 2 , v 3 ) for different children of d).
To ensure that H r remains connected, we introduce a second type of restriction that is passed down the tree, and which ensures that all vertices from V d , which are added to H r , end up in the same connected component of H r . By carefully implementing the induction, it can be shown that all these additional requirements can indeed by realized.  The lemma essentially follows from [21,Lemma 23]. For the sake of completeness and due to its simplicity, a complete proof is still given below.
Proof. Let χ be a 1-stable coloring such that |[v] χ | = 1 for all v ∈ D and |[w] χ | ≥ h for all w ∈ V (G)\D. Suppose towards a contradiction that |N G (Z)| ≥ 3, and pick v 1 , v 2 , v 3 ∈ N G (Z) to be distinct vertices. Let C := {χ(v) | v ∈ Z}, and define H to be the graph with V (H) := C and Let T be a spanning tree of H. Also, for each i ∈ {1, 2, 3}, fix a color c i ∈ C such that Let T ′ be the induced subtree obtained from T by repeatedly removing all leaves distinct from c 1 , c 2 , c 3 . Finally, let T ′′ be the tree obtained from T ′ by adding three fresh vertices v 1 , v 2 , v 3 where v i is connected to c i . Observe that v 1 , v 2 , v 3 are precisely the leaves of T ′′ . Now, T ′′ contains a unique node c of degree three (possibly c = c i for some i ∈ {1, 2, 3}). Observe that |χ −1 (c)| ≥ h. We define C i to be the set of all internal vertices which appear on the unique path from v i to c in the tree T ′′ . Finally, define Since χ is 1-stable and |[v i ] χ | = 1 we get that G[U i ] is connected for all i ∈ {1, 2, 3}. Also, E G (U i , {w}) ̸ = ∅ for all w ∈ χ −1 (c) and i ∈ {1, 2, 3}. But this provides a minor isomorphic to K 3,h with vertices U 1 , U 2 , U 3 on the left side and the vertices from χ −1 (c) on the right side. ◀

A Decomposition Theorem
Next, we use the insights gained in the last section to prove a decomposition theorem for graphs that exclude K 3,h as a minor. In the following, all tree decompositions are rooted, i.e., there is a designated root node and we generally assume all edges to be directed away from the root.  Proof. We give an inductive construction for the tree decomposition (T, β) as well as the function γ and the coloring λ. We start by arguing how to compute the set γ(r).
▷ Claim 12. Let v 1 , v 2 , v 3 ∈ S be three distinct vertices, and define χ : and which is minimal with respect to the linear order on the colors in the image of Clearly, γ(r) is defined in an isomorphism-invariant manner given (G, S, h). Moreover, Finally, define β(r) := cl G 2,2 (γ(r)). Let Z 1 , . . . , Z ℓ be the connected components of G − β(r). Also, let S i := N G (Z i ) and G i be the graph obtained from We wish to apply the induction hypothesis to the triples (G i , S i , h). If |V (G i )| = |V (G)| then ℓ = 1 and S ⊊ S i . In this case the algorithm still makes progress since the size of S can be increased at most h − 3 times.
By the induction hypothesis, there are tree decompositions (T i , β i ) of G i and functions γ i : V (T i ) → 2 V (Gi) satisfying Properties I -VII. We define (T, β) to be the tree decomposition where T is obtained from the disjoint union of T 1 , . . . , T ℓ by adding a fresh root vertex r which is connected to the root vertices of T 1 , . . . , T ℓ . Also, β(r) is defined as above and β(t) := β i (t) for all t ∈ V (T i ) and i ∈ [ℓ]. Finally, γ(r) is again defined as above, and The algorithm clearly runs in polynomial time and the output is isomorphism-invariant (the coloring λ is defined below). We need to verify that Properties I -VII are satisfied. Using the comments above and the induction hypothesis, it is easy to verify that Properties II, IV, V and VI are satisfied.
For Property VII it suffices to ensure that cl (Gi,λ) 2,2 (γ(t)) ⊆ cl (G,λ) 2,2 (γ(t)). Towards this end, it suffices to ensure that λ(v) ̸ = λ(w) for all v ∈ β(r) and w ∈ V (G) \ β(r). To ensure this property holds on all levels of the tree, we can simply define λ(v) Next, we modify the tree decomposition in order to ensure Property III. Consider a node t ∈ V (T ) with children t 1 , . . . , t ℓ . We say that t i ∼ t j if β(t) ∩ β(t i ) = β(t) ∩ β(t j ). Let A 1 , . . . , A k be the equivalence classes of the equivalence relation ∼. For every i ∈ [k] we introduce a fresh node s i . Now, every t j ∈ A i becomes a child of s i and s i becomes a child of t. Finally, we set β(s i ) = γ(s i ) := β(t) ∩ β(t j ) for some t j ∈ A i . Observe that after this modification, Properties II and IV -VII still hold.
Finally, it remains to verify Property I. Before the modification described in the last paragraph, we have that |V (T )| ≤ |V (G)|. Since the modification process at most doubles the number of nodes in T , the bound follows. ◀

An FPT Isomorphism Test for Graphs of Small Genus
Building on the decomposition theorem given in the last section, we can now prove the main result of this paper.
▶ Theorem 13. Let G 1 , G 2 be two (vertex-and arc-colored) graphs that exclude K 3,h as a minor. Then one can decide whether G 1 is isomorphic to 2}. Using standard reduction techniques (see, e.g., [11]) we may assume without loss generality that G 1 and G 2 are 3connected. Pick an arbitrary set S 1 ⊆ V (G 1 ) such that |S 1 | = 3 and G 1 −S 1 is connected. For every S 2 ⊆ V (G 2 ) such that |S 2 | = 3 and G 2 − S 2 is connected, the algorithm tests whether there is an isomorphism φ : , 2} since G 1 and G 2 are 3-connected. This implies that the triple (G i , S i , h) satisfies the requirements of Theorem 11. Let (T i , β i ) be the tree decomposition, γ i : V (T i ) → 2 V (Gi) be the function, and λ i be the vertex-coloring computed by Theorem 11 on input (G i , S i , h). Now, the basic idea is compute isomorphisms between (G 1 , S 1 ) and (G 2 , S 2 ) using dynamic programming along the tree decompositions. More precisely, we aim at recursively computing the set (here, Iso((G 1 , λ 1 , S 1 ), (G 2 , λ 1 , S 2 )) denotes the set of isomorphisms φ : G 1 ∼ = G 2 which additionally respect the vertex-colorings λ i and satisfy S φ 1 = S 2 ). Throughout the recursive algorithm, we maintain the property that |S i | ≤ h. Also, we may assume without loss of generality that Let r i denote the root node of T i . Let ℓ denote the number of children of r i in the tree T i (if the number of children is not the same, the algorithm concludes that j denote the set of vertices appearing in bags below (and including) t i j . Also let S i j := β i (r i ) ∩ β i (t i j ) be the adhesion set to the j-th child, and define For every i, i ′ ∈ {1, 2}, and every j, j ′ ∈ [ℓ], the algorithm recursively computes the set We argue how to compute the set Λ. Building on Theorem 11, Item III, we may assume that (a) S i j ̸ = S i j ′ for all distinct j, j ′ ∈ [ℓ] and i ∈ {1, 2}, or (b) β(r i ) = S i j for all j ∈ [ℓ] and i ∈ {1, 2} (if r 1 and r 2 do not satisfy the same option, then Iso((G 1 , λ 1 , S 1 ), (G 2 , λ 1 , S 2 )) = ∅).
It is well-known that the latter can be checked in polynomial time. This completes the description of the algorithm in case Option b is satisfied.
Next, suppose Option a is satisfied. Here, the central idea is to construct auxiliary vertexand arc-colored graphs Towards this end, we set Also, we set The main idea is to use the additional vertices attached to the set S i j to encode the isomorphism type of the graph (G i j , λ i j , S i j ). This information is encoded by the vertex-and arc-coloring building on sets Λ i,i ′ j,j ′ already computed above. Let S : Observe that ∼ is an equivalence relation. Let {P 1 , . . . , P k } be the partition of S into the equivalence classes. We set for all q ∈ [k], S i j ∈ P q , and γ ∈ Λ i,i j,j . For every q ∈ [k] fix some i(q) ∈ {1, 2} and j(q) ∈ [ℓ] such that S i(q) j(q) ∈ P q (i.e., for each equivalence class, the algorithm fixes one representative). Also, for every q ∈ [k] and S i j ∈ P q , fix a bijection σ i j ∈ Λ for all vw ∈ E(G i ). Next, consider an edge ]. Towards this end, the algorithm iterates through all bijections τ : γ 1 (r 1 ) → γ 2 (r 2 ), and wishes to test whether there is an isomorphism , it now suffices to solve this latter problem.
So fix a bijection τ : γ 1 (r 1 ) → γ 2 (r 2 ) (if |γ 1 (r 1 )| ̸ = |γ 2 (r 2 )| then the algorithm returns . Intuitively speaking, µ * 1 and µ * 2 are obtained from µ 1 V and µ 2 V by individualizing all vertices from γ 1 (r 1 ) and γ r (r 2 ) according to the bijection τ . Now, we can apply Theorem 6 on input graph H * 1 = (H 1 , µ * 1 ) and H * 2 = (H 2 , µ * 2 ), and parameters t = k := 2. Building on Property 1, we obtain a Γ 2 -group Γ ≤ Sym(A 1 ) and a bijection θ : A 1 → A 2 such that Iso(H * Overall, this completes the description of the algorithm. It only remains to analyse its running time. Let n denote the number of vertices of G 1 and G 2 . The algorithm iterates over at most n 3 choices for the initial set S 2 , and computes the decompositions (T i , β i ), the functions γ i , and the colorings λ i in polynomial time. For the dynamic programming tables, the algorithm needs to compute O(n 2 ) many Λ-sets (using Theorem 11, Item I), each of which contains at most h! = 2 O(h log h) many elements by Theorem 11, Item II. Hence, it remains to analyse the time required to compute the set Λ given the Λ i,i ′ j,j ′ -sets. For Option b, this can clearly be done in time 2 O(h log h) n O(1) . So consider Option a. The graph H i can clearly be computed in time polynomial in its size. We have that |V (H i )| = 2 O(h log h) n. Afterwards, the algorithm iterates over |γ 1 (r 1 )|! many bijections τ . By Theorem 11, Item V, we have that |γ 1 (r 1 )|! = 2 O(h 4 log h) . For each bijection, the algorithm then requires polynomial computation time by Theorems 6 and 3. Overall, this proves the bound on the running time. ◀ ▶ Remark 14. The algorithm from the last theorem can be extended in two directions. First, if one of the input graphs does not exclude K 3,h as a minor, it can modified to either correctly conclude that G 1 has a minor isomorphic to K 3,h , or to correctly decide whether G 1 is isomorphic to G 2 . Indeed, the only part of the algorithm that exploits that the input graphs do not have minor isomorphic to K 3,h is the computation of the tree decompositions (T i , β i ) from Theorem 11. In turn, this theorem only exploits forbidden minors via Lemmas 8 and 10.
An algorithm can easily detect if one of the implications of those two statements is violated, in which case it can infer the existence of a minor K 3,h .
Secondly, using standard reduction techniques (see, e.g., [19]), one can also compute a representation of the set of all isomorphisms Iso(G 1 , G 2 ) in the same time.
Since every graph of Euler genus g excludes K 3,4g+3 as a minor [25], we obtain the following corollary.

Conclusion
We presented an isomorphism test for graphs excluding K 3,h as a minor running in time 2 O(h 4 log h) n O (1) . For this, we provided a polynomial-time isomorphism algorithm for (t, k)-WL-bounded graphs and argued that graphs excluding K 3,h as a minor can be decomposed into parts that are (2, 2)-WL-bounded after individualizing a small number of vertices. Still, several questions remain open. Probably one of the most important questions in the area is whether isomorphism testing for graphs excluding K h as a minor is fixed-parameter tractable with parameter h. As graphs of bounded genus form an important subclass of graphs excluding K h as a minor, the techniques developed in this paper might also prove helpful in resolving this question.
As an intermediate step, one can also ask for an isomorphism test for graphs excluding K ℓ,h as a minor running in time f (h, ℓ)n g(ℓ) for some functions f, g. Observe that this paper provides such an algorithm for ℓ = 3. Indeed, combining ideas from [10,22] with the approach taken in this paper, it seems the only hurdle towards such an algorithm is a generalization of Lemma 9. Given a connected graph G for which |V c | ≥ ℓ for all c ∈ C V (G, χ 2 WL [G]), is it always possible to find vertex-disjoint, connected subgraphs H 1 , . . . , H ℓ ⊆ G such that V (H r ) ∩ V c ̸ = ∅ for all r ∈ [ℓ] and c ∈ C V (G, χ 2 WL [G])? As another intermediate problem, one can also consider the class G h of all graphs G for which there is a set X ⊆ V (G) of size |X| ≤ h such that G − X is planar. Is isomorphism testing fixed-parameter tractable on G h parameterized by h?