Marking Vertices to Find Graph Isomorphism Mapping Based on Continuous-Time Quantum Walk

The isomorphism problem involves judging whether two graphs are topologically the same and producing structure-preserving isomorphism mapping. It is widely used in various areas. Diverse algorithms have been proposed to solve this problem in polynomial time, with the help of quantum walks. Some of these algorithms, however, fail to find the isomorphism mapping. Moreover, most algorithms have very limited performance on regular graphs which are generally difficult to deal with due to their symmetry. We propose IsoMarking to discover an isomorphism mapping effectively, based on the quantum walk which is sensitive to topological structures. Firstly, IsoMarking marks vertices so that it can reduce the harmful influence of symmetry. Secondly, IsoMarking can ascertain whether the current candidate bijection is consistent with existing bijections and eventually obtains qualified mapping. Thirdly, our experiments on 1585 pairs of graphs demonstrate that our algorithm performs significantly better on both ordinary graphs and regular graphs.


Introduction
The problem of graph matching is finding similarities between graphs [1,2]. Exact graph matching is usually known as the graph isomorphism problem, which is judging whether two graphs are topologically the same [3]. The key to graph isomorphism is finding a structure-preserving mapping called isomorphism mapping [4].
Definition 1 (Isomorphism mapping). Given two graphs G 1 = (V 1 , E 1 ) and G 2 = (V 2 , E 2 ), an isomorphism mapping is a bijective mapping between the vertex sets of G 1 and G 2 such that for any two nodes (v i , v j ∈ V 1 ), they are adjacent in G 1 if and only if two nodes ( f (v i ), f (v j ) ∈ V 2 ) are adjacent in G 2 .
Based on Definition 1, we can see that the isomorphism mapping ( f ) is a set of many unit bijections, such as v i → f (v i ) and v j → f (v j ). To make things clear, we use isomorphism mapping or mapping to represent the whole mapping ( f ) and use unit bijection or bijection to represent a particular bijective relation between two nodes. Based on unit bijections, we can establish an isomorphism mapping and vertices but also keeps the unit bijections qualified for a correct isomorphism mapping. It achieves better accuracy and, in particular, performs better on regular graphs. Our main contributions are listed as follows: 1. We propose the idea of using vertex markings to reduce the impact of symmetry provided by regular graphs. 2. We design a delicate and practical mechanism to mark diverse vertices and implement a detailed algorithm. 3. We propose an algorithm to ascertain whether the current unit bijection is consistent with the existing ones so that the isomorphism mapping is correct. 4. We conduct experiments on 1585 pairs of graphs and discover that IsoMarking performs significantly better on both ordinary graphs and regular graphs.
The rest of paper is organized as follows. Section 2 introduces related works, including quantum walks and isomorphism algorithms based on quantum walks. Section 3 introduces IsoMarking. Firstly, we discuss the impact of symmetry that regular graphs have. Then, we introduce the basic idea of marking vertices to reduce the symmetry. Based on a delicate marking mechanism, we present the detailed algorithm and a further discussion in Section 3. In Section 4, we take a pair of pentagrams as an example and see how IsoMarking works out correct isomorphism mapping between regular graphs compared with the Intuitive Method. Experiments are conducted in Section 5 to evaluate IsoMarking and other algorithms. The paper is concluded in Section 6.

Related Works
This section discusses related works. Firstly, we introduce some information concerning quantum walks. Then, we discuss isomorphism algorithms based on quantum walks in detail.

Quantum Walks
The quantum walk is the quantum analogue of classical random walks [25]. It introduces several kinds of quantum states to represent the current walker. The walker is a superposition described by a probability distribution over basis quantum states. Analogous to the classical random walk, the quantum walk can be described by different models, including the continuous-time quantum walk (CTQW) [18] and the discrete-time quantum walk (DTQW) [19]. A CTQW introduces position states to describe the current position of walker and utilizes the continuous unitary transformation to control the state evolution. In graph G = (V, E), each position, namely, each node (v ∈ V), is represented by a column vector (|v ), which is the basis state of the quantum walk in graph G. The walker is in a superposition of basis states, and each basis state has a corresponding probability amplitude (α v (t)). The probability amplitude is a complex number, and the square of its modulus equals the probability of basis state |v , namely the probability for the walker to be at node v. Consequently, the state of CTQW |ϕ t at time t can be written as follows: Given an initial state vector |ϕ 0 , we can compute the state vector with Equation (4). We usually choose the adjacency matrix or the Laplacian matrix as the Hamiltonian matrix (H): DTQW, in contrast, introduces position states and coin states to describe the current position and the moving direction, respectively. It is assumed that the walker is on an integer axis, and that the position state at point n ∈ Z can be represented by a basis state (|n ). The moving direction can be described by two basis coin states |↑ and |↓ which represent going right and going le f t, respectively. At position n, the walker is in a superposition of |n ⊗ |↑ and |n ⊗ |↓ . Each step of DTQW is a unitary transformation that has two operations on the current state. The first operation is called the coin flip transformation which changes the state of moving directions. The second is the shift operation, and it changes the position states. If the initial state and transformations are given, the quantum walk can be performed. Similarly, the probability of a basis state comes from the probability amplitude. On graphs, DTQW is similar, although the walk is more complicated.
Quantum walks can contribute to exponential speedup and are widely used in many algorithms. They can be applied to many fast search algorithms [26][27][28]. Some simulated annealing algorithms are also based on quantum walks [29]. Likewise, quantum walks can be used in mathematics, including graph theory [30] and the element distinctness problem [31].

