Beyond Node Embedding: A Direct Unsupervised Edge Representation Framework for Homogeneous Networks

Sambaran Bandyopadhyay, Anirban Biswas, M. N. Murty, Ramasuri NarayanamarXiv 2019

TL;DR

Instead of relying on heuristic aggregations of node vectors to represent graph edges, this paper introduces line2vec, the first direct unsupervised edge embedding framework for homogeneous networks. By transforming a network into a weighted line graph and optimizing for a novel concept called "collective homophily," line2vec preserves edge-specific semantics and significantly outperforms traditional node-aggregation methods on downstream edge-centric tasks.

What Problem Does This Paper Address?

Graph embedding algorithms (like node2vec or DeepWalk) have revolutionized how we analyze networks by mapping nodes to low-dimensional vectors. However, when it comes to edge-centric tasks—such as link prediction, edge clustering, or network diffusion analysis—edges are typically treated as an afterthought.

Standard practices usually construct an edge embedding by simply averaging or taking the Hadamard product of its two endpoint node vectors. The authors demonstrate that this heuristic approach is inherently suboptimal. Because node embedding objectives focus on node proximities, their aggregated edge representations fail to preserve the underlying community structures of edges.

As shown in Figure 1, standard node aggregation (b) smears edge communities together, whereas a direct edge embedding approach (c) cleanly separates them.

Figure 1: Edge Visualization: (a) We created a small synthetic net- work with two communities. So, there are three types of edges: Green (or red) edges with both the end points belonging to the green (or red respectively) community; Blue edges with end points belonging to two different communities. (b) node2vec embedding (8 dimensional) of the edges obtained by taking average of the embeddings of the end vertices and then used t-SNE for visualization. (c) Direct edge em- beddings (8 dimensional) obtained by line2vec and then used t-SNE for visualization. Clearly, line2vec is superior which visually sepa- rates the edge communities, compared to that with the conventional way of aggregating node embeddings to obtain edge representation.

Methods

The authors propose an elegant framework called line2vec that bypasses node embeddings entirely to learn edge representations directly. The pipeline consists of three main steps:

  1. Line Graph Transformation: The original graph $G$ is converted into a line graph $L(G)$, where every edge in the original graph becomes a node in the line graph. Two nodes in $L(G)$ are connected if their corresponding edges in $G$ share a common vertex.
  2. Weighted Line Graph Formation: To prevent high-degree nodes from dominating random walks in the line graph, the authors introduce a clever weighting scheme. The weights ensure that the structural dynamics and relative importance of edges from the original graph are preserved.
  3. Collective Homophily Optimization: In a line graph, all edges incident on a single node in the original graph form a fully connected clique (see Figure 2). Standard pairwise homophily is insufficient here. Instead, the authors introduce collective homophily: they force the embeddings of all nodes belonging to a clique in $L(G)$ to lie within a low-dimensional sphere of radius $R_u$ centered at $c_u$ (see Figure 3).

The final objective function combines a skip-gram model (driven by random walks on the weighted line graph) with these spherical constraints, solved using stochastic gradient descent (SGD) via penalty functions.

Figure 2: Transformation process of a graph into its line graph. (a) Represents an information network G. (b) Each edge in the original graph has a corresponding node in the line graph. Here the green edges represent the nodes in line graph. (c) For each adjacent pair of edges in G there exists an edge in L(G). The dotted lines here are the edges in the line graph. (d) The line graph L(G) of the graph G
Figure 3: Collective Homophily ensures the embeddings of the edges which are connected via a common node in the network, stay within a sphere of small radius.

Datasets

The framework was evaluated on five real-world datasets spanning different sizes and domains:

  • Zachary’s Karate Club: A small, classic social network.
  • Dolphin Social Network: An undocumented community network of bottlenose dolphins.
  • Cora & Pubmed: Standard citation networks where nodes represent papers and edges represent citations.
  • MSA (Microsoft Academic): A large-scale co-authorship network.

Key Insights and Ideas

  • Cliques in the Line Graph: The foundational "aha" moment is realizing that a single node with $n$ edges in the original graph induces a clique of size $n$ in the line graph. This structural shift requires moving from pairwise optimization to group-based geometric constraints.
  • Dual-Purpose Centers ($c_u$): Although designed for edges, the optimization process naturally yields the center of each sphere ($c_u$). This center acts as a highly robust node embedding that captures edge-distribution properties better than standard node-embedding techniques on certain tasks.
  • Radius as Centrality ($R_u$): The learned radius $R_u$ of each node's sphere correlates strongly with classical network centrality metrics like closeness and betweenness centrality. A node connecting diverse communities requires a larger radius to encapsulate its structurally distinct edges.

Key Results

The authors evaluated line2vec across three downstream edge-centric tasks:

  • Edge Visualization: Using t-SNE plots on the Cora dataset, line2vec demonstrated a vastly superior ability to visually segregate edge communities compared to DeepWalk, node2vec, and SDNE.
  • Edge Clustering: Paired with KMeans++, line2vec consistently outperformed all baselines in unsupervised clustering accuracy across all five datasets.
  • Edge Classification: When training a logistic regression classifier on just 10% of the labeled edges, line2vec achieved state-of-the-art or highly competitive Micro-F1 scores, proving that the direct representations retain superior semantic properties.

Limitations and Future Work

While powerful, line2vec has a few notable limitations:

  • Computational Complexity: Edge embedding is inherently more expensive than node embedding because graphs typically have far more edges than nodes. The line graph construction scales with the maximum degree of the nodes ($O(|V|d^2)$), making it computationally heavy for extremely dense networks.
  • Homogeneous Networks Only: The current formulation is restricted to networks with a single type of node and edge.

Future Directions: The authors plan to extend this direct edge-embedding methodology to heterogeneous information networks (HINs) and knowledge bases, where modeling distinct edge/relation types directly is of paramount importance.

Summary updated

BibTeX
@misc{bandyopadhyay2019beyond,
  author = {Sambaran Bandyopadhyay and Anirban Biswas and M. N. Murty and Ramasuri Narayanam},
  title = {{Beyond Node Embedding: A Direct Unsupervised Edge Representation Framework for Homogeneous Networks}},
  year = {2019},
  eprint = {1912.05140},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.05140},
}
Figure