efficient_kan
Network with learnable B-spline activations on its edges and no linear weights, an alternative to the MLP.
138 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 508.2K
- Operations
- 138
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICLR (arXiv 2024)
- Cited by
- 4,854 (as of 26 November 2026)
- Authors
- Ziming Liu, Yixuan Wang, Sachin Vaidya and others
- Source
- GitHub: KindXiaoming/pykan
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m4540
- Graph hash
- cd5b2f50635c8aa0641ae1ac2255ba992f6152b024416b76ef4ed4f020772584
- Skeleton hash
- 1e5efc3df9e4ac2ae27c0b2a72fc429200f24c8413a48e1dcbf0b9641e28b348
- Architecture hash
- 0c9ae05efea4a4027278883ab6e47f638a3cc316aecbdd6b25a0d538bafadf4d
- Diagram SHA-256
- ab7f41d8eec2efe9f83f7108ed304ade8eeee174532e542d4868eeb28427796b
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
Kolmogorov-Arnold Networks (KANs) are proposed as alternatives to multi-layer perceptrons, taking their cue from the Kolmogorov-Arnold representation theorem. The twist is where the nonlinearity lives: MLPs have fixed activation functions on nodes, KANs have learnable activation functions on edges. There are no linear weights at all; every weight parameter becomes a univariate function parametrized as a spline. The authors report that much smaller KANs match or beat much larger MLPs in data fitting and PDE solving. They also lean on interpretability: a KAN can be visualized directly and edited by a human.
A KAN layer with n_in inputs and n_out outputs is defined as a matrix of 1D functions. The nodes simply sum their incoming signals without applying any nonlinearity. The theorem's inner and outer functions are two such layers composed, so a deeper Kolmogorov-Arnold representation means stacking more KAN layers. Each 1D function is a B-spline curve with learnable coefficients on local basis functions. To make this trainable, each activation is the sum of a residual-like basis function and the spline. That basis function is the SiLU. A grid extension technique refines the spline grids to make a trained KAN more accurate. Each edge carries more parameters than an MLP weight, but the authors argue KANs usually need a much smaller width, which saves parameters and generalizes better.
The copy traced here is efficient-kan, a reimplementation rather than the authors' pykan. Because every edge activation is a linear combination of one fixed set of B-spline bases, efficient-kan activates the input with the bases once and then combines them linearly. That turns the layer into a straightforward matrix multiplication and cuts the memory cost. It replaces the paper's L1 regularization on input samples with L1 on the weights, which is compatible with the reformulation. Switching the base weights and spline scalers to Kaiming-uniform initialization took its MNIST accuracy from about 20% to about 97%.
Key idea. Learnable spline activation functions on the edges in place of linear weights, with nodes that only sum, so the network is a composition of Kolmogorov-Arnold layers.
- kan
- kolmogorov-arnold network
- kolmogorov-arnold
- efficient-kan
- pykan
- spline network
- learnable activation
- mlp alternative
- mnist
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{liu2025kankolmogorovarnoldnetworks,
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={2025},
eprint={2404.19756},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2404.19756},
}