1 of 50

Shallow Unsupervised Graph Embedding

Oct 6th 2026

BMI/CS 775 Computational Network Biology�Fall 2026

Anthony Gitter

https://bmi775.sites.wisc.edu

These slides, excluding third-party material, are licensed under CC BY-NC 4.0 by Sushmita Roy and Anthony Gitter

2 of 50

Topics in this section

  • Shallow unsupervised graph embedding
  • Graph neural networks
  • Graph neural network extensions and limitations
  • Experimental design and evaluation for graph machine learning
  • Graph transformers
  • Deep unsupervised graph embedding

3 of 50

Goals for today

  • The case for learning representations in unsupervised problems for graphs

​

  • Shallow, graph structure-based representations

​

  • OhmNet: Application of node2vec for multi-tissue networks

4 of 50

Representation learning of graphs

  •  

Hamilton, Ying, Leskovec, 2018

5 of 50

Learning representations for unsupervised problems on graphs

  • What do we mean by unsupervised learning on graphs?
    • No labels/output variables
  • Why learn representations for such problems?
    • Problem of interest is unsupervised in nature, e.g. community detection
    • Pre-training to learn task agnostic representations and finetune later
    • Could improve performance even in supervised tasks
  • How?
    • Some form of “self-supervised” or “unsupervised” learning
    • Encoder-decoder framework
    • We will largely focus on node representations

​

6 of 50

From graphs to embeddings

DeepWalk embedding of Zachary Karate Club social network

Hamilton, Ying, Leskovec, 2018

 

Nodes in graph

7 of 50

You already know one way to do this!

 

Nodes in graph

What algorithm have we seen in class?

8 of 50

You already know one way to do this!

 

First 2 eigen vectors of the Zachary Karate Club graph

(Not the same embedding)

9 of 50

Overview of algorithms we will see

  • Shallow, structure only
    • Matrix factorization
    • Random walk-based methods: Node2vec, DeepWalk

10 of 50

Goals for today

  • The case for learning representations in unsupervised problems for graphs

​

  • Shallow, graph structure-based representations

​

  • Application of node2vec for multi-tissue networks

11 of 50

Notation

  •  

12 of 50

Unsupervised representation learning on graphs

  •  

13 of 50

Encoder-decoder framework of representation learning

14 of 50

Encoder-decoder framework

  •  

A set of training node pairs

15 of 50

Classes of node embedding methods

  • Shallow embedding
    • Matrix factorization-based methods
      • Laplacian eigenmaps
      • Graph factorization
      • GraRep
      • HOPE
    • Random walk-based methods
      • DeepWalk
      • Node2vec
  • Deep embedding (later)
    • Graph autoencoders
    • Deep Graph Infomax

​

16 of 50

Laplacian eigenmaps

  • Encoder:

​

  • Decoder:

​

​

  • Loss function

​

​

Coming from the original graph

17 of 50

Graph factorization, GraRep, HOPE

  •  

18 of 50

Random-walk based methods

  • Previous approaches used eigen decomposition which might not scale for large graphs
  • Alternative methods are based on random walk statistics
  • Key idea: nodes that co-occur in the same short random walks should have similar embeddings
  • Encoders are similar to matrix factorization methods
  • These measures are more flexible than matrix factorization
    • DeepWalk
    • Node2vec

Hamilton, Ying, Leskovec, 2018;

See also node2vec+ better handles edges weights. Liu et al. Bioinformatics 2023 http://doi.org/10.1093/bioinformatics/btad047

19 of 50

Random walk-based methods

  • Random walk: Instead of deterministically traversing a graph, we can probabilistically transition from a vertex to its neighbor

20 of 50

Motivation for node2vec

  • Node embedding can consider community structure or structure similarity
  • DFS: Depth-first gives community structure
  • BFS: Breadth-first gives structure similarity
  • Since real graphs have a combination of community and structure similarity, we want to combine BFS or DFS style walk

​

21 of 50

Node2vec key steps

  • Generate node neighborhoods

​

  • Optimize an objective function that maximizes the probability of the neighborhoods

22 of 50

Node2vec: generating neighborhood

  •  

dtx: Shortest path distance from t to x

distances wrt t

23 of 50

Node2vec: Objective function

Maximize the likelihood of neighborhoods

“Neighborhood” of u from sampling strategy S

Conditional independence assumption over individual source-neighbor pairs

24 of 50

Node2vec: Objective function

Likelihood of source-neighbor node pair

Simplified objective function

Denominator in likelihood above (approximated with negative sampling)

25 of 50

Node2vec implementation

  • Important arguments:
    • Graph structure
    • Embedding dimension d
    • Random walk length
    • Random walks per node
    • p
    • q
    • Number of negative samples per positive sample

26 of 50

Node2vec training

  • Create positive samples
    • Close node pairs from random walks using walk length, p, and q
  • Create negative samples
    • Node pairs from randomly sampled requested number of nodes from the graph
  • Compute loss
    • Positive loss term: encourage high similarity within each positive pair
    • Negative loss term: encourage low similarity within each negative pair
    • Sum positive and negative loss terms

