Skip to content

[Model] NASA#239

Open
wensi123 wants to merge 1 commit into
BUPT-GAMMA:mainfrom
wensi123:nasa
Open

[Model] NASA#239
wensi123 wants to merge 1 commit into
BUPT-GAMMA:mainfrom
wensi123:nasa

Conversation

@wensi123

Copy link
Copy Markdown

1. Motivation and Context

This PR introduces an implementation of the NASA model from the paper: "Regularizing Graph Neural Networks via Consistency-Diversity Graph Augmentations".

The core contribution of this paper is a novel regularization method for Graph Neural Networks that improves performance and generalization in semi-supervised node classification tasks. It achieves this through:

  • A new graph augmentation strategy called Neighbor Replacement (NR), which perturbs the graph structure by replacing 1-hop neighbors with 2-hop neighbors to balance consistency and diversity.
  • A neighbor-constrained regularization loss (L_CR) that enforces prediction consistency among neighboring nodes in the augmented graph, effectively leveraging unlabeled data.

2. Summary of Changes

This PR adds the following components:

  • Core Library Components:

    • gammagl/transforms/nr_augmentor.py: A new NR_Augmentor_GammaGL class that performs the Neighbor Replacement augmentation on a gammagl.data.Graph object.
    • gammagl/models/nasa_gcn.py: A new NASA_GCN_GammaGL model, which is a GCN backbone equipped with the custom compute_nasa_loss function that includes both the supervised cross-entropy loss and the neighbor-constrained regularization loss.
    • gammagl/transforms/__init__.py: Exported NR_Augmentor_GammaGL.
    • gammagl/models/__init__.py: Exported NASA_GCN_GammaGL.
    • gammagl/utils/nasa_utils.py: Utility functions (accuracy_tlx, compute_gcn_norm) required for the example.
  • Example and Documentation:

    • examples/nasa/: A new directory for the NASA example.
    • examples/nasa/nasa_gcn_trainer.py: A complete training and evaluation script demonstrating how to use the new model and augmentor.
    • examples/nasa/README.md: A clear guide on how to run the example and understand its components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant