 # Network Alignment by Discrete Ollivier-Ricci Flow

In this paper, we consider the problem of approximately aligning/matching two graphs. Given two graphs G_1=(V_1,E_1) and G_2=(V_2,E_2), the objective is to map nodes u, v ∈ G_1 to nodes u',v'∈ G_2 such that when u, v have an edge in G_1, very likely their corresponding nodes u', v' in G_2 are connected as well. This problem with subgraph isomorphism as a special case has extra challenges when we consider matching complex networks exhibiting the small world phenomena. In this work, we propose to use `Ricci flow metric', to define the distance between two nodes in a network. This is then used to define similarity of a pair of nodes in two networks respectively, which is the crucial step of network alignment. curvatures and graph Ricci flows. Specifically, the Ricci curvature of an edge describes intuitively how well the local neighborhood is connected. The graph Ricci flow uniformizes discrete Ricci curvature and induces a Ricci flow metric that is insensitive to node/edge insertions and deletions. With the new metric, we can map a node in G_1 to a node in G_2 whose distance vector to only a few preselected landmarks is the most similar. The robustness of the graph metric makes it outperform other methods when tested on various complex graph models and real world network data sets (Emails, Internet, and protein interaction networks)[The source code of computing Ricci curvature and Ricci flow metric are available: https://github.com/saibalmars/GraphRicciCurvature].

## Authors

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

Given two graphs and with approximately the same graph topology, we want to find the correspondence of their nodes – node in is mapped to a node in such that whenever is connected in , are likely to be connected in as well. This is called the network alignment problem and has been heavily studied  with numerous applications including database schema matching , protein interaction alignment [59, 9, 15, 45], ontology matching 

 and social networks [71, 23].

Network alignment is a hard problem. A special case is the classical problem of graph isomorphism, in which we test whether or not two graphs have exactly the same topology under a proper correspondence. The most recent breakthrough by László Babai  provides an algorithm with quasi-polynomial running time , where is the number of nodes. It still remains open whether the problem is NP-complete or not. For special graphs, polynomial time algorithms have been developed (e.g. trees , planar graphs , graphs of bounded valence 

). For general graphs what has been commonly used include heuristic algorithms such as spectral methods

[59, 1, 54], random walks , optimal cost matching method  and software packages such as Nauty, VF, and VF2, see [47, 11]. The subgraph isomorphism problem, i.e., testing whether one graph is the subgraph of the other, is NP-complete and has been heavily studied as well. See the survey [10, 69, 16].

For practical settings, the problem is often formulated as finding a matching in a complete bipartite graph , in which are nodes in , are nodes in , and edges carry weights that indicate similarity of the two nodes. Here similarity can be either attribute similarity or structural similarity (quantifying their positions in the network). The two graphs are aligned by taking a matching of high similarity in graph . Many algorithms use this approach and they differ by how to define node similarity: L-Graal , Natalie , NetAlignMP++ , NSD , and IsoRank . In this paper, our main contribution is to provide a new method to compute node structural similarity using the idea of graph curvature and curvature flow.

Our Setting. We mainly focus on complex networks that appear in the real world. Consider the Internet backbone graphs captured at two different points in time, we wish to match the nodes of the two graphs in order to understand how the network has evolved over time. Or, consider two social network topologies on the same group of users. It is likely that when two users are connected by a social tie in one network (say LinkedIn), they are also connected in the other network (say Facebook). A good alignment of two networks can be useful for many applications such as feature prediction , link prediction 

, and possibly de-anonymization [22, 55].

We work with the assumption that a small number (say or ) of nodes, called landmarks, are identified. Often a small number of landmarks could be discovered by using external information or properties of the networks. For example, in networks with power law degree distributions, there are often nodes with really high degree that can be identified easily. Given the landmarks, we can find a coordinate for each node as , where captures the similarity of with the th landmark. This coordinate vector captures the structural position of a node in the network and can be used in the network alignment problem – two nodes and can be aligned if their respective coordinates are similar. This approach is motivated by localization in the Euclidean setting, in which three landmarks are used to define the barycentric coordinates of any node in the plane. In the complex network setting, this approach faces two major challenges that need to be addressed.

First, a proper metric that measures the distance from any node to the landmarks in the network is needed. The easiest metric is probably the hop count – the number of edges on the shortest path connecting two nodes in the network. While the hop count is often used for communication networks, for complex networks it is less helpful as these networks often have a small diameter. To look for a better measure, edges shall be properly weighed which is highly application dependent. For the Internet setting

, measures such as Round-Trip Time (RTT) are used. In a social network setting, it is natural to weight each edge by its tie strength. But these weights are not easy to obtain. Many graph analysis methods use measures that capture local graph structures by common neighborhood, statistics generated by random walks [56, 24], etc.

Second, the approach of using distances to landmarks to locate a node in the network is truly geometric in nature [20, 33]. But a fundamental question is to decide what underlying metric space shall be used. Low-dimensional Euclidean spaces are often used [26, 37] and spectral embedding or Tutte embedding are popular. But it is unclear what is the dimensionality of a general complex network and robustness of these embeddings is not fully understood.

Our Approach. We address the above problems by using the tool of graph curvature and curvature flow. In the continuous setting of a two dimensional surface, the curvature of a point captures how much it deviates from being flat at the point. The tip of a bump has positive curvature and a saddle point has negative curvature. Curvature flow is a process that deforms the surface (changing the metric) and eventually makes the curvature to be uniform everywhere. In our setting, we look at discrete curvatures and curvature flow defined on a graph and argue that by curvature one can encode and summarize graph structures. As will be explained later in more details and rigor, edges that are in a densely connected ‘community’ are positively curved while edges that connect two dense communities are negatively curved. Further, we can define curvature flow (which is an adaptation of surface Ricci flow to the graph setting) such that weights are given to the edges to make all edges have the same curvature. This process in some sense ‘uniformizes’ the network and can be imagined as embedding the network in some intrinsic geometric space. These weights are again intuitive – edges in a dense community are short while edges that connect two far away communities are long, see Figure 1. We call the shortest path length under such weights as the Ricci flow metric. The Ricci flow metric is designed to improve robustness under insertions and deletions of edges/nodes – when an edge is removed, the shortest path distance between the two endpoints in the original graph can possibly change a lot and Ricci flow reduces such imbalance. This is useful for matching two graphs that are different topologically.

Our curvature based coordinates depend only on the network topology and thus are purely structural. But they can also be combined with node attributes (when available) to produce an alignment score. In our evaluation we have focused on methods that use structural similarities and embeddings such as hop counts, metrics induced by spectral embedding  or spring/Tutte embedding , and topology based network alignment algorithm IsoRank  and NSD . We evaluated our network alignment algorithms on a variety of real world data sets (Internet AS graphs , Email networks [25, 36], protein networks [18, 36]) and generated model networks (random regular graphs, Erdös-Rényi graphs , preferential attachment model  and Kleinberg’s small world model ). Experimental evaluations show that the Ricci flow metric greatly outperforms other alternatives. In particular, most of the embedding methods perform poorly on random regular graphs due to identical node degree. Methods using hop counts suffer from the problem of not being descriptive, especially when there are only a small number of landmarks. There might be too many nodes with same coordinate under the landmark based coordinates. The spectral embedding and the spring embedding are less robust under edge insertion and deletion. IsoRank compares local similarity in a pair of graphs. In a large complex network, it is possible to have nodes that look similar in terms of local structures but globally should not be matched. This may explain why IsoRank does not scale well.

In the following, we first present background knowledge on curvature and Ricci flow [27, 62]. We then present graph curvature and curvature flow, how they are used in network alignment, and empirical evaluations.

## 2 Background

Curvature and Ricci Flow on Surfaces. Curvature is a measure of the amount by which a geometric object deviates from being flat/straight and has multiple definitions depending on the context. Ricci flow was introduced by Richard Hamilton for Riemannian manifolds in 1982 . A surface Ricci flow is the process to deform the Riemannian metric of the surface, proportional to the Gaussian curvature, such that the curvature evolves like heat diffusion and becomes uniform at the limit. Intuitively, this behaves as flattening a piece of crumpled paper. Surface Ricci flow is a key tool in the proof of the Poincaré conjecture on 3-manifolds, and has numerous applications in image and shape analysis. In engineering fields, surface Ricci flow has been broadly applied on a triangulated surface setting for tackling many important problems, such as parameterization in graphics  and deformable surface registration in vision .

Discrete Ricci Curvature. Curvatures for general graphs have only been studied over the past few years [53, 40, 8, 4, 42, 61, 7]. The definitions of curvatures that are easier to generalize to a discrete graph setting are sectional curvature and Ricci curvature. Consider a point on a surface and a tangent vector at whose endpoint is . Take another tangent vector at and imagine transporting along vector to be a tangent vector at . Denote the endpoints of as . If the surface is flat, then would constitute a parallelogram. Otherwise, the distance between differs from . The difference can be used to define sectional curvature .

Sectional curvature depends on two tangent vectors . Averaging sectional curvature over all directions gives the Ricci curvature which only depends on . Intuitively, if we think of a direction at as a point on a small ball centered at , on average Ricci curvature controls whether the distance between a point of and the corresponding point of is smaller or larger than the distance . To allow for a general study, Ollivier  defined a Ricci curvature by using a probability measure to represent the ball . Later Ollivier Ricci curvature has been applied in different fields, for distinguishing between cancer-related genes and normal genes , for understanding phylogenetic trees , and for detecting network features such as backbone and congestions [50, 65, 66, 49, 31]. There was very limited amount of theory on discrete Ollivier-Ricci curvature on graphs, and nearly none on graph Ricci flow. In the future work section of  Ollivier suggested that people should study the discrete Ricci flow in a metric space by evolving the distance on according to the Ricci curvature between two points :

 ddtd(x,y)=−κ(x,y)d(x,y).

We are the first to study Ollivier-Ricci flow in the graph setting. We also suggest variants of the Ollivier-Ricci curvature that admits much faster computation and empirically evaluate properties of the Ricci flow metrics and applications in network alignment.

## 3 Theory and Algorithms

Ricci Curvature on Graphs For an undirected graph , the Ollivier-Ricci curvature of an edge is defined as follows. Let denote the neighborhood of a node and is the degree of . For a parameter , define a probability measure :

 mαx(xi)=⎧⎨⎩α\ if xi=x(1−α)/Deg(x)\ if xi∈πx0\ otherwise ,

Suppose is the weight of edge and the shortest path length between and in the weighted graph. The optimal transportation distance (OTD) between and is defined as the best way of transporting the mass distribution to the mass distribution :

 W(mαx,mαy)=infM∑xi,yj∈Vd(xi,yj)M(xi,yj)

where is the amount of mass moved from to along the shortest path (of length ) and we would like to take the best possible assignment (transport plan) that minimizes the total transport distance. The discrete Ollivier-Ricci curvature  is defined as follows

 κw(x,y)=1−W(mαx,mαy)d(x,y).

In this paper, is called the OTD-Ricci curvature.

The OTD-Ricci curvature describes the connectivity in the local neighborhood of  . If is a bridge so the nodes in have to travel through the edge to get to nodes in , and the curvature of is negative. Similarly, if the neighbors of and the neighbors of are well connected (such that ), the curvature on is positive.

The optimal transportation distance can be solved by linear programming (LP) to find the best values for

:

 Minimize: ∑i,jd(xi,yj)M(xi,yj) s.t. ∑jM(xi,yj)=mαx(xi),∀i% and∑iM(xi,yj)=mαy(yj),∀j

The computation of the linear program on large networks may be time-consuming. To address the computational challenges, we define a variant of the OTD-Ricci curvature by using a specific transportation plan instead of the optimal transportation plan. We take the average transportation distance (ATD) , in which we transfer an equal amount of mass from each neighbor of to each neighbor of and transfers the mass of to . One could easily verify that this is a valid transportation plan. Thus, the discrete Ricci curvature by the average transportation distance (ATD) is defined as:

 κa(x,y)=1−A(mαx,mαy)d(x,y),

Since we remove the LP step in the computation, the computational complexity of the ATD-Ricci curvature is drastically improved. As will be presented later, our experimental results show that computing discrete Ricci flow using the ATD-Ricci curvature maintains and even enhances the robustness of graph alignment. In this paper, we fix and simplify the notation of discrete Ricci curvature by in the discussion of discrete Ricci flow.

Discrete Ricci Flow Ricci flow is a process that deforms the metric while the Ricci curvature evolves to be uniform everywhere. For any pair of adjacent nodes and on a graph , we adjust the edge weight of , , by the curvature :

 wi+1(x,y)=wi(x,y)−ϵ⋅κi(x,y)⋅wi(x,y),∀¯¯¯¯¯¯xy∈E,

where is computed using the current edge weight . The step size is controlled by and we take in our experiment.

After each iteration we rescale the edge weights so the total edge weight in the graph remains the same, since only relative distances between nodes matter in a graph metric. A pseudo-code is presented in the appendix.

Ricci Flow Metric When graph Ricci flow converges, each edge is given a weight . We denote the shortest path metric with such weights to be the Ricci Flow Metric, denoted as . To understand the metric, notice that when the Ricci flow converges the following is true. Here we take step size :

 (w(x,y)−κ(x,y)⋅w(x,y))⋅N≈w(x,y)

where

 N=|E|∑¯¯¯¯¯xy∈E(w(x,y)−κ(x,y)w(x,y)).

Denote the transportation distance between the two probability measures and to be , we have

 κ(x,y)≈1−T(x,y)d(x,y),T(x,y)d(x,y)≈1N.

To understand what this means, recall that represents the distances from ’s neighborhood to ’s neighborhood. Before we run Ricci flow, this value for different edges can vary a lot – in the neighborhood of positively curved edges there are many ‘shortcuts’ making to be significantly shorter than , while in the neighborhood of negatively curved edges is longer than . The purpose of Ricci flow is to re-adjust the edge weights to reduce such imbalance. Suppose we remove an edge with negative curvature before Ricci flow and break the shortest path from (a neighbor of ) to (a neighbor of ). The alternative path from to in the neighborhood of tends to become much longer, as is large. Thus, the change to the shortest path metric is significant. However, after the Ricci flow, with the new edge weights, the alternative path from to in the neighborhood of may still get longer but not as long. Thus, the change in the shortest path length is less significant. The Ricci flow metric is more robust when edges and nodes are randomly removed. To capture this property, we define the uniformity of graph metric using the variation of for different edges .

###### Definition 1 (Metric Uniformity)

Given a graph with edge weight on , the metric uniformity is defined by the interquartile range (IQR), i.e., of over all edges, the difference between and percentiles.

The metric uniformity measures the diversity of over all edges around the median. Lower metric uniformity indicates that are less dispersed about the median. Therefore, the corresponding metric is more robust upon node/edge insertions and deletions.

## 4 Network Alignment by Ricci Flow Metric

Given two graphs and , suppose there are landmarks in both and with known correspondence, is a small constant such as or . These landmarks may be known beforehand by external knowledge. We use these landmarks to find the correspondence of nodes in and . Specifically, we represent each node by its relative positions to the landmarks , where denotes the shortest distance from to in graph using the Ricci flow metric. We define the cost of matching with by the 2-norm of the difference between and ,

 Cuv=||uL−vL||2.

The smaller is, the more similar are. The alignment problem can be formulated as finding a low-cost matching in the complete bipartite graph where the edge in connecting and has weight .

Matching Algorithms. To find a low cost matching in the bipartite graph or a similarity matrix, we can apply the following two algorithms.

• The Hungarian min-cost matching algorithm  finds a matching which minimizes in time.

• A greedy matching method iteratively locates the minimal , records the node pair , and removes all elements involving either or , until the nodes of either or are all paired.

We note that in prior network alignment algorithms, such as IsoRank and NSD, greedy matching was unanimously selected due to its efficiency. We tested both algorithms with the results on Hungarian algorithms presented in the appendix.

Matching Accuracy. To evaluate the accuracy of the matching results, one idea is to count how many nodes are correctly matched with respect to their IDs in the ground truth. But this measure may be too strict. For example, if and are both complete graphs of the same size, any matching of nodes in and nodes in should be considered to be correct. It is well known that social networks have community structures and many different levels of node equivalence and symmetry. There are different definitions for two nodes in a graph to be equivalent:

• Structural equivalence: and have exactly the same set of neighbors;

• Automorphic equivalence: if we relabel the nodes in an automorphic transformation (i.e., the graph after relabeling is isomorphic to the original graph), the labels of are exchanged;

• Regular equivalence : are connected if they are equally related to equivalent others. That is, regular equivalence sets are composed of nodes who have similar relations to members of other regular equivalence sets.

Regular equivalence is the least restrictive of the three definitions of equivalence, but probably the most important for the sociologists as it captures the sociological concept of a “role”. Previous quantitative measures of regular equivalence 

unfortunately, are not very effective in identifying the global symmetric structures. For example, the two terminal nodes of a path graph cannot be classified to the same regular equivalence class.

Connected Equivalence. Motivated by regular equivalence, we would like to consider two nodes to be connected equivalence if they have similar connections to other nodes. Specifically, we compute the length of shortest paths (using the Ricci flow metric) from and to all other nodes, except themselves, in a fixed order in or , and denote the results by two vectors and . If the two vectors are similar (i.e., for some small ), then we say that are equivalent and the matching of to is correct.

## 5 Evaluation

In this section, we demonstrate the performance of Ricci flow metric and its power on network alignment. Since Ricci flow metric only used topology feature, we compare RF-OTD, RF-ATD with two topology based network alignment algorithms IsoRank  and NSD  (other network alignment algorithms require node label/attributes), and three different embedding metrics: spectral embedding, spring embedding, and hop count. We evaluated the performance of these algorithms in both model graphs and real world data. The descriptions of these methods as well as the data sets are presented in Appendix 0.B and Appendix 0.C. Our main observations are as follows:

1. Ricci flow metrics (both RF-OTD and RF-ATD) are much more robust against edge/node insertion and deletions compared to others on noisy graph alignment problem.

2. Ricci flow metrics greatly outperform previous topological based network alignment algorithms (IsoRank, NSD) as well as other metrics and similarity measures on noisy graph alignment problem. In many experiments our algorithm achieves more than matching accuracy while other methods achieve accuracy below .

3. While greedy matching performs well in model graphs, min-cost matching (i.e, Hungarian algorithm) is more suitable for real world graph.

Due to space limit, please refer to Appendix 0.E for further discussion.

Experiment Setup. Given a graph , we remove nodes or edges (less than ) uniform randomly to create as a noisy graph. We then perform the alignment of and . Notice that in this case, we can also regard as a graph with random noises added to . Therefore, we only present the results of node deletion cases.

The graph alignment problem is solved in two steps. First we construct a similarity matrix that records the cost of matching node in with node in for all possible ; then we perform Hungarian algorithm or greedy matching to match nodes in with nodes in . We evaluate the algorithm performance by using connected equivalence.

For IsoRank and NSD, the similarity matrix is the output of the algorithm; for landmark based method, the similarity matrix is defined by norm of their landmark distance vectors. Here the distance metric is defined by RF-OTD and RF-ATD222With 50 Ricci flow iterations, , , distances induced by spectral embedding (dim=), spring embedding, and hop count respectively. The performance of each metric is evaluated by varying the number of removed nodes/edges and the number of landmarks . To eliminate the dependency of landmark selection, the matching accuracy is averaged by experiments on different sets of landmarks. These landmarks are chosen such that every newly added landmark is furthest away from the landmarks chosen so far.

Metric Uniformity We first analyze the metric uniformity over all metrics on a random regular graph with nodes and edges. The box plot result is illustrated in Figure 3(a). RF-ATD yields the best metric uniformity with the smallest IQR of . RF-OTD also performs well with IQR as . Spectral and spring embedding behave poorly. These performances are directly related to the accuracy in graph alignment. The metric with low metric uniformity is more stable when nodes/edges are missing, see Figure 2. Notice that hop count metric generates a small IQR=. This is because there are often multiple shortest paths (in terms of hop count) connecting two nodes in the network so hop count is actually a fairly robust measure. But using it for graph alignment is still limited by its lack of descriptive power.

For further analysis that metric uniformity indeed captures the robustness of shortest path metric, we compute the stretch of the shortest path length between a pair of nodes in a random regular graph when edges are randomly removed, shown in Figure 3(b). Consider two nodes in both and , we denote the length of the shortest path from to by under a metric , where . We define the stretch ratio of and as . The stretch ratio captures the changes of the shortest path length. A larger stretch ratio means the shortest path length changes more. In Figure 3(b), we collect the stretch ratios from one random node to all of the other nodes based on different metrics, and plot the distribution of these stretch ratios as a histogram. It turns out that hop count, Ricci flow metric with OTD and with ATD result in smaller stretch ratios, while spectral embedding is the most vulnerable one with edge deletions. Figure 4: The comparison of the similarity rank of all methods. The similarity matrix represents the pairwise similarity between a random regular graph with 1000 nodes and 6000 edges and the previous graph with 10 random nodes and 120 corresponding edges removed.

Similarity Matrix Here we test the similarity matrix of every pairwise node similarity of two graphs , . is a random regular graph with nodes and edges and removes nodes randomly from . We check the performance of the similarity matrix as follows. For every node and the corresponding node in in the ground truth, we check the rank of in the sorted list ranked by similarity values with . A good similarity matrix should rank as the most similar one. A lower ranking indicates better performance of the similarity matrix. We show the results in Figure 4 with landmarks. Thanks to the metric uniformity, our method yields the best performance with average similarity rank of while other methods are at least times higher.

Network Alignment Here we demonstrate the matching accuracy results on noisy graph alignment problem for a random regular graph ( nodes and degree as , and by randomly removing node and edges from ) and a real word protein-protein interaction graph (to be aligned with a graph of edges randomly removed). Figure 5 shows that while most of the methods failed to align the graph correctly, the Ricci flow metric performs well with only landmarks. Here since IsoRank and NSD method do not require landmarks, the performance over different landmark is shown as a straight line. The result shows that RF-ATD, which is computationally much more efficient, performs equally well as RF-OTD. Notice that the methods with poor metric uniformity as shown in Figure 3 also result in poor performance here. This supports the importance of metric uniformity in network alignment. More evaluation on different model networks and real networks also support this claim. The performance of alignment accuracy also effected by the portion of nodes and edges added/removed, the noisy graph alignment problem become harder with more noise. Please see Appendix 0.C for further details.

## 6 Conclusion

In this paper, we have presented a framework to endow a graph with a novel metric through the notion of discrete Ricci flow with an application to network alignment. From the experimental results, we found that 1) the graph Ricci curvature converges through the discrete Ricci flow and; 2) Ricci flow metric on a graph is fairly stable when edges are inserted or removed. Providing theoretic proofs of these observations are currently open and will be the next direction of our future work.

Acknowledgement The authors would like to thanks the funding agencies NSF DMS-1737812, CNS-1618391, CCF-1535900, DMS-1418255, and AFOSR FA9550-14-1-0193.

## References

•  Aflalo, Y., Bronstein, A., Kimmel, R.: On convex relaxation of graph isomorphism. Proceedings of the National Academy of Sciences 112(10), 2942–2947 (2015)
•  Aho, A.V., Hopcroft, J.E.: The Design and Analysis of Computer Algorithms. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1st edn. (1974)
•  Babai, L.: Graph isomorphism in quasipolynomial time. CoRR abs/1512.03547 (2015), http://arxiv.org/abs/1512.03547
•  Bakry, D., Émery, M.: Diffusions hypercontractives. In: Séminaire de probabilités, XIX, 1983/84, pp. 177–206. Springer, Berlin, Berlin, Heidelberg (1985)
•  Barabasi, A., Albert, R.: Emergence of scaling in random networks. Science 286, 509–512 (1999)
•  Bayati, M., Gleich, D.F., Saberi, A., Wang, Y.: Message-Passing algorithms for sparse network alignment. ACM Trans. Knowl. Discov. Data 7(1), 3:1–3:31 (Mar 2013)
•  Bonciocat, A.I.: A rough curvature-dimension condition for metric measure spaces - Springer. Central European Journal of Mathematics (2014)
•  Chung, F.R.K., Yau, S.T.: Logarithmic Harnack inequalities. Math. Res. Lett 3(6), 793–812 (1996)
•  Clark, C., Kalita, J.: A comparison of algorithms for the pairwise alignment of biological networks. Bioinformatics 30(16), 2351–2359 (Aug 2014)
• 

CONTE, D., Foggia, P., Sansone, C.: Thirty years of graph matching in pattern recognition. International Journal of Pattern Recognition and Artificial Intelligence

18(03), 265–298 (2004)
•  Cordella, L.P., Foggia, P., Sansone, C., Vento, M.: A (sub)graph isomorphism algorithm for matching large graphs. Pattern Analysis and Machine Intelligence, IEEE Transactions on 26(10), 1367–1372 (Oct 2004)
• 

Diamond, S., Boyd, S.: CVXPY: A Python-embedded modeling language for convex optimization. Journal of Machine Learning Research

17(83),  1–5 (2016)
•  Eades, P.: A heuristic for graph drawing. Congressus numerantium 42, 149–160 (1984)
•  El-Kebir, M., Heringa, J., Klau, G.W.: Natalie 2.0: Sparse global network alignment as a special case of quadratic assignment. Algorithms 8(4), 1035–1051 (Nov 2015)
•  Elmsallati, A., Clark, C., Kalita, J.: Global alignment of Protein-Protein interaction networks: A survey. IEEE/ACM Trans. Comput. Biol. Bioinform. 13(4), 689–705 (Jul 2016)
•  Emmert-Streib, F., Dehmer, M., Shi, Y.: Fifty years of graph matching, network alignment and network comparison. Information Sciences 346-347, 180–197 (Jun 2016)
•  Erdos, P., Renyi, A.: On random graphs. Publicationes Mathematicae 6, 290–297 (1959)
•  Ewing, R.M., Chu, P., Elisma, F., Li, H., Taylor, P., Climie, S., McBroom-Cerajewski, L., Robinson, M.D., O’Connor, L., Li, M., Taylor, R., Dharsee, M., Ho, Y., Heilbut, A., Moore, L., Zhang, S., Ornatsky, O., Bukhman, Y.V., Ethier, M., Sheng, Y., Vasilescu, J., Abu-Farha, M., Lambert, J.P., Duewel, H.S., Stewart, I.I., Kuehl, B., Hogue, K., Colwill, K., Gladwish, K., Muskat, B., Kinach, R., Adams, S.L., Moran, M.F., Morin, G.B., Topaloglou, T., Figeys, D.: Large-scale mapping of human protein–protein interactions by mass spectrometry. Molecular Systems Biology 3 (Mar 2007)
• 

Fan, W., Wang, X., Wu, Y.: Incremental graph pattern matching. ACM Transactions on Database Systems (TODS)

38(3),  18 (Aug 2013)
•  Fang, Q., Gao, J., Guibas, L., de Silva, V., Zhang, L.: GLIDER: Gradient landmark-based distributed routing for sensor networks. In: Proc. of the 24th Conference of the IEEE Communication Society (INFOCOM). vol. 1, pp. 339–350 (March 2005)
•  Fruchterman, T.M., Reingold, E.M.: Graph drawing by force-directed placement. Software: Practice and experience 21(11), 1129–1164 (1991)
•  Fu, H., Zhang, A., Xie, X.: Effective Social Graph Deanonymization Based on Graph Structure and Descriptive Information. ACM Transactions on Intelligent Systems and Technology (TIST) 6(4), 49–29 (Aug 2015)
•  Goga, O., Loiseau, P., Sommer, R., Teixeira, R., Gummadi, K.P.: On the reliability of profile matching across large online social networks. In: Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. pp. 1799–1808. KDD ’15, ACM, New York, NY, USA (2015)
•  Grover, A., Leskovec, J.: node2vec. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining - KDD ’16 (2016)
•  Guimerà, R., Danon, L., Díaz-Guilera, A., Giralt, F., Arenas, A.: Self-similar community structure in a network of human interactions. Physical Review E 68(6), 065103 (Dec 2003)
•  Ham, J., Lee, D.D., Saul, L.K.: Semisupervised alignment of manifolds. In: AISTATS. pp. 120–127 (2005)
•  Hamilton, R.S.: Three manifolds with positive Ricci curvature. Journal of Differential Geometry 17, 255–306 (1982)
• 

Hopcroft, J.E., Wong, J.K.: Linear time algorithm for isomorphism of planar graphs (preliminary report). In: Proceedings of the Sixth Annual ACM Symposium on Theory of Computing. pp. 172–184. STOC ’74, ACM, New York, NY, USA (1974).

https://doi.org/10.1145/800119.803896
•  Hopcroft, J.E., Karp, R.M.: An n^5/2 algorithm for maximum matchings in bipartite graphs. SIAM Journal on computing 2(4), 225–231 (1973)
•  Jin, M., Kim, J., Luo, F., Gu, X.: Discrete surface Ricci flow. IEEE TVCG 14(5), 1030–1043 (2008)
•  Kennedy, W.S., Narayan, O., Saniee, I.: On the hyperbolicity of large-scale networks. arXiv preprint arXiv:1307.0031 (2013)
•  Khan, A., Wu, Y., Aggarwal, C.C., Yan, X.: NeMa: Fast Graph Search with Label Similarity . Proceedings of the VLDB Endowment 6(3), 181–192 (2013)
•  Kleinberg, J., Slivkins, A., Wexler, T.: Triangulation and embedding using small sets of beacons. In: Proc. 45th IEEE Symposium on Foundations of Computer Science. pp. 444–453 (2004)
•  Kleinberg, J.M.: The small-world phenomenon - an algorithmic perspective. STOC (2000)
•  Kollias, G., Mohammadi, S., Grama, A.: Network similarity decomposition (nsd): A fast and scalable approach to network alignment. IEEE Transactions on Knowledge and Data Engineering 24(12), 2232–2243 (2012)
•  Kunegis, J.: KONECT. In: Proceedings of the 22nd International Conference on World Wide Web - WWW ’13 Companion. pp. 1343–1350. ACM Press, New York, New York, USA (2013)
•  Lafon, S., Keller, Y., Coifman, R.R.: Data fusion and multicue data matching by diffusion maps. IEEE Trans. Pattern Anal. Mach. Intell. 28(11), 1784–1797 (Nov 2006)
•  Leicht, E.A., Holme, P., Newman, M.E.: Vertex similarity in networks. Physical Review E 73(2), 026120 (2006)
•  Lim, H., Hou, J.C., Choi, C.H.: Constructing internet coordinate system based on delay measurement. IEEE/ACM Trans. Netw. 13(3), 513–525 (Jun 2005)
•  Lin, Y., Lu, L., Yau, S.T.: Ricci curvature of graphs. Tohoku Mathematical Journal 63(4), 605–627 (2011)
•  Lorrain, F., White, H.C.: Structural equivalence of individuals in social networks. J. Math. Sociol. 1(1), 49–80 (1 Jan 1971)
•  Lott, J., Villani, C.: Ricci curvature for metric-measure spaces via optimal transport. Annals of Mathematics. Second Series 169(3), 903–991 (2009)
•  Luks, E.M.: Isomorphism of graphs of bounded valence can be tested in polynomial time. Journal of computer and system sciences 25(1), 42–65 (1982)
• 

Luxburg, U.: A tutorial on spectral clustering. Statistics and Computing

17(4), 395–416 (Dec 2007). https://doi.org/10.1007/s11222-007-9033-z
•  Malod-Dognin, N., Ban, K., Pržulj, N.: Unified alignment of protein-protein interaction networks. Scientific Reports 7(1),  953 (2017)
•  Malod-Dognin, N., Pržulj, N.: L-GRAAL: Lagrangian graphlet-based network aligner. Bioinformatics 31(13), 2182–2189 (Jul 2015)
•  McKay, B.D., Piperno, A.: Practical graph isomorphism, ii. Journal of Symbolic Computation 60(0), 94 – 112 (2014)
•  Melnik, S., Garcia-Molina, H., Rahm, E.: Similarity Flooding - A Versatile Graph Matching Algorithm and Its Application to Schema Matching. ICDE (2002)
•  Narayan, O., Saniee, I.: Large-scale curvature of networks. Physical Review E 84(6), 066108 (2011)
•  Ni, C.C., Lin, Y.Y., Gao, J., Gu, X., Saucan, E.: Ricci curvature of the Internet topology. In: 2015 IEEE Conference on Computer Communications (INFOCOM). pp. 2758–2766. IEEE (2015)
•  Noble, C.C., Cook, D.J.: Graph-based anomaly detection. In: Proceedings of the ninth ACM SIGKDD international conference on Knowledge discovery and data mining - KDD ’03. pp. 631–636. University of Texas at Arlington, Arlington, United States (2003)
• 

Ollivier, Y.: A survey of Ricci curvature for metric spaces and Markov chains. Probabilistic approach to geometry (2010)

•  Ollivier, Y.: Ricci curvature of Markov chains on metric spaces. Journal of Functional Analysis 256(3), 810–864 (Feb 2009)
•  Patro, R., Kingsford, C.: Global network alignment using multiscale spectral signatures. Bioinformatics 28(23), 3105–3114 (2012)
•  Peng, W., Li, F., Zou, X., Wu, J.: A Two-Stage Deanonymization Attack against Anonymized Social Networks. Ieee Transactions on Computers 63(2), 290–303 (Feb 2014)
•  Perozzi, B., Al-Rfou, R., Skiena, S.: Deepwalk: Online learning of social representations. In: Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining - KDD ’14. pp. 701–710. New York (2014)
•  Sandhu, R., Georgiou, T., Reznik, E., Zhu, L., Kolesov, I., Senbabaoglu, Y., Tannenbaum, A.: Graph Curvature for Differentiating Cancer Networks. Scientific Reports 5, 12323 (Jul 2015)
•  Shvaiko, P., Euzenat, J.: Ontology matching: State of the art and future challenges. IEEE Trans. Knowl. Data Eng. 25(1), 158–176 (Jan 2013)
•  Singh, R., Xu, J., Berger, B.: Global alignment of multiple protein interaction networks with application to functional orthology detection. Proceedings of the National Academy of Sciences 105(35), 12763–12768 (Sep 2008)
•  Spring, N., Mahajan, R., Wetherall, D.: Measuring isp topologies with rocketfuel. SIGCOMM Comput. Commun. Rev. 32(4), 133–145 (Aug 2002)
•  Sturm, K.T.: On the geometry of metric measure spaces - Springer. Acta Mathematica (2006)
•  Tao, T.: Ricci flow. Tech. rep., Technical report, Department of Mathematics, UCLA (2008)
•  Tong, H., Faloutsos, C., Gallagher, B., Eliassi-Rad, T.: Fast best-effort pattern matching in large attributed graphs. In: Proceedings of the 13th ACM SIGKDD international conference on Knowledge discovery and data mining - KDD ’07. pp. 737–746. Carnegie Mellon University, Pittsburgh, United States (2007)
•  Tutte, W.T.: How to draw a graph. Proceedings of the London Mathematical Society. Third Series 13, 743–767 (1963)
•  Wang, C., Jonckheere, E., Banirazi, R.: Wireless network capacity versus Ollivier-Ricci curvature under Heat-Diffusion (HD) protocol. In: Proceedings of the American Control Conference. pp. 3536–3541. University of Southern California, Los Angeles, United States, IEEE (Jan 2014)
•  Wang, C., Jonckheere, E., Banirazi, R.: Interference constrained network control based on curvature. In: Proceedings of the American Control Conference. pp. 6036–6041. University of Southern California, Los Angeles, United States, IEEE (Jul 2016)
•  Wang, D., Pedreschi, D., Song, C., Giannotti, F., Barabasi, A.L.: Human mobility, social ties, and link prediction. ACM, New York, New York, USA (Aug 2011)
•  Whidden, C., Matsen IV, F.A.: Ricci-Ollivier Curvature of the Rooted Phylogenetic Subtree-Prune-Regraft Graph. ANALCO pp. 106–120 (2016)
•  Yan, J., Yin, X.C., Lin, W., Deng, C., Zha, H., Yang, X.: A short survey of recent advances in graph matching. In: Proceedings of the 2016 ACM on International Conference on Multimedia Retrieval. pp. 167–174. ICMR ’16, ACM, New York, NY, USA (2016). https://doi.org/10.1145/2911996.2912035
•  Zeng, W., Samaras, D., Gu, X.D.: Ricci flow for 3D shape analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence (IEEE TPAMI) 32(4), 662–677 (2010)
•  Zhang, J., Yu, P.S.: Multiple anonymized social networks alignment. In: 2015 IEEE International Conference on Data Mining. pp. 599–608 (Nov 2015)

## Appendix 0.A Algorithm Pseudo-code

Algorithm 1 shows the steps of our Ricci flow algorithm.

## Appendix 0.B Evaluation Datasets

For generality, the network alignment experiments are evaluated over both model and real world network graphs. Here we give an overview of these graphs. The statistics of these graphs are listed in Table 1.

### 0.b.1 Model Networks

#### Erdős-Rényi

The Erdős-Rényi model , also known as the model, connects each pair of nodes by an edge with probability independent of every other edge. We choose in our model.

#### Kleinberg

The Kleinberg graph  begins with an squared graph. Each node is represented by . The distance between two nodes and is defined by For any node , long-range connections to endpoint are constructed by probability proportional to . Here we take .

#### Preferential Attachment

We choose the Barabási-Albert model  as the preferential attachment model. The model starts with nodes and then adds nodes one by one. Each newcomer node connects edges to the existing nodes. For each edge, the endpoint is selected with probability proportional to its current degree. We take in our example.

#### Random Regular

A random regular graph is a graph with nodes and each node randomly connected to other nodes. We take in our example.

### 0.b.2 Real Networks

#### Router Network

A router network graph is composed of routers as nodes and the physical connections as edges. We take the data set ‘AS:3967, Exodus’ from the Rocketfuel project .

#### Email Network

We take the email communication network at the University Rovira i Virgili. In the graph, nodes are users and edges represent emails between users [25, 36].

#### Protein Network

We choose the protein-protein interaction network in human cells. Here every node in graph is a protein and an edge represents the interaction between proteins [18, 36].

## Appendix 0.C Comparisons With Other Methods

We compared our method with other topology-based methods in literature. The brief introduction of these methods are described as follows. All experiments were performed in Python on a 2012 Retina Macbook Pro with 16G ram and 2.6 GHz Intel Core i7. We used CVXPY+ECOS  as the Linear Programming solver.

#### Spectral Embedding

The spectral embedding method 

uses the eigenvectors of the graph Laplacian matrix to embed nodes into the corresponding eigenspace. It has been widely applied to graph matching and data clustering such as image segmentation.

#### Spring Embedding

Spring embedding is an iterative process first introduced by Eades . An advanced algorithm was later developed by Fruchterman and Reingold . A graph can be treated as a spring system such that the nodes with initial positions oscillate until they find their own stable positions. The spring embedding can be regarded as an evolution process, therefore, it is useful to observe the change of the same dataset overtime.

#### IsoRank

IsoRank was proposed by Singh et al.  for biological network alignment. A matching score is defined on each pair of nodes between two networks. The matching score interprets not only the matching quality of the pair of node but also that of their neighbors.

#### Network Similarity Decomposition (NSD)

NSD  is an improvement of IsoRank in terms of running time. It is performed by pre-processing two input graphs separately and decomposing the computation of similarity matrix.

## Appendix 0.D Running Time of ATD and OTD.

Here we analyze the speed performance of Ricci flow metric with ATD and OTD in Figure 6. In all settings, the computation time of Ricci flow metric with ATD is up to 3X faster than that of OTD. This is because ATD does not need linear programming computation for computing the optimal transport cost. In fact, most of the computation time in Ricci flow metric by ATD is to compute the all pair shortest path, which can be easily parallelized for further speed improvement. Figure 6: A comparison of computation times between Ricci flow metric with apportioned Ricci curvature and Ollivier Ricci curvature.

## Appendix 0.E More Alignment Results

In the following experiment we consider the case with random edge removal, spectral embedding with dimensions, and up to landmarks. We use Ricci Flow metric with ATD, Hungarian algorithm, and connected equivalence in the following results. Figure 7 shows the results of graph matching on different model networks, when removes edges from respectively. In all the graphs, Ricci flow metric yields the best performance of matching accuracy, even with only or landmarks, and with a large number of removed edges. The accuracy of spring embedding and hop count are low when the number of landmarks is small.

Notice that spectral embedding shows sensitivity with edge removal. In a random regular graph, even with only edge removed, the accuracy drops dramatically. This is because the stability of spectral embedding is highly influenced by the connectivity of the graph. If a graph has more tree-like edges, its spectral embedding is more likely to be affected by edge removal.

Figure 8 illustrates the matching results on real networks. Again, Ricci flow metric performs the best on all of the graphs. Spectral embedding behaves relatively better on real networks than on model networks. This is because real networks do have high clustering coefficient and edges with high Jaccard coefficient (Figure 10(b)). Notice that the matching accuracy of spring embedding and hop count on AS:3967 and protein-protein interaction graph are low, this may be caused by the larger diameter of these two graphs.

In Figure 9, the result of noisy graph alignment using greedy matching instead of Hungarian algorithm is presented. With greedy matching, most of the methods experience performance degradation except for Ricci flow metric. In AS graph (Figure 9(a)), all methods performs poorly with greedy matching because of the graph’s tree like structure and large graph diameter.