2025 Volume 34 Issue 3
Article Contents

Ai-Wen Li, Jun-Lin Lu, Ying Fan, Xiao-Ke Xu. SNSAlib: A python library for analyzing signed network[J]. Chinese Physics B, 2025, 34(3): 038902. doi: 10.1088/1674-1056/ada439
Citation: Ai-Wen Li, Jun-Lin Lu, Ying Fan, Xiao-Ke Xu. SNSAlib: A python library for analyzing signed network[J]. Chinese Physics B, 2025, 34(3): 038902. doi: 10.1088/1674-1056/ada439

SNSAlib: A python library for analyzing signed network

  • Received Date: 05/11/2024
    Accepted Date: 12/12/2024
    Available Online: 01/02/2025
通讯作者: 陈斌, bchen63@163.com
  • 1. 

    沈阳化工大学材料科学与工程学院 沈阳 110142

  1. 本站搜索
  2. 百度学术搜索
  3. 万方数据库搜索
  4. CNKI搜索

Figures(6)  /  Tables(8)

Article Metrics

Article views(168) PDF downloads(0) Cited by(0)

Access History

SNSAlib: A python library for analyzing signed network

Abstract: The unique structure of signed networks, characterized by positive and negative edges, poses significant challenges for analyzing network topology. In recent years, various statistical algorithms have been developed to address this issue. However, there remains a lack of a unified framework to uncover the nontrivial properties inherent in signed network structures. To support developers, researchers, and practitioners in this field, we introduce a Python library named SNSAlib (Signed Network Structure Analysis), specifically designed to meet these analytical requirements. This library encompasses empirical signed network datasets, signed null model algorithms, signed statistics algorithms, and evaluation indicators. The primary objective of SNSAlib is to facilitate the systematic analysis of micro- and meso-structure features within signed networks, including node popularity, clustering, assortativity, embeddedness, and community structure by employing more accurate signed null models. Ultimately, it provides a robust paradigm for structure analysis of signed networks that enhances our understanding and application of signed networks.

1.   Introduction
  • The signed networks represent a distinct category of networks with both positive and negative edges,[1] in which the positive edge typically indicates positive relationships denoted by the sign “+”, whereas the negative edge indicates negative relationships denoted by the sign “−”. It originally comes from Heider’s balance theory,[2] which explores how interpersonal relationships tend to move towards a balanced state. Building on this, Cartwright and Harary provide a formal framework by applying graph theory,[3] making signed networks an effective medium and tool for analyzing opposing relationships within complex systems.[4] For example, in the society field, community members may publicly express friendship or hostility toward other members;[5] in the biological field, neurons can transmit both excitatory and inhibitory signals through synapses;[6] in the information field, semantic information of agreement or rejection is common in webpages.[7]

    The analysis of signed networks highlights how the interplay of positive and negative edges affects network topology. It not only provides a robust theoretical foundation for understanding network evolution and dynamics within complex systems but also presents practical applications in areas such as personalized recommendations,[8] sentiment prediction,[9] opinion diffusion,[10] source tracing,[11] etc. It can be approached at three distinct levels: micro-level analysis emphasizes individual nodes or edges;[12,13] meso-level analysis focuses on signed community detection;[14,15] and macro-level analysis investigates the structure balance of signed networks.[16,17] Our research only focuses on the micro- and meso-levels algorithm integration of signed networks, because macro-level research is relatively mature and uses standardized and uniform algorithms.

    Besides, to ensure the accuracy of structure analysis, a reasonable approach is to utilize the null model as a reference network for comparing statistic measures with those of the original network to obtain the relative values of statistics.[18,19] The null model represents a type of random network achieved by randomizing the edge positions or some specific elements within the original networks.[20] Employing null models can assist researchers in producing more robust findings in the field of network science. The signed network null models are usually constructed by changing the sign of edges, the edge position, or the community structure.[21] Notable applications include confirming social balance theory,[22] analyzing protein network structures,[23] and cross-validating the accuracy of community detection,[24] among others.

    Despite the availability of various structural statistic indicators and null models specifically designed for signed networks, a notable gap persists in the form of a robust software framework capable of effectively integrating these diverse algorithms. Currently, there are numerous mature tools and open-source libraries available for analyzing network structures, including NetworkX (https://networkx.org/), SNAP (http://snap.stanford.edu/), and EasyGraph (https://github.com/easy-graph/Easy-Graph), etc. However, their applicability is predominantly limited to general networks characterized by homogeneous edges, rendering them unsuitable for directly analyzing signed networks with both positive and negative edges. Therefore, there is an urgent need for specialized open-source libraries tailored to the structure analysis of signed networks.

    To address these issues, SNSAlib provides a systematic and standardized platform that enables users to easily select micro- and meso-statistic methods for analyzing signed network datasets. It comprises ten empirical signed networks, seven signed null models (including five micro null models and two meso null models), eight statistic functions (consisting of six micro statistics and two meso statistics), and five evaluation indicators. SNSAlib is accessible at https://github.com/py-LIJI/signed-network-null-model. This platform allows for the acquisition of relative results based on various null models, thereby accurately revealing the unique structure characteristics of signed networks. The performance of SNSAlib is experimentally assessed through the analysis of node property, clustering, assortativity, embeddedness, and community structure across multiple datasets, thus highlighting the advantages of SNSAlib in examining signed networks.

2.   SNSAlib: Signed network structure analysis library
  • In order to systematically, accurately, and conveniently measure the structure characteristics of signed networks, we have developed SNSAlib — “(S) Signed (N) Network (S) Structure (A) Analysis library”. All algorithms within SNSAlib are implemented in Python and utilize the PyCharm integrated development environment. The algorithm library is designed for deployment on a general-purpose x86 server equipped with 8 cores and 16 threads, operating on the CentOS system with 16 GB of physical memory and a 512 GB hard drive. To facilitate flexible usage of the SNSAlib by researchers, various interfaces are provided for third-party library development on the PyCharm platform. Additionally, Docker encapsulation is employed to package both the algorithm library code and its runtime environments.

    The construction of SNSAlib comprises four components: signed network datasets, null model algorithm suite, statistic function algorithm suite, and evaluation indicators. This library primarily relies on various signed null models as foundational algorithms, combined with multiple structure statistic calculation methods to analyze the structural characteristics of the original signed network at both micro and meso scales. An overview of the SNSAlib framework is illustrated in Fig. 1. Initially, several empirical signed networks are depicted in Fig. 1(a), which are input into the SNSAlib, and the dataset is processed. Through a conversion program, the dataset is entered as a triple, where +1 and −1 represent the positive and negative edges. Subsequently, seven types of null models within the SNSAlib algorithm suite are employed to generate random signed networks corresponding to the original networks, as shown in Fig. 1(b). Following this step, the statistic functions from the algorithm suite depicted in Fig. 1(c) are invoked to derive micro- and meso-statistics for both the original signed network and its associated null models. Finally, the evaluation method from the SNSAlib illustrated in Fig. 1(d) is utilized to analyze the statistical significance of structure at micro- and meso-levels. This ultimately yields insights into general structure features present within empirical signed networks.

  • This library involves 10 empirical signed network datasets: SPP, GGS, Wiring, Sampson, Teams, Alpha, OTC, Wiki, Slashdot, and Epinions. The first five datasets are sourced from offline real-world social networks, and the latter five are obtained from online internet platforms.[25] The details of these datasets are as follows:

    SPP (Slovene Parliamentary Parties 1994) is derived from the network of relationships between parliamentary parties in Slovenia in 1994.[26] In this network, the nodes represent the political parties in the Slovenian parliament, and the edges represent the estimated relationships between each pair of parties, with weights ranging from −3 to +3.

    GGS (Gahuku-Gama subtribes) is a relationship network concerning the highland tribal groups. It was initially collected by Read in 1954 among the Gama subtribes in eastern New Guinea[27] and was later applied by Hage and Harary in 1983 as a network representing the relationships among these tribal groups.[28]

    Wiring refers to the network of social relationships among 14 workshop workers at the Hawthorne plant of the Western Electric Company.[29,30] Investigators observed the interactions between workers, assigning positive values to denote friendships and negative values to indicate hostile relationships. In total, a comprehensive analysis revealed 32 distinct relationships among the workers.

    Sampson is a social relationship network among monks recorded by Sampson.[30] The relationships between monks are quantified on a scale where −3 indicates strong dislike, −2 indicates moderate dislike, −1 indicates slight dislike, 1 indicates slight liking, 2 indicates moderate liking, and 3 indicates strong liking.

    Teams is a social relationship network among pilots at the US Air Force Flight School.[31,32] This dataset was derived from social tests conducted by flight instructors on 48 pilots. In these assessments, each trainee was asked to identify their preferred and non-preferred flying partners. A willingness to serve as a flight partner is denoted by 1, while an unwillingness is represented by −1.

    Alpha and OTC both originate from Bitcoin online trading platforms.[33] The former is derived from the Alpha platform, and the latter from the OTC platform. To mitigate the risk of ordinary users unknowingly engaging in transactions with fraudulent individuals during Bitcoin exchanges, these platforms enable users to label one another. Users can categorize their trading partners as either normal or fraudulent based on their experiences. Subsequently, other users can choose their trading partners based on these public labels, helping them avoid fraudulent transactions.

    Wiki originates from the Wikipedia platform and refers to the network generated during the election process for Wikipedia administrators.[34] On Wikipedia, each entry is overseen by an administrator. The selection process for administrators commences with users self-nominating and submitting their candidacies. Subsequently, users or other administrator candidates vote, either in favor or against the candidate. The final determination of administrators is based on the aggregate count of supporting and opposing votes.

    Slashdot originates from the technology news website Slashdot.com.[35] On this platform, each user can post news content, and other users can express their opinions by marking the content as liked or disliked. These different opinions among users form the Slashdot signed network.

    Epinions is derived from the product review website Epinions.com,[35] in which each user can share their experiences with products, and other users can evaluate these reviews, either in favor or against. These different opinions among users form the Epinions signed network.

    Empirical signed networks use varied weight intervals to denote user relationships. Thus, preprocessing is needed to standardize numerical values and formats. The values +1 and −1 are used to standardize positive and negative edges in the dataset. Then, the data format is transformed from a matrix list to a triplet representation stored in text files (.txt). These datasets are subsequently integrated into SNSAlib, allowing for direct access from the “signed network data” file within SNSAlib as original experimental data. An overview of the dataset information is summarized in Table 1. The scale of the ten networks in the table increases successively. Compared with the network with a small number of nodes, the positive edge ratio of the network with a large scale is generally larger.

  • The algorithm suite serves as the core component of SNSAlib, primarily consisting of signed null model algorithms and statistic function algorithms. First, Table 2 presents a collection of seven signed null model algorithms. These include five micro-level null models:[20,21] sign randomized null model, full-edge randomized null model, positive-edge randomized null model, negative-edge randomized null model, and positive- and negative-edges randomized null model. Besides, there are two meso-level null models:[36] enhanced community structure null model and diminished community structure null model. For a more intuitive understanding, the table not only provides a detailed description but also illustrates the generation process from the original network to its corresponding null model network by a schematic diagram. Additionally, Table 3 presents a collection of eight statistic function algorithms. These consist of six micro-level statistics: fans minus freaks (FMF), common neighbors, clustering coefficient, excess average degree, family of assortativity coefficients, and embeddedness level. Besides, there are two meso-level community detection algorithms: finding and extracting community in signed networks (FECS) and differential evolution community detection in signed networks (DECDS). The table not only provides a detailed description but also comes with formulas that illustrate the calculation process.

    The above code shows an example of executing the SNSAlib algorithm. In lines 1–3, all required modules are imported; in line 6, the “SPP network dataset” is invoked as the original network using NetworkX; in line 9, the “sign randomized null model” algorithm is executed to obtain the randomized reference network (the other six null models can be called in the same way to generate the desired reference network by selecting the appropriate interface as shown in Table 2); in line 11, the “FMF” function is executed to obtain the FMF value (the other seven statistic functions can be called in the same way to analyze various statistic features of signed networks by selecting the appropriate interface as shown in Table 3).

  • The evaluation of structure analysis can be conducted at both micro- and meso-levels. The micro-level evaluations primarily focus on determining whether there are significant differences between the original network and null model networks. They can provide insights into how various types of null models influence the topology of the original signed network. The meso-level evaluations primarily involve generating random networks based on null models to establish the controlled benchmark. They can assess the significance of the community structure in the actual signed network relative to random networks.

    The detailed descriptions and formulas of three micro- and two meso-evaluation indicators from SNSAlib are presented in Table 4. At the micro-level, it includes three statistic tests: Z-score, P-value, and ASP-value, facilitating an analysis of its micro-level structure features. At the meso-level, it includes two indicators for community detection: signed modularity (Qs) and normalized mutual information (NMI), facilitating an analysis of its meso-level structure features.

3.   Performance evaluation of SNSAlib
  • Combined with various statistic functions provided by the algorithm library, the network structure analysis results of SNSAlib are presented under different datasets. At the micro level, the analysis encompasses node property, network clustering, network assortativity, and embeddedness. At the macro level, it focuses on community detection. This comprehensive evaluation demonstrates the advantages of SNSAlib in terms of functional systematization and structure analysis accuracy.

  • The node property, specifically the node popularity, is measured using the FMF statistic. The experiment utilizes the Epinions empirical signed network dataset. The SNSAlib operates as follows: First, the null model algorithm suite within SNSAlib is invoked to generate five different null models. Then, the FMF statistics of the original network and five null models are calculated. Finally, all FMF values are aggregated to determine the fraction of nodes exhibiting each FMF value relative to the total number of nodes.

    The result is shown in Fig. 2. Overall, the original signed network and its five null models reveal a common trend: obeying the power-law distribution. Specifically, as the FMF value increases, the fraction of nodes decreases. This indicates that the node property of signed networks exhibits the rich club phenomenon similar to that in unsigned networks. That is, only a limited number of nodes within the network possess a high quantity of positive edges while maintaining a low quantity of negative edges. Besides, the results of the positive-edge randomized null model, the negative-edge randomized null model, and the positive- and negative-edge randomized null model overlap the original signed network. This is attributed to their retention of the positive and negative degree sequences during randomization. In contrast, the results of the sign randomized null model and full-edge randomized null model diverge notably from the original network, because they randomize both positive and negative degree sequences, resulting in a higher level of randomness.

  • The clustering of the signed network structure, known as the tightness degree, can be measured using the common neighbors and clustering coefficient algorithms provided in SNSAlib.

  • The clustering is measured using the common neighbor statistic, and the experiment utilizes the Alpha empirical signed network dataset. The SNSAlib operates as follows: First, the null model algorithm suite of SNSAlib is invoked to generate five different null models. Then, the common neighbors of the original network and five null models are calculated. Finally, the values of common neighbors are aggregated to calculate the fraction of nodes corresponding to each value of common neighbors relative to the total number of nodes.

    The result is presented in Fig. 3. Overall, the original signed network and its five null models reveal a common trend: obeying the bell-shaped distribution. This pattern, characterized by high values in the middle and low values at both extremes, indicates that there are very few edges connecting most pairs of nodes, with only a limited number of nodes possessing a large number of connected edges. This feature is similar to the results obtained by using the FMF statistics. Besides, because five null models all change neighbor node sets of each node in the original network, the results of these null models do not overlap the original signed network.

  • Then, the clustering is measured by the clustering coefficient, and the experiment uses eight empirical signed network datasets: GGS, Wiring, Sampson, Teams, Alpha, OTC, Wiki, and Slashdot. The SNSAlib operates as follows: First, the null model algorithm suite of SNSAlib is invoked to generate five different null models. Then, the clustering coefficient statistics of the original network and five null models are calculated. It should be noted that the empirical signed networks have low clustering coefficients, resulting in high error sensitivity. To reduce the effects of randomization errors, all null models are generated 50 times. Finally, the mean and standard deviation are calculated, and the results are compared with the original network.

    The experimental results are presented in Table 5. Although the size and type of the networks are different, the clustering coefficients of the original signed networks are generally higher than those of null models, indicating stronger clustering in the original networks. This suggests that the null model reduces the clustering of the original signed network by varying degrees. Among them, the clustering coefficients of the positive-edge randomized null model and the negative-edge randomized null model are greater than those of the positive- and negative-edge randomized null model, because the latter has a stronger randomization degree. In addition, the clustering coefficient of the negative-edge randomized null model is generally larger than that of the positive-edge randomized null model, because the ratio of positive edges is generally much larger than that of negative edges in empirical signed networks, resulting in the randomization degree of the former is lower than that of the latter. Therefore, it can be concluded that the impact of the correlation between positive and negative edges on the micro-topological structure of signed networks depends on the fraction of positive and negative edges within the network.

  • The assortativity of the signed network structure, described as degree–degree correlation, can be measured using the excess average degree and the family of assortativity coefficients provided in SNSAlib. The excess average degree is more focused on theoretical analysis, and the family of assortativity coefficients offers a more precise mathematical measurement.

  • The assortativity is measured by the excess average degree, and the experiment uses the Epinions empirical signed network dataset. The SNSAlib operates as follows: First, the original network is divided into positive and negative subnetworks, and the null model algorithm suite of SNSAlib is invoked to generate five different null models. Then, the excess average degree statistic (Knn) of the original subnetworks and their five null models are calculated. Finally, the variation trend of Knn with degree value k is observed in positive and negative subnetworks.

    The experimental results are presented in Fig. 4. In Fig. 4(a), it can be observed that the excess average degree Knn(k+) of the original positive subnetwork (equivalent to the negative-edge randomized null model) increases with k, indicating assortativity in the network. The sign randomized null model also shows this property. However, the Knn(k) of the positive-edge randomized null model (equivalent to the positive- and negative-edge randomized null model) and the full-edge randomized null model show no correlation with k, indicating that these three null models have no degree correlation. Furthermore, in Fig. 4(b), it can be seen that the excess average degree Knn(k−) of the original negative subnetwork (equivalent to the positive-edge randomized null model) tends to decrease as k increases, demonstrating disassortativity. The negative-edge randomized null model (equivalent to the positive- and negative-edge randomized null model) also exhibits the same property. However, the result of the sign randomized null model and the full-edge randomized null model is independent of k, showing no degree correlation.

    Overall, it can be concluded that both assortativity and disassortativity coexist in signed networks. For the positive edge topology, nodes are assortative, meaning nodes with many positive edges tend to link with other nodes that also have many positive edges. For the negative edge topology, nodes are disassortative, where nodes with many negative edges tend to link with nodes that have fewer negative edges.

  • In order to achieve a more accurate numerical analysis of assortativity, the family of assortativity coefficients can be calculated. The experiment utilizes four empirical signed network datasets: Alpha, OTC, Wiki, and Slashdot. The SNSAlib operates as follows: First, the null model algorithm suite of SNSAlib is invoked to generate the sign randomized null model and the full-edge randomized null model. Then, the family of assortativity coefficients statistic from the algorithm suite is employed to calculate the assortativity coefficients of the original network and each type of null model. To minimize the impact of randomization errors, all assortativity coefficient values are independently calculated 50 times. Finally, the mean and standard deviation are computed as the final experimental results and evaluated by Z-score, P-value, and ASP-value.

    The results are presented in Table 6. Zf and Pf represent the Z-score and P-value corresponding to the full-edge randomized null model, and Zs and Ps correspond to the sign randomization null model. In order to demonstrate the validity of the family of assortativity coefficients, that is, whether the difference in assortativity between the original network and null models can be statistically reflected, the hypothesis testing method is introduced to test the difference significance. Based on the two-tailed test, under the premise that the significance level is 0.05, the rejection regions for the Z-score are (−∞, 1.96) and (1.96, +∞), and for the P-value, the rejection region is (0, 0.05). As shown in Table 6, the Z-score and P-value for both the full-edge randomized null model and the sign randomization null model fall within the rejection regions, leading to the rejection of the null hypothesis. This indicates that all six assortativity metrics are statistically significant and effectively reflect the differences in assortativity properties between the original network and null models.

    Besides, because the Z-score is influenced by the network size, it is difficult to compare the Z-score across networks of different scales. Therefore, it is necessary to map the statistical results of different networks onto a unified scale. The Z-score from different networks is normalized to obtain the assortativity significance profile (ASP).

    The experiment results of ASP-value are presented in Table 7. First, it can be observed that for the Alpha network, the ASP value of Z+(+,+) is positive both in the full-edge randomized null model and the sign randomization null model. The ASP value of Z+(−,−) is also positive, similar to Z+(+,+). It indicates that when nodes are connected by positive edges, the degree mixing pattern among nodes with the same sign is generally assortative. Conversely, the ASP value of Z−(+,+) is negative, and the ASP value of Z−(−,−) is also negative. This means that when nodes are connected by negative edges, the degree mixing pattern among nodes with the same sign is generally disassortative. Similar results are represented in the other three networks (OTC, Wiki, and Slashdot). However, the ASP values for Z+(+,−) and Z−(+,−) are mixed, with both positive and negative values, showing no clear consistency. As a result, it is difficult to determine the assortativity of these two mixing patterns.

  • The embeddedness is measured by the embeddedness level statistic, and the experiment uses the Epinions empirical signed network dataset. The SNSAlib operates as follows: First, the original network is divided into positive and negative subnetworks, and the null model algorithm suite of SNSAlib is invoked to generate five different null models. Then, the embeddedness level statistics of the original subnetworks and their five null models are calculated. To minimize the impact of randomization errors, the experiment is independently repeated 200 times. Finally, the mean values as final results reflect the variation trend of the fraction of positive edges with positive embeddedness level and negative embeddedness level.

    The results are presented in Fig. 5. In Fig. 5(a), the results of the original signed network and its three null models (positive-edge randomized null model, negative-edge randomized null model, and positive- and negative-edges randomized null model) all exhibit an upward trend. It indicates a positive embeddedness feature, where the fraction of positive edges between node pairs increases as the positive embeddedness level rises. In particular, the difference in the extent of the upward trend, due to the randomization degree of the three null models, reflected the positive embeddedness level is closely related to the network’s positive edge topology and the correlation between positive and negative edges. Besides, in Fig. 5(b), the results of the original signed network and its three null models (positive-edge randomized null model, negative-edge randomized null model, and positive- and negative-edges randomized null model) all show a downward trend. It indicates a negative embeddedness feature, where the fraction of positive edges between node pairs decreases as the negative embeddedness level increases. Similar to Fig. 5(a), the negative embeddedness level is also closely related to the evolution of the network’s positive edge topology and the correlation between positive and negative edges. In addition, in both Figs. 5(a) and 5(b), because the sign randomized null model and the full-edge randomized null model almost completely disrupt the topology, the results are nearly parallel to the X-axis, which indicates there is no positive or negative embeddedness feature.

  • The community structure of signed networks can be analyzed by the community detection algorithm, including finding and extracting community in signed networks (DECDS) and differential evolution community detection in signed networks (FECS) provided in SNSAlib.

    Initially, the performance of community detection algorithms in signed networks is analyzed based on meso-level null models. The experiment uses the GGS empirical signed network dataset. The SNSAlib operates as follows: First, the null model algorithm suite of SNSAlib is invoked to generate the enhanced community structure null model and the diminished community structure null model. Then, the DECDS and FECS algorithms are employed to detect the community structure in the two null model networks. Finally, the results of the community detection are evaluated using normalization mutual information NMI. It should be noted that by increasing the ratio of positive edges within the community P+, the community structure of signed networks is enhanced, and by increasing the ratio of negative edges within the community E−, the community structure is diminished.

    The results are shown in Fig. 6. In Fig. 6(a), as the ratio of positive edges in the community P+ increases, the NMI values of the two community detection algorithms both show an upward trend. In other words, after enhancing the community structure continuously, both algorithms can identify the community structure in the signed network more accurately. Conversely, in Fig. 6(b), as the ratio of negative edges in the community E− increases, the NMI values of the two algorithms both show a downward trend. In other words, after diminishing the community structure continuously, the capabilities of the two algorithms decrease.

    Then, the community structure feature of signed networks is analyzed based on five micro-level null models. The experiment uses five empirical signed network datasets: SPP, GGS, Wiring, Sampson, and Teams. The SNSAlib operates as follows: First, the null model algorithm suite of SNSAlib is invoked to generate five different null models. Then, the DECDS and FECS algorithms are employed to detect the community structure in both the original empirical networks and their corresponding null models. Finally, the results of the community detection are evaluated using signed modularity Qs.

    The experimental results are presented in Table 8. First, for the original SPP signed network dataset, there are higher Qs values in both algorithms (DECDS and FECS), because it is relatively small, with only 10 nodes and 45 edges. Its actual community structure consists of just 2 communities, making the community structure quite evident. Besides, this clear structure means that except for the signed randomized null model, the other four edge randomized null models cannot change the community structure of SPP. Furthermore, for the other datasets (GGS, Wiring, Sampson, and Teams), the results show that the modularity values Qs for the negative-edge randomized null model, positive- and negative-edge null model, full-edge randomized null model, and sign randomized null model, which all involve randomizing the negative topology, generally are lower than that of the positive-edge randomized null model. Both the DECDS and FECS algorithms generally lead to similar results. The finding suggests that the community structure of signed networks is more obscured by randomizing negative edges than positive ones, which makes community detection in these networks more challenging.

4.   Conclusion
  • In summary, we have developed the SNSAlib to establish a systematic framework for micro- and meso-structure analysis of signed networks. The algorithm library offers the easy-to-use various interfaces of null models and statistic functions. It supports multiple formats of the signed network dataset so that users can easily call the appropriate algorithm to analyze the empirical signed network structure directly. Furthermore, the evaluation results across different statistic features also confirm the reliability of SNSAlib for micro and meso scale analysis of signed networks and yield valuable insights.

    The SNSAlib can analyze the specific type of network that incorporates both positive and negative edges, which effectively addresses the application limitation of signed networks. At present, it has been used in several practical scenarios. For example, statics immunization strategies of disinformation,[49] sign prediction of network embedding,[50,51] link prediction based on motifs,[52] etc. However, our algorithm library only focuses on static structure analysis and does not explore the dynamic process of signed networks, which is also an important aspect of signed network analysis. In the future, the goal of improvement should be to introduce more dynamic models of signed networks, such as network structure evolution, information propagation, and game dynamics. The integration of static and dynamic perspectives allows for a thorough analysis of signed networks, thereby deepening our understanding of the vital role that opposition elements play in complex systems.

Program availability
  • The source code is openly available in the Science Data Bank at https://doi.org/10.57760/sciencedb.j00113.00178 and on Github at https://github.com/py-LIJI/signed-network-null-model.

Figure (6)  Table (8) Reference (52)

Catalog

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return