KindXiaoming / pykan

Kolmogorov Arnold Networks
MIT License
14.75k stars 1.35k forks source link

Performance of KAN in some image classification datasets #224

Closed Boreuseful closed 2 months ago

Boreuseful commented 4 months ago

Compare the performance of pykan, efficient-kan, and FastKAN with MLP on image classification tasks using the MNIST, CIFAR10, and CIFAR100 datasets.Additionally, include the differences in training time between FastKAN and efficient-kan. kan_Image_Classification

fangkuoyu commented 4 months ago

Boreuseful: Thanks for the benchmark. I have one question: CIFAR10 KAN Case-1 and Case-2 have the network shape as (784, 10, 10) and (784, 20, 10). I am wondering if it is a typo in 784, because the image shape of CIFAR10 is 32 x 32 x 3.

MrMois commented 4 months ago

Thanks for the benchmark! What does iterate mean? is it the number of parameter updates (aka optim.step())?

idhamari commented 4 months ago

@Boreuseful Interesting, it would be nice to share the code so one can try to reproduce the results!

bulaikexiansheng commented 4 months ago

@Boreuseful Thanks for your benchmark! Could you share your code? I want to compare the performance between MLP and KAN. But i find that memory error happening if i do not resize the minist image from [1, 28, 28] to [1, 7, 7]. And the accuracy of KAN is about 77.89%, mlp is about 91.76 %. The results are blow: image

jloveric commented 4 months ago

On thing to try with these polynomial methods is try using the Lion optimizer instead of Adam. I've found these work much better for piecewise polynomials, not sure if they same benefit will be observed with the regular MLP.

yhaddbb commented 4 months ago

Thanks for your benchmark. I have a question, how to statistic the model parameters? Is it by torchsummary?

KindXiaoming commented 2 months ago

Thanks for the results!