Entropy Directed Graphs
Entropy Directed Graphs
Edwin R. Hancock is supported by a Royal Society Wolfson Research Merit Award.
E. Hancock and M. Pelillo (Eds.): SIMBAD 2013, LNCS 7953, pp. 219–234, 2013.
c Springer-Verlag Berlin Heidelberg 2013
220 C. Ye et al.
1 Introduction
Recently there has been considerable interest in analyzing the properties of com-
plex networks since they play a significant role in modelling large-scale systems
in biology, physics and the social sciences. In fact, complex networks provide con-
venient models for complex systems. However, to render such models tractable,
it is essential to have to hand methods for characterizing their salient properties.
As Costa and Rodrigues [7] stated, complex networks are graphs whose connec-
tivity properties deviate from those of regular graphs, which can be defined as
a process of being ’simple’, and the complexity of a network can be understood
as the complement of simplicity. Structural complexity is therefore perhaps the
most important property of a complex network. In order to analyze the features
of a complex network it is imperative that computationally efficient measures are
to hand that can be used to represent and quantify the structural complexity.
In this context graph theoretic methods are often used since they provide
effective tools for characterizing network structure together with the intrinsic
complexity. This approach has lead to the design of several practical methods for
characterizing the global and local structure of undirected networks. However,
there is relatively little work aimed at characterizing directed network struc-
ture. One of the reasons for this is that the graph theory underpinning directed
networks is less developed than that for undirected networks.
The aim in this paper is to explore whether a number of different charac-
terizations developed for undirected graphs can be extended to the domain of
directed graphs, using some recent results from spectral graph theory.
Suppose G(V, E) is a directed graph with vertex set V and edge set E ⊆ V × V ,
then the structure of this graph can be represented by a |V | × |V | adjacency
matrix A as follows (where |V | is the number of vertices in the graph)
1 if (i, j) ∈ E
Aij = (1)
0 otherwise.
The in-degree and out-degree of vertex i are
|V | |V |
din
i = Aji , dout
i = Aij . (2)
j=1 j=1
With these ingredients, the transition matrix P for the directed graph G is
defined as
Entropy and Heterogeneity Measures for Directed Graphs 223
Aij
dout
if (i, j) ∈ E
Pij = i (3)
0 otherwise.
According to the Perron-Frobenius Theorem, for a strongly connected directed
graph, the transition matrix P has a unique left eigenvector φ with φ(i) > 0, ∀i
which satisfies φP = ρφ where ρ denotes the eigenvalue of P . The theorem also
implies that if P is aperiodic, the eigenvalues of P have absolute values smaller
than the leading eigenvalue ρ = 1. Thus any random walk on a directed graph
will converge to a unique stationary distribution if the graph satisfies the prop-
|V |
erties of strong connection and aperiodicity. We normalize φ s.t. i=1 φ(i) = 1,
this normalized vector corresponds to the unique stationary distribution. There-
fore, the probability of a random walk is at vertex i is the sum of all incoming
probabilities of vertices j satisfying (j, i) ∈ E, i.e. φ(i) = j,(j,i)∈E φ(j)Pji , then
we can obtain the following approximate equation
φ(i) din
≈ iin . (4)
φ(j) dj
As stated in Chung [6], if we let Φ = diag(φ(1), φ(2), ...), then the normalized
Laplacian matrix of a directed graph can be defined as
T r[L̃] T r[L̃2 ]
HVUN = − . (7)
|V | |V |2
For undirected graphs, the traces appearing in the above expression can be
approximated by degree statistics, with the result that
1 1 1
HVUN = 1 − − . (8)
|V | |V | 2 di dj
(i,j)∈E
1 1
T r[L̃] = T r[I] − T r[P Φ−1/2 Φ1/2 ] − T r[P T Φ1/2 Φ−1/2 ]
2 2
1 1
= T r[I] − T r[P ] − T r[P T ]. (10)
2 2
The diagonal elements of the transition matrix P are all zeros, hence we obtain
To continue the development we first divide the edge set E into two dis-
joint subsets E1 and E2 , where E1 = {(i, j)|(i, j) ∈ E and (j, i) ∈
/E}, E2 =
{(i,j)|(i, j) ∈ E and (j, i) ∈ E} that satisfy the conditions E1 E2 = E,
E1 E2 = ∅. Then according to the definition of the transition matrix, we
find
|V | |V |
1
T r[P 2 ] = Pij Pji = . (13)
dout dout
i=1 j=1 (i,j)∈E2 i j
φ(i) din
Using (4), i.e. φ(j) ≈ i
din
, we can approximate the von Neumann entropy of a
j
directed graph in terms of the in-degree and out-degree of the vertices as follows
1 1 1 din 1
HVDN = 1 − − + i
− ,
|V | 2|V |2 dout
i dj
out
dj dout
in 2
dout dout
(i,j)∈E i (i,j)∈E1 i j
(15)
or equivalently,
1 1 din 1
HVDN =1− − i
2 + out dout . (16)
|V | 2|V |2 in
dj di out di j
(i,j)∈E (i,j)∈E 2
We can simplify this expression a step further according to the relative sizes of
the sets E1 and E2 .
For weakly directed graphs, |E1 | |E2 |, i.e. few of the edges are not bidi-
rectional, and we can ignore the summation over E1 in (15). Re-writing the
remaining terms in curly braces in terms of a common denominator and then
dividing numerator and denominator by douti dj
out
we obtain
din din
j
1 1 i
i
dout
+ dout
j
HVWND =1− − . (17)
|V | 2|V |2 dout
i dj
in
(i,j)∈E
The first term 1 − |V1 | tends to unity as the graph size becomes large and the
remaining term is normalized by 2|V |2 . In its second term above, the numerator
is given in terms of the sum of the ratios of in-degree and out-degree at the two
vertices. Since the directed edges cannot commence at a sink (a node of zero out-
2
degree), the ratios do not become infinite. Replacing dout
i in the denominator by
din
i dout
i , we obtain the following expression that approximates the von Neumann
entropy for weakly directed graphs
226 C. Ye et al.
1 1 1 1
HVWND =1− − + in out . (18)
|V | 2|V | 2 out
di djin di dj
(i,j)∈E
On the other hand, for strongly directed graphs, there are few bidirectional edges,
i.e. |E2 | |E1 |, and we can ignore the summation over E2 in (16), giving the
approximate entropy for strongly directed graphs
1 1 1
HVSD = 1 − − . (19)
N
|V | 2|V |2 dout
i dj
in
(i,j)∈E
Both the weakly and strongly directed forms of the von Neumann entropy (HVWND
and HVSDN ) contain two terms. The first is the graph size while the second one
depends on the in-degree and out-degree statistics of each pair of vertices linked
by an edge. Moreover, the computational complexity of these expressions is
quadratic in the graph size.
There are a number of points to note concerning the development above. First,
the normalized Laplacian matrix of directed graphs denoted by L̃ in (5) satisfies
Passerini and Severini’s conditions [13] for the density matrix. Moreover, we
have shown that L̃ is Hermitian matrix, so its eigenvalues are all real. Hence
theoretically, the density matrix interpretation of Passerini and Severini [13] can
be extended to directed graphs. Second, when the out-degree and in-degree are
the same at a vertex, then the von Neumann entropy for directed and undirected
graphs are identical.
i ) − f (dj )] .
D
σij = [f (dout in 2
(21)
Entropy and Heterogeneity Measures for Directed Graphs 227
This local heterogeneity measure takes on a value zero when the out-degree of the
starting vertex is the same as the in-degree of the end vertex. On the other hand,
the index should become larger when the difference of both degrees increases,
thus we can select f (d) = d−1/2 . The local heterogeneity index associated with
the irregularity of the edge (i, j) ∈ E in a directed graph is given by
2
1 1
D
σij = − . (22)
dout
i din
j
To compute the global heterogeneity index of a directed graph we sum the local
measure over all the edges in the graph to obtain
1 1
2 1 1 1
D
ρ (G) = − = out + in −2 .
out
di djin di dj di din
out
(i,j)∈E (i,j)∈E (i,j)∈E j
(23)
The heterogeneity index should take on a minimal value when the graph is
regular, i.e. all the vertices have the same in-degree and out-degree. It is maximal
when the graph is a star graph, i.e. there exists a central vertex such that all the
other vertices connect and only connect to it. We calculate the lower and upper
bounds of ρD (G) according to these constraints. For a regular directed graph,
suppose all the vertices have the same in-degree and out-degree d0 , then
1 1 1
ρD (G) = + −2 = 0.
d0 d0 d0
(i,j)∈E (i,j)∈E
On the other hand, for a star graph, suppose that the central vertex has out-
degree (in-degree) |V | − 1 and all the other vertices have in-degree (out-degree)
1. Then,
|V | |V |
1 1 |V |(|V | − 2 |V | − 1)
ρD (G) = ( +1)−2 = ≈ |V |−2 |V | − 1.
i=1
|V | − 1 i=1 |V | − 1 |V | − 1
We hence have the following lower and upper bounds for the heterogeneity index
1 1 2
0 ≤ ρD (G) = out + in − ≤ |V | − 2 |V | − 1. (24)
di dj dout in
(i,j)∈E i dj
1 1 1 2
out + in −
D
ρ̃ (G) = (25)
|V | − 2 |V | − 1 di dj
(i,j)∈E dout din i j
This index is zero for regular directed graphs, one for star graphs, i.e. 0 ≤
ρ̃D (G) ≤ 1.
228 C. Ye et al.
or in matrix form,
∞
Z= (P t − 1φ) (27)
t=0
where P is the transition matrix, 1 = (1, ..., 1)T and φ is the stationary distri-
bution.
The formulae for hitting time and commute time are
Zjj − Zij Zjj − Zij Zii − Zji
QD
ij = , D
Cij = QD D
ij + Qji = + . (28)
φ(j) φ(j) φ(i)
1 1 1 2
ρ̃U (G) = + − . (29)
|V | − 2 |V | − 1 (i,j)∈E i
d dj di dj
Recently, von Luxburg et al. [17] have shown that if the graph size is large
enough, then the hitting time and commute time can be approximated by the
resistance distance whichtakes on a simple form in terms of the vertex degree.
U
In particular, Cij ≈ vol d1i + d1j where vol is the volume of graph defined
|V |
by vol = i=1 di . As a result the first term appearing in the expression for
Estrada’s heterogeneity index can be expressed in terms of commute time.
To take this development one step further, we note that the normalized ad-
jacency matrix for an undirected graph is given by à = D−1/2 AD−1/2 where
D is the diagonal matrix of vertex degrees. The normalized adjacency matrix
has elements Ãij = √ 1 , if (i, j) ∈ E. As a result, in the heterogeneity index
di dj
Entropy and Heterogeneity Measures for Directed Graphs 229
U
Cij
formula, if we make the substitutions 1
di + 1
dj = vol and √ 1 = Ãij we obtain
di dj
the approximation
1 CijU
ρ̃ (G) ≈
U
− 2Ãij . (30)
|V | − 2 |V | − 1 (i,j)∈E vol
1 1 Cij
D
+ ≈ (31)
dout
i din
j vol
(i,j)∈E (i,j)∈E
1 CijD
ρ̃D (G) ≈ − 2A˜D ij . (32)
|V | − 2 |V | − 1 (i,j)∈E vol
Thus we have shown that this relationship between heterogeneity index and
commute time applies not only to undirected graphs but also to directed graphs.
Hence for both directed and undirected graphs, if the heterogeneity index
is chosen in an appropriate way then there are two observations that can be
drawn from this analysis. First, the heterogeneity index is proportional to the
average commute time over pairs of nodes connected by an edge. Second, the
heterogeneity index is greatest when the difference between the commute time
and the twice the normalized adjacency matrix element is greatest. Hence, the
heterogeneity index will be smallest for regular graphs and greatest for trees or
star graphs.
1 1
0.9
0.9
entropy
entropy
0.85
0.85
0.8
0.8
0.75
0.7 0.75
0 20 40 60 80 100 0 20 40 60 80 100
time time
(a) (b)
We see in both Fig.1(a) and Fig.1(b), as the network evolves, both the simpli-
fied form and the reference entropy increase approximately monotonically until
a plateaux value of unity is reached. Moreover, it is worth noting that the dif-
ference between these two quantities is negligible, thus we conclude that for
Entropy and Heterogeneity Measures for Directed Graphs 231
weakly (strongly) directed graphs, the approximate von Neumann entropy and
the simplified weakly (strongly) directed form we suggested are approximately
equivalent.
We then explore whether the von Neumann entropy can be used to distinguish
different types of graph. To this end we create directed versions of the Erdos-
Renyi, ’small-world’ and ’scale-free’ graphs by deleting at random elements from
the adjacency matrix. This has the effect of creating directed edges. In this
analysis we consider the quantity
1 1 1 din
J = HV N − (1 −
D
)= + i
|V | 2|V |2 out
di djout
din dout2
j i
(i,j)∈E (i,j)∈E 2
6 5
Erdos−Renyi Erdos−Renyi
small−world 4.5 small−world
scale−free scale−free
5
4
3.5
4
3
frequency
frequency
3 2.5
2
2
1.5
1
1
0.5
0 0
0 1 2 3 4 5 6 7 8 0 1 2 3 4 5
approximate von Neumann entropy −3
x 10 approximate von Neumann entropy −3
x 10
(a) (b)
In the left-hand of Fig.2, the plot shows superimposed histograms of J for each
of the three types of directed graph. The main feature to note is that the Erdos-
Renyi graphs are well separated from the ’small-world’ and ’scale-free’ graphs.
Moreover, the ’scale-free’ and ’small-world’ networks although overlapped are
reasonably well separated. The right-hand panel of Fig.2 repeats this analysis
for the undirected versions of the three types of graph, using the original form of
the von Neumann entropy suggested by Han et al. [12]. Here there is significantly
more overlap, and the different types of network can not be easily separated,
especially for the ’small-world’ and ’scale-free’ networks.
We have shown theoretically that the heterogeneity index has a linear depen-
dance on the the commute time for both undirected and directed graphs. In
this subsection we aim to confirm these results empirically. In Fig.3 we plot the
232 C. Ye et al.
heterogeneity index versus commute time for different types of graphs. Here the
commute time of undirected graphs is calculated precisely using the graph spec-
tral formula used by Qiu and Hancock [14]. Figure 3(a) shows the result for the
Erdos-Renyi, ’small-world’ and ’scale-free’ graphs (shown in different colours).
All three types of graphs follow a linear trend (i.e. they satisfy our theoretical
prediction), but populate different parts of the ’heterogeneity-commute time’
space. The second plot is for the protein-protein interaction networks. Although
there are some outliers, most of the data falls in a linear regression curve. In fact,
these outliers represent the graphs with particularly small graph size (e.g. 6 or
8), which is too small compared with others, thus these graphs do not perform
the similar relation as other graphs do. Then we turn our attention to Fig.3(c),
which is the plot of heterogeneity index versus average commute time for the
directed graphs in the evolving sequence. The commute time here is computed
according to (28). For the tightly clustered points in the upper right-hand cor-
ner of the plot, there is again a clear linear relationship, which confirms our
theoretical prediction in (32).
Finally we explore the performance of directed graph characterization us-
ing the heterogeneity index. The histogram of the directed graph heterogeneity
index is shown in Fig.4. In the histogram the ’scale-free’ graphs are perfectly
Erdos−Renyi
0.2 0.2
commute time & normalized adjacency matrix
0.25 small−world
scale−free
0.1 0
0.2
0 −0.2
−0.3 −0.8
0.05
−0.4 −1
0
−0.5 −1.2
Erdos−Renyi
6 small−world
scale−free
5
frequency
0
0 0.1 0.2 0.3 0.4 0.5
heterogeneity index
separated from the Erdos-Renyi and ’small-world’ graphs. The result is not un-
expected since for ’scale-free’ graphs, the difference in the vertex in-degrees and
out-degrees is particularly large, and the heterogeneity index of such graphs is
greater than that for other types of graphs.
5 Conclusion
In this paper, motivated by the aim of developing novel and effective methods
for quantifying the structural complexity of directed graphs, first we have devel-
oped approximations of the von Neumann entropy for both strongly and weakly
directed graphs. They both depend on the vertex in-degree and out-degree statis-
tics. Our approximations are based on using Chung’s definition of normalized
Laplacian matrix of directed graphs and simplifying the calculation via replac-
ing the Shannon entropy by the quadratic entropy. Next, following the idea of
developing the heterogeneity index for undirected graphs proposed by Estrada
[10], we construct a similar measure which quantifies the heterogeneous proper-
ties of directed graphs. Moreover, concerning the commute time (or resistance
distance), we have found that on an undirected graph, the heterogeneity index
has a particular relation with it. Extending this correlation to directed graphs,
we have discovered that they also exhibit a similar behaviour, which shows that
the heterogeneity index can be approximated by the commute time and the nor-
malized adjacency matrix. Then, in order to evaluate these methods and analyze
their properties, we have undertaken some experiments on both undirected and
directed network data and the experimental outcomes have demonstrated the
effectiveness of our methods. In the future, our work can be extended by intro-
ducing more approaches to improving the measures we proposed in this paper
for representing the structural complexity for directed graphs, and developing
more novel indices which can reflect a directed graph’s structure based on the
entropy and heterogeneity index.
References
1. Amancio, D.R., Oliveira Jr., O.N., Costa, [Link] F.: On the Concepts of Complex
Networks to Quantify the Difficulty in Finding the Way Out of Labyrinths. Physica
A 390, 4673–4683 (2011)
2. Antiqueira, L., Rodrigues, F.A., Costa, [Link] F.: Modeling Connectivity in Terms
of Network Activity. Journal of Statistical Mechanics: Theory and Experi-
ment 0905.4706 (2009)
3. Barabasi, A.L., Albert, R.: Emergence of Scaling in Random Networks. Science 286,
509–512 (1999)
4. Berwanger, D., Gradel, E., Kaiser, L., Rabinovich, R.: Entanglement and the Com-
plexity of Directed Graphs. Theoretical Computer Science 463, 2–25 (2012)
234 C. Ye et al.
5. Boley, D., Ranjan, G., Zhang, Z.: Commute Times for a Directed Graph Using an
Asymmetric Laplacian. Linear Algebra and Its Applications 435, 224–242 (2011)
6. Chung, F.: Laplacians and the Cheeger Inequailty for Directed Graphs. Annals of
Combinatorics 9, 1–19 (2005)
7. Costa, [Link] F., Rodrigues, F.A.: Seeking for Simplicity in Complex Networks.
Europhysics Letters 85, 48001 (2009)
8. Escolano, F., Hancock, E.R., Lozano, M.A.: Heat Diffusion: Thermodynamic Depth
Complexity of Networks. Physical Review E 85, 036206 (2012)
9. Escolano, F., Bonev, B., Hancock, E.R.: Heat Flow-Thermodynamic Depth Com-
plexity in Directed Networks. In: Gimel’farb, G., Hancock, E., Imiya, A., Kuijper,
A., Kudo, M., Omachi, S., Windeatt, T., Yamada, K. (eds.) SSPR&SPR 2012.
LNCS, vol. 7626, pp. 190–198. Springer, Heidelberg (2012)
10. Estrada, E.: Quantifying Network Heterogeneity. Physical Review E 82, 066102
(2010)
11. Franceschini, A., Szklarczyk, D., Frankild, S., Kuhn, M., Simonovic, M., Roth,
A., Lin, J., Minguez, P., Bork, P., von Mering, C., Jensen, L.J.: STRING v9.1:
protein-protein interaction networks, with increased coverage and integration. Nu-
cleic Acids Res. 41, D808–D815 (2013)
12. Han, L., Escolano, F., Hancock, E.R., Wilson, R.C.: Graph Characterizations from
Von Neumann Entropy. Pattern Recognition Letters 33, 1958–1967 (2012)
13. Passerini, F., Severini, S.: The Von Neumann Entropy of Networks. International
Journal of Agent Technologies and Systems, 58–67 (2008)
14. Qiu, H., Hancock, E.R.: Clustering and Embedding Using Commute Times. IEEE
Transactions on Pattern Analysis and Machine Intelligence 29, 1873–1890 (2007)
15. Ren, P., Wilson, R.C., Hancock, E.R.: Graph Characterization via Ihara Coeffi-
cients. IEEE Transactions on Neural Networks 22, 233–245 (2011)
16. Riis, S.: Graph Entropy, Network Coding and Guessing Games. The Computing
Research Repository 0711.4175 (2007)
17. von Luxburg, U., Radl, A., Hein, M.: Hitting and Commute Times in Large Graphs
are often Misleading. Data Structures and Algorithms 1003.1266 (2010)
18. Watts, D.J., Strogatz, S.H.: Collective Dynamics of ’Small-World’ Networks. Na-
ture 393, 440–442 (1998)
19. Xiao, B., Hancock, E.R., Wilson, R.C.: Graph Characteristics from the Heat Kernel
Trace. Pattern Recognition 42, 2589–2606 (2009)