betaFeedback

WorksComputer Science

KANLab: TensorFlow Playground for Kolmogorov-Arnold Networks

Abstract

KANLab is a browser-based visualization tool designed to interactively teach the core concepts of Kolmogorov-Arnold Networks (KAN), forked from the widely successful TensorFlow Playground. To maximize educational clarity, KANLab omits residual connections and learnable scaling parameters found in modern KAN implementations, ensuring that displayed B-spline activation curves directly correspond to their underlying trainable control points. Users can inspect and modify activation functions, initialization schemes and observe gradient descent correcting manual disruptions. Furthermore, user can explore phenomena such as activation variance, interactive pruning, and re-/training within a compact 2D machine learning setting. KANLab is open-source and available at https://kanlab.app/

Introduction

Combining lecture-like instructions with practical application has been shown to enhance the understanding of a variety of topics, including Artificial Intelligence (AI) [12]. A prime example of this is the popular TensorFlow Playground [Smilkov et al., 2017], which helps build intuition about the concepts and hyperparameters of Multi-layer Perceptrons (MLPs) by letting the user train interactively in the browser. In addition to being widely successful, it also inspired a whole branch of practice-oriented applications to improve the understanding in different fields of AI. One showcase for this is the Adversarial Playground [8], which focuses on education about adversarial attacks on already trained neural networks. Another browser-based rendition, GANLab [Kahng et al., 2019] allows the user to train a generator and a discriminator of a Generative Adversarial Network (GAN) on 2D distributions, while being able to observe their interplay directly. More recently, the Quantum Machine Learning Playground [Debus et al., 2024] has been released, also leveraging established interactivity and visualization methods.

A relatively new field in AI are KANs, which are popularized in their current form by [Liu et al., 2025]. They have been proposed as an interesting new tool in the repertoire of a deep learning researcher and can be used as an alternative to classical MLPs, promising more compact architecture due to more powerful activation functions, resulting in more interpretable models. MLPs layers sum up weighted inputs and then pass them through a static non-linear activation function (like ReLU) to solve non-linear problems. KANs layers, on the other hand, use trainable non-linear activation functions and sum up their results on nodes. While the primary success of KANs is in symbolic formula representation tasks [Yu et al., 2024], they are also frequently experimented with for classification tasks [2] (Yang et al. 2025; Jamali et al. 2024; Ibrahim et al. 2024).

Regarding KAN-specific projects, the KAN-Playground [11] demonstrates a feature-rich Gradio implementation. While the project is readily accessible via Hugging Face Spaces, training is still computed server-side. While this enables a close-to feature-complete and high-performant experience, this API-based approach comes at the drawback of offering limited responsiveness and interactivity. For example, the architecture is represented via an image, that is updated once per epoch. Furthermore, modern KAN implementations add residual connections and learnable scaling/shifting parameters on top of the underlying univariate function. While these additions are important for performance, they distort the relationship between the activation visualization and the underlying spline parameterization, making the visualizations harder to interpret from an educational perspective.

Due to the close similarities between KANs and MLPs, and the established educational design decisions of the TensorFlow Playground, we created KANLab1 as a fork of it. This allows us to create more specialized visualizations and even enables users to drag individual control points during training and observe how gradient descent corrects these manual disruptions in real time. KANLab aims to fill the gap between people who are new to KANs and want to understand the core concepts, and KAN-experts who want to communicate or probe KAN behavior in an accessible environment.

Kolmogorov-Arnold Networks

Following their introduction by [Liu et al., 2025], KANs have garnered attention as a potential alternative to MLPs. However, learning their concepts through practical experience is still challenging. KANLab addresses this gap by providing a browser interface for interactive design, training, and analysis of KANs in real time. Figure 1 shows a screenshot of the main view, which dynamically visualizes the network architecture. It also allows users to modify hyperparameters, select input features, and observe immediate effects on the model’s behavior. The theoretical foundation of KANLab is the Kolmogorov-Arnold Representation Theorem, which states that any multivariate continuous function on a bounded domain can be represented as a finite composition of univariate functions and addition:

Main view of KANLab with a two layer Kolmogorov-Arnold Network

Figure 1. Main view of KANLab, with a two layer Kolmogorov-Arnold Network (KAN) that has 2 input features (PP), 2 hidden nodes (QQ) and 1 output Node, represented by squares. In between these we visualize the green B-spline activation functions with rectangles. Left and right of the rectangles gray dashed lines represent the variance of the incoming (left) and outgoing (right) activation variance by contrasting levels of thickness.

f(x1,…,xn)=∑q=1QΦq(∑p=1Pϕq,p(xp))(1)f(x_1,\ldots,x_n)=\sum_{q=1}^{Q}\Phi_q\left(\sum_{p=1}^{P}\phi_{q,p}(x_p)\right) \tag*{(1)}

where Φq,ϕq,p:R→R\Phi_q,\phi_{q,p}:\mathbb{R}\to\mathbb{R} and Q=2n+1Q=2n+1, P=nP=n. The theorem guarantees a two-layer solution with Q=2n+1Q=2n+1 nodes, but practical implementations often differ form by adjustments in width and also in depth. Figure 1 shows an example with P=2P=2 input features (X1,X2X_1,X_2) and Q=2Q=2 hidden nodes. Unlike MLPs with fixed activation functions, KANs use B-splines that adapt during training, allowing for more

flexible function approximation. The main view of KANLab shows the network architecture and animated B-splines illustrate information flow in real time. The network is trained using batched stochastic gradient descent minimizing the mean squared error loss. During this training the user can observe the evolving B-splines to gain insights on how KANs are able to decompose complex problems into simpler and trainable components.

Activation Functions

Extensive effort has gone into utilizing different basis functions to form the univariate activation functions. They include B-splines, Chebyshev and Jacobi Polynomials, ReLU compositions, Fourier series, Gaussian kernels, wavelets, finite basis partitions and sinc functions [Noorizadegan et al., 2026]. Among these bases the most widely adopted one is the B-spline, which was also introduced in the KAN formulation by [Liu et al., 2025]. KANLab uses this B-spline-based approach, since their theory allows for some of the strongest guarantees and has the firmest theoretical footing among KAN bases [Noorizadegan et al., 2026]. The B-spline φ\varphi is defined as:

φ(x)=∑n=0N−1cnBnk(x)(2)\varphi(x)=\sum_{n=0}^{N-1}c_n B_{nk}(x) \tag*{(2)}

where Bnk(x)B_{nk}(x) are fixed B-spline basis functions of degree kk (computed using de Boor’s algorithm), and cnc_n are trainable control points. The number of control points NN can be set via a dropdown menu in the top bar (Figure 1).

Figure 2 visualizes the N=5N = 5 control points as orange circles. In KANLab the view depicted in Figure 2 is displayed when hovering over the rectangle of an activation function from Figure 1. The TensorFlow Playground and KANLab both generate their datasets in the interval of [−6,6][-6, 6]. To make sure that all generated activations are represented on the B-splines, the control points are uniformly distributed on the same interval. The control points can be changed by dragging and dropping them to new positions. The effect of control point manipulation is directly observable in the decision boundaries of the final output and in the intermediate nodes. The incoming activation for a B-spline in the hidden layer is computed by summing over outputs of the B-splines from the preceding layer. Since the trainable control points are not bounded, the outgoing activations of a B-spline can exceed the control point domain [−6,6][-6, 6] of the next B-spline. KANLab handles these cases by clipping the incoming activations of a B-spline into that interval.

Visualization of an activation function parameterized by a B-spline and its effect on activations

Figure 2. Visualization of an activation function parameterized by a B-spline and its effect on activations. The green curve shows the current B-spline activation, while the orange points denote its learnable control points. The top histogram depicts the distribution of incoming activations, and the right histogram shows the distribution of outgoing activations after applying the activation function. Adjusting the orange control points changes the shape of the B-spline and, consequently, the mapping from inputs to outputs.

Initialization

The topic of KAN initialization is still in development and KANLab supports multiple initialization methods. Each method determines the initialization variance of the control points. [Liu et al., 2025] recommend initializing the control points with small values. KANLab offers preset variances [0.1,0.3,0.5,1.0,5.0][0.1, 0.3, 0.5, 1.0, 5.0] sampled from a uniform distribution. KANLab also supports the LeCun- and Glorot-inspired, variance preserving initialization schemes proposed by [Rigas et al., 2026]. Additionally, KANLab supports identity as initialization method, which essentially starts the network with linear pass-through transformations by either initializing the control points with an identity function or its inverse. The variance is selectable via the top bar of Figure 1. Users can experiment and observe that small-variance initialization leads to near-zero activations initially. Identity initialization, on the other hand, preserves input structure, making it easier to see how training reshapes the activation functions.

Use Cases

Just like for the TensorFlow Playground, the experimental setup is serialized in the URL’s GET parameters. This allows a teacher to save the URL of an interesting setup and share it with students. Example setups could show the differences in training behavior between wide and deep KANs. The feature of manually adjusting the control points for each spline can also be used to train a KAN by hand. To do so, the user hovers over an activation function in Figure 1, so that a small window appears, which looks like Figure 2. There, the user can drag and drop the individual control points until the desired result in the following node is reached. In Figure 1 we see thick dark lines on the upper path and thinner lines on the lower path. This means that the activation variance is higher on the upper path which also indicates a stronger information flow. Each activation function on the edges and every (non-output) summation node in Figure 1 can be activated or deactivated individually during training by clicking on them (long click for touchscreens). When a spline in the upper path in Figure 1 gets pruned the loss increases and in the output we see that the classification error grows. The pruned node can now no longer pass information to the next layer. If training continues, the activation variance on the lower path increases and the classification error decreases, demonstrating that the network now routes information through the remaining connections.

Conclusion

We present KANLab, an interactive browser application, offering a familiar TensorFlow Playground-based interface. Our deliberate design choices favor educational benefits and clarity over performance, in order to close the gap between KAN-beginners and KAN-experts. Future work includes the addition of regularization methods.

References

  1. [2][Hadj Kilani, 2024] Bochra Hadj Kilani. Kolmogorov-Arnold Networks: Key Developments and Uses. Qeios, June 2024.DOI
  2. [8][Norton and Qi, 2017] Andrew P Norton and Yanjun Qi. Adversarial-Playground: A visualization suite showing how adversarial examples fool deep learning. In Visualization for Cyber Security (VizSec), 2017 IEEE Symposium on, pages 1–4. IEEE, 2017.arxiv.org/abs/1708.00807
  3. [11][Solovyeva, 2025] Ekaterina Solovyeva. qksolov/kan-playground, December 2025. original-date: 2025-02-25T17:43:08Z.
  4. [12][Turgunbaev, 2025] Rashid Turgunbaev. Enhancing student understanding of artificial intelligence through practical neural network applications. Academic Journal of Science, Technology and Education, 1(6):36–40, October 2025.

Paper details

vlnc:W_nqmr6kth
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents