Abstract
The graph isomorphism problem looks deceptively simple, but although polynomial-time algorithms exist for certain types of graphs such as planar graphs and graphs with bounded degree or eigenvalue multiplicity, its complexity class is still unknown. Information about potential isomorphisms between two graphs is contained in the eigenvalues and eigenvectors of their adjacency matrices. However, symmetries of graphs often lead to repeated eigenvalues, so that associated eigenvectors are determined only up to basis rotations, which complicates graph isomorphism testing. We consider orthogonal and doubly stochastic relaxations of the graph isomorphism problem, analyze the geometric properties of the resulting solution spaces, and show that their complexity increases significantly if repeated eigenvalues exist. By restricting the search space to suitable subspaces, we derive an efficient Frank–Wolfe based continuous optimization approach for detecting isomorphisms. We illustrate the efficacy of the algorithm with the aid of various highly symmetric graphs.
1. Introduction
Graphs and networks play a central role in many applications ranging from computer science, engineering, chemistry, and biology to the social sciences. Determining whether or not two graphs are isomorphic, i.e., have exactly the same structure, is called the graph isomorphism problem [1–3]. It has been shown that the problem can be solved in polynomial time if the graphs are planar [4] or have bounded degree [5] or eigenvalue multiplicity [6]. Furthermore, Babai recently proved that the graph isomorphism problem is solvable in quasi-polynomial time [7] and summarizes its current status in [3] as ‘not expected to be NP-complete, yet not known to be solvable in polynomial time.’ A historical perspective and a concise overview of different techniques for solving the graph isomorphism problem can be found in [8].
It is well-known that spectral properties of graphs contain crucial information about potential isomorphisms. If the graphs have distinct eigenvalues, then checking whether a permutation exists that transforms the eigenvectors of one graph into the eigenvectors of the other graph is already sufficient. Repeated eigenvalues, however, complicate graph isomorphism testing since the eigenvectors are then only determined up to basis rotations and it is not possible anymore to directly compare their entries. The graph isomorphism problem can be regarded as a combinatorial optimization problem, which requires minimizing a cost function over the set of all permutation matrices. Different relaxations of the graph isomorphism problem have been proposed in the past, where the set of permutation matrices is either replaced by the set of orthogonal [9–11] or doubly stochastic [12–15] matrices. The applicability of such relaxations, however, is not well understood [13]. It has been shown in [13] that the convex relaxation is guaranteed to find the exact isomorphism, provided that the graphs are asymmetric and friendly. This has been generalized to asymmetric graphs with unfriendly eigenvectors that have certain sparsity patterns in [14]. The convex relaxation is called convex exact if it does not admit any additional solutions. For which types of symmetries the relaxation is (and in general is not) exact was analyzed in [15]. We extend these results and consider in particular potentially highly symmetric graphs. We first show how repeated eigenvalues increase the set of feasible solutions of the orthogonal and convex relaxations of the graph isomorphism problem, analyze the geometric properties of these spaces, and then propose an efficient algorithm for detecting graph isomorphisms using a concave reformulation of the relaxed optimization problem that penalizes non-binary matrices. Numerical results for a set of guiding examples and benchmark problems illustrate the efficacy of the proposed algorithm. A method that is similar in spirit is described in [12], where a convex–concave relaxation along with a path following approach is used to solve graph matching and quadratic assignment problems. It was recently shown in [16] that if the signal-to-noise ratio is sufficiently large, then the semidefinite relaxations of these problems are exact and recover the true solutions. We focus on the graph isomorphism problem, which allows us to exploit additional information encoded in the null spaces of associated matrices, and construct a direct approach to solve the resulting relaxed optimization problems.
2. The graph isomorphism problem
Let |$ A $| and |$ B $| be the adjacency matrices of two weighted undirected graphs
and
, respectively, where
and
are the sets of vertices and
and
the sets of edges. We assume that
, i.e., the graphs share the same vertices. Our goal is to check if the two graphs are isomorphic.
Let |$ \mathcal{S}(n) $| denote the symmetric group of degree |$ n $| and |$ \mathcal{P}(n) $| the set of all |$ n \times n $| permutation matrices. The graphs
and
are called isomorphic if one of the two equivalent conditions is satisfied:
- There exists a permutation |$ \pi \in \mathcal{S}(n), $| such thatwhich preserves the edge weights.

- There exists a permutation matrix |$ P \in \mathcal{P}(n), $| such thator, equivalently, |$ P \, A = B \, P $|.$$ \begin{align*}& A = P^\top B \, P \end{align*} $$
Given the permutation |$ \pi $|, we can construct the permutation matrix |$ P $| and vice versa using
If
and
are isomorphic, we write
and define

to be the set of all isomorphisms. An isomorphism from a graph
to itself is called an automorphism and the set of automorphisms forms a group under composition (or matrix multiplication), which we will denote by
. Graphs with nontrivial automorphism groups are called symmetric. Examples of highly symmetric graphs are shown in Fig. 1, see also Example 4.18.

(a) Highly symmetric Petersen graph
with
. (b) A strongly regular graph
with |$ 10 $| vertices. Are the two graphs isomorphic?
We can formulate the graph isomorphism problem as an optimization problem of the form
where |$ \left \lVert \cdot \right \rVert _{F} $| denotes the Frobenius norm, so that
if and only if |$ c_{\mathcal{P}}^{} = 0 $|. The solution of the optimization problem, however, is in general not unique if the graphs have symmetries. Since
minimizing the Frobenius norm in (1) is equivalent to maximizing the trace of |$ A^\top \, P^\top \, B \, P $|, which illustrates that the graph isomorphism problem or, more generally, the graph matching problem is closely related to the quadratic assignment problem [17, 18]. In what follows, we will analyze different relaxations of the graph isomorphism problem.
3. Orthogonal relaxation
Let |$ I_{n} $| be the |$ n \times n $| identity matrix and let
denote the set of all orthogonal matrices, which forms a nonlinear disconnected manifold (since |$ \det (Q) = \pm 1 $|). Instead of solving the combinatorial optimization problem (1), we now consider the relaxed problem
which is also known as the two-sided orthogonal Procrustes problem [19, 20].
If |$ \lambda _{A}^{(k)} $| is a distinct eigenvalue, then |$ U_{A}^{(k)} $| is the associated eigenvector. If, on the other hand, |$ \lambda _{A}^{(k)} $| is a repeated eigenvalue, then the columns of |$ U_{A}^{(k)} $| form an orthogonal basis of the corresponding eigenspace. Repeated eigenvalues can be caused by symmetries of the graph. Assume that |$ \big (\lambda _{A}^{(k)}, u_{A}^{(k)}\big ) $| is an eigenvalue–eigenvector pair and let
, i.e., |$ P \, A = A \, P $|, then
and |$ P \, u_{A}^{(k)} $| is also an eigenvector associated with |$ \lambda _{A}^{(k)} $|. If these two eigenvectors are linearly independent, this implies that the eigenspace is at least two-dimensional. The larger the automorphism group, the higher the likelihood that the associated permuted eigenvectors are linearly independent. It was shown in [21, 22] that if all eigenvalues of a graph are distinct, then every non-trivial automorphism has order |$ 2 $|. Nevertheless, repeated eigenvalues are not necessarily related to symmetries. The graph in Fig. 2(a), for example, is asymmetric but has repeated eigenvalues. Since it is in practice difficult to determine the size of the automorphism group, a related property called friendliness, which can be verified easily, was proposed in [13].

(a) Asymmetric unfriendly regular graph with repeated eigenvalues. (b) Asymmetric unfriendly regular Frucht graph with distinct eigenvalues.
An eigenvector |$ u_{A}^{(k)} $| is called friendly if
, where
denotes the vector of all ones. Correspondingly, a graph
(or its adjacency matrix |$ A $|) is called friendly if all eigenvalues |$ \lambda _{A}^{(k)} $| are distinct and all eigenvectors are friendly.
Every friendly graph is automatically asymmetric as shown in [13]. The other direction, however, is not true. The Frucht graph [23] illustrated in Fig. 2(b), for instance, is asymmetric but not friendly, see also [14]. In fact, any asymmetric regular graph will be highly unfriendly since
is an eigenvector and the remaining |$ n-1 $| eigenvectors are orthogonal to it. In [11], we defined a stronger property, which can sometimes be used to disambiguate the signs of unfriendly eigenvectors.
We define an eigenvector |$ u_{A}^{(k)} $| to be ambiguous if there exists |$ P \in \mathcal{P}(n) $| with |$ u_{A}^{(k)} = -P u_{A}^{(k)} $|, i.e., |$ u_{A}^{(k)} $| and |$ -u_{A}^{(k)} $| share the same entries. If all eigenvalues |$ \lambda _{A}^{(k)} $| are distinct and none of the associated eigenvectors are ambiguous, we call the graph
unambiguous.
This definition allows us to assign a canonical sign to unambiguous eigenvectors. An ambiguous eigenvector is automatically unfriendly since
, which implies
. The vector |$ u_{A}^{(k)} = [1, -2, 0, 1]^\top $|, for instance, is unfriendly but not ambiguous.
We call two symmetric matrices |$ A $| and |$ B $| and hence also the induced graphs
and
isospectral if |$ \lambda _{A} = \lambda _{B} $| and |$ \mu _{A} = \mu _{B} $|.
That is, isospectral graphs have the same eigenvalues and also their multiplicities are identical. Isomorphic graphs are clearly isospectral.
Note that we did not explicitly use the orthogonality of the matrices |$ R^{(k)} $|, which is only required so that |$ Q^{*}(R) $| remains orthogonal. A similar proof can be found in [24]. For a more detailed discussion of the equivariance properties of self-adjoint matrices, see also [25].
We have to distinguish between different cases:
- Assume that all eigenvalues of |$ A $| and |$ B $| are distinct, then |$ m = n $| andi.e., there exist |$ 2^{n} $| orthogonal matrices |$ Q^{*}(R) $| that minimize the relaxed cost function. This is the special case typically considered in the literature, see, e.g., [9, 19].$$ \begin{align*}& R = \begin{bmatrix} \pm 1 \\ & \ddots \\ & & \pm 1 \end{bmatrix}, \end{align*} $$
A simple way to check whether two graphs are potentially isomorphic is to first solve the orthogonal Procrustes problem (2). If |$ c_{\mathcal{O}}^{}> 0 $|, the graphs cannot be isomorphic. However, if |$ c_{\mathcal{O}}^{} = 0 $|, this only implies that the graphs are isospectral (since |$ A $| and |$ B $| are in this case similar) but not necessarily isomorphic (i.e., |$ c_{\mathcal{P}}^{} $| might still be greater than zero). The graph isomorphism problem can thus be reformulated as: does the set of feasible solutions |$ Q^{*}(R) $| contain at least one permutation matrix? Finding such a matrix, assuming the graphs are isomorphic, is a difficult nonlinear optimization problem. One potential way to obtain a valid solution of the graph isomorphism problem is to penalize orthogonal matrices that are not permutation matrices. This approach was used in [10] to solve the graph matching problem.
4. Doubly stochastic relaxation
We will now consider a different relaxation of the graph isomorphism problem. Let

be the set of doubly stochastic matrices, which is the convex hull of the set of all permutation matrices |$ \mathcal{P}(n) $|. This is also known as Birkhoff’s theorem [26]. The doubly stochastic relaxation of the graph isomorphism problem is given by
We again have the property that the graphs cannot be isomorphic if |$ c_{\mathcal{D}}^{}> 0 $|.
4.1 Solutions of the relaxed problem
The convex relaxation of the problem admits additional solutions as the following lemma shows.
. Let
, then any convex combination of the form It is important to note here that all convex combinations of isomorphisms are solutions of the relaxed problem, but not all doubly stochastic matrices that minimize (3) are automatically convex combinations of isomorphisms as the following example shows.
As mentioned above, the automorphism group of the Frucht graph contains only the identity matrix, but
is a solution of the relaxed problem. We will see that there is in fact an entire |$ 11 $|-dimensional affine subspace of feasible doubly stochastic solutions. |$\qquad\qquad\qquad\qquad\qquad \triangle $|
This is related to the aforementioned friendliness property, but most of the eigenvectors are in this case not ambiguous, so that we can eliminate spurious solutions as we will show below.
4.2 Vectorization of the problem
We now rewrite the optimization problem (3) as
using the cyclic property of the trace and the fact that |$ A $| and |$ B $| are symmetric. Note that here the first term and last term are not independent of |$ X $| as they are for the orthogonal relaxation since in general |$ X^\top X \ne I_{n} \ne X \, X^\top $|.
If |$ A $| is symmetric, we have |$ \operatorname{tr}(A \, X^\top B \, X) = x^\top (A \otimes B) \, x $|. The row and column sum constraints can be reformulated as |$ C \, x = d $|, with

and
, where |$ e_{i} \in{\mathbb{R}}^{n} $| denotes the |$ i $|th unit vector. This defines a |$ (2 \, n - 1) $|-dimensional affine subspace.
This is a convex but in general not strictly convex optimization problem. In particular, all matrices |$ X $| defined in Lemma 4.1 are optimal solutions.
It holds that:
The matrix |$ H $| is symmetric and positive semi-definite.
- Let |$ \lambda _{A}^{(i)} $| and |$ \lambda _{B}^{(j)} $| be eigenvalues of |$ A $| and |$ B $|, respectively, and |$ u_{A}^{(i, \alpha )} $| and |$ u_{B}^{(j, \beta )} $| associated eigenvectors, where |$ 1 \le \alpha \le \mu _{A}^{(i)} $| and |$ 1 \le \beta \le \mu _{B}^{(j)} $|, thenis an eigenvalue of |$ H $| and the corresponding eigenvector is given by$$ \begin{align*}& \lambda_{H}^{(i,j)} = \big(\lambda_{A}^{(i)} - \lambda_{B}^{(j)} \big)^{2} \end{align*} $$$$ \begin{align*}& u_{H}^{(i,\alpha,j,\beta)} = u_{A}^{(i,\alpha)} \otimes u_{B}^{(j,\beta)}. \end{align*} $$
- All three terms of |$ H $| are Kronecker products of symmetric matrices and thus also symmetric and so is their sum. The matrix |$ H $| is positive semi-definite sincefor all |$ x $|. Alternatively, this also follows from (ii).$$ \begin{align*}& x^\top H x = \left\lVert X \, A - B \, X \right\rVert_{F}^{2} \ge 0 \end{align*} $$
- We haveThat is, all eigenvalues of |$ H $| are non-negative.$$ \begin{align*} H \, u_{H}^{(i,\alpha,j,\beta)} &= \big( A \otimes I_{n} - I_{n} \otimes B\big)^{2} \big(u_{A}^{(i,\alpha)} \otimes u_{B}^{(j,\beta)}\big) \\ &= \big( A \otimes I_{n} - I_{n} \otimes B \big) \big(\lambda_{A}^{(i)} \, u_{A}^{(i,\alpha)} \otimes u_{B}^{(j,\beta)} - \lambda_{B}^{(j)} \, u_{A}^{(i,\alpha)} \otimes u_{B}^{(j,\beta)} \big) \\ &= \big(\lambda_{A}^{(i)} - \lambda_{B}^{(j)}\big) \, \big( A \otimes I_{n} - I_{n} \otimes B \big) \big( u_{A}^{(i,\alpha)} \otimes u_{B}^{(j,\beta)}\big) \\ &= \big(\lambda_{A}^{(i)} - \lambda_{B}^{(j)}\big)^{2} \, \big( u_{A}^{(i,\alpha)} \otimes u_{B}^{(j,\beta)}\big) \\ &= \lambda_{H}^{(i,j)} \, u_{H}^{(i,\alpha,j,\beta)}. \end{align*} $$
4.3 Isospectral graphs
If |$ A $| and |$ B $| are isospectral, Theorem 4.6 immediately implies that the rank of |$ H $| is at most |$ n (n-1) $| since at least |$ n $| of the eigenvalues of |$ H $| are zero. If the matrices are isospectral and also have repeated eigenvalues, the rank will be accordingly lower.
For each |$ \lambda _{A}^{(k)} = \lambda _{B}^{(k)} $| there are |$ \mu _{A}^{(k)} = \mu _{B}^{(k)} $| linearly independent eigenvectors and hence |$ \big (\mu _{A}^{(k)}\big )^{2} $| possible combinations for which the associated eigenvalues of |$ H $| are zero. The corresponding eigenvectors span the null space of |$ H $|. The result then follows from the rank–nullity theorem.

