Exact and approximate role assignment for multi-layer networks

The concept of role equivalence has been applied in social network analysis for decades. Early deﬁnitions recognized two social actors as role equivalent, if they have identical relationships to the same other actors. Although this rather strong equivalence requirement has been relaxed in different ways, it is often challeng-ingtodetectinteresting,non-trivialroleequivalences,especiallyforsocialnetworksderivedfromempiricaldata.Multi-layernetworks(MLNs)areincreasinglygainingpopularityformodellingcollectiveadaptivesystems,forexample,engineeredcyber-physicalsystemsoranimalcollectives.Multiplexnetworks,aspecialcaseofMLNs,transparentlyandcompactlydescribesuchcomplexinteractions(social,biological,transportation),wherenodescanbeconnectedbylinksofdifferenttypes.Inthiswork,weﬁrstpropose a novel notion of exact and approximate role equivalence for multiplex MLNs. Then, we implement and experimentally evaluate the algorithm on a suite of real-world case studies. Results demonstrate that our notion of approximate role assignment not only obtains non-trivial partitions over nodes and layers as well, but it provides a ﬁne-grained hierarchy of role equivalences, which is impossible to obtain by (combining) the existing role detection techniques. We demonstrate the latter by interpreting in detail the case study of Florence families, a classical benchmark from literature.


Introduction
Large amounts of data created by social interactions among physical and virtual actors open up novel challenges for (i) representing and modelling these interactions, as well as for (ii) automated extraction of useful information from models and data-sets alike. Traditional network analysis has facilitated these tasks by using (single-layer) networks to model interaction between agents; A variety of analysis methods have been developed, aiming to discover the social role of a node within the context of the network 2 T. PETROV AND S. TOGNAZZI [1,2], the network's structural properties [3], the relative importance of a node with respect to the rest of the network [4][5][6], the emergence of different communities (or clusters) [7][8][9]. However, all these techniques are applicable to single-layer networks, which allow to describe only one type of interaction between agents. In many real-world scenarios, relations among individuals have multiple facets, and it is often advantageous to represent the data by a multiplex network [10]. A multiplex network is a special case of multi-layer network (MLNs) [11], where the same set of nodes is connected through different interaction types (colours), each type (colour) visible at a different layer. Multiplex networks were shown useful to model a variety of real-world scenarios, including physical and virtual social interactions [12], infection spreading processes [13], biological interactions [14,15] and transportation networks [16,17]. For instance, human users of online social networks can both interact and share information either in the real-world and/or using a variety of online social networks [12]. Animals belonging to the same collective (herd, fish school, etc.) can relate to each other differently through different activities such as grooming, social aggregation, foraging, as shown for baboons [18,19], dolphins [20] and birds [21]. Two locations in a transportation network can be connected by different means of transportation [17].
Multiplex networks have a richer structure than single-layer networks, and carrying over the theory and analysis from classical network analysis to Multiplex MLNs is desirable but non-trivial. Many of the concepts and algorithms do not naturally translate to multiplex networks, since the interpretation of nodes and layers may differ across application domains. Notable efforts have been done for community detection algorithms [22].
In this work, we focus on centrality notions for multiplex MLNs (i.e. the importance of a node in the network) and, more specifically, on role equivalence (the detection of social roles of individuals [23][24][25][26]). It is known that role discovery in single layer networks has points in common with centrality measures [1], bisimulation notions [27], equitable partitions and graph isomorphism [28,29]. For instance: regular equivalence, which is one of the simplest form of role equivalence, can be related to bisimulation [27]. Exact role assignment, instead, is shown to share properties with centrality measures, equitable partitions and efficient model reduction techniques for dynamical systems [30].
One of the main challenges for algorithmic role discovery is that the existing notions usually discover trivial partitions. A notion based on strong equivalence criterion typically leads to a trivial result in which each node has a role of his own. On the other hand, a notion with weaker requirements leads to a trivial partition in which all the nodes collapse in a single role.
The contributions of this paper are following. First, we propose a novel notion of exact role assignment to multiplex MLNs, based on an extension of eigenvector centrality and on backward differential equivalence, an efficient model reduction technique for dynamical systems. This approach offers multiple advantages: the proposed extension of eigenvector centrality simultaneously takes into account nodes and layers, different to many of the related works, for example, for community detection [22] or aggregation [31], which focus on either nodes or layers separately. The algorithm for detecting exact role equivalence relies on a polynomial algorithm based on Paige-Tarjan celebrated partition-refinement technique. However, as mentioned above, in real-world cases which rarely exhibit symmetries, this algorithm often does not provide partitions useful in practice.
Our second contribution is a novel notion of approximate role assignment for multiplex MLNs, inspired by an approximate version of backward differential equivalence. The respective algorithm for detecting the approximate role equivalence is NP-hard; however, it allows us to trade-off the run-time complexity for the benefit of obtaining a fine-grained hierarchy of role-equivalences. Finally, we implement and experimentally evaluate the algorithm on a suite of real-world case studies. Results confirm that our notion of approximate role assignment not only obtains non-trivial partitions over nodes and layers alike, but it provides a fine-grained hierarchy of role equivalences, which is impossible to obtain by (combining) the existing role detection techniques. We demonstrate the latter by interpreting in detail the case study of Florence families, a classical benchmark from literature.

