Explaining the emergence of complex networks through log-normal fitness in a Euclidean node similarity space

Networks of disparate phenomena—be it the global ecology, human social institutions, within the human brain, or in micro-scale protein interactions—exhibit broadly consistent architectural features. To explain this, we propose a new theory where link probability is modelled by a log-normal node fitness (surface) factor and a latent Euclidean space-embedded node similarity (depth) factor. Building on recurring trends in the literature, the theory asserts that links arise due to individualistic as well as dyadic information and that important dyadic information making up the so-called depth factor is obscured by this essentially non-dyadic information making up the surface factor. Modelling based on this theory considerably outperforms popular power-law fitness and hyperbolic geometry explanations across 110 networks. Importantly, the degree distributions of the model resemble power-laws at small densities and log-normal distributions at larger densities, posing a reconciliatory solution to the long-standing debate on the nature and existence of scale-free networks. Validating this theory, a surface factor inversion approach on an economic world city network and an fMRI connectome results in considerably more geometrically aligned nearest neighbour networks, as is hypothesised to be the case for the depth factor. This establishes new foundations from which to understand, analyse, deconstruct and interpret network phenomena.


Theory
In the following we combine a number of key existing ideas in the network science literature with novel insights to produce a coherent and simple theory of how complex networks develop their characteristic topologies. To aid the reader, an illustration of the different parts of the theory and how they are used to generate a network model is provided in Fig. 1. Surface factor. Let V = {1, . . . , n} be a set of nodes representative of individual components of a network.
Then, suppose that these components have individual tendencies to make links to the other components. Consider in social networks that the tendencies of people to make new friends is the result of a number of psychological variables-such as extroversion and charisma-which are general attributes held by individuals. In economics, more open and wealthy countries are more likely to make stronger international ties and have the capacity to maintain more ties. For an example in biology, recent computational experiments indicate plausibility that gene-expression (which influences the concentration of proteins within cells) may aid in the formation of protein-protein interaction networks 21 . In each case, the collection of tendencies to make links of each node will form some kind of distribution. Whether and what generality of distribution type is possible across such disparate phenomena is a necessary consideration for a universal approach to generative modelling of networks.
Work on understanding the emergence of power-laws in the tails of degree distributions has gravitated towards power-laws themselves as the distribution of such tendencies, referred to as 'scale-free node fitness' 9 . Power-laws tend to crop up in relationships between variables such as in allometry or in dimensions of cities 22 , although caution is widely advised in postulating such relationships from observation 23 . In most cases, however, empirical evidence suggests singular variables consist of a large bell shaped concentration of values with a heavy right tail and are well suited to modelling with the log-normal distribution 14 . This, in turn, suggests that such variables come from the product of more than one independent random variable, since the product of independent positive random variables tends to the log-normal distribution (via the central limit theorem in the log-scale). Note, a log-normal distribution is typically defined as the distribution resulting from a normally www.nature.com/scientificreports/ distributed variable as the argument of the exponential function, s = exp(x) where x ∼ N(µ, σ ) . Then, we propose to model the tendency of components to make links as a variable distributed log-normally, s ∼ LogN(µ, σ ) . This is particularly promising given that recent evidence suggests most observed degree distributions of complex networks appear better approximated by log-normal distributions than power-laws 11 . Moreover, it is known that the tail of the log-normal distribution resembles a power-law 15 , i.e. a straight line on a log-log plot. The log of a log-normally distributed variable, x, is normally distributed, y = ln(x) ∼ N(µ, σ ) , while the log of the probability density function of this normal distribution is a quadratic in y − µ, Then the rate of change of this is linear in y − µ and as the distribution moves further from the mean the fractional change in increase from one point to the next (i.e. (y i+1 − y i )/y i+1 ) decreases and the plot tends to a straight line. Now, we relate to the variable s as the surface factor of the network, since it does not really help to describe why any two nodes are connected together beyond that either or both have strong or weak tendencies to make connections. We could consider whether such tendencies are additive or multiplicative for pairs of nodes, i.e. is the combined tendency of s i and s j (s i + s j ) or s i s j ? This is not of immediate importance since the product of two log-normally distributed variables is log-normal, while the addition of two log-normally distributed variables, x and y, with the same parameters µ and σ is approximated by the log-normal distribution x + y ≈ z ∼ LN(μ,σ ) , where and (1) ln pdf(y) = ln 1 (3) σ 2 = ln((e σ 2 + 1)/2)  www.nature.com/scientificreports/ as described in 24 . However, we are concerned primarily with the effect this factor has on the degrees of the network rather than on individual links. In this case, the sum turns out to be more tractable. Consider, where A = n − 2 and B = n i=1 s j . This is precisely linear in s i , noting that A and B are exactly the same for all i. On the other hand, and so there is no such exact linear relationship with s i . We could only say that it is approximately Bs i for large enough n and small enough s i . Since the sum is more practical for our purposes, we shall here stick with s i + s j as the surface factor for the existence probability of link (i, j).
Note, for the log-normal distribution, we can arbitrarily fix µ and allow the shape parameter σ to vary to produce the different shapes of the distribution, thus essentially, the surface factor has a single parameter, σ.
Depth factor. Below this surface, we follow the homophily principle by assuming that there are similarities between components which make it more likely for connections to occur between them. In this way, we incorporate the idea of latent spaces encoding similarities between nodes 16 . Thus, we suppose that components are distinguishable by some number, q, of independent latent variables, x 1 , x 2 , . . . , x q . Then, the similarity of nodes i and j across these variables can be described by some inverse distance function (to be consistent with the surface factor 'closer' nodes should attain larger values) A very obvious and important consideration of such latent variables is simply the geometry within which the components are set. If two components are proximal to one another, it stands to reason they are more likely to share a link than to share links with components which are further away, disregarding other variables. It is important to point out that latent variables could also be categorical. For instance, in a social network, people who belong to the same club, A say, are more likely to be linked than to others in another club, B.
The geometry of the latent space is an important consideration. Serrano et al. 18 developed a latent space model in hyperbolic geometry. Nodes were place on the unit disc (equivalent to the latent space of the model), parameterised by the angle to some arbitrary axis, while the degree distribution of the network was used to parameterise the radius of the node on the disc. While an elegant model, choosing the unit circle as the latent space is problematic as it restricts the dimensionality of the space.
For our modelling, we need a description of the properties of the latent variables, x i . We know that geometry is a key consideration of networks, and thus we have up to three variables which can be approximated using a random geometric graph where coordinates are chosen uniformly at random over the interval [0, 1]. For simplicity we shall prescribe all variables as independent and identically distributed (i.i.d.), thus we shall simply model similarities between nodes as distances of a random geometric graph in q dimensions. Of course, it is likely that different variables will have different distributive properties in reality, but, as we shall demonstrate, this simple assumption actually works quite well in practice for modelling a diverse range of complex networks. Taking into account that smaller distances should indicate greater probability of attachment, we have, for each link, a depth factor of for each x i ∼ U(0, 1) and independent.
One important detail of i.i.d. latent variables is that the limit of the distribution of their sum as q → ∞ is a normal distribution, by the central limit theorem. This extends to Euclidean distances between samples: take two randomly sampled points in q-dimensional space, x = {x 1 , x 2 , . . . , x q } and y = {y 1 , y 2 , . . . , y q } with each x i , y i ∼ U(0, 1) . Then let d ij = f (x 1 (i), x 1 (j), x 2 (i), x 2 (j), . . . , x q (i), x q (j)). www.nature.com/scientificreports/ so that each z i is also i.i.d and, by the central limit theorem, q i=1 z i has a normal distribution in the limit as q → ∞ . From the delta method 25 , this holds also for functions of the distribution such as the square rootq i=1 z i -which is just the Euclidean distance between x and y and this further extends to Eq. (12). This property will be of use later in attempts to invert the surface factor of observed networks.
Combining factors. From the above, the probability of a connection being established between nodes i and j of a network is proportional to both the similarity of the nodes (depth factor) and the combined fitness of the nodes (surface factor), giving Assuming that these are the only considerations of the probability of existence of a link, we can take the weights of links in our network as up to linearity. For a complex binary network with m links, we can then, for example, take the m largest weights as extant, use a nearest neighbours connectivity approach 26 , or use a combination of the two to specify the exact number of links while ensuring there are no isolated nodes. The only parameters of this model are the number of dimensions of the depth factor, q, and the shape parameter for the log-normal distribution of the surface factor, σ and, for a network, G, with n nodes and m links, we can describe its surface-depth model as G s-d (q, σ ) . Note, we intentionally avoid normalising weights to provide exact formula for p ij , because we wish to model networks using the same number of nodes and links to avoid the confounding effects of network size and density on network metrics.
Estimating the surface factor in a weighted network. Given the above theory, it would be of high interest to uncover the depth factor of real networks as this would help to determine and analyse the similarity structure of nodes beyond the somewhat confounding tendencies for attachment. However, recovering the depth factor of sparse binary networks poses a very challenging problem, as it would seem intractable to determine which links are stronger to a given node than any other from the binary links. What we can do, however is to apply our methods to weighted networks by assuming that the weights of the network are approximately linearly proportional to the underlying link probabilities of the network. This is motivated by the fact that, for example, thresholded functional brain networks display the consistent topological characteristics of binary real world networks 27 .
We saw that distances in Euclidean space have a distribution tending to normal as q → ∞ , and thus approximate the normal distribution for large q. Importantly, the normal distribution is a symmetric distribution with 0 skewness. On the other hand, degree distributions of real world networks and those coming from our model are right-skewed (at least for densities d < 0.5 , relevant to most real-world networks). We must presume then, that if our model holds, the majority of this skewness is attributed to the surface factor of the network, while the distribution of depth factor weights has minimal skew. Therefore, we propose here an optimisation algorithm to determine an estimate of the log-normal surface factor of a network by minimising the skewness of network weights after inverting estimated surface factors determined by an array of log-normal distributions. In this case, the argument of the minimisation is the shape parameter σ of the log-normal distribution. Supplementary material Section III demonstrates (1) that distances between random samples in an q-Euclidean geometric space have highly symmetric distributions even for fairly small q, and (2) simulation experiments showing correlations between the real and estimated depth factor weights are inversely related to skewness. Note, without knowledge of the degree distribution of the hypothetical depth factor, we are left with the practical assumption that the ranks of the n random samples of the log-normal distribution align with the ranks of the weighted degrees of the given weighted network.

