by Giulio Rossetti (ISTI-CNR), Letizia Milli (University of Pisa) and Salvatore Rinzivillo (ISTI-CNR)  

Analysing the dynamics of and on networks is currently a hot topic in social network analysis. To support students, teachers, developers and researchers in this work, we have developed a novel framework, namely NDlib, an environment designed to describe diffusion simulations. NDlib is designed to be a multi-level ecosystem that can be fruitfully used by different user segments.

The analysis of diffusive phenomena unfolding on top of complex networks is a task attracting growing interest from multiple fields of research. Diffusive phenomena include things like epidemics, gossip and innovations, all of which can be considered “contents” that spread among individuals interacting in a social group. Several mathematical models have been designed to study and analyse spreading phenomena, to capture and anticipate real-world patterns.

A few analytical platforms, which typically focus on a narrow set of classic models, have tried to offer out-of-the-box solutions to analysts and researchers. However, such tools are often characterised by complex interfaces that mean they are not user-friendly for non-technical audiences. The background heterogeneity of the specialists interested in analysing diffusive phenomena (ranging from students to social scientists and researchers) underlines the need for a more general framework that can abstract technicality, to scale, to big data sources and to allow flexible model selection and definition. Currently, only a few of these projects are still active (the main ones being nepidemix [1], for Python, and EpiModel [2], for R). The major issues raised by such tools are:

  • steep learning curves: existing models are designed by technicians for technicians. They rarely offer abstract/visual interfaces that make them usable by non-programmers;
  • a reduced number of implemented models: all existing tools implement classic models (SI/SIR/SIS) almost exclusively, completely ignoring recent ones;
  • novel model design complexity: custom model design is not always supported, or it requires a deep understanding of tool internals;
  • narrow use cases: all available tools are designed to support quantitative research. They are not easily adaptable as training material or as analytical tools due to the very specific audience they are designed for and the underlying programming proficiency they require.

To address such issues, we designed an analytical ecosystem that will allow the widest possible audience to create and perform diffusion-related experiments. At the core of our project stands NDlib (Network Diffusion Library [3]), a python package we designed to model diffusive phenomena.

NDlib represents a multi-level solution to simulate the spread of epidemics. We organised the library in three incremental modules: the NDlib core library (written in Python), a remote RESTful experiment server accessible through API calls and, finally, a web-oriented visual interface.

At the core of our tool, is NDlib, a Python package built upon the network facilities offered by NetworkX and iGraph. NDlib models diffusive phenomena as discrete-time agent-based processes. It implements several epidemics and opinion dynamics models (around 20) and allows its users to design novel ones. To allow the user to easily analyse simulation evolution, NDlib also exposes a set of visual facilities. The initial set of infected nodes has a relevant impact on how a diffusive process unfolds. For this reason, with a single line of code, NDlib allows execution to occur several times in parallel: the simulation of the same model over a given network topology while varying the initial infection status. All the diffusion models implemented in NDlib extend the same template, which makes it easy to extend the NDlib library.

As with classical analytical tools, the simulation facilities offered by NDlib are specifically designed for users who want to run experiments on their local machine. However, in some scenarios—e.g., due to limited computational resources or to other needs arising—it may be convenient to separate the machine on which the definition of the experiment is made from the one that actually executes the simulation. To satisfy such needs, we developed a RESTful service, NDlib-REST, that builds upon NDlib with an experiment server, queryable through API calls.
Finally, upon the NDlib-REST service is a visualisation platform. NDlib-Viz ([L1], Figure 1) aims to allow non-technicians to design, configure and run epidemic simulations, thus removing the barriers introduced by the usual requirements of programming language knowledge. Indeed, apart from the usual research-oriented audience, we developed NDlib-Viz to support students and facilitate teachers to introduce epidemic models: in order to better support the educational nature of the proposed platform and collect user feedback, we currently employ NDlib-Viz in a Social Analysis course of the Computer Science Master Degree at the University of Pisa, Italy. The platform itself is a web application: it can be executed on a local as well as on a remote Ndlib-REST installation.

Figure 1: Web platform. The appearance of the NDlib visualisation framework during a simulation.
Figure 1: Web platform. The appearance of the NDlib visualisation framework during a simulation.

The proposed library aims to provide a reasonable trade-off between ease of use and efficiency. NDlib is released as free software under a BSD-2-Clause license and the NDlib project is hosted on GitHub ([L2]), documented on ReadTheDocs ([L3]) and shipped through Pypi ([L4]). For advertising purposes, we released a promo video hosted on YouTube ([L5]).
Finally, NDlib is also indexed in the SoBigData catalogue ([L6]). SoBigData is an EU H2020 project that promotes the integration of already existing software infrastructures.

Links:
[L1] https://goo.gl/tYi48o
[L2] https://github.com/GiulioRossetti/ndlib, https://github.com/GiulioRossetti/ndlib-rest
[L3] http://ndlib.readthedocs.io/
[L4] https://pypi.python.org/pypi/ndlib/
[L5] https://youtu.be/tYHNOuKJwbE
[L6] http://www.sobigdata.eu

References:
[1] L. Ahrenberg, et al.: NepidemiX. Technical report, 2016.
[2] S. Jenness, S.M. Goodreau, M. Morris: “Epimodel: Mathematical modeling of infectious disease”, package version 1.3.0., 2017. http://www.epimodel.org
[3] G. Rossetti, et al.: “NDlib: a python library to model and analyze diffusion processes over complex networks”, International Journal of Data Science and Analytics, 5(1), 61-79.

Please contact:
Letizia Milli, University of Pisa, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.

 



Next issue: April 2021
Special theme:
"Brain-Inspired Computing"
Call for the next issue
Image ERCIM News 124
This issue in pdf
Image ERCIM News 124 epub
This issue in ePub format

Get the latest issue to your desktop
RSS Feed