Synthetic Networks Or Generative Models)

Total Page:16

File Type:pdf, Size:1020Kb

Synthetic Networks Or Generative Models) Models of networks (synthetic networks or generative models) Prof. Ralucca Gera, Applied Mathematics Dept. Naval Postgraduate School Monterey, California [email protected] Excellence Through Knowledge Learning Outcomes • Identify network models and explain their structures; • Contrast networks and synthetic models; • Understand how to design new network models (based on the existing ones and on the collected data) • Distinguish methodologies used in analyzing networks. The three papers for each of the models Synthetic models are used as reference/null models to compare against and build new complex networks •“On Random Graphs I” by Paul Erdős and Alfed Renyi in Publicationes Mathematicae (1958) Times cited: 3, 517 (as of January 1, 2015) •“Collective dynamics of ‘small-world’ networks” by Duncan Watts and Steve Strogatz in Nature, (1998) Times cited: 24, 535 (as of January 1, 2015) •“Emergence of scaling in random networks” by László Barabási and Réka Albert in Science, (1999) Times cited: 21, 418 (as of January 1, 2015) 3 Why care? • Epidemiology: – A virus propagates much faster in scale-free networks. – Vaccination of random nodes in scale free does not work, but targeted vaccination is very effective • Create synthetic networks to be used as null models: – What effect does the degree distribution alone have on the behavior of the system? (answered by comparing to the configuration model) • Create networks of different sizes – Networks of particular sizes and structures can be quickly and cheaply generated, instead of collecting and cleaning the data that takes time Erdős-Rényi Random Graphs (1959) 5 Random graphs (Erdős-Rényi , 1959) ERmodel : creates at random with fixed parameters • G(n, m): fix n (node count) and m (edge count) • G(n,p): fix n and probability p of the edge existence between vertices (m is not fixed) – The mean value of edges is ⋅ 2 – The average degree is 1 – The distribution of finding a node of degree is binomial: 1 1 • NetworkX has synthetic models and classes 6 Creating G(n,m) – method 1 • To make a random network : – take n nodes, – m unlabeled edges randomly placed between the n vertices • Put the graph in a box, make another one and put it in the box, and another one… • Pull one network at random out of the box and it will have a Normal Degree Distribution (classic degree distribution): almost everyone has the same number of friends on average 7 Creating G(n,m) – method 2 Method two and equivalent to the first: • To make a random network : – take n nodes, – m pairs of nodes at random to form edges, – place the edges between the randomly chosen nodes. • The average degree: , where is often used to denote the degree of vertex i in complex networks (enumerate the vertices, 1, 2, …) 8 Creating G(n,p) • To create a random network : – take n nodes, – A fixed probability for the whole graph – Attach edges at random to the nodes, with the probability p 9 Degree distribution for both for , and , Results about E-R graphs: • Degree distribution: Binomial • Average path is small compared to n: , where is the average degree – Comparable to the of the observed networks • Clustering coefficient is small: (The probability that two neighbors of a node are connected is equal to the probability of any two random nodes being connected) – However observed networks have high clustering.10 Generating Erdős-Rényi ER(n,p) • ER graphs are models of a network in which some specific set of parameters take fixed values, but the construction of the network is random (see below in Gephi) 11 Generating Erdős-Rényi ER(n,m) 12 Generating Erdős-Rényi random networks Reference for python: http://networkx.lanl.gov/reference/generated/networkx.generators.random_graphs.erdos_renyi_graph.html#networkx.generators.random_graphs.erdos_renyi_graph 13 The Random Geometric model 14 Random Geometric Model • Again the connections are created at random, but based on proximity (such as ad hoc networks) • Proximity is relevant: for each node , the edge is created with a probability if , for given fixed distance r. • There is no perfect model for the world around us, not even for specific types of networks 15 An example of a random geometric 16 https://www.youtube.com/watch?v=NUisb1-INIE Creating it in Python https://networkx.github.io/documentation/networkx- 1.10/reference/generated/networkx.generators.geometric.random_geometric_graph.html#networkx.generators.geometric.random_geometric_graph 17 The Malloy Reed Configuration model (1995) 18 The configuration model •A random graph model created based on Degree sequence of choice (can be scale free) • Maybe more than degree sequence is needed to be controlled in order to create realistic models 19 The MR configuration model • A random graph model created based on a degree sequence of choice: 4, 3, 2, 2, 2, 1, 1, 1 Step 1: Step 2: Or this step 2: 20 Mathematical properties •Let and be two nodes. • Expectation of to be an edge : – Pick an edge out of the m edges in G: the probability that the left end node is i is (its degree), and the probability that the right end node is j, is ), and so: p (used 2m since each edge is counted from each of its two ends) • Expectation of a multi edge – Given that ∈ ,then the probability that it will be an edge again is p , and so the probability of both happening is p which simplifies to: 21 Mathematical properties (parallel edges) ∑ Average degree: , and … ∑ the average of their squares: . Then, the expected number of parallel edges is: 22 http://tuvalu.santafe.edu/~aaronc/courses/5352/csci5352_2017_L4.pdf Mathematical properties (loops) 1. Recall that for parallel edges, Thus the expectation of a loop one edge of node has been used 2. And the equation on the previous page simplifies to the expected number of loops being Conclusion: Since the variables in the equation in 2. above are constant with respect to the size of the network, only a small fraction of edges are loops or parallel edges 23 http://tuvalu.santafe.edu/~aaronc/courses/5352/csci5352_2017_L4.pdf Generating it in Python https://networkx.github.io/documentation/networkx-1.10/reference/generated/networkx.generators.degree_seq.configuration_model.html 24 Let’s practice in CoCalc 25 Create ER networks 26 Main References • Newman “The structure and function of complex networks” (2003) • Estrada “The structure of complex Networks” (2012) • Barabasi “Network Science” (online: http://barabasi.com/networksciencebook/) • References to the classes that exist in python: http://networkx.lanl.gov/reference/generators.html 27.
Recommended publications
  • Sagemath and Sagemathcloud
    Viviane Pons Ma^ıtrede conf´erence,Universit´eParis-Sud Orsay [email protected] { @PyViv SageMath and SageMathCloud Introduction SageMath SageMath is a free open source mathematics software I Created in 2005 by William Stein. I http://www.sagemath.org/ I Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 2 / 7 SageMath Source and language I the main language of Sage is python (but there are many other source languages: cython, C, C++, fortran) I the source is distributed under the GPL licence. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 3 / 7 SageMath Sage and libraries One of the original purpose of Sage was to put together the many existent open source mathematics software programs: Atlas, GAP, GMP, Linbox, Maxima, MPFR, PARI/GP, NetworkX, NTL, Numpy/Scipy, Singular, Symmetrica,... Sage is all-inclusive: it installs all those libraries and gives you a common python-based interface to work on them. On top of it is the python / cython Sage library it-self. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 4 / 7 SageMath Sage and libraries I You can use a library explicitly: sage: n = gap(20062006) sage: type(n) <c l a s s 'sage. interfaces .gap.GapElement'> sage: n.Factors() [ 2, 17, 59, 73, 137 ] I But also, many of Sage computation are done through those libraries without necessarily telling you: sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage : G . g a p () Group( [ (3,4), (1,2,3)(4,5) ] ) Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 5 / 7 SageMath Development model Development model I Sage is developed by researchers for researchers: the original philosophy is to develop what you need for your research and share it with the community.
    [Show full text]
  • Networkx Tutorial
    5.03.2020 tutorial NetworkX tutorial Source: https://github.com/networkx/notebooks (https://github.com/networkx/notebooks) Minor corrections: JS, 27.02.2019 Creating a graph Create an empty graph with no nodes and no edges. In [1]: import networkx as nx In [2]: G = nx.Graph() By definition, a Graph is a collection of nodes (vertices) along with identified pairs of nodes (called edges, links, etc). In NetworkX, nodes can be any hashable object e.g. a text string, an image, an XML object, another Graph, a customized node object, etc. (Note: Python's None object should not be used as a node as it determines whether optional function arguments have been assigned in many functions.) Nodes The graph G can be grown in several ways. NetworkX includes many graph generator functions and facilities to read and write graphs in many formats. To get started though we'll look at simple manipulations. You can add one node at a time, In [3]: G.add_node(1) add a list of nodes, In [4]: G.add_nodes_from([2, 3]) or add any nbunch of nodes. An nbunch is any iterable container of nodes that is not itself a node in the graph. (e.g. a list, set, graph, file, etc..) In [5]: H = nx.path_graph(10) file:///home/szwabin/Dropbox/Praca/Zajecia/Diffusion/Lectures/1_intro/networkx_tutorial/tutorial.html 1/18 5.03.2020 tutorial In [6]: G.add_nodes_from(H) Note that G now contains the nodes of H as nodes of G. In contrast, you could use the graph H as a node in G.
    [Show full text]
  • Networkx: Network Analysis with Python
    NetworkX: Network Analysis with Python Salvatore Scellato Full tutorial presented at the XXX SunBelt Conference “NetworkX introduction: Hacking social networks using the Python programming language” by Aric Hagberg & Drew Conway Outline 1. Introduction to NetworkX 2. Getting started with Python and NetworkX 3. Basic network analysis 4. Writing your own code 5. You are ready for your project! 1. Introduction to NetworkX. Introduction to NetworkX - network analysis Vast amounts of network data are being generated and collected • Sociology: web pages, mobile phones, social networks • Technology: Internet routers, vehicular flows, power grids How can we analyze this networks? Introduction to NetworkX - Python awesomeness Introduction to NetworkX “Python package for the creation, manipulation and study of the structure, dynamics and functions of complex networks.” • Data structures for representing many types of networks, or graphs • Nodes can be any (hashable) Python object, edges can contain arbitrary data • Flexibility ideal for representing networks found in many different fields • Easy to install on multiple platforms • Online up-to-date documentation • First public release in April 2005 Introduction to NetworkX - design requirements • Tool to study the structure and dynamics of social, biological, and infrastructure networks • Ease-of-use and rapid development in a collaborative, multidisciplinary environment • Easy to learn, easy to teach • Open-source tool base that can easily grow in a multidisciplinary environment with non-expert users
    [Show full text]
  • Introduction to Network Science & Visualisation
    IFC – Bank Indonesia International Workshop and Seminar on “Big Data for Central Bank Policies / Building Pathways for Policy Making with Big Data” Bali, Indonesia, 23-26 July 2018 Introduction to network science & visualisation1 Kimmo Soramäki, Financial Network Analytics 1 This presentation was prepared for the meeting. The views expressed are those of the author and do not necessarily reflect the views of the BIS, the IFC or the central banks and other institutions represented at the meeting. FNA FNA Introduction to Network Science & Visualization I Dr. Kimmo Soramäki Founder & CEO, FNA www.fna.fi Agenda Network Science ● Introduction ● Key concepts Exposure Networks ● OTC Derivatives ● CCP Interconnectedness Correlation Networks ● Housing Bubble and Crisis ● US Presidential Election Network Science and Graphs Analytics Is already powering the best known AI applications Knowledge Social Product Economic Knowledge Payment Graph Graph Graph Graph Graph Graph Network Science and Graphs Analytics “Goldman Sachs takes a DIY approach to graph analytics” For enhanced compliance and fraud detection (www.TechTarget.com, Mar 2015). “PayPal relies on graph techniques to perform sophisticated fraud detection” Saving them more than $700 million and enabling them to perform predictive fraud analysis, according to the IDC (www.globalbankingandfinance.com, Jan 2016) "Network diagnostics .. may displace atomised metrics such as VaR” Regulators are increasing using network science for financial stability analysis. (Andy Haldane, Bank of England Executive
    [Show full text]
  • Graph Database Fundamental Services
    Bachelor Project Czech Technical University in Prague Faculty of Electrical Engineering F3 Department of Cybernetics Graph Database Fundamental Services Tomáš Roun Supervisor: RNDr. Marko Genyk-Berezovskyj Field of study: Open Informatics Subfield: Computer and Informatic Science May 2018 ii Acknowledgements Declaration I would like to thank my advisor RNDr. I declare that the presented work was de- Marko Genyk-Berezovskyj for his guid- veloped independently and that I have ance and advice. I would also like to thank listed all sources of information used Sergej Kurbanov and Herbert Ullrich for within it in accordance with the methodi- their help and contributions to the project. cal instructions for observing the ethical Special thanks go to my family for their principles in the preparation of university never-ending support. theses. Prague, date ............................ ........................................... signature iii Abstract Abstrakt The goal of this thesis is to provide an Cílem této práce je vyvinout webovou easy-to-use web service offering a database službu nabízející databázi neorientova- of undirected graphs that can be searched ných grafů, kterou bude možno efektivně based on the graph properties. In addi- prohledávat na základě vlastností grafů. tion, it should also allow to compute prop- Tato služba zároveň umožní vypočítávat erties of user-supplied graphs with the grafové vlastnosti pro grafy zadané uži- help graph libraries and generate graph vatelem s pomocí grafových knihoven a images. Last but not least, we implement zobrazovat obrázky grafů. V neposlední a system that allows bulk adding of new řadě je také cílem navrhnout systém na graphs to the database and computing hromadné přidávání grafů do databáze a their properties.
    [Show full text]
  • Evolving Networks and Social Network Analysis Methods And
    DOI: 10.5772/intechopen.79041 ProvisionalChapter chapter 7 Evolving Networks andand SocialSocial NetworkNetwork AnalysisAnalysis Methods and Techniques Mário Cordeiro, Rui P. Sarmento,Sarmento, PavelPavel BrazdilBrazdil andand João Gama Additional information isis available atat thethe endend ofof thethe chapterchapter http://dx.doi.org/10.5772/intechopen.79041 Abstract Evolving networks by definition are networks that change as a function of time. They are a natural extension of network science since almost all real-world networks evolve over time, either by adding or by removing nodes or links over time: elementary actor-level network measures like network centrality change as a function of time, popularity and influence of individuals grow or fade depending on processes, and events occur in net- works during time intervals. Other problems such as network-level statistics computation, link prediction, community detection, and visualization gain additional research impor- tance when applied to dynamic online social networks (OSNs). Due to their temporal dimension, rapid growth of users, velocity of changes in networks, and amount of data that these OSNs generate, effective and efficient methods and techniques for small static networks are now required to scale and deal with the temporal dimension in case of streaming settings. This chapter reviews the state of the art in selected aspects of evolving social networks presenting open research challenges related to OSNs. The challenges suggest that significant further research is required in evolving social networks, i.e., existent methods, techniques, and algorithms must be rethought and designed toward incremental and dynamic versions that allow the efficient analysis of evolving networks. Keywords: evolving networks, social network analysis 1.
    [Show full text]
  • Network Science, Homophily and Who Reviews Who in the Linux Kernel? Working Paper[+] › Open-Access at ECIS2020-Arxiv.Pdf
    Network Science, Homophily and Who Reviews Who in the Linux Kernel? Working paper[P] Open-access at http://users.abo.fi/jteixeir/pub/linuxsna/ ECIS2020-arxiv.pdf José Apolinário Teixeira Åbo Akademi University Finland # jteixeira@abo. Ville Leppänen University of Turku Finland Sami Hyrynsalmi arXiv:2106.09329v1 [cs.SE] 17 Jun 2021 LUT University Finland [P]As presented at 2020 European Conference on Information Systems (ECIS 2020), held Online, June 15-17, 2020. The ocial conference proceedings are available at the AIS eLibrary (https://aisel.aisnet.org/ecis2020_rp/). Page ii of 24 ? Copyright notice ? The copyright is held by the authors. The same article is available at the AIS Electronic Library (AISeL) with permission from the authors (see https://aisel.aisnet.org/ ecis2020_rp/). The Association for Information Systems (AIS) can publish and repro- duce this article as part of the Proceedings of the European Conference on Information Systems (ECIS 2020). ? Archiving information ? The article was self-archived by the rst author at its own personal website http:// users.abo.fi/jteixeir/pub/linuxsna/ECIS2020-arxiv.pdf dur- ing June 2021 after the work was presented at the 28th European Conference on Informa- tion Systems (ECIS 2020). Page iii of 24 ð Funding and Acknowledgements ð The rst author’s eorts were partially nanced by Liikesivistysrahasto - the Finnish Foundation for Economic Education, the Academy of Finland via the DiWIL project (see http://abo./diwil) project. A research companion website at http://users.abo./jteixeir/ECIS2020cw supports the paper with additional methodological details, additional data visualizations (plots, tables, and networks), as well as high-resolution versions of the gures embedded in the paper.
    [Show full text]
  • Network Science
    This is a preprint of Katy Börner, Soma Sanyal and Alessandro Vespignani (2007) Network Science. In Blaise Cronin (Ed) Annual Review of Information Science & Technology, Volume 41. Medford, NJ: Information Today, Inc./American Society for Information Science and Technology, chapter 12, pp. 537-607. Network Science Katy Börner School of Library and Information Science, Indiana University, Bloomington, IN 47405, USA [email protected] Soma Sanyal School of Library and Information Science, Indiana University, Bloomington, IN 47405, USA [email protected] Alessandro Vespignani School of Informatics, Indiana University, Bloomington, IN 47406, USA [email protected] 1. Introduction.............................................................................................................................................2 2. Notions and Notations.............................................................................................................................4 2.1 Graphs and Subgraphs .........................................................................................................................5 2.2 Graph Connectivity..............................................................................................................................7 3. Network Sampling ..................................................................................................................................9 4. Network Measurements........................................................................................................................11
    [Show full text]
  • Networkx Reference Release 1.9.1
    NetworkX Reference Release 1.9.1 Aric Hagberg, Dan Schult, Pieter Swart September 20, 2014 CONTENTS 1 Overview 1 1.1 Who uses NetworkX?..........................................1 1.2 Goals...................................................1 1.3 The Python programming language...................................1 1.4 Free software...............................................2 1.5 History..................................................2 2 Introduction 3 2.1 NetworkX Basics.............................................3 2.2 Nodes and Edges.............................................4 3 Graph types 9 3.1 Which graph class should I use?.....................................9 3.2 Basic graph types.............................................9 4 Algorithms 127 4.1 Approximation.............................................. 127 4.2 Assortativity............................................... 132 4.3 Bipartite................................................. 141 4.4 Blockmodeling.............................................. 161 4.5 Boundary................................................. 162 4.6 Centrality................................................. 163 4.7 Chordal.................................................. 184 4.8 Clique.................................................. 187 4.9 Clustering................................................ 190 4.10 Communities............................................... 193 4.11 Components............................................... 194 4.12 Connectivity..............................................
    [Show full text]
  • Exploring Network Structure, Dynamics, and Function Using Networkx
    Proceedings of the 7th Python in Science Conference (SciPy 2008) Exploring Network Structure, Dynamics, and Function using NetworkX Aric A. Hagberg ([email protected])– Los Alamos National Laboratory, Los Alamos, New Mexico USA Daniel A. Schult ([email protected])– Colgate University, Hamilton, NY USA Pieter J. Swart ([email protected])– Los Alamos National Laboratory, Los Alamos, New Mexico USA NetworkX is a Python language package for explo- and algorithms, to rapidly test new hypotheses and ration and analysis of networks and network algo- models, and to teach the theory of networks. rithms. The core package provides data structures The structure of a network, or graph, is encoded in the for representing many types of networks, or graphs, edges (connections, links, ties, arcs, bonds) between including simple graphs, directed graphs, and graphs nodes (vertices, sites, actors). NetworkX provides ba- with parallel edges and self-loops. The nodes in Net- sic network data structures for the representation of workX graphs can be any (hashable) Python object simple graphs, directed graphs, and graphs with self- and edges can contain arbitrary data; this flexibil- loops and parallel edges. It allows (almost) arbitrary ity makes NetworkX ideal for representing networks objects as nodes and can associate arbitrary objects to found in many different scientific fields. edges. This is a powerful advantage; the network struc- In addition to the basic data structures many graph ture can be integrated with custom objects and data algorithms are implemented for calculating network structures, complementing any pre-existing code and properties and structure measures: shortest paths, allowing network analysis in any application setting betweenness centrality, clustering, and degree dis- without significant software development.
    [Show full text]
  • Deep Generative Modeling in Network Science with Applications to Public Policy Research
    Working Paper Deep Generative Modeling in Network Science with Applications to Public Policy Research Gavin S. Hartnett, Raffaele Vardavas, Lawrence Baker, Michael Chaykowsky, C. Ben Gibson, Federico Girosi, David Kennedy, and Osonde Osoba RAND Health Care WR-A843-1 September 2020 RAND working papers are intended to share researchers’ latest findings and to solicit informal peer review. They have been approved for circulation by RAND Health Care but have not been formally edted. Unless otherwise indicated, working papers can be quoted and cited without permission of the author, provided the source is clearly referred to as a working paper. RAND’s R publications do not necessarily reflect the opinions of its research clients and sponsors. ® is a registered trademark. CORPORATION For more information on this publication, visit www.rand.org/pubs/working_papers/WRA843-1.html Published by the RAND Corporation, Santa Monica, Calif. © Copyright 2020 RAND Corporation R® is a registered trademark Limited Print and Electronic Distribution Rights This document and trademark(s) contained herein are protected by law. This representation of RAND intellectual property is provided for noncommercial use only. Unauthorized posting of this publication online is prohibited. Permission is given to duplicate this document for personal use only, as long as it is unaltered and complete. Permission is required from RAND to reproduce, or reuse in another form, any of its research documents for commercial use. For information on reprint and linking permissions, please visit www.rand.org/pubs/permissions.html. The RAND Corporation is a research organization that develops solutions to public policy challenges to help make communities throughout the world safer and more secure, healthier and more prosperous.
    [Show full text]
  • Supply Network Science: Emergence of a New Perspective on a Classical Field
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Apollo Supply network science: emergence of a new perspective on a classical field Alexandra Brintrup*, Anna Ledwoch Institute for Manufacturing, Department for Engineering, University of Cambridge, Charles Babbage Road, CB1 3DD, Cambridge *[email protected] Abstract Supply networks emerge as companies procure goods from one another to produce their own products. Due to a chronic lack of data, studies on these emergent structures have long focussed on local neighbourhoods, assuming simple, chain like structures. However studies conducted since 2001 have shown that supply chains are indeed complex networks that exhibit similar organisational patterns to other network types. In this paper, we present a critical review of theoretical and model based studies which conceptualise supply chains from a network science perspective, showing that empirical data does not always support theoretical models that were developed, and argue that different industrial settings may present different characteristics. Consequently, a need that arises is the development and reconciliation of interpretation across different supply network layers such as contractual relations, material flow, financial links, and co-patenting, as these different projections tend to remain in disciplinary siloes. Other gaps include a lack of null models that show whether observed properties are meaningful, a lack of dynamical models that can inform how layers evolve and adopt to changes, and a lack of studies that investigate how local decisions enable emergent outcomes. We conclude by asking the network science community to help bridge these gaps by engaging with this important area of research.
    [Show full text]