Classification of Edge-dependent Labels of Nodes in Hypergraphs

Minyoung Choe, Sunwoo Kim, Jaemin Yoo, Kijung Shin · DOI

Abstract

Traditional node classification in hypergraphs typically assumes a static, global label for each node. However, in many real-world scenarios, a node's role is context-dependent, varying based on the specific hyperedge it inhabits. This paper formalizes the task of edge-dependent node classification and introduces WHATsNet (Within-Hyperedge Attention Transformer Network) to solve it. WHATsNet leverages a novel within-hyperedge attention mechanism and centrality-based positional encodings to capture the nuanced roles of nodes within groups. Evaluated on six diverse datasets, WHATsNet consistently outperforms state-of-the-art models, highlighting the importance of modeling local group dynamics.

Introduction: The Need for Contextual Node Roles

In graph data, hypergraphs are the gold standard for representing group interactions. While a standard graph edge connects exactly two nodes, a hyperedge can contain any number of nodes, making it ideal for modeling research papers with multiple authors or email threads sent to a group.

Existing hypergraph neural networks (HNNs) typically focus on "global" node properties, assuming a node has one fixed label (e.g., a person’s department). This overlooks a crucial reality: context matters. In a co-authorship hypergraph, the same researcher might be the "First Author" on one paper but the "Senior Author" on another. This is an edge-dependent label.

Figure 1: Illustration of edge-dependent labels in a co-authorship hypergraph. A single author (node) can have different roles (labels) depending on the publication (hyperedge).

Before this work, there was no formal framework to classify these shifting roles or a dedicated model designed to capture the "within-group" dynamics that determine them.

Methodology: The WHATsNet Architecture

The authors propose WHATsNet, a transformer-based architecture designed specifically for edge-dependent classification. Its design centers on two primary innovations:

1. WithinATT (Within-Hyperedge Attention)

This module allows nodes to "attend" to other nodes within the same hyperedge. By treating nodes in a hyperedge like words in a sentence, it uses a Transformer-style attention mechanism to model their relationships. To maintain efficiency on large hyperedges, WHATsNet employs "inducing points"—a small set of trainable vectors that act as intermediaries, reducing computational complexity from quadratic to linear.

2. WithinOrderPE (Positional Encoding)

Standard Transformers require positional information to understand sequence order. Since hyperedges have no natural sequence, WHATsNet introduces relative centrality (e.g., Degree, PageRank, or Eigenvector centrality) as a positional encoding. This reflects the intuition that a node's relative "importance" within a group is a strong indicator of its role—for instance, the most central person in a project group often serves as the lead.

Figure 3: The WHATsNet architecture, highlighting the Within-Attention mechanism with inducing points and the integration of centrality-based positional encodings (WithinOrderPE).

The model iteratively updates hyperedge and node embeddings, facilitating a bidirectional flow of information between the individual and the group.

Experimental Evaluation

The authors evaluated WHATsNet on six real-world hypergraphs across three distinct domains: co-authorship (DBLP, AMiner), email communication (Enron, Eu), and Q&A platforms (StackOverflow Biology and Physics).

Key Results

WHATsNet consistently outperformed ten state-of-the-art competitors, including HNHN, HGNN, and AllSet. In several StackOverflow tasks, it achieved a ~10% improvement in Micro-F1 and Macro-F1 scores. Ablation studies confirmed that both WithinATT and WithinOrderPE are critical; removing centrality-based encodings led to a significant drop in accuracy, proving that relative importance is a vital feature for role classification. Beyond classification, the authors demonstrated that WHATsNet's embeddings improved performance in downstream tasks like ranking aggregation and product return prediction.

Discussion and Future Directions

The paper demonstrates that hypergraphs are non-reducible; breaking them into pairs (clique expansion) loses the group structure necessary to distinguish edge-dependent labels. By shifting the focus from what a node is to how it acts within a group, WHATsNet provides a more realistic model for social and biological systems.

While efficient, WHATsNet currently requires pre-computing multiple centrality measures. Future research may explore dynamic hypergraphs to see how roles change over time, or develop methods for the model to learn its own "centrality-like" positional encodings end-to-end.

Summary updated

BibTeX
@inproceedings{choe2023classification,
  author = {Minyoung Choe and Sunwoo Kim and Jaemin Yoo and Kijung Shin},
  title = {{Classification of Edge-dependent Labels of Nodes in Hypergraphs}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2023},
  doi = {10.1145/3580305.3599274},
}
Figure