Sei sulla pagina 1di 22

Exploiting symmetry in complex network analysis

Rubén J. Sánchez Garcı́a1*


1 Mathematical Sciences, University of Southampton, University Road, Southampton SO17 1BJ, United Kingdom
* R.Sanchez-Garcia@soton.ac.uk

ABSTRACT

Virtually all network analyses involve structural measures or metrics between pairs of vertices, or of the vertices themselves.
The large amount of redundancy present in real-world complex networks is inherited by such measures, and this has practical
consequences which have not yet been explored in full generality, nor systematically exploited by network practitioners. Here
we present a complete theory for the study of symmetry in empirical networks and their effects on arbitrary network measures,
and show how this can be exploited in practice in a number of ways, from redundancy compression, to computational reduction.
arXiv:1803.06915v2 [math.CO] 9 Jul 2018

We also uncover the spectral signatures of symmetry for an arbitrary network measure such as the graph Laplacian. Computing
and decomposing network symmetries is very efficient in practice, and we test real-world examples up to several million nodes.
We illustrate our methods with some popular network measures. Our results are widely applicable, and place previous work on
network symmetry in a common framework.

Network models of real-world complex systems have been work measure, such as the graph Laplacian (Fig. 5). Moreover,
extremely successful at revealing structural and dynamical symmetry can be exploited to compute the full spectrum of a
properties of these systems1 . The success of this approach network in a fraction (typically 30-70%) of the time (Fig. 4).
is due to its simplicity, versatility, and surprising universal- We show that computing network symmetries and motifs is
ity, with common properties and principles shared by many very efficient in practice, testing real-world examples up to
disparate systems2–4 . several million nodes (Table 1). Our theoretical framework
One property of interest is the presence of structural re- generalise10, 11 and helps understand other network symmetry
dundancies, which manifest themselves as symmetries in a results thereafter18–23 .
network model. Symmetries relate to system robustness5, 6 , as
they identify structurally equivalent nodes, and can arise from Results
replicative growth processes such as duplication7 , evolution
Symmetry in complex networks
from basic principles8 , or functional optimisation9 . It has
The notion of network symmetry is captured by the mathemat-
been shown that real-world networks possess a large number
ical concept of graph automorphism24 . This is a permutation
of symmetries10 , and that this has important consequences for
of the vertices (nodes) preserving adjacency (Fig. 1), and can
network structural10 , spectral11 and dynamical properties, for
be expressed in matrix form using the adjacency matrix of the
instance cluster synchronisation12–17 .
network. If a network (mathematically, a finite simple graph)
Crucially, network symmetries are inherited by any measure G has n vertices, labelled 1 to n, its adjacency matrix A is
or metric on the network, that is, any structural measurement an n × n matrix with (i, j)-entry 1 if there is an edge between
between pairs of vertices (such as distances), vertex-valued nodes i and j, and zero otherwise. A graph automorphism σ
measurements (such as centrality) or even matrices derived is then a permutation, or relabelling, of the vertices v 7→ σ (v)
from the network (such as the graph Laplacian). However, the such that (σ (i), σ ( j)) is an edge only if (i, j) is an edge, or,
effects of symmetry on arbitrary network measures is not yet equivalently, ai j = aσ (i)σ ( j) for all i, j. In matrix terms, this
fully exploited in network analysis. can be written as
In this article, we construct a complete framework for the AP = PA , (1)
study of symmetry in arbitrary network measures, and illus-
where P is the permutation matrix corresponding to σ , that
trate its applicability in several important examples. We show
is, the matrix with (i, j)-entry 1 if σ (i) = j, and 0 otherwise.
how a network representation of a pairwise measure inherits
The automorphisms of a graph form a mathematical structure
the same decomposition into symmetric motifs (subgraphs
called a group, the automorphism group of G . In principle,
where the symmetry is generated) and orbits (subsets of struc-
any (finite) group G is the automorphism group of some graph
turally equivalent nodes), and how to use the network quotient
G 24 , but, in practice, real-world networks exhibit very specific
to eliminate redundancies. This leads to lossless compression,
types of symmetries generated at some small subgraphs called
and computational reduction, algorithms achieving remark-
symmetric motifs10 . We can partition the vertex set into the
able space (up to 74%) and time (up to 89%) savings in our
asymmetric core of fixed points V0 (an automorphism σ moves
test networks (Table 1, Figs. 3, 4). We generalise the spectral
a vertex i ∈ V if σ (i) 6= i, and fixes it otherwise), and the vertex
decomposition in11 to arbitrary network measures, uncovering
sets Mi of the symmetric motifs,
the spectral signatures of symmetry and thus predicting and
explaining most of the discrete part of the spectrum of a net- V = V0 ∪ M1 ∪ . . . ∪ Mm , (2)
1 to n, and an edge (link) from node i to node j with weight
ai j Empirically (10),
nomost
suchsymmetric
edge if ai jmotifs of real-world net-
1.3 0.70
9 if ai j 6= 0, and = 0. This means that
1.
works are made of orbits of the same size with the geometric

0.2
M2 87
0.05 0.75 an automorphism does not only preserve edges, but also their

1
1.
87 M7 factor realising every possible permutation of the vertices in
M3 weights and directions. This may not be a realistic assumption

1
each orbit, while fixing vertices outside the motif (Fig. 1).

0.2
M1 3 9
1. 0.70 for real-world
Such motifs areweighted networks,
called basic wheremotifs
symmetric the weights
(BSMs), often
and
1.59 M6 have a very constrained structure (e.g. each orbit has to be
come from observational or experimental data, but it applies
2.29 M5
either
to an empty
the matrix or a complete
representing graph).structural
a network Non-basic symmetric
measure, as
motifs
we (typically
explain next. branched trees) are called complex; they are
2.29 rare (Table 2), and can be studied on a case-by-case basis.
1.59 The definition
Structural networkof network
measuresautomorphism, Eq. (1), carries
M4
to (pairwise)
A an arbitrary n ◊ n real
structural matrixmeasure
network A = (aijis).a Such matrix
function F(i,can
j)
be pairs
on seen as
of the adjacency
vertices whichmatrix
dependsof aonnetwork with n
the network vertices
structure
labelled
alone, 1 not,
and to n,forand an edge
example, on(link)
node or from
edgenode i toornode
labels, otherj
with weight aij if aij ”= 0, and no such edge if aij = 0. This
Aut(G) = S2 ◊ S2 ◊ S3 ◊ S4 ◊ S2 ◊ (S2 Ó S2 ) meta-data. Most network measures are structural, including
means that an automorphism does not only preserve edges,
graph metrics (e.g. shortest path, resistance), and matrices
but also their weights and directions. This may not be a
algebraically derived for
realistic assumption from the adjacency
real-world matrix
weighted (e.g. commu-
networks, where
the weights often come from observational or experimental
nicability, Laplacian matrix). (We identify matrices M with
data, butmeasures
pairwise it appliesviatoF(i,
thej)matrix
= [M]i jrepresenting
.) Crucially, astructural
network
structural measure, as we explain next. or labelling of the
measures are independent of the ordering
vertices and hence satisfy, for any automorphism σ ∈ Aut(G ),
Figure 1. Toy example of a symmetric network. (Top) Structural measures. A (pairwise) structural network measure
Fig. 1. (Top) Toy example of a symmetric network. Decomposition into a symmetric
Decomposition into7 asymmetric
core (white nodes) and core
symmetric motifs (white
coloured by nodes) and 7 symmetric
orbits of structurally equivalent
is a function (i, j)
F(σF(i), σ (on
j)) pairs
= F(i,ofj)vertices
for all i,which
j ∈ V.depends(3)on
motifs
nodes. Allcoloured bybasic
motifs are orbits of structurally
except M7 (a tree). Aequivalent
vertex measurenodes.
(hereAll
subgraph the network structure alone, and not, for example, on node
centralityare
motifs shown onexcept
basic M1 ) is M
constant on orbits.
7 (a tree). Inset:measure
A vertex A pairwise measure (here
(here or edge
(One canlabels, or other
take this meta-data.
as the Mostdefinition
mathematical network measures
of struc-
communicability shown25near M1 ) inherits all the network symmetries. (Middle)
subgraph centrality shown on M1 ) is constant on orbits. Inset: A are structural,
tural measure.) In including
contrast,graph metrics
functions (e.g. shortest
depending, path,
explicitly or
Geometric decomposition of its automorphism group. (Bottom) Quotient network
resistance),onand
implicitly, somematrices
vertexalgebraically derived from
ordering or labelling, thestruc-
are not adja-

T
pairwise measure (here communicability shown near M1 ) inherits all
skeleton (no loops, edge directions or weights shown).
the network symmetries. (Bottom) Quotient network (no loops, edge cency for
tural, matrix, such the
example as the communicability,
shortest or the Laplacian
path length through a given
directions, or weights shown). matrix.
node, or (We identify
a measure matricesa M
involving with pairwise
‘source’, ‘target’, measures via
or any other
In principle, any (finite) group G is the automorphism group F (i, j)
node or=edge
[M ]meta-data.
ij .) Crucially, structural measures are indepen-
Our results can still can be adapted to
of some graph G (21), but, in practice, real-world networks
F dent of the ordering or labelling of the vertices and hence
the presence of node or edge labels, or weights, by restricting
satisfy, for any automorphism ‡ œ Aut(G),
exhibit
as shownvery specific
in Fig. 1 fortypes
a toyofexample.
symmetries of the form to automorphisms preserving the additional structure. For
F (‡(i), =F (i,unlabelled
j) for all i, [5]
RA
Real-world networks Aut(G) = H1 ◊exhibit
typically ... ◊ H am core of fixed points, [2] simplicity, here we ‡(j))
discuss the case
j œonly.
V.
and a large number of relatively small symmetric motifs, We can encode a structural measure F as a network with
with each factor Hi a symmetry
symmetric is group, or a wreath product (One can take
adjacency this[F(A)]
matrix as the =mathematical definition
F(i, j), and write (3) inofmatrix
struc-
where all the network generated, and hence the
tural measure.) In contrast, functions depending, explicitly
ij
of symmetric groups (10). Equation 2 is
size of the automorphism group is often extremely large, in called the geometric form as
decomposition of Aut(G), and each Hi a geometric factor. We or implicitly, on some vertex ordering or labelling, are not
stark contrast to random graphs, typically asymmetric10 . How- structural, for example F(A)theP= P F(A),path length through
shortest (4)a
have an associated partition of the vertex set
ever, each symmetry is the product (composition) of automor- given node,
where or permutation
P is the a measure involving a ‘source’ or to
matrix corresponding ‘target’,
σ . That or
phisms permutingVa = very
V0 small
fi M1 fi number
. . . fi Mof m vertices within [3] a anya other node or edge meta-data. Our ),results canallstill
thecan be
D

is, network representation of F, F(G inherits sym-


symmetric motif (Fig. 1). adapted of
metries to the presence
G , and hence of node
has theor edge
samelabels by restricting
decomposition to
into
where V0 are the (global) fixed vertices, and Mi is the set of automorphisms preserving the additional structure (SI). For
Each symmetric motif can be further subdivided into orbits symmetric motifs (2), and orbits. The BSMs in F(G ) oc-
vertices moved by the automorphisms in Hi (an automorphism simplicity, here we discuss the unlabelled case only.
of structurally
‡ moves a vertexequivalent nodes
i œ V if ‡(i) ”= (shown
i, and fixes by colour in Fig. We
it otherwise). 1). curWe on can
the same vertices Mi although they are now all-to-all
encode a structural measure F as a network with
call the graph Mi induced by Mi a symmetric motif, and G0 ,
As vertices in the same orbit are structurally indistinguish- weighted
adjacency matrix [F (A)]ij = F (i, j),1 and
subgraphs in general (Fig. inset).
write Nevetheless,
Eq. (5) in
the graph
able, orbitsinduced
contribute by Vto0 ,network
the asymmetric
redundancy of global
coreand thus tofixed
the matrix form as
they have a very constrained structure: the intra and inter orbit
vertices of G
robustness of (Fig. 1).
the underlying system. connectivity depends Fon(A) two P = P F (A),
parameters only (Fig. 2). [6]
Real-world networks
Empirically typically exhibit
10 , most symmetric motifs a core of fixed points,
of real-world net- The results in this article apply to arbitrary structural mea-
and a large number of symmetric motifs, where P is the permutation matrix corresponding to ‡. That
works are made of orbits of the same sizewhere
with all
thethe network
geometric sures, althoughrepresentation
is, a network the two most common of F , F (G),cases in practice
inherits all thearesym-
the
symmetry
factor is generated,
realising and hence
every possible the size of the
permutation automorphism
of the vertices in 6 ∈
group is often extremely large, in stark contrast to random metries of G (Fig. 1), and hence has the same geometric
following. We call F full if F(i, j) = 0 for most i, j V (e.g. a
each orbit, while fixing vertices outside the motif (Fig. 1).
graphs, typically asymmetric (10). However, each symmetry is decomposition Eq. (2), partition into fixed ipoints
graph metric), and sparse if F(i, j) = 0 if a j = 0, and sym-
for most
Such motifs are called basic symmetric motifs (BSMs), and
the product (composition) of automorphisms permuting a very metric
i, j ∈ V motifs Eq.graph
(e.g. the (3), and orbits Eq.
Laplacian). The(4).
graphAlthough induced
representation
have a very constrained
small number of vertices structure (e.g. each orbit
within a symmetric motif has to1).
(Fig. be by F(G
of the same
) is anvertex set weighted
all-to-all Mi , the BSMs graph in if F (G) are and
is full, nowhas com-
a
Each symmetric motif can be further subdivided into orbits
either an empty or a complete graph). Non-basic symmetric plete weighted
sparsity similargraphs
to G ifinF general,
is sparse.yet with a very constrained
of structurally
motifs (typicallyequivalent
branchednodes trees) (Fig.
are called 1), complex; they are structure
From now (Fig.
on,2),
wewhich we willthat
will assume exploit
G isinundirected
what follows. and F is
rare (Table 1), and can be studied on a case-by-case basis. TypicallyF(i,
symmetric, F (i,j)j)=”=F( 0 for
j, i),most
which œ V not
i, jmay (e.g.bea the
graph
casemetric)
even
i = Vi
(1) (m )
[4] and we call such F a full measure, whose network represen-
The definition ofMnetwork fi . . . fi Vi i . (1) carries to an
automorphism if G is undirected (e.g. the transition probability of a random
tation F (G) is an aall-to-all
ij weighted graph. However, our
arbitrary
As verticesn ×innthe
realsame
matrix
orbitA= are(astructurally
i j ). Such matrix can be seen
indistinguishable,
walker F(i, j) = deg(i)
framework also applies
), to
andsparse
discuss directed networks and
measures, that is, with a
orbits
as contributematrix
the adjacency to network redundancy
of a network with nand relate
vertices to the
labelled similar sparsity
asymmetric to theinoriginal
measures graph: FInformation.
the Supporting (i, j) = 0 if aij = 0,
robustness of the underlying system. for most i, j œ V (e.g. the graph Laplacian).
2/22
2 | www.pnas.org/cgi/doi/10.1073/pnas.XXXXXXXXXX Sánchez-García
— —
(n ≠ 1)– + — We100
can%show exact recovery between vertices in different
CaliforniaRoads
– ” symmetric motifs,
– ““
90 % USPowerGrid LiveJournal

Compression ratio (n2Q /n2G )


1 1
HumanPPI Amazon
– – “ ” 80 % aij = bkl = blk , InternetAS-skitter [8]
“ nl nk
– 70 % Astro-Ph
(n ≠ 1)“ + ” where node i, respectively
OpenFlights
j, belongs to an orbit of size nk , re-


– “
” Yeast
— — spectively
60 % nl , in different symmetric motifs (see SI). If we call
(a) (b) (c)
edges between
50 % vertices in different symmetric motifs external
WordNet

and otherwise (intra-motif edges) internal, Eq. (8) covers all


Fig. 2. (a) Every orbit in a BSM is an (–, —)-uniform graph Kn –,—
, the graph with n 40 %
Figure 2. Structure of a BSM for an arbitrary network external edges, which in turn InternetAS account for the vast majority of
vertices and adjacency matrix aij = – = F (i, j) if i ”= j and aii = — = F (i, i).
measure F. (a) Every orbit in a BSM is
(b) The connectivity between two orbits 1 and 2 in the same BSMgraph an (α, β )-uniform (after a edges, 30
or vertex pairs, in a typical network
% HumanDisease (Table 2). Since
Actors
α,β
suitable
Kn , the relabelling
graph with 1 = 2 = {wmatrix
vn },adjacency
{v1 , . . . ,and
n vertices An=})(a
1, . . . , w isi given
j ) withby Eq. (8)20 involves
% orbit sizes, we use the term annotated quo-
“a = =F (v
α i= j ) forj)
, wF(i, i ”= , and
if ij6= ” = aF (v i , wi ), the (”, “)-uniform join of the two tient to refer to the quotient together with some predicted additional
ij j and ii = β = F(i, i). (b) The connectivity
orbits. (c) In the quotient, the BSM orbit becomes a single vertex with a self-loop
between two orbits ∆ and ∆2 in the same BSM (after a suitable vertex 10(or%edge) annotations, in this case the orbitactual sizes nk .
weighted by (n ≠ 1)– + 1— , and the two orbits are joined by an edge weighted by
relabelling
(n ≠ 1)“ + ” .∆Note {v1 ,by. . annotating
1 = that, . , vn }, ∆2each = {w 1 , .in. .the
orbit n }) is given
, wquotient by– (or — ),
by n and Exact recovery
0% within the a BSM can also be done, through
and
γ =each
F(vintra-motif
i , w j ) foredge
i 6
= byj, and
“ (or ”
δ ),=we can
F(v recover
,
i iw ), theeach
(δBSM
, exactly.
γ)-uniform join of annotation (Fig. 102).
6 107 108 109 1010 1011 1012 1013 1014

the two orbits. (c) In the quotient, the BSM orbit becomes a single There is no general recovery procedure Size (n2G ) for complex motifs.
Table
vertex with1.aRedundant spectra of
self-loop weighted byBSMs with+one
(n − 1)α or two
β , and the orbits
two orbits However, as most symmetric motifs in real-world networks (and
are joined by an edge weighted by (n − 1)γ + δ . Note that, by therefore in F (G)) are basic, we can guarantee full recovery,
BSM eigenvalues mult eigenvectors
annotating each orbit in the quotient by n and α (or β ), and each
Figure
and retain3. Redundancy in network
most of the symmetry measures. Symmetry
compression, by working
K
intra-motif edge n by γ (or δ ), we can recover each BSMefrom
–,—
≠– + — n ≠ 1 i the with the basic quotient, which leaves the (Table
lossless compression ratios of our test networks non-basic motifs
1) obtained
quotient.–1 ,—2 “,” –2 ,—2 ≠b ≠ Ÿ1 c n≠1 (Ÿ1 ei | ei ) unchanged
by eliminating (bytheconsidering their vertices
inherited redundancy
2
in anasarbitrary
fixed points). This
full network
Kn Ωæ Kn ≠b ≠ Ÿ2 c n≠1 (Ÿ2 ei | ei ) achieves
measure. lossless compression
The predicted with
values, cfull = ñthe compression
Qbasic , coincide (upratio
to cfull
in Tablewith
0.01%) 2 for
thefull measures
actual (or m̃Q for ratios
lossless compression sparseofmeasures),
the shortest as
Redundancy in network measures illustrated
path distance,in and
Fig.communicability
3. (exponential matrix), for our
Here ei is the vector with non-zero entries 1 at position 1 and ≠1 at The seven
smallest quotient also (memory
networks reduces limit the actual computation
in our computer). Afterof a
The formal
position i (2 Æprocedure
i Æ n), Ÿ1 and to quantify
Ÿ2 are theandtwoeliminate
solutions ofstructural re-
the quadratic network measure between csparse = m̃Q and cfull (Table
decompression, we recover the original matrix exactly for the2), the
dundancies
equation
= “graph
cthe
cŸ2 +in
≠ ”, and

for full
symmetric,
a network
(≠a
(v|w)
with
+ b)Ÿ ≠ c is
onerepresents

details).
F (i, j) =
often significantly
vertex per
=0

F (j, i),(in
smaller
via
where
concatenation
FT
the aquotient
= –1 ≠ —network.
orbit or fixed
bottom) and edges representing orbits connectivity (see Meth-
odsFrom now we willThe assume thatofG real-world
quotients
which
vertexmayandnot
1 , b = –2 ≠
of vectors.
This
point (see Fig. 1,

is undirected
be size)
edge
and Fare
networks
the casethaneven
is
—2 and

the
is
fraction of vertex pairs we need to evaluate F on. However, the
shortest

Quotient
path
(1.16 × 10−4on
calculation
distance,
mean

putational recovery
reductiondoes
and
eachrelative

ratio not
up to
pair Ferror)
a

hold for
of between
small
(i, j) for
is still
numerical
communicability.
network G. Alternatively, if we can perform the calculation
of F in the quotient instead, we call F quotient recoverable.
m̃Qallandnetwork
error
performed on the whole

measures
ñ2Q (Table 1) for
ifparent
G is undirected
networks10,(e.g. the transition probability of a random
18 (Table 1), and this reduction quantifies (SI), butrespectively
sparse, it does for some important
full, network cases (seeOfApplications).
measures. course, this
RA
walker F (i, j) redundancy
the structural = deg(i)
aij
), and discuss
present in a directed networks and
network model. Since
assumesthethat
quotient is often significantly
the computation smaller
on each pair (Table F(i,
of vertices 2), the
j)
asymmetric measures in the SI.
We can use the quotient network to eliminate the symmetry- computational
is independent gain
of oneof another,
evaluating F onisaoften
which smallernotgraph
the can
case.
be considerable
Moreover, (Fig. 4), of
the calculation forF(i,
example ñ2Q performed
j) is still for a measure
on the of
induced redundancies inherited by an arbitrary network mea-
Network quotient. The formal procedure to eliminate redun- quadratic complexity on the number of vertices).
sure F, which present themselves as repeated whole network G .
dancies is via the quotient network. This is avalues
reductionby Eq. (3).
proce-
dure
The consisting
amount ofinsymmetry-induced
partitioning the vertex set V = inherited
redundancy V1 fi. . .fiVby m,
A more
Spectral Symmetries have
substantial computational
decomposition. also a profound
reduction can be ob- ef-
and then constructing
a network measure cana be new graph (the In
remarkable: quotient
our testgraph) with
networks, fect
tainedonbynetwork
evaluating spectrum
F on the (11), which,
(often muchinsmaller)
turn, relates
quotient to
wevertices such to that
70%there is an edge due fromtovertex k to vertex anetwork
multitude of structural
We call and dynamical properties if itof can
the
D

m found up of redundancy symmetry alone instead. F quotient recoverable


weighted
l(Fig. 3). by the average connectivity from Vk to Vl . More network
be applied (1). Ourquotient
to the main result
networkis aQ,spectral
and F(Gdecomposition
) can be re-
precisely,
A simple if A = (aij ) is
algorithm the adjacency
(Methods) matrix
eliminates of the
these graph,
redundan- generalising the one in (11) to (undirected)
covered from F(Q), for all networks G . Note that this weighted networks
may
the quotient network (22) with respect to
cies and achieves exact recovery for external edges (betweenthe partition above with symmetries such as F (G). It decouples the
involve, beyond evaluating F(Q), an independent (hence par- contributions
isvertices
the graph with m ◊ m adjacency matrix B = (b kl ) given by to the spectrum
allelizable) from the
computation onquotient, and from
each symmetric the(typically
motif symmet-
in different symmetric motifs) and average recovery
1 ÿ in the same symmetric ric motifs. It states that we can find an eigenbasis of the
for internal edges (between a very small graph). We illustrate quotient recoverability on
bkl = verticesaij , [7] form {Sv1 , . . . , Svm , w1 , . . . , wn≠m }, where {v1 , . . . , vm } is
motif). Note that the vast majority |V k| of edges in the network several popular network measures in the Applications section.
iœVk any eigenbasis of the quotient network, Svi is the vector vi
representation of a network measure jœVl are external (at least By evaluating
lifted F in network
to the parent the quotient network,entries
by repeating we canonobtain very
each orbit,
the averageforconnectivity
99.999% a full measure fromina ourvertex
testinnetworks,
Vk to vertices
see intinf in
Vl . and each vector
substantial wi adds up
computational to zero
time on each
savings (Fig. orbit (SI). The
4), depending
In the
Table context of symmetries,
1). Nonetheless, we can achievewe take the quotient
lossless compression with eigenvectors
on the amount w1 ,of . , wn≠m , and
. . symmetry their and
present corresponding eigenval-
the computational
respect
(externaltoand theinternal
partitionedge of recovery)
vertices into orbits, that
by annotating (cf.is, each
Fig. 2) ues, are called
complexity redundant, as they arise from the symmetries.
of F.
orbit, and quotient,
the basic each pointwhich
in theleaves
asymmetric core,motifs
non-basic becomes a vertex
unchanged, Furthermore, the redundant spectrum is made of the contri-
in theretains
quotient (Fig. 1). symmetry
The quotients of real-world networks butions of each symmetric motif: the redundant spectrum of
and most of the in a typical real-world net- Spectral signatures of symmetry
are often significantly
work (Methods, Fig. 3). smaller (in vertex and edge size) than M (considered as a graph on its own) ‘survives’ in any network
the parent networks (Table 2, (10, 15)). The
G spectrumM
containing of as
a network
a symmetric(its adjacency matrix)
motif. Namely, relates
if (⁄, w) istoa
1 . The
We can use the quotient for data compression, by elim- redundant
a multitude eigenpair of M then
of structural and (⁄, w)
 is a redundant
dynamical propertieseigenpair
Computational
inating reduction redundancies inherited by a
the symmetry-induced of G, where
presence of w equals theisvector
symmetries
 w on
reflected in (the vertices of)
the spectrum of M, and
the net-
network
Networkmeasure
symmetriesF . As
canthe quotient
also reduce contains average values
the computational time zero
workelsewhere. We call such a vector localised on M.
11 , and indeed in the spectrum of any network measure.

between orbits,anitarbitrary
of evaluating is not clear how to
network recoverF.
measure theByoriginal val-
Equation Most symmetric
Symmetries give risemotifs in real-world eigenvalues
to high-multiplicity networks are basic,
(shown
ues.
(3), we only need to evaluate F on orbits, resulting in a com-a
Mathematically, we are asking whether we can recover thus so they are in F (G) for any structural measure. Since
as ‘peaks’ in the spectral density) and, in fact, we can explain they
matrix A = (aij ) from its quotient B = (bkl ). have a very constrained structure (Fig. 2), we can determine

Sánchez-García PNAS | March 5, 2018 | vol. XXX |


3/22
no. XX | 3
Name nG mG gen t1 t2 sm bsm mv ñQ m̃Q exts int f cfull sp
HumanDisease 1,419 2,738 713 0.00 0.16 272 96.0 71.0 48.3 50.4 83.3 10−3 27.2 11.3
Yeast 1,647 2,736 380 0.00 0.01 149 99.3 33.3 76.3 83.5 98.8 10−3 58.4 44.4
OpenFlights 3,397 19,230 732 0.00 0.11 321 93.5 32.4 77.3 94.4 99.3 10−3 63.5 46.2
USPowerGrid 4,941 6,594 414 0.00 0.09 302 97.4 16.7 90.2 91.3 97.6 10−4 83.9 73.3
HumanPPI 9,270 36,918 972 0.00 0.12 437 100 15.3 89.5 97.0 99.9 10−4 80.1 71.6
Astro-Ph 17,903 196,972 3,232 0.01 0.21 1,682 99.4 27.5 81.9 80.4 95.5 10−4 67.4 54.9
InternetAS 34,761 107,720 15,587 0.03 0.29 3,189 99.9 54.3 55.0 78.2 99.9 10−5 30.3 16.7
WordNet 145,145 656,230 52,152 0.18 0.62 28,456 92.0 60.0 60.1 58.0 89.9 10−5 49.3 21.6
Amazon 334,863 925,872 32,098 0.20 0.39 23,302 99.8 16.8 90.3 89.0 99.0 10−6 81.6 73.6
Actors 374,511 15,014,839 182,803 0.95 1.38 36,703 99.9 58.6 51.2 66.4 90.4 10−5 26.2 13.4
InternetAS-skitter 1,694,616 11,094,209 319,738 1.71 4.17 84,675 99.1 19.7 85.4 92.8 99.9 10−6 73.5 62.3
CaliforniaRoads 1,957,027 2,760,388 36,430 0.47 0.16 35,210 98.8 4.0 97.9 98.4 99.7 10−7 96.3 93.9
LiveJournal 5,189,808 48,687,945 410,575 8.02 3.59 245,211 99.9 12.7 92.1 96.5 99.7 10−7 84.8 78.0

Table 1. Symmetry in some real-world networks. For each test network, we show the number of vertices (nG ), edges (mG ), number
of generators (gen) of the automorphism group (sizes, 10153 to 10197,552 , not shown), computing times of generators (t1 ) and geometric
decomposition (t2 ), in seconds, number of symmetric motifs (sm) and proportion of BSMs (bsm), proportion of vertices moved by an
automorphism (mv), proportion of vertices (ñQ = nQ /nG ) and edges (m̃Q = mQ /mG ) in the quotient, proportion of external edges in the
sparse case (exts , in percentage), and of internal edges in the full case (int f , closest power of 10), full compression ratio (cfull = ñ2Q ), and
spectral computational reduction (sp = ñ3Q ), all for the largest connected component. Datasets available at26 , except HumanDisease27 ,
Yeast28 , and HumanPPI29 . Computations on a desktop computer (3.2 GHz Intel Core i5 processor, 16 GB 1.6 GHz DDR3 memory). All
networks are symmetric, although the amount of symmetry (as measured by mv or ñQ ) ranges from several networks with 50% quotient
reduction, to CalifornialRoads with only 4% of vertices participating in any symmetry. However, the effect of compression and computational
reduction multiplies as e.g. cfull = ñ2Q and sp = ñ3Q , achieving significant results for most of our test networks.

and predict most of the discrete part of the spectrum of an


100 %
arbitrary network measure on a typical real-world network
90 % (cf. Fig. 5).
Computational reduction

80 % First, we can show (Methods) that the eigenvalues and


70 % eigenvectors of a network are those of the quotient net-
60 % work together with those arising from individual symmet-
ric motifs. Formally, we can find an eigenbasis of the
50 % form {Sv1 , . . . , Svm , w e n−m }, where {v1 , . . . , vm } is any
e 1, . . . , w
40 % eigenbasis of the quotient network, Svi is the vector vi lifted to
30 % the parent network by repeating entries on each orbit, each w j
is an eigenvector of a symmetric motif M , w e j is the vector w j
20 %
localised on M , that is, zero outside M , and the eigenvalues
10 % of vi and Svi , respectively w j and w e j , are the same.
0%
al c Furthermore, each symmetric motif M contributes the
un ian ce es
s ss eig
ectr m
m lac stan en wne same (called redundant) eigenpairs to any network containing
sp co lap di clos bt
M as a symmetric motif. Since most symmetric motifs in real-
HumanDisease Yeast OpenFlights USPowerGrid HumanPPI
world networks are basic, and they have a very constrained
Astro-Ph InternetAS WordNet Amazon Actors
structure (Fig. 2), we can in fact determine the redundant spec-
trum of BSMs with up to a few orbits, that is, we can predict
Figure 4. Quotient computational reduction.
Computational time reduction of several structural measures in some
where the most significant ‘peaks’ in the spectral density of
of our test networks (Table 1) obtained by performing the an arbitrary network function will occur. These values are
calculation in the quotient network versus the original network. The shown on Table 2 and can be obtained, for each BSM, simply
computations are: spectral decomposition of the adjacency matrix A by solving a quadratic equation. For example, for the graph
(spectral), exponential matrix exp(A) (commun), pseudoinverse of Laplacian, we predict high-multiplicity eigenvalues at the pos-
the Laplacian matrix (laplacian), shortest path distance (distance), itive integers due to the symmetry, and this is confirmed in
closeness centrality (closeness), betweenness centrality (btwness) our test networks (Fig. 5), with symmetry explaining between
and eigenvector centrality (eigc), using MATLAB R2017a built-in 89% and 97% of the discrete spectrum.
functions. For spectral, we also show (left column) the reduction
Moreover, decoupling the contribution of symmetry to the
including the (sequential) symmetric motif calculation. In each case,
median computational reduction over at least 10 iterations shown. spectrum leads to an eigendecomposition algorithm that ex-
ploits the presence of symmetries: The spectrum and eigenba-

4/22
OpenFlights therefore, satisfies
HumanDisease Yeast
G(i) = G(σ (i)) (5)
0.2 90.6% 0.2 94.2% 0.2 89.2%
0.1 0.1 0.1 for each automorphism σ ∈ Aut(G ), that is, it is constant on
0 0 0 orbits (Fig. 1).
0 5 10 0 5 10 0 5 10 Although for vertex measures we do not have a network rep-
resentation, we can still exploit the network symmetries. First,
USPowerGrid HumanPPI Astro-Ph G needs only to be computed/stored once per orbit, resulting
on a reduction/compression ratio of ñQ = nQ /nG (Table 1,
0.2 89.9% 0.2 95.0% 0.2 96.7% Methods). Secondly, when quotient recovery holds (that is, we
0.1 0.1 0.1 can recover G from its values on the quotient and symmetry
information alone), it amounts to a further computational re-
0 0 0
0 5 10 0 5 10 0 5 10 15 20 duction (Fig. 4), depending on the computational complexity
of G. Finally, many vertex measures arise nevertheless from
a pairwise function, such as G(i) = F(i, i) (subgraph central-
Figure 5. Spectral signatures of network symmetry.
Laplacian spectrum of six test networks (blue) and of their quotient
ity from communicability), or G(i) = n12 ∑i, j F(i, j) (closeness
(red), given as relative probability of eigenvalue count, with centrality from shortest path distance), allowing the symmetry-
multiplicity, in bins of size 0.1. Only the most significant part of the induced results on F to carry over to G.
spectrum is shown. Most of the ‘peaks’ observed in the spectral
density occur at positive integers, as predicted. (Inset) Percentage of Applications
the high-multiplicity spectrum explained by the symmetry, as the We illustrate our methods on several popular pairwise and
ratio of ∑mλ >1 mλ for the quotient eigenvalues, and for the vertex-based network measures. These are example appli-
Laplacian eigenvalues, where mλ is the multiplicity of an eigenvalue cations: Our methods are general and similar results should
λ rounded to 8 decimal places. apply to any network measure.
Adjacency matrix
BSM eigenvalues mult eigenvectors
α,β
The methods in this paper can be applied to the network
Kn −α + β n−1 ei itself, that is, to its adjacency matrix seen as a sparse network
α ,β2 γ,δ α ,β2 −b − κ1 c n − 1 (κ1 ei | ei ) measure. We recover the structural and spectral results in10, 11 ,
Kn 1 ←→ Kn 2 −b − κ2 c n − 1 (κ2 ei | ei ) and the quotient compression ratio reported in18 , here csparse =
m̃Q in Table 1. The network (adjacency) eigendecomposition
Table 2. Redundant spectra of BSMs with one or two can be significantly sped up by exploiting symmetries (Fig. 4).
orbits. We write ei for the vector with non-zero entries 1 at
position 1, and −1 at position i (2 ≤ i ≤ n), κ1 and κ2 for the two Communicability
solutions of the quadratic equation cκ 2 + (−a + b)κ − c = 0 where Communicability is a very general choice of structural mea-
a = α1 − β1 , b = α2 − β2 and c = γ − δ , and (v|w) represents sure, consisting on any analytical function f (x) = ∑ an xn ap-
concatenation of vectors. For unweighted graphs without loops, this plied to the adjacency matrix,
formula recovers the redundant eigenvalues predicted in11 .

f (A) = ∑ an An , (6)
n=0
sis of an undirected network (equivalently, a diagonalisation
of its adjacency matrix) can be obtained from those of the and it is a natural measure of network connectivity, since
quotient, and of the symmetric motifs (Methods), reducing the the matrix power Ak counts walks of length k30 . Its network
computational time (cubic on the number of vertices) to up to representation, the graph f (G ) with adjacency matrix f (A),
a third in our test networks (Fig. 4, first column), in line with inherits all the symmetries of G and thus it has the same sym-
our predictions (sp = n3Q in Table 1). This eigendecomposi- metric motifs and orbits. The BSMs are uniform joins of
tion algorithm applies in full generality to any (symmetric) orbits, and each orbit is a uniform graph (Fig. 2) characterised
network measure, such as any (symmetric) matrix derived by the communicability of a vertex to itself (a natural measure
from the adjacency matrix. of centrality25 ), and the communicability between distinct ver-
tices. As a full network measure, the compression ratio cfull
applies (Table 1), indicating the fraction of storage needed by
Vertex measures using the quotient to eliminate redundancies (Fig. 3). More-
We have so far considered network measures of the form over, we can recover the communicability of a network from
F(i, j), where i and j are vertices. However, many important its quotient (Methods), or by using the spectral decomposi-
network measurements are vertex based, that is, of the form tion algorithm on the adjacency matrix (A = UDU T implies
G(i) for each vertex i. We say that a vertex measure G is f (A) = U f (D)U T ) reducing the computation, typically cubic
structural if it only depends on the network structure and, on the number of vertices, by sp = ñ3Q (Table 1, Fig. 4).

5/22
Shortest path distance centrality can be recovered up to a very small error from the
This is the simplest metric on a (connected) network, namely quotient, or exactly from an annotated quotient (Methods),
the length of a shortest path between vertices. As a full struc- substantially reducing the computation (Fig. 4).
tural measure, the compression rate cfull (Table 1) applies.
Moreover, automorphisms σ preserve the shortest path metric, Betweenness centrality
d(i, j) = d (σ (i), σ ( j)), and indeed shortest paths themselves. This is the sum of proportions of shortest paths between pairs
As shortest paths cannot contain intra-orbit edges, we can of vertices containing a given vertex. Using symmetries in this
compute shortest distances from the quotient, case is more subtle, as shortest paths through a given vertex
are only preserved by symmetries fixing that vertex. However,
d G (α, β ) = d Q (i, j), α ∈ Vi , β ∈ V j , (7) betweenness can be computed from shortest path distances
and number of shortest paths, both pairwise structural mea-
whenever Vi and V j are orbits in different symmetric motifs. sures, reducing the computation of a naive O(n3 ) time, O(n2 )
This accounts for all but the (small) intra-motif distances and space implementation by ñ3Q and ñ2Q . It would be interesting
reduces the computation as shown in Fig. 4. (See Methods for to adapt a faster algorithm such as33 to exploit symmetries,
full details.) but this is beyond our scope.
Laplacian matrix
Eigenvector centrality
The Laplacian matrix of a network L = D − A, where D is the
Eigenvector centrality is obtained from a Perron-Frobenius
diagonal matrix of vertex degrees, is a sparse network measure
eigenvector (i.e. of the largest eigenvalue) of the adjacency
and therefore inherits all the symmetries of the network. The
matrix of a connected graph1 . This eigenvector equals the
symmetric motifs are identical to the subgraphs in the network
Perron-Frobenius eigenvector of the quotient network with
except edges are now weighted by −1, and self-loops by
constant values on orbits (Methods), and hence the computa-
vertex degrees in the network, and hence they depend on how
tion (quadratic time by power iteration) can be reduced by ñ2Q
the motif is embedded in the network.
(see Fig. 4).
Quotient compression and computational reduction are less
useful in this case, however the spectral results are more in-
teresting. Spectral decomposition and eigenvalue localisation Discussion
apply, and we can compute redundant Laplacian eigenvalues We have presented a general theory to describe and quantify
directly from Table 2, for instance positive integers for BSMs real-world network symmetry and its effects on arbitrary net-
with one orbit (Methods). This explains and predicts most of work measures, and explained how this can be exploited in
the ‘peaks’ (high multiplicity eigenvalues) in the Laplacian practice in a number of ways.
spectral density, confirmed on our test networks (Fig. 5).
We show that the amount of network symmetry is amplified
Commute distance and matrix inversion in a network measure but can be easily manipulated using the
The commute distance is the expected time for a random quotient network. We can for instance eliminate the symmetry-
walker to travel between two vertices and back31 . In contrast induced redundancies, or use them to simplify the calculation
to the shortest path distance, it is a global metric which takes by avoiding unnecessary computations. Symmetry has also
into account all possible paths between two vertices. The a profound effect on the spectrum, explaining the character-
commute distance is equal up to a constant (the volume of the istic ‘peaks’ observed in the spectral densities of empirical
network) to the resistance metric r32 , which can be expressed networks, and occurring at values we are able to predict.
in terms of L† = (li†j ), the pseudoinverse (or Moore-Penrose We describe how to effectively compute and manipulate
the network symmetry of a (possibly very large) empirical
inverse) of the Laplacian, as r(i, j) = lii† + l †j j − 2li†j .
network and, for the large but sparse graphs typically found
The commute (or resistance) distance is a (full) structural
in applications, we show that the symmetry computation is
measure, and all our structural and spectral results apply. Cru-
extremely fast, making it an inexpensive pre-processing step.
cially, we can use eigendecomposition algorithm to obtain
L = UDU T (and hence L† = UD†U T , and r) from the quotient Our framework is very general and apply to any pairwise
and symmetric motifs, resulting in significant computational or vertex-based network measure beyond the ones we discuss
gains (Fig. 4). More generally, if MF is the matrix represen- as examples. We emphasise practical and algorithmic aspects
tation of a network measure, its pseudoinverse MF† is also a throughout, present the results in an accessible way with min-
network measure, and the comments above apply. Note that imal references to the abstract material in graph and group
MF† is generally a full measure even if MF is sparse. theory which often obscures its relevance in applications, and
provide pseudocode (Methods) and full implementations34
Closeness centrality for rapid dissemination.
This is the average shortest path distance to every node in the Since network models are ubiquitous in the Applied Sci-
graph. It is preserved by symmetries and hence constant on ences, and typically contain a large degree of structural re-
each orbit, as it is in fact the average of a pairwise structural dundancy, our results are not only significant, but widely
measure, the shortest path distance. Moreover, closeness applicable, and relevant to any network practitioner.