27 of 50

Node2vec: effect of p and q

Grover et al. 2016

p = 1

q = 0.5

p = 1

q = 2

Les Misérables character co-appearance network: 77 nodes, 237 edges

Colors: clusters on learned embeddings

28 of 50

TopHat

29 of 50

Experiments: Node classification

  • Consider standard supervised learning task of node classification
  • Compare to spectral clustering, DeepWalk, LINE
  • Use a one vs rest logistic regression classifier

30 of 50

Experiments: Link prediction

  • Consider standard supervised learning task of link prediction
  • Compare to spectral clustering, DeepWalk, LINE
  • Evaluate with AUC

31 of 50

Goals for today

  • The case for learning representations in unsupervised problems for graphs

​

  • Shallow, graph structure-based representations

​

  • OhmNet: Application of node2vec for multi-tissue networks

32 of 50

OhmNet: Predicting multicellular function through�multi-layer tissue networks

  • Motivation:
    • How to predict the function of a protein in a tissue-specific manner?
    • Can we use the embeddings for different/multiple tasks?
  • Requires explicit modeling of tissues
  • Extract rich feature representations of proteins in each tissue-specific network
  • Use these rich feature representations to predict tissue-specific function of proteins

​

​

Zitnik, M. & Leskovec, J. Predicting multicellular function through multi-layer tissue networks. Bioinformatics 33, i190–i198 (2017).

​

33 of 50

OhmNet representation of multi-layered networks

Tissue

34 of 50

Feature encoding in OhmNet

  •  

35 of 50

OhmNet overview

  • OhmNet framework has two parts

​

    • Single network objective: embeddings of nodes with similar neighborhoods should be similar

​

    • Hierarchical dependency: nodes in nearby layers in the hierarchy have similar embeddings

​

36 of 50

Encoding each network

  •  

37 of 50

Incorporating the hierarchy

  •  

38 of 50

OhmNet objective

  • This has two parts

Per network objective

Hierarchical part

39 of 50

OhmNet Algorithm

Sample neighborhoods

Go over all leaf nodes in the tissue tree

40 of 50

OhmNet Algorithm

Learn the encodings

41 of 50

OhmNet evaluation dataset

  • 107 tissues with tissue-specific networks from Greene 2015
  • Unweighted PPI has 21,557 nodes and 342,353 interactions
  • Tissue-specific
    • An edge exists in tissue t if either both partners are co-expressed
    • OR one partner is expressed in the tissue and the other partner is ubiquitous
  • Gene function
    • 584 tissue-specific cellular functions covering 48 tissues
    • All functions for a tissue were assigned to the leaf corresponding to the tissue

42 of 50

OhmNet prediction tasks

  • Predict tissue-specific function
    • Multi-node classification

​

  • Transfer learning
    • Transfer information from one or more layers to a target layer in tissue hierarchy

​

  • Data visualization

43 of 50

Predicting cellular function

44 of 50

Transfer learning task

  • For each target tissue t, train a classifier using all tissue network embeddings other than t

​

​

  • Predict class using trained classifier for t
    • no training

45 of 50

Predicting function in a transfer learning manner

Degradation in performance is expected, but only graceful degradation

46 of 50

Visualizing tissue-specific networks

OhmNet was used only on the brainstem and brain networks and project the nodes in a 2D space

47 of 50

OhmNet key points

  • Task independent approach to embed nodes of multiple related networks
  • Can accurately predict function in the same or transfer learning mode
  • Can be used to visualize hierarchically related networks

48 of 50

Conclusions

  • Representation learning on networks finds data-driven encodings that can be input into standard ML methods
  • (Shallow) node embeddings can be based on matrix factorization and random walks
  • Deep embeddings have the potential to address limitations of shallow embeddings
    • Better use of node attributes
    • Fewer parameters
    • Generalize to new nodes and graphs (inductive)
  • OhmNet: node2vec encoding that also uses relationship across samples

49 of 50

References

  • Zitnik, M. & Leskovec, J. Predicting multicellular function through multi-layer tissue networks. Bioinformatics 33, i190–i198 (2017).
  • Hamilton, W. L., Ying, R. & Leskovec, J. Representation Learning on Graphs: Methods and Applications. arXiv:1709.05584 [cs] (2018).
  • Nelson, W. et al. To Embed or Not: Network Embedding as a Paradigm in Computational Biology. Front Genet 10, 381 (2019).
  • Grover, A. & Leskovec, J. node2vec: Scalable Feature Learning for Networks. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (2016).
  • Check https://www.youtube.com/watch?v=3XTuhchTWd8&t=227s

​

​

​

50 of 50

DeepWalk

  • In DeepWalk, the decoding function is defined as:

​

​

​

​

​

​

​

  • Unbiased random walks
  • Naively optimizing with this normalization term is expensive: DeepWalk uses node grouping and hierarchical softmax to reduce the number of nodes in the normalization term.

​

​

​

​

​

​

Perozzi et al. 2014