Abstract
There has lately been increased interest in describing complex systems not merely as single networks but rather as collections of networks that are coupled to one another. We introduce an analytically tractable model that enables one to connect two layers in a multilayer network by controlling the locality of coupling. In particular we introduce a tractable model for embedding one network (A) into another (B), focusing on the case where network A has many more nodes than network B. In our model, nodes in network A are assigned, or embedded, to the nodes in network B using an assignment rule where the extent of node localization is controlled by a single parameter. We start by mapping an unassigned “source” node in network A to a randomly chosen “target” node in network B. We then assign the neighbors of the source node to the neighborhood of the target node using a random walk starting at the target node and with a perstep stopping probability q. By varying the parameter q, we are able to produce a range of embeddings from local (q = 1) to global (q → 0). The simplicity of the model allows us to calculate key quantities, making it a useful starting point for more realistic models.
Introduction
The last decade has witnessed a transition from the study of simple graphs to more complex structures^{1}, such as bipartite networks, temporal networks^{2}, networks of networks^{3}, and multiplex and multilayer networks^{4}. All these entities have been shown to be of interest for the modeling of different systems at different levels of complexity^{5,6,7}. In the context of multilayer networks, although there are many generative models for the individual layers that compose them (see for example^{1,8}), the investigation of such models for interlayer connectivity is scarce and researchers have explored mostly correlations of different centrality measures to establish interlayer connections, such as by connecting highdegree nodes in one layer to lowdegree nodes in the other layer^{9,10,11}. There are naturally many other ways how nodes in different layers may be coupled, and we introduce a generative and analytically tractable model of interlayer connectivity that allows for controlling the extent to which locality of connections in one layer is preserved when the network is embedded to the nodes of another layer. We start with a model that consists of pairwise interconnections between layers. We use the term “embedding” to refer to an interlayer connectivity pattern where all nodes of one of the two layers, layer or network A, have at least one link to a node in the other layer, layer or network B), i.e., the coupling is an exhaustive mapping of the nodes of network A to the nodes of network B. Throughout the manuscript, we will use the language of embedding rather than that of multilayer networks. This type of embedding appears naturally in various settings. For example, network A could correspond to a social network of individuals and their pairwise social relationships and network B could represent a network of spatial locations (counties, cities, etc.) and their pairwise connectivity (spatial adjacency, transportation network, etc.).
Note that embedding here refers to a different concept than metric embedding of a network into a metric space^{12} as we do not aim to have a metric space representation of a network which can substitute the topology of the network and be used, for example, for routing purposes using only local knowledge about the structure of the network^{13}.
Throughout this paper, we will think of network A as representing a social network and network B a network of geographical locations. Of key interest is the extent of the locality of the embedding. After a “source” node in A has been mapped to a “target” node in B, locality of the embedding refers to the extent to which the neighbors of the source node in A are mapped to the neighborhood of the target node in B. This characteristic has been studied for social networks embedded in space, finding that the probability of having a social contact at a certain distance is usually well described by a power law with exponent varying between −0.7 and −2^{14,15,16,17}. For this specific setting there are existing models that couple mobility and social connections in order to reproduce specific features of the social networks embedded in geography, such as the similarity of visitation patterns for neighbors in the social network^{18}, the degree distribution of social networks and the spatial spread of populations^{19}, or the coupled evolution of mobility and social interactions^{14}.
This varying degree of locality has important consequences for processes that take place on a network that is embedded in space. For example, for epidemic processes one can transition from a situation of local embedding, in which spreading fronts move at a well defined velocity over space, to a situation where there are no spreading fronts at all and the spatial description of the epidemics cannot be tackled by a continuous space approach^{20}. Being able to model this characteristic, the extent of locality of the network embedding, can help one understand emergent properties of dynamical models involving opinion dynamics, epidemic spreading, or diffusion of innovations or cultural traits.
The Model
We consider two undirected and unweighted networks G_{A} and G_{B} with N_{A} and N_{B} nodes, respectively, and we assume that N_{A} > N_{B}. Their degree distributions are P_{A}(k) and P_{B}(k) and their adjacency matrices are A and B. The assignment rule embeds network A in network B, i.e., each node in G_{A} will be assigned to a node in G_{B}. Completion of the node assignment process gives rise to a third network called the embedded network G_{Γ}, which is an undirected weighted network with adjacency matrix Γ consisting of the same same set of nodes as G_{B}. Some of the nodes in G_{A} will be assigned to node i in G_{B} and some to node j in G_{B}; the element Γ_{ij} of the adjacency matrix of the embedded network corresponds to the number of edges in G_{A} between the group of nodes assigned to node i in G_{B} and the group of nodes assigned to node j in G_{B}. We use f_{i} to denote the attractiveness of node i in G_{B}, which is a measure of its ability to attract nodes from network A, and we impose the condition that the attractiveness of all nodes add up to 1 (\({\sum }_{i=1}^{{N}_{B}}\,{f}_{i}=1\)) to allow for its interpretation as probability. The values f_{i} can be assigned based on any rule, which might be coupled to network structure; for example, they could be made proportional to the degrees of nodes in network B or they could depend on an exogenous factor. Returning to the example of a social network A that is embedded in a spatial network B, the attractiveness of nodes in network B could be thought of as the target proportions of agents to embed at each node. Depending on the application, this could reflect the capacities of nodes in network B, which might be proportional to, say, populations of cities. We would like the network embedding process to be carried out such that by varying some coupling parameter, the resulting embedded network G_{Γ} has a varying degree of locality, which leads us to the following simple assignment rule which is repeated until all nodes in G_{A} have been assigned to nodes in G_{B}.