It holds that |$ x^\top H \, x = 0 $| if and only if |$ H \, x = 0 $|.

and 
We can now interpret the relaxed graph isomorphism problem (3) as follows: Find a stochastic matrix |$ X, $| so that its vectorization |$ x $| is contained in the null space of |$ H $|. This also shows that if the graphs have repeated eigenvalues, the search space is much larger since the dimension of the null space increases as shown in Corollary 4.7.
The structure of the solutions is, as expected, similar to the one obtained for the orthogonal relaxation considered in Section 3. So far, we have not taken the constraint that |$ X $| must be doubly stochastic into account. Let

where |$ w_{A}^{(k)}, w_{B}^{(k)} \in{\mathbb{R}}^{\mu _{A}^{(k)}} $|, then this requirement translates to

Condition (5) is closely related to the definition of friendliness, which requires that all entries of |$ w_{A} $| and |$ w_{B} $| are nonzero and that |$ S $| is a diagonal matrix. Additionally, solutions have to be non-negative, i.e.,
Matrices that satisfy (5) but not (6) are sometimes called pseudo-stochastic. Since |$ S $| is a block-diagonal matrix, we can decompose (5) into |$ m $| separate equations. This results in
If |$ S^{(k)} $| is an orthogonal matrix, then these equations are trivially satisfied (see also Section 3), but there are in general additional solutions. This is in particular the case if |$ w_{A}^{(k)} = w_{B}^{(k)} = 0 $|.
Let |$ A $| and |$ B $| be isospectral and friendly. Then, the relaxed problem (3) has at most one solution with |$ c_{\mathcal{D}}^{} = 0 $|.
Since |$ A $| and |$ B $| are by definition friendly, all eigenvalues are distinct, which implies that |$ S^{(k)} \in{\mathbb{R}} $| for all |$ k $|, and all |$ w_{A}^{(k)} $| and |$ w_{B}^{(k)} $| are non-zero. Thus, (7) can only be satisfied if |$ S^{(k)} = \pm 1 $| and the signs of |$ S^{(k)} $| are uniquely determined by (5). The equations have no solution if |$ \big | w_{A}^{(k)} \big | \ne \big | w_{B}^{(k)} \big | $| for at least one |$ k $|.
If the unique optimal solution is a permutation matrix, then
. A similar result was also shown in [13]. Geometrically, this means that the affine subspace given by the constraints |$ C \, x = d $| and the null space of |$ H $| intersect in exactly one point |$ x \ge 0 $|.
If |$ A $| and |$ B $| are isospectral but not friendly, then the intersection of the affine subspace defined by |$ C \, x = d $| and the null space of |$ H $| might again form an affine subspace. Let |$ x_{s} $| be one solution of the augmented inhomogeneous system of linear equations
since the dimension of the intersection of the two (affine) subspaces must be lower than the sum of their dimensions.
Let us consider the square graphs shown in Fig. 3. Depending on the edge weights, we obtain different types of symmetries, which are also reflected in the spectral properties of the graphs.
There are no symmetries and the automorphism group is trivial. All eigenvalues are distinct and all eigenvectors are friendly. We can easily determine the signs of the diagonal entries of |$ S $|. Assume, for instance, that |$ w_{A} = [0.1, 0.3, -0.5, -1.9]^\top $| and |$ w_{B} = [-0.1, 0.3, 0.5, -1.9]^\top $|, then |$ S = \operatorname{diag}(-1, 1, -1, 1) $| using (7). The null space of the augmented matrix contains only the zero vector and the solution is unique.
There are two automorphisms due to the reflection symmetry. The eigenvalues are distinct, but now only the first and third eigenvectors are friendly. Assume that |$ w_{A} = [2, 0, 0.2, 0]^\top $| and |$ w_{B} = [-2, 0, 0.2, 0]^\top $|, then we have |$ S = \operatorname{diag}(-1, \pm 1, 1, \pm 1) $|. However, only two combinations result in permutation matrices, the other two satisfy (5) but contain negative entries.
There now exist four automorphisms, but the eigenvalues are still distinct. Only the first eigenvector is friendly. Four of the eight possible combinations for |$ S $| result in permutations.
Due to the |$ D_{4} $| symmetry, there exist eight automorphisms. The eigenvalue |$ \lambda _{A}^{(2)} = 0 $| has multiplicity |$ \mu _{A}^{(2)} = 2 $|. Now we cannot simply determine the sign structure of the matrix |$ S $| anymore since the block |$ S^{(2)} $| is a |$ 2 \times 2 $| matrix. |$\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad\qquad \triangle $|

