想试KAN但被碎片化实现劝退?KANLib把PyKAN、EfficientKAN、FastKAN统一成一个高效框架,直接上手跑基准。
KANLib是一个模块化、可扩展且计算高效的Kolmogorov-Arnold网络(KAN)框架,统一了PyKAN、EfficientKAN和FastKAN等现有实现的核心概念。它支持两种基函数类型、自适应网格缩放、网格扩展及细粒度架构定制,并保持与PyTorch工作流的兼容性。在California Housing基准上,KANLib再现了参考KAN实现的预测行为,同时实现了有竞争力的计算效率。该框架允许探索超出标准KAN公式的架构变体,对预测性能影响微小。
KANLib -- An Modular, Extensible and Fast Kolmogorov-Arnold Network Implementation
Kolmogorov-Arnold Networks (KANs) have recently emerged as a promising alternative to traditional multilayer perceptrons by replacing linear weights with learnable univariate functions. Despite their theoretical advantages in interpretability and expressiveness, practical research of KANs remains difficult due to high computational costs and inconsistent feature support across existing frameworks. This paper introduces KANLib, a modular, extensible, and computationally efficient framework for developing and evaluating KAN architectures. KANLib unifies core concepts from existing implementations, including PyKAN, EfficientKAN, and FastKAN, within a consistent software architecture that emphasizes flexibility, feature parity, and high performance. The framework supports two basis function types, adaptive grid rescaling, grid extension, and fine-grained architectural customization while maintaining compatibility with standard PyTorch workflows. Experimental evaluation on the California Housing benchmark demonstrates that KANLib reproduces the predictive behavior of established reference KAN implementations while achieving competitive computational efficiency. Furthermore, the framework enables the exploration of architectural variations beyond standard KAN formulations with only minor impacts on predictive performance. Overall, KANLib provides a robust foundation for future research on scalable and extensible KAN architectures.