1.
Choose at random an unassigned node α in G_{A} (source node) and assign it to node i in G_{B} (target location) with probability f_{i}.

2.
For each unassigned neighbor of the source node α in G_{A}, start a weighted random walk from the target node i in G_{B} with a perstep stopping probability q (probability that the random walk stops at each step); assign the node in G_{A} to the node in G_{B} where the random walk happens to stop. The random walk on G_{B} is weighted at each node by the attractiveness of the neighboring (adjacent) nodes.
If the stopping probability q = 1, the walk always (deterministically) comes to a halt at the location node i in G_{B} where it started, and therefore all unassigned neighbors of a given source node are assigned to the same location as the source node itself. This results in an embedded network G_{Γ} that represents the strongest possible coupling between networks A and B. The value of q = 0 for the stopping probability is not sensible in the context of the proposed model because after assigning a source node, no neighboring nodes would ever be assigned (stopping probability is 0). However, we can consider the limit of q → 0 in which case we simply assign unassigned neighbors of a source node α in G_{A} to a location node i in G_{B} with probability that is proportional to the stationary probability of a biased random walker to be at any of the nodes. The probability of being assigned to node i in B will thus be proportional to the corresponding entry of the leading eigenvector v^{0} with eigenvalue 1 of the transition matrix C (\({C}_{ij}={f}_{i}{B}_{ij}/{\sum }_{k}\,{f}_{k}{B}_{kj}\)), which describes the weighted random walk on network B^{21}. In this case the embedded network G_{Γ} represents the weakest possible coupling between networks A and B. For intermediate values of 0 < q < 1 the extent of embedding interpolates between these two extreme cases^{22}. For a schematic of the model, see Fig. 1.
Analytical Description
The assignment process stops once every node in G_{A} has been assigned to a location node in G_{B}. At this point there are several quantities of interest that describe the output of the model, and these include the size of the realized population Φ_{i} at each node i in G_{B}, which corresponds to the number of nodes in G_{A} that have been assigned to location node i, and the adjacency matrix Γ of the embedded network G_{Γ}. We restrict the analytics to the case where network A has many more nodes than network B, and therefore for network A we make use of the degree distribution P_{A}(k) only whereas for network B we use the actual adjacency matrix B. Note that prior to calculating the sizes of the realized populations Φ_{i} at location nodes, or the adjacency matrix of the embedded network Γ, we can describe analytically the number of nodes in network G_{A} that have been assigned to a location node in G_{B} at different times of the process and how many neighbors they have in G_{A} with either assigned or unassigned locations in network B. This process can be described independently of any knowledge of the topology of network B or the random walk stopping probability q, and since these details are needed for calculating other features of the model, we will start the analytics from there.
Process of location assignment
As part of the assignment of nodes at each time step we choose an unassigned source node α in G_{A} at random and assign the node itself, as well as its unassigned nearest neighbors in G_{A}, to target location nodes in G_{B}. We are interested in two specific quantities related to unassigned nodes in G_{A} at time t, namely, the distribution \({P}_{A}^{\oplus }(k,t)\) of the number of their unassigned neighbors k (empty circles in Fig. 2) and the distribution \({P}_{A}^{\dagger }(k,t)\) of the number of their assigned neighbors k (small black circles in Fig. 2). We reduce the description to the computation of the first two moments of \({P}_{A}^{\oplus }(k,t)\), \({\langle k\rangle }_{A}^{\oplus }\) and \({\langle {k}^{2}\rangle }_{A}^{\oplus }\), and the first moment of \({P}_{A}^{\dagger }(k,t)\), \({\langle k\rangle }_{A}^{\dagger }\). Their approximate evolution equations are
with initial conditions \(\eta \mathrm{(0)}={N}_{A}\), \({\langle k\rangle }_{A}^{\oplus }\mathrm{(0)}={\langle k\rangle }_{A}\), \({\langle {k}^{2}\rangle }_{A}^{\oplus }\mathrm{(0)}={\langle {k}^{2}\rangle }_{A}\), and \({\langle k\rangle }_{A}^{\dagger }\mathrm{(0)}=0\), where \({\langle k\rangle }_{A}\) and \({\langle {k}^{2}\rangle }_{A}\) are the first and second moments of the degree distribution of network A and \(\eta (t)\) is the total number of unassigned nodes. The derivation of these equations only assumes that the network is locally treelike and with no degreedegree correlations, and therefore we would expect it to be reasonably accurate for uncorrelated networks with low levels of clustering. For a complete derivation of the equations see the SI.
After some t^{*} time steps all nodes in network A will have been assigned, which implies that \({N}_{A}={\int }_{0}^{{t}^{\ast }}\,[1+{\langle k\rangle }_{A}^{\oplus }(t)]dt\).
We can then integrate Eqs 1–4 together with their initial conditions numerically; here we used the RK4 algorithm but other choices are also possible. The agreement is very good between direct simulations from model and numerical integration of the equations for different types of networks of different sizes (see Appendix Figs S2 and S3).
Realized populations
We use Φi(t) to denote the number of nodes in A that have been assigned to target location node i in B at time t. In the case \(q\ne 0\), the average realized population sizes are given by (see Appendix for derivation):
with \(\delta (q)={\int }_{0}^{{t}^{\ast }}\,[1+q{\langle k\rangle }_{A}^{\oplus }(t)]dt\), \(\alpha ={\int }_{0}^{{t}^{\ast }}\,{\langle k\rangle }_{A}^{\oplus }(t)dt\) and \({C}_{ij}={f}_{i}{B}_{ij}/{\sum }_{l}\,{f}_{l}{B}_{lj}\). In the case q = 1, and combining the equation for the realized populations (Eq. 4), the definition of \(\delta (q)\) and the implicit equation for t*, we see that \(\langle {{\rm{\Phi }}}_{i}\rangle ({t}^{\ast })={N}_{A}{f}_{i}\). For intermediate values of q, the random walk based node assignment process distorts the realized population sizes described by Eq. 4. For the case q = 0, the average realized populations will be
Intuitively, α is the number of nodes that have been embedded through the random walk process. For a more detailed derivation, see the SI. See Fig. 3 (top row) for a comparison of the analytical solution and simulations for different values of q.
Embedded network
We now turn to analytical description of the embedded network G_{Γ}. We investigate average quantities of interest for the adjacency matrix Γ and the dependence of these quantities on G_{A}, G_{B}, and attractiveness f_{i} in network B. In the course of the assignment process, pairs of nodes that are connected by an edge in network A can be assigned to network B either synchronously or asynchronously. When two adjacent nodes in G_{A} are assigned synchronously, their assignments (their respective target nodes in network B) will be correlated through the random walk process. To account for synchronous assignment, we calculate an expected adjacency matrix ψ. The synchronous assignment happens always between a node in A (primary node, the center node in Fig. 2) that is selected for its assignment to a node in B and its notyet located neighbors in A (secondary nodes, the big empty circles in Fig. 2). Therefore the edge connecting the two nodes from A will connect the two locations of B to which both nodes are assigned, and this locations will be related to each other by the random walk that the secondary nodes perform. The information about the relation between these two locations in B will be stored in the adjacency matrix ψ (ψ_{ij} and represents the number of connections in A between the nodes from A assigned to locations i and j in B only due to the process just described, the solid edges in Fig. 2). When two adjacent nodes in G_{A} are assigned asynchronously, their assignments to their respective target nodes will be uncorrelated. To account for asynchronous assignment, we calculate the number of stubs \({\phi }_{i}\) that a node i in B attains during the assignment process and we construct an expected adjacency matrix given a random stub pairing \((\frac{{\phi }_{i}({t}^{\ast }){\phi }_{j}({t}^{\ast })}{{\sum }_{l}\,{\phi }_{l}({t}^{\ast })}(1\frac{1}{2}{\delta }_{ij}))\). These stubs correspond to the dotted and dasheddotted lines in Fig. 2; as the former ones correspond to edges in network A that connect nodes that have been assigned a location at a previous step and the latter ones correspond to unlocated second neighbors of the primary node selected for location assignment. See the S.I. for the complete derivation of the equations. In the end the adjacency matrix of the embedded network is described by the sum of both contributions as
For the case \(q\ne 0\), for which the full derivation is given in the SI, the resulting adjacency matrix of the embedded network is given by Eq. 6 with
where
For the case q = 1, the matrix Ω(q) vanishes. This matrix is the only element involving the topological information of network B. Thus in this case the embedded connections between different nodes in B are random as in the case where q = 0, but the difference is that now there are many more connections inside each target node. So for q = 1, putting everything together, Eq. 6 can be written as
therefore depending only on the attractiveness of network B nodes and the average degree of network A.
For the case q = 0, the embedded network is given by Eq. 6 with
where \({v}_{i}^{0}\) is the i’th component of the leading eigenvector of the matrix C normalized using the L_{1}norm. See the SI for more details.
Discussion
We have introduced a simple, tractable model of network embedding that regulates the extent of localization of the mapping with a single parameter q. The model can also be interpreted within the multilayer network framework, in which case networks A and B correspond to different layers and the assignment of source nodes in network A to target nodes in network B to specifying the interlayer connectivity structure^{4}. We leave it as a future challenge to investigate likely biases in the model that are now induced by the fact that, at each step, two different types of location assignments are done: a source node from network A is assigned randomly to a target node in network B, while the unassigned neighbors of the source node are assigned to the neighborhood of the target location in B via a weighted random walk. For example, choosing a node from network A for location assignment in proportion to its degree may have nontrivial effects on the outcome of the assignment. We would like to stress that the simplicity of the model is what allows us to calculate some of its properties analytically, and as such it can help lay a foundation for the understanding dynamics that take place on embedded networks. We postulate our model thus as a tool for the theoretical exploration for example of epidemic dynamics on social networks that are embedded in geography and so gain a deeper understanding of spatial dynamics derived from purely network dynamics. Consider a situation where we have accurate representations of a social network and a spatial network, where the former is embedded in the latter, but no details are available on how the networks are interconnected. In this case our model could be used as a null model for the embedding process based on values of the coupling parameter from settings where it is available or can be estimated from data. As a sensitivity analysis, one could then vary the value of this parameter to explore different degrees of locality. Finally as an intralayer connectivity model in the multilayer paradigm this model is also a useful tool in exploring the impact of the locality of the embedding on different settings.
References
 1.
Newman, M. Networks: An Introduction. OUP Oxford (2010).
 2.
Holme, P. & Saramäki, J. Temporal networks. Physics Reports, 519(3), 97–125, Temporal Networks (2012).
 3.
Buldyrev, S. G., Gao, J. & Havlin, S. Networks formed from interdependent networks. Nature Physics 8, 40–48 (2012).
 4.
Mikko Kivelä, A. et al. Multilayer networks. Journal of Complex Networks 2(3), 203–271 (2014).
 5.
Lambiotte, R. & Ausloos, M. Uncovering collective listening habits and music genres in bipartite networks. Phys. Rev. E 72, 066107 (Dec 2005).
 6.
Gerald, P., Stanley, H. E., Buldyrev, S. G., Parshani, R. & Havlin, S. Catastrophic cascade of failures in interdependent networks. Nature 464, 1025–1028 (2010).
 7.
Granell, C., Gómez, S. & Arenas, A. Dynamical interplay between awareness and epidemic spreading in multiplex networks. Phys. Rev. Lett 111, 128701 (Sep 2013).
 8.
Goldenberg, A., Zheng, A. X., Fienberg, S. E. & Ed. M. Airoldi A Survey of Statistical Network Models Foundations and Trends in Machine Learning, Vol. 2: No. 2, pp 129–233 (2010).
 9.
Buldú, J. M., SevillaEscoboza, R., AguirreJ., Papo, D. & Gutiérrez, D. R. Interconnecting Networks: The Role of Connector Links. In: Garas, A. (eds) Interconnected Networks Understanding Complex Systems. Springer, Cham (2016).
 10.
Min, B., Yi, S. D., Lee, K.M. & Goh, K.I. Network robustness of multiplex networks with interlayer degree correlations. Phys. Rev. E 89, 042811 (2014).
 11.
Artime, O., FernándezGracia, J., Ramasco, J. J. & San, M. Miguel Joint effect of ageing and multilayer structure prevents ordering in the voter model. Scientific Reports 7, 7166 (2017).
 12.
Serrano, M. Á., Krioukov, D. & Boguñá, M. Selfsimilarity of complex networks and hidden metric spaces. Phys. Rev. Lett. 100, 078701 (Feb 2008).
 13.
Krioukov, D., Papadopoulos, F., Kitsak, M., Vahdat, A. & Boguñá, M. Hyperbolic geometry of complex networks. Phys. Rev. E 82, 036106 (Sep 2010).
 14.
Grabowicz, P. A., Ramasco, J. J., Gonçalves, B. & Eguíluz, V. M. Entangling mobility and interactions in social media. PloS one 9(3), e92196, (January 2014).
 15.
Lambiotte, R. et al. Geographical dispersal of mobile communication networks. Physica A: Statistical Mechanics and its Applications 387(21), 5317–5325 (2008).
 16.
Lengyel, B., Varga, A., Ságvári, B., Jakobi, Á. & Kertész, J. Geographies of an online social network. page 17 (March 2015).
 17.
Onnela, J. P., Arbesman, S., González, M. C., Barabási, A. L. & Christakis, N. A. Geographic constraints on social network groups. PLoS One 6(4), e16939 (January 2011).
 18.
Toole, J. L., HerreraYagüe, C., Schneider, C. M. & González, M. C. Coupling human mobility and social ties. Journal of the Royal Society, Interface/the Royal Society 12(105), 20141128 (April 2015).
 19.
Frasco, G. F., Sun, J., Rozenfeld, H. D. & ben Avraham, D. Spatially distributed social complex networks. Phys. Rev. X, 4, 011008 (Jan 2014).
 20.
Marvel, S. A., Martin, T., Doering, C. R., Lusseau, D. & Newman, M. E. J. The smallworld effect is a modern phenomenon. arXiv:1310.2636v1 [physics.socph] (October 2013).
 21.
Serrano, M. A., Klemm, K., Vazquez, F., Eguíluz, V. M. & San, M. Miguel Conservation laws for voterlike models on random directed networks Journal of Statistical Mechanics: Theory and Experiment 2009, 10, P10024 (Oct 2009).
 22.
Python code for the model, https://github.com/onnelalab/networkembedding. Accessed: 20191216.
 23.
Barabási, A.L. & Albert, R. Emergence of scaling in random networks. Science 286(5439), 509–512 (1999).
Acknowledgements
The authors would like to thank Caroline O. Buckee for helpful discussions.
Author information
Affiliations
Contributions
J.P.O. and J.F.G. conceived the model, performed the analytical calculations and reviewed the manuscript. J.F.G. simulated the model.
Corresponding author
Correspondence to Juan FernándezGracia.
Ethics declarations
Competing Interests
The authors declare no competing interests.
Additional information
Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
FernándezGracia, J., Onnela, J. Flexible model of network embedding. Sci Rep 9, 11710 (2019) doi:10.1038/s4159801948217x
Received
Accepted
Published
DOI
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.