8 Graph Mining And Social Network Analysis

Data Warehousing and Data Mining · Unit 8 · 5 hrs

Graph Mining and Social Network Analysis

Exam-focused notes for Graph Mining and Social Network Analysis (Data Warehousing and Data Mining, CSC420): what the TU syllabus asks and how it has actually been tested, with 5 solved past questions from this unit.

Graph Mining and Social Network Analysis in short

Some of the richest data in practice, chemical compounds, protein structures, the web, and above all social networks, is naturally shaped as a graph rather than a table. This unit covers graph mining and its search algorithms, then moves into social network analysis: link mining, the friend-of-a-friend structure, degree assortativity, signed networks, and how trust and distrust propagate across a network.

Graph Mining and Social Network Analysis: notes

Graph mining: why graph mining

Graph mining is the process of extracting patterns, typically interesting sub-graphs, from graph data that describe the structure underlying it well enough to be used further, for example as input to classification or clustering. It matters because a great deal of real data is naturally graph-shaped rather than tabular: circuits, chemical compounds, protein structures, social networks, the web and XML documents are all graphs at heart, and forcing them into flat tables loses exactly the structural information (which node connects to which) that is often the whole point of mining them. This is why graph mining is used directly for tasks such as fraud detection, community or cluster detection, friend recommendation, and finding influential nodes: each of these depends on the connections between entities, not merely on the entities' own attributes.

Graph mining algorithm (Beam search, Inductive logic programming)

Beam search is a heuristic search algorithm developed to approach an optimal solution without the memory cost of exploring every node. At each step it retains only the $B$ most promising nodes (called the beam width) for further expansion, discarding the rest, which makes it an optimization of best-first search that trades some completeness for a bounded memory footprint:

Open = {initial state}
while Open is not empty:
    1. remove the best node n from Open
    2. if n is the goal state, backtrace and return the path
    3. generate n's successors
    4. evaluate each successor and add it to Open
    5. if |Open| > B, keep only the best B nodes in Open

Worked example with beam width $B=2$: a graph with start node $S$ and goal node $G$, edges $S{-}A$, $S{-}B$, $A{-}C$, $A{-}D$, $B{-}D$, $B{-}E$, $C{-}G$, $D{-}G$, $E{-}G$, and heuristic estimates to the goal $h(S)=10$, $h(A)=6$, $h(B)=7$, $h(C)=3$, $h(D)=4$, $h(E)=5$, $h(G)=0$.

Starting from $\mathit{Open}={S}$, expanding $S$ gives children $A,(h=6)$ and $B,(h=7)$; both fit within the beam width, so $\mathit{Open}={A,B}$. Expanding $A$ next gives $C,(h=3)$ and $D,(h=4)$, while expanding $B$ gives $D,(h=4)$ again and $E,(h=5)$; keeping only the best 2 distinct nodes by heuristic value leaves $\mathit{Open}={C,D}$, both reached through $A$. Finally, expanding $C$ and $D$ both reach the goal $G,(h=0)$, and since $C$ was the more promising node at the previous stage, the path is reported through it: $S \to A \to C \to G$.

Inductive Logic Programming (ILP) sits at the intersection of machine learning and logic programming: it develops predicate descriptions from examples and background knowledge. Where deduction reasons from general rules and specific facts to derive further specific facts, induction reasons the other way, deriving a general rule from a set of specific facts; ILP's goal is to find hypotheses, expressed as logic programming clauses, that fit a set of positive and negative examples together with domain knowledge. For example, given the facts $\mathit{parent}(a,c)$, $\mathit{parent}(b,c)$, $\mathit{father}(a,c)$, $\mathit{mother}(b,c)$, $\mathit{male}(a)$ and $\mathit{female}(b)$, ILP can induce the general rules $\mathit{father}(x,y) \leftarrow \mathit{parent}(x,y) \wedge \mathit{male}(x)$ and $\mathit{mother}(x,y) \leftarrow \mathit{parent}(x,y) \wedge \mathit{female}(x)$. Because a graph can be represented as a set of such facts, ILP can then be applied directly to identify interesting patterns within it.

What this unit covers

  • Graph mining
  • Why graph mining
  • Graph mining algorithm (Beam search, Inductive logic programming)
  • Social network analysis
  • Link mining
  • Friends of friends
  • Degree assortativity
  • Signed network (Theory of structured balance, Theory of status, Conflict between the theory of balance and status)
  • Trust in a network (Atomic propagation, Propagation of distrust, Iterative propagation)
  • Predicting positive and negative links

Signed network