Isomorphic square graphs
(top) and
(bottom) with different edge weights and symmetries. The dotted red lines represent reflection symmetries.
This illustrates again how symmetries and repeated eigenvalues complicate graph isomorphism testing since the solution space increases.
We have seen in Example 4.2 that there exists an 11-dimensional affine subspace of solutions due to the 11 unfriendly eigenvectors. However, only one of the eigenvectors of the Frucht graphs is ambiguous, so that we can still determine all but one of the signs of the diagonal matrix |$ S $|. In the remaining one-dimensional space of feasible solutions, there exists just one non-negative matrix, which is the permutation matrix that solves the graph isomorphism problem. |$\qquad\qquad\qquad\qquad\qquad\triangle $|
By exploiting additional properties of the eigenvectors, we can in this case eliminate spurious solutions and obtain again a unique solution.
4.4 Penalizing non-binary matrices
The question now is how we can penalize doubly stochastic matrices that are not permutation matrices. We use Lemma 4.9 to turn the cost function into a constraint and optimize a different function instead.
. That is, |$ 1 \le x^\top x \le n $| and minimizing |$ -x^\top x $| will force the solver to favour permutation matrices.A similar penalty term was used in the convex-to-concave projection approach in [15]. Since
is an eigenvector of any regular graph
, the matrix
is of the form |$ X^{*}(S) $|, where only the entry |$ S_{11} $| is nonzero. This solution does not contain any useful information about potential isomorphisms.
4.5 Frank–Wolfe algorithm
In order to solve the optimization problem defined in Lemma 4.15, we use the Frank–Wolfe algorithm [27, 28], which for a constrained convex optimization problem of the form
defined on a convex set |$ \mathcal{C} $| consists of the following two steps:
- Given a feasible initial condition |$ x^{(k)} \in \mathcal{C} $|, compute an optimal solution |$ y^{*} $| of the linear problem$$ \begin{align*}& \min_{y \in \mathcal{C}} \big\langle y, \nabla f(x^{(k)}) \big\rangle. \end{align*} $$
- Define |$ x^{(k+1)} $| to be a convex combination of |$ x^{(k)} $| and |$ y^{*} $|, i.e.,where |$ 0 \le \gamma \le 1 $| is chosen so that |$ f\big (x^{(k+1)}\big ) $| is minimized.$$ \begin{align*}& x^{(k+1)} = (1 - \gamma) \, x^{(k)} + \gamma \, y^{*}, \end{align*} $$
The cost function |$ f(x) = -x^\top x $| we seek to minimize is not convex but strictly concave and the global minima are permutation matrices. Since we are just interested in showing that at least one permutation matrix exists that solves the graph isomorphism problem, the non-uniqueness of the optimal global solution is not a problem. The gradient of the cost function is simply |$ \nabla f(x) = -2 \, x $| and, ignoring the constant factor 2, in each iteration of the Frank–Wolfe algorithm, we solve
to obtain a new solution |$ x^{(k+1)} $| as described above, where |$ x^{(0)} $| is the solution of the relaxed problem defined in Lemma 4.5 (if no solutions exist, then
). Since |$ x^{(k)} $| and |$ y^{*} $| are feasible solutions, the convex combination |$ x^{(k+1)} $| also satisfies the constraints. That is, the Frank–Wolfe algorithm is guaranteed to compute a doubly stochastic matrix whose vectorization is contained in the null space of |$ H $|.
For illustration purposes, we consider again the simple square graphs shown in Fig. 3(b). In Example 4.14, we have seen that any convex combination of the optimal permutation matrices is also an optimal solution of the relaxed problem. Depending on the convex combination, the Frank–Wolfe algorithm converges to different solutions as shown in Fig. 4(a). Similarly, for the graphs shown in Fig. 3(c), any convex combination of the four optimal permutation matrices is an optimal solution of the relaxed problem. Depending on the initial condition, the Frank–Wolfe algorithm again converges after just one iteration to one of the four permutation matrices. This is shown in Fig. 4(b–c). |$\qquad\qquad\qquad \triangle $|

