LUT-KAN: Segment-wise LUT Quantization for Fast KAN Inference Oleksandr Kuznetsov Abstract 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. keywords Kolmogorov–Arnold Networks, KAN, lookup tables, LUT, quantization, B-splines, CPU inference, Numba, edge AI, intrusion detection 1 Introduction 1.1 Motivation Many deployment scenarios require reliable CPU inference with low latency Howard2017 . This is common for edge analytics, IoT monitoring, and security pipelines Sarker2025 ; Chowdhery2019 ; Awan2025 . Kolmogorov–Arnold Networks (KAN) are attractive in these settings because they can reach high predictive quality with compact models and provide per-edge univariate functions that can be inspected for interpretability Liu2024 ; Dong2026 ; Huang2026 . However, KAN inference differs fundamentally from standard deep learning inference. A dense KAN layer computes y_{j}=\sum_{i=1}^{d}\phi_{ij}(x_{i}),\quad j=1,\dots,m, (1) where each \phi_{ij} is a learnable univariate function, typically implemented using a spline basis. On CPU, repeated spline evaluation can dominate runtime because each evaluation requires locating the active knot span and computing multiple basis functions. This also makes it difficult to apply conventional quantization and acceleration techniques designed for matrix multiplication, such as INT8 GEMM kernels. 1.2 Problem Statement We address the following problem: Given a trained PyKAN-style KAN, how can we produce a portable inference representation that is faster on CPU, keeps prediction quality close to the original model, and has explicit semantics outside the knot domain? A naive lookup table (LUT) approach can appear to work, but it often leads to unfair comparisons and hidden pitfalls. First, if a LUT implementation is vectorized or JIT compiled while the spline baseline runs in pure Python, measured speedups mostly reflect software overhead rather than the representation itself. Second, a spline has a finite knot domain. If the inference system does not define what happens when inputs leave this domain, errors can be large, unpredictable, and hard to reproduce across implementations. Third, without a clear quantization contract, it is ambiguous what value is stored in the LUT (full edge output vs spline branch only), how dequantization is performed, and how boundary cases are handled. 1.3 Our Approach We propose LUT-KAN, a segment-wise LUT compilation and quantization pipeline for PyKAN-style KAN layers. The main ideas are: 1. Segment-wise LUT compilation : Compile each edge function into a per-segment LUT with L samples per segment and linear interpolation. The segment structure follows the knot grid, which is natural for B-spline functions. 2. Affine quantization : Use segment-wise affine quantization with two variants: symmetric int8 (zero-centered, range [-127,127] ) and asymmetric uint8 (offset-based, range [0,255] ). Both use a unified dequantization formula. 3. Explicit OOB semantics : Define out-of-bounds behavior through two orthogonal choices: boundary_mode (half_open vs closed) controls domain membership, and oob_policy (clip_x vs zero_spline) controls output values outside the domain. 4. Honest baseline methodology : Evaluate speed by comparing LUT and B-spline under the same backend optimization (NumPy vs NumPy, Numba vs Numba). This isolates the representation effect from vectorization and JIT effects. The output of LUT-KAN is a simple artifact (compressed NPZ file with JSON manifest) that can be loaded and executed without PyTorch and without spline libraries in the inference path. 1.4 Experimental Evidence and Case Study We report three types of evidence: Controlled sweeps quantify approximation accuracy, speedup, and memory as functions of L and quantization scheme. All metrics are reported with mean \pm std across 5 random seeds. OOB robustness matrix shows how boundary conventions and OOB policies affect error when inputs leave the knot domain, using a 2 \times 2 design crossing boundary_mode and oob_policy . Real case study : A KAN model trained for DoS attack detection (CICIDS2017 pipeline) is compiled into LUT artifacts and evaluated on CPU. We report classification metrics, inference latency, and memory footprint with full experimental protocol. 1.5 Contributions The contributions are practical and reproducible: 1. A segment-wise LUT artifact design for PyKAN-style KAN layers with affine int8/uint8 quantization and linear interpolation. 2. An explicit OOB contract with boundary conventions and OOB policies that are stored in artifacts and enforced consistently across backends. 3. An honest baseline methodology for speed evaluation that avoids mixing representation effects with vectorization/JIT effects. 4. A systematic experimental evaluation with controlled sweeps, OOB robustness matrix, and statistical reporting (mean \pm std, N=5 seeds). 5. An end-to-end case study on DoS detection with full experimental protocol. 6. Public code and run artifacts with fixed release tags (v1.0.0) for reproducibility. 1.6 Paper Organization Section 2 reviews related work and identifies the research gap. Section 3 provides background on PyKAN-style KAN layers and B-spline evaluation. Section 4 defines the segment-wise LUT artifact and quantization contract. Section 5 defines boundary conventions and OOB policies. Section 6 describes the experimental methodology and honest baseline protocol. Section 7 reports controlled sweep results with core tables. Section 8 presents the DoS detection case study. Section 9 discusses trade-offs, limitations, and practical guidance. Section 10 concludes. 2 Related Work and Research Gap 2.1 Kolmogorov–Arnold Networks Kolmogorov–Arnold Networks (KAN) were introduced as an alternative to MLPs where each “weight” is replaced by a learnable univariate function, usually implemented with splines Liu2024 . A mathematical motivation can be linked to the classical Kolmogorov–Arnold representation theorem, which states that any continuous multivariate function can be represented as a superposition of continuous univariate functions Kolmogorov1957 ; Arnold2009 . The original KAN paper demonstrated that this design can improve accuracy and interpretability on several fitting and scientific tasks, often with smaller models than classical MLP baselines Liu2024 . Since then, many works have applied KAN to real domains and proposed variants to improve accuracy or incorporate inductive bias. 2.2 KAN Variants and Applications Physics-informed and constraint-driven extensions have been proposed for scientific computing. PIKANs embed physical equation constraints into KAN training for landslide prediction Wan2026 . KINN (Kolmogorov–Arnold-Informed Neural Network) applies KAN to forward and inverse PDE problems Wang2025 . Chebyshev-based c-PIKANs target diffusion-convection-reaction equations Dong2026 . Architectural variants include asKAN with active-subspace embeddings for ridge-like structure Zhou2026 , attention-augmented Attention-KAN for ship steering dynamics Ouyang2026 , and temporal KAN (TKAN) for multivariate time series forecasting Zheng2026 . KAN has been evaluated in diverse application areas: battery SoC estimation Sulaiman2024 , Bitcoin price prediction from social signals Shen2025 , turbulence-related spectra modeling Zhou2025 , microalgal density estimation with low-cost sensors Teoh2026 , load forecasting Danish2025 , and autonomous driving decision-making Huang2026 . 2.3 Research Gap Despite this progress, most prior work treats KAN inference as a “standard deep learning” problem and focuses on training quality, interpretability, or domain metrics. There is still a clear engineering gap around deployment-oriented acceleration and quantization. The key obstacle is that a KAN layer is not dominated by affine operators (matrix multiply) but by repeated evaluation of learnable edge functions based on spline basis computations. Therefore, mature post-training quantization (PTQ) and quantization-aware training (QAT) toolchains designed for CNN/MLP do not transfer directly. In particular, three issues remain insufficiently addressed in the literature: Format mismatch : Existing speed comparisons usually compare different software stacks (e.g., PyTorch spline vs NumPy LUT) rather than isolating the representation effect. Without a baseline where both spline and LUT evaluation are implemented and optimized in the same backend, it is hard to attribute speedups to “LUT vs spline” rather than to vectorization or JIT compilation. OOB semantics : A spline is defined on a finite knot domain, but real data and intermediate activations may exceed this range. Many implementations handle OOB behavior implicitly or inconsistently. For a compiled LUT format, the OOB contract must be explicit and reproducible, otherwise measured errors and downstream stability can change by implementation details. Quantization contract : For KAN, “quantization” is not only quantizing scalar weights—it is compiling functions into an inference-first representation. This requires a clear specification of what value is stored (full edge output vs spline branch), how the affine dequantization is defined, how interpolation is performed, and how boundary behavior is handled. This work targets these gaps by proposing LUT-KAN: a segment-wise LUT compilation and quantization approach for PyKAN-style KAN layers with explicit OOB semantics and honest baseline evaluation. 3 Background and Preliminaries 3.1 KAN Layer as a Sum of Edge Functions We consider a dense KAN layer with input vector x\in\mathbb{R}^{d} and output vector y\in\mathbb{R}^{m} . The layer is defined by Eq. ( 1 ), where each \phi_{ij}(\cdot) is a learnable univariate function associated with edge (i\rightarrow j) . In the PyKAN-style parameterization used in this work, each edge function admits a decomposition into a base branch and a spline branch: \phi(x)=s_{\mathrm{out}}\cdot\left(s_{\mathrm{base}}\cdot b(x)+s_{\mathrm{spline}}\cdot s(x)\right), (2) where: • b(x) is a fixed base nonlinearity (SiLU in our setup), • s(x) is the learnable spline branch, • s_{\mathrm{base}},s_{\mathrm{spline}},s_{\mathrm{out}} are learned per-edge scalar coefficients. This decomposition matters for quantization because the spline branch often has a narrower dynamic range than the full \phi(x) , and because the base branch can be evaluated analytically at inference time without any lookup. 3.2 B-spline Representation of the Spline Branch Let the spline domain be determined by a knot grid (breakpoints) t_{0}