# ECG Signal Classification Using Interpretable KAN: Towards Predictive Diagnosis of Arrhythmias
## 3 Materials and Methods
### Interpretable KAN Model  
The Kolmogorov-Arnold Network (KAN) is an innovative neural network architecture developed based on the Kolmogorov-Arnold representation theorem [5]. Unlike traditional neural networks, which rely on a fixed combination of linear weights and activation functions for feature extraction, the KAN incorporates a dynamically learnable univariate function. This enhancement significantly improves the model's capacity to address nonlinear problems and its interpretability. Given the complexity of ECG signals and the pronounced nonlinear characteristics of arrhythmia classification tasks, the KAN emerges as a particularly well-suited modeling approach for this domain. For ECG signal classification tasks, the Kolmogorov-Arnold representation theorem [5] demonstrates that any continuous multivariate function can be expressed as the sum of several continuous univariate functions. \[f(\mathbf{x})=\sum_{q=1}^{2n+1}\Phi_{q}\Big{(}\sum_{p=1}^{n}\varphi_{q,p}\big{(}x _{p}\big{)}\Big{)} \tag{1}\]  
where \(f(\mathbf{x})\) is the function output, which represents the predicted value of input \(\mathbf{x}\). \(2n+1\) is the upper limit of the outer summation, which is related to the input dimension \(n\). \(\Phi_{q}\) is the \(q\)-th function of the outer summation, \(\varphi_{q,p}(x_{p})\) is the combination of the \(q\)-th and \(p\)-th functions, and \(x_{p}\) is the \(p\)-th component of the input vector. The original KAN [5] is fixed at [\(n\), \(2n+1\), 1], and the original structure is changed by introducing the KAN layer definition, where the KAN layer is a one-dimensional function matrix defined as equation  
\[\Phi=\big{\{}\varphi_{q,p}\big{\}} \tag{2}\]  
In the Kolmogorov-Arnold representation theorem [5], a KAN layer is composed of several internal functions. For example, Equation (1) is composed of two KAN layers. The shape of the KAN is represented by an integer array as \([n_{0},\,n_{1},\,\ldots,\,n_{L}]\). \(n_{i}\) is the number of nodes in the \(i\)-th layer of the computational tree, and \((l,i)\) is used to represent the \(i\)-thneuron in the _l_-th layer. There are _n_\({}_{l}\)_n_\({}_{l+1}\) activation functions between the \(l\) layer and the next layer (_l_+1). The activation function connecting \((l,i)\) and \((l\)+1,\(j)\) is  
\[\varphi_{l,j,i},l=0,\ \ldots,\ L-1,i=1,\ \ldots,\ n_{l},j=1,\ \ldots,\ n_{l+1} \tag{3}\]  
Simply stacking KANs can expand the KAN structure to any width and depth and further determine the transfer matrix between input and output. In other words, the activation value of the \((l\)+1,\(j)\) neuron is simply the sum of all incoming post-activations. The calculation process is shown in Equation (4). \[x_{l+1}=\underbrace{ \begin{pmatrix}\varphi_{l,1,1}(\cdot)&\varphi_{l,1,2}( \cdot)&\cdots&\varphi_{l,1,n_{l}}(\cdot)\\ \varphi_{l,1,1}(\cdot)&\varphi_{l,2,2}(\cdot)&\cdots&\varphi_{l,2,n_{l}}(\cdot )\\ \ldots&\ldots&&\ldots\\ \varphi_{l,n_{l+1},1}(\cdot)&\varphi_{l,n_{l+1},2}(\cdot)&\cdots&\varphi_{l,n _{l+1},n_{l}}(\cdot)\\ \end{pmatrix} }_{\Phi_{l}}x_{l} \tag{4}\]  
Among them, \(x_{l+1}\) is the output of the _l_+1 layer. \(\varphi_{l,j,i}(\cdot)\) is the activation function of each oblique edge, and \(x_{l}\) is the input of the _l_-th layer. In addition, \(\Phi_{l}\) is the function matrix corresponding to the _l_-th KAN layer. If the above multi-layer function cascade relationship is written in matrix form, the output expression of the KAN is  
\[K\AN(x)=(\Phi_{l-1}\circ\Phi_{l-2}\circ\cdots\circ\Phi_{1}\circ\Phi_{0})x \tag{5}\]  
In the ECG signal classification task, \(x\) represents the input ECG signal, and \(K\AN(x)\) represents the output of the KAN. This paper sets the KAN model as a 2-layer structure for the ECG signal classification task, and the framework principle is shown in Figure 4. The activation function in the KAN structure is dynamic, and the vertical slash in the structure diagram represents the learning activation function, while the node only represents the summation of the function.