Isomorphism Algorithms Based on Quantum Walks
Quantum walks are very sensitive to topological structures. Therefore, the probability amplitude can reveal topological patterns and roles. Consequently, quantum walks are widely used to solve many problems, including the computation of graph similarity [32] and graph kernels [33] and the detection of symmetries [34]. Likewise, quantum walks are applied in isomorphism algorithms to promote their performance. Moreover, quantum walks make it possible to solve the problem in polynomial time.
In 2008, Douglas and Wang [20] proposed the Douglas method based on DTQW, with a complexity of O(|V| 7 ). After performing DTQW, it compares the probability amplitude sets of two graphs. Although the correctness of Douglas is not theoretically proven, experiments demonstrate that it can distinguish most non-isomorphic graphs. In fact, for most isomorphism algorithms based on quantum walks, the correctness comes from massive experiments, rather than a theoretical proof.
Likewise, David Emms proposed two algorithms [21,22] based on CTQW and DTQW, respectively. Although these two algorithms utilize different quantum walks, they have similar mechanisms. Firstly, they co-join two graphs by a layer of indicator vertices and construct an auxiliary graph. Then, two quantum walks are simulated on two graphs in parallel. The probability amplitude of indicator vertices can reflect the quantum interference between two quantum walks. The interference amplitudes between equivalent nodes in two graphs are usually close to 0; therefore, such equivalent nodes can be detected. Emms establishes unit bijections according to equivalent nodes and then obtains the isomorphism mapping. Both algorithms are polynomial-time. However, they often produce incorrect mapping between regular graphs; hence, they have very limited performance on regular graphs. Regular graphs are highly symmetric; therefore, Emms's auxiliary graph is even more symmetric. Both algorithms only consider the global structure rather than local patterns. Thus they can be confused by such equivalence between graphs.
Inspired by Douglas and Wang, Qiang proposed an enhanced approach called Qiang1 [23]. After performing CTQW on both graphs, it analyses the result and ascertains whether two graphs are isomorphic or not. Qiang1 focuses on pairs of vertices with an equal probability amplitude at some time, which can reflect the similarity between local structures. Qiang1 introduces the generalized similar vertex set and studies the similarity between graphs according to the probability amplitudes. Besides, it adds self-loops to reveal local topological information. Qiang's algorithm is accurate and fast. Its complexity is O(|V| 5 ) when the size of generalized similar vertex set is 2, and the complexity drops to O(|V| 4 ) when the size is 1. Nevertheless, it can only provide a judgement rather than an isomorphism mapping. Moreover, it may distinguish regular graphs incorrectly, and therefore, its performance on regular graphs is limited.
Qiang extended the algorithm and proposed the Intuitive Method. This method can find an isomorphism mapping between isomorphic graphs by calling Qiang1 repeatedly [24]. At each turn, the algorithm randomly chooses one node from each graph and tries to establish a unit bijection between them. For node v 1 in graph G 1 and node v 2 in G 2 , the algorithm adds two new nodes only connected to v 1 and v 2 , respectively. It generates two new graphs, where the only changed parts are the local structures of v 1 and v 2 . If v 1 and v 2 are equivalent, the topological changes are the same. With the original isomorphic graphs, the new graphs are also isomorphic. Then, the algorithm establishes a unit bijection between v 1 and v 2 , denoted as v 1 → v 2 . If the two nodes are not equivalent, the probability amplitudes will be significantly different, because the quantum walk is extremely sensitive to topological changes. Accordingly, the new graphs are not isomorphic, and the candidate unit bijection v 1 → v 2 fails. With repeated trials, unit bijections between nodes can be established one by one, and the whole isomorphism mapping is obtained eventually. This strategy works effectively on ordinary graphs, but it performs poorly on regular graphs. There are too many possible bijections because regular graphs are highly symmetric. Any unit bijection alone is suitable, but unit bijections can have conflict with each other. A simple integration of unit bijections can be problematic. Thus, the Intuitive Method often produces incorrect mappings.
Qiang further proposed another algorithm, Qiang3 [24], which can both ascertain the isomorphisms between graphs and find isomorphism mappings. It studies the differences between the probability amplitude sets of two graphs. If two probability amplitudes are the same, the corresponding nodes can establish a unit bijection. It establishes an isomorphism mapping based on such bijections. If the algorithm is not able to find an isomorphism mapping, then the two graphs are non-isomorphic. Likewise, Qiang3 adds self-loops to vertices in order to reflect the local topological information, which can reduce the impact of symmetry to some extent. Qiang3 is O(|V| 4 ) and is claimed to achieve improved performance on regular graphs, although the accuracy is still not satisfying.
In this paper, we propose an algorithm based on Qiang's algorithms. It can not only find the isomorphism mapping between graphs but also performs better on regular graphs.

IsoMarking
This section introduces IsoMarking. Firstly, we discuss the impact of symmetry to see why regular graphs are difficult for isomorphism algorithms. Then, we introduce the basic idea of marking vertices to reduce the symmetry. In the third part, we design a delicate mechanism to mark vertices, followed by a detailed algorithm. In addition, we present a further discussion concerning IsoMarking, including the computational complexity.

The Impact of Symmetry
Although the quantum walk is sensitive to topological structures, its performance suffers from the presence of symmetrical structures. Both DTQW and CTWQ rely on the probability amplitude to reveal the topological equivalence between graphs, based on which algorithms can establish unit bijections. Symmetric graphs, however, usually have many equivalent vertices that are confusing.
In regular graphs, nodes have the same number of neighbours. Therefore, regular graphs are highly symmetric and even automorphic which means the graph can be mapped onto itself by a structure-preserving permutation mapping [35]. Such strong symmetry can result in too many equivalent nodes and candidate unit bijections. Any candidate unit bijection alone is suitable because it comes from some equivalence. More unit bijections, however, can conflict with each other, because their integration as a mapping is not always structure-preserving. As a consequence, the mapping does not always qualify for an isomorphism mapping.
For instance, each pentagram in Figure 1, has five equivalent nodes. When we perform a quantum walk on both sides, the probability amplitudes are always the same, as shown in Tables 1 and 2. Consequently, any two nodes are equivalent. One node in a pentagram can establish a unit bijection with any node in another pentagram. Hence, there are 25 candidate unit bijections in total. Then we choose five unit bijections, under the condition that every node is used only once. However, such bijections still cannot make an isomorphism mapping. For instance, the output can be   Table 2. CTQW on the right pentagram.
Unfortunately, most algorithms treat graphs globally, and thus they make little effort to reduce the symmetry. Therefore, most algorithms perform poorly on regular graphs. They usually find it difficult to distinguish between regular graphs. Even though the isomorphism is correctly judged, the produced isomorphism mapping is still problematic.

Marking Vertices
The idea for coping with regular graphs and other symmetric graphs is to reduce the symmetry. Inspired by the Intuitive Method, we can add new adjacent nodes to vertices, which we call marking vertices. Different from the Intuitive Method, IsoMarking marks vertices not only to try diverse unit bijections but also to reduce the symmetry.
It is intuitive to reduce the symmetry by marking vertices. Since a regular graph is highly symmetric, there are several equivalent parts. If one part is marked by new neighbours while other parts are marked differently or not marked, these parts are no longer equivalent. Therefore, the symmetry is reduced. In addition, the quantum walk is so sensitive that only a few changes can give rise to dramatically different probability amplitudes. Therefore the influence of marking vertices on symmetry can be easily detected.
IsoMarking produces a more complicated mechanism to generate a new graph. We introduce four types of marking operations to mark more node pairs at the same time. Suppose we aim to mark node v 1 in graph G 1 = (V 1 , E 1 ) and v 2 in G 2 = (V 2 , E 2 ). Because marking is operated equivalently on both sides, we only describe the operation of each marking type on G 1 : to G 1 which are adjacent to v 1 and to one another.
The function of marking vertices is implemented in Algorithm 1. Given a graph, this function can mark, at most, four nodes using different marking types and then a new graph is returned. In Lines 3-6, node v a is marked by the first marking type, and in Line 7-10 iv b is marked by the second type. Similarly, v c and v d are marked by the third and fourth types, respectively. Vertices are marked only if they are in the graph, and thus, we can input illegal node (−1) to indicate no more marking. The computational complexity of Mark() is O(1) because each line of Algorithm 1 is O(1). Since the marking is operated equivalently on two graphs, Algorithm 1 is supposed to be called twice.
Note that we present four marking types in our paper. In fact, the number of marking types is not fixed. Intuitively, the number of marking types is related to the performance. There are some regular graphs requiring more marking types, while less marking types are sufficient sometimes. In Section 4, although IsoMarking uses four marking types, we can see that a pentagram marked by three types is no longer symmetric. Our algorithms are open to different numbers of marking types. We can easily modify our algorithms for a different number of types. 11: if v c ∈ V then 12:

