17-NetworkModels

  • Upload
    dexxt0r

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

  • CS109/Stat121/AC209/E-109 Data ScienceNetwork Models

    Hanspeter Pfister & Joe [email protected] / [email protected]

    1

    5

    4 3

    2

    mailto:[email protected]:[email protected]?subject=
  • This Week HW4 due tonight at 11:59 pm Friday lab 10-11:30 am in MD G115

  • Examples from Newman (2003)I Introduction 3

    FIG. 2 Three examples of the kinds of networks that are the topic of this review. (a) A food web of predator-prey interactionsbetween species in a freshwater lake [272]. Picture courtesy of Neo Martinez and Richard Williams. (b) The network ofcollaborations between scientists at a private research institution [171]. (c) A network of sexual contacts between individualsin the study by Potterat et al. [342].

    A. Types of networks

    A set of vertices joined by edges is only the simplesttype of network; there are many ways in which networksmay be more complex than this (Fig. 3). For instance,there may be more than one different type of vertex in anetwork, or more than one different type of edge. Andvertices or edges may have a variety of properties, nu-merical or otherwise, associated with them. Taking theexample of a social network of people, the vertices mayrepresent men or women, people of different nationalities,locations, ages, incomes, or many other things. Edgesmay represent friendship, but they could also representanimosity, or professional acquaintance, or geographicalproximity. They can carry weights, representing, say,how well two people know each other. They can also bedirected, pointing in only one direction. Graphs com-posed of directed edges are themselves called directed

    graphs or sometimes digraphs, for short. A graph rep-resenting telephone calls or email messages between in-dividuals would be directed, since each message goes inonly one direction. Directed graphs can be either cyclic,meaning they contain closed loops of edges, or acyclicmeaning they do not. Some networks, such as food webs,are approximately but not perfectly acyclic.

    One can also have hyperedgesedges that join morethan two vertices together. Graphs containing such edgesare called hypergraphs. Hyperedges could be used to in-dicate family ties in a social network for examplen in-dividuals connected to each other by virtue of belongingto the same immediate family could be represented byan n-edge joining them. Graphs may also be naturallypartitioned in various ways. We will see a number ofexamples in this review of bipartite graphs: graphs thatcontain vertices of two distinct types, with edges runningonly between unlike types. So-called affiliation networks

  • GraphsA graph G=(V,E) consists of a vertex set V and an

    edge set E containing unordered pairs {i,j} of vertices.

    1

    15

    7

    16

    212

    10

    6

    8

    11

    13

    14

    45

    9

    3

    1

    2 3

    4

    graph multigraph

    The degree of vertex v is the number of edges attached to it.

  • A Plea for Clarity: What is a Network?

    graph vs. multigraph (are loops, multiple edges ok? What is a simple graph?)

    directed vs. undirected weighted vs. unweighted dynamics of vs. dynamics on labeled vs. unlabeled network as quantity of interest vs. quantities of

    interest on networks

  • Why model networks?

    Hard to interpret hairballs. We can define some interesting features

    (statistics) of a network, such as measures of clustering, and compare the observed values against those of a model

    Warning: much of the network literature carelessly ignores the way in which the network data were gathered (sampling) and whether there are missing/unknown nodes or edges!

  • Erdos-Renyi Random Graph Model

    Independently flip coins with prob. p of heads Let n get large and p get small, with the average

    degree c = (n-1)p held constant.

    What happens for c < 1? What happens for c > 1? What happens for c = 1?

  • Degree Sequences

    1

    2

    3

    4 5

    6

    79

    8

    Take V = { 1, . . . , n} and let di be the degreeof vertex i .The degree sequence of G is d = (d1, . . . , dn ).

    n = 9, d = (3, 4, 3, 3, 4, 3, 3, 3, 2)

    A sequence d is graphical if there is a graph G with degree sequenced.G is a realization of d.

  • MCMC on Networks

    mixing times, burn-in, bottlenecks, autocorrelation,...

    Switchings Chain

    1 2

    3 4

    1 2

    3 4

  • Power Laws

    Power-law (a.k.a. scale-free) networks: the number of vertices of degree k is proportional to k-

    Stumpf et al (2005): Subnets of scale-free networks are not scale-free, especially for large

    Their subnets are i.i.d. node-based. What about features other than degree distributions?

  • p1 Model (Holland-Leinhardt 1981)

    3.4 The p1 Model for Social Networks

    A conceptually separate thread of research developed in parallel in the statistics and socialsciences literature, starting with the introduction of the p1 model. Consider a directed graphon the set of n nodes. Holland and Leinhardts p1 model focuses on dyadic pairings andkeeps track of whether node i links to j, j to i, neither, or both. It contains the followingparameters:

    ! : a base rate for edge propagation,

    " i (expansiveness): the eect of an outgoing edge from i,

    #j (popularity): the eect of an incoming edge into j,

    $ij (reciprocation/mutuality): the added eect of reciprocated edges.

    Let P (0, 0) be the probability for the absence of an edge between i and j, Pij(1, 0) theprobability of i linking to j (1 indicates the outgoing node of the edge), Pij(1, 1) theprobability of i linking to j and j linking to i. The p1 model posits the following probabilities(see [149]):

    log Pij(0, 0) = %ij, (3.1)

    log Pij(1, 0) = %ij + " i + #j + ! , (3.2)

    log Pij(0, 1) = %ij + " j + #i + ! , (3.3)

    log Pij(1, 1) = %ij + " i + #j + " j + #i + 2! + $ij. (3.4)

    In this representation of p1, %ij is a normalizing constant to ensure that the probabilitiesfor each dyad (i, j) add to 1. For our present purposes, assume that the dyad is in oneand only one of the four possible states. The reciprocation eect, $ij, implies that the oddsof observing a mutual dyad, with an edge from node i to node j and one from j to i, isenhanced by a factor of exp($ij) over and above what we would expect if the edges occuredindependently of one another.

    The problem with this general p1 representation is that there is a lack of identification ofthe reciprocation parameters. The following special cases of p1 are identifiable and of specialinterest:

    1. " i = 0, #j = 0, and $ij = 0. This is basically an Erdos-Renyi-Gilbert model fordirected graphs: each directed edge has the same probability of appearance.

    2. $ij = 0, no reciprocal e! ect. This model eectively focuses solely on the degree distri-butions into and out of nodes.

    3. $ij = $, constant reciprocation. This was the version of p1 studied in depth by Hollandand Leinhardt using maximum likelihood estimation.

    27

  • ERGMs (Exponential Random Graph Models)

    26 J. BLIT ZSTE IN AN D P. DIA CONIS

    More formally, den e a probabilit y measure P! on the space of all graphs on n verticesby

    P! (G) = Z ! 1 exp

    !

    !n"

    i =1

    ! i di (G)

    #

    ,

    where Z is a normalizing constant. The real parameters ! 1, . . . , ! n are chosen to achievegiven expected degrees. Th is model appearsexplicitly in Park and Newman [59], using thetools and languageof stati sti cal mechanics.

    Holland and Leinhardt [35] give iterati ve algorithms for the maximum likelihood es-timators of the parameters, and Snijders [65] considers MCMC methods. Techniques ofHaberman [31] can be used to prove that the maximum likelihood estimates of the ! i areconsistent and asymptotically normal as n " # , provided that there is a constant B suchthat |! i | $ B for all i .

    Such exponential modelsare standard fare in statist ics, stati sti cal mechanics, and socialnetworking (where they are called p" models). They are used for directed graphs in Hollandand Leinhardt [35] and for graphs in Frank and Strauss [27, 70] and Snijders [65, 66],with a variety of su! cient stati sti cs (see the surveys in [3], [56], and [66]). One standardmotivation for using the probabilit y measure P! when the degree sequence is the mainfeature of interest is that thi s model gives the maximum entr opy distrib ution on graphswith a given expected degreesequence(see Laurit zen [43] for furth er discussion of th is).Unl ike most other exponential modelson graphs, the normalizing constant Z is available inclosed form. Furth ermore, there is an easy method of sampling exact ly from P! , as shownby the following. The same formulas are given in [59], but for completeness we provide abrief proof.

    Lemma 1. Fix real parameters ! 1, . . . , ! n . Let Yij be independent binary random vari-ablesfor 1 $ i < j $ n, with

    P (Yij = 1) =e! (! i + ! j )

    1 + e! (! i + ! j )= 1 ! P (Yij = 0).

    Form a random graph G by creating an edgebetween i and j if and only i f Yij = 1. ThenG is distributed according to P! , with

    Z =$

    1# i

  • Pseudolikelihood (Strauss-Ikeda 80)

    Fix a pair of nodes {i,j}, and consider the indicator r.v. of whether an edge {i,j} is present in G.

    Conditioning on the rest of G yields great simplification:

    P (edge{ i, j }| rest)P (no edge{ i, j }| rest)

    = e!! (x(G+ )! x(G" ))

    So use logistic regression? Be careful of variance estimates!

  • MCMCMLE (Geyer-Thompson 92)

    But why and not = ?

    Dont know the normalizing constant!

    From now on we write

    P(G) =exp( x(G))

    c()

    6

    Write

    Fix some baseline ! 0 and estimate log-likelihood ratio.

    l(! ) ! l(! 0) = ( ! ! ! 0)!x(G) ! logc(! )c(! 0)

    c(! )c(! 0)

    = E ! 0q! (G)q! 0 (G)

    Ratio of normalizing constants is:

    = q! (G)/c (! )

    So can approximate the MLE via MCMC.

    What about the choice of ! 0 though?

  • i.i.d. node i.i.d. edge snowball RDS short paths

    Erdos

    DyadIndep.

    ERGM

    Fixed degree

    Geom

  • Latent Space Models

    Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

    Hoff et al (2002) model:

    Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.

  • Degrees

    6

    3

    6

    2

    4

    7

    5

    4

    6

    3

    5

    5

    4

    2

    4

    4

    23

    3

    2

    Normalization?

  • Closenessuses the reciprocal of the average shortest distance to other nodes

    0.56

    0.46

    0.54

    0.40.46

    0.54

    0.53

    0.46

    0.53

    0.45

    0.53

    0.5

    0.51

    0.39

    0.46

    0.49

    0.39

    0.45

    0.4

    0.43

  • Betweenness

    many variations: shortest paths

    vs. flow maximization vs. all paths vs. random paths

  • Eigenvector Centralityuse eigenvector of A corresponding to the largest

    eigenvalue (Bonacich); more generally, power centrality