MCPcopy Create free account
hub / github.com/WillHua127/GraphKAN-Graph-Kolmogorov-Arnold-Networks

github.com/WillHua127/GraphKAN-Graph-Kolmogorov-Arnold-Networks @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
10 symbols 25 edges 3 files 0 documented · 0% updated 2y ago★ 3505 open issues

Browse by type

Functions 8 Types & classes 2
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

GraphKAN -- Implementation of Graph Neural Network version of Kolmogorov Arnold Networks (GraphKAN)

The only dependencies are torch and pytorch_geometric.

If the gpu (cuda) running fails, change to cpu training by changing:

args.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') ------> args.device = torch.device('cpu')

Thanks to the original implementations KAN (https://github.com/KindXiaoming/pykan) and FourierKAN (https://github.com/GistNoesis/FourierKAN), you guys are amazing.

Still at experimental stage to see if KAN really works on graph-structured data.


Two key experimental observations:

(1) It is way much better to implment KAN for graphs in the latent feature space.

That is having a Linear Layer to project the input feature in to latent space first: self.lin_in = nn.Linear(in_feat, hidden_feat, bias=use_bias)

Rather than directly using the KAN Layer for input features like: self.lin_in = KANLayer(in_feat, hidden_feat, grid_feat, addbias=use_bias)

! ! ! If you do not have the Linear Layer for low-dimensional latent feature projection, KAN WILL NOT HAVE ANY TRAINING SIGNAL (this is really interesting, expect to work on some theoretical aspects after obtaining some experimental results)

Dont know if the trick works for images, languages, etc.

(2) Using SGD (ASGD) optimizer is way more stable than using Adam (AdamW) optimizer, but notice SDG is really slow to converage,

e.g., on Cora, Adam takes ~200 epochs, SGD takes ~10000 epochs.

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 4
Method 4
Class 2

Languages

Python100%

Modules by API surface

train.py5 symbols
kan_layer.py3 symbols
utils.py2 symbols

For agents

$ claude mcp add GraphKAN-Graph-Kolmogorov-Arnold-Networks \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page