Beyond Fixed Prompt Configuration: Alternating Policy Learning for Adaptive Topology-Based Prompting in Few-Shot Graph Learning
Abstract
Graph Prompt Learning (GPL) adapts frozen pre-trained graph models to few-shot graph tasks through a small set of trainable prompts that encode task-specific information. Topology-based prompting instantiates this idea by augmenting an input graph with new prompt nodes and edges, yielding promising performance. However, prompt content and propagation structure are coupled, making it difficult to assess their individual effects and learn compatible configurations. In this paper, we empirically analyze two challenges in learning adaptive policies for topology-based prompting: asymmetric performance effects and coupled configuration selection. We then propose TTPR, a two-stage reinforcement framework that alternately optimizes two policies to generate adaptive configurations, with each policy conditioned on configurations generated by the other fixed policy. These conditional updates separate policy evaluation while preserving configuration compatibility. Specifically, TTPR models an edge-level policy to construct connection patterns and optimizes it with Connection Relative Policy Optimization (CRPO) through group-wise comparisons of complete connection patterns. The other is a node-level policy that generates prompt-node schemes and is optimized with Incremental Node Proximal Policy Optimization (INPPO) through incremental prompt-count decisions and feature generation. Across diverse datasets and pre-training strategies, TTPR ranks first in 8/10 few-shot node classification settings and attains the highest average performance across graph classification benchmarks.