🤖 AI Summary
Existing graph neural networks (GNNs) primarily learn single-node representations; direct aggregation fails to capture intra-set dependencies within multi-node structures—such as links, hyperedges, or subgraphs.
Method: We propose the “labeling trick”: pre-labeling the target node set, reconstructing the graph structure accordingly, and then encoding and aggregating via standard GNNs—enabling end-to-end learning of multi-node representations.
Contribution/Results: We formally characterize this paradigm for the first time, theoretically demonstrating its capacity to model higher-order node dependencies. The framework unifies and generalizes to partially ordered sets, subsets, and hypergraphs. Compatible with mainstream architectures (e.g., GCN, GAT), it supports undirected/directed link prediction, hyperedge prediction, and subgraph classification. On multiple benchmarks, it achieves average improvements of 3.2% in AUC (link prediction), 5.7% in F1-score (hyperedge prediction), and 4.9% in accuracy (subgraph classification), validating both effectiveness and broad applicability.
📝 Abstract
In this paper, we study using graph neural networks (GNNs) for extit{multi-node representation learning}, where a representation for a set of more than one node (such as a link) is to be learned. Existing GNNs are mainly designed to learn single-node representations. When used for multi-node representation learning, a common practice is to directly aggregate the single-node representations obtained by a GNN. In this paper, we show a fundamental limitation of such an approach, namely the inability to capture the dependence among multiple nodes in the node set. A straightforward solution is to distinguish target nodes from others. Formalizing this idea, we propose ext{labeling trick}, which first labels nodes in the graph according to their relationships with the target node set before applying a GNN and then aggregates node representations obtained in the labeled graph for multi-node representations. Besides node sets in graphs, we also extend labeling tricks to posets, subsets and hypergraphs. Experiments verify that the labeling trick technique can boost GNNs on various tasks, including undirected link prediction, directed link prediction, hyperedge prediction, and subgraph prediction. Our work explains the superior performance of previous node-labeling-based methods and establishes a theoretical foundation for using GNNs for multi-node representation learning.