A Signed Subgraph Encoding Approach via Linear Optimization for Link Sign Prediction

Zhihong Fang, Shaolin Tan, Yaonan Wang

TL;DR

SELO (Subgraph Encoding via Linear Optimization) is a new architecture for predicting whether a link in a social network is positive (trust/friend) or negative (distrust/foe). By extracting local subgraphs and encoding them into "likelihood matrices" using linear optimization, SELO outperforms state-of-the-art Graph Neural Networks (GNNs) while being significantly faster to train.

What Problem Does This Paper Address?

In social network analysis, link sign prediction is the task of determining the nature of a relationship—is it a "thumbs up" or a "thumbs down"? While standard link prediction asks if a connection exists, sign prediction asks what that connection represents.

Most current methods rely on Social Balance Theory (e.g., "the enemy of my enemy is my friend") or Status Theory. However, these theories have major gaps:

  1. Triad Dependency: They mostly look at triangles (triads). In many sparse networks, a huge number of links don't belong to any triangle.
  2. Theory Violations: Real-world data often contradicts these social theories (up to 20% of the time).
  3. Sparsity: When data is limited, simple pairwise or triad-based features aren't enough to capture the complex "local environment" of a link.

The authors propose SELO to move beyond these simple motifs by encoding the entire local topological structure of a link's neighborhood.

Methods

SELO consists of a specialized pipeline that transforms a raw graph into a format a standard neural network can easily digest:

  1. Subgraph Extractor: For any target link, the model uses a Breadth-First Search (BFS) to pull out an "enclosing subgraph" of a fixed size ($K$).
  2. Link Re-weighting: Not all links in the neighborhood are equal. SELO assigns weights based on:
  3. Distance: Links closer to the target pair get higher weights.
  4. Sign: Negative links are assigned a higher weight ($\beta$) than positive ones. This is based on the psychological insight that negative information is often more "noticeable" and informative in social dynamics.
  5. Subgraph Encoder (The Core Innovation): Instead of using a standard adjacency matrix (0s and 1s), SELO uses Linear Optimization (LO) to derive "likelihood matrices." These matrices ($S^{(1)}, S^{(2)}, S^{(3)}$) represent the "contribution" of each node to the existence of a link. Mathematically, these matrices capture odd-length paths (like 3-hop and 5-hop paths) that characterize the relationship.
  6. Node Ordering: To ensure the neural network sees a consistent input, nodes are ranked and relabeled based on an "importance score" derived from the likelihood matrices.
  7. MLP Classifier: The final, ordered matrices are flattened and fed into a simple Multi-Layer Perceptron (MLP) to output the final sign prediction.

Datasets

The model was evaluated on six diverse, real-world signed networks:

  • Bitcoin-Alpha & Bitcoin-OTC: "Who-trusts-whom" networks from cryptocurrency trading platforms.
  • WikiRfA: Voting data from Wikipedia's "Request for Adminship."
  • Slashdot: A technology news site where users tag others as friends or foes.
  • Epinions: A consumer review site based on trust/distrust.
  • WikiElec: (Used in ablation studies) Wikipedia election data.

Key Insights and Ideas

  • Likelihood > Adjacency: A raw adjacency matrix is sparse and doesn't explicitly show how nodes influence each other. By solving a linear optimization problem, SELO creates a dense representation where the values represent the "topological relevance" of paths between nodes.
  • The "Negativity Bias": The authors found that giving negative links more weight in the encoding process significantly improves accuracy. Because negative links are rarer, they carry more "signal" about the network's structure.
  • Efficiency through Locality: Unlike GNNs that often require global message passing or complex attention mechanisms across the whole graph, SELO focuses on small, local subgraphs. This makes it much faster—on the Bitcoin-OTC dataset, SELO trained in about 4 minutes, while the state-of-the-art SDGNN took over 30 minutes.

Key Results

SELO was compared against 10 baselines, including feature-engineering methods (All23) and advanced GNNs (SDGNN, SGCN).

  • Superior Accuracy: SELO achieved the best performance across all six datasets and all four metrics (AUC, F1, Micro-F1, and Macro-F1).
  • Handling Imbalance: It showed particularly strong gains in Macro-F1 (e.g., an 8-10% improvement on Bitcoin datasets). This indicates that SELO is much better at correctly identifying the rare "negative" links that other models often miss.
  • Robustness: The model is relatively insensitive to its hyperparameters ($\alpha$ and $\beta$), meaning it doesn't require exhaustive tuning to work well on new data.

Limitations and Future Work

  • Fixed Subgraph Size: The current model uses a fixed $K$ (number of nodes). While $K=5$ worked well here, very dense or very large networks might require more dynamic subgraph selection.
  • Node Attributes: The paper focuses purely on the topology (the shape of the connections). It does not yet incorporate "node attributes" (like user profiles or text data), which are common in modern social media datasets.
  • Generalization: The authors suggest that future work could extend this "likelihood matrix" approach to attributed signed graphs, combining structural optimization with rich feature sets.

Summary updated

BibTeX
@article{fang2024signed,
  author = {Zhihong Fang and Shaolin Tan and Yaonan Wang},
  title = {{A Signed Subgraph Encoding Approach via Linear Optimization for Link Sign Prediction}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2024},
  url = {https://openreview.net/forum?id=9KwHwLiWHg},
}
Figure