Paper outline
Section 2 reviews the background notions, while Section 3 introduces the novel exact and approximate role assignment for multiplex MLNs. Section 4 provides an overview of the implementation and the results of our experimental evaluation on real-world multiplex MLNs. Section 5 presents a case-study on the Florence dataset. In Section 6, we discuss and compare the proposed notion with other notions from the literature. Section 7 concludes the article.

Background
In this section, we provide an overview of the notions that will be used throughout the article: single-and MLNs, role equivalence for single-layer networks, eigenvector centrality measures for MLNs and exact and approximate model reduction techniques based on backward differential equivalence (BDE). Notation. Throughout this work, when clear from context, we will use x i both to denote the i-th element of vector x or the value of the map x(i) (following Definition 2.3). For a partition H over a variable set V p ⊆ {x 1 , x 2 , . . .}, induced by an equivalence relation ∼ H ⊆ V p × V p , we will denote elements of a partition class H ∈ H by x H,1 , x H,2 , . . . , x H,|H| . We denote by · 1 the 1-norm. We will denote with V N = {1, . . . , N}, V L = {1, . . . , L} the set of nodes and layers, respectively. We will assume N > 0 and L > 1 (MLNs with L = 1 are a special case that corresponds with traditional single-layer networks). Vectors will be assumed to be written in column notation.

Role assignment in single layer networks
The problem of discovering the role of each node in a network has been studied in different fields and many notions of role equivalence have been given. Regular equivalence, one of the first notions of role assignment, is an attempt to capture the sociological notion of a relational or structural role. Two nodes are said to play the same role (i.e. are regularly equivalent) if they have ties to the same roles. Regular equivalence is the weakest form of similarity between nodes and it has been shown in [27] that it can be related to the concept of bisimulation. Many variants of regular equivalence have been defined in the literature. In this work, we will focus on the definition of exact role assignment on undirected graphs introduced in [1,32].
Definition 2.1 Given a undirected and unweighted graph (single-layer network) G = (V , E) where V = ∅ denotes the set of nodes and E ∈ V × V denotes the set of edges. Let A ∈ {0, 1} V ×V symmetric adjacency matrix be the adjacency matrix of G and i ∈ V , let N(i) denote the neighbours of i, that is where the last equation is an equation of multi-sets, that is, vertices, that have the same role, must have the same number of each of the other roles in their neighbourhoods.

Multiplex MLNs
In this article, we will work with a generalization of networks called multiplex networks or edge-colouredgraphs, which are useful for simultaneously representing different kinds of relationships over the same set of nodes [10]. This article will focus on undirected multiplex networks.
Definition 2.2 A multiplex network with N nodes and L layers is an ordered collection of L undirected graphs over the same set of nodes: are the edges on layer l ∈ V L . For every layer l, we denote the nonnegative adjacency matrix of the graph G (l) by Then, the multiplex network can be represented by a 3rd-order adjacency tensor: that is, A ijl represents the presence of an edge between nodes i and j on layer l. Throughout this work, we will consider unweighted networks unless stated otherwise.

Centrality and versatility measures
Historically, centrality measures have been used to identify which nodes in a network should be considered important. In this work, we start from eigenvector centrality on single-layered networks based on the following definition given in [26]: Eigenvector centrality x : V N → R ≥0 maps each node to the weighted sum of eigenvector centralities of all nodes directly reachable from it: for i ∈ V N , x(i) = 1 λ j∈V N A ij x(j), where 1 λ is some positive constant. In vector notation, the eigenvector centrality vector x ∈ R N ≥0 is such that Ax = λx, that is, x is the right eigenvector wrt. the adjacency matrix A.
Many extensions of centrality measures have been proposed for multiplex MLNs [23-25, 33, 34] and they are often referred as versatility measures because they tend to highlight nodes that play an important (central) role simultaneously across layers. In this article, we will use one possible extension of eigenvector centrality for multiplex MLNs, proposed in [26]. The authors propose a 2-map, f -eigenvector centrality, in which the first component of the map x ∈ R N represents the centrality associated to the nodes, while the second component t ∈ R L is the centrality associated to the layers.
be the adjacency tensor of a multiplex MLN with undirected layers (i.e. each layer is an undirected graph), and let α, β > 0 be such that 2 as follows: 1 We refer the interested reader to the original reference, for a discussion on the choice of α and β.
In the case of single layer networks a power iteration scheme is used to calculate the centrality defined in Definition 2.3. Similarly, a power iteration scheme for computing f -centrality is desired. Throughout the rest of the work, we will use a normalized version of f -mapping, denoted by g: 1 We now restate a result from [26], that, for a given MLN with undirected layers, f -centrality is well-defined and it can be computed as a limit of a power iterative sequence.
, is a limit of the following iterative scheme 2 : Notice that, from the definition of g, independently of k ≥ 0, it holds that x (k) 1 = t (k) 1 = 1, including the limit value (x * , t * ).

