messengers
This repository contains all the code and resources accompanying the paper titled "Messengers: Breaking Echo Chambers in Collective Opinion Dynamics with Homophily"
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.5%) to scientific vocabulary
Keywords
Repository
This repository contains all the code and resources accompanying the paper titled "Messengers: Breaking Echo Chambers in Collective Opinion Dynamics with Homophily"
Basic Info
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md

Messengers: Breaking Echo Chambers in Collective Opinion Dynamics with Homophily
This repository contains all the code and resources accompanying the paper titled "Messengers: Breaking Echo Chambers in Collective Opinion Dynamics with Homophily." The preprint of the paper is available on arXiv here.
Table of Contents
- Overview
- Paper Abstract
- Contents
- Codes for Paper
- Python Codes <!---
- Matlab Codes
- Julia Codes -->
- Data Availability
- Getting Started
- License
- Contact
- Citation
Overview
In the paper, we study the effect of homophily in collective opinion dynamics with spatial embedding and show that echo chambers emerge in low connectivity regimes. We also introduce Messenger as a solution to break echo chambers. This repository provides all necessary codes to replicate our study, including simulation, post-processing, and visualization scripts.
Paper Abstract
Here is the abstract of the paper: Collective estimation is a variant of collective decision-making, where agents need to achieve consensus on a continuous quantity in a self-organized fashion via social interactions. A particularly challenging scenario is a fully distributed collective estimation with strongly constrained, dynamical interaction networks, for example, encountered in real physical space. In such cases, agents first need to explore a spatially distributed signal through movement, then reach a consensus while being able to communicate only with nearby neighbors. Collectives face several challenges in achieving precise estimation consensus, particularly due to complex behaviors emerging from the simultaneous evolution of the agents' opinions and the interaction network. While homophilic networks may facilitate collective estimation in well-connected networks, we show that disproportionate interactions with like-minded neighbors lead to the emergence of echo chambers, preventing collective consensus. Our agent-based simulation results confirm that, besides a lack of exposure to attitude-challenging opinions, seeking reaffirming information entraps agents in echo chambers. In a potential solution, agents can break free from the pull of echo chambers. We suggest an additional state where stubborn mobile agents (called Messengers) carry data and connect the disconnected clusters by physically transporting their opinions to other clusters to inform and direct the other agents. However, an agent requires a switching mechanism to determine which state to adopt. We propose a generic, novel approach based on a Dichotomous Markov Process (DMP). We show that a wide range of collective behaviors arise from the DMP. We study a continuum between task specialization with no switching (full-time Messengers), generalization with slow switching (part-time Messengers), and rapid task switching (short-time Messengers). Our results show that stubborn agents can, in various ways, help the collective escape local minima, break the echo chambers, and promote consensus in collective opinion dynamics.
Contents
You can find all the codes we used to generate the data from the agent-based simulations, and to post-process and visualize the figures of the paper in the codes for paper folder. We also provided separate codes for single agent-based simulation in 3 different programming languages to enhance the accessibility of the simulations. We originally developed the code in Matlab, and a 1-dimensional case in Julia. We are developing a recent translation of the codes in Python.
Python Codes
This folder contains the codes to run a sample simulation of the model in Python. For further information on how to set up the environment, please check the readme.md file in the folder.
Codes for Paper
Please find them in the codesforpaper folder. The folder contains all the codes we used to generate the data, postprocess them, and visualize them in figures of the paper. Apart from the sample experiments with animation of the result, you can find the codes we used to do the parameter scan.
Data Availability
The datasets generated and analyzed during the current study are available in this repository. This dataset is needed to regenerate the figures of the paper. When you download the file, you can find a brief instruction on how to visualize the main result (Figure 5) in the readme.md file.
Getting Started
Matlab codes: you just need to run them on a proper version of Matlab. The current version of the codes run on Version 2023.a - 2024.a. It is not likely, but other versions might need slight adjustments.
Python codes: are provided with a test code, environment requirements.txt file, and a Docker image file. Please
License
GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
Copyright (C) 2024 Mohsen Raoufi
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Contact
For any questions, issues, or suggestions, please feel free to reach out to me. We appreciate your feedback and contributions!
Citation
If you use this software and the dataset in your research, please cite our work as following:
[1] Raoufi, M., Hamann, H., & Romanczuk, P. (2024). Messengers: Breaking Echo Chambers in Collective Opinion Dynamics with Homophily. arXiv preprint arXiv:2406.06440.
[2] Raoufi, M., Hamann, H., & Romanczuk, P. (2024). Simulation Dataset: Breaking Echo Chambers in Collective Opinion Dynamics with Homophily.
bibTex format:
``` @article{raoufi2024messengers, title={Messengers: Breaking Echo Chambers in Collective Opinion Dynamics with Homophily}, author={Raoufi, Mohsen and Hamann, Heiko and Romanczuk, Pawel}, journal={arXiv preprint arXiv:2406.06440}, year={2024} }
@article{raoufi2024simulation, title={Simulation Dataset: Breaking Echo Chambers in Collective Opinion Dynamics with Homophily}, author={Raoufi, Mohsen and Hamann, Heiko and Romanczuk, Pawel}, year={2024} } ```
Owner
- Name: Mohsen
- Login: mohsen-raoufi
- Kind: user
- Location: Berlin, Germany
- Company: Science of Intelligence
- Website: https://raoufimohsen.wordpress.com/
- Repositories: 7
- Profile: https://github.com/mohsen-raoufi
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this simulation, please cite it as below." authors: - family-names: "Raoufi" given-names: "Mohsen" orcid: "https://orcid.org/0000-0002-8637-7436" - family-names: "Hamann" given-names: "Heiko" orcid: "https://orcid.org/0000-0002-2458-8289" - family-names: "Romanczuk" given-names: "Pawel" orcid: "https://orcid.org/0000-0002-4733-998X" title: "Messengers: Breaking Echo Chambers in Collective Opinion Dynamics with Homophily" version: 2.0.0 doi: 10.48550/arXiv.2406.06440 date-released: 2023-08-07 url: "https://github.com/mohsen-raoufi/messengers" # preferred-citation: # type: article # authors: # - family-names: "Raoufi" # given-names: "Mohsen" # orcid: "https://orcid.org/0000-0002-8637-7436" # - family-names: "Hamann" # given-names: "Heiko" # orcid: "https://orcid.org/0000-0002-2458-8289" # - family-names: "Romanczuk" # given-names: "Pawel" # orcid: "https://orcid.org/0000-0002-4733-998X" # doi: 10.48550/arXiv.2406.06440 # journal: "arXiv preprint arXiv:2406.06440" # title: "Messengers: Breaking Echo Chambers in Collective Opinion Dynamics with Homophily" # year: 2024
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1