CS Paper Radar

netseg: a Python Package for Measuring Structural Polarization and Segregation in Social Networks

Onur Tuncay Bal, Michał Bojanowski

cs.SI cs.CY ·submitted 2026-09-14 10:27 UTC · v2
benchmarkcode/data

Abstract

The study of structural polarization and segregation in social networks is an established line of research, and the quantification of both phenomena proceeds through a set of widely cited network indices. The code implementing those indices, however, is seldom released and almost never tested. We present netseg, a comprehensively documented Python package implementing these indices, most of them generalized to more than two groups and to directed as well as undirected input. It ports the R package of the same name and adds measures the R version lacks, among them Random Walk Controversy, Boundary Connectivity, Dipole Moment, and Moran's I. The package operates on igraph objects and performs the underlying graph operations (e.g., neighborhood queries and random-walk simulation) through igraph's Python interface, so that they execute in compiled code rather than in interpreted Python. For several of the indices this yields runtimes orders of magnitude below those of the available open-source implementations, which the documentation reports in benchmarks. Most of these indices are defined as a divergence from a null model, and published implementations fix that null model to a uniform random graph of matching density. netseg accepts an ensemble of graphs as a sample from an arbitrary null model, and distinguishes indices that already incorporate a baseline from those that do not, adjusting the comparison accordingly to avoid double subtraction. The documentation provides, for each index, a worked empirical example, its behaviour at the degenerate cases where it is undefined, a benchmark, and the procedure for substituting a custom null model. We report the behaviour of every index over a parameter sweep of a generative opinion model, and apply them to a county-level railroad network built from nineteenth-century operator records joined to full-count census data.

Closest papers

Nearest neighbours by meaning across the whole index.

Unified framework for measuring segregation resolves how social and geographical space jointly shape connections

cs.SI physics.soc-phstat.AP ·2026-09-15 ·Johannes Happenhofer, Sahil Loomba, Till Hoffmann, Sumeet Agarwal, Nick S. Jones
code/data similarity 0.58
Abstract · Supplementary Information included for the segregation framework; further supplementary material for the intervening opportunities model and…

Our understanding of how geographical and social segregation interact remains limited, as relatively few studies investigate them jointly, and existing approaches often lack a framework distinguishing geographical, social, and total segregation. Additionally, large-scale individually resolved geo-social network data are rarely publicly available. We address both. Conceptually, we develop a unified framework that measures segregation in geosocial networks by comparing network models to appropriate null models and recovers the Theil index, dissimilarity index, and network modularity as special cases. Empirically, we turn to privacy-preserving aggregated relational data (ARD): we combine the Facebook Social Connectedness Index for the US with US Census and Pew data, and introduce an ARD-compatible joint geosocial intervening-opportunities model to infer link probabilities between region--group cell pairs. Applying our segregation framework, we find that social segregation predominates over geographical segregation, with notable separation for White--Black, college-degree--no-degree, and high-income--low/middle-income across both segregation types. We find increasing social homophily with geographical distance and group-specific geographical connectivity patterns, suggesting that geographical segregation may affect cross-group connectivity not only directly but also by amplifying social segregation.

0.41

Algorithmics for Graphical Separation Criteria

cs.LG stat.ML ·2026-10-27 ·Moisés Chavira-Flores, Sebastian Weichwald, Leonard Henckel
published similarity 0.57
Abstract · Accepted at PGM 2026, PMLR, Vol. 343

Statistical graphical models are representations of the dependences between the components of a random vector. They encode these dependences via graphical separation criteria. We consider the algorithmic problem of checking separation statements for the various graph classes and separation criteria that have been developed by the community. We establish that all criteria we study can be checked by modular variations of reachability. For all separation criteria but $σ$-separation, this yields a linear-time algorithm. This is effectively the optimal attainable time since loading the graph itself is linear-time in the number of edges in the graph. Using the CIfly framework for deploying modular variations of reachability, we also provide R and Python code implementing our algorithms. We evaluate empirical runtime and scaling behavior in a simulation study.

0.38

Percolation in the Stochastic Block Model

cs.SI physics.soc-phcond-mat.stat-mechmath.PR ·2026-09-22 ·Luca Pieleanu, Moritz Laber, Narayan G. Sabhahit, Dmitri Krioukov
similarity 0.56
Abstract · 23 pages, 10 figures

The stochastic block model is a paradigmatic model of networks with community structure. Yet percolation in the model has been studied primarily in cases with a fixed block structure, even though in real networks, the community structure may evolve as the network grows. Here we study percolation in sequences of stochastic block models in which the numbers and sizes of communities, as well as the intra- and intercommunity connection probabilities may all change with the network size. We analyze five such sequences using two methods: linearized self-consistent equations for the locally tree-like models and a branching process at the community scale for the models with nonvanishing clustering. We find that the critical average degree is not generally equal to $1$, even in locally tree-like sequences, because the transition depends on how connections are distributed across the evolving community structure. We also show that the community-scale branching process accurately predicts the transition when intercommunity connections are sufficiently sparse, even in the presence of nonvanishing clustering, while a geometric stochastic block model sequence demonstrates the limitations of this method when correlations between intercommunity connections cannot be neglected. These results extend percolation studies in the stochastic block model to more realistic scenarios with evolving community structure, and may provide new methods to derive the upper and lower bounds for the percolation threshold in geometric long-range percolation.

0.19

Degree-Corrected Joint Matrix Factorization for Multilayer Community Detection

cs.SI cs.LG ·2026-10-01 ·Alexandra Dache, Manon Rustin, Arnaud Vandaele, Nicolas Gillis
similarity 0.56
Abstract

Multilayer networks allow the modeling of interactions between the same entities across different contexts, such as temporal observations, varying settings, or interactions of different types. The goal of community detection in multilayer networks is to identify groups of nodes exhibiting similar connectivity patterns, which may vary across layers. We propose a method based on a joint nonnegative symmetric matrix trifactorization for community detection in multilayer networks, where each graph is approximated by a nonnegative symmetric matrix trifactorization. Our approach enforces constraints on the factor matrices so that communities are disjoint and shared across layers, while allowing each layer to have its own connectivity patterns and node degrees. This flexibility enables the model to capture both local and global structural variations across layers. We also develop an algorithm to efficiently solve this problem. We evaluate multilayer community detection methods using the multilayer degree-corrected stochastic block model (MDCBM), a flexible framework for generating realistic multilayer graphs with heterogeneous degrees and varying connectivity patterns. Experiments show that our method reliably detects communities across diverse regimes, whereas existing state-of-the-art approaches are often limited by restrictive structural assumptions.

0.10

Behavior of Nonlinear Opinion Dynamics over Large Networks

eess.SY ·2026-09-12 ·Yu Xing, Anastasia Bizyaeva, Karl H. Johansson
hot direction similarity 0.54
Abstract

Opinion dynamics have been studied for decades across disciplines, with much of the theoretical literature focusing on behaviors such as consensus, polarization, and clustering. Although classic models can exhibit more complex opinion patterns in simulations, quantifying such distributions is not fully understood. To address this question, in this paper, we study the behavior of nonlinear opinion dynamics over large-scale networks using graphons, which capture the underlying network structure. In the model, agents update their opinions according to a nonlinear rule that includes saturation effects in interactions. The network is represented by random graphs generated from a graphon, and a corresponding nonlinear dynamical model is introduced over the graphon. We show that the graphon dynamics approximate the finite-dimensional system, when the network size is large. Leveraging spectral approximation results for random graphs, we further show that the equilibria of the nonlinear model can also be approximated by those of the continuum limit. This result enables a quantitative characterization of the opinion distribution based on the underlying graphon structure. The theoretical results are illustrated by numerical simulation.

0.26

Disparity in Influence: A Fairness Evaluation of Centrality Measures in Complex Networks

cs.SI ·2026-11-15 ·Kirtidev Mohapatra, Harsh Vardhan Singh, Rishi Ranjan Singh, Akrati Saxena
similarity 0.54
Abstract

Social networks are shaped by homophily-driven connections, which naturally lead to the emergence of communities with uneven sizes and influence. Such structural imbalances impact the fairness of network analysis tools, particularly centrality measures that are widely used to identify influential nodes for tasks like information diffusion and network robustness. In this work, we conduct a comprehensive assessment of fairness in centrality measures, using influence spreading across networks with heterogeneous community structures. We first analytically show that disparity is bounded by outreach; cross-community outreach is bounded by the inter-community cut; and when all seeds lie in one community, disparity approaches the normalized outreach within that community as cross-community transmission vanishes. This explains why attenuation concentrates influence in the community where diffusion starts. We further evaluate a broad spectrum of centrality measures, including local, semi-local, global, and community-aware measures, on both synthetic network generative models and real-world datasets, using the Independent Cascade and Linear Threshold Models. The results consistently show that influence tends to concentrate within larger communities, with disparities becoming more pronounced under constrained or deterministic diffusion settings. We further observe that fairness is highly sensitive to the choice of centrality measure rather than its general category. In particular, fairness-aware adaptations of PageRank demonstrate a strong balance between maximizing influence reach and maintaining equitable distribution across communities. On real networks, these conclusions are largely stable under random removal or addition of up to 3% of the edges. Our findings highlight the need to explicitly account for fairness when designing and selecting centrality-based strategies in networked systems.

0.19

Ollivier's Ricci Curvature on Complex-weighted Graphs

cs.SI math.MGphysics.soc-ph ·2026-08-10 ·Yu Tian, Eleanor Wiesler, Melanie Weber
similarity 0.54
Abstract · 32 pages, 11 figures

Understanding the geometry of complex networks is critical for effective modeling and analysis across domains. While discrete notions of Ricci curvature have emerged as powerful tools for characterizing both local and global network structure, existing formulations are largely confined to undirected networks with real-valued weights. This limits the use of curvature-based analysis of directional and complex-weighted relations that arise naturally in many applications, from social and biological systems to quantum and signal-processing networks. In this work, we introduce a principled extension of Ollivier's Ricci curvature to complex-weighted graphs, which encompasses directed graphs as a special case. We establish fundamental theoretical properties of this new notion, including relations to the magnetic Laplacian and combinatorial upper and lower bounds that relate curvature to cycle structure in local neighborhoods. We further develop computational methods for curvature estimation and demonstrate their utility in community detection on directed networks.

0.10

Influence of Assortativity on the SICP Spreading Process in Hypergraphs

cs.SI physics.soc-ph ·2026-11-11 ·Jelmer Stolwijk, Renze Dijkhuizen, H. A., Peters, Huijuan Wang
similarity 0.54
Abstract

Many real-world systems involve group interactions that cannot be captured by pairwise graphs. They can be better represented by hypergraphs where each hyperedge could connect an arbitrary number of nodes. The Susceptible-Infected Contact Process (SICP) has been proposed to model the spreading of information and epidemics on hypergraphs. However, how higher-order topological properties of a hypergraph influence the SICP spreading process remains understudied. In this paper, we examine the impact of hypergraph assortativity based on the Neighborhood Coefficient (NC)-the average size of hyperedges incident to a node-on the SICP spreading process. By introducing a low-complexity measure of hypergraph assortativity grounded in analysis of variance, we apply hyperdegree-preserving rewirings to real-world networks and synthetic hypergraph models to tune their assortativity. We find and explain why lower NC assortativity yields higher average epidemic prevalence and lower prevalence variance across different seed selections. This phenomenon is evident when hyperdegree-preserving rewirings are applied to real-world networks with heterogeneous topological structures, but it is largely absent when comparing synthetic random hypergraphs to their rewired counterparts.

0.15