Detailed Mechanism
Based on different marking types mentioned above, in this part, IsoMarking can establish unit bijections and reduce the impact of symmetry.
IsoMarking constructs isomorphism mapping based on unit bijections. At each turn, it picks up one node from each graph and tries to establish a unit bijection between picked nodes. In other words, IsoMarking checks whether the current candidate unit bijection is qualified. IsoMarking uses the first marking type to mark picked nodes and uses the other types to mark the other vertices to reduce the symmetry.
For a better understanding of the mechanism, we start with a simple case. Suppose there are two topologically equivalent nodes v i1 and v j1 in G 1 as well as two equivalent nodes v i2 and v j2 in an isomorphic graph G 2 . We aim to reduce equivalence in the same graph while preserving equivalence between graphs. We can simply mark v i1 and v i2 , and then such equivalence in the same graph no longer exists. If there are three equivalent nodes on both sides , the method is similar. We mark v i1 and v i2 in one type, mark v j1 and v j2 differently, and then, the nodes are no longer equivalent. Therefore, for more equivalent vertices, we just need more marking types to distinguish them. We introduce three marking types to reduce the symmetry. More marking types are possible, although three marking types are usually powerful enough. Sometimes they can even change the regular graph into a non-symmetric ordinary graph, as shown in Section 4.
As a result, we can mark equivalent vertices in the same graph to distinguish them and reduce the symmetry. Nevertheless, there are still two problems remaining, as follows: 1. Marking vertices can easily distinguish equivalent nodes in the same graph, but how can we find those equivalent nodes? 2. When we mark nodes in one graph, we are also supposed to mark corresponding nodes equivalently in the other graph. How can we successfully find the corresponding nodes?
For the first problem, we do not bother to find such nodes. Instead, we assume every node may have equivalent nodes in the same graph. We take all vertices into consideration and mark them in some order with their equivalent nodes in the other graph.
The answer to the second problem is crucial. Our aim is to find equivalent nodes between two graphs. Before that, however, we want to find equivalent nodes in the other graph to mark them and reduce the symmetry. There appears to be a circular reasoning. Actually, those equivalent nodes are not supposed to be the same. The key is when we mark vertices to reduce the symmetry, we only mark nodes which are already known to be equivalent. To put it another way, we use the first marking type to mark the nodes of the current candidate bijection and use the other types to mark the existing unit bijections. Given one node in a graph, it is easy to find its equivalent node in the other graph based on the known unit bijections.
From what has been discussed above, we can solve both problems. At each turn, IsoMarking chooses one node from each graph and marks them by the first marking type. Likewise, IsoMarking marks the nodes of the last three established unit bijections. Each pair of nodes is marked by one marking type. Initially, there are not enough existing unit bijections; hence, we just mark as many as possible.
Accordingly, there are usually three existing unit bijections with one candidate unit bijection marked in each new graph. The new graphs are isomorphic if and only if all the four changed parts in one graph are consistent with the corresponding parts in the other graph. The changed structures of existing bijections are already qualified for isomorphism as a whole, guaranteed by the former trial; therefore, they will never disturb the current trial unless the current bijection is not qualified. As long as the changed structure of current candidate bijection can keep two graphs isomorphic, the candidate bijection is acceptable.
The detailed algorithm of IsoMarking is presented in Algorithm 2. It depends on Qiang1() [23] to ascertain whether two graphs are isomorphic. In Line 3, IsoMarking firstly calls Qiang1() to see whether the two graphs are isomorphic, because it makes no sense to try discovering an isomorphism mapping between non-isomorphic graphs. It then tries establishing unit bijections between the nodes from the two graphs. Each time, it studies a pair of nodes and marks them with the last three bijections, as shown in Lines 9-10. If the generated graphs are isomorphic and the current nodes are not used, a new unit bijection is established in Line 13. In Lines 14-16, the last three bijections are updated when a new bijection is accepted. If there are not enough existing bijections, we use −1 to indicate no more marking when calling Mark(). (1), last2(1), last3(1)); 11: if Qiang1(G 1new , G 2new ) == True then 12: if v j is not already used in Mapping then 13:

