Blealtan/efficient-kan
A pure-PyTorch implementation of Kolmogorov-Arnold Networks (KAN) optimized for memory efficiency and faster computation through matrix multiplication reformulation.

This repository provides an efficient implementation of Kolmogorov-Arnold Networks (KAN), an alternative to traditional Multi-Layer Perceptrons that replaces fixed activation functions with learnable B-spline basis functions. The implementation addresses the original KAN’s memory overhead by reformulating activation computation as linear combinations of basis functions combined through matrix multiplication, making both forward and backward passes more efficient. It replaces the sample-based L1 regularization with weight-based L1 regularization to maintain compatibility with the optimized computation path, and includes optional learnable scaling on activation functions.