Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2022 Jun 13;12(1):9757.
doi: 10.1038/s41598-022-12710-7.

A novel method for assessing and measuring homophily in networks through second-order statistics

Affiliations

A novel method for assessing and measuring homophily in networks through second-order statistics

Nicola Apollonio et al. Sci Rep. .

Abstract

We present a new method for assessing and measuring homophily in networks whose nodes have categorical attributes, namely when the nodes of networks come partitioned into classes (colors). We probe this method in two different classes of networks: (i) protein-protein interaction (PPI) networks, where nodes correspond to proteins, partitioned according to their functional role, and edges represent functional interactions between proteins (ii) Pokec on-line social network, where nodes correspond to users, partitioned according to their age, and edges respresent friendship between users.Similarly to other classical and well consolidated approaches, our method compares the relative edge density of the subgraphs induced by each class with the corresponding expected relative edge density under a null model. The novelty of our approach consists in prescribing an endogenous null model, namely, the sample space of the null model is built on the input network itself. This allows us to give exact explicit expression for the [Formula: see text]-score of the relative edge density of each class as well as other related statistics. The [Formula: see text]-scores directly quantify the statistical significance of the observed homophily via Čebyšëv inequality. The expression of each [Formula: see text]-score is entered by the network structure through basic combinatorial invariant such as the number of subgraphs with two spanning edges. Each [Formula: see text]-score is computed in [Formula: see text] time for a network with n nodes and m edges. This leads to an overall efficient computational method for assesing homophily. We complement the analysis of homophily/heterophily by considering [Formula: see text]-scores of the number of isolated nodes in the subgraphs induced by each class, that are computed in O(nm) time. Theoretical results are then exploited to show that, as expected, both the analyzed network classes are significantly homophilic with respect to the considered node properties.

PubMed Disclaimer

Conflict of interest statement

The authors declare no competing interests.

Figures

Figure 1
Figure 1
Heat-maps corresponding to Z matrices of the ten organism PPI networks. Diagonal entries correspond to intra-community edges z-scores, while off-diagonal entries correspond to inter-community edges z-scores. Values in the color scale have been cut to interval [-10,60].
Figure 2
Figure 2
z-score intra-community density values (diagonal entries of Z) of each functional class (x-axis) are reported in different colors (each color representing a different organism as indicated in the top right legend of the plot).
Figure 3
Figure 3
Heat-map corresponding to Z matrix of Pokec social network. Values in the color scale have been cut to interval [-100,100].
Figure 4
Figure 4
Diagonal z-score values related to age class.
Figure 5
Figure 5
z0 values (y-axis) of each functional class (x-axis) are reported in different colors (each color representing a different organism as indicated in the top right legend of the plot).
Figure 6
Figure 6
z0 values (y-axis) of each age class (x-axis) are reported.
Figure 7
Figure 7
Correlation between diagonal Z values (x-axis) and z0 values (y-axis). Each point represents a given functional class of a given organism.
Figure 8
Figure 8
Diagonal entries of U-value arrays. The x-axis is labelled by functional classes and each color represents a different organism as indicated in the top right legend of the plot.

References

    1. McPherson JM, Smith-Lovin L, Cook JM. Birds of a feather: Homophily in social networks. Ann. Rev. Sociol. 2001;27:415–444. doi: 10.1146/annurev.soc.27.1.415. - DOI
    1. Aukett R, Ritchie J, Mill K. Gender differences in friendship patterns. Sex Roles. 1988;19(1–2):57–66. doi: 10.1007/BF00292464. - DOI
    1. Cheadle JE, Schwadel P. The friendship dynamics of religion, or the religious dynamics of friendship? A social network analysis of adolescents who attend small schools. Soc. Sci. Res. 2012;41:1198–1212. doi: 10.1016/j.ssresearch.2012.03.014. - DOI - PMC - PubMed
    1. Karimi F, Génois M, Wagner C, Singer P, Strohmaier M. Homophily influences ranking of minorities in social networks. Sci. Rep. 2018;8(1):1–12. - PMC - PubMed
    1. Kossinets G, Watts DJ. Origins of homophily in an evolving social network. Am. J. Sociol. 2009;115:405–450. doi: 10.1086/599247. - DOI