Giter VIP home page Giter VIP logo

lkan's Introduction

Large Kolmogorov-Arnold Networks

Implementations of KAN variations.

Installation

pip install .

To run mnist select config in main.py and run main.py.

To view charts, run tensorboard --logdir .experiments/

Docs

See examples/ (in future)

Performance (rtx 2060 mobile, mnist):

MLP (31.8M parameters) - 51 it/s

KANLinear (32.3 M parameters) - 4.3 it/s

KANLinear2 (31M parameters) - 36.5 it/s

Problems

  • update_grid on cuda raise error (torch.linalg.lstsq assume full rank on cuda, only one algorithm) - solved temporary, moved calculating lstsq to cpu
  • update_grid_from_samples in original KAN run model multiple times, is it necessary?
  • parameters counting, is grid parameter or not?
  • MLP training is almost instant, but KAN train slow on start

TODO/Ideas:

  • Base structure
  • KAN simple implementation
  • KAN trainer
  • train KAN on test dataset
  • remove unnecessary dependencies in requirements.txt
  • test update_grid and "Other possibilities are: (a) the grid is learnable with gradient descent" from paper.
  • Regularization
  • Compare with MLP
  • Grid extension
  • MNIST
  • CIFAR10
  • KAN ResNet?
  • KAN as CNN filter?
  • KAN in VIT?
  • Fourier KAN?
  • pruning
  • test continual learning
  • docs and examples - write notebooks like in KAN repo.
  • KAN vs MLP in "LLM" - test?
  • CUDA kernel for b_splines?
  • unit tests?

Citations

@misc{liu2024kan,
      title={KAN: Kolmogorov-Arnold Networks}, 
      author={Ziming Liu and Yixuan Wang and Sachin Vaidya and Fabian Ruehle and James Halverson and Marin Soljačić and Thomas Y. Hou and Max Tegmark},
      year={2024},
      eprint={2404.19756},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

Original KAN repo - base idea

efficient-kan - KANLinear2 and optimizations

lkan's People

Contributors

indoxer 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.