TLDR: GraphTOP is a new framework that improves Graph Neural Networks (GNNs) by adapting them to specific tasks through modifying the graph’s structure (topology) rather than just node features. It formulates this as an edge rewiring problem within local subgraphs, using a continuous probability space and regularization to ensure efficiency and sparsity. Experiments show GraphTOP significantly outperforms existing methods in node classification across various datasets and pre-training strategies.
Graph Neural Networks (GNNs) have emerged as a powerful tool for understanding complex data structures like social networks, knowledge graphs, and traffic systems. They learn meaningful representations from vast amounts of graph data, leading to breakthroughs in tasks such as node classification and link prediction. However, traditional GNN training often relies heavily on large quantities of labeled data, which can be scarce in real-world scenarios. Furthermore, models trained for one specific task may not generalize well to others, even on the same graph data.
To overcome these challenges, a common approach known as the “pre-training, adaptation” scheme has gained traction. This involves first training GNNs on unlabeled graph data (pre-training) and then fine-tuning them for specific downstream tasks (adaptation). A particularly effective strategy during the adaptation phase is “graph prompting.” Inspired by similar techniques in natural language processing and computer vision, graph prompting modifies the input graph data with learnable “prompts” while keeping the pre-trained GNN model itself unchanged.
Historically, most graph prompting methods have been “feature-oriented,” meaning they apply these prompts to node features or hidden representations within the network. While intuitive, these approaches often fall short because they tend to overlook a crucial aspect of graph data: its topology, or structure. Graph representations are not just about the features of individual nodes; they are fundamentally shaped by how these nodes are connected.
Introducing GraphTOP: A New Approach to Graph Prompting
This is where a groundbreaking new framework, GraphTOP (Graph Topology-Oriented Prompting), comes into play. GraphTOP introduces a pioneering investigation into graph prompting by focusing on modifying the graph’s topology rather than just its features. This novel approach aims to adapt pre-trained GNN models more effectively for downstream tasks, particularly node classification, by intelligently altering the connections between nodes.
GraphTOP redefines topology-oriented prompting as an “edge rewiring problem.” Imagine you have a local subgraph around a specific node; GraphTOP learns to decide which edges should exist between this target node and others within its multi-hop neighborhood. To make this complex, discrete problem solvable, the framework relaxes it into a continuous probability space using a technique called Gumbel-Softmax reparameterization. This allows the system to learn the probabilities of edges existing, rather than making hard binary decisions initially.
To ensure computational feasibility and prevent the graph from becoming overly dense, GraphTOP incorporates several clever mechanisms. It restricts the edge rewiring to multi-hop local subgraphs around each target node, significantly reducing complexity. Furthermore, it only rewires edges between the target node and other nodes within its local subgraph, keeping other connections intact. This design drastically improves efficiency, as demonstrated by experiments showing significantly faster running times and lower GPU memory usage compared to a variant that considers all node pairs within a subgraph.
The framework also includes two important regularization terms in its optimization objective. An entropy-based term encourages the learned edge probabilities to converge towards either 0 or 1, ensuring a stable and deterministic graph topology during inference. Another term controls the sparsity of the prompted graph, preventing it from becoming an impractical, almost fully connected network. This ensures that the modified graph remains meaningful and computationally manageable.
Also Read:
- Bridging Language and Structure: A Look at Large Language Models and Text-Attributed Graphs
- Strengthening Graph Neural Networks Against Adversarial Attacks with Singular Pooling
Demonstrated Effectiveness
Extensive experiments were conducted on five diverse graph datasets (Cora, PubMed, Amazon, Minesweeper, and Flickr) using four different pre-training strategies (GraphCL, SimGRACE, LP-GPPT, and LP-GraphPrompt). GraphTOP consistently outperformed six state-of-the-art baselines on multiple node classification tasks, securing the best performance in 17 out of 20 experiments. This strong empirical evidence validates GraphTOP’s effectiveness in leveraging graph topology modifications to enhance pre-trained GNN models.
The theoretical analysis further supports these findings, showing that GraphTOP’s edge rewiring design can effectively enlarge the expected Euclidean distance between node representations of different classes, thereby improving their linear separability and classification performance. The code for GraphTOP is publicly available, encouraging further research and application. You can find more details about this innovative research in the full paper: GraphTOP: Graph Topology-Oriented Prompting for Graph Neural Networks.


