Fast Graph Sharpness-Aware Minimization for Enhancing and Accelerating Few-Shot Node Classification

Graph Neural Networks (GNNs) have shown superior performance in node classification. However, GNNs perform poorly in the Few-Shot Node Classification (FSNC) task that requires robust generalization to make accurate predictions for unseen classes with limited labels. To tackle the challenge, we propose the integration of Sharpness-Aware Minimization (SAM)--a technique designed to enhance model generalization by finding a flat minimum of the loss landscape--into GNN training. The standard SAM approach, however, consists of two forward-backward steps in each training iteration, doubling the computational cost compared to the base optimizer (e.g., Adam). To mitigate this drawback, we introduce a novel algorithm, Fast Graph Sharpness-Aware Minimization (FGSAM), that integrates the rapid training of Multi-Layer Perceptrons (MLPs) with the superior performance of GNNs. Specifically, we utilize GNNs for parameter perturbation while employing MLPs to minimize the perturbed loss so that we can find a flat minimum with good generalization more efficiently. Moreover, our method reutilizes the gradient from the perturbation phase to incorporate graph topology into the minimization process at almost zero additional cost. To further enhance training efficiency, we develop FGSAM+ that executes exact perturbations periodically. Extensive experiments demonstrate that our proposed algorithm outperforms the standard SAM with lower computational costs in FSNC tasks. In particular, our FGSAM+ as a SAM variant offers a faster optimization than the base optimizer in most cases. In addition to FSNC, our proposed methods also demonstrate competitive performance in the standard node classification task for heterophilic graphs, highlighting the broad applicability. The code is available at https://github.com/draym28/FGSAM_NeurIPS24.

Paper

Similar papers

Peer review

Reviewer phcW5/10 · confidence 3/52024-07-14

Summary

The paper introduces an innovative approach to improve the generalization capabilities of Graph Neural Networks (GNNs) in few-shot node classification tasks. The authors propose a novel algorithm, Fast Graph Sharpness-Aware Minimization (FGSAM), which incorporates sharpness-aware minimization (SAM) techniques into GNN training but reduces the typical computational overhead by integrating multilayer perceptrons (MLPs) for efficiency. This method not only demonstrates superior performance on few-shot learning tasks compared to traditional techniques but also offers significant computational advantages, particularly in reducing training times.

Strengths

originality: medium quality: medium clarity: medium significance: medium

Weaknesses

Some experiments are missing and the proof need to be double checked carefully.

Questions

1. What is the standard deviations for the results in table 4? Are the improvements significant? 2. Is there any theoretical justification for PeerMLP? 3. What is g in equation (8)? 4. The proof of theorem 4.1 is confusing. Do you assume all nodes have the same degree deg(i)?

Rating

5

Confidence

3

Soundness

2

Presentation

3

Contribution

2

Limitations

the authors adequately addressed the limitations

Authorsrebuttal2024-08-14

We thank you for acknowledging our work and for raising the score. Thanks again for your time and effort in reviewing our work.

Reviewer 4EHj5/10 · confidence 3/52024-07-17

Summary

This paper focuses on efficient graph neural network (GNN) training in few-shot node classification (FSNC) problem by extending sharpness-aware minimization (SAM) for reducing the computational cost and improving the generalization of GNNs on unseen classes. The training phase is accelerated by perturbing the parameters of GNN and then minimizing the perturbation loss of GNN without the message passing mechanism (MLP). Experiments have been conducted to verify the effectiveness and efficiency of the proposed method.

Strengths

1. It is interesting to incorporate SAM technique with GNN by removing MP during training and reintroducing MP in inference, which is reasonable to improve the generalization of FSNC. 2. The proposed method could be conveniently integrated into existing GNN-based few-shot node classification models, which is verified in the experiments. 3. The carefully designed experiments highlight the effectiveness of the proposed method in reducing the computational costs of GNN training. 4. The paper is well-organized and explains the method very clearly. In addition, the landscape visualization and toy case analyses also make the motivation and ideas easy to understand.

Weaknesses

1. There are related work on applying SAM to few-shot tasks (Sharp-MAML) [1] and performing SAM every $k$ steps [2], and the innovation of this work is not significant compared with the above work. [1] Sharp-maml: Sharpness-aware model-agnostic meta learning. ICML, 2022 [2] Towards efficient and scalable sharpness-aware minimization. CVPR, 2022 2. The experiments only compare with small-sample node classification models and variants of SAM from 2022, lacking comparisons with the latest baseline methods of FSNC.

Questions

1. Since this work focuses on solving FSNC problems, the authors should provide a comparison with the state-of-the-art FSNC methods, such as COSMIC [3] and COLA [4], in theoretical analysis and experiments. [3] Contrastive meta-learning for few-shot node classification. SIGKDD, 2023 [4] Graph contrastive learning meets graph meta learning: A unified method for few-shot node tasks. WWW, 2024 2. Why adding 25% noisy edges yields better results than adding only 15%? in Figure 4? The authors should discuss or explain this issue in details.

Rating

5

Confidence

3

Soundness

3

Presentation

3

Contribution

2

Limitations

The authors describe some limitations of the proposed method in time consumption section.

Reviewer nij78/10 · confidence 4/52024-07-21

Summary

The paper proposes a method for few-shot learning on graphs leveraging sharpness-aware minimization (SAM) from the vision community. The paper explains SAM as a technique for gradient perturbation during training to push the parameters to "flatter" regions of the loss space in hopes of achieving better generalization in the few shot setting. However, SAM is inherintely slower, requiring two backward/forward passes during training; one to compute the loss gradient and a second to determine the perturbation direction. The authors propose multiple ideas to overcome the added computation and to leverage graph topology. The authors strategically substitute Graph Neural Networks (GNNs) with Multilayer Perceptions (MLPs) to avoid the burden of message passing in some parts of their algorithm while preserving graph topologies in others. The authors propose a second scheme that leverages iterations of an approximate perturbation scheme with periodic exact evaluations of SAM. The authors present ablation studies on multiple SOTA models and 9 datasets and show improvements in training times and accuracy.

Strengths

The authors present multiple novel approaches to overcome computational challenges applying SAM techniques to structured data to achieve better generality in the few shot case. I only have a few style suggestions at the beginning of the paper but otherwise the paper does a good job of explaining multiple, complex ideas in a clear way. The paper does present a significant result, blending ideas from PeerML and SAM from the vision community to contribute to making structured models more generalizable.

Weaknesses

I think the paper is very good and clear in most cases. The only weaknesses I would note (and this may be subjective) would be to make some style improvements in the beginning of the paper. (1) In the abstract (line 14) Moreover, our method ingeniously reutilizes... is a bit grandiose; I would prefer a more scientific tone and delete "Moreover" and "ingeniously"; "Our method reutilizies... (2) Remove "for the first time" in 20. It is clear that the ideas are novel. (3) Line 50 is the first time Message Passing is abbreviated as MP. I would follow the convention used in the paper for the introduction of other abbreviations where the first letter of the abbreviated character is in bold and capitalized. (4) Line 93 "as follows" is not followed by an equation but another sentence. Maybe the equation should be presented after the "as follows" text and the next sentence come after the equation?

Questions

(1) I find the paragraph containing lines 137-145 hard to read due to how the ideas are presented: "Inspired by previous work...we propose to remove MP during training, but reintroduce it..Reintroducing MP after training can improve the performance significanly but still cannot surpass GNNs...""Henve we propose minimizing training loss on PeerMLPs but minimizing the sharpness according to GNNs. There seems to be some logical oscillation in the text. First it seems that a scheme similar to PeerMLP is uses where the GNN is removed during training and injected back during inference. In the next few sentences, this seems to be abandoned and the GNN brought back for the SAM portion of training. I believe the experiments and ideas really did implement the latter formulation but either I'm misunderstanding or this paragraph could use some work to be clearer. (2) In table 8 in the Appendix, I don't believe the best results are actually in boldface. Maybe this was due to my printer or perhaps the table needs to be reformatted?

Rating

8

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

No limitations.

Reviewer nij72024-08-12

Addressed concerns

Thank you for addressing the concerns. Best of luck with the conference.

Reviewer 4EHj2024-08-12

Thanks for your feedback, which has addressed my concerns on the comparison methods and the results of adding noisy edges. Thus, I will maintain my score.

Reviewer phcW2024-08-13

Thanks for the response. The authors addressed some of my concerns and I will increase my score to 5

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC