  Spatio-temporal graph neural networks have demonstrated efficacy in capturing
complex dependencies for urban computing tasks such as forecasting and kriging.
However, their performance is constrained by the reliance on extensive data for
training on specific tasks, which limits their adaptability to new urban
domains with varied demands. Although transfer learning has been proposed to
address this problem by leveraging knowledge across domains, cross-task
generalization remains underexplored in spatio-temporal graph transfer learning
methods due to the absence of a unified framework. To bridge this gap, we
propose Spatio-Temporal Graph Prompting (STGP), a prompt-enhanced transfer
learning framework capable of adapting to diverse tasks in data-scarce domains.
Specifically, we first unify different tasks into a single template and
introduce a task-agnostic network architecture that aligns with this template.
This approach enables the capture of spatio-temporal dependencies shared across
tasks. Furthermore, we employ learnable prompts to achieve domain and task
transfer in a two-stage prompting pipeline, enabling the prompts to effectively
capture domain knowledge and task-specific properties at each stage. Extensive
experiments demonstrate that STGP outperforms state-of-the-art baselines in
three downstream tasks forecasting, kriging, and extrapolation by a notable
margin.