Backward differential equivalence
BDE is a model reduction technique for dynamical systems [35,36]. In this work, we will focus on polynomial initial value problems (PIVP) which are a class of ordinary differential equations (ODEs). In general, PIVP are defined by the ODEs x i = q i , 1 ≤ i ≤ n where q i is a multivariate polynomial over the set of variables S = {x 1 , . . . , x n }. Variables that have the same ODE solution whenever they are given the same initial assignment are called exact fluid lumpable. BDE is a characterization for the condition of being exact fluid lumpable (i.e. BDE groups variables which are exact fluid lumpable). Finding the (largest) BDE amounts to finding the coarsest partition over the variable set, which ensures that the semantic criterion is met. This criterion allows to construct a smaller PIVP, using only one representative variable from each partition class. The reduction algorithms proposed in [35,36] are only syntactically manipulating the ODEs, and they are of polynomial complexity in the number of variables of the program.  We denote the solution of the PIVP at time t with x(t). Then, we will call H a BDE partition of V p . 6 T. PETROV AND S. TOGNAZZI Following [35], the coarsest BDE partition can be computed in polynomial time complexity, for any PIVP which corresponds to a set of chemical reactions with mass-action kinetics.
Originally designed for reducing ODEs, BDE techniques have also been applied for reducing single-layer networks [30], continuous-time Markov chains (CTMCs) [36] and differential algebraic equations [37]. In particular, in [30], a property-preserving exact model reduction algorithm for networks is shown. The given network is first transformed into a PIVP, and then a BDE reduction ensuring exact fluid lumpability is applied. We restate a Theorem showing that BDE reduction also preserves the measure of eigenvector centrality. Throughout the rest of the work, to avoid ambiguity, we will denote with x i and t l the variables associated to the centrality iterative scheme and with x i and t i the variables of the PIVP.
Theorem 2.8 [30] Given a graph G = (V N , E) with adjacency matrix A, let p G be the PIVP over the set of variables V N : In words, the transformation from network to PIVP is such that the equation for the derivative of variable x i is the weighted sum of its direct (outgoing) edges. 3 So, the key idea in the transformation from the network to an PIVP is that the equations in the PIVP exactly match the iterative scheme for computing the centrality measure of interest. Notice that the obtained PIVP contains only linear transformations over its variables. The following result allows one to express exact role assignment as a BDE. (3) In the case when A is an adjacency matrix of an undirected graph, H is a BDE of x (k+1) = Ax (k) if and only if H is an exact role assignment.

Approximate BDE
In [38], the notion of ε-BDE has been introduced on PIVP and we shall discuss how these systems relate to the graphs that we are considering. Let V = {x 1 , . . . , x n } be the set of variables of a PIVP defined be the ODEsẋ i = q i , 1 ≤ i ≤ n, where q i is a multivariate polynomial over V . We can consider polynomials in the normal form where α is a multi-index and the monomial x α appears in q i at most once. For a polynomial q i in normal form with variables in V , let c(q i , x α ) denote the coefficient of the monomial x α . Armed with this definition we can recast the definition of BDE as the following.
that is, when where ∼ * denotes the transitive closure of a relation ∼.
If we relax the constraint of the difference between the coefficients to be exactly zero and allow for a tolerance ε we obtain the definition of approximate BDE.
The following result from [38] establishes the fact that the coarsest ε-BDE partition is unique. Discovering the coarsest ε-BDE partition is an NP-hard problem [38].
Theorem 2.13 Fix a PIVP, a partition G of V , and ε ≥ 0. Then, there exists a unique coarsest ε-BDE partition refining G .

Exact reductions for MLNs
Given a multi-layered network, its f -centrality can be computed with the iterative scheme g presented in Theorem 2.5 (Eq. 2.1). Next we present how the definition of the MLN eigenvector centrality obtained with the iterative scheme (2.1) can be translated to a PIVP p such that there is a correspondence between the node and the layer eigenvector centrality and the variables of the PIVP. 8 T. PETROV AND S. TOGNAZZI Definition 2.14 (PIVP translation) Let G be a multiplex network and let A ijl be the 3-rd order adjacency tensor of the multiplex G . We define a PIVP p, with V p = V N ∪ V L , as follows: We provide an example of the PIVP translation presented in Definition 2.14 in Section A of the Appendix. The next Theorem shows how to write an PIVP, such that if two variables have the same semantics in the dynamical system, then, the respective nodes in the iterative scheme of a given MLN have identical centrality scores over all the steps of the computation, provided the equivalence over initial conditions. Theorem 2.15 Let G be a multiplex network and let A ijl be the 3rd order adjacency tensor of the multiplex network G . Let f be the mapping as defined in Definition. 2.4, and let g its normalized version. Let (x * , t * ) be the unique solution (the centrality scores). Given any initial conditions ( Then, in the PIVP p with time horizon T > 0 obtained via Definition 2.14, for all i, j ∈ {1, . . . , N} and l, q ∈ {1, . . . , L}, the following holds: Similarly to the case of single-layer networks, this allows to extend the concept presented in Theorem 2.8 to MLNs. Now, we accompany Theorem 2.15 with the following lemma and definition to formally translate partition H , which is defined over the PIVP's variables, to its counterpart H * defined over the nodes and the layers of the multiplex graph G . Lemma 2.1 Let G be a multiplex network and let p be the PIVP defined in Theorem 2.15 and let H = (H x , H t ) be a BDE partition over the set of variables such that there is no overlap between the nodes and the layers, that is, H x is a partition over the node variables {x 1 , . . . , x N } and H t is a partition over the layer variables {t 1 , . . . , t L }. Then, for all initial conditions the following holds: Moreover, let G be the corresponding multiplex graph and we define H * = (H * x , H * t ) as the corresponding partition over the node and layer variables {x 1 , . . . , x N }, {t 1 , . . . , t L } of G . We define H * as follows:

Summary
In this section, we reviewed the following notions and existing results. First, we introduced Exact Role Assignment for traditional single-layer networks, followed by Multiplex MLNs, and an extension of Eigenvector Centrality to MLNs. We then introduced ordinary differential equations (ODEs), the problem of exact model reduction based on BDE, and the problem of approximate model reduction based on ε-BDE. Finally, we present the two major results that inspired the contributions shown in this manuscript: Theorem 2.10 and its corollary illustrate the relationship between BDE, eigenvector centrality and exact role assignment for single layer networks; in Theorem 2.15, we recall the result that binds BDE to the notion of eigenvector centrality for Multiplex MLNs.

Approximate role assignment for multiplex MLNs
As we shown in the Section 2, eigenvector centrality can be related to exact role assignment and BDE in the case of single layer networks. To the best of our knowledge, there has been little to no effort to extend the notions of role assignments to Multiplex MLNs. This can be justified by the fact that the problems of extending centrality measures and the problems of clustering and community detection play a bigger role in the literature of network analysis. In this work, we propose to use a reasoning similar to the one presented in Theorem 2.10 to extend the notion of exact role assignment to multiplex MLNs, and we introduce an approximate version of it based on ε-BDE.
Similarly, to the case of single-layered networks in which exact role assignment identifies as equivalent which nodes share the same exact of neighbours in the same block and mirrors the definition of eigenvector centrality one can enrich this notion with the extension of eigenvector centrality for multiplex MLNs.
be the adjacency tensor of an MLN with undirected layers, i, j ∈ V N and l, q ∈ V L . Let N(i, l) denote the neighbours of node i in layer l, that is be a surjective mapping from a node to a representative of a set of nodes. Let r 2 : V L →V L withV L ⊆ V L be a surjective mapping from a layer to a representative of a set of layers. Then, we define a surjective 2-map r = (r 1 , r 2 ), r : as a multiplex exact role assignment if, for all i, j ∈ V N and l, q ∈ V L the following two properties hold: where the right-hand side equations are equations of multi-sets, that is, nodes (respectively layers) that have the same role, must have the same number of each of their other roles in their neighbourhoods. We show an example of multiplex exact role assignment as proposed in Definition 3.1 in Section B of the Appendix.
be the adjacency tensor of an MLN with undirected layers and a partition H = (H x , H t ) over the set of variables (V N , V L ) such that there is no overlap between the nodes and layers. Set r 1 (i) =î Hx when i ∈ H x for H x ∈ H x (i.e.î Hx is the representative of block H x ) and set r 2 (l) =l Ht when l ∈ H t for H t ∈ H t (i.e.l Ht is the representative of block H t ).
• r 1 is a node exact role assignment if and only if for all H x , H x ∈ H x , for all H t ∈ H t and i, j ∈ H x it holds that: be the adjacency tensor of an MLN with undirected layers and a partition H = (H x , H t ) over the set of variables of the PIVP such that there is no overlap between the nodes and the layers, that is, H x is a partition over the node variables {x 1 , . . . , x N } and H t is a partition over the layer variables {t 1 , . . . , t L }.
• H is a BDE of the PIVP translation from Definition 2.14 if and only if In the case A is an adjacency tensor of a multiplex, H is a BDE of the PIVP obtained with Definition 2.14 if and only if H * from Lemma 2.1 is an exact role assignment.
This allows to extend the notion of exact role assignment to multiplex networks. The main advantages are the following: it is obtainable in polynomial time, the partition preserves the centrality scores and it allows to define some notion of equivalence that does not only apply at the level of the nodes but it can simultaneously relate equivalent layers (i.e. layers that play the same role in the multiplex). The main disadvantage of this approach is that the constraints outlined in Definition 3.1 cannot be satisfied easily by real-world and very asymmetric MLNs as these constraints are quite strict and require precisely the same amount of neigbors from the other class. Moreover, as the experimental evaluation shows in [39], because of this reason, no equivalent layers have been found on any of the benchmark MLNs. In order to relax these strict constraints we now introduce an approximate counterpart that allows a tolerance ε used to loosen those constraints.
be the adjacency tensor of an MLN with undirected layers and let H be a ε-BDE of the PIVP obtained from Definition 2.14, then we call H * a ε-approximate role assignment for the MLN.
We illustrate an example of 4-approximate role assignment in Section C of the Appendix. This definition enables the ability to choose the perturbation parameter ε in such a way that it can capture different degrees of granularity of the partition. It is worth noting that the approximation ε acts at the level of the coefficients of the monomials of the PIVP. Throughout this work, the coefficients of such monomials are the entries of the 3rd order adjacency tensor, that is, if there exists an edge between a pair of nodes in a given layer. Intuitively, two nodes are exact role equivalent if they have the same exact number of neighbours in any other block on any other layer. The parameter ε lifts this strict constraint by allowing a tolerance on this notion. For instance, with ε = 1 two nodes are 1-approximate role equivalent if they have the same exact number of neighbours in any other block or if the number of neighbours in any other block differs by a maximum of 1. On one hand, if we define ε-approximate role assignment in such a way we can avoid using ε-BDE. On the other hand, the theoretically sound definition of ε-BDE presented in Definition 2.12 coupled with the transitive closure of the equivalence relation guarantees the uniqueness of the coarsest partition. The main advantages are: it allows to discover more non-trivial partitions, ε can be used as an indicator of how much layers and nodes relate to each other, it allows to have an hierarchy of partitions and it is unique, differently to the ε-equitable partitions and approximate role assignments in the literature [40]. The main disadvantage is that, compared to its exact counterpart, the problem is NP-hard.

Summary
In this section, we proposed the notion of Approximate Role Assignment for Multiplex MLNs. The workflow is as follows: the input is a multiplex MLNs; Using Definition 2.14, we rewrite the input to its associated PIVP; At this point, the user can obtain the partition corresponding to Exact Role Assignment via Definition 3.1, using the polynomial procedure to obtain BDE on the PIVP. Alternatively, (s)he can obtain the partition corresponding to Approximate Role Assignment via Definition 3.3, by choosing a value of ε and using the NP-hard procedure to obtain ε-BDE on the PIVP.

Practical aspects and experimental evaluation
In this section, we present the results of our experimental evaluation on a number of real-world case studies. The tools used for the experiments are MATLAB and ERODE [41], a state-of-the-art tool for automated model reduction for systems of ODEs and chemical reaction networks. The input is the list of edges E (l) for all l ∈ {1, ..., L} representing a multiplex network G = {G (l) = (V N , E (l) )} l∈V L . A MATLAB 12 T. PETROV AND S. TOGNAZZI script translates the list of edges to a PIVP. 4 ERODE then proceeds with the computation of BDE and ε-BDE and provides the partitions as its output. All experiments have been conducted on a MacBook Pro with a 2.6 GHz Intel Core i7 with 16 GB of RAM.

Experimental evaluation
In Table 1, we show the result for the (originally) undirected instances of multiplex MLNs from the repository.
For each instance (rows), the Table displays the number of blocks of the coarsest partition found using the notions presented in Section 3, for different values of ε (columns). Concretely, we show the number of distinct roles found for the exact role assignment (ε = 0), and for approximate role assignment with values of ε spanning from 1 to 20. The results are presented for both nodes and layers.
Similarly, we present results for the modified directed instances in Table 2. We can see in both Tables that our proposed notion can find non-trivial partitions for a variety of instances and, as we have hoped for, it accomplishes a gradual decrease of the number of blocks as ε increases.
In Table 3, we show, for the undirected instances, the smallest value of ε which generates the trivial partition with only one block for nodes (second column) and layers (third column). The collapse point indicates what is the value of ε such that all the nodes (respectively layers) collapse into a single block. For instance, the first line of Table 3 that describes the collapse points for the Florence case study states that when ε = 4 all the nodes are considered 4-Approximate Role Assignment equivalent and therefore there is only one block. However, with ε = 4, Layer 1 and Layer 2 are not considered equivalent. Moreover, for all ε such that 0 ≤ ε ≤ 9 Layer 1 and Layer 2 are not considered equivalent. Then, when ε = 10 (the value reported in the table), Layer 1 and Layer 2 are considered 10-Approximate Role Assignment Equivalent and therefore all the Layers (in this case 2) collapse to a single block. These collapse point are interesting because, ideally, they can be used as a couple of scalars to describe a structural property of the multiplex, for instance, with a small ε as a collapse point the multiplex MLN is more easily collapsed into one node than with a larger value of ε.
From a performance standpoint, all the partitions were found in the order of 10 s for all but two instances, namely pierreauger and celegans-genetic, which took approximately one minute of runtime. In Table 4, we present an analysis of the scalability of the proposed approach. As previously mentioned, in the case of exact role assignment we can use a polynomial procedure and we refer to the results presented in [39], in which, the authors show that such reduction can be obtained in the order of seconds for instances that feature up to half a million nodes. In this work, we shift our focus on the approximate notion: to analyse the limitations of the approach we synthesize MLNs composed by two layers. The first layer is  13 Table  2.

Results of ε-partitioning on the modified directed MLN instances. Observe a gradual decrease of the number of blocks on the majority of the instances, revealing a fine-grained hierarchy of partitions. While we see that the granularity of hierarchy depends on network topology, a general semantic interpretation of obtained partitions
is beyond the scope of this manuscript.  built using a power-law degree distribution network generated with a configuration model with exponent 2.5. The second layer is a copy of the first layer with 20% of randomly added edges (non-overlapping with previous edges). 5 The results show that, on a machine designed for personal use, the bound in terms of the number of nodes is 20000 nodes, which is coherent with the results presented for the real-world benchmarks.
A semantic interpretation of the found roles for each of the case studies we experimented with is beyond the scope of this article. Nevertheless, in the next section, we present how an expert can provide a semantic interpretation of the discovered roles based on the case study of Florence families.

Case study: roles in Florence families
In this section, we highlight that our notion of approximate role assignment over multiplex MLN detects a useful, fine-grained hierarchy of roles, which is impossible to obtain by (combining) the existing role detection techniques (exact/approximate, single-layer/multi-layer). For this illustration, we use a network of Florence families -a classic benchmark dataset from the literature. In [42], the authors collected the data about the interactions of different families in Florence during the rise of the Medici family to power. Throughout this section, we will use the mapping between nodes and families presented in Table 5.
The dataset is comprised of two layers: the first layer (Figs 1 and 3a,b) represents the marriage relationships among the families, an edge between two nodes means that there has been at least one marriage between the members of those families. The second layer (Figs 1b and 4) represents the business relationships between the families. One of the most celebrated results on this dataset is that the Medici 16 T. PETROV AND S. TOGNAZZI   Table 5 and each edge encodes the fact that there has been at least a marriage from between the members of the families linked. Each colour represents a block of the exact role assignment partition. (b) Results of exact roles assignment on the single layer business network. Each node represents a family according to the mapping presented in Table 5 and each edge encodes the fact that there has been at least a business relationship between the families. Each colour represents a block of the exact role assignment partition.
family enjoyed success and empowerment within this framework because of their strategic positioning in these social networks. This has been shown in multiple works from the literature via different means. For instance in [42] this claim has been made by showing that the Medici family has the highest Eigenvector centrality score on the single-layer network of the marriages. Only few works tried to exploit the multiplex nature of this instance: in [51] the claim that the Medici family was the most important at that time in Florence is made by defining a game-theory inspired metric on a network that aggregates the information of the two layers. Similarly, in [22] a similarity measure between nodes is developed using the information from the same 2-layer multiplex that we use in this section. Then, the authors run a hierarchical clustering algorithm on what they refer as multilinks and use its output to detect communities. They claim the importance of the Medici family by showing that their proposed community detection algorithm places them as part of three communities while all the other families appear in at most two communities. We first discuss what we obtain using both exact and approximate role assignment on the single-layer networks. Then, we shall show the results using the proposed notions on the multiplex MLN. Let us first start by using the exact role assignment using only the marriage single-layer network: the result is shown in Fig. 1a and as we can see there is no reduction. Therefore, no meaningful information is provided by this notion on this network. Then, we use the same notion on the business single-layer network. The result is presented in Fig. 1b and we can see that, in this case, we discover that nodes 10, 14 and 16 are exact role equivalent. We now apply the extension of exact role assignment to the multiplex network and the results obtained are depicted in Fig. 2. As in the case of the marriage network we do not find any role equivalent nodes meaning that we cannot infer any information on this instance.

L1 L2
We have seen that the notion of exact role assignment cannot provide any meaningful insight on the social roles covered by the families in this dataset. We now proceed to address the following two questions. First, we saw that exact role assignment cannot provide meaningful partitions for the singlelayer networks, what is the result of applying the proposed approximate extension on the single-layer networks? Second, why we need the multiplex representation in combination with the approximate extension?
To address the first question we apply the proposed approximate role assignment extension on the marriage network using ε = 1 (Fig. 3a) and ε = 2 (Fig. 3b). As we can see from Fig. 3b all the nodes collapse in the same block, therefore resulting in a trivial partition. A different result is obtained (a) ( b) Fig. 3. (a) Results of 1-approximate role assignment on the single layer marriage network. Each node represents a family according to the mapping presented in Table 5 and each edge encodes the fact that there has been at least a marriage from between the members of the families linked. Each colour represents a block of the 1-approximate role assignment partition. (b) Results of 2-approximate role assignment on the single layer marriage network. Each node represents a family according to the mapping presented in Table 5 and each edge encodes the fact that there has been at least a marriage from between the members of the families linked. Each colour represents a block of the 2-approximate role assignment partition. . This partition suggests that nodes 5, 11 and 15 engage in the same social role in the network, and we will discuss this thoroughly later in the section. If we apply the approximate role assignment on the business network using ε = 1 (Fig. 4) we can see that we obtain the trivial partition. To sum up, if we use the proposed approximate extension on single-layer networks we find trivial partitions even for a small value of ε and therefore it does not prove as useful as expected. It is worth noting that this, in general is not true, for instance the combination of the marriage network with ε = 1 provides a non-trivial partition of the nodes. From an omitted experimental evaluation of this notion on single-layer networks we can see that the phenomenon of obtaining the trivial partition for small values of ε is persistent on many benchmark networks.
To address the second question we now take the multiplex representation of the instance and apply the proposed notion. If we use the exact role assignment (Fig. 2) we find the trivial partition and we do not obtain any information. We then apply the approximate version with ε = 1 (Fig. 5a) and we observe that we find the first non-trivial block composed by nodes 10 and 14. We previously saw that with exact role assignment on the business network we found the block {10, 14, 16}, then we saw that with ε = 1 on the marriage network we found the block {1, 2, 3, 6, 8, 10, 13, 14, 16}. In other words, except for the trivial partition in which every node is a singleton, we were never able to discriminate between these nodes thus justifying the use of all the information available because in order to discriminate between these three nodes we need to fully exploit the expressiveness of the multiplex.  Table 5 and each edge encodes the fact that there has been at least a business relationship between the families. Each colour represents a block of the exact role assignment partition. Then, from Fig. 5b, we can observe that if we loosen the constraints we are able to capture another non-trivial partition. For instance with ε = 2 we can observe the following block {1, 2, 6, 10, 13, 14, 16} and if we compare it with the block that we previously found on the marriage network only we can see that we have been able to single out node 8, meaning that, when taking in account both marriage and business relationships that node plays a different social role in the network. Moreover if we compare with the previous block that made nodes 5, 11 and 15 equivalent we can now see that we are able to discriminate among them because of the differences that emerge by considering both layers.
Finally, when we use ε = 3 (Fig. 6a) we observe another interesting phenomenon: we are able to discriminate node 9, which represents the Medici family, with respect to the rest of the network thus adding our proposed methodology to the long line of techniques that manage to distinguish this fact. It is worth noting that this is not the case neither if we use exact role assignment nor approximate role assignment on any of the single layer networks. The partitions depicted in Figs 5a,b, and 6a can be illustrated using a dendrogram as well (Fig. 6b) which is a common way to represent the partitions obtained using hierarchical clustering. We would like to stress that role equivalence and hierarchical clustering cannot be compared to one another (see Discussions 6.2), nor it can be compared to community detection (see Discussions 6.1). It is worth pointing out that in [22] using community detection nodes 3 and 7 participate in the same communities on the same number of layers. Nodes 3 and 7 can be discriminated using the proposed methodology from [22] only by going in-depth in the link based dendrogram. Using our technique we are able to discriminate between those nodes because, despite they share some traits in common, they play a different social role in the Florence environment. In this case, we can clearly see how node 3 shares a direct marriage connection and a direct business connection with the Medici family (node 9) while node 7 does not.

Role equivalence vs. community detection
Although role equivalence and community detection problem share some common traits, they are fundamentally different. The goal of community detection is to split the set of nodes in a certain number of communities based on their similarity, local vicinity or clustering. On the other hand, role equivalence aims at identifying which nodes cover the same social role. For example, let us imagine that there are two universities: University A and University B, and let us assume that employees of each university can be either Professor, Postdoc or PhD student. Then, assume that all the relationships among them are modelled with either a network or with a Multiplex MLN. The goal of a community detection algorithm in this hypothetical example would be to correctly split who is an employee of University A from the employees of University B. On the other hand, Role Equivalence aims at partitioning the nodes in three sets: Professors, Postdocs and PhD students regardless of which university employs them. It comes at no surprise at this point that the two problems give rise to different results and, in general, they cannot be compared to one another. Moreover, in the examples and in the proposed methodology for role equivalence we always use a partition and each node can only appear in one block of the partition. Community detection allows both the usage of partitions or set coverage. In the latter, a node can appear in more than one community. Another remark is that in [22], the communities discovered depend on two parameters and z. The choice of those parameters, in general, depends on the network under consideration. This highlights another perk of the approach presented in this article, as the notions proposed in Section 3 do not depend nor require a parameter search for the underlying instance.

Approximate role equivalence vs. hierarchical clustering
Another problem that can be related to role equivalence is hierarchical clustering. In this work, we used dendrograms to illustrate the hierarchy among partitions discovered using different values of ε. Dendrograms are frequently used to present results of Hierarchical Clustering algorithms (see [22]) but, as we saw from the case-study about Florence, the results are in general incomparable and substantially different. In [22], the authors define a similarity measure between the edges and then run their hierarchical clustering approach based on this measure. In general, when using hierarchical clustering approaches, one would have to define a measure of similarity between nodes and this is the main difference with our approach. With the proposed approach presented in Section 3, we do not require the modeller to define such a measure and our approach relies entirely on the topological structure of the MLN. Such similarity measures often rely on parameters that need tuning of their own as presented in [22] binding the results to the choice of parameters. Although it is a compelling idea to define a similarity measure such that an hierarchical clustering algorithm outputs the same dendrogram as the one presented in Fig. 6b, we could not discover any and finding such a measure is one of the possible future directions.

Static networks vs. dynamic networks
Some of the techniques mentioned in the related works of this article can be applied on dynamic networks [52]. The work proposed in this paper is currently limited to static multiplex MLNs meaning that one can do the computation of the partitions once the multiplex is fixed. If, for instance, one or multiple edges are added or removed, one would have to recompute the partitions.

Conclusions and future works
In this article, we proposed a novel notion of exact role assignment for multiplex MLNs, inspired by BDE, an exact model reduction technique for dynamical systems. Moreover, we presented an approximate role assignment, inspired by the approximate counterpart of BDE. The relevance of the result was demonstrated by computing a variety of non-trivial role assignment partitions on real-world multiplex benchmarks. Throughout this work, we developed the notions of role assignment for undirected, unweighted networks. An immediate future direction includes considering weighted networks and the effect of approximate ε-perturbations on weighted instances. Moreover, we focused on static networks, and one of the possible directions is to investigate the possible extensions in an online fashion, so that our framework can deal with dynamic time-evolving multiplex MLNs.
The framework we presented in this article can be tailored to arbitrary extensions of centrality measures for multiplex MLNs. As such, it represents a versatile, cornerstone contribution to automated, flexible detection of role equivalence in complex networks. Let us use the following 2-map: The first step is to extract the set of neighbours for each node and layer: Then, we apply r 1 to each of the multi-sets then we obtained in the previous step in order to identify the multi-sets of the representatives of the nodes: We will now shift our attention to the layers and the first thing we will do is apply W to each combination of layer and representative of the nodes: Then, similarly to what we did at the nodes level, we apply r 1 to each of the sets that we obtained in the previous step: • r 1 (W (a, 1)) = r 1 (W (b, 1)) = r 1 (W (a, 3)) = r 1 (W (b, 3)) = {a, a, b, b}.

D. Proof of Theorem 3.2
In order to prove Theorem 3.2, we need to show that under the assumption that i, j ∈ V N belong to the same block H x ∈ H x the following holds: ∀l ∈ V L . r 1 (M(i, r 2 (l))) = r 1 (M(j, r 2 (l))) ⇔ ∀H x ∈ H x , ∀H t ∈ H t . We now shift our focus on r 1 (M(i, r 2 (l))) where r 2 (l) =l, by definition of r 1 and M we write: Let us denote with m r 1 (M(i,l)) (k) the multiplicity of elementk in the multiset r 1 (M(i,l)) and notice that m r 1 (M(i,l)) (k) = k∈Hx l∈Ht A ikl . Similarly, for r 1 (M(j, r 2 (l))) where r 2 (l) =l we observe that: if we denote with m r 1 (M(j,l)) (k) the multiplicity of elementk in the multiset r 1 (M(j,l)) and notice that m r 1 (M(j,l)) (k) = k∈Hx l∈Ht A jkl .
Let us start with direction ( ⇒ ): we know that in order for equation ∀l ∈ V l . r 1 (M(i, r 2 (l))) = r 1 (M(j, r 2 (l))) to hold all the elements of the two multisets need to have the same multiplicity, i.e. the following needs to hold: ∀k ∈ r 1 (M(i, r 2 (l))) . m r 1 (M(i,r 2 (l))) (k) = m r 1 (M(j,r 2 (l))) (k) We know that, fixed a block H x s.t.k ∈ H x (i.e.k is the representative of block H x ) the following holds: m r 1 (M(i,r 2 (l))) (k) = k∈Hx l∈Ht A ikl = k∈Hx l∈Ht A jkl = m r 1 (M(j,r 2 (l))) (k) When we consider that we know that this holds for allk ∈ r 1 (M(i, r 2 (l))) (i.e. it holds for all the representatives of all the blocks) and that for all l ∈ V L it trivially holds that r 2 (l) = r 2 (l) we can conclude that the following must hold: A similar reasoning applies to prove direction ( ⇐ ) and to prove the same for the second part of the 2-map, namely r 2 , that considers a similar claim on the layers' variables rather than the nodes' variables.