Graph Distances

Introduction

Graphs are fundamental structures used to represent relationships between objects, making them indispensable in fields like computer science, biology, and network analysis. Comparing two graphs is a complex task that can involve structural, topological, and feature-based analysis. The Distancia package offers several distance measures tailored for graph comparison, helping users analyze differences in structure, node properties, and overall connectivity.

Graph Measures

This section provides a comprehensive list of graph measures supported by our package. These measures are grouped into categories to aid understanding and selection based on specific graph analysis tasks.

Node-Level Measures

These measures describe the importance, influence, or role of individual nodes within the graph.

  1. Betweenness Centrality: Measures how often a node acts as a bridge along the shortest path between two other nodes.

  2. K-Core Number: Indicates the largest subgraph in which all nodes have at least (k) neighbors.

  3. Degree Distribution Distance: Measures the number of edges connected to a node.

  4. Closeness Centrality: Evaluates how close a node is to all other nodes in the graph.

  5. Betweenness Centrality: Quantifies the number of times a node acts as a bridge along the shortest path between two other nodes.

  6. Eigenvector Centrality: Indicates the influence of a node in a network based on its connections to other high-scoring nodes.

  7. Katz Centrality: A variant of eigenvector centrality that incorporates a damping factor.

  8. PageRank: A probabilistic algorithm to measure the importance of nodes.

Edge-Level Measures

These measures assess the importance or characteristics of edges in a graph.

  1. Edge Betweenness: Measures the number of shortest paths that pass through an edge.

  2. Edge Weight: Represents the strength or capacity of a connection between nodes.

Global Graph Measures

These measures provide insights into the overall structure and properties of a graph.

  1. Graph Density: Ratio of actual edges to the maximum possible edges in the graph.

  2. Graph Diameter: The longest shortest path between any two nodes in the graph.

  3. Average Path Length: The mean of all shortest paths in the graph.

  4. Clustering Coefficient: Measures the degree to which nodes in a graph tend to cluster together.

  5. Graph Assortativity: Indicates the tendency of nodes to connect with similar nodes.

  6. Global Efficiency: Measures how efficiently information is exchanged over the graph.

  7. Modularity: Quantifies the strength of division of a graph into modules or communities.

  8. GraphKernelDistance

Community Detection Measures

These measures analyze groups of nodes within a graph.

  1. Community Structure Distance: Identifies groups of nodes with dense internal connections and sparse external connections.

  2. Modularity Optimization: Quantifies the quality of community assignments.

  3. Modularity Score: Quantifies the quality of a graph’s division into communities.

  4. Conductance: Measures the quality of a community by evaluating the ratio of inter-community edges to intra-community edges.

  5. Normalized Cut: Evaluates the separation quality of a graph into subgraphs.

Spectral Measures

These measures are based on the eigenvalues and eigenvectors of matrices associated with the graph.

  1. Spectral Radius: The largest eigenvalue of the adjacency matrix.

  2. Graph Laplacian: Matrix representation used for analyzing graph properties.

  3. Algebraic Connectivity: The second smallest eigenvalue of the Laplacian, indicating graph robustness.

  4. SpectralDistance

Dynamic Graph Measures

These measures capture properties of evolving graphs over time.

  1. Temporal Reachability: Tracks the ability to connect nodes over time-varying edges.

  2. Dynamic Centrality: Adaptations of static centrality measures to dynamic networks.

  3. Temporal Clustering Coefficient: Evaluates clustering in temporal snapshots.

  4. Edge Persistence: Measures the stability of edges over time.

Application-Specific Measures

Measures designed for specific types of graphs or applications.

  1. Shortest Path Length: Often used in transportation and communication networks.

  2. Resistance Distance: Measures connectivity in electrical networks.

  3. Network Flow: Models capacities and bottlenecks in flow-based networks.

  4. Random Walk Centrality: Related to the probability of visiting nodes during random walks.

Graph-Level Measures

  1. Graph Density: Proportion of observed edges to possible edges.

  2. Average Clustering Coefficient: Measures the likelihood of nodes forming tightly connected groups.

  3. Diameter: The longest shortest path between any two nodes in the graph.

  4. Radius: The shortest maximum distance from a central node to any other node.

  5. Modularity: Quantifies the strength of division of a network into communities.

  6. Assortativity: Measures the tendency of nodes to connect to other nodes with similar properties.

Shortest Path Measures

  1. Shortest Path Length: Calculates the shortest path distance between nodes.

  2. Average Path Length: Computes the mean distance between all node pairs.

  3. Eccentricity: Measures the greatest distance from a node to all other nodes.

  4. Comparing Random Walk Stationary Distributions

Other Specialized Measures

  1. Random Walk Betweenness: Measures centrality based on random walk processes.

  2. Resistance Distance: Computes the effective electrical resistance between nodes.

  3. Graph Entropy: Quantifies the information content of a graph.

  4. Graph Edit Distance

  5. WeisfeilerLehmanSimilarity

  6. Diffusion

  7. FrobeniusDistance

  8. PatternBasedDistance

  9. GraphCompressionDistance

Conclusion

The variety of graph distance measures provided by Distancia allows for comprehensive comparisons across different dimensions of graph structure and properties. Whether you’re interested in structural differences, node-level comparisons, or the spectral characteristics of graphs, Distancia offers the right tools for a detailed and insightful analysis. These distances are applicable in numerous fields, from social network analysis to biology, offering flexibility and depth in graph comparison tasks.