Further Discussion
We can understand IsoMarking from another perspective. Most algorithms only establish unit bijections one after another, and simply integrate unit bijections into an isomorphism mapping. They ignore the possibility that unit bijections may conflict with each other. Conflicting unit bijections can make the mapping no longer structure-preserving, and thus, those algorithms often fail. IsoMarking marks a current candidate bijection and several existing bijections at the same time; therefore, it can figure out whether the current candidate bijection is consistent with existing ones. If there are conflicts between them, the overall isomorphism can be destructed; hence, the candidate bijection fails. Otherwise, the new graphs are still isomorphic; hence, the current candidate is consistent with existing bijections. By such methods, IsoMarking can avoid potential conflicts between unit bijections. Only unit bijections consistent with existing ones can be accepted.
By marking the existing unit bijections, IsoMarking can both reduce the symmetry and avoid conflicts between unit bijections. Such a powerful mechanism does not function independently, because it also relies on the quantum walk to capture topological changes sensitively.
IsoMarking has a satisfying computational complexity. Since the isomorphic mapping between non-isomorphic graphs is meaningless, we assume the graphs are isomorphic. Accordingly, two graphs have the same number of vertices, namely |V 1 | = |V 2 | = N. In Qiang1(), we set the size of the generalized similar vertex set to be 1, which is accurate enough, so the complexity of Qiang1() in Line 3 drops from O(N 5 ) to O(N 4 ). There is a nested loop in Lines 9-19. Therefore, the codes are executed for O(N · N) = O(N 2 ) times. In Lines 9-10, Mark() is O(1), while Qiang1() in Line 11 is O((N + 8) 4 = N 4 ). In fact, IsoMarking adds, at most, eight nodes to each graph; hence, there is little influence on complexity. Line 12 can be simply implemented by an array of Boolean variables within O(1). The rest codes are all O(1). Consequently, the overall complexity is O(1 + N 4 + N 2 · (1 + N 4 )) = O(N 6 )-the same as the Intuitive Method.

Case Study
This section compares IsoMarking with another algorithm. We chose the Intuitive Method because it is easy to understand and somewhat similar to IsoMarking. We performed both algorithms on a pair of pentagrams, as shown in Figure 1. The pentagram is a regular graph and is highly symmetric. We aimed to find an isomorphism mapping between two pentagrams.

Results of the Intuitive Method
Firstly we show how the Intuitive Method works. At each step, the Intuitive Method randomly picks one node from each graph and tries to establish a unit bijection, as discussed in Section 2.2. We assumed that it picked node a in the left and node i in the right, and then a new graph was generated, as shown in Figure 2a. Obviously, the new graphs are the same, and thus it a unit bijection (a → i) was established.
At the second step, the Intuitive Method also picks two nodes randomly and tests the isomorphism. We assumed that it chose b and l; thus it generated the graphs shown in Figure 2b. The graphs in Figure 2b are isomorphic; hence, the algorithm established another unit bijection (b → l). In fact, each step generated the same graph; therefore, the trial was always successful. After the second step, the algorithm established {a → i, b → l}. Nevertheless, those two bijections were already in conflict with each other, because i and l were adjacent while a and b were not. Consequently, whatever occurred at the following steps, it definitely failed in this case.  The generated graphs were the same, and thus b → l was established.
In fact, if we accept unit bijection a → i, only h and j qualify for a unit bijection together with b. The Intuitive Method, however, considers b to be equivalent to the other four nodes in the right pentagram. Thus, the Intuitive Method has a possibility of 0.5 to fail at the second step. Even though the algorithm, fortunately, picked h or j at the second step, it is still likely to fail at the following steps. When faced with pentagrams, the Intuitive Method only needs five steps to establish the whole mapping, because each step is a successful trial. However, it is difficult for its speedy answer to be correct.

