Git Product home page Git Product logo

shglnetwork's Introduction

Self-supervised Heterogeneous Hypergraph Neural Network for Graph-level Classification (SHGLNN)

Input: Graph dataset G = {G₁, G₂, ..., Gₙ}

Output: Graph-level classification predictions Y_pred

1: Initialize model parameters θ

2: // Main training loop for each epoch do
3: // Iterate over each graph in the dataset
for each graph Gᵢ in G do
4: // Step 1: Hypergraph Construction
E_intra, E_inter = generate_hyperedges(Gᵢ)

5: // Step 2: Hypergraph Convolutions
H_node, H_edge = hypergraph_convolution(E_intra, E_inter)

6: // Step 3: Context-Aware Attentive Graph-Level Pooling
H_graph = attentive_pooling(H_node, H_edge) end for
end for

7: // Step 4: High-Order-Aware Graph Augmentation
G_augmented_list = high_order_augmentation(G)

8: // Step 5: Self-Supervised Contrastive Learning
for each G_aug in G_augmented_list do

9: H_aug_node, H_aug_edge = hypergraph_convolution(E_intra, E_inter)

10: H_aug_graph = attentive_pooling(H_aug_node, H_aug_edge)

11: Loss = contrastive_loss(H_graph, H_aug_graph)

12: θ = optimizer.update(Loss, θ) end for

13: // Step 6: Graph-Level Classification
Y_pred = []
for each test graph G_test in G_test do

14: E_intra_test, E_inter_test = generate_hyperedges(G_test)

15: H_node_test, H_edge_test = hypergraph_convolution(E_intra_test, E_inter_test)

16: H_graph_test = attentive_pooling(H_node_test, H_edge_test)

17: Y_pred_test = classifier(H_graph_test)

18: Y_pred.append(Y_pred_test) end for

19: return Y_pred

shglnetwork's People

Contributors

khizer-hayat avatar faizan1234567 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.