Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Social ties and influence analysis

Notes on how social ties (strong/weak, triadic closure), structural balance and status, and models of influence (PageRank, information cascades, independent cascade model) explain and predict diffusion and influence in networks.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Social ties and influence analysis tell an engineer which users, machines or sensors in a network can spread information, failures or behaviours fastest. This helps design recommender systems, viral marketing, epidemic-control simulations, and detect influential nodes for monitoring or intervention.

Key ideas

Start from a graph G = (V,E) where V is the set of actors (users, devices) and E the set of links (possible communication, friendship, follower, contact). We only use other topics by name (for example: centrality measures, community detection, and link prediction) and do not re-teach them here.

  • Tie strength: The strength of a tie between two nodes is a measure (often numeric) of how strong their relationship is; values can be binary (present/absent) or continuous (frequency, duration, intimacy). Strong ties are close, frequent, emotionally intense relations; weak ties are casual, infrequent relations.

  • Granovetter's Weak Tie Hypothesis (informal law): Weak ties act as bridges that connect otherwise distant parts of a network and often carry novel information between communities. Assumption: network with community structure where strong ties are dense locally and weak ties connect communities. Universities expect students to state it as: "Weak ties are more important than strong ties for information diffusion across communities." This is an empirical/qualitative claim, not a mathematical theorem.

  • Triadic closure (principle): If node A is tied to B and B is tied to C, then there is increased probability over time that A and C will form a tie. Draw a path A—B—C with edges A–B and B–C solid and A–C dashed (label dashed "likely soon"). Assumption: social mechanisms that create friends-of-friends ties.

  • Transitivity: In an undirected graph, transitivity is the fraction of closed triplets (triangles) among all connected triplets. Formal definition: transitivity = (3 × number of triangles) / (number of connected triplets). Assumes simple undirected graph.

  • Structural balance (Cartwright–Harary): For a complete graph with each edge labeled + (friendly) or − (hostile), the graph is balanced iff either (a) all edges are positive, or (b) vertices can be partitioned into two disjoint groups such that edges inside groups are positive and edges across groups are negative. Equivalent local statement: a triangle is balanced iff the product of its three edge signs is positive. Assumptions: signed complete graph; theorem: "A complete signed graph is balanced iff every cycle has positive product of signs." (Universities expect both formulations.)

  • Status theory (for directed signed networks): In signed directed networks, an edge i -> j with positive sign means i perceives j as higher status; negative sign means lower status. Status theory explains patterns of triads using ordering by status. Assumes there exists an underlying ranking consistent with most signs.

  • Influence vs Homophily (confounding): Influence means one node's behaviour changes another node's future behaviour. Homophily means similar nodes connect and have similar behaviour for independent reasons. The confound: observed similarity after a tie can be due to influence or pre-existing similarity. Distinguishing them requires time-ordered data, experiments, or instruments. Assumption: observational data without temporal ordering cannot distinguish the two.

  • PageRank (influence as random-walk centrality): PageRank defines influence as the stationary probability of a random surfer who follows outgoing links with probability d and teleports uniformly with probability (1−d). Assumptions: stochastic link-following, teleportation to avoid dangling nodes and guarantee uniqueness.

  • Information cascades and epidemics: A cascade is a sequence of adopters/infections where each newly activated node may cause neighbors to activate. Epidemic models (SIS, SIR) treat nodes with states and stochastic transitions. Assumption: transmission occurs only along network edges.

  • Independent Cascade (IC) model (formal definition): Discrete-time stochastic process with seed set S0. When a node u becomes active at time t, it is given one chance to activate each currently inactive neighbor v at time t+1 with independent probability p_{u,v}. If the attempt fails, u cannot try again on v. Process continues until no new activations. Outcome: final activated set. Assumes independence of attempts and fixed edge probabilities.

  • Linear Threshold (LT) model (formal definition): Discrete-time process with seed set S0 initially active. Each node v has a threshold θ_v (often drawn uniformly in [0,1]) and influence weights b_{u,v} on incoming edges with ∑u b{u,v} ≤ 1. At time t+1, any inactive v becomes active if the sum over its active in-neighbors u of b_{u,v} ≥ θ_v; once active, nodes remain active. Outcome: final activated set. Assumes fixed weights and independent thresholds.

  • Computational facts (important theorems to quote):

    • Influence spread under the IC model: the expected final size of activated set is a set function that is monotone (adding seeds never decreases expected spread) and submodular (diminishing returns). Assumption: IC model with independent edge probabilities. Consequence: the greedy algorithm for influence maximization gives a (1−1/e) approximation to the optimal seed set (Kempe–Kleinberg–Tardos result).
    • Computing exact expected spread is #P-hard in general. Assumption: general directed graphs, arbitrary p_{u,v}.
    • Influence maximization (choosing k seeds to maximize expected spread) is NP-hard. Assumption: IC or LT on general graphs; consequence: motivates approximation/heuristics (Kempe–Kleinberg–Tardos).

When an exam asks for a diagram of an IC cascade, draw a small network of nodes with time layers: layer t nodes active shaded, arrows labeling probabilities on edges to show attempts from active nodes to neighbours in the next layer.

Formulas

transitivity = (3 * number_of_triangles) / number_of_connected_triplets — number_of_triangles: count of undirected triangles, unitless; applies to simple undirected graphs. C_v = 2 * T_v / (k_v * (k_v - 1)) — local clustering coefficient at node v; T_v: number of triangles through v; k_v: degree of v; unitless; define C_v = 0 if k_v < 2.