Materials and methods
Here, we detail the data used in our studies; the details of our modelling approach for real-world networks, alongside the tests and comparisons conducted; and the details of the surface factor optimisation algorithm. For methodological details of more basic exploratory experiments on the model, see Section III of the "Supplementary material".
Real-world network data. Two datasets of networks were used for the modelling experiments. The first consisted of 25 networks taken from the Network Repository (NR) across different domains 28 . This consisted of eight social networks-karate club, hi-tech firm, dolphins, wikivote, Hamsterster, Enron email, Dublin contact, and Uni email; six biological networks-mouse brain, macaque cortex, c elegans metabolism, mouse, plant, and yeast proteins; three ecological networks-Everglades, Mangwet and Florida; three infrastructure networks-US airports, euroroads and power grid; and three economic networks-global city network (binarised at 20% density), US transactions 1979 commodities and industries. Many of these were classic benchmark networks.
The second network dataset was the corpus used in 29 from the Colorado Index of Complex Networks (ICON). Of this dataset, we looked at the 184 static networks and, for the sake of computational time, chose to look only at those between 20 and 500 nodes in size. Further, we discarded bipartite networks as these have 0 clustering (13)  www.nature.com/scientificreports/ and thus obviously need a different depth factor consideration than the random geometric graph which has a large clustering coefficient. This provided a final count of 85 networks. For the surface inversion examples, we used two well-established weighted networks. The first is the world city network, available from the Globalisation and World Cities research network 30,31 , constructed using relationships of producer service firms at the forefront of economic influence within each city. Here, each link weight is the sum over service firms of the product of the size the service firm's offices in the two locations, normalised by the value of the maximum possible linkage in the network. In this way it relates how similar the economies of the cities are while having bias towards strength of the economy in the city. Full details are available in 30 .
The second was the fairly sparse (link density of 0.0917) weighted group average fMRI network available freely from the brain connectivity toolbox 32 , the foremost resource for brain network analysis algorithms. This fMRI network was derived from a group of 27 healthy individuals. Grey matter was parcellated into 638 regions and the Blood Oxygen-Level Dependent (BOLD) time series was derived for each region. From these, Pearson's correlations of the time-series between pairs of regions were computed and normalised using the Fisher transform.
The average values across the 27 individuals were then taken. For full details, see 33 .
Modelling real-world networks. For a given network, we found optimal parameters of the surface depthmodel based on the Root Mean Squared Error (RMSE) of topological network metrics. We compared our model against two popular existing theories of power-law fitness and hyperbolic geometry. These could be easily incorporated into our analysis by a switching of factors (switching log-normal for power-law in the surface factor and switching Euclidean geometry for spherical geometry in the depth factor). The details are described below.
Five topological network metrics were chosen on which to base the optimisation of the model to a real world network. For a network G with node set V = {1, 2, . . . , n} and link set E = {(i, j) : i, j ∈ V} , |E| = 2m these were 1. The clustering coefficient, C. This measures fraction of node triples, {i, j, k} ∈ V , with all links present, where k i is the degree of node i, k is the average degree of the network and P is the network density. This indicates the inequality of the degree distribution. 3. Modularity based on the Louvain algorithm 36 , Q. This measures how strongly the network can be partitioned into groups of high connectivity, and with comparatively less connectivity between groups. The Louvain algorithm describes an optimisation of the partition of the network to maximise the modularity where A ij is the ijth entry of the adjacency matrix of the network, c i is the community of node i (randomly initialised) and δ is the Kronecker delta function being 1 when c i = c j and 0 otherwise. The modularity of the network is then taken as the optimised Q. 4. Assortativity 37 , r, of network degrees. This is just a Pearson's correlation of the degrees between connected nodes and can be written where 2m is the number of links in E (each link is counted twice), k t1 and k t2 are the degrees of the first and second nodes in the tth link, and k E is the average degree of nodes turning up in all links in E (so that node i's degree, k i , is counted precisely k i times). This indicates how similar the degrees of connected nodes are across the network.
Each metric was chosen on the basis that (1) it covered a distinctly formulated topological aspect, and (2) its value was appropriately normalised with maximum possible magnitude of 1 so that the minimisation was not evidently biased to any particular index. This kind of minimisation has been previously used in e.g. 38,39 . We assumed that for a node to exist in a sparse binary network, it would be required to be connected within it-consider that isolated nodes could exist in a system without the knowledge of the network constructor. Thus models (with the same number of nodes as their corresponding real-world networks) were ensured to have all nodes with at least degree 1 by including the nearest neighbours for each node. The rest of the links were then selected simply from the links with highest weights across all model weights until the number of links matched the real network. www.nature.com/scientificreports/ After network metrics were computed for each generated model, the RMSE over all metrics between the real-world network and its model was computed, where, each M i is the value of one of the five metrics defined above (arbitrarily) for the realworld network and M i is the corresponding value of that metric for the surface-depth model. In our case, then T = 5-being the five metrics C, E, V, Q, and r. The RMSE was used for optimising the model by searching for the model parameters which produced the minimum RMSE. This optimisation was implemented using the following algorithm: Importantly, it is not expected that the discretisation of the surface factor parameter causes any problems here. It is reasonable to assume in this instance that there are no local minima that would confound the optimization because of the discretisation, since the distributions of the surface-factors are smooth, the right-skew of the distributions are monotonic functions (increasing with log-normal and decreasing with power-law) of the parameters, and the distributions themselves have only global maxima and minima. Note also, we took a maximum of q = 10 arbitrarily to save on time as we assume the topological properties of the model are asymptotic with q, as demonstrated in the Supplementary Material Section I.A. Figure E in Section II of the "Supplementary material" plots the index values of 10 networks and their models alongside results obtained for models utilising surface and depth factors separately, illustrating how the model adapts to each network. We compared this model against competing theories of power-law fitness 9 and hyperbolic geometry (alongside higher dimensional spherical surface geometries) 18 . The same algorithm was used for power-law fitness and spherical surface geometry by substituting the log-normal parameter, σ ∈ [0, 1] , for a power-law parameter, γ ∈ [2, 3] (the interval within which most scale-free networks are found to follow), and by substituting q-dimensional Euclidean geometry for q-dimensional spherical surface geometry, respectively.
For power-law fitness, the link weights were computed as: with s i sampled randomly from a power-law distribution with parameter γ . Again, γ was first checked in steps of 0.05 in the interval [2,3] in the first stage of the Algorithm 1 and then steps of 0.01 in the second stage. For spherical surface geometry, random samples of a q-dimensional spherical surface were generated where coordinates for a single sample were obtained from normalising q normally distributed samples and distances between two samples, x = [x 1 , x 2 , . . . , x q ] and y = [y 1 , y 2 , . . . , y q ] , computed per the formula Then the negative of the exponential was taken, following Eq. (12), and dimensions of spherical geometry were directly substituted for dimensions of Euclidean geometry in Algorithm 1.
Once the best performing parameters for each model were obtained, the RMSE of these best-performing models were compared to assess which model's topology was closest to the real-world network. We also calculated the Spearman correlation coefficient and its p-value between each network's best-fit surface factor parameter and depth factor parameter to test the assumption that these parameters should be independent. Next, degree distributions of the log-normal and power-law models were compared against those of the real-world networks by computing the effect sizes (as the normalised z-statistic, z/ n 2 /2n = z/ √ n/2 ) and p-values (the null hypothesis, that the distributions were not different, was rejected in the case that p ≤ 0.05 ) for the Kolmogorov-Smirnov (KS) two-sample test. This allowed us to assess whether log-normal surface factors could explain the degree distributions of real world networks and how this compared to the popular power-law theory.  www.nature.com/scientificreports/ Surface factor optimisation. To test the validity of the model in weighted networks, we assessed to what extent an attempted surface inversion of the weights (i.e. dividing the weights in (15) by (s i + s j ) to recover d ij ) outputted weights with stronger geometric qualities and similarity relationships between the nodes. To do this, we first required a method to best approximate the log-normal distribution which could hypothetically be the distribution of the surface factor. In the "Theory" section, we noted that random Euclidean distances in a hypercube tend to a normal distribution as the number of dimensions, q, tends to infinity. Section III demonstrates that, indeed, even for fairly small q, the distribution of distances looks normal and certainly has negligible skewness. Therefore, we proposed to approximate the hypothetical surface factor of a real world weighted network by finding the parameter, σ , which minimised the skewness after its inversion from the network weights. Then, for a weighted network with adjacency matrix W of size n with entries W ij , the shape parameter of a log-normal surface factor was estimated, up to two decimal places, by the following algorithm: From this, the estimated depth factor matrix D of the real-world weighted network was obtained as that with the minimum skewness of its entries. To assess the plausibility of D as a depth factor, we compared the 5-Nearest Neighbour (5NN) graphs of W and D . Considering that the weighted degrees may be seen as a simpler approximation of any underlying surface factor distribution, without the need to assume log-normality, we also compared our approach with the network of weights obtained by simply dividing weights, W ij , by the average of the weighted degrees of the pair of adjacent nodes (i.e. a 'weighted degree inversion'), obtaining the matrix H with entries The resulting 5NN graphs of W , D and K were assessed in terms of the associations of the nodes. For the world city network, we assessed the proximity of the nearest neighbours on the globe and performed community detection using Louvain's modularity algorithm 34 to assess to what extent communities were composed of proximal groups of cities. For full details see Supplementary Section V. For the fMRI network, we used the provided geometric information of the nodes to assess proximity of nearest neighbours. We also employed community detection and assessed (1) the normalised mutual information between modules in the 5NN networks and the 5NN of the geometric graph of the brain, (2) to what extent communities (or modules) were symmetric across the brain (i.e. in what percentage of cases was a right hemisphere region in the same community as a left hemisphere region), and (3) the average longest distance found within communities. For full details see Supplementary Section IV.

Experiments
Section I.A of the "Supplementary material" provides some initial explorations of the topology of the model covering topological differences between surface-depth models and random geometric graphs and the behaviour of degree distribution with increasing network density. Importantly, we found that surface-depth models have general characteristics associated with real-world networks, such as high clustering coefficient and modularity, high degree heterogeneity, and disassortativity. Furthermore, Section I.B goes on to show that degree distributions of surface-depth models with n = 1000 and q = 4 exhibited power-laws at densities of 1-4% and log-normal distributions at densities of 4-40% (specifically, null hypotheses of two-sample KS tests with power-law and lognormal degree distributions could consistently not be rejected at the 5% level in these cases).
To validate Algorithm 1, 1000 surface-depth models were generated with randomly selected parameters and fed into the algorithm. The error of the estimated parameters produced from the algorithm were then assessed. The interquartile range (i.e. 50% of the distribution) of the error estimated number of dimensions of the depth factor, q, was from [0,1] dimension of the true parameter, while the interquartile range of the estimated shape parameter of the surface factor, σ , was [− 0.02, 0.02]. For both it was seen that there were positive correlations between the error and the magnitude of the parameters, indicating that the larger the parameters produced by the algorithm were, the larger their error from the true parameters are likely to be. Full details and results can be found in Section I.C of the "Supplementary material". www.nature.com/scientificreports/ We shall continue with the most pertinent results regarding the modelling of real world networks. We modelled 110 real world binary networks collected from two difference sources. The most accurate surface-depth model was then chosen by optimising for the two model parameters, σ and q, following Algorithm 1. Note, in each case, the number of nodes and links in the resulting model were kept the same as in the original network. We then did the exact same approach with parameter substitutions for (1) power-law fitness instead of lognormal fitness in the surface factor, and, separately, (2) spherical surface geometry for node similarity instead of Euclidean space in the depth factor.
The Root Mean Squared Error (RMSE) in topology of the models for each network-calculated through five distinct and widely used normalised topological metrics, C, E, V, Q and r-is scatter plotted against RMSE using (1) a power-law surface factor and (2) spherical surface depth factor in Fig. 2a,b, respectively. The proposed model clearly outperformed models of theories of both power-law attachment and hyperbolic geometry, with a median RMSE of just 0.0449 compared with 0.1932 and 0.2012 for power-law attachment and hyperbolic geometry, respectively. It also clearly outperformed general q-dimensional spherical surface geometry with a median RMSE of 0.0813. In fact, RMSE was smaller in the proposed model than hyperbolic geometry in 99.09% of networks, power-law fitness in 97.27% of networks and general spherical surface geometry in 80% of networks studied. Furthermore, the average sizes of RMSE were a remarkable 293.4%, 287.5% and 170.4% the size of the proposed model for hyperbolic geometry, power-law fitness and general spherical surface geometry models, respectively.
Next, for each real-world network we compared the degree distributions of the best-fit model with the real-world networks using KS two-sample tests. This was done fifty times for each network and median results recorded. Of the 110 networks studied, 68.2% had no significant median p-value, while 81.8% had no noticeable effect size ( ≤0.2), with all but one of the remainder (17.27%) having only small effect sizes ( ∈ [0.2, 0.5] ). Again, these compared very favourably against the power-law fitness model, see Fig. 2c. Indeed, the average effect size of the power-law model was 225.7% that of the average log-normal model.
We then tested to see whether any correlation or anti-correlation was established between the optimised parameters, q and σ , of the model. The existence of any significant correlation would indicate that the parameters were not independent and thus would negate the claims of the theory that independent surface and depth factors existed to make up link probability. Scatter plots of σ against q for all networks are shown for the proposed model, the power-law attachment model and the general spherical surface model in Fig. 2d-f, respectively. Spearman's correlation coefficient, r s , was used to assess levels of correlation between q and σ . There was no correlation found between σ and q of the proposed theory's model ( r s = −0.0563, p = 0.5590 ), validating the independence assumption of surface and depth factors of complex networks. On the other hand, a significant anti-correlation was found between σ and q when spherical surface geometry was used ( r s = −0.3872, p = 2.92 × 10 −5 ), www.nature.com/scientificreports/ indicating that this model, and the hyperbolic geometry model of which it is a generalisation, was not as appropriate a theoretical foundation for network topology emergence. Figure 3 shows comparisons of the degree distributions of the network repository networks and their bestfit surface-depth models. The similarity between distributions across all networks of various size, density and domain is striking. From all of these results, the surface-depth model appears as a good candidate for a unifying theory of attachment in complex network topologies, achieving scale-free like distributions in networks at sparse densities and log-normal like distributions in networks of larger densities, as can be seen in real-world networks in 11 for example.
Interestingly, there was a particular class of networks that proved to have large errors for all models even though their degree distributions were on the whole largely indistinguishable from those of the proposed model. These were food web networks. Looking more closely, it appeared there was an exceptional difference in the clustering coefficients in this case. Median differences for each index across food web networks were as follows: 0.2753 for C, 0.0206 for E, 0.0593 for V, 0.0185 for r, and 0.0449 for Q. The very low relative clustering in food web networks makes sense since we can expect that it is uncommon for predators of the same prey to hunt one another as well. This suggests that better modelling of the depth factor may help to better capture the information here.
Depth factor recovery through estimated surface factor inversion. To probe further whether surface-depth factors could really be observed in real-world networks, we applied depth factor recovery and subsequent analysis of the recovered depth factor's geometric qualities on two important cases of weighted networks: an economic world city network and a group average fMRI functional brain network, as described in the "Methods and materials". In both cases, we optimised the log-normal distributions of the surface factors following the network weight skewness minimisation Algorithm 2 in the methods, based on the fact that Euclidean www.nature.com/scientificreports/ distances in the q-dimensional hypercube tends towards the symmetric normal distribution as q → ∞ by the central limit theorem, and on the observations in Supplementary material Section III.
For the global city network, the optimal log-normal distribution was found at σ = 0.59 . K-Nearest Neighbour (KNN) graphs with K = 5 were then computed from the global city network and its estimated depth factor. We also compared this with just using the weighted degree distribution as an estimate of the surface factor. Figure 4a-c show the weighted adjacency matrices of the original network and the estimated depth factors from the weighted degree and tuned log-normal distribution surface inversion approaches, respectively.
Modules were computed using Louvain's modularity method 34 . The 5NN graphs were then plotted using the same force-based algorithm where connected nodes are attracted and non-connected nodes repelled from one another 40 , Fig. 4d,e. Remarkably, surface inversion of the hub-centric world city network produced a highly modular network with geometric qualities. On inspection, spaces within the network layout were notable by their global proximity and cultural ties. We analysed this statistically in the case of global proximity. Section V of the "Supplementary material" contains these details alongside tables of the five nearest neighbours of each city for each approach. Of these, 180 (65.45%) were found to be proximal on the globe (either being in the same continent or otherwise geographically close) for the tuned log-normal inversion compared to 50.55% for the degree-based inversion and just 37.82% for the original network. Furthermore, the five cities with greatest weighted degree (London, New York, Paris, Tokyo and Hong Kong) appeared in just 10.56% of the tuned log-normal inversion compared with 76.64% of the nearest neighbours in the original network and 46.18% in the degree-based inversion, with 9.27% being that expected by random chance. In addition, 52 of the 55 cities were found within the 5 nearest neighbours of all cities in the tuned log-normal inversion approach, whereas this number was just 15 for the original network and 38 for the degree-based inversion. All in all, the tuned log-normal inversion provided a remarkably more geometrically congruent network, with a clear elimination of rich-club-style 41 bias in nearest neighbours. Some qualitative observations are also worth noting. Barcelona and Madrid were found to be in the same community as all Latin American cities, appealing to their cultural ties, whereas Latin American cities were www.nature.com/scientificreports/ not even all found in the same community in the original network. Further, Eastern Europe and East Asia both had clearly distinct communities in the recovered depth factor but not so in the original network. For the fMRI network, the optimal log-normal distribution was found at σ = 0.27 . The availability of the 3D coordinates of the nodes representing brain regions allowed us to construct a geometric graph for comparison. The sparsity of the network posed a significant confounding factor in this instance as only those links which already existed could be chosen in the resulting 5NN graph. Nonetheless, we considered four measurements of the geometric appropriateness of the resulting depth factor: (1) the percentage of overlapping links with the 5NN graph of the geometric network, (2) the normalised mutual information between the modules of the network and the modules of the geometry (3) the proportion of symmetric nodes across brain hemispheres appearing in the same module, and (4) the average largest distance within modules. Details of these analyses are in the Supplementary material Section IV. In all cases the estimated depth factor outperformed the original network. The depth factor achieved consistently greater geometric overlap, normalised mutual information and module symmetry, and smaller average largest distance within modules. This again demonstrates the relationship of the estimated depth factor with underlying geometry of the considered networks.
The combined evidence from the world city and fMRI networks provides promising evidence of the real existence of surface and depth factors in complex networks, substantiating the real-world applicability of the proposed theory and opening up new avenues for discovery in weighted network analysis particularly.

Limitations and future work
The theory put forward is topologically accurate in modelling most of the complex networks studied here, yet we made no attempt to take into account dynamically changing networks and network evolution. That being said, it would seem that evolution and dynamics of networks could be incorporated in our theory by shifts occurring in surface and depth factors. For instance, a node may take on different values of its latent variables thus changing the nodes to which it is most similar which would result in a change to the links the node makes. Otherwise, the node may increase or decrease its fitness giving it a higher/lower tendency to make connections, again resulting in a dynamic change of the network. New nodes could be assumed to appear somewhere within the latent variable space but with an initially low tendency to make the connections. Such processes could be stochastically encoded.
Also there are evident limitations in the modelling of the depth factor, most clearly seen in the generally higher clustering coefficient of the model. To improve the model's accuracy, new methods would be required for more accurate depth factors and the fusion of different types of latent variables, including categorical variables and variables with different distributions, as well as weighting variables for their importance. Mechanisms which may account for lower clustering should be explored. The current assumptions don't allow for factors which mitigate the inherently strong homophily of Euclidean geometry, such as repulsion between nodes. The proposal that a depth factor of weight similarities can be extracted has clear implications in terms of geometric deep learning 42 . Along similar lines, a recent study considered using machine learning approaches on a hyperbolic network model 43 . It seems that such methods can be fairly straightforwardly translated to the geometries of the proposed depth factor and we expect our study will open up interesting future research along these lines. Immediate applications of the theory include surface inversion to other weighted networks and the consideration of this theory to advance efforts in important network problems such as community detection and link prediction.

Data availability
Datasets used are readily available and as referenced in this article. www.nature.com/scientificreports/ 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 licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence 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 licence, visit http://creat iveco mmons .org/licen ses/by/4.0/.