2081 · 5 marks

Define graph mining. Discuss the conflict between theory of balance and theory of status. [5]

Show solved answer

Graph Mining and Conflict Between Theory of Balance and Theory of Status


Part 1: Definition of Graph Mining (1 mark)

Graph Mining is a subfield of data mining that focuses on discovering useful patterns, structures, and knowledge from graph-structured data. It applies data mining techniques to graphs, where data is represented as nodes (vertices) representing entities (such as users in a social network) and edges (links) representing relationships between those entities.

Graph mining is closely related to Social Network Analysis (SNA), which is the process of investigating social structures through the use of networks and graph theory. It characterizes networked structures in terms of:

  • Nodes: Individual actors or entities
  • Edges/Links: Relationships connecting them (which can be positive or negative)

Graph mining tasks include link prediction, community detection, classification, and clustering over graph data.


Part 2: Conflict Between Theory of Balance and Theory of Status (4 marks)

In social networks, relationships can be either positive (trust, friendship) or negative (distrust, opposition). Two major theories attempt to predict the sign of links in such signed networks: Balance Theory and Status Theory. These two theories sometimes come into direct conflict with each other.


Theory of Balance

Balance theory is based on the idea that relationships in a social network tend toward consistency. In simple terms:

  • A positive link from A to B means A considers B a friend.
  • A negative link from A to B means A considers B an enemy.

The classic rule is: "A friend of my friend is my friend."


Theory of Status

In the Theory of Status, a signed directed link from A to B is interpreted in terms of relative status:

  • A positive directed link from A to B means A regards B as having higher status than A.
  • A negative directed link from A to B means A regards B as having lower status than A.

These relative levels of status can then be propagated along multi-step paths of signed links, often leading to different predictions than balance theory.


The Conflict: A Concrete Example

Consider the following scenario:

User A links positively to User B, and B links positively to User C. If C then forms a link to A, what sign should we expect this link to have?

Prediction by Balance Theory:

  • A is a friend of B (positive link A -> B)
  • B is a friend of C (positive link B -> C)
  • Therefore, C is a friend of A's friend
  • Balance theory predicts: C should link POSITIVELY to A

Prediction by Status Theory:

  • A links positively to B => A regards B as having higher status than A
  • B links positively to C => B regards C as having higher status than B
  • Therefore, C has higher status than B, who has higher status than A
  • So C should regard A as having low status
  • Status theory predicts: C should link NEGATIVELY to A

Summary of Conflict

AspectBalance TheoryStatus Theory
Positive link A->B meansA and B are friendsB has higher status than A
Prediction for C->APositive (friend of friend)Negative (A has low status)
BasisFriendship/enmity consistencyRelative social status propagation

This conflict shows that the same network configuration (A->B positive, B->C positive) leads to opposite predictions depending on which theory is applied. Machine learning algorithms and matrix factorization approaches have been proposed to handle both theories together for predicting positive and negative links in social networks.

Open this answer on its own page →

2078 · 10 marks

Write down any one advantage and disadvantage of MOLAP over ROLAP. Define signed network and how do you check whether it is balanced or not? How beam search reduces the space complexity? Illustrate with an example.[10]

--- Advantage of MOLAP over ROLAP: MOLAP stores data in a multidimensional cube (pre-aggregated), which allows faster query performance. Since data is pre-computed and stored in optimized multidimensional arrays, analytical queries are answered much more quickly compared to ROLAP, which must exec...

Open this answer on its own page →

2078 · 5 marks

Show the conflict between theory of balance and status. How do you improve Apriori? [5]

--- In signed social networks, links between users can be either positive (+) or negative (-). - Balance Theory predicts the sign of a link based on the principle: "the friend of my friend is my friend." - Status Theory predicts the sign of a link based on relative status levels propagated along ...

Open this answer on its own page →

Link mining

2081 · 5 marks

Define link mining. What are the roles of epsilon and MinPts in DBSCAN. [5]

--- Link mining is a research area that focuses on extracting useful knowledge and patterns from data that contains links or relationships between objects. Unlike traditional data mining which considers only the attributes of individual objects, link mining also considers the connections (links) ...

Open this answer on its own page →

Graph mining algorithm

2079 · 5 marks

What are application areas of graph mining? Explain the concept behind inductive logic programming with suitable demonstration. [5]

--- Graph mining deals with discovering patterns, structures, and knowledge from graph-structured data. The key application areas are: Application Area Description ------ Social Network Analysis (SNA) Investigates social structures using nodes (individual actors) and edges (relationships). Used t...

Open this answer on its own page →