Positive and Negative Links Web Science (VU) (707.000) Elisabeth Lex KTI, TU Graz May 4, 2015 Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 1 / 66
Outline 1 Repetition 2 Motivation 3 Structural Balance 4 Applications for Structural Balance 5 A Weaker Form of Structural Balance 6 Generalizing Structural Balance 7 Structural balance and status 8 Summary Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 2 / 66
Repetition Repetition from last lecture Last week we looked at network evolution through Selection and Social influence We saw that local e ects (when only a few nodes are involved at a time) can have global consequences on the network as a whole Today, we will talk about relationships that a ect the structures: positive relationships and negative relationships Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 3 / 66
Motivation Motivation Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 4 / 66
Motivation Motivation So far, we viewed as having only positive connotations: e.g., friends, followers, collaborators, But: links can convey either friendship or antagonism E.g.: upvoting an answer in a Q&A Website vs. downvoting (e.g., as possible in ResearchGate) Figure: Example: Up- and down-voting in ResearchGate Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 5 / 66
Motivation Expressing Friends/Enemies Explicitely versus Implicitely Explicitely: users annotate link in terms of being positive or negative in their view E.g.: Trust/distrust on Epinions - user can express evaluations of di erent products, and also express trust or distrust of other users (Guha et al. 2004) E.g.: Friend/foe relations on Slashdot (Lampe et al. 2007, Kunegis et al. 2009) Implicitely: users express positive and negative attitudes implicitly Through actions, e.g., voting for admin promotion on Wikipedia (Burke-Kraut 2008). User A votes positively/negatively on promotion of user B Through the text they write, e.g., sentiment analysis of online reviews (Pang-Lee 2008) Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 6 / 66
Motivation Example for a Portal with Explicit Annotations Figure: Example: Epinions - Portal for customer reviews by real people, link polarity explicitely annotated Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 7 / 66
Motivation Example for Signed Networks Built on Implicit Positive and Negative Links Study on interactions in Wikipedia (Maniu et al., 2012) 1 Inferred relationships between Wikipedia contributors based their interactions. Gives subjective trust / distrust in contributor s ability to improve the Wikipedia 1 http://isicil.inria.fr/res/docs/articles/dbsocial2011/cameraready.pdf Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 8 / 66
Structural Balance Structural Balance Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 9 / 66
Structural Balance Motivation Based on theories in social psychology (Heider, 1940) that were generalized to graphs by Cartwright and Harary in the 1950s Fundamental idea: Suppose we have 2 people, their relationship can be either + or - (friends vs. enemies) Now, we look at sets of 3 people - then, certain configurations of + and - are socially more plausible than others Structural balance is a notion to understand the tension between the two forces, friendship and antagonism Captures relationship between local and global Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 10 / 66
Structural Balance Structural Balance Let s start with the statements: The friend of my friend is my friend The enemy of my friend is my enemy The friend of my enemy is my enemy The enemy of my enemy is my friend Are any of these true? Under which conditions are they true? - Today, we ll look at sign patterns of triplets of people that are consistent with this logic Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 11 / 66
Structural Balance Structural Balance Complete graph: everyone knows everyone else in the network Each edge has a sign: - (antagonists/enemies) or + (friends) Set of 3 people can be in 4 di erent configurations Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 12 / 66
Structural Balance Structural Balance Humans have a preference for balance (consistency) States of imbalance create tension People act (think, emote) so as to reduce this tension Structural balance: Triangles with one of three + are balanced since they are free from instability Triangles with zero or two + are unbalanced since they are unstable (sources of stress people strive to minimize them in their personal relationships) Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 13 / 66
Structural Balance Structural Balance Definition Structural Balance Property: For every set of three nodes, if we consider the three edges connecting them, either all three of these are labeled +, or else exactly one of them is labeled - (odd number of +) Which one of the networks is balanced? Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 14 / 66
Structural Balance Structural Balance Definition Structural Balance Property: For every set of three nodes, if we consider the three edges connecting them, either all three of these are labeled +, or else exactly one of them is labeled - (odd number of +) Which one of the networks is balanced? left is balanced, right unbalanced Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 15 / 66
Structural Balance Structural of Balanced Networks Definition Balance Theorem: If a labeled complete graph is balanced, (a) all pairs of nodes are friends, or (b) the nodes can be divided into two groups X and Y, such that every pair of nodes in X like each other, every pair of nodes in Y like each other, and every one in X is the enemy of every one in Y. Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 16 / 66
Structural Balance Structural of Balanced Networks While Structural Balance Property is a local property (applies to only 3 nodes at a time), it implies strong global property - either everyone gets along, or the world is divided into two battling factions Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 17 / 66
Structural Balance Proof of Balance Theorem Suppose we have a labeled complete graph, that is balanced If it has no negative edges, then everyone is friends - DONE If at least one negative edge in the graph, there exists a division of the nodes into sets of mutual friends X and Y, with complete antagonism between them How to identify X and Y? Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 18 / 66
Structural Balance Proof of Balance Theorem Investigate network from the perspective of one single node, A Every other node is either a friend of A or an enemy of A Define X to be A and all its friends, and Y to be all the enemies of A Then, we need to show that Every 2 nodes in X are friends Every 2 nodes in Y are enemies Every node in X is an enemy of every node in Y Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 19 / 66
Structural Balance Structural of Balanced Networks Recall: (i) Every two nodes in X are friends. (ii) Every two nodes in Y are friends. (iii) Every node in X is an enemy of every node in Y For (i): A is friends with every other node in X. Are B and C friends? YES. A is friends with B and C so if B and C were enemies - triangle with two +, one - - violation. For (ii): Do D and E need to be friends? A is enemies with both D and E so if D and E were enemies, triangle with three - - violation For (iii): consider B and D - enemies? YES. Why? Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 20 / 66
Structural Balance Recall: (i) Every two nodes in X are friends. (ii) Every two nodes in Y are friends. (iii) Every node in X is an enemy of every node in Y For (i): A is friends with every other node in X. Are B and C friends? YES. A is friends with B and C so if B and C were enemies - triangle with two +, one - - violation. For (ii): Do D and E need to be friends? A is enemies with both D and E so if D and E were enemies, triangle with three - - violation For (iii): consider B and D - enemies? YES. Why? A is friends with B, enemies with D. If B and D were friends, then A, B, and D triangle with two + - violation Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 21 / 66 Structural of Balanced Networks
Applications for Structural Balance Applications for Structural Balance Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 22 / 66
Applications for Structural Balance Applications for Structual Balance Analysis of network evolution: how do friendships and enemies evolve over time as network aims at structural balance International Relations - how do relationships between countries evolve over time? - Structural balance can provide explanation for behavior of nations during various international crises! Social media (polarity, opinions, trust) Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 23 / 66
Applications for Structural Balance Applications for Structual Balance E.g. Separation of Bangladesh from Pakistan (1971) [More] Nodes are nations, and + and - labels indicate alliances or animosity Has USA supported Pakistan? Can you explain why? Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 24 / 66
Applications for Structural Balance Applications for Structual Balance USSR was enemy of China China was foe of India India had traditionally bad relations with Pakistan USA was at that time improving relations with China Therefore, USA supported enemies of China s enemies Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 25 / 66
Applications for Structural Balance Applications for Structual Balance Shifting alliances preceding World War I as another Example of structural balance in international relations [Antal, Krapivsky, and Redner]: Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 26 / 66
AWeakerFormofStructuralBalance Weak Structural Balance Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 27 / 66
AWeakerFormofStructuralBalance Weak Structual Balance So far, we discussed two kinds of unbalanced triangles: (i) two + edges and one - edge and (ii) three - edges Both semantics are fundamentally di erent - in (i) problem of a person whose friends don t get along, in (ii) possibility that 2 of the 3 nodes will form alliance against third Forces behind (i) much stronger, e.g. friends of friends try to reconcile So - what happens if we only rule out (i) and allow (ii)? Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 28 / 66
AWeakerFormofStructuralBalance Weak Structual Balance Definition Weak Structural Balance Property: There is no set of three nodes such that the edges among them consist of exactly two positive edges and one negative edge Only + + - triangles are disallowed, but we may have - - - triangles. Two enemies of A can be either friends or enemies of each other Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 29 / 66
AWeakerFormofStructuralBalance Weaker Form of Structual Balance Definition Weakly Balance Theorem: If a labeled complete graph is weakly balanced, its nodes can be divided into groups in such a way that every two nodes belonging to the same group are friends, and every two nodes belonging to di erent groups are enemies. Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 30 / 66
AWeakerFormofStructuralBalance Weak Structual Balance Complete graph is weakly balanced if it can be divided into multiple sets of mutual friends - with complete mutual antagonism between each pair of sets Weakly balanced networks can contain any number of opposed groups of mutual friends Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 31 / 66
AWeakerFormofStructuralBalance Weak Structual Balance Proof Suppose we have a labeled complete graph that is weakly balanced If graph has no negative edges at all - DONE Otherwise, if there is at least 1 negative edge Two nodes are friends if they belong to the same group Two nodes are enemies when belong to di erent groups In any triangle that contains at least two +, all three nodes must belong to the same group as each group consists of mutual friends Therefore, the network contains no triangles with exactly two + edges Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 32 / 66
AWeakerFormofStructuralBalance Weak Structual Balance Proof Pick any node A. Set X contains A and all its friends. (i) All of A s friends are friends with each other (group of mutual friends). (ii) A and A s friends enemies with everyone else in graph For (i): B and C friends with A. B and C must be friends, otherwise two + labels - violation For (ii): A is enemy of all nodes outside X. B and D must be enemies, otherwise two + labels - violation Since both (i) and (ii) hold, remove X from graph and repeat on smaller complete graph until all nodes assigned to a group Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 33 / 66
Generalizing Structural Balance Generalizing Structural Balance Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 34 / 66
Generalizing Structural Balance Generalizing Structural Balance So far, only complete graphs: requires that each person know and have an opinion (positive or negative) on everyone else. But - what if only some pairs of people know each other? Or if only some pairs of people have opinion about each other? Structural balance: world is divided into 2 factions, but Balance Theorem only applies when every triangle is balanced Can we relax this to say that if most triangles are balanced, then the world can be approximately divided into two factions? Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 35 / 66
Generalizing Structural Balance Generalizing Structural Balance We consider a non-complete graph with three possible relations: Positive Negative Absent Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 36 / 66
Generalizing Structural Balance Balance Definition for General Graphs Two (equivalent) ways to define structural balance for general, non-complete graphs: 1 Network is balanced if we can complete it with edges that lead to a complete graph that is balanced - local view 2 Network is balanced if it is possible to divide nodes into two sets X and Y so that all edges inside X and inside Y are positive, and all edges between X and Y are negative - global view Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 37 / 66
Generalizing Structural Balance Example for 1) A (non-complete) graph is balanced if it can be completed by adding edges to form a signed complete graph that is balanced ( filling missing values ) Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 38 / 66
Generalizing Structural Balance Example for 2) A graph can be divided into two sets with positive intra-set and negative inter-set edges Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 39 / 66
Generalizing Structural Balance Balance Characterization Is this graph balanced? What prevents a graph from being balanced? Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 40 / 66
Generalizing Structural Balance Balance Characterization No - it is unbalanced! Start at node 1: try divide nodes into sets X and Y (node 1 belongs to X) Node 2 is friend of 1 - X Node 3 is enemy of 2 - Y Node 4 is friend of 3 - Y Node 5 is enemy of 4 - X Node 1 is enemy of 5 - should belong to Y, but we already assigned it to X! Hence, nodes can t be divided in sets X and Y - graph not balanced Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 41 / 66
Generalizing Structural Balance Balance Characterization Claim: A signed graph is balanced, if and only if, it contains no cycles with an odd number of negative edges Proof by construction: Find a balanced division: partition into sets X and Y, all edges in X and Y positive, crossing edges between X and Y negative Procedure either succeeds or stops with a cycle containing an odd number of - 2steps: 1 Convert the graph into a reduced one that has only negative edges 2 Solve the problem in the reduced graph Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 42 / 66
Generalizing Structural Balance Convert graph into reduced Find supernodes : components of internally positively connected nodes, and the only edges going between two di erent supernodes are negative Does a supernode contain a negative edge between some pair of nodes A and B? yes, then we have already an odd cycle (1 negative) - unbalanced graph No, then no internal problem. Proceed. Create new version of problem: node for each supernode and an edge joining two supernodes if there is an edge in original graph that connects the two supernodes Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 43 / 66
Generalizing Structural Balance Convert and solve in the reduced graph Now, solve the problem in the reduced graph: Remember, only negative edges between supernodes Is there a circle with an odd number of negative edges? If yes, this can be converted to (longer) cycle in original graph Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 44 / 66
Generalizing Structural Balance Convert back to cycle in original graph Thus, graph is unbalanced! Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 45 / 66
Generalizing Structural Balance Approximately Balanced Networks What if we only know that most triangles are balanced? Claim: If at least 99.9% of all triangles in a labeled complete graph are balanced, then either there is a set consisting of at least 90% of the nodes in which at least 90% of all pairs are friends, or else the nodes can be divided into two groups, X and Y, such that at least 90% of the pairs in X like each other at least 90% of the pairs in Y like each other, and at least 90% of the pairs with one end in X and the other end in Y are enemies Based on finding a good node that isn t involved in too many unbalanced triangles No proof for this today, but check out https://courses.cit.cornell.edu/info204_2007sp/balance.pdf Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 46 / 66
Structural balance and status Structural Balance and Status Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 47 / 66
Structural balance and status Structural balance and status (Leskovec et al., 2010) studied signed online networks by evaluating and comparing di erent theoretical perspectives. How do edge signs and network structure interact? What theories explain signs of edges? Can we accurately predict signs of edges? Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 48 / 66
Structural balance and status Structural balance and status Balance theory - for undirected graphs In reality: often directed networks In a directed network, link from A to B may more than one possible interpretation, depending in why A created the link (friendship?, has B a higher status than I do?) Status Theory as organizing principle for directed networks of signed links (Leskovec et al., 2010) Better suited for directed networks than Structural Balance Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 49 / 66
Structural balance and status Theory of Status Positive link A to B means: B has higher status than A Negative link A to B means: B has lower status than A Often, lead to di erent sign predictions than structural balance Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 50 / 66
Structural balance and status Signed Networks in Social Media (Leskovec et al., 2010) Investigated 3 real-world datasets: Epinions (trust/distrust), Slashdot (like/dislike), Wikipedia (positive/negative vote on promotion to admin status) Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 51 / 66
Structural balance and status Edge signs and network structure - e.g. embeddedness Embeddedness of ties (Leskovec et al., 2010) Not well embedded edges (with endpoints having fewer than around 10 shared neighbors) tend to be more negative than expected Positive edges tend to occur in better embedded (densely linked) groups of nodes Negative edges tend to participate in fewer triangles Indicates that they act as connections between the well-embedded sets of positive ties Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 52 / 66
Structural balance and status Signed Networks in Social Media Can triangles in the undirected network be explained? - Yes, but only half of them! Figure: Number of balanced and unbalanced triads Weak structural balance: triads with ++ underrepresented, +++ over-represented. But: + - - over and - - - under 2 2 Structural balance: most plausible +++ and + - - in real networks Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 53 / 66
Structural balance and status Theory of Status Next: can triangles in the directed network be better explained with theory of status? YES! They found: signs of directed links can be predicted with Theory of Status Inferences about sign of link from A to B can be drawn from mutual relationships that A and B have to third parties X Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 54 / 66
Structural balance and status Theory of Status Say X has links to A and B Now, A links to B - triad A-B-X What is the sign of the link between A and B? A positive link from A to B would indicate that A thinks highly of B s skill relative to her own, while a negative link would indicate that A thinks she is better than B How does it depend on signs of X? Di erent users make signs di erently: Generative baseline: overall fraction of + signs a user creates, considering all her links (probability of A given + ) Receptive baseline: overall fraction of positive signs in the links a user receives (probability of A receiving + ) Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 55 / 66
Structural balance and status Case Joint Endorsement X positively endorses both A and B Then, probability to be positive is higher than generative baseline of A Probability is lower to be positive than receptive baseline of B Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 56 / 66
Structural balance and status Example: Soccer Ask A: How does skill of B compare to yours? We don t know the sign of A-B Generative Hypothesis: B has positive eval from X, B more likely than not good skills Evaluation that A gives B should be more likely be positive than A evaluating a random player Receptive Hypothesis: A has positive eval from X, A more likely than not good skills Therefore, evaluation that A gives B should be less likely be positive than an evaluation B receives from random player Sign of A-B depends on viewpoint/context! Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 57 / 66
Structural balance and status Contextualized Links and Link Prediction Evaluate the sign of a link created from A to B in the context of A and B s relations to additional nodes X with whom they have links Defined a set of features (positive/negative in/out degree of A/B, counts of various signed triads A-B takes part in) Trained a classifier on these features to predict sign of edge A-B, given signs of all other edges in the network Almost perfect classification (more than 90% accuracy) Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 58 / 66
Structural balance and status Trust and Distrust Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 59 / 66
Structural balance and status Trust, Distrust and Online Ratings (Guha et al.) analyed social network in Epinions (co-rating relationship) Showed that trust/distrust in online ratings has similarities and di erences with friend/enemies in structural balance theory Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 60 / 66
Structural balance and status Trust, Distrust and Online Ratings What do you think are di erences between trust/distrust and friend/enemy relations? Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 61 / 66
Structural balance and status Trust, Distrust and Online Ratings What do you think are the di erences between trust/distrust and friend/enemy relations? Network structure: undirected versus directed graphs Triads: If A trusts B and B trusts C will A trust also C? - Yes! If A distrusts B and B distrusts C: should we expect A to trust or to distrust C? (Enemy vs Trust (e.g. in expertise) relations) Answer: it depends! If distrust enemy relation, + (structural balance theory) AdistrustsmeansthatAthinkhe sbetterthanb,andifb sdistrust towards C means the same - we can expect A to distrust C! (status theory) Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 62 / 66
Summary Summary and Practical Examples Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 63 / 66
Summary Summary We have learned about: Positive and negative links in social networks Structural balance Applications for structural balance; international relations Weak structural balance Structural balance for non-complete graphs Structural balance and Status Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 64 / 66
Summary Some Practical Examples Signed link prediction in social networks 3 Signed link prediction out of unsigned links in social networks 4 Community mining in signed graphs 5 Influence maximization in social networks 6 Important for spreading of ideas or innovations in a network and viral marketing of products They aim to find the seed node set with maximum positive influence or maximum negative influence in signed social networks 3 http://www.cs.cornell.edu/home/kleinber/www10-signed.pdf 4 http://www.eeshyang.com/papers/sigir12signed.pdf 5 http://sta.icar.cnr.it/pizzuti/pubblicazioni/asonam2013.pdf 6 http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0102199 Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 65 / 66
Summary Thanks for your attention - Questions? elisabeth.lex@tugraz.at Slides use figures from Chapter 5 of Networks, Crowds and Markets by Easley and Kleinberg (2010) Elisabeth Lex (KTI, TU Graz) Networks May 4, 2015 66 / 66