6/22
Methods (ii) for every pair of orbits ∆1 and ∆2 , there is a labelling ∆1 = {v1 , . . . , vn },
∆2 = {w1 , . . . , wn } and constants γ1 , γ2 , δ1 , δ2 such that γ1 = F(vi , w j ),
We include minimal details for reproducibility but encourage the reader to γ2 = F(w j , vi ), δ1 = F(vi , wi ), and δ2 = F(wi , vi ), for all i 6= j;
consult an extended version in the Supporting Information (SI).
The proof is a generalisation of the argument on [37, p.48] to weighted
Geometric decomposition directed graphs with symmetries, and can be found in the SI. If G is undirected
We write Aut(G ) for the automorphism group of an (unweighted, undi- and F is symmetric, then γ1 = γ2 and δ1 = δ2 and each orbit is a (α, β )-
rected, possibly very large) network G = (V, E) (see the SI for a discussion α,β
uniform graph Kn and each pair of orbits form a (γ, δ )-uniform join (Fig. 2).
of directed and weighted networks). The symmetry results depend on the α,β
so-called geometric decomposition10 of Aut(G ). Each automorphism (sym- Formally, a (α, β )-uniform graph, Kn is the graph with adjacency matrix
metry) σ ∈ Aut(G ) is a permutation of the vertices and its support is the set
of vertices moved by σ , Aα,β
n = α Cn + β In (10)

supp(σ ) = {i ∈ V such that σ (i) 6= i}. (8) where Cn is the adjacency matrix of a complete graph (0 diagonal and 1
off-diagonal entries), and In the identity matrix. A (γ, δ )-uniform join of
Two automorphisms σ and τ are support-disjoint if the intersection of their α ,β α ,β
two uniforms graphs Kn 1 1 and Kn 2 2 is the graph with adjacency matrix,
supports is empty, supp(σ ) ∩ supp(τ) = 0.
/ The orbit of a vertex i is the set possibly after a suitable reordering of the vertices,
of vertices to which i can be moved to by an automorphism, that is, !
α ,β γ ,δ
An 1 1 An1 1
{σ (i) such that σ ∈ Aut(G )}. (9) A= γ ,δ α ,β , (11)
An2 2 An 2 2
A symmetric motif is made of one or more orbits of structurally equivalent
vertices. If all the orbits have the same size k and every permutation of the where the submatrices are given as per (10).
vertices in each orbit is a network automorphism, we call the symmetric motif
basic (or BSM) of type k. If it is not basic, we call it complex or of type 0. Quotient network
If A is the n × n adjacency matrix of a graph G , the quotient network with
Network symmetry computation respect to a partition of the vertex set V = V1 ∪ . . . ∪Vm is the graph Q with
First, we compute a list of generators of the automorphism group from an m × m adjacency matrix the quotient matrix Q(A) = (bkl ) defined by
edge list (we use saucy335 ). Then, we partition the set of generators X into
support-disjoint classes X = X1 ∪ . . . ∪ Xk , that is, σ and τ are support-disjoint 1
bkl = ∑ ai j , (12)
whenever σ ∈ Xi , τ ∈ X j and i 6= j. To find the finest such partition, we use a |Vk | i∈V
k
bipartite graph representation of vertices V and generators X. Namely, let B j∈Vl

be the graph with vertex set V ∪ X and edges between i and σ whenever i ∈ the average connectivity from a vertex in Vk to vertices in Vl . There is an
supp(σ ). Then X1 , . . . , Xk are the connected components of B (as vertex sets explicit matrix equation for the quotient. Consider the n × m characteristic
intersected with X). S Each Xi corresponds to the vertex set Mi of a symmetric matrix S of the partition, that is, [S]ik = 1 if i ∈ Vk , and zero otherwise, and
motif Mi , as Mi = σ ∈Xi supp(σ ). Finally, we use GAP36 to compute the the diagonal matrix Λ = diag(n1 , . . . , nm ), where nk = |Vk |. Then
orbits and type of each symmetric motif (Alg. 1). Full implementations of all
the procedures outlined above are available at a public repository34 . Q(A) = Λ−1 ST A S. (13)

The quotient network is a directed and weighted network in general. If we


Input: X a set of permutations of a symmetric motif remove weights, directions and self-loops, we have the quotient skeleton as in
Output: O1 , . . . , Ok orbits, and type m, of the symmetric motif Fig. 1. In the context of quotient networks, we call G the parent network of Q.
H ← Group(X) From now on, we will only refer to the quotient with respect to the partition of
{O1 , . . . , Ok } ← Orbits(H) the vertex set into orbits. This quotient removes all the symmetries from the
network: if σ (i) = j, then i and j are in the same orbit and hence represented
m ← min(size(O1 ), . . . , size(Ok )) by the same vertex in the quotient network, which is then fixed by σ . We
if m == max(size(O1 ), . . . , size(Ok )) then can, therefore, infer and quantify properties arising from redundancy alone
for i ← 1 to k do by comparing a network with its quotient.
if not IsNaturalSymmetricGroup(Action(H, Oi ))
then
Average compression
m←0
We can eliminate the symmetry-induced redundancy (Alg. 2) and recover
break
(Alg. 3) all but the internal symmetric motif connectivity, which is replaced
end by the average connectivity, as the next result guarantees (proof in the SI).
end
else Theorem 2. Let A = (ai j ) be the n × n adjacency matrix of a (possibly
m←0 directed and weighted) network with vertex set V . Let S be the n × m char-
end acteristic matrix of the partition of V into orbits of the automorphism group
Algorithm 1: Orbits and type of a symmetric motif. of the network, and Λ the diagonal matrix of column sums of S. Define
B = ST AS and Aavg = RBRT = (āi j ) where R = SΛ−1 . Then,
(i) if i, j ∈ V belong to different symmetric motifs, āi j = ai j .
Structure of a BSM (ii) if i, j ∈ V belong to orbits i ∈ ∆1 and j ∈ ∆2 in the same symmetric
Consider the network representation F(G ) of a (pairwise) structural network motif,
measure F applied to a network G . The structure of the BSMs in F(G ), 1 1
āi j = ∑ auv . (14)
depicted in Fig. 2, is formally described below. |∆1 | |∆2 | u∈∆
1
v∈∆2
Theorem 1. Let M be the vertex set of a BSM of a network G , and F a
structural network measure. Then the graph induced by M in F(G ) is a BSM
of F(G ), and satisfies: Lossless compression
(i) for each orbit ∆ = {v1 , . . . , vn }, there are constants α and β such that Pseudocode for lossless compression and recovery based on the basic quotient
the orbit internal connectivity is given by α = F(vi , v j ) for all i 6= j are shown below (Algorithms 4 and 5), and MATLAB implementations for
and β = F(vi , vi ) for all i; BSMs up to two orbits are available at a public repository34 .

7/22
Input: adjacency matrix A, characteristic matrix S Spectral decomposition
Output: quotient matrix B If B is the quotient matrix of the adjacency matrix A with respect to the
orbit partition, and S is the characteristic matrix of the partition, then
B ← ST AS AS = SB. This immediately implies that if (λ , v) is an B-eigenpair, then
Algorithm 2: Average symmetry compression. (λ , Sv) is an A-eigenpair. In particular, A has an eigenbasis of the form
{Sv1 , . . . , Svm , w1 , . . . , wn−m }, where {v1 , . . . , vm } is any eigenbasis of B.
Moreover, the eigenvectors w1 , . . . , wn−m can be chosen localised to symmet-
Input: quotient matrix B, characteristic matrix S ric motifs, by the result below. (For proofs and more details, see the SI.)
Output: adjacency matrix Aavg We call an eigenvector w (and its eigenvalue λ ) redundant if the sum of the
entries of w on each orbit is zero.
Λ ← diag(sum(S))
R ← SΛ−1 Theorem 3. Let M be a symmetric motif of a (possibly weighted) undirected
Aavg ← RBRT graph G . If (λ , w) is a redundant eigenpair of M then (λ , w
e ) is a eigenpair
of G , where we is equal to w on (the vertices of) M , and zero elsewhere.
Algorithm 3: Average symmetry decompression.
Redundant spectrum of BSMs
We give more details of the computation of the redundant spectrum of BSMs
Input: adjacency matrix A, characteristic matrix for the basic quotient up to two orbits (Table 2), with full proofs deferred to the SI. A BSM with one
S, list of BSMs motifs α,β α,β
orbit is an (α, β )-uniform graph Kn with adjacency matrix An = (ai j )
Output: quotient matrix B, annotation structure a α,β
given by ai j = α and aii = β for all i 6= j. Then Kn has eigenvalues
B ← ST AS (n − 1)α + β (non-redundant), with multiplicity 1, and −α + β (redundant),
extract orbits from S with multiplicity n − 1. The corresponding eigenvectors are 1, the constant
foreach orb in orbits do vector 1 (non-redundant), and ei , the vectors with non-zero entries 1 at
rep ← min(orb) position 1, and −1 at position i, 2 ≤ i ≤ n (redundant). For unweighted graphs
β ← A(rep, rep) without loops (β = 0, α ∈ {0, 1}), we recover the redundant eigenvalues 0
store β in annotation structure a and −1 predicted in11 . A BSM with two orbits is a uniform join of the form
α ,β1 γ,δ α ,β
end Kn 1 ←→ Kn 2 2 , and its redundant spectrum is given below.
kmax ← max(size(motifs)) maximal number of orbits in a motif α ,β γ,δ α ,β
Theorem 4. The eigenvalues of a BSM with two orbits Kn 1 1 ←→ Kn 2 2
for k ← 2 to kmax do
are
extract k-BSM (list of BSMs with k orbits) from motifs p
foreach bsm in k-BSM do −(a + b) + (a − b)2 + 4c2
λ1 = −b − cκ1 = , and (15)
foreach pairs of distinct orbits V1 ,V2 in bsm do 2
compute δ and permutation of V2 perm such that
p
−(a + b) − (a − b)2 + 4c2
A(k, perm(k)) = δ for all k ∈ V1 λ2 = −b − cκ2 = , (16)
2
store orbit numbers (with respect to S), δ and perm in each with multiplicity n − 1, with eigenvectors (κ1 ei |ei ) and (κ2 ei |ei ) re-
annotation structure a spectively, where κ1 and κ2 are the two solutions of the quadratic equation
end cκ 2 + (b − a)κ − c = 0, a = α1 − β1 , b = α2 − β2 and c = γ − δ 6= 0.
end For unweighted graphs without loops, we recover the redundant eigenval-

end
ues predicted in11 , that is, −2, −ϕ, −1, 0, ϕ − 1 and 1, where ϕ = 1+2 5 , the
Algorithm 4: Lossless symmetry compression. golden ratio.

Eigendecomposition algorithm
Input: quotient matrix B, characteristic matrix S, annotation structure a We can compute the eigendecomposition of a weighted undirected network
Output: adjacency matrix A with symmetries (that is, a diagonalisation of its symmetric adjacency matrix
A = UDU T ), such as F(G ), from the quotient and the symmetric motifs.
Λ ← diag(sum(S))
Algorithm 6 computes the eigendecomposition of the quotient matrix, then,
R ← SΛ−1 for each motif, the redundant eigenpairs. A MATLAB implementation is
A ← RBRT available at34 .
extract orbits from S In Alg. 6, we first compute the spectral decomposition eig of the sym-
foreach orb in orbits do metric quotient Bsym = Λ−1/2 ST ASΛ−1/2 where Λ is the diagonal matrix of
n ← size(orb) the orbit sizes (which can be obtained as the column sums of S). This matrix
extract β from a is symmetric and has the same eigenvalues as the left quotient. Moreover,
compute α from B, β and n (using [B]orb,orb = n ((n − 1)α + β )) if Bsym = Uq DqUq−1 then the left quotient eigenvectors are the columns of
α,β ΛUq . These become, in turn, eigenvectors of A by repeating their values
construct adjacency matrix of the orbit An
on each orbit, we can be obtained mathematically by left multiplying by
A(orb, orb) ← An
α,β
the characteristic matrix S. Then, for each motif, we compute the redudant
end eigenpairs using a null space matrix (see below), storing eigenvalues and
extract pairs of orbits in the same BSM from a localised (zero outside the motif) eigenvectors.
foreach (V1 ,V2 ) in pairs do Only redundant eigenvectors of a symmetric motif (that is, those which add
n ← size(V1 ) up to zero on each orbit) become eigenvectors of A by extending them as zero
extract δ , perm from a outside the symmetric motif (Theorem 3). Therefore, we need to construct
compute γ from B, δ and n (using [B]V1 ,V2 = n ((n − 1)γ + δ )) redundant eigenvectors from the ouput of eig on each motif (the spectral 
γ,δ decomposition of the corresponding submatrix). If Uλ = v1 . . . vk are
construct matrix An λ -eigenvectors of a symmetric motif with characteristic matrix of the orbit
A(V1 , perm) ← An
γ,δ
partition Ssm , we need to find linear combinations such that
γ,δ
A(perm,V1 ) ← An
 
α1
end T T  . 
Ssm (α1 v1 + . . . + αk vk ) = 0 ⇐⇒ Ssm Uλ  ..  . (17)
Algorithm 5: Lossless symmetry decompression. αk .

8/22
Input: adjacency matrix A, characteristic matrix S, list of motifs Shortest path distance
Output: spectral decomposition A = UDU T Let A = (ai j ) be the adjacency matrix of an unweighted network G . A path of
length n is a sequence (v1 , v2 , . . . , vn+1 ) of distinct vertices, except possibly
initialise U, D to zero matrices v1 = vn+1 , such that vi is connected to vi+1 for all 1 ≤ i ≤ n − 1. The shortest
Λ ← diag(sum(S)) path distance d G (u, v) is the length of the shortest (minimal length) path
Bsym ← Λ−1/2 ST ASΛ−1/2 from u to v. A path p is a shortest path if it is of minimal length between its
[Uq , Dq ] ← eig(Bsym ) so that Bsym = Uq DqUq−1 endpoints. The following result contains the claims in the Results section.
Uq ← ΛUq
U ← SUq 0
 Theorem 6. Let A = (ai j ) be as above. Then
(i) if (v1 , v2 , . . . , vn ) is a shortest path from v1 to vn and σ ∈ Aut(G ), then
 
Dq 0
D← (σ (v1 ), σ (v2 ), . . . , σ (vn )) is a shortest path from σ (v1 ) to σ (vn );
0 0
foreach motif do (ii) if (v1 , v2 , . . . , vn ) is a shortest path from v1 to vn , and v1 and vn belong
Asm ← A(motif, motif) to different symmetric motifs, then vi and vi+1 belong to different orbits,
compute orbits from motif and S for all 1 ≤ i ≤ n − 1;
Ssm ← S(motif, orbits)
(iii) if u and v belong to orbits ∆, respectively ∆0 , in different symmetric
[Usm , Dsm ] ← eig(Asm )
motifs, then the distance from u to v in G equals the distance from ∆ to
for λ ∈ unique(diag(Dsm )) do
∆0 in the skeleton quotient Q.
Uλ ← λ -eigenvectors from Usm
Z ← null(Ssm T U )
λ These statements mean that (i) automorphisms preserve shortest paths and
d ← ncol(Z) their lengths; (ii) shortest paths do not contain intra-orbit edges; and (iii) we
if d > 0 then can compute the shortest path distance between points in different symmetric
store Uλ Z in U motifs from the quotient.
store λ in D with multiplicity d
end Laplacian matrix
end The Laplacian matrix of a network G is a sparse network measure. Its
end network representation is the graph L with adjacency matrix L = D − A. The
symmetric motifs in L are identical to those in G , except that all edges are
Algorithm 6: Eigendecomposition algorithm.
weighted by −1, and all vertices have self-loops weighted by their degrees in
G . (Note that the motif structure depends on the how it is embedded in the
network.) Define the external degree of a vertex as the number of adjacent
T U , that is,
Therefore, if the matrix Z 6= 0 represents the null space of Ssm λ vertices outside the motif it belongs to.
T U Z = 0 and Z T Z = 0, then the columns of U Z are precisely the redun-
Ssm λ λ
dant eigenvectors. This is implemented in Alg. 6 within the innermost for Theorem 7. Let M be the vertex set of a symmetric motif M in a graph
loop. G . Then M induces a symmetric motif in the Laplacian network L with
adjacency matrix
Vertex measures 
As a vertex measure G is constant on orbits, we only need to store one value LM + d1 Im1 ⊕ . . . ⊕ dk Imk , (21)
per orbit. Let S be the characteristic matrix of the partition of the vertex set where LM is the ordinary Laplacian matrix of M considered as a graph on
into orbits, and Λ the diagonal matrix of orbit sizes (column sums of S). If G its own, and d1 , . . . , dk are the external degrees of the k orbits of M of sizes
is represented by a vector v = (G(i)) of length nG , we can store one value per m1 , . . . , mk . (Here In is the identity matrix of size n and we use ⊕ to construct
orbit by taking w = Λ−1 ST v, a vector of length nQ . We recover v = ST w, as a block diagonal matrix.)
the next result guarantees.
Theorem 5. If v is a vector of length nG that is constant on orbits, then For a motif M with one orbit, the matrix (21) is the Laplacian of the
SΛ−1 ST v = v. motif translated by a multiple of the identity. In particular, the redundant
eigenvalues of a BSM with one orbit are the redundant Laplacian eigenvalues
Communicability of an empty or complete graph of size n plus the external degree d, that is, d,
Let f be a real analytic function within radius of convergence R around 0, respectively d + n. Therefore, we expect high-multiplicity eigenvalues due to
∞ symmetry in the Laplacian spectral density at (small) positive integers, which
f (x) = ∑ ak xk |x| < R . (18) indeed agrees what we observed in our test networks (Fig.5). Additionally,
k=0 the spectral decomposition applies, so Alg. 6 provides an efficient way of
We define the f -communicability matrix of a network with adjacency matrix computing the Laplacian eigendecomposition with an expected sp = ñ3Q
A as (Table 1) computational time reduction.

f (A) = ∑ ak Ak if kAk < R , (19) Closeness centrality
k=0
The closeness centrality of a node i in a graph G , ccG (i), is the average
where k · k is a given matrix norm38 ,
and the power series convergence is
shortest path length to every node in the graph. As symmetries preserve
with respect to that norm. We represent communicability as a network f (G )
distances, they also preserve closeness centrality, and therefore it is constant
with adjacency matrix f (A). If we write Q(A) for the quotient of a matrix A,
on orbits, as expected. Moreover, closeness centrality can be recovered
communicability satisfies
from the quotient (shortest paths does not contain intra-orbit edges between
f (Q(A)) = Q( f (A)), (20) vertices in different symmetric motifs by Theorem 6(ii)), as
which implies exact recovery for external edges, and average recovery for nl Q ni
internal edges. (This holds for any network measure with this property.) For ccG (i) = ∑ d (Vk ,Vl ) + dk (22)
l6=k nG nG
exact recovery, we can use the symmetry eigendecomposition, as A = UDU T
implies f (A) = U f (D)U T . if i belongs to the orbit Vk and dk is the average intra-motif distance, that
The f -communicability network has eigenvalues f (λ ), where λ is an is, the average distances of a vertex in Vk to any vertex in M , the motif
eigenvalue of the original network, and same eigenvectors (Av = λ v implies containing Vk . By annotating each orbit by dk , we can recover betweenness
f (A)v = f (λ )v). In particular, for undirected, unweighted networks, we centrality exactly. Alternatively, as dk  n (note that dk ≤ m if M has m
predict high-multiplicity eigenvalues due to symmetry at f (−2), f (−ϕ), orbits), we can approximate ccG (i) by the first summand, or simply by the
f (−1), f (0), f (ϕ − 1) and f (1). quotient centrality ccQ (Vk ).

9/22
Eigenvector centrality 14. Sorrentino, F., Pecora, L. M., Hagerstrom, A. M., Murphy, T. E. & Roy,
Since the Perron-Frobenius eigenvalue is simple, it cannot be a redundant R. Complete characterization of the stability of cluster synchronization
eigenvalue. Hence it is a quotient eigenvalue and, as those are a subset in complex dynamical networks. Sci Adv 2, e1501737 (2016).
of the parent eigenvalues, it must still be the largest (hence the Perron- 15. Schaub, M. T. et al. Graph partitions and cluster synchronization in
Frobenius) eigenvalue of the quotient. Its eigenvector can then be lifted networks of oscillators. Chaos: An Interdiscip. J. Nonlinear Sci. 26,
to the parent network by repeating entries on orbits. All in all, if (λ , v) is 094821 (2016).
the Perron-Frobenius eigenpair of the quotient, then (λ , Sv) is the Perron- 16. Pecora, L. M., Sorrentino, F., Hagerstrom, A. M., Murphy, T. E. & Roy,
Frobenius eigenpair of the parent network. In practice, we use the symmetric R. Discovering, constructing, and analyzing synchronous clusters of
quotient Bsym = Λ−1/2 ST ASΛ−1/2 for numerical reasons (Alg. 7), obtaining oscillators in a complex network using symmetries. In Advances in
the computational time reductions reported in Fig. 4. If A is not symmetric Dynamics, Patterns, Cognition, 145–160 (Springer, 2017).
(but irreducible), Algorithm 7 gives the right Perron-Frobenius eigenpair of
A, and replacing Bsym by Λ−1/2 ST AT SΛ−1/2 and Rw by its transpose, we 17. Siddique, A. B., Pecora, L., Hart, J. D. & Sorrentino, F. Symmetry-
obtain the left Perron-Frobenius eigenpair of A. and input-cluster synchronization in networks. Phys. Rev. E 97, 042217
(2018).
18. Xiao, Y., MacArthur, B. D., Wang, H., Xiong, M. & Wang, W. Network
Input: adjacency matrix A, characteristic matrix S quotients: Structural skeletons of complex systems. Phys Rev E 78,
Output: (right) Perron-Frobenius eigenpair (λ , v) of A 046102 (2008).
Λ ← diag(sum(S)) 19. Xiao, Y., Wu, W., Pei, J., Wang, W. & He, Z. Efficiently indexing
R ← SΛ−1/2 shortest paths by exploiting symmetry in graphs. In Proceedings of
the 12th International Conference on Extending Database Technology:
Bsym ← RT AR
Advances in Database Technology, 493–504 (ACM, 2009).
(λ , w) ← eig(Bsym , 1) eigenpair of the largest eigenvalue
v ← Rw 20. Wang, J., Huang, Y., Wu, F.-X. & Pan, Y. Symmetry compression
method for discovering network motifs. IEEE/ACM Trans Comput Biol
Algorithm 7: Eigenvector centrality from the quotient network. Bioinf 9, 1776–1789 (2012).
21. Karalus, S. & Krug, J. Symmetry-based coarse-graining of evolved
dynamical networks. Europhys Lett 111, 38003 (2015).
22. Nyberg, A., Gross, T. & Bassler, K. E. Mesoscopic structures and the
Acknowledgements laplacian spectra of random geometric graphs. J Complex Networks 3,
543–551 (2015).
Special thanks to Ben MacArthur for support and advice during the writing of
this article. The Newton Institute in Cambridge supported the author during 23. Do, A.-L., Höfener, J. & Gross, T. Engineering mesoscale structures
the programme ‘Theoretical foundations for statistical network analysis’ with distinct dynamical implications. New J Phys 14, 115022 (2012).
(EPSRC grant EP/K032208/1). Conor Wild’s undergraduate project ‘Topics 24. Biggs, N. Algebraic graph theory (Cambridge University Press, 1993).
in Network Symmetries’ contains (unpublished) results about the graph 25. Estrada, E. & Rodriguez-Velazquez, J. A. Subgraph centrality in complex
Laplacian in the context of symmetries generalised here. networks. Phys Rev E 71, 056103 (2005).
26. Internet topology network dataset – KONECT. http://konect.
References uni-koblenz.de/networks/[openflights|opsahl_powergrid|
ca-AstroPh|topology|wordnet-words|com-amazon|
1. Newman, M. Networks: An Introduction. Oxf. Univ. Press. (2010). actor-collaboration|as-skitter,|roadNet-CA|
livejournal-links] (2016).
2. Watts, D. & Strogatz, S. Collective dynamics of small-world networks.
Nature 393, 440–442 (1998). 27. A Network Graph for Human Diseases. http://exploring-
data.com/info/human-disease-network/ (2018).
3. Barabási, A.-L. & Albert, R. Emergence of scaling in random networks.
Science 286, 509–512 (1999). 28. Yeast Interactome Project. http://interactome.dfci.harvard.edu/S cerevisiae/
(2018).
4. Milo, R. et al. Network motifs: simple building blocks of complex
networks. Science 298, 824–827 (2002). 29. Human Protein Reference Database, Release9 062910.
http://www.hprd.org/ (2018).
5. Tononi, G., Sporns, O. & Edelman, G. M. Measures of degeneracy
and redundancy in biological networks. Proc Natl Acad Sci USA 96, 30. Estrada, E. & Hatano, N. Communicability in complex networks. Phys
3257–3262 (1999). Rev E 77, 036111 (2008).
6. Albert, R. & Barabási, A.-L. Statistical mechanics of complex networks. 31. Lovász, L. Random Walks on Graphs: A Survey (1993).
Rev Mod Phys 74, 47 (2002). 32. Klein, D. J. & Randić, M. Resistance distance. J Math Chem 12, 81–95
7. Chung, F., Lu, L., Dewey, T. G. & Galas, D. J. Duplication models for (1993).
biological networks. J Comput Biol 10, 677–687 (2003). 33. Brandes, U. A faster algorithm for betweenness centrality. J Math Sociol
25, 163–177 (2001).
8. Xiao, Y., Xiong, M., Wang, W. & Wang, H. Emergence of symmetry in
complex networks. Phys Rev E 77, 066108 (2008). 34. Bitbucket repository. https://bitbucket.org/
rubenjsanchezgarcia/networksymmetry/ (2018).
9. Nishikawa, T. & Motter, A. E. Network-complement transitions, sym-
metries, and cluster synchronization. Chaos 26, 094818 (2016). 35. saucy 3.0. http://vlsicad.eecs.umich.edu/BK/SAUCY/ (2012).
10. MacArthur, B. D., Sánchez-Garcı́a, R. J. & Anderson, J. W. Symmetry 36. The GAP Group. GAP – Groups, Algorithms, and Programming, Version
in complex networks. Discrete Appl Math 156, 3525–3531 (2008). 4.8.7 (2017).
11. MacArthur, B. D. & Sánchez-Garcı́a, R. J. Spectral characteristics of 37. Liebeck, M. W. Graphs whose full automorphism group is a symmetric
network redundancy. Phys Rev E 80, 026117 (2009). group. J Aust Math Soc 44, 46–63 (1988).
12. Nicosia, V., Valencia, M., Chavez, M., Dı́az-Guilera, A. & Latora, V. 38. Horn, R. A. & Johnson, C. R. Matrix analysis (Cambridge University
Remote synchronization reveals network symmetries and functional Press, 1990).
modules. Phys Rev Lett 110, 174102 (2013). 39. Godsil, C. & Royle, G. F. Algebraic graph theory (Springer, 2013).
13. Pecora, L. M., Sorrentino, F., Hagerstrom, A. M., Murphy, T. E. & Roy, 40. Cvetkovic, D. M., Rowlinson, P. & Simic, S. An introduction to the
R. Cluster synchronization and isolated desynchronization in complex theory of graph spectra (Cambridge University Press, 2010).
networks with symmetries. Nat Commun 5, 4079 (2014). 41. Brouwer, A. E. & Haemers, W. H. Spectra of graphs (Springer, 2011).

10/22
42. Barrett, W., Francis, A. & Webb, B. Equitable decompositions of graphs a vertex relabelling, but one that results on the same adjacency matrix. (This
with symmetries. Linear Algebra Appl 513, 409–434 (2017). is expressed mathematically by the condition AP = PA, Eq. (1) in the Main
43. Francis, A., Smith, D., Sorensen, D. & Webb, B. Extensions and appli- Text.) Therefore, to find symmetries, we first fix an initial labelling of the
cations of equitable decompositions for graphs with symmetries. Linear vertices (and in particular an adjacency matrix), so we can unequivocally refer
Algebra Appl 532, 432–462 (2017). to the vertices, and then look for further relabelling preserving the adjacency
matrix.
44. Rotman, J. J. An introduction to the theory of groups (Springer, 2012).
However, as a relabelling, a symmetry or automorphism σ produces
45. McKay, B. D. Practical graph isomorphism. Congr Numer 30, 45–87 the same graph, and, necessarily, vertices i and σ (i), or edges (i, j) and
(1981). (σ (i), σ ( j)), are indistinguishable from one another and therefore structurally
46. Gal, E. et al. Rich cell-type-specific network topology in neocortical equivalent. In particular, for a vertex, respectively pairwise, network measure
microcircuitry. Nat Neurosci 20, 1004 (2017). depending on structure alone, we have G(i) = G(σ (i)), respectively F(i, j) =
47. McKay, B. D. & Piperno, A. Practical graph isomorphism, II. J Symb F(σ (i), σ ( j)), for all σ ∈ Aut(G ), and for all i, j ∈ V , that is, Eqs. (5) and
Comput. 60, 94–112 (2014). (3) in the Main Text.
48. Piperno, A. Search space contraction in canonical labeling of graphs. Visually, automorphisms still correspond to symmetries, as perceived
arXiv preprint arXiv:0804.4881 (2008). by the human eye, in a (suitable) geometric representation of the network
(cf. Fig. 1).
49. Junttila, T. & Kaski, P. Engineering an efficient canonical labeling tool
for large and sparse graphs. In 2007 Proceedings of the Ninth Workshop
on Algorithm Engineering and Experiments, 135–149 (SIAM, 2007). Geometric Decomposition
50. Darga, P. T., Sakallah, K. A. & Markov, I. L. Faster symmetry discovery We now explain the geometric decomposition introduced in Methods, in more
using sparsity of symmetries. In Design Automation Conference, 2008 detail, following MacArthur et al.10 . We start with some preliminary notions.
(45th ACM/IEEE), 149–154 (IEEE, 2008). Each automorphism σ ∈ Aut(G ) is a permutation of the vertices of the graph,
and automorphisms can be composed by applying one permutation after the
51. de la Peña, J. A., Gutman, I. & Rada, J. Estimating the estrada index.
other, forming a mathematical structure called a group44 . The support of the
Linear Algebra Appl 427, 70–76 (2007).
permutation σ is the set of vertices moved by σ ,
52. Higham, N. J. & Al-Mohy, A. H. Computing matrix functions. Acta
Numer 19, 159 (2010). supp(σ ) = {i ∈ V such that σ (i) 6= i}. (23)

Two automorphisms σ and τ are support-disjoint if the intersection of their


Supporting Information supports is empty, supp(σ ) ∩ supp(τ) = 0. / In particular, σ and τ commute,
that is, the order in which they are applied does not affect the result, math-
This Supporting Information provides additional details, including full math- ematically σ τ = τσ . Similarly, two arbitrary subsets of automorphisms
ematical proofs, of the statements in the Main Text (Results and Methods). It S, T ⊂ Aut(G ) are support-disjoint if σ and τ are support-disjoint for every
is organised into sections of the same headings as in the Main Text, to which pair σ ∈ S and τ ∈ T .
they correspond. We assume the terminology and notation in the Main Text.
The geometric decomposition is obtained by partitioning a set of genera-
tors X = {σ1 , . . . , σk } of Aut(G ) (that is, every automorphism σ ∈ Aut(G ) is
Related Work
the product, or composition, of elements in X), which the additional property
We have kept the content as self-contained as possible, by including details on
of being essential (explained below), into pairwise support-disjoint subsets
material relatively well known in the graph theoretic literature, but perhaps not
so for an applied audience. The automorphism group of a graph is well studied X = X1 ∪ . . . ∪ Xk . (24)
in algebraic and spectral graph theory24, 39, 40 , and the concepts of equitable
partitions, characteristic matrix and quotient graph can be found in e.g.40, 41 , (How to obtain in practice an essential set of generators, and the support-
including the relation between quotient and parent eigenvalues, and the main disjoint partition, is explained in the Network Symmetry Computation section
ingredients of the spectral decomposition for binary graphs [40, Remark below). Let us call Mi the set of vertices moved by generators in Xi , that is,
3.9.6]. More recently, Francis et al.42, 43 have developed a general theory [
of equitable decompositions for automorphism compatible matrices. The Mi = {i ∈ V such that σ (i) 6= i for some σ ∈ Xi } = supp(σ ), (25)
geometric decomposition and symmetric motifs were originally defined in10 , σ ∈Si
and the redundant spectrum and spectral decomposition in11 , in both cases
and Mi the subgraph induced by Mi (that is, the graph with vertex set Mi , and
for binary adjacency matrices only.
all edges in G between vertices in Mi ). Further, define Hi = hXi i, the subgroup
Following the seminal work of MacArthur et al.10, 11 , symmetry has been
generated by Xi (that is, all the permutations obtained by composing elements
used in empirical networks, for instance to study the quotient as a coarse
in Xi ) and call it a geometric factor. The support-disjoint decomposition of X
graining tool real-world networks18 , detect symmetric motifs via symmetry
above, (24), gives a direct product44 decomposition of Aut(G ) into geometric
compression20 , and reduce shortest path query computations19 . The redun-
factors
dant Laplacian spectrum has been explored for regular degree21 and random
Aut(G ) = H1 × . . . × Hk , (26)
geometric graphs22 , and the dynamical implications of eigenvector localisa-
tion analysed23 . A key motivation of this article has been to develop the most called the geometric decomposition of Aut(G ). In other words, every automor-
general common framework for these (and other) results. phism σ ∈ Aut(G ) can be uniquely decomposed as a product (composition)

σ = τ1 τ2 . . . τk , τi ∈ Hi = hXi i, (27)
SI Symmetry in Complex Networks
of permutations τi of vertices of Mi only. Hence understanding the symmetries
On Labels and Symmetries of each subgraph Mi , we recover all automorphisms of G . (Of course
A network is a combinatorial object which encodes pairwise relations (edges not every automorphism of Mi , considered as a graph on its own, is an
or links) between objects (vertices or nodes). It is therefore independent of automorphism of G , as it also depends on how Mi is embedded in G .) The
the ordering, or labelling, of the vertices. An ordering is needed to refer to, subgraphs Mi are called symmetric motifs since they generate all the network
and work with, a network. We can choose an ordering simply by enumerating symmetry. In real-world networks, symmetric motifs are typically small,
the vertices 1 to n = |V |. Such ordering is needed, for example, to define however, as the network automorphisms consists on all possible combinations
the adjacency matrix. Note that a different ordering results in a (possibly) of these localised symmetries, their presence explains the large size, in
different adjacency matrix of the same network. We always assume a chosen, absolute terms, of Aut(G ) observed empirically (SI Table 3,10 ).
and thereafter fixed, labelling 1 to n = |V | of the vertices.
On the other hand, a symmetry, or automorphism, of a network is a Proposition 1. The support-disjoint decomposition (24) implies the direct
permutation of the vertices preserving adjacency. It can also be thought of as product decomposition (26).

11/22
Proof. This is an immediate consequence of the characterisation of direct In real-world networks, symmetry is localised at small subgraphs (the
product of groups44 , shown here for m = 2: a group G is isomorphic to K × L symmetric motifs) and thus generated by low degree vertices. The universality
for subgroups K and L if (i) their intersection K ∩ L is trivial (the identity of power-law degree distributions1 guarantees the abundance of such low
element only); (ii) every element in G is a product k l with k ∈ K and l ∈ L; degree vertices and justifies the large (in absolute terms) automorphism
(iii) the elements in K and L commute k l = l k for all k ∈ K, l ∈ L. Since X groups observed in real-world networks. Indeed, the authors in8 show how a
is a generating set, condition (ii) is satisfied by H1 = hX1 i and H2 = hX2 i, Barabasi-Albert model reproduces the characteristic symmetry found in real-
and the support-disjoint condition immediately implies (i) and (iii). The case world networks. On the other hand, without a power-law degree distribution,
m > 2 is a simple generalisation. we can find real-world networks with trivial automorphism group, such as
the Blue Brain connectome46 , which has hardly any low degree vertices
Not every vertex participates in a network symmetry, and we write M0 for (neurons). Even with a power-degree distribution, we found networks with
the set of such fixed vertices, that is, relatively low symmetry, such as CaliforniaRoads, where only 4% of all the
M0 = {i ∈ V such that σ (i) = i for all σ ∈ Aut(G )}. (28) vertices participate in any symmetry (Table 1 in the Main Text).

We then have a partition of the vertex set Basic Symmetric Motifs


V = M0 ∪ M1 ∪ . . . Mk . (29) In theory, any finite group can be the automorphism group of a graph24 . In
real-world networks, however, Aut(G ) is the direct (occassionally, semidirect)
That is, each network can be partitioned into an asymmetric core (the sub- product of symmetric groups Sn 10 . Moreover, most symmetric motifs are
graph, typically connected, induced by the fixed vertices M0 ) and the sym- made of orbits of the same size with the geometric factor realising every
metric motifs. The asymmetric core is related, but not equal, to the quotient possible permutation of the vertices in each orbit. Formally, a symmetric
(as a vertex set, the quotient equals the asymmetric core plus one vertex per motif Mi is called basic if it consists of one or more orbits of n vertices,
orbit, see the Quotient Network section below). and the symmetric factor Hi is the symmetric group Sn realising all the n!
Every symmetric motif can be further decomposed into one or more orbits permutations of each orbit. (We then call Mi a basic symmetric motif of
of structurally equivalent vertices. The orbit of a vertex i is the set of vertices type n.) Most (over 90%) of symmetric motifs in our test networks are basic
to which i can be moved to by an automorphism, that is, (Table 1 in the Main Text), similar to the results in10 .
{σ (i) such that σ ∈ Aut(G )}. (30) Basic symmetric motifs (BSMs) have a very constrained structure:

Every vertex belongs to an orbit (made of just the vertex itself if it is fixed) • every orbit is a complete or an empty graph;
and if a symmetric motif contains a vertex in an orbit, then it must contain all • each pair of orbits in the same symmetric motif can only be connected
the vertices in the orbit. in one of four possible ways (each vertex in one orbit connected to
either all, none, one, or n − 1 vertices in the other orbit);
Proposition 2. If vertices i and j belong to the same orbit, then they also
belong to the same symmetric motif. • every vertex not in the symmetric motif joins either all or none of the
vertices in an orbit, for each orbit.
Proof. We can assume i 6= j. As they belong to the same orbit, there is
an automorphism σ with σ (i) = j. Write σ as a product of generators (For a proof, see11 , or the more general Theorem 9 below.) It is easy to show
σ = x1 . . . xl , xi ∈ Xi and argue by induction on l ≥ 1. If l = 1, then x1 (i) = j (or see Theorem 9 ) that the third property holds for any symmetric motif,
and i 6= j hence i ∈ supp(x1 ). In addition, j ∈ supp(x1 ): otherwise x1 ( j) = j basic or not. Also note that for a BSM with only two orbits, the ‘all-to-all’
implies j = x1−1 ( j) = i, a contradiction. As i, j ∈ supp(x1 ), they are in or ‘none-to-none’ connectivity need not be considered, since in that case the
the same symmetry motif, by (25). Suppose now l > 1 and the induction orbits can be classified as two separate BSMs of one orbit each.
hypothesis. Write k = x2 . . . xl (i) so that j = x1 (k). Assume j 6= k (otherwise Non-basic symmetric motifs are called complex; they are rare in real-
remove x1 so that j = x2 . . . xl (i)). By the induction hypothesis, k and i belong world networks and can be studied on a case-by-case basis. Typical complex
to the same symmetric motif, and, by the same argument as in the case l = 1, symmetric motifs are branched trees (M7 in Fig. 1), among others10 .
j 6= k also belong to the same symmetric motif.
Weighted and Directed Networks
This proposition, implicit in10 , proves that the vertices in each symmetric The adjacency matrix of a network can encode arbitrary weights and direc-
motif can be partitioned into orbits, tions, as explained in the Main Text, making a general n × n real matrix A the
Mi = Vi
(1) (mi )
∪ . . . ∪Vi . (31) adjacency matrix of some (weighted, directed) network. The definition of
automorphism group, geometric decomposition, geometric factor, symmetric
Note that any set of generators can be partitioned into support-disjoint motif and orbit, and their properties, as they are defined only in terms of A,
subsets (24), and this gives the direct product decomposition (26) when carry verbatim to arbitrarily weighted and directed networks. In this setting,
Hi = hXi i. However, this decomposition is not unique (a geometric factor a symmetry (automorphism), respects not only adjacency, but weights and di-
could be further decomposed) and depends on the choice of generators (for rections. In particular, the automorphism group is smaller than (a subgroup of)
example, adding a generator s1 s2 to X, where s1 ∈ X1 and s2 ∈ X2 would the automorphism group of the underlying undirected, unweighted network.
force X10 = X1 ∪ X2 and H10 = H1 × H2 , a coarser geometric decomposition). By introducing edge weights or directions, some symmetries will disappear,
By requiring X to be essential (see below), the geometric decomposition (26) removing (and occasionally subdividing) geometric factors, symmetric motifs
is unique (up to permutation of the factors Hi ), and the finest possible (each and orbits.
Hi cannot be further decomposed into a direct product of non-trivial support-
disjoint subgroups), see Proposition 2.1 in10 . In particular, the geometric Theorem 8. Let Aw = (wi j ) be the adjacency matrix of an arbitrarily
decomposition and symmetric motifs are well-defined. weighted and directed network Gw , and A = (ai j ) the adjacency matrix
A set of generators X is essential if (1) it does not contain the identity 1 of the underlying undirected and unweighted network G , that is, ai j =
(trivial permutation); (2) s = gh ∈ X with g and h support-disjoint implies sgn(|wi j | + |w ji |). Consider the geometric decomposition
g = 1 or h = 1; and (3) if X 0 ⊂ X generates H1 × H2 support-disjoint (as sets),
then X 0 = X1 ∪ X2 (necessarily support-disjoint) with Xi generating Hi . Graph Aut(G ) = H1 × . . . × Hm , respectively
automorphism algorithms such as NAUTY produce essential sets of generators Aut(Gw ) = H10 × . . . × Hm0 0 ,
(Theorem 2.34 in45 ) and so does SAUCY, at least in practice (see the Network
Symmetry Computation section below). Having said this, all the results in the with symmetric motifs with vertex sets M1 , . . . , Mm , respectively M10 , . . . , Mm0 0 .
Main Text are independent of whether the geometric decomposition is indeed Then for every 1 ≤ i ≤ m0 there is a unique 1 ≤ j ≤ m such that Hi0 ⊆ H j and,
the finest possible or not, and hence, any decomposition into a (possibly large) consequently, Mi0 ⊆ M j . In other words, the geometric decomposition of Gw
number of small symmetric motifs can be used to exploit network symmetry is a refinement of that of G . Similarly, each vertex orbit in Gw is a subset of a
as explained in this article. vertex orbit in G .

12/22
Name nG gen aut sm bsm1 bsm2 bsm3+ opm vpm ñQ ñbasic
Q m̃Q m̃basic
Q

HumanDisease 1,419 713 10407 272 259 2 0 1.01 3.68 48.3 52.2 50.4 53.8
Yeast 1,647 380 10218 149 138 10 0 1.07 3.46 76.3 76.4 83.5 83.7
OpenFlights 3,397 732 10373 321 290 10 0 1.03 3.33 77.3 79.7 94.4 95.0
USPowerGrid 4,941 414 10153 302 266 22 6 1.15 2.36 90.2 91.6 91.4 92.5
HumanPPI 9,270 972 10528 437 434 3 0 1.01 3.22 89.5 89.5 96.9 97.0
Astro-Ph 17,903 3,232 101,588 1,682 1672 0 0 1.00 2.93 81.9 82.1 80.5 80.5
InternetAS 34,761 15,587 1015,403 3,189 3,153 32 1 1.01 5.85 55.0 55.1 78.2 78.2
WordNet 145,145 52,152 1024,064 28,456 25,759 375 52 1.03 2.98 60.1 70.2 58.0 63.8
Amazon 334,863 32,098 1012,495 23,302 22,964 286 13 1.01 2.37 90.3 90.4 89.0 89.0
Actors 374,511 182,803 1039,950 36,703 36,683 4 0 1.00 5.98 51.2 51.2 66.4 66.4
InternetAS-skitter 1,694,616 319,738 10258,835 84,675 81,537 2,226 169 1.03 3.82 85.4 85.8 92.7 92.8
CaliforniaRoads 1,957,027 36,430 1011,228 35,210 33,220 1,255 328 1.08 2.04 97.9 98.1 98.5 98.6
LiveJournal 5,189,808 410,575 10197,552 245,211 243,743 1,182 26 1.01 2.67 92.1 92.1 97.5 97.5

Table 3. Symmetry in some real-world networks (continued). In addition the summary statistics shown in Table 1 in the Main Text, here
we report the size of the automorphism group to the closest power of 10 (aut), the number of BSMs with one, two, or more than two orbits (bsm1 , bsm2 ,
bsm3+ ), the average number of orbits per motif (opm) and vertices per orbit (vpo), and the proportion of vertices ñbasic
Q and edges m̃basic
Q in the basic quotient.

Proof. First we show that the automorphism group of Gw is a subgroup of Theorem 9. Let M be the vertex set of a BSM of a network G (that is, a
the automorphism group of G . If σ : V → V is a permutation of the vertices, symmetric motif made of one or more orbits of size n with geometric factor
then the symmetric group Sn realising all the permutation in each orbit), and F a
wσ (i)σ ( j) = wi j =⇒ aσ (i)σ ( j) = ai j structural network measure. Then the graph induced by M in F(G ) is a BSM
by considering two cases: wi j 6= 0 implies wσ (i)σ ( j) 6= 0 which gives ai j = of F(G ), and satisfies:
aσ (i)σ ( j) = 1; wi j = 0 implies wσ (i)σ ( j) = 0 which gives ai j = aσ (i)σ ( j) = 0 (i) for each orbit ∆ = {v1 , . . . , vn }, there are constants α and β such that
(note wi j 6= 0 ⇐⇒ ai j = 1). Hence Aut(Gw ) ⊂ Aut(G ), which immediately the orbit internal connectivity is given by α = F(vi , v j ) for all i 6= j
gives the result on orbits. and β = F(vi , vi ) for all i;
For the geometric decomposition, we choose essential sets of generators
(ii) for every pair of orbits ∆1 and ∆2 , there is a labelling ∆1 = {v1 , . . . , vn },
S, respectively S0 , of Aut(G ), respectively Aut(Gw ), with support-disjoint
∆2 = {w1 , . . . , wn } and constants γ1 , γ2 , δ1 , δ2 such that γ1 = F(vi , w j ),
partitions
γ2 = F(w j , vi ), δ1 = F(vi , wi ), and δ2 = F(wi , vi ), for all i 6= j;
X = X1 ∪ . . . ∪ Xm , respectively X 0 = X10 ∪ . . . ∪ Xm0 0 . (iii) every vertex v not in the BSM is joined uniformly to all the vertices
It is enough to prove the statement for these sets: given i, there is unique in each orbit {v1 , . . . , vn } in the BSM, that is, F(v, vi ) = F(v, v j ) and
j such that Xi0 ⊆ X j . Let x0 ∈ Xi0 ⊆ Aut(Gw ) ⊆ Aut(G ) thus we can write F(vi , v) = F(v j , v) for all i, j.
x0 = h1 · . . . · hm with hk ∈ Hk = hXk i. Since X 0 is an essential set of generators, Moreover, property (iii) holds in general for any symmetric motif.
there is an index j such that hk = 1 (the identity, or trivial permutation) for
all k 6= j, so that x0 = h j . Given any other y0 ∈ Xi0 , the same argument gives Note that, if G is undirected and F is symmetric, γ1 = γ2 and δ1 = δ2 and,
y0 = hl for some 1 ≤ l ≤ m. We claim j = l, as follows. The partition of X, in the terminology of the Main Text, each orbit is a (α, β )-uniform graph
respectively X 0 , above are the equivalence classes of the equivalence relation α,β
Kn and each pair of orbits form a (γ, δ )-uniform join, explaining Fig. 2
generated by σ ∼ τ if σ and τ are not support-disjoint permutations. Since (a-b) in the Main Text. Also note that, for unweighted, undirected graphs
x0 , y0 are in the same equivalence class, so are h j and hl and thus j = l. without loops, we recover the statements in the previous section: every orbit
is an empty or complete graph (β = 0, α = 0, 1), and every pair of orbits are
The same result applies to networks with other additional structure, not joined in one of the four possible ways (γ, δ = 0, 1).
necessarily expressed in terms of the adjacency matrix, such as arbitrary
vertex or edge labels, by restricting to automorphisms preserving the ad- Proof of Theorem. As F(G ) inherits all the symmetries of G , M has the
ditional structure. We obtain fewer symmetries, and a refinement of the same orbit decomposition and the geometric factor is Sn acting in the same
geometric decomposition, symmetric motifs, and orbits as above. The results way, hence M induces a BSM in F(G ) too. For the internal connectivity, note
in this paper, although applicable in theory, become less useful in practice as that every permutation of the vertices vi is realisable. Thus, given arbitrary
further restrictions are imposed, reducing the number of available network 1 ≤ i, j, k, l ≤ n, we can find σ ∈ Aut(G ) such that σ (vk ) = vi and, if j 6= i
symmetries. and l 6= k, additionally satisfies σ (vl ) = v j . This gives
F(vi , v j ) = F(σ (vk ), σ (vl )) = F(vk , vl ),
SI Structural Network Measures
as F is a structural network measure. The other case, i = j and k = l, gives
As explained in the Main Text, a (pairwise) structural network measure F
applied to a network G inherits all the symmetries of G . It is possible that F(vi , vi ) = F(σ (vk ), σ (vk )) = F(vk , vk ).
further symmetries will appear in F(G ), the network representation of F For the orbit connectivity result (ii), we generalise the argument in [37, p.48]
(a trivial example would be F(i, j) = c, a constant, for all i, j), but so rare to weighted directed graphs with symmetries, particularly F(G ). We assume
in practical situations that we only consider symmetries directly inherited some basic knowledge and terminology about group actions44 and symmetric
from G . (A few additional symmetries would only result on a slightly finer groups Sn . Given two orbits ∆1 = {v1 , . . . , vn } and ∆2 = {w1 , . . . , wn } and
geometric decomposition of F(G ).) Consequently, we can assume that F(G ) 1 ≤ i ≤ n, define
has the same automorphism group as G , Aut (F(G )) = Aut (G ), and, in 
Γi = w j ∈ ∆2 | F(vi , w j ) 6= 0 ,
particular, the same geometric decomposition and geometric factors Hi . The
symmetric motifs in F(G ) have the same vertex sets and orbits, but with the vertices in ∆2 joined to vi in F(G ). If a finite group G acts on a set X,
edges weighted by F(i, j), and possibly directed if F(i, j) 6= F( j, i). As F(G ) the stabiliser of a point Gx = {g ∈ G | gx = x} is a subgroup of G of index
|G|
inherits all the symmetries of G , the basic symmetric motifs in F(G ) still have [G : H] = |H| equals to the size of the orbit of x. Hence the stabilisers Gvi or
a very constrained structure, explained below (cf. Theorem 1 in Methods). Gw j are subgroups of Sn of index n, for all i, j. The group Sn has a unique, up

13/22
to conjugation, subgroup of index n if n 6= 6. In this case, Gv1 is conjugate to the average connectivity from a vertex in Vk to vertices in Vl . That is, the
Gw1 so Gv1 = σ Gw1 σ −1 = Gσ w1 for some σ ∈ Sn . Relabelling σ w1 as w1 we quotient amalgamates the vertices of each Vk into a single vertex, and have
have Gv1 = Gw1 . Similarly, we can relabel the remaining vertices in ∆2 so that edges representing average connectivity.
Gvi = Gwi for all i: write v2 = σ2 v1 , v3 = σ3 v1 , . . . and relabel w2 = σ2 w1 , There is an explicit matrix equation for the quotient. Consider the n × m
w3 = σ3 w1 , . . ., noticing there cannot be repetitions as σk w1 = σl w1 for k 6= l characteristic matrix S of the partition, that is, [S]ik = 1 if i ∈ Vk , and zero
implies σk σl−1 ∈ Gw1 = Gv1 and thus vk = σk v1 = σl v1 = vl , a contradiction. otherwise, and the diagonal matrix Λ = diag(n1 , . . . , nm ), where nk = |Vk |.
Fix 1 ≤ i ≤ n. The stabiliser Gvi fixes vi but it may permute vertices in ∆2 . In Then
fact, the set Γi above must be a union of orbits of Gvi on ∆ j : if w ∈ Γi and
Q(A) = Λ−1 ST A S. (35)
σ ∈ Gvi then
They are other ways of taking the average in (34), such as 1/nl or
0 6= F(vi , w) = F(σ vi , σ w) = F(vi , σ w) √ √
1/( nk nl ) instead of 1/nk = 1/|Vk |, giving slightly different, but spec-
so σ w also belongs to Γi . The orbits of Gvi = Gwi in ∆2 are {wi } and trally equivalent, quotient matrices ST A SΛ−1 respectively Λ−1/2 ST A SΛ−1/2 .
∆2 \ {wi }, as Gwi fixes wi and freely permutes all other vertices in ∆2 . The We refer to our choice as the left quotient (matrix or network), and the other
case n = 6 is similar, except that S6 has two conjugacy classes of subgroups two as the right respectively symmetric quotient, writing Ql (A), Qr (A) or
of index 6, one as above, and the other a subgroup acting transitively on Qs (A) when necessary. (Note that Qr (A) = Ql (A)T if A is symmetric.) Oc-
the 6 vertices, which gives a unique orbit ∆2 . In all cases, the set ∆2 \ {wi } casionally, it will be convenient to ignore weights and directions: we call
is part of an Gvi -orbit, which gives the connectivity result, as follows. Fix unweighted quotient to the underlying unweighted, undirected quotient net-
1 ≤ i ≤ n. For 1 ≤ j, k ≤ n different from i, the vertices w j and wk are in the work, and, if we also remove self-loops (so that two orbits are connected if
same Gvi -orbit so there is σ ∈ Gvi with σ w j = wk and, therefore, they are distinct and at least one vertex of one orbit is connected to a vertex
of the other orbit) this is the quotient skeleton in Fig. 1 (the s-skeleton in18 ).
F(vi , w j ) = F(σ vi , σ w j ) = F(vi , wk ).
Finally, in the context of quotient networks, we call G the parent network of
The argument is general, so we have shown ai = F(vi , w j ) is constant for all Q.
j 6= i. It is enough to show ai = a1 for all i. Choose j 6= i, then Note that the (left) quotient Q is a directed and weighted network even if
ai = F(vi , w j ) = F(σi v1 , σ j w1 ) = F(v1 , σi−1 σ j w1 ) = a1 the parent network G is not: bi j 6= b ji 6∈ {0, 1} in general. However, Ql (A) is
spectrally equivalent to the symmetric matrix Qs (A), hence in particular is
as long as σi−1 σ j w1 6= w1 , which cannot happen as otherwise σi−1 σ j ∈ Gw1 = has real eigenvalues if G is undirected (SI Spectral Signatures of Symmetry).
Gv1 implies σi−1 σ j v1 = v1 or v j = σ j v1 = σi v1 = vi , a contradiction. Hence A natural quotient in the context of symmetries is given by the partition of
we have shown F(vi , w j ) is a constant, call it γ1 , for all i 6= j. In addition, vertices into orbits, Eqs. (29) and (31). Note that this partition is finer than
F(vi , wi ) = F(σi v1 , σi w1 ) = F(v1 , w1 ) the one associated to the geometric decomposition, as each symmetric motif
consists of one or more orbits, and that each fixed point in V0 (the asymmetric
is also a constant, call it δ1 , for all i. The cases γ2 = F(w j , vi ) and δ2 = core) becomes its own orbit, that is, it is not identified with any other vertex
F(wi , vi ) are identical, reversing the roles of ∆1 and ∆2 . in the quotient. From now on, we will implicitly refer to this quotient unless
Property (iii) holds for any symmetric motif, not necessarily basic, as stated otherwise. Occasionally, we will consider the quotient with respect
follows. By the definition of orbit, for each pair i, j we can find an automor- to a subgroup of Aut(G ) (cf. Theorem 8), or only certain symmetric motifs
phism σ in the geometric factor such that σ (v j ) = vi . Since v is not in the (e.g. basic quotient, explained below).
support of that geometric factor, it is fixed by σ , that is, σ (v) = v. Therefore A crucial property of the quotient with respect to orbits is that it removes
F(v, vi ) = F(σ (v), σ (v j )) = F(v, v j ), all the symmetries from the network: if σ (i) = j, then i and j are in the same
orbit and hence represented by the same vertex in the quotient network, which
and similarly F(vi , v) = F(v j , v). is then fixed by σ . (Although new symmetries might appear in the quotient,
these are rare and would not be symmetries of the parent network, and hence
Consequently, every orbit in a BSM is characterised by three parameters:
of no interest to us.) We can, consequently, infer and quantify properties
its size n, the connectivity between any pair of distinct vertices α, and the
arising from redundancy alone by comparing a network with its quotient. This
connectivity of a vertex with itself β . In the terminology and notation of
α,β is the approach taken in10 for spectral properties, which we will generalise
the Main Text, every orbit is a (α, β )-uniform graph, Kn , the graph with to undirected, arbitrarily weighted, networks with symmetries, such as the
adjacency matrix network representation of a network measure (SI Spectral Signatures of
Aα,β
n = α Cn + β In (32) Symmetry).
where Cn is the adjacency matrix of a complete graph (0 diagonal and 1 off- As we explain in the the Main Text, we can also exploit the quotient in
diagonal entries), and In the identity matrix. For example, a (1, 0)-uniform the context of network structural measures for compression (storage savings),
graph is a complete graph, and a (0, 0)-uniform graph is an empty graph. and for computational reduction (time and memory savings).
Similarly, every pair of orbits in the same BSM form a (γ1 , δ1 , γ2 , δ2 )-
α ,β α ,β
uniform join of two uniforms graphs Kn 1 1 and Kn 2 2 , that is, the graph
with adjacency matrix, possibly after a suitable reordering of the vertices, Quotient Compression and Recovery
α ,β γ ,δ
! The network representation of a structural network measure F(G ) inherits
An 1 1 An1 1 all the symmetries of G , which present themselves as redundancies, namely
A= γ ,δ α ,β , (33)
An2 2 An 2 2 as repeated values. For instance, for each symmetric motif M , the values
F(u, v) are constant, for each u not in M and each v in the same orbit of M .
where the submatrices are given as per (32).
If the network has n vertices, this means (n − k)l ≈ nl repeated values for
This constrained structure will be important when we discuss the quotient
each orbit of size l in a symmetric motif motif of size k (typically k and l
network, and the spectral signatures of symmetry.
are very small). The internal connectivity of a symmetric motif can also be
efficiently encoded, for instance each orbit in a BSM can be recovered from
SI Redundancy in Network Measures three values, its size n and constants α and β , and the connectivity between
pairs of orbits in the same BSM from two or four values (undirected/directed
Quotient Network case), and a permutation of the second orbit (Theorem 9). All this can be
If A is the n × n adjacency matrix of a graph G , the quotient network with exploited in a compression algorithm that eliminates redundancies induced
respect to a partition of the vertex set V = V1 ∪ . . . ∪Vm is the graph Q with by symmetries in an arbitrary network structural measure, as we explain next.
m × m adjacency matrix the quotient matrix Q(A) = (bkl ) defined by We first observe that this is most useful for full measures, since for sparse
1 structural measures, the values F(u, v) as above are mostly 0 and hence a
bkl = ∑ ai j , (34) sparse representation of F(G ) will account for most of the aforementioned
|Vk | i∈V
k
j∈Vl redundancies.

14/22
Average Compression and Recovery These are therefore the compression ratios obtained by using the quotient to
If we are not interested in the internal symmetric motif connectivity, or it represent a sparse, respectively full, network measure on G . The values of
can be recovered easily by other means (e.g. locally one motif at a time), a csparse = and cfull for our test networks are given in Table 1 in the Main Text.
simple algorithm (Algorithm 8) compresses and recovers all but the internal In summary, we have a simple compression/decompression procedure
symmetric motif connectivity, which is replaced by the average connectivity, (Algorithms 8 and 9 below, or 2 and 3 in Methods) that eliminates the
as the next result (Theorem 2 in Methods) shows. symmetry-induced redundancies in a network measure, and achieves exact
recovery for external edges (the vast majority of edges, or vertex pairs), and
Theorem 10. Let A = (ai j ) be the n × n adjacency matrix of a (possibly average recovery for internal edges.
directed and weighted) network with vertex set V . Let S be the n × m char-
acteristic matrix of the partition of V into orbits of the automorphism group
of the network, and Λ the diagonal matrix of column sums of S. Define Input: adjacency matrix A, characteristic matrix S
B = ST AS and Aavg = RBRT = (āi j ) where R = SΛ−1 . Then, Output: quotient matrix B
(i) if i, j ∈ V belong to different symmetric motifs, āi j = ai j . B ← ST AS
(ii) if i, j ∈ V belong to orbits i ∈ ∆1 and j ∈ ∆2 in the same symmetric Algorithm 8: Average symmetry compression.
motif,
1 1
āi j = ∑ auv . (36)
|∆1 | |∆2 | u∈∆
1
v∈∆2
Input: quotient matrix B, characteristic matrix S
Before proving this statement, we make a few observations. The column Output: adjacency matrix Aavg
sums of S equal the sizes of the vertex partition sets, that is, the matrix Λ Λ ← diag(sum(S))
in the statement is the same as in the definition of quotient matrix, (35),
R ← SΛ−1
and can be obtained easily from S. The matrix S is very sparse and can be
stored very efficiently, as it has at most n non-zero elements (each row has Aavg ← RBRT
a unique non-zero entry). Case (i) covers the vast majority of vertex pairs Algorithm 9: Average symmetry decompression.
(external edges) for a network measure (see exts and int f in Table 1 in the
Main Text). In (ii), the case ∆1 = ∆2 is allowed. The matrix B = ST AS is
symmetric with integer entries if A is too, hence generally easier to store than
Ql (A) = Λ−1 ST AS. However, the theorem still holds for the left, right and Lossless Compression and Recovery
symmetric quotient, as We can achieve lossless compression if we recover the exact internal motif
connectivity as well. This can be done by exploiting the structure of BSMs,
Aavg = SΛ−1 ST ASΛ−1 ST = S Ql (A) Λ−1 ST = SΛ−1 Qr (A) ST (37) which account for most of the symmetry in real-world networks. If the
motif is basic, we can preserve the exact parent network connectivity in an
= SΛ−1/2 Qs (A) Λ−1/2 ST . (38) α,β
annotated quotient, as follows. Each orbit in a BSM is a uniform graph Kn
Proof of Theorem. Let V = ∆1 ∪ . . . ∪ ∆m be the partition into orbits, and which appears in the quotient as a single vertex with a self-loop weighted by
write nk = |∆k |. Clearly, the row sums of S equals n1 , . . . , nm . Writing [M]i j (n − 1)α + β (Fig. 2 (c, top)). Hence if we annotate this vertex in the quotient
for the (i, j)-entry of a matrix M, matrix multiplication gives by not only n but also α, or β , we can recover the internal connectivity.
( Similarly, the connectivity between two orbits in the same symmetric motif
1
l=k 1 if i ∈ ∆k , is given by two parameters γ, δ (undirected case) and appears in the quotient
[R]ik = ∑[S]il [Λ−1 ]lk = [S]ik = nk
l nk 0 otherwise. as an edge weighted (n − 1)γ + δ (Fig. 2 (c, bottom) in Main Text) and thus
can also be recovered from a quotient with edges annotated by γ, or δ .
Similarly, assuming i ∈ ∆k and j ∈ ∆l , we have There is no general formula for an arbitrary non-basic symmetric motif,
1 1 1 1 and for those we can either record their internal connectivity separately,
āi j = [RBRT ]i j = ∑ [R]iα [B]αβ [R] jβ = nk nl [B]kl = nk nl ∑ auv . or, alternatively, leave them unchanged in the quotient, by taking a partial
α,β u∈∆k
v∈∆l quotient, the basic quotient, written Qbasic , with respect to the partition of the
vertex set into orbits in BSMs only (vertices in non-basic symmetric motifs
This expression reduces to ai j if the orbits belong to different symmetric become fixed points and become part of the asymmetric core). The annotated
motifs, since in this case all the summands in ∑u∈∆k ,v∈∆l auv are equal to (as above) basic quotient achieves most of the symmetry reduction in a typical
one another. Indeed, given i1 , i2 ∈ ∆k and j1 , j2 ∈ ∆l , we can find, by the empirical network (ñbasic ≈ ñQ , m̃basic ≈ m̃Q , see SI Table 3) while retaining
Q Q
definition of orbit and symmetric motif, automorphisms σ and τ such that all the parent network connectivity. However, to maintain the same vertex
σ (i1 ) = i2 while fixing j1 , and τ( j1 ) = j2 while fixing i1 . This gives labelling as in the parent network, we also need to record, for each pairs of
ai1 j1 = aτσ (i1 )τσ ( j1 ) = aτ(i2 )τ( j1 ) = ai2 j2 . orbits in the same symmetric motif, the corresponding permutation of the
second orbit (Theorem 9(ii)), as otherwise we loose vertex identity on each
A similar proof to case (i) above shows that, if Ql (A) = (bkl ) is the left orbit.
quotient, then Similarly to average compression, we introduce compression ratios for
1 1 lossless compression with respect to the basic quotient
ai j = bkl = blk ,
nl nk
mQbasic n2Qbasic
where vertex i, respectively j, belongs to an orbit of size nk , respectively nl . cbasic
sparse = e basic
=m and cbasic nbasic 2
Q full = = (eQ ) , (39)
As in the proof, each summand in ∑u∈∆k ,v∈∆l auv is constant and, therefore, mG n2G

1 1 and note that typically cbasic basic


sparse ≈ csparse and cfull ≈ cfull for a real-world
bkl = auv = |∆k ||∆l |ai j = |∆l |ai j ,
|∆k | u∈∆∑
,v∈∆ |∆k | network (SI Table 3).
k l
Algorithms for lossless compression and recovery with vertex identity
which gives the first equality. The second equality follows from observing based on the basic quotient are described below (Algorithms 10 and 11),
that, although Ql (A) = (bkl ) is non-symmetric, bkl = nnl blk for all k, l. and MATLAB implementations for BSMs up to two orbits are available at34 .
k
As in the Main Text, we quantify the redundancy in an arbitrary sparse, The results reported in Fig. 3 in the Main Text are with respect to these
respectively full, network measure using implementations, and the actual compression ratios reported include the size
of the annotation data for lossless compression with vertex identity (a very
mQ n2
csparse = e Q and cfull = Q
=m = ne2Q . small fraction of the size of the quotient in practice, adding at most 0.02% to
mG n2G the basic full compression ratio in all our test cases).

15/22
Input: adjacency matrix A, characteristic matrix for the basic quotient Input: quotient matrix B, characteristic matrix S, annotation structure a
S, list of BSMs motifs Output: adjacency matrix A
Output: quotient matrix B, annotation structure a Λ ← diag(sum(S))
B ← ST AS R ← SΛ−1
extract orbits from S A ← RBRT
foreach orb in orbits do extract orbits from S
rep ← min(orb) foreach orb in orbits do
β ← A(rep, rep) n ← size(orb)
store β in annotation structure a extract β from a
end compute α from B, β and n (using [B]orb,orb = n ((n − 1)α + β ))
α,β
kmax ← max(size(motifs)) maximal number of orbits in a motif construct adjacency matrix of the orbit An
for k ← 2 to kmax do A(orb, orb) ← An
α,β
extract k-BSM (list of BSMs with k orbits) from motifs
end
foreach bsm in k-BSM do
foreach pairs of distinct orbits V1 ,V2 in bsm do extract pairs of orbits in the same BSM from a
compute δ and permutation of V2 perm such that foreach (V1 ,V2 ) in pairs do
A(k, perm(k)) = δ for all k ∈ V1 n ← size(V1 )
store orbit numbers (with respect to S), δ and perm in extract δ , perm from a
annotation structure a compute γ from B, δ and n (using [B]V1 ,V2 = n ((n − 1)γ + δ ))
end γ,δ
construct matrix An
end A(V1 , perm) ← An
γ,δ
end γ,δ
A(perm,V1 ) ← An
Algorithm 10: Lossless symmetry compression. end
Algorithm 11: Lossless symmetry decompression.

SI Computational Reduction
quotient recoverability holds, there is a substantial computational reduction
Network symmetries can also be used to reduce the computational time
by evaluating F on a smaller graph. For instance, if F has time complexity
of a network measure F. Recall that a sparse, respectively full, network
O ( f (n, m)), then we can evaluate F on Q on a fraction f (ñQ , m̃Q ) of the
measure consists on at most mG , respectively n2G , non-zero values F(i, j).
time. In Fig. 4 in the Main Text, we report the computational time reduc-
Since F(i, j) = F(σ (i), σ ( j)) for each σ ∈ Aut(G ), we essentially need to
tion of evaluating F on the quotient for the network measures, and the test
evaluate F on mQ , respectively n2Q , orbit representatives only. This amounts
networks, considered in this article.
to a computational reduction ratio between csparse and cfull . Of course, this
assumes that the calculation on each pair of vertices is independent of one
another, which is often not the case. Moreover, the calculation on each SI Spectral Signatures of Symmetry
pair F(i, j) is still performed on the whole network G . Next we investigate
whether we could perform the calculation on the quotient instead, which Preliminaries
would lead to greater computational gains by evaluating F on a smaller Symmetry naturally produces high-multiplicity eigenvalues: if v is an eigen-
graph. vector of the adjacency matrix A of a (possibly weighted, directed) network
We call a network measure F partially quotient recoverable if it can G with eigenvalue λ , so is Pv,
be applied to a quotient network and all the external edges of F(G ) can APv = PAv = λ Pv, (41)
be recovered from F(Q), for all networks G . (Here Q is a quotient of for any P permutation matrix representing an automorphism of G , and v and
G , possibly basic or annotated.) Since the quotient averages the network Pv will generally be linearly independent. In11 , the authors formalise and
connectivity, we can often recover the average values of F between orbits quantify the effects of network symmetry on the spectrum and eigenvectors
as well. We call F average quotient recoverable if, in addition to external of real-world networks, predicting the observed ‘peaks’ in spectral density
edges, the average intra-motif edges can be recovered from F(Q). A typical and showing that symmetry explains most of their multiplicity. Here we
situation is when F(Q) equals the quotient representation of F, Q(F(G )), explain how the spectral results in11 generalise to weighted networks with
that is, in symbols, symmetries, such as the network representation F(G ) of a structural network
F(Q) = Q(F(G )). (40) measure F.
(Recall that we can recover the external edges, and the average internal edges, Let A = (ai j ) be the n × n adjacency matrix of an arbitrarily weighted
of F(G ) from Q(F(G )), for any version of the quotient, by Theorem 10 and and directed network, B = (bkl ) its m × m (left) quotient matrix with respect
(37)). We will show that communicability is average quotient recoverable (see to the orbit partition V1 ∪ . . . ∪Vm , and S the n × m characteristic matrix of
the Communicability section below), and shortest path distance is partially, the partition. A vector v ∈ Rn , respectively w ∈ Rm , can be seen as a vector
but not average, quotient recoverable (see the Shortest Path Distance below). on (the vertices of) the parent, respectively quotient, network. Then Sw is
Not every measure can be (partially) recovered from the quotient, for example the vector w lifted to the parent network by repeating the entries on each V j .
the number of distinct paths between two vertices. Note that the word Similarly, ST v (where ST is the matrix transpose) is the vector v projected to
‘partially’ can be misleading: typically almost all edges are external (see exts the quotient by adding all its entries on each V j . Note that Sw 6= 0 if w 6= 0.
and int f in Table 1 in the Main Text). We call the vector v orthogonal to the partition if its projection ST v is zero,
Finally, we call F fully quotient recoverable if the external and internal that is, the sum of the entries of v on each orbit is zero.
edges intra-motif edges, that is, the whole network representation F(G ), can The partition into orbits satisfy important regularity conditions. A partition
be obtained from F(Q), for every network G . Technically, the parent network of the vertex set V = V1 ∪ . . . ∪Vm is left equitable if
G can be fully recovered from an annotated basic quotient (see e.g. lossless ∑ ai1 j = ∑ ai2 j for all i1 , i2 ∈ Vk , for all 1 ≤ k, l ≤ m, (42)
compression above), so by full recoverability we mean, beyond evaluating j∈Vl j∈Vl
F(Q), a local (hence parallelizable) computation on each symmetric mo- that is, if the connectivity from a node in Vi to all nodes in V j is independent
tif (typically a very small graph). For example, communicability is fully of the chosen node in Vi . Similarly, the partition is right equitable if
quotient recoverable (see Communicability), and the shortest path distances
∑ ai j1 = ∑ ai j2 for all j1 , j2 ∈ Vl , for all 1 ≤ k, l ≤ m. (43)
by reconstructing each motif at a time (see Shortest Path Distance). When i∈Vk i∈Vk

16/22
Clearly, if A is symmetric, being left and right equitable are equivalent Theorem 11. Suppose that A is an n × n real symmetric matrix and B the
properties. Next we show matrix characterisations of left and right equitability, m×m (left) quotient matrix with respect to an equitable partition V1 ∪. . .∪Vm
and that the partition into orbits is both left and right equitable. of the set {1, 2, . . . , n}. Let S be the characteristic matrix of the partition.
Then A has an eigenbasis of the form
Proposition 3. Let V = V1 ∪ . . .Vm be a partition of the vertex set of a graph
with adjacency matrix A = (ai j ), and let S be the characteristic matrix of {Sv1 , . . . , Svm , w1 , . . . , wn−m } ,
the partition. Write Ql (A), respectively Qr (A) for the left, respectively right,
where {v1 , . . . , vm } is any eigenbasis of B, and ST wi = 0 for all i.
quotient with respect to the partition.
(i) The partition is left equitable partition if and only if AS = SQl (A). Proof. Recall that Sv 6= 0 if v 6= 0 (S lifts the vector v from the quotient by
repeating entries on each orbit) so the linear map
(ii) The partition is right equitable partition if and only if AT S = SQr (A)T .
(iii) The partition into orbits of the automorphism group V = ∆1 ∪ . . . ∪ ∆m Rm → Rn , v 7→ Sv
is left and right equitable. has trivial kernel and hence it is an isomorphism onto its image. In particu-
lar, B = {Sv1 , . . . , Svm } is also a linearly independent set, and they are all
Proof. (i) Fix 1 ≤ i ≤ n and 1 ≤ k ≤ m, and suppose i ∈ Vl . Then
eigenvectors of A, since AS = SB as the partition is equitable. To finish the
[AS]ik = ∑ ai j , proof we need to complete B to a basis {Sv1 , . . . , Svm , w1 , . . . , wn−m } such
j∈Vk that each w j is an A-eigenvector orthogonal to all Svi . As B is a basis of
and, using the left equitable condition, Im(S), this would imply wi ∈ Im(S)⊥ = Ker(ST ), giving ST wi = 0 for all i,
as desired. Since A is diagonalisable, Rn decomposes as an orthogonal direct
1 1 sum of eigenspaces, Rn = λ Eλ . In each Eλ , we can find vectors w j such
L
[SQl (A)]ik = [Ql (A)]lk = ai1 j = |Vl | ∑ ai j = ∑ ai j .
|Vl | i1∑
∈V |Vl| j∈V j∈Vk that they complete Vλ = {Svi ∈ B | vi λ -eigenvector} to a basis of Eλ and
l k
j∈Vk
that are orthogonal to all vectors in Vλ (consider the orthogonal complement
For the converse, note that [AS]il does not depend on i but on the orbit of i. of the subspace generated by Vλ in Eλ ). Repeating this procedure on each
Namely, given i1 , i2 ∈ Vk , Eλ , we find vectors {w1 , . . . , wn−m } as needed.

∑ ai1 j = [AS]i1 l = [Ql (A)]kl = [AS]i2 l = ∑ ai2 j . The statement and proof above holds for arbitrary matrices A by replacing
j∈Vl j∈Vl ‘eigenbasis’ by ‘maximal linearly independent set’ and removing the condition
(ii) Similarly, with i, k and l as above, ST wi = 0. It would be interesting to know whether the condition ST wi = 0
holds for motif eigenvectors in the directed case as well (the proof above is
[AT S]ik = ∑ a ji , no longer valid).
j∈Vk
We call {Sv1 , . . . , Svm } quotient eigenvectors of G : they arise from a quo-
and, using the right equitable condition, tient eigenbasis by repeating values on each orbit; and we call {w1 , . . . , wn−m }
1 1 redundant eigenvectors of G : they arise from the symmetries in the network
[SQr (A)T ]ik = [Qr (A)]kl = a ji1 = |Vl | ∑ a ji = ∑ a ji . (and they ‘disappear’ in the quotient), and add up to zero on each orbit
|Vl | i1∑ |Vl|
∈V l j∈Vk j∈Vk (ST wi = 0). Similarly, we use the terminology quotient and redundant eigen-
j∈Vk
values for their associated spectrum.
For the converse, let j1 , j2 ∈ Vl , then Further to the spectral decomposition theorem, we can give an even more
precise description of the redundant spectrum: it is made of the contributions
∑ ai j1 = [AT S] j1 k = [Qr (A)]kl = [AT S] j2 k = ∑ ai j2 . from the spectrum of each individual symmetric motif, as we explain next.
i∈Vk i∈Vk

(iii) Given i1 and i2 in the same orbit ∆k , choose an automorphism σ such Redundant Spectrum of Symmetric Motifs
that σ (i1 ) = i2 . Then, since automorphisms respect the adjacency matrix, As stated in the Main Text (Theorem 3 in Methods), the redundant spectrum
of a graph M is a subset of the spectrum of any (undirected) network G
∑ ai1 j = ∑ aσ (i1 )σ ( j) = ∑ ai2 σ ( j) = ∑ ai2 j , containing M as a symmetric motif. This essentially follows from the
j∈∆l j∈∆l j∈∆l j∈∆l
condition ST w = 0 for redundant eigenvectors of M .
where the last equality follows from the fact that an element in a group
permutes orbits, in this case, { j : j ∈ ∆l } = {σ ( j) : j ∈ ∆l }. Hence the Theorem 12. Let M be a symmetric motif of a (possibly weighted) undi-
partition into orbits is left equitable. A similar argument shows that it is right rected graph G . If (λ , w) is a redundant eigenpair of M then (λ , w)
e is a
equitable as well. eigenpair of G , where w e is equal to w on (the vertices of) M , and zero
elsewhere.
Note that (iii) holds for any subset of orbits or any subgroup of the auto-
morphism group (in particular, for the basic quotient). Proof. Since (λ , v) is an M -eigenpair,

Spectral Decomposition Theorem ∑ [AM ]i j w j = λ wi ∀ i ∈ V (M ),


j∈V (M )
The key spectral property of the quotient into orbits of the automorphism
group (or any subgroup) is that its eigenvalues are a subset of the eigenvalues where AM is the adjacency matrix of M . We can decompose M into orbits,
of the parent network. Namely, if v is a right (respectively left) eigenvector of
Ql (A) (respectively Qr (A)) with eigenvalue λ , then Sv (respectively vST ) is a V (M ) = V1 ∪ . . . ∪Vm ,
right (respectively left) eigenvector of A with the same eigenvalue. (These and, by the spectral decomposition theorem above applied to M , w is orthog-
two statement are obviously equivalent if A is symmetric.) This follows onal to each orbit, that is,
immediately from the matrix characterisation of equitability above:
∑ wj = 0 ∀ 1 ≤ i ≤ m.
Ql (A)v = λ v =⇒ A(Sv) = SQl (A)v = λ Sv, and (44) j∈Vi

v Qr (A) = λ v =⇒ AT (SvT ) = SQr (A)T vT = S(vQr (A))T (45) e is a G -eigenpair. Let us write A for the adjacency
We need to show that (λ , w)
matrix of G (recall M is a subgraph so A restricts to AM on M ). We need
= λ SvT ⇐⇒ (vST )A = λ vST . (46)
to show Aw e Given i ∈ V (G ), we have two cases. First, if i ∈ V (M ),
e = λ w.
(Recall that Sv 6= 0 if v 6= 0.) All in all, the spectrum of the quotient is a
∑ [A]i j w
ej = ∑ [A]i j w
ej + ∑ [A]i j w
ej
subset of the spectrum of the graph, with eigenvectors lifted from the quotient
j∈V (G ) j∈V (M ) j∈V (G )\V (M )
by repeating entries on orbits. Moreover, we can complete an eigenbasis with
eigenvectors orthogonal to the partition (adding up to zero on each orbit), at = ∑ [A]i j w j = λ wi = λ w
ei ,
least in the symmetric case. j∈V (M )

17/22
since we equals w on M , and is zero outside M . The second case, when Next we derive conditions for a vector vi = (κei |ei ) to be an eigenvector
i ∈ V (G ) \V (M ), gives of the uniform join (47), that is, Avi = λ vi , for some λ ∈ R, where A is the
(symmetric) adjacency matrix of the uniform join,
∑ [A]i j w
ej = ∑ [A]i j w j , !
α ,β γ,δ
j∈V (G ) j∈V (M ) An 1 1 An
A= α ,β . (48)
as before, and then we use the decomposition of M into orbits,
γ,δ
An An 2 2
m m The jth entry of the vector Av is
∑ [A]i j w j = ∑ ∑ [A]i j w j = ∑ αk ∑ w j .
j∈V (M ) k=1 j∈Vk k=1 j∈Vk κβ1 − κα1 + δ − γ = −(κa + c) j=1
Here we have used that the vertex i, outside the motif, connects uniformly to κα1 − κβ1 + γ − δ = κa + c j=i
each orbit (see Main Text), that is, Ai j1 = Ai j2 for all j1 , j2 ∈ Vk , and we call κδ − κγ + β2 − α2 = −(κc + b) j = n+1
this quantity αk . Finally, recall that w is orthogonal to each orbit, to conclude κγ − κδ + α2 − β2 = κc + b j = n+i
m
[A]i j w j = 0 otherwise.
∑ ∑ αk ∑ w j = 0 = λ wei .
j∈V (M ) k=1 j∈Vk Comparing these with the entries of the vector λ vi , we obtain
Avi = λ vi ⇐⇒ (κa + c = −λ κ and κc + b = −λ ) , (49)
Therefore, the redundant spectrum of G is the union of the redundant
eigenvalues of the symmetric motifs, together with their redundant eigenvec- The two equations on the right-hand side are satisfied if and only if λ =
tors localised on them. Since most symmetric motifs in real-world networks −κc − b and κ is a solution of the quadratic equation
are basic, most symmetric motifs in the network representation of a network cκ 2 + (b − a)κ − c = 0, (50)
measure will be basic too. Given their constrained structure, one can in fact
which has two distinct real solutions
determine the redundant spectrum of BSMs with up to few orbits, for arbitrary p
undirected networks with symmetry. This is what we do next. (a − b) ± (a − b)2 + 4c2
, (51)
2c
Redundant Spectrum of a 1-orbit BSM since c 6= 0, as explained above. Together with the lemma, we have shown
α,β the following (Theorem 4 in Methods).
A BSM with one orbit is an (α, β )-uniform graph Kn with adjacency
α,β α,β
matrix An = (ai j ) given by ai j = α and aii = β for all i 6= j. Then Kn has Theorem 13. The redundant spectrum of a symmetric motif with two orbits
eigenvalues (n − 1)α + β (non-redundant), with multiplicity 1, and −α + β α ,β1 γ,δ α ,β2
Kn 1 ←→ Kn 2 is given by the eigenvalues
(redundant), with multiplicity n − 1. The corresponding eigenvectors are p
1, the constant vector 1 (non-redundant), and ei , the vectors with non-zero −(a + b) + (a − b)2 + 4c2
λ1 = −b − cκ1 = , and,
entries 1 at position 1, and −1 at position i, 2 ≤ i ≤ n (redundant). This 2
α,β α,β p
can be shown directly by computing An 1 and An ei , and noting that 1, e2 , 2
−(a + b) − (a − b) + 4c 2
. . . , en are linearly independent (although not orthogonal) and thus form an λ2 = −b − cκ2 = ,
2
α,β α,β
eigenbasis. Indeed, An 1 is the vector of column sums of the matrix An , each with multiplicity n − 1, and eigenvectors (κ1 ei |ei ) and (κ2 ei |ei ) respec-
α,β
which are constant (n − 1)α + β , and An ei is the constant 0 vector, except tively, where κ1 and κ2 are the two solutions of the quadratic equation
possibly at positions 1, which equals β − α, and i, which equals α − β . cκ 2 + (b − a)κ − c = 0, a = α1 − β1 , b = α2 − β2 and c = γ − δ 6= 0.
Note that, for unweighted graphs without loops (β = 0, α ∈ {0, 1}), we It is interesting to note that the redundant eigenvalues of uniform graphs
recover the redundant eigenvalues 0 and −1 predicted in11 . and joins depend on the differences (α1 − β1 , α2 − β2 , γ − δ ) rather than
Redundant Spectrum of a 2-orbit BSM the particular coefficients. Therefore, for redundant spectrum calculations,
A BSM with two orbits is a uniform join of the form we can assume all BSMs to be loop-less (β = 0), and uniform joins of type
(0, δ ).
γ,δ
Knα1 ,β1 ←→ Knα2 ,β2 . (47) For unweighted graphs without loops, we recover the redundant eigenval-
ues for BSMs with two orbits predicted in11 , as follows. We have β1 = β2 = 0,
Define a = α1 − β1 , b = α2 − β2 , c = γ − δ , and note that c 6= 0: otherwise
α1 , α2 , γ, δ ∈ {0, 1} and thus a, b ∈ {0, 1} and c ∈ {−1, 1}. If a = b, the
γ = δ and we can freely permute one orbit while fixing the other, that is, this
quadratic equation becomes κ 2 − 1 = 0 with solutions κ = ±1 and thus
would not be a BSM with two orbits but rather two BSMs with one orbit each.
λ = −b − cκ ∈ {−2, −1, 0, 1}. If a 6= b we can assume a = 1, b = 0 and
As above, let ei be the vector with non-zero entries 1 at position 1, and −1 at
the quadratic cκ − κ − c = 0 has√ solutions ϕ and 1 − ϕ if c = 1, −ϕ and
position i, for any 2 ≤ i ≤ n.
ϕ − 1 if c = −1, where ϕ = 1+2 5 is the golden ratio. In either case, the
Lemma 1. The following set of vectors is linearly independent redundant eigenvalues λ = −b − cκ = −cκ are −ϕ and ϕ − 1. Altogether,
the redundant eigenvalues for 2-orbit BSMs are {−2, −ϕ, −1, 0, ϕ − 1, 1},
{(κ1 ei | ei ), (κ2 ei | ei ) | 2 ≤ i ≤ n}
which equals the redundant eigenvalues RSpec2 in the notation of11 .
for all κ1 6= κ2 ∈ R. We omit the calculation of the redundant spectrum of BSMs with three
(or more) orbits, as it becomes much more elaborate, and its relevance in
Proof. Define the (n − 1) × n matrix real-world networks is less justified (SI Table 3).

Bn = 1 | −Idn−1 For real-world networks, we predict symmetry to explain most of the
discrete part of the spectrum (observed as ‘peaks’ in the spectral density) of
where 1 is a constant 1 column vector, and Idn−1 the identity matrix of size
the network representation of any network measure F (this can be quantified
n − 1. The set of vectors in the statement can be arranged in block matrix
by comparing high-multiplicity eigenvalues in the parent versus the quotient
form as
  network). This is shown for the Laplacian eigenvalues on six of our test
κ1 Bn Bn networks in Fig. 5 in the Main Text, with 89% to 97% of the discrete spectrum
.
κ2 Bn Bn explained by the underlying network symmetry.
This matrix has a minor of order 2(n − 1), Let us define RSpecF1 and RSpecF2 as the sets of redundant eigenvalues of
  F(G ) associated to BSMs of one, respectively two, orbits, for any network
−κ1 Idn−1 −Idn−1 G , given by formulae above (or Table 2 in the Main Text). Our results
det .
−κ2 Idn−1 −Idn−1 predict most of the discrete part of the spectrum of F(G ) to occur at the

Using that det CA DB = AD − BC whenever A, B, C, D are square blocks of values of these sets (cf. Fig. 5 in the Main Text). For specific choices of F
(communicability, Laplacian, shortest path), we will be able to describe these
the same size and C commutes with D38 , this minor equals
sets in more detail, and for the adjacency matrix, as explained above, we
det −κ1 Idn−1 − κ2 Idn−1 = (−1)n−1 (κ1 + κ2 )n−1 6= 0 ⇐⇒ κ1 6= κ2 . recover the sets RSpec1 and RSpec2 in11 .


18/22
Eigendecomposition Algorithm is often the case). We still have, however, symmetry-induced compression,
We can use the spectral decomposition theorem above to compute the and computational reducibility, as mentioned in the Main Text and detailed
spectrum and eigenbasis of a weighted undirected network with symme- below.
tries (equivalently, a diagonalisation of the symmetric adjacency matrix As a vertex measure G is constant on orbits, we only need to store one
A = UDU T ), such as F(G ), from those of the quotient, and the redundant value per orbit. Let S be the characteristic matrix of the partition of the vertex
ones of the symmetric motifs. The algorithm (Algorithm 12 below, or 4 in set into orbits, and Λ the diagonal matrix of orbit sizes (column sums of S). If
Methods) computes the spectral decomposition (eigendecomposition) of the G is represented by a vector v = (G(i)) of length nG , we can compress it by
quotient matrix, then, for each motif, the redundant eigenpairs. storing only one value per orbit, formally w = Λ−1 ST v, a vector of length nQ .
We recover v = ST w, as the next result guarantees (Theorem 7 in Methods).
Input: adjacency matrix A, characteristic matrix S, list of motifs Theorem 14. If v is a vector of length nG constant on orbits, then SΛ−1 ST v =
Output: spectral decomposition A = UDU T v.
initialise U, D to zero matrices
Λ ← diag(sum(S)) Proof. First, note that ST S = Λ (this holds for any partition of the vertex set),
Bsym ← Λ−1/2 ST ASΛ−1/2 (
0 if α 6= β ,
[Uq , Dq ] ← eig(Bsym ) so that Bsym = Uq DqUq−1 [ST S]αβ = ∑[ST ]αi [S]iβ = ∑[S]iα [S]iβ =
i i |Vα | if α = β .
Uq ← ΛUq

U ← SUq 0 As v is constant on orbits, it is already of the form v = Sw for some w.
 
Dq 0 Therefore
D←
0 0
SΛ−1 ST v = SΛ−1 ST Sw = Sw = v.
foreach motif do
Asm ← A(motif, motif)
compute orbits from motif and S In terms of computational reduction, we only need to evaluate G once per
Ssm ← S(motif, orbits) orbit, achieving an ñQ time reduction, assuming G is evaluated at vertices
[Usm , Dsm ] ← eig(Asm ) independently, which is often not the case. More interesting is the case
for λ ∈ unique(diag(Dsm )) do when G can be recovered from its value at the quotient network. We call
Uλ ← λ -eigenvectors from Usm G quotient recoverable if G(G ) can be obtained from G(Q), where Q is a
T U ) (possibly annotated, or basic) quotient of G , for all networks G . Not every
Z ← null(Ssm λ
vertex measure is quotient recoverable, but when one is, it can lead lead to a
d ← ncol(Z)
significant computational time reduction (Fig. 4 in the Main Text).
if d > 0 then
store Uλ Z in U
store λ in D with multiplicity d SI Applications
end
end Network Symmetry Computation
end The results in the Main Text depend on an effective computation, storage
and manipulation of the symmetries on an (unweighted, undirected, possibly
Algorithm 12: Eigendecomposition algorithm. very large) network G . Here we present our approach, based in the geometric
decomposition of the automorphism group of the graph. Full implementations
In more detail, we first compute the spectral decomposition eig of the of the algorithms outlined below are available at34 . (For weighted or directed
symmetric quotient Bsym = Λ−1/2 ST ASΛ−1/2 where Λ is the diagonal matrix network, see concluding remarks in this section.)
of the orbit sizes (which can be obtained as the column sums of S). This matrix We obtain the geometric decomposition in three steps. First, we use a
is symmetric and has the same eigenvalues as the left quotient. Moreover, graph automorphism algorithm to compute generators. Secondly, we partition
if Bsym = Uq DqUq−1 then the left quotient eigenvectors are the columns of the generators into disjoint-support classes (each class corresponds to a
ΛUq . These become, in turn, eigenvectors of A by repeating their values symmetric motif). Thirdly, we compute symmetric motif orbits and types
on each orbit, we can be obtained mathematically by left multiplying by from the generators and their disjoint-support partition. Below we explain
the characteristic matrix S. Then, for each motif, we compute the redudant each step in more detail.
eigenpairs using a null space matrix (see below), storing eigenvalues and We use saucy335 to compute a list of generators of the automorphism
localised (zero outside the motif) eigenvectors. group from an edge list. Other open-source software tools are available,
Only redundant eigenvectors of a symmetric motif (that is, those which add such as nauty45, 47 , traces47, 48 or bliss49 . Although saucy does not
up to zero on each orbit) become eigenvectors of A by extending them as zero compute a canonical labelling (relevant to the graph isomorphism problem but
outside the symmetric motif (Theorem 12). Therefore, we need to construct not to the geometric decomposition), it is extremely fast for large but sparse
redundant eigenvectors from the ouput of eig on each motif (the spectral  networks50 such as the ones representing real-world systems. In practice, we
decomposition of the corresponding submatrix). If Uλ = v1 . . . vk are found a list of generators in less than two seconds for all our test networks,
λ -eigenvectors of a symmetric motif with characteristic matrix of the orbit except our largest example LiveJournal, in just over eight seconds (Table 1 in
partition Ssm , we need to find linear combinations such that the Main Text). Due to the similarities with nauty, it would be interesting
  to know whether the set of generators produced by saucy is also essential,
α1
which would guarantee that the geometric decomposition below is optimal;
T T  . 
Ssm (α1 v1 + . . . + αk vk ) = 0 ⇐⇒ SsmUλ  ..  . (52) this seems to be the case in practice for all our test networks.
αk . The next step is to partition the set of generators X into support-disjoint
classes X = X1 ∪ . . . ∪ Xk . For that, we use a bipartite graph representation
T U , that is,
Therefore, if the matrix Z 6= 0 represents the null space of Ssm λ of vertices V and generators X. Let B be the graph with vertex set V ∪ X
T U Z = 0 and Z T Z = 0, then the columns of U Z are precisely the redun-
Ssm λ λ and undirected edges {i, σ } whenever i ∈ supp(σ ). Clearly, the finest parti-
dant eigenvectors. This is implemented in Algorithm 12 within the innermost tion into support-disjoint classes of generators correspond to the connected
for loop. components of B (as vertex sets intersected with X). Using for instance
Tarjan’s algorithm, we have an efficient procedure to find the support-disjoint
SI Vertex Measures decomposition in linear time. In practice, this step took less than five seconds
for each of our test networks. Each class in the support-disjoint partition
The network representation we have exploited so far does not apply directly to above corresponds to (the vertex set of) a symmetric motif, by Eqs. 24 and
a vertex measure G, unless G is defined via a pairwise network measure (this 25.

19/22
The last step consists of computing the orbits and type of each symmetric Communicability
motif. This was done in GAP36 , but any computer algebra system that Communicability is a measure of network connectivity between pairs of
can manipulate permutation groups can be used. We applied Algorithm 13 vertices which takes into account all possible walks from one vertex to the
(Algorithm 1 in Methods) to each Xi in the support-disjoint decomposition other by using the powers of the adjacency matrix A. Namely, if we choose
above (this can be done in parallel). The pseudocode in Algorithm 13 assumes coefficients ak such as the matrix series
a computer algebra system that can compute the group generated by a set ∞
of permutations, its orbits, and whether the induced action on an orbit is a ∑ ak Ak (53)
natural symmetric group (that is, a group acting as the symmetric group on k=0
its moved points). If that is the case, and all orbits are of the same size m, it
converges, then the (i, j)-entry of this limit matrix is a weighted sum of all
is a basic symmetric motif of type m, that is, the corresponding geometric
the walks from i to j, and thus can be used as a network connectivity measure.
factor is Sm . If this is not the case, it is a complex symmetric motif and we
We normally expect coefficients ak such that we obtain positive values for the
set m = 0. Algorithm 13 outputs a list of orbits, and the integer m. Note
communicability, and which give less weight to longer walks. An standard
that the second part of the algorithm (the outermost if-then-else loop) is only
choice is the factorial coefficients ak = k!1 , which guarantees convergence for
necessary if we need the orbit types, for example in order to later compute
any matrix A and, in fact,
the basic quotient. In terms of computational time, our GAP non-parallel ∞
Ak
implementation computes about 2,000 generators per second in our small eA = ∑ , (54)
and medium networks, which suggests at most 205 seconds for our largest k=0 k!
network (and divided by the number of processors available in a parallel the exponential matrix of A. The diagonal entry [eA ]ii is called the subgraph
implementation). Unfortunately, the generator-per-second rate decreases centrality of vertex i25 , and its sum over all the vertices the Estrada index of
with the size of the network (up to 10 generators per second for the largest the network51 . In general, one can define communicability for an arbitrary
network) due to the internal representation of permutation groups in GAP. real analytic function (such as f (x) = ex ) within its radius of convergence R
Fixing this issue is beyond the scope of the present article, but perhaps other around 0,
choice of software should be considered for computations involving large ∞
integers. f (x) = ∑ ak xk |x| < R . (55)
k=0
Given such a function f , we define the f -communicability matrix of a network
Input: X a set of permutations of a symmetric motif with adjacency matrix A as
Output: O1 , . . . , Ok orbits, and type m, of the symmetric motif ∞

H ← Group(X) f (A) = ∑ a k Ak if kAk < R , (56)


k=0
{O1 , . . . , Ok } ← Orbits(H)
m ← min(size(O1 ), . . . , size(Ok )) where k · k is a given matrix norm, and the power series convergence is
if m == max(size(O1 ), . . . , size(Ok )) then with respect to that norm. (For a detailed treatment of matrix norms and
for i ← 1 to k do convergence see38 .) From now on we will implicitly assume all calculations
if not IsNaturalSymmetricGroup(Action(H, Oi )) to be within the convergence radius of f , possibly by normalising the matrix
then A. The f -communicability from vertex i to vertex j is thus the (i, j)-entry of
m←0 the communicability matrix, [ f (A)]i j . For consistent terminology, we will
break call the f -communicability of a vertex with itself its f -centrality, inherently a
network centrality measure. (We consider other centrality measures, including
end
subgraph centrality, and the effect of symmetry on them, below.) Note that
end
matrix functions f (A) can be defined in more generality52 , however the power
else series definition is the one with an obvious graph theoretic interpretation.
m←0
end Structural Properties
Algorithm 13: Orbits and type of a symmetric motif. We represent communicability as a network on the same set of nodes. Namely,
we define the f -communicability graph of G , written f (G ), as the graph with
adjacency matrix f (A), which we call the communicability matrix. This is
In terms of data structures, we represent vertices by integers 0 to nG − 1, a weighted, complete (and possibly directed, if A is not symmetric) graph
and an undirected, unweighted graph by an edgelist of vertex pairs, which with loops. For every i 6= j, there is an edge from vertex i to a vertex j
saucy transforms into a list of generators, each written as a list of vertex weighted by the communicability from i to j, and a self-loop at every vertex
transpositions. The support-disjoint partition genpartition is simply a integer weighted by its f -centrality. The f -communicability network, although dense,
array such that genpartition(i) = j if the ith generator belongs to X j . Finally, inherits all the symmetries of G and hence f (G ) has the same geometric
each symmetric motif is store in motifs as a list of orbits, and their type in decomposition, symmetric motifs, and orbits. For real-world networks, most
an integer vector motiftype. Alternatively, we could store each orbit (a list symmetric motifs will be basic and, as induced graphs, the basic symmetric
of integers) separately in a list orbits and the assignment of orbits to motifs motifs are uniform joins of orbits, and each orbit is a uniform graph hence
in an integer array orbpartition. Also note that the partition of the vertex characterised by two parameters, the subgraph centrality of each vertex, and
set into orbits can be also represented by its characteristic matrix S. This is the communicability between different vertices, within the orbit. In particular,
an n × m matrix with at most n non-zero entries, hence it can be stored and this explains what we observed in our toy example, Fig. 1 in the Main Text.
manipulated very efficiently in sparse form. In terms of post-processing compression, as a full network measures, average
We end this section with a few remarks. The network symmetry computa- symmetry compression with ratio cfull and lossless symmetry compression
tion is a pre-processing step that needs to be calculated only once for each with ratio cbasic
full apply, accounting for the symmetry-induced redundancy
network, and can be stored efficiently as explained above (e.g. 16.3MB for present on f (G ), or f (A).
our largest test network, compared to 700MB for the edge list). As men-
tioned before, most of the results in this paper can be applied to networks Quotient Recoverability
with edge weights or directions, or other edge or node labels, by restrict- Communicability satisfies average quotient recoverability, as it ‘commutes’
ing to the symmetries preserving the additional structure. In that situation, with the quotient, that is, the communicability of the quotient is the quotient
one can incorporate the restrictions to the automorphism group calculation of the communicability, in symbols,
(saucy admits vertex colouring, and nauty both vertex colouring and f (Q(A)) = Q( f (A)). (57)
directed edges), or compute the geometric decomposition of the underly-
ing unweighted, undirected graph and then incorporate the restrictions one This is (40) for communicability, and implies exact recovery for external
symmetric motif at a time (cf. Theorem 8). edges, and average recovery for internal edges. To prove (57), let B = Q(A)

20/22
be the (left) quotient matrix with respect to the partition into orbits. Since the Hence, we can find σ ∈ Aut(G ) with σ (w2 ) = w1 and fixing wn . This
partition is equitable, we have AS = SB, and hence An S = SBn . Now, using implies σ (p) = (σ (w1 ), σ (w2 ) = w1 , σ (w3 ), . . . , σ (wn ) = wn ), a shortest
the matrix definition of the quotient, we have path by (i), of length n − 1. The subpath (w1 , σ (w3 ), . . . , wn ) has length
! n − 2, contradicting p being a minimal length path from w1 to wn . (The case
∞ ∞
Q ( f (A)) = Λ−1 ST ∑ an An S = ∑ an Λ−1 ST An S
 p = (wn , wn−1 , . . . , w1 ) is analogous.)
n=0 n=0 (iii) Let p = (u = v1 , v2 , . . . , vn+1 = v) be a shortest path from u to v,
∞ ∞ so that d G (u, v) = n. Let Vk be the orbit containing vk , for all k. By (ii),
Λ−1 ST SB n
∑ an Bn = f (B), Vk 6= Vk+1 for all 1 ≤ k ≤ n thus q = (U = V1 ,V2 , . . . ,Vn+1 = V ) is a path in

= ∑ an = (58)
n=0 n=0 Q and d Q (U,V ) ≤ n. By contradiction, assume there is a shorter path in Q
from U to V , that is, (U = W1 ,W2 , . . . ,Wm+1 = V ) with m < n. The we can
since Λ−1 ST S is the identity matrix.
construct a path in G from u to v of length m (a contradiction), as follows.
Exact recovery for vertices within the same symmetric motif cannot be
For each 1 ≤ i ≤ m, Wi is connected to Wi+1 in Q, hence there is a vertex
done in general, as the internal connectivity, replaced by the average connec-
in Wi connected to at least one vertex in Wi+1 . Since vertices in an orbit are
tivity, is lost in the quotient. However, as mentioned in the Main Text, we
structurally equivalent, any vertex in Wi is then connected to at least one
can use the spectral decomposition algorithm to reduce the computation of
vertex in Wi+1 (formally, if w ∈ Wi is connected to w0 ∈ Wi+1 then σ (w) ∈ Wi
the communicability, as A = UDU T clearly implies f (A) = U f (D)U T . The
is connected to σ (w0 ) ∈ Wi+1 ). This allows us to construct a path in G from
computational time reduction of this approach is displayed in Figure 4 in the
u to v of length m < n, a contradiction.
Main Text, for the exponential function.
Distances between points within the same motif cannot in general be
Spectral Properties
directly recovered from the quotient, not even for BSMs. (Consider for
The f -communicability network has eigenvalues f (λ ), where λ is an eigen-
instance the double star, motif M1 , in Figure 1 in the Main Text. The distance
value of the original network, and same eigenvectors: Av = λ v implies
from the top red to the bottom blue vertex is three, while in the quotient is
f (A)v = f (λ )v (equivalently, A = UDU T implies f (A) = U f (D)U T ). In
one.) In general, therefore, the shortest path distance is partially, but not
particular, its redundant spectrum consists of the function f applied to the
average, quotient recoverable. Intra-motif distances, if needed, could still be
redundant spectrum of G , together with the redundant eigenvectors localised
recovered one motif at a time. (If we are only interested in large distances,
on the symmetric motifs. In particular, for undirected, unweighted networks,
computing them in the quotient suffices as one can show that d(i, j) ≤ 2k for
f -comm i, j vertices in a symmetric motif with k orbits.)
RSpec1 = { f (λ ) | λ ∈ RSpec1 } = { f (0), f (−1)}, and (59)
f -comm
Note that these results can be exploited for other graph-theoretic notions
RSpec2 = { f (λ ) | λ ∈ RSpec2 } defined in terms of distance, for example eccentricity (and thus radius or
= { f (−2), f (−ϕ), f (−1), f (0), f (ϕ − 1), f (1)}, (60) diameter), which only depends on maximal distances and thus it can be
computed directly in the quotient (see section Eccentricity below).
account for most of the discrete part of the spectrum of the matrix f (A), for In terms of post-calculation compression, the quotient compression ratio
the adjacency matrix A of a typical real-world network. cfull applies, accounting for the amount of structural redundancy due solely
to symmetries. The spectral results, although perhaps less relevant, still apply
Shortest Path Distance for d(G ), the graph encoding pairwise shortest path distances. The adjacency
Let A = (ai j ) be the adjacency matrix of an unweighted, but possibly directed, matrix d(A) = (d G (i, j)) is nonzero outside the diagonal, hence d(G ) is a all-
network G . A path of length n is a sequence (v1 , v2 , . . . , vn+1 ) of distinct to-all weighted network without self-loops and integer weights, and so is each
vertices, except possibly v1 = vn+1 , such that vi is connected to vi+1 for all symmetric motif. Using the formula in Theorem 13, we can compute values
1 ≤ i ≤ n − 1. The shortest path distance d G (u, v) is the length of the shortest of the most significant part of the discrete spectrum (redundant eigenvalues)
(minimal length) path from u to v. (Technically, it is only a distance, or of d(A),
metric, if G is undirected.) If p = (v1 , v2 , . . . , vn ) is a path and σ ∈ Aut(G ),
we define σ (p) = (σ (v1 ), σ (v2 ), . . . , σ (vn )), also a path since σ is a bijection. RSpecd1 = {−2, −1}, and (61)
A subpath of p is a path of the form (vk , vk+1 , . . . , vl ) for some 1 ≤ k ≤ l ≤ n. d
n √ √
RSpec2 = − 3, −2, −1, 0, −2 ± 2, −3 ± 2,
A path p is a shortest path if it is of minimal length between its endpoints.
√ √ √
The following result contains the claims in the Main Text (Theorem 6 in −3 ± 5 −5 ± 5 −5 ± 13 o
Results). , , . (62)
2 2 2
The shortest path distance can be generalised to positively weighted ma-
Theorem 15. Let A = (ai j ) be as above. Then
trices, and then (i) and (ii) above still hold, with similar proofs, but not (iii),
(i) if (v1 , v2 , . . . , vn ) is a shortest path from v1 to vn and σ ∈ Aut(G ), then as weights along a path are not preserved in the quotient. In would be inter-
(σ (v1 ), σ (v2 ), . . . , σ (vn )) is a shortest path from σ (v1 ) to σ (vn ); esting to incorporate network symmetry to current shortest path algorithms,
(ii) if (v1 , v2 , . . . , vn ) is a shortest path from v1 to vn , and v1 and vn belong although this is outside the scope of the present article.
to different symmetric motifs, then vi and vi+1 belong to different orbits,
for all 1 ≤ i ≤ n − 1; Laplacian Matrix
The Laplacian matrix L = D − A can be seen as the adjacency matrix of a
(iii) if u and v belong to orbits U, respectively V , in different symmetric Laplacian network L , which inherits the symmetries of G as explained in
motifs, then the distance from u to v in G equals the distance from U the Main Text. The symmetric motifs are almost identical in L , except that
to V in the unweighted (or skeleton) quotient Q. all edges are weighted by −1, and all vertices have self-loops weighted by
their degrees in G . In particular, the motif structure depends on the how it is
These statements mean that (i) automorphisms preserve shortest paths embedded in the network. For example, an orbit in a BSM in G , originally
and their lengths; (ii) shortest paths do not contain intra-orbit edges; and (iii)
a complete, respectively empty, graph in G , becomes a uniform graph Knε,d
shortest path distance is a partially quotient recoverable structural measure.
where ε = −1, respectively ε = 0, and d is the degree in G of a (and hence
Proof of Theorem. (i) Since automorphisms are bijections and preserve any) vertex in the orbit. In particular, the symmetric motifs in L are not
adjacency, (σ (v1 ), σ (v2 ), . . . , σ (vn )) is a path from σ (u) to σ (v) of the quite the Laplacian of the original motifs, as per the next result. Define the
same length. If there were a shorter path (σ (u) = w1 , w2 , . . . , σ (v) = wm ), external degree of a vertex as the number of adjacent vertices outside the
m < n, the same argument applied to σ −1 gives a shorter path (u = motif it belongs to. The next result is Theorem 7 in Results.
σ −1 (w1 ), σ −1 (w2 ), . . . , v = σ −1 (wm )) from u to v, a contradiction. Theorem 16. Let M be the vertex set of a symmetric motif M in a graph
(ii) Any subpath of a minimal length path is also of minimal length G . Then M induces a symmetric motif in the Laplacian network L with
between its endpoints. Arguing by contradiction, there exists a subpath adjacency matrix
p = (w1 , w2 , . . . , wn ) (or p = (wn , wn−1 , . . . , w1 )), such that w1 and w2 be- 
long to the same orbit, and wn belongs to a different symmetric motif. LM + d1 Im1 ⊕ . . . ⊕ dk Imk ,

21/22
where LM is the ordinary Laplacian matrix of M considered as a graph on and centrality is constant on each orbit, as expected. Moreover, closeness
its own, and d1 , . . . , dk are the external degrees of the k orbits of M of sizes centrality can be recovered from the quotient (shortest paths does not contain
m1 , . . . , mk . (Here In is the identity matrix of size n and we use ⊕ to construct intra-orbit edges, except between vertices in the same symmetric motif, see
a block diagonal matrix.) Theorem 15), as
nl Q ni
(The proof of this theorem should be clear from the comments above.) ccG (i) = ∑ d (Vk ,Vl ) + dk (70)
Note that, for a motif with one orbit, this is the Laplacian of the motif trans- l6=k nG nG
lated by a multiple of the identity. In particular, the redundant eigenvalues if i belongs to the orbit Vk and dk is the average intra-motif distance, that
of a BSM with one orbit are the redundant (high multiplicity) Laplacian is, the average distances of a vertex in Vk to any vertex in M , the motif
eigenvalues of an empty or complete graph of size n plus the external degree containing Vk . By annotating each orbit by dk , we can recover betweenness
d, that is, d, respectively d + n. In particular, centrality exactly. Alternatively, as dk  n (note that dk ≤ m if M has m
RSpecL1 = Z+ , (63) orbits), we can approximate ccG (i) by the first summand, or simply by the
quotient centrality ccQ (α), in most practical situations.
and we expect ‘peaks’ in the Laplacian spectral density at (small) positive
integers, which indeed agrees what we observed in our test networks (Fig. 5 Eigenvector Centrality
in the Main Text). Using the formula in Theorem 13, we could compute the Since the Perron-Frobenius eigenvalue is always simple, it cannot be a re-
redundant spectrum for 2-orbit BSMs, and for other versions of the Laplacian dundant eigenvalue. Hence it is a quotient eigenvalue, and, as those are
(e.g. normalised, vertex weighted), but we believe this is out of the scope of a subset of the parent eigenvalues, it must still be the largest (hence the
the present article. Perron-Frobenius) eigenvalue of the quotient. Its eigenvector can then be
Observe that spectral decomposition applies, since L inherits all the sym- lifted to the parent network, by repeating entries on orbits. That is, if (λ , v)
metries of A, so Algorithm 12 provides an efficient way of computing the is the Perron-Frobenius eigenpair of the (left) quotient, then (λ , Sv) is the
Laplacian eigendecomposition with an expected sp = ñ3Q (see Table 1 in the Perron-Frobenius eigenpair of the parent network (44). In practice, we use
Main Text) computational time reduction. the symmetric quotient Bsym = Λ−1/2 ST ASΛ−1/2 for numerical reasons (Al-
gorithm 14), obtaining significant reductions in computational times (Fig. 4
Degree Centrality in the Main Text). If A is not symmetric (but irreducible), Algorithm 14
The degree of a node (in- or out-degree if the network is directed) is a natural (Alg. 7 in Methods) gives the right Perron-Frobenius eigenpair of A, and
measure of vertex centrality. As expected, the degree is preserved by any replacing Bsym by Λ−1/2 ST AT SΛ−1/2 and Rw by its transpose, we obtain the
automorphism σ , which can also be checked directly, left Perron-Frobenius eigenpair of A.
di = ∑ ai j = ∑ aσ (i)σ ( j) = ∑ aσ (i) j = dσ (i) , (64)
j∈V j∈V j∈V Input: adjacency matrix A, characteristic matrix S
as automorphisms permute orbits (so j ∈ V and σ ( j) ∈ V are the same Output: (right) Perron-Frobenius eigenpair (λ , v) of A
elements but in a different order). In particular, the degree is constants on Λ ← diag(sum(S))
orbits. R ← SΛ−1/2
We can recover the degree centrality from the quotient, as the out-degree Bsym ← RT AR
of the left quotient (or the in-degree of the right quotient), as follows. (This (λ , w) ← eig(Bsym , 1) eigenpair of the largest eigenvalue
is for illustration purposes rather than a worthwhile computational gain in v ← Rw
using the quotient for degree calculations.) Let B = (bαβ ) be the adjacency
matrix of the left quotient, and V = V1 ∪ . . . ∪Vm the partition of the vertex Algorithm 14: Eigenvector centrality from the quotient network.
set into orbits. If i ∈ Vα , then
diG = ∑ ai j = ∑ ai j + . . . + ∑ ai j (65)
j∈V j∈V1 j∈Vm
SI Weighted and Directed Networks
1 1
= ∑ ai j + . . . + nm ∑ ai j = bi1 + . . . + bim = dαQ,out . (66) We have presented our results on undirected, unweighted networks and sym-
n1 j∈V1 j∈Vm
i∈Vi i∈Vi metric network measures in the Main Text. For networks with edge (or
node) weights, labels or directions, we can restrict to symmetries respect-
Eccentricity ing those, giving a smaller geometric decomposition, and fewer symmetric
Although not discussed in the Main Text, the reciprocal of the eccentricity motifs (Theorem 8), but otherwise our results either directly apply, or can
is a natural centrality measure. The eccentricity of a vertex is the maximal be easily adapted. This is also the case for an undirected network measure
(shortest path) distance to any vertex in the network. As shortest path distance (F(i, j) 6= F( j, i)) as its network reprentation F(G ) is directed even if G is
is partially quotient recoverable, and eccentricity depends on large distances not. However, F(G ) still inherits all the symmetries of G and therefore has
only, so in practice we can ignore intra-motif distances and therefore recover the same geometric decomposition, orbits, and symmetric motifs (as vertex
eccentricity directly from the (unweighted, or skeleton) quotient as sets) — see the Weighted and Directed Networks subsection in SI Symmetry
in Complex Networks.
eccG (i) = eccQ (α) if i ∈ Vα . (67)
FURTHER ACKNOWLEDGEMENTS
In particular, the diameter (maximal eccentricity) and radius (minimal ec-
Thanks to Yamir Moreno and Emanuele Cozzo, whose ‘simple’ question
centricity) of a network coincides with that of the (unweighted, or skeleton)
inadvertently prompted this lengthly answer more than a year later, and to
quotient.
Gareth Jones for reminding the author that S6 has two conjugacy classes of
subgroups of index 6. Special thanks to my wife Kate for her unwavering
Closeness Centrality
support.
The closeness centrality of a node i in a graph G , ccG (i), is the average
shortest path length to every node in the graph. As symmetries preserve
distance, they also preserve closeness centrality, explicitly,
1 1
cc(i) = ∑ d(i, j) = nG ∑ d(σ (i), σ ( j)) (68)
nG j∈V j∈V
1
= ∑ d(σ (i), j) = cc(σ (i)) , (69)
nG j∈V

22/22

Potrebbero piacerti anche