[Paper Review] Empowering Graph Representation Learning with Test-Time Graph Transformation
This paper proposes GTrans, a data-centric framework that enhances graph neural network (GNN) generalization and robustness by refining graph data at test time through joint optimization of node features and graph structure using a contrastive surrogate loss. GTrans achieves state-of-the-art performance across three challenging scenarios—distribution shift, abnormal features, and adversarial attacks—with improvements up to 8.2% over baselines, all while preserving pre-trained models without retraining.
As powerful tools for representation learning on graphs, graph neural networks (GNNs) have facilitated various applications from drug discovery to recommender systems. Nevertheless, the effectiveness of GNNs is immensely challenged by issues related to data quality, such as distribution shift, abnormal features and adversarial attacks. Recent efforts have been made on tackling these issues from a modeling perspective which requires additional cost of changing model architectures or re-training model parameters. In this work, we provide a data-centric view to tackle these issues and propose a graph transformation framework named GTrans which adapts and refines graph data at test time to achieve better performance. We provide theoretical analysis on the design of the framework and discuss why adapting graph data works better than adapting the model. Extensive experiments have demonstrated the effectiveness of GTrans on three distinct scenarios for eight benchmark datasets where suboptimal data is presented. Remarkably, GTrans performs the best in most cases with improvements up to 2.8%, 8.2% and 3.8% over the best baselines on three experimental settings. Code is released at https://github.com/ChandlerBang/GTrans.
Motivation & Objective
- To address the limitations of GNNs under poor data quality, such as distribution shift, abnormal features, and adversarial attacks.
- To develop a method that improves GNN generalization and robustness without modifying pre-trained models or requiring retraining.
- To provide a data-centric alternative to model-centric approaches that are costly and infeasible for large-scale models.
- To design a test-time graph transformation framework that adapts graph data dynamically during inference.
- To establish theoretical justification for data adaptation over model adaptation in GNNs.
Proposed method
- GTrans models graph transformation as perturbation injection on node features and graph structure, optimized via gradient descent.
- It jointly optimizes feature and adjacency matrix perturbations to minimize a parameter-free surrogate loss based on contrastive learning.
- The surrogate loss is designed to maximize feature consistency between original and augmented views of the test graph, using data augmentations like DropEdge.
- The framework employs a gradient correlation analysis to guide the transformation process and ensure performance gains.
- It uses a differentiable optimization process that allows end-to-end refinement of the test graph while keeping the pre-trained GNN fixed.
- The method is flexible and transferable, compatible with any pre-trained GNN and deployment setting.
Experimental results
Research questions
- RQ1Can test-time graph transformation improve GNN performance under data quality issues such as distribution shift?
- RQ2How does data adaptation at test time compare to model adaptation in terms of robustness and performance?
- RQ3What surrogate loss function is most effective for guiding test-time graph refinement without access to model parameters?
- RQ4How sensitive is the performance of GTrans to the perturbation budget and choice of data augmentation?
- RQ5Can GTrans provide interpretability by revealing which graph modifications improve model predictions?
Key findings
- GTrans achieves performance improvements of up to 2.8%, 8.2%, and 3.8% over the best baselines in distribution shift, abnormal features, and adversarial attack settings, respectively.
- The proposed contrastive surrogate loss outperforms reconstruction, entropy, and SLAPS losses, which often degrade performance or underperform.
- GTrans is highly effective under adversarial attacks, with performance increasing from 56.66% to 63.47% as the perturbation budget B increases from 0.5% to 30%.
- The method shows minimal sensitivity to budget B in distribution shift and abnormal feature settings, indicating robustness to perturbation scale in these cases.
- Different augmentations—DropEdge, node dropping, and subgraph sampling—yield comparable performance, demonstrating the framework’s flexibility and robustness to augmentation choice.
- Visualizations show that GTrans identifies and corrects harmful graph patterns, providing interpretability into which modifications improve model predictions.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.