PageRank = (1 - d)/N * 1 + d * M * PageRank — PageRank is the column vector of steady-state scores; d: damping factor (unitless, typical 0.85); N: number of nodes (unitless); M: column-stochastic matrix with M_{i,j} = 1/outdeg(j) if j->i else 0; applies when teleportation is uniform; for dangling nodes (outdeg(j)=0), set column j of M to 1/N so M remains column-stochastic.

P_{IC}(v infected eventually from seed set S) = 1 - product_{paths from S to v} (1 - P(path)) — (only exact when paths are edge-disjoint; generally an upper bound). Here P(path) = product of edge probabilities along path; all probabilities unitless; applies in simple tree or edge-disjoint-path cases.

E[size_final] = sum_{v in V} P(v is activated eventually) — expected final active count; unitless; applies under any stochastic cascade model.

For small line with seed at left and independent probabilities p1, p2: P(rightmost infected) = p1 * p2 and E[size] = 1 + p1 + p1*p2.

Worked examples

Example 1 — PageRank on a 3-node directed graph (exam-style model answer): Graph: nodes 1,2,3 with edges 1->2, 2->3, 3->2. Compute PageRank with d = 0.85 and uniform teleport. Step 1: Build column-stochastic M where M_{i,j}=1/outdeg(j) if j->i. Columns (sources): 1 sends to 2; 2 sends to 3; 3 sends to 2. So M = [[0,0,0],[1,0,1],[0,1,0]]. Step 2: Solve PR = (1-d)/3 * 1 + dMPR. With (1-d)/3 = 0.05. Write equations: PR1 = 0.05 PR2 = 0.05 + 0.85*(PR1 + PR3) PR3 = 0.05 + 0.85PR2 Step 3: Substitute PR1 = 0.05 into the others and solve algebraically: PR2 = 0.05 + 0.85(0.05 + PR3) = 0.0925 + 0.85PR3 PR3 = 0.05 + 0.85PR2 Solve: PR2 = 0.0925 + 0.85*(0.05 + 0.85PR2) = 0.135 + 0.7225PR2 => 0.2775PR2 = 0.135 => PR2 = 0.486486... (unitless) Then PR3 = 0.05 + 0.850.486486 = 0.463513... and PR1 = 0.05. Sum ≈ 1. Final answer: PR1 = 0.05, PR2 ≈ 0.4865, PR3 ≈ 0.4635. (Show working; this is the standard eigenvector/linear-systems method.)

Example 2 — Independent Cascade on a line (model answer): Network: A—B—C (undirected but infection follows edges). Seed S0 = {A}. Transmission probabilities: p_{A,B} = 0.2, p_{B,C} = 0.3. Compute probability C infected and expected final size. Step 1: C can only be infected if B became infected first. P(B infected) = p_{A,B} = 0.2. Step 2: Given B infected, it tries once to infect C with probability 0.3, so P(C infected) = P(B infected) * p_{B,C} = 0.2 * 0.3 = 0.06. Step 3: Expected final size = 1 (A) + P(B infected) + P(C infected) = 1 + 0.2 + 0.06 = 1.26 (unitless expected count). Final answer: P(C infected) = 0.06; E[size_final] = 1.26.

Example 3 — Short theory question model answer (influence vs homophily): Question: How would you test whether observed adoption correlation between connected users is due to influence or homophily? Model answer: Use time-resolved data and check if adoption by neighbor at time t precedes adoption at t+Δ in ego more often than baseline; control for observed covariates that predict adoption (homophily); use randomized experiments (randomly expose some nodes) to identify causal influence; use instrumental variables if available; note it remains hard with unobserved confounders. Mention the need to state assumptions clearly.

Common mistakes

  • Forgetting to handle dangling nodes (replace zero out-degree columns with 1/N to keep M column-stochastic) and to include the teleportation term (1−d)/N — otherwise you can get sinks or non-uniqueness.
  • Treating IC activation attempts as repeatable — in IC each active node gets exactly one attempt per neighbor.
  • Applying formulas for trees (exact path-product formulas) to general graphs where paths overlap — this double-counts probabilities.
  • For structural balance, saying "no negative edges in a balanced graph" — not correct; two-cluster partition with negative cross-edges is allowed.

For your exam

  • Short notes: explain Granovetter’s idea and give one diagram of bridging weak tie. Full marks need diagram + explanation of information novelty transmission.
  • Derivations: derive PageRank linear system from random-walk with teleportation; show how to solve small systems. Full marks show construction of M, write PR equation, solve.
  • Numericals: compute PageRank on a small graph or expected cascade size in IC. Full marks show all algebraic steps and final probabilities/expected values with units (unitless).
  • Theory/problem: prove submodularity of expected spread (outline suffices for exam) or state and explain the (1−1/e) greedy guarantee. Full marks state monotonicity and submodularity, give short proof sketch, and state approximation bound.
  • Diagrams: draw triadic closure (A—B—C) and structural balance cases (all-positive triangle vs two groups). Full marks label signs and explain.

Quick check

  1. Define triadic closure in one sentence.
  2. In the Independent Cascade model, how many times can an active node try to activate a given neighbor?
  3. What is the usual damping factor value used in PageRank, and what term avoids rank sinks?

Answers: 1. Triadic closure: if A—B and B—C exist then A and C have increased probability to form a tie. 2. Exactly one time. 3. Typical damping factor d = 0.85; the teleportation term (1−d)/N avoids rank sinks.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?