Avoiding Structural Pitfalls: Self-Supervised Low-Rank Feature Tuning for Graph Test-Time Adaptation

Haoxiang Zhang, Zhuofeng Li, Qiannan Zhang, Ziyi Kou, Juncheng Li, Shichao PeiTMLR 2025

Abstract

Pre-trained graph neural networks (GNNs) have demonstrated significant success in leveraging large-scale graph data to learn transferable representations. However, their performance often degrades under distribution shifts, particularly in real-world scenarios where test labels are unavailable. To address this challenge, we propose Graph Optimization via Augmented Transformations (GOAT), a novel self-supervised test-time tuning paradigm that adapts pre-trained GNNs to distribution-shifted test data by focusing exclusively on node feature transformations. By avoiding complex and often suboptimal graph structure transformations, GOAT overcomes the limitations of existing data-centric methods. To further address the issue of transformation collapse, where feature transformations converge to trivial solutions—such as when the test-time learned data-centric transformation degenerates into a constant or identity mapping across different inputs, we introduce a parameter-efficient low-rank adapter that generates diverse transformations tailored to individual input graphs. This design not only enhances adaptation performance but also improves interpretability by avoiding modifications to the graph structure. Through extensive experiments on six real-world datasets with diverse distribution shifts, we demonstrate that GOAT achieves consistent performance improvements across different pre-trained GNN backbones, outperforming state-of-the-art test-time adaptation methods.

Introduction

Graph Neural Networks (GNNs) are powerful tools for learning on graph-structured data, but they often suffer from significant performance degradation when deployed in environments that differ from their training data—a challenge known as distribution shift. For instance, a model trained on historical citation networks may struggle with modern academic papers due to evolving terminology and research trends.

Existing test-time adaptation (TTA) methods often attempt to modify the graph's structure (edges) to mitigate these shifts. However, this "data-centric" approach introduces a "structural pitfall": structural optimization is computationally expensive, creates a vast and difficult-to-optimize search space, and lacks interpretability. Furthermore, these methods are prone to "transformation collapse," where the adaptation process converges to trivial identity mappings. GOAT addresses these issues by shifting the focus entirely to node feature transformations.

Methodology

The GOAT framework introduces a lightweight, low-rank adapter to tune node features without altering the underlying graph structure. Its core components include:

  • Feature-Only Tuning: Instead of changing the adjacency matrix, GOAT learns a dynamic offset ($\Delta X$) for node features. This avoids the complexity and instability of structural optimization.
  • Low-Rank Adapter (LRA): To generate these offsets efficiently, GOAT uses a cross-attention module that projects node features into a latent space represented by "virtual nodes." This captures global graph context with linear time complexity, avoiding the $O(N^2)$ cost of standard attention.
  • Self-Supervised Learning ($L_{A2A}$): Since test labels are unavailable, GOAT creates multiple augmented views of the test graph (e.g., using DropEdge). The loss function encourages adapted features from one view to align with unadapted features from another, effectively bridging the distribution gap.
  • Collapse Prevention: The low-rank architecture and a specific consistency loss act as regularizers, preventing the model from converging to useless constant or identity mappings.
Overview of the GOAT framework, illustrating the test-time tuning and inference phases.

Experiments and Results

We evaluated GOAT across six real-world datasets representing three types of shifts: artificial transformations (Cora, Amazon-Photo), temporal evolution (Elliptic, OGB-ArXiv), and cross-domain transfer (Twitch-E, FB-100).

Superior Performance and Efficiency

GOAT consistently outperformed state-of-the-art methods across all datasets and four different GNN backbones (GCN, SAGE, GAT, and GPR). On the Elliptic dataset, which features financial transactions evolving over time, GOAT improved the F1 score of a GraphSAGE model by approximately 18.5% compared to the unadapted baseline.

Performance comparison of GOAT against state-of-the-art methods across various datasets and GNN backbones.

Beyond accuracy, GOAT is significantly more efficient than training-time methods. On the OGB-ArXiv dataset, GOAT required only 5GB of VRAM, whereas competitors like EERM required over 24GB, often leading to Out-of-Memory errors. Additionally, the feature-offset approach provides a level of interpretability that edge-modifying methods lack; researchers can visualize the distribution of $\Delta X$ to quantify exactly how much the test data has drifted from the training set.

Conclusion

GOAT demonstrates that modifying graph edges is not necessary for effective test-time adaptation. By focusing on low-rank feature transformations, GOAT provides a more stable, efficient, and interpretable solution for deploying GNNs in dynamic, real-world environments. Future work will explore more sophisticated graph augmentations and apply this framework to high-stakes domains like misinformation detection and financial risk control.

Summary updated

BibTeX
@article{zhang2025avoiding,
  author = {Haoxiang Zhang and Zhuofeng Li and Qiannan Zhang and Ziyi Kou and Juncheng Li and Shichao Pei},
  title = {{Avoiding Structural Pitfalls: Self-Supervised Low-Rank Feature Tuning for Graph Test-Time Adaptation}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=yiS6q42LLt},
}
Figure