CODE – Coupling Opinion Dynamics with Epidemics
- Project Code: P2022AKRZ9
- Project start and end date: 30/11/2023 – 29/11/2025
- Extension date: 28/02/2026
- Funding source: MUR Call for Proposal n. 1409/2022 – NRRP – Next Generation EU, Mission 4 Component 2 Investment 1.1 – ‘Fund for the National Research Programme and Projects of Significant National Interest (PRIN)
- CUP: F53D23009210001
- CREF Funding amount: 32.591,00 €
CREF Unit Leader
Participating research units
- CNR: Stefano Guarino (PI, IAC-CNR, Rome); Francesca Colaiori (ISC-CNR, Rome); Sandro Meloni (assegnista di ricerca; IAC-CNR, Rome)
- Politecnico di Milano: Marco Brambilla (responsabile di unità); Carlo Piccardi; Francesco Pierri; Fabio Mazza (assegnista di ricerca)
- CREF: Fabio Saracco
Results achieved
The CODE project investigated the interplay between epidemic spreading, information dynamics, and human behavior, focusing on how community structure shapes both social and epidemiological processes. The project was based on the observation that populations naturally divide into groups sharing similar beliefs, information sources, and behavioral attitudes, providing a common framework for modeling epidemics, opinion dynamics, and online interactions.
Research activities followed three main directions. First, we developed network models for generating synthetic populations with controlled community structure. The Random Hyperbolic Block Model enables independent tuning of clustering, degree heterogeneity, and community mixing, while the Urban Social Network model builds realistic contact networks from demographic and geographic data.
Second, we designed epidemic and opinion-dynamics models that capture key mechanisms while remaining sufficiently simple for systematic analysis. These models were implemented in an open-source computational toolbox, one of the project’s main deliverables, providing a unified platform for exploring data-informed epidemic scenarios.
Third, we analyzed simplified theoretical models to identify the mechanisms governing epidemic dynamics. Multitype epidemic models highlighted the combined effects of susceptibility, infectivity, and group mixing, while simulations on realistic urban networks revealed significant spatial heterogeneities. A vaccination model with waning immunity provided a reference framework for studying optimal vaccination strategies.
In parallel, we developed data-driven methods to identify ideological communities from online interactions and released social media datasets covering the COVID-19 pandemic. These resources support the calibration of realistic mixing patterns and future studies of polarization and community evolution.
Overall, CODE demonstrates that realistic epidemic modeling requires integrating social structure and epidemic dynamics within a unified, data-informed framework.
Scientific publications
[1] Stefano Guarino, Ayoub Mounim, Guido Caldarelli, Fabio Saracco, Leveraging content producer networks and user perception to detect online discursive communities, Sci. Rep. (2026)
[2] Stefano Guarino, Enrico Mastrostefano, and Davide Torre. Random hyperbolic graphs with arbitrary mesoscale structures. Phys. Rev. E, 112:054310, Nov 2025.
[3] Fabio Mazza, Marco Brambilla, Carlo Piccardi, and Francesco Pierri. A data-driven analysis of the impact of non-compliant individuals on epidemic diffusion in urban settings. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences, 481(2324):20250511, 10 2025.
[4] Alessandro Celestini, Francesca Colaiori, Stefano Guarino, Enrico Mastrostefano, Francesca Pelusi, and Lena Rebecca Zastrow. When to boost: How dose timing determines the epidemic threshold. Phys. Rev. Res., 7:033125, Aug 2025.
[5] Zachary P. Neal, Annabell Cadieux, Diego Garlaschelli, Nicholas J. Gotelli, Fabio Saracco, Tiziano Squartini, Shade T. Shutters, Werner Ulrich, Guanyang Wang, and Giovanni Strona. Pattern detection in bipartite networks: A review of terminology, applications, and methods. PLOS Complex Systems, 1(2):1–34, 10 2024.
[6] Manuel Pratelli, Fabio Saracco, and Marinella Petrocchi. Entropy-based detection of twitter echo chambers. PNAS Nexus, 3(5), April 2024.
[7] Manuel Pratelli, Fabio Saracco, and Marinella Petrocchi. Unveiling news publishers trustworthiness through social interactions. In ACM Web Science Conference, Websci ’24, page 139–148. ACM, May 2024.
[8] Manuel Pratelli, Marinella Petrocchi, Fabio Saracco, and Rocco De Nicola. Online disinformation in the 2020 U.S. election: swing vs. safe states. EPJ Data Science, 13(1), March 2024.
[9] Fabio Saracco, Giovanni Petri, Renaud Lambiotte, and Tiziano Squartini. Entropy-based models to randomise real-world hypergraphs. Communications Physics, 8(1), July 2025.
[10] Anna Gallo, Fabio Saracco, and Tiziano Squartini. Statistically validated projection of bipartite signed networks. npj Complexity, 2(1), July 2025.
[11] Fabio Mazza, Francesca Colaiori, Stefano Guarino, Sandro Meloni, Marco Brambilla, Carlo Piccardi, Francesco Pierri, and Fabio Saracco. The Impact of Heterogeneity on Epidemics: Insights from a Modified SIR Model. In: Cherifi, H., Donduran, M., Rocha, L.M., Cherifi, C., Varol, O. (eds) Complex Networks & Their Applications XIII. COMPLEX NETWORKS 2024 2024. Studies in Computational Intelligence, vol 1190. Springer, Cham. (2025).
[12] Fabio Mazza, Gabriele Ricci, Francesca Colaiori, Stefano Guarino, Sandro Meloni, and Fabio Saracco, Impact of behavioral heterogeneity on epidemic outcome and its mapping into effective network topologies”, Phys. Rev. E 113, 014306.
Organized events
BeSAFE: Behavioral and Social Aspects in Fighting Epidemics
Posters, dissemination materials, outputs