MCPcopy Index your code
hub / github.com/GGA23/GrokFormer

github.com/GGA23/GrokFormer @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
29 symbols 106 edges 4 files 3 documented · 10%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

GrokFormer

A PyTorch implementation of GrokFormer "GrokFormer: Graph Fourier Kolmogorov-Arnold Transformer".

Environment Settings

This implementation is based on Python3. To run the code, you need the following dependencies:

  • torch==1.8.1
  • torch-geometric==1.7.2
  • scipy==1.2.1
  • numpy==1.19.5
  • tqdm==4.59.0
  • seaborn==0.11.2
  • scikit-learn==0.24.2

Node Classification Datasets

The dataset contains six homophilic benchmark datasets(Cora, Citeseer, Pubmed, Photo, Physics, WikiCS), and five heterophilic datasets(Penn94, Chameleon, Squirrel, Actor, Texas). We use the same experimental setting (60\%/20\%/20\% random splits for train/validation/test (fixed splits for Penn94) with the same epochs, run ten times (five times for Penn94), early stopping) as Specformer.

Run node classification experiment:

$ sh run.sh

Examples

Training a model on the default dataset.
image

Baselines links

Acknowledgements

The node-level code and filter learning code are implemented based on Specformer: Spectral Graph Neural Networks Meet Transformers. The graph-level (TUD Benchmarks) code are implemented based on the public code (https://github.com/kavehhassani/mvgrl/tree/master/graph)

📖 Citation

If you find this work useful, please cite our paper:

```bibtex @inproceedings{ai2024grokformer, title = {GrokFormer: Graph Fourier Kolmogorov-Arnold Transformers}, author = {Ai, Guoguo and Pang, Guansong and Qiao, Hezhe and Gao, Yuan and Yan, Hui}, booktitle = {Proceedings of the 42st International Conference on Machine Learning (ICML)}, year = {2025} }

Core symbols most depended-on inside this repo

feature_normalize
called by 4
preprocess_node_data.py
eigen_decompositon
called by 3
preprocess_node_data.py
eig_dgl_adj_sparse
called by 3
preprocess_node_data.py
normalize_graph
called by 2
preprocess_node_data.py
main_worker
called by 1
train.py
set_seed
called by 1
train.py
seed_everything
called by 1
utils.py
get_split
called by 1
utils.py

Shape

Function 16
Method 9
Class 4

Languages

Python100%

Modules by API surface

model.py13 symbols
preprocess_node_data.py10 symbols
utils.py4 symbols
train.py2 symbols

For agents

$ claude mcp add GrokFormer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact