3.1. High-Level Overview
In this article, we investigate three pipelines for learning centrality measures, see schematic description in
Figure 1. The pipelines utilize two important building blocks: graph auralization [
20] used in LCGA and LRCGA pipelines and routing betweenness centrality (RBC) [
34] used in LRC and LRCGA pipelines. All pipelines are used to learn arbitrary centrality measures.
In LCGA, we first produce the auralization of nodes by simulating wave propagation through the network (see
Section 3.2 and Algorithm 1). Then, deep convolutions neural network for sound recognition is trained to infer centrality measures from nodes’ waveforms (see
Section 3.3 and Algorithm 2). This approach is applicable to arbitrary graphs.
The second pipeline, LRC (see
Section 3.4 and Algorithms 3 and 4), is only applicable to graphs with high-quality geometric embeddings for which nodes are connected if the distance between their embeddings is lower than some constant threshold. To evaluate this pipeline, we experimented with random geometric graphs (RG) [
35] without relying on geometric embeddings (e.g., [
36,
37]) of arbitrary graphs. To generate a random geometric graph, nodes are randomly positioned in a 2D space. Then, a pair of nodes are connected if and only if their Euclidean distance is smaller than a predefined threshold. Provided node positions in the 2D space, we learned a generic routing policy
to fit arbitrary centrality measures.
R is computed by a fully connected neural network which receives positions of the nodes
and outputs the probability of
u to forward to
v a message sent by
s to
t.
The third pipeline, LRCGA, described in
Section 3.5, combines LCGA with LRC. First, arbitrary graphs are auralized. Then, a deep convolutional neural network is used to infer and compute the routing probabilities from nodes’ waveforms. The neural network architecture used in LRCGA differs from the one used in LCGA, mainly because it handles four waveforms, corresponding to
in parallel.
Next, we elaborate on graph auralization and each one of the centrality learning pipelines.
3.2. Graph Auralization
In this subsection, a waveform generation process is described. Let be a simple undirected unweighted graph where V is a set of n nodes and E is a set of m edges.
Consider some quantity possessed by every node at time t. Intuitively, can be regarded as a potential of the node. is the vector of potentials. Nodes strive to equalize their potential by distributing energy to their neighbours. Please note that, although some physical terms are used here to describe the graph analysis, they are not intended to discuss a real physical phenomenon and lack the rigorousity expected from a physics article.
Let A denote the adjacency matrix of the graph G. Let denote the vector of node degrees. We define a right stochastic matrix as the fraction of u’s energy transferred to v. The more neighbours a node has the less energy it can transfer to each one of them.
The amount of energy every node
u passes to every neighbor
u at time
t is
. In matrix form,
where
is an
matrix with values of
along the main diagonal. Note that
if
u and
v are not neighbors. Next, we introduce momentum by retaining a portion
m of the energy flow from the previous iteration. The energy flow with momentum (from Equation (
2)) is now represented by:
The incoming energy flow of a node
v is
and its outgoing energy flow is
.
Next, we will show that the energy flow defined this way can be formulated as power iterations with momentum:
These power iterations are similar to iterations defined by Xu et al. [
38] with two exceptions. First, instead of only retaining the
m portion of nodes’ values from the previous iteration as defined by Xu et al., Equation (
5) also removes the
m portion of nodes’ values from iteration
. Second, since the largest eigenvalue of
P is one, there is no need to normalize
during the interactions. See the proof of Lemma 1 for details.
Theorem 1 (Slowly converging energy-preserving power iterations)
. Energy flow with momentum according to Equations (3) and (4) converges in connected graphs for as long as with a rate of where . Proof. First, we will show that Equation (
4) can be reformulated as power iterations with momentum. Then we will show that these iterations stabilize and
is the eigenvector of
P corresponding to the largest eigenvalue 1.
Let
1 be a row vector of ones. Summing up matrix rows or columns equals multiplying the matrix by
1 on the left or by
on the right. According to Equation (
3):
Expanding Equation (
4), we obtain:
Since
for any row vector X,
:
Expanding
according to Equation (
3), we obtain:
Finally, we use Equation (
6) to reduce the above expression and obtain Equation (
5).
Note that
P is a right stochastic matrix [
39]. Rearranging the equation, we obtain a second-order matrix difference:
In a matrix form:
Let
. Let
λ denote the eigenvalue of
A. The corresponding eigenvector is
. Therefore,
As a system of equations:
Substituting the second equation into the first and simplifying, we obtain:
Let β denote an eigenvalue of P. Since we assume strongly connected graphs, according to the Perron–Frobenius theorem, P is irreducible. Hence, the largest eigenvalue of P is 1 with a unique eigenvector . There are two eigenvalues of A that satisfy . For , these are and . For any other , . Thus, we conclude that the and is the largest eigenvalue of A.
As
is the only eigenvector of
P corresponding to its largest eigenvalue
, their multiplicity is one. There is no zero component in starting vector
. Therefore, according to the power iteration method,
and
converges as
t becomes sufficiently large [
40]. The convergence rate of
is determined by
.
If , the convergence of the power iterations will be slow since .
If then it becomes the largest eigenvalue of A ( ). In this case, the iterations do not converge.
If the iterations do not converge since is a multiple root. □
By analyzing the eigenvalues and eigenvectors of the second-order matrix difference representation of the diffusion equation in Theorem 1, we have shown that the diffusion process converges to the stationary distribution when .
The stable fixed point of the energy exchange iterations is not of interest to the current article. Let us take a close look at the dynamics of the energy exchange before the process stabilizes (see
Figure 2a). The plot shows the potential levels of nodes from the graph in the first pipeline of
Figure 1. On the first iteration, the potential of
increases the most because it has multiple low-degree neighbours.
The potential of other nodes decreases after the first iteration because they contribute more energy than they receive. It is hard to see from this plot but the energy from node reaches and after the second iteration and then bounces back to because it is the only neighbour of . Nevertheless, it is clear that the location of the nodes within the graph affects the magnitude and direction of the oscillations.
Figure 2b,c shows the oscillations with
and
, respectively. We can see that the stabilization process is significantly prolonged. We can also see in
Figure 2b irregularities caused by interference and reflection as explained in the spectral analysis literature [
41].
Algorithm 1 presents the pseudo-code of graph auralization adapted for PyTorch implementation (the full source code is available on GitHub:
https://github.com/puzis/centrality-learning (accessed on 23 March 2023)). The operator
T is matrix-transpose. The operators
and
aggregate elements of a matrix along the dimension specified by
. The running-time complexity of Algorithm 1 is
where
l is the number of audio samples.
Algorithm 1: Graph auralization |
|
The DC component of the output waveforms (values on which S stabilizes after impulse response) is not of interest. It may also hinder the convergence of sound-recognition models. Furthermore, it is a centrality measure on its own, equal to the eigenvector centrality of the graph when edges are weighted according to the inverse of the source node’s degree (considering P as the adjacency matrix). Thus, we removed the DC component in Line 8 of Algorithm 1 in order to show that the waveform itself bears significant information about the location of a node within the graph.