Results of IsoMarking
As for IsoMarking, the consequence becomes different. Since there is no existing bijection at the first step, IsoMarking only marks the nodes of the current candidate bijection. It randomly picks one node from each graph and marks them, similar to the Intuitive Method. We assumed that it also chose a and i, and thus, the new graphs shown in Figure 3a were generated. Obviously, these graphs are the same and IsoMarking accepted a → i.  Suppose that IsoMarking also picks b and l at the second step, and then, it marks b and l using the first marking type and marks a and i using the second type. Obviously, the new graphs (shown in Figure 3b) are no more isomorphic; therefore, the bijection b → l fails. Because nodes of the previous bijection are marked, the symmetry is strongly reduced. We can see that marking vertices does help IsoMarking to reject b → l which conflicts with a → i.
At the third step, IsoMarking has to test some other unit bijection candidates. As long as IsoMarking chooses node b in the left, only h and j in the right are qualified. We assumed that IsoMarking picked node h at the third step, and then new graphs were generated, as shown in Figure 3c. These two graphs are isomorphic, and thus b → h is considered to beconsistent with a → i. As a result, IsoMarking has two unit bijections {a → i, b → h}.
At the fourth step, IsoMarking continues marking two existing bijections {a → i, b → h}. With two existing bijections marked, the graphs are no longer symmetric. Hence, they become ordinary graphs, and the other unit bijections can be easily revealed: {c → l, e → j, d → k}. We assumed IsoMarking chose d and k, and the new graphs are shown in Figure 3d. With isomorphic graphs, IsoMarking establishes d → k. By marking existing bijections, IsoMarking can accept those unit bijections one by one and work out a correct isomorphism mapping eventually.
Consequently, we can see the symmetry of pentagrams is strongly reduced, and unit bijections established by trials will never be in conflict with each other. The pentagram is highly symmetric, and all its nodes are equivalent to each other. However, after the third step of IsoMarking, the marking of two existing bijections is sufficient to change pentagrams into ordinary graphs. Therefore, different marking types can collaborate and become even more powerful. As a result, IsoMarking only needs, in total, three marking types when faced with pentagrams. Although IsoMarking needs more steps due to failed trials, it can obtain correct mapping eventually. In the case of pentagrams, IsoMarking can always find a correct answer while the Intuitive Method is more likely to fail.

Experiments
In this section, we conduct experiments to evaluate IsoMarking. Firstly, we introduce information concerning the experimental setup. Then, we compare our algorithm with state-of-the-art algorithms on both ordinary graphs and regular graphs. Finally, we study the running costs of these algorithms.

Experimental Setup
We aimed to choose state-of-the-art algorithms to compare the performance. As discussed in Section 1, some of the most influential ones, including VF2 [12], VF3 [13,14], RI [5], and LAD [15], are usually based on the tree search and verification. These algorithms are optimal with perfectly correct results. Nevertheless, the complexity is exponential or quasi-polynomial in the worst cases. IsoMarking, in contrast, is based on random walks. It is similar to approximation algorithms. IsoMarking is polynomial-time in any graph, although the accuracy is relatively limited. Therefore, it is difficult to compare IsoMarking with optimal algorithms for accuracy, because the optimal algorithms are always correct. Likewise, it is difficult to compare them in terms of complexity, because IsoMarking is theoretically superior in computational complexity. Such a comparison does both sides an injustice.
Therefore, we only compared IsoMarking with other algorithms based on random walks. For better comparison, we chose polynomial-time algorithms with sacrificed accuracy. Thus we chose the Intuitive Method [24], Emms [21], and Qiang3 [24] for comparison. The Intuitive Method can discover an isomorphism mapping based on a judging algorithm (Qiang1) [23]. Emms [21,22] is most influential in the graph isomorphism problem, and we chose the continuous-time version [21]. We also chose Qiang3 [24] as a baseline, as it is claimed to perform particularly well on regular graphs. All the source codes were implemented in Matlab. Some source codes are available from the thesis [24], and we implemented the other codes, including an implementation of Emms according to its related works [21,36].
Because those algorithms are not perfectly correct, we concentrated on the accuracy performance. We evaluated the algorithms with two experiments. The first experiment focused on their performance on ordinary graphs, while the second was designed to evaluate them on regular graphs.
The two experiments were carried out in the same way except for the graph type. Firstly we generated groups of graph paisr. Each pair included two isomorphic graphs. We aimed to evaluate their accuracy of discovering an isomorphism mapping; thus, we performed algorithms on every graph pair and examined the output mapping. There can be more than one correct isomorphism mapping, especially in regular graphs. Therefore, it is not suitable to compare the output mapping with the ground truth. We returned to the definition of isomorphism mapping in Definition 1. Thus, we chose to check whether the output mapping was structure-preserving instead. In our experiments, we depended on Algorithm 3 [24] to verify the output. If the mapping passed the verification, and then it was deemed to be correct; otherwise, the mapping was deemed to have failed. The average accuracy of each algorithm in every group was calculated. Furthermore, we recorded the average running time and the peak memory cost while running each algorithm based on the Profiler in Matlab.

Results on Ordinary Graphs
We generated six groups of ordinary graphs, namely Groups 1-6. Each group consisted of 100 ordinary graph pairs. Hence, there were 600 pairs of ordinary graphs in total. The basic information about Groups 1-6 is presented in Table 3, where N and k refer to the vertex number and the average degree, respectively. The results are shown in Figure 4. All algorithms performed well in most groups. In Group 1 and Groups 3-5, all of the algorithms performed perfectly with an accuracy of 1.00. In Group 6, the Intuitive Method and Emms achieved 0.98 and 0.96, respectively. They were only a little worse than IsoMarking and Qiang3 whose accuracies were both 1.00. Group 2 was relatively distinctive. Because Group 2 had larger and more complicated graphs, it was more challenging. Therefore, various algorithms performed differently, and thus, the performance of some algorithms greatly dropped. Even so, IsoMarking still performed the best with a score of 0.99. On the contrary, the figures of the other algorithms were only about 0.55 or 0.64.
There was another interesting phenomenon. In the 600 graph pairs, IsoMarking rarely performed worse than any other algorithm. The only exception was the nineteenth graph pair in Group 2, where only Qiang3 gave the correct isomorphism mapping. For the other 599 graph pairs, IsoMarking definitely worked out a correct mapping, while the other algorithms failed occasionally.
As for the promotion of IsoMarking, we only studied the promotion in Group 2, because the figures for the other groups were very close. In the second group, IsoMarking outperformed the Intuitive Method and Emms by 54.69%, and it outperformed Qiang3 by 80%.  So, in ordinary graphs, we can see that IsoMarking performs the best. Although the others usually perform well, their performance drops greatly when the graphs become complicated. IsoMarking not only keeps an accuracy level that is never less than 0.99, but it also outperforms others considerably when graphs become more challenging.

Results on Regular Graphs
We also generated more regular graphs for experiments. There were 985 pairs of regular graphs in total, divided into ten groups, namely Groups 7-16. The basic information about these groups is shown in Table 4. The results for regular graphs are shown in Table 5. Obviously, various algorithms performed significantly differently.
Emms had the worst performance with an accuracy level that was usually close to 0. The only exception was Group 15, in which its accuracy was 0.5. The Intuitive Method was also unsatisfying, although it was much better than Emms. Its score was always less than 0.5, except for Group 7. Its accuracy was even less than 0.3 in six groups. These two algorithms lack effective techniques to cope with the impact of symmetry. Therefore, they are easily confused by regular graphs and often fail to give a correct isomorphism mapping. Our experiments demonstrated that Qiang3 achieves better performance on regular graphs. Its accuracy was usually about 0.5 to 0.6, and even 0.8 sometimes. In Group 11, Qiang3 even achieved a score very close to that of IsoMarking. Consequently, Qiang3 performed much better than the other two baselines in regular graphs, although its performance on ordinary graphs was relatively low. Qiang3 scored zero in Group 15, but such a case can be regarded as an exception considering its overall accuracy. Qiang3 was able to reduce the impact of symmetry to some extent and utilized verification to avoid conflicts between unit bijections. Therefore, it usually performed better than the Intuitive Method and Emms.
IsoMarking performed best in all groups. Its accuracy was usually higher than 0.75. It was the only algorithm whose accuracy reached 0.85. It scored 0.85 or higher in six groups. Even in Group 15, where two algorithms were utterly wrong, its accuracy was still not less than 0.75. With its superior performance, IsoMarking achieved brilliant promotion. It outperformed the Intuitive Method by 43.75-466.67%, and it outperformed Qiang3 by 3.61-48.72%, not to mention Emms whose score was usually 0.
When we analysed the results from the perspective of groups, we drew similar conclusions. In all ten groups, IsoMarking was always the best. Qiang3 usually performed well, followed by the Intuitive Method. Emms usually scored close to zero. There was an exception (Group 15), where Emms was superior to other baselines, but IsoMarking still performed the best.
For the 985 pairs of regular graphs, IsoMarking never performsedworse than the Intuitive Method or Emms. In other words, when IsoMarking failed to work out a correct isomorphism mapping between two regular graphs, only Qiang3 could still give a correct mapping between them. However, such cases were rare-there were about only 50 cases in the total 985 cases (5.076%). In such cases, the four marking types were not sufficient, thus IsoMarking required more marking types to work out a correct mapping. In the other cases, if IsoMarking could not work out a correct mapping, then no algorithm was able to do so.
In this subsection, the Intuitive Method and Emms were shown to have very limited performance in regular graphs, and the performance of Qiang3 was not always satisfying, either. IsoMarking, however, still maintained its good performance. We can safely draw a conclusion that the mechanism of marking vertices does have the ability to reduce the impact of symmetry which helps IsoMarking to perform much better on regular graphs.

