GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - MKLab-ITI/ugnn: Universal Minimization on the Node Domain

BranchesTags
Open more actions menu

Latest commit

 

History

14 Commits
14 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
results
results
 
 
ugnn
ugnn
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
requirements.txt
requirements.txt
 
 
test.py
test.py
 
 
test2.py
test2.py
 
 

Repository files navigation

Universal Minimization on the Node Domain

This is an experimentation framework assessing how well graph neural networks (GNN) can minimize various attributed graph functions on the node domain.

Author: Emmanouil (Manios) Krasanakis
Contact: [email protected]
License: Apache 2

🔥 About

  • Based on torch geometric.
  • Modular architecture definition.
  • Implementation of several diffusion-based architectures (GCN, GCNII, APPNP, S2GC, DeepSet on graphs).
  • Several benchmarking tasks for the ability to approximate equivariant attributed graph functions.
  • Uniform interface that treats multiple graphs as one disconnected graph.

🚀 Quickstart

First declare a predictive task on which to assess a GNN architecture, and obtain its training-test-validation data subtasks. If there are multiple graphs, they are packed together in one unconnected graph. A quick way for creating this setup is:

from ugnn import tasks
import torch

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
task = tasks.DegreeTask(nodes=20, max_density=0.5, graphs=1000).to(device)
splits = task.split() # default split dictionary 

Then declare an architecture and train it. Training returns the test accuracy, but test nodes are never used for training or validation. Training has a default patience=100 that waits for that many epochs for either training or validation loss to decrease. Losses and predictive performances are obtained from the predictive tasks.

from ugnn import architectures
from ugnn.utils import training

model = architectures.APPNP(task.feats, task.classes, hidden=64).to(device)
optimizer = torch.optim.Adam(model.parameters(), lr=0.01, weight_decay=5e-4)
acc = training(
    model=model,
    optimizer=optimizer,
    **splits # the previously obtained splits
)
print(f'{model.__class__.__name__} accuracy {acc:.4f}')

About

Universal Minimization on the Node Domain

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.