(a) Cost function for the graphs in Fig. 3(b) for different initial conditions. The two minima are the permutation matrices |$ P_{1} $| and |$ P_{2} $|. The solver always converges to |$ P_{1} $| (blue line) or |$ P_{2} $| (red line) after just one iteration. (b) Cost function for the graphs in Fig. 3(c) for different convex combinations of the four optimal permutation matrices. The tetrahedron represents the parametrization of the convex set of solutions. The vertices are the permutation matrices and the minima of the cost function. All values are between |$ -4 $| (blue) and |$ -1 $| (red). (c) Convergence of the Frank–Wolfe algorithm to one of the four optimal solutions.
The results illustrate that the new cost function penalizes doubly stochastic matrices that are not permutation matrices and forces the Frank–Wolfe solver into the vertices of the convex set.
, i.e., all entries are the same and we cannot extract any information about potential isomorphisms yet. However, after just one iteration of the Frank–Wolfe algorithm, we obtain the permutation Even for highly symmetric graphs the Frank–Wolfe algorithm is able to find one of the global minima of the cost function. In general, the solver will not converge after just one iteration. For the Frucht graph, for instance, see Example 4.2, the algorithm converges after two iterations, although the solution is in this case uniquely defined.
5. Numerical results
In this section, we will present numerical results for two challenging highly symmetric graphs.
5.1 Paley graph
We first consider the Paley graph [29] of size |$ n = 29 $| shown in Fig. 5(a), whose automorphism group contains |$ 406 $| permutations, see [30] for a detailed description of the automorphism groups of Paley graphs. The eigenvalues of the graph are |$ \lambda _{A} = \left [14, \frac{1}{2}\sqrt{29} - \frac{1}{2}, -\frac{1}{2}\sqrt{29} - \frac{1}{2}\right ] $| with multiplicities |$ \mu _{A} = [1, 14, 14] $|. That is, |$ \operatorname{rank}(H) = 448 $|, whereas |$ n^{2} = 841 $|. Despite the many symmetries, the Frank–Wolfe solver quickly converges to a permutation matrix as shown in Fig. 5(b–e). The number of iterations depends on the random permutation we choose to generate
.

(a) Strongly regular Paley graph
. The graph
is a random permutation of
. (b–e) Convergence of the Frank–Wolfe solver to a permutation matrix. The initial matrix |$ X^{(0)} $| is constant. The cost function first decreases only slowly, but then quickly converges to the optimal value. The matrix |$ X^{(3)} $| is a valid solution of the graph isomorphism problem.
5.2 Biggs–Smith graph
The automorphism group of the Biggs–Smith graph [32] of size |$ n = 102 $|, see Fig. 6(a), contains 2448 elements. The adjacency matrix |$ A $| is shown in Fig. 6(b) and its spectrum in Fig. 6(c). The multiplicities of the eigenvalues are |$ \mu _{A} = [1, 9, 18, 16, 17, 16, 9, 16] $|, which implies that |$ \operatorname{rank}(H) = 8860 $|. The Frank–Wolfe solver converges after just one iteration to a permutation matrix as shown in Fig. 6(d–e).
![(a) Visualization of the Biggs–Smith graph using the layout from [31]. The graph is again defined to be a random permutation of . (b) Adjacency matrix $ A $. (c) Spectrum of $ A $. (d–e) Convergence of the Frank–Wolfe solver to a permutation matrix after just one step. The initial matrix $ X^{(0)} $ is again constant.](https://oup.silverchair-cdn.com/oup/backfile/Content_public/Journal/imaiai/14/2/10.1093_imaiai_iaaf011/7/m_iaaf011f6.jpeg?Expires=2147483647&Signature=Sv~2RhOGXm-u8y83xPicU3s6cmllC2Ht4WlgoAwYCuELtvi8Zbz~1ViDVj-1csJ6xIfMAK7ukCKWIeLTcg8hGQgFoh006O1k4Zuj7vlTVHS8l1x6-T5YpOU~ZyNUP-Bp8Akyx5OJDYLM4qQ4BnFE4QRv1GBGHNBTynVGQcS5yRm0YdjxQpGWk1Xq3Sr7wDc-Vl3xFH0NQYRYVBSmj1pKgULUAkpF8sME~A8TtSwzAWxBpNVHSVeGLOW~1fgrOgoZTCiwRaEPjZX~Ya2RysLh~sv~gTz9~6tVFi382wTEMW0JXVoF01XoNoelCWs6SfgaN8tP9mNyWrzWxYiI6-jzJw__&Key-Pair-Id=APKAIE5G5CRDK6RD3PGA)
(a) Visualization of the Biggs–Smith graph
using the layout from [31]. The graph
is again defined to be a random permutation of
. (b) Adjacency matrix |$ A $|. (c) Spectrum of |$ A $|. (d–e) Convergence of the Frank–Wolfe solver to a permutation matrix after just one step. The initial matrix |$ X^{(0)} $| is again constant.
6. Conclusion
The main advantage of the proposed approach is that the graph isomorphism problem is turned into a continuous optimization problem, which in general tend to be easier to solve than combinatorial optimization problems. Although orthogonal and doubly stochastic relaxations have been considered before, we extended these techniques to strongly regular graphs and showed how symmetries and repeated eigenvalues increase the dimensions of the spaces of feasible solutions. We believe that continuous relaxations will not only open new avenues for deriving efficient numerical algorithms for the graph isomorphism problem, but also for gaining insights into the geometric properties of the sets of feasible solutions and the inherent symmetries of graphs.
Although the Frank–Wolfe solver typically converges within a few iterations, the algorithm sometimes gets stuck in local minima, which are often convex combinations of just a few optimal permutation matrices. We also implemented SQP-based solvers, but they suffer from the same problem. Small random perturbations of the initial condition in a feasible direction seem to alleviate this problem. Also using different (i.e., more aggressive) penalty functions, adding barrier functions or continuation methods might help avoid local minima. A detailed analysis of the convergence properties and improved search-direction strategies are beyond the scope of this paper and will be considered in future work.
Further open problems include: How sensitive is the algorithm with respect to numerical errors and is it possible to develop sparse solvers? What is the worst-time complexity of the algorithm and for which types of graphs is the problem guaranteed to be solvable in polynomial time? Can we exploit properties of the orthogonal and convex relaxations at the same time? Another interesting question is whether this approach can be extended to the graph matching problem by including not only the vectors contained in the null space of |$ H $|. The derived optimization problem formulation might also be amenable to quantum annealers, provided that the constrained problem can be rewritten as a quadratic unconstrained binary optimization problem.
Acknowledgements
We would like to thank the reviewers for the helpful comments and suggestions.
Funding
QuantERA II programme funded by the European Union’s Horizon 2020 research and innovation programme (Grant Agreement No. 101017733 to P.G.).
Data availability
The Matlab code and examples that support the findings presented in this paper are available at https://github.com/sklus/FrankWolfeGI.
Footnotes
The set |$ \mathcal{O}\big (\mu _{A}^{(k)}\big ) $| is a compact Lie group of dimension |$ \frac{\mu _{A}^{(k)} \big (\mu _{A}^{(k)} - 1\big )}{2} $|.
The tensor product or outer product of two vectors |$ u, v \in{\mathbb{R}}^{n} $| is defined by |$ u \boxtimes v = u \, v^\top $|. Note that |$ u \boxtimes v \in R^{n \times n} $|, whereas |$ u \otimes v \in{\mathbb{R}}^{n^{2}} $|. We have |$ u \otimes v = \mathrm{vec}(v \boxtimes u) $|.
Note that
.