Running Cost Study
In this subsection, we describe the study of the running cost, including the time cost and the memory cost. Since all codes were implemented in Matlab, we used the profiler in Matlab to record the cost. The peak memory in the profile summary was chosen as the peak memory cost of each algorithm, as shown in Table 6. As for the time cost, the verification time spent on Algorithm 3 was not included. The average running time of each algorithm in each group was calculated, as shown in Table 7. Generally, the running cost is related to the algorithm, the group size and the graph size. Each group is processed in a batch. Thus, more memory is required if the group has more graph pairs, but the average running time is not influenced. When faced with larger graphs, algorithms usually require more memory and time, which is particularly obvious with Emms. In the following discussion, we mainly discuss the running costs of different algorithms.
The results of the memory cost were very different among groups. However, we can still obtain some conclusions. Emms is the most memory-consuming because it used the largest amount of memory in none groups. Emms conducts a quantum walk on a graph much larger than the original graphs, and thus, it definitely requires more memory. Moreover, when the graphs became larger in Group 2 and Group 7, the figure of Emms increased significantly. Likewise, Qiang3 is memory-consuming, although it is a little better than Emms. Its memory cost is the largest in four groups. The Intuitive Method performed better than Emms and Qiang3, but IsoMarking performed the best. The figure of IsoMarking was the least with six groups, while it used the largest amount of memory only in Group 9. As a consequence, the memory cost of IsoMarking was satisfying.
As for time cost, both Qiang3 and Emms performed the quantum walk only once, thus they are faster. Qiang3 was usually faster in ordinary graphs, while Emms was faster in regular graphs.
In regular graphs, however, Emms simply considers all unit bijections to be acceptable. It returns a mapping almost immediately, regardless of the fact that the mapping can be incorrect. As a consequence, Emms usually scores zero in regular graphs, and thus such speed is meaningless. Therefore, Qiang3 performs the best. In fact, Qiang3 is computationally faster, which is O(|V| 4 ).
IsoMarking and the Intuitive Method, in contrast, take more time. IsoMarking is even slower. Both algorithms are O(|V| 6 ), and they require repeated quantum walks to establish unit bijections one after another. Thus, they spend a large amount of time conducting quantum walks. The Intuitive Method can accept unqualified unit bijections, and return a mapping more quickly, despite the fact that the mapping can be incorrect. IsoMarking, however, utilizes different marking types, thus it is more strict. It rejects unqualified unit bijections accepted by the Intuitive Method, and therefore, it takes more trials, as discussed in Section 4. Furthermore, IsoMarking adds vertices to graphs. Although those nodes have little influence on the theoretical complexity, they can increase the time cost to some extent.
From what has been discussed above, we can see that IsoMarking performs well on memory cost, but it is somewhat time-consuming. Therefore, the overall running cost is barely satisfactory. Considering its brilliant promotion on both ordinary graphs and regular graphs, we believe such cost is acceptable.

Conclusions
We propose IsoMarking to figure out the isomorphism mapping between graphs. It uses the continuous-time quantum walk to sense topological changes in graphs. By marking vertices, it strongly reduces the symmetry and keeps bijections consistent with each other. The experiments in this study demonstrated that IsoMarking rarely performs worse than other algorithms. It achieved higher accuracy when discovering isomorphism mappings. Moreover, it significantly outperformed other algorithms when graphs were highly symmetric, especially for regular graphs. Its running cost was also acceptable. We plan to optimize our algorithm so that it can be more efficient and effective. Likewise, we plan to study the marking mechanism more deeply, so that it can cope with some extremely difficult structures.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:

LAD
Local All Different CTQW Continuous-time quantum walk DTQW Discrete-time quantum walk NP Nondeterministic Polynomial-time