Bachelor's thesis · 2025

Opinion Dynamics in Social Networks with Community Structure

Studying how community structure shapes consensus, polarization, and fragmentation in simulated social networks.

Authors

Giovanni Guidarini
Matteo Faverio

Supervisor

Prof. Carlo Piccardi

Degree

BSc Mathematical Engineering
Politecnico di Milano · 2024–2025

Overview

This bachelor thesis studies how the community structure of a social network affects the evolution of its users' opinions. We generated synthetic networks with the Lancichinetti–Fortunato–Radicchi (LFR) benchmark and simulated opinion updates with a weighted Hegselmann–Krause model, in which agents interact within a bounded confidence range and influence is tied to network structure.

The experiments were implemented in MATLAB. We generated 2,000 networks across ten levels of community mixing and ran 50,000 simulations across different confidence thresholds. We then examined the final number of opinion clusters, outliers, opinion distributions within communities, and the iterations needed for convergence.

Stronger community structure widened the range of conditions that produced fragmented opinions and sharply narrowed the intermediate polarization regime. In the simulations, highly separated communities could move from fragmentation to consensus without a broad polarization phase. Global polarization, when present, was also reflected within individual communities. These findings describe the simplified model used in the thesis, rather than observed behavior in real social networks.