arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.03332cs.LG
收藏

LUT-KAN:分段LUT量化用于快速KAN推理

LUT-KAN: Segment-wise LUT Quantization for Fast KAN Inference

Department of Theoretical and Applied Sciences (DiSTA)(理论与应用科学系);eCampus University(eCampus大学);Department of Intelligent Software Systems and Technologies(智能软件系统与技术系);School of Computer Science and Artificial Intelligence(计算机科学与人工智能学院);V.N. Karazin Kharkiv National University(V.N.卡扎林赫尔辛基国立大学)

Oleksandr Kuznetsov

AI总结:

LUT-KAN通过分段LUT量化提升KAN推理速度,减少CPU延迟并保持分类精度。

摘要:

Kolmogorov-Arnold网络(KAN)用可学习的单变量函数替代标量权重,通常通过B样条实现。这种设计可以准确且可解释,但使CPU上的推理变得昂贵,因为每层都需要许多样条评估。标准量化工具链也难以应用,因为主要计算不是矩阵乘法,而是重复的样条基函数评估。本文介绍了LUT-KAN,一种针对PyKAN风格KAN层的分段查找表(LUT)编译和量化方法。LUT-KAN将每个边缘函数转换为每个分段的LUT,使用仿射int8/uint8量化和线性插值。该方法提供了一个明确且可复现的推理合同,包括边界约定和超出范围(OOB)策略。我们提出了一种“诚实基线”方法用于速度评估:在相同的后端优化(NumPy vs NumPy和Numba vs Numba)下比较B样条评估和LUT评估,这将表示增益与向量化和JIT效果分开。实验包括在LUT分辨率L为16、32、64、128以及两种量化方案(对称int8和不对称uint8)上的受控扫描。我们报告了准确率、速度和内存指标,并在多个种子下报告均值和标准差。一个2x2的OOB稳健性矩阵评估在不同边界模式和OOB策略下的行为。在一项案例研究中,我们将训练好的KAN模型编译成LUT artifact,用于DoS攻击检测(CICIDS2017流程)。编译后的模型在分类质量上(F1下降低于0.0002)保持不变,同时在NumPy后端上将稳态CPU推理延迟减少了12倍,在Numba后端上减少了10倍(诚实基线)。内存开销在L=64时约为10倍。所有代码和artifact都公开可用,并带有固定发布标签以确保可重复性。

英文摘要:

Kolmogorov--Arnold Networks (KAN) replace scalar weights by learnable univariate functions, often implemented with B-splines. This design can be accurate and interpretable, but it makes inference expensive on CPU because each layer requires many spline evaluations. Standard quantization toolchains are also hard to apply because the main computation is not a matrix multiply but repeated spline basis evaluation. This paper introduces LUT-KAN, a segment-wise lookup-table (LUT) compilation and quantization method for PyKAN-style KAN layers. LUT-KAN converts each edge function into a per-segment LUT with affine int8/uint8 quantization and linear interpolation. The method provides an explicit and reproducible inference contract, including boundary conventions and out-of-bounds (OOB) policies. We propose an ``honest baseline'' methodology for speed evaluation: B-spline evaluation and LUT evaluation are compared under the same backend optimization (NumPy vs NumPy and Numba vs Numba), which separates representation gains from vectorization and JIT effects. Experiments include controlled sweeps over LUT resolution L in 16, 32, 64, 128 and two quantization schemes (symmetric int8 and asymmetric uint8). We report accuracy, speed, and memory metrics with mean and standard deviation across multiple seeds. A two-by-two OOB robustness matrix evaluates behavior under different boundary modes and OOB policies. In a case study, we compile a trained KAN model for DoS attack detection (CICIDS2017 pipeline) into LUT artifacts. The compiled model preserves classification quality (F1 drop below 0.0002) while reducing steady-state CPU inference latency by 12x under NumPy and 10x under Numba backends (honest baseline). The memory overhead is approximately 10x at L=64. All code and artifacts are publicly available with fixed release tags for reproducibility.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