MJKAN: Bridging KAN and MLP

November 29, 2025 Β· View on GitHub


πŸ“– Overview

MJKAN (Modulation Joint KAN) is a novel neural network layer designed to bridge the gap between Kolmogorov-Arnold Networks (KANs) and Multilayer Perceptrons (MLPs).

While KANs offer superior theoretical expressiveness via learnable activation functions, they often suffer from high computational costs and optimization difficulties. MJKAN overcomes these challenges by integrating FiLM (Feature-wise Linear Modulation) with Radial Basis Function (RBF) activations.

Key Features:

  • Hybrid Architecture: Combines the non-linear expressive power of KANs with the efficiency of MLPs.
  • Tunable Complexity: The number of basis functions (kk) acts as a direct dial for model complexity.
  • Efficiency: Significantly faster inference and lower resource usage compared to standard B-spline KANs.
  • Versatility: Demonstrated effectiveness in Function Regression, PDE solving, Image Classification, and NLP.

βš™οΈ Methodology

The MJKAN Layer

The MJKAN layer is inspired by the Kolmogorov–Arnold representation theorem. Unlike standard KANs that use B-splines, MJKAN uses a FiLM-modulated RBF decomposition.

Given an input vector x\mathbf{x}, the layer output yy is calculated as:

y=βˆ‘i=1dinFiLMi(xi)+Base(x)y = \sum_{i=1}^{d_{\text{in}}} \text{FiLM}_i(x_i) + \text{Base}(x)

Where:

  1. RBF Expansion: Each input xix_i is expanded into KK Gaussian basis functions: Ο•ij(xi)=exp⁑(βˆ’(xiβˆ’cj)22Οƒ2)\phi_{ij}(x_i) = \exp\left( -\frac{(x_i - c_j)^2}{2\sigma^2} \right)
  2. FiLM Modulation: The expansion allows for learnable scaling (Ξ³\gamma) and shifting (Ξ²\beta): FiLMi(xi)=Ξ³ixi+Ξ²i\text{FiLM}_i(x_i) = \gamma_i x_i + \beta_i

Note: With trivial modulation, MJKAN behaves like a KAN. With identity RBFs, it reduces to a linear MLP.


πŸ“Š Experimental Results

1. Function Regression (Strongest Performance)

MJKAN demonstrates superior approximation capabilities compared to MLPs. As the number of basis functions (KK) increases, the Root Mean Square Error (RMSE) decreases significantly, especially for complex compositional functions.

TaskMLP (128)MJKAN (k=5k=5)MJKAN (k=10k=10)MJKAN (k=25k=25)MJKAN (k=50k=50)
Local Bumps0.19550.29030.26820.19300.1489
Global Pattern0.08401.06310.72860.23290.0734
Step Function0.11790.10820.46530.07390.0638
High-Freq Sine0.70340.70940.70870.70980.6918
Compositional0.47120.51110.46920.44890.2628

2. Solving PDEs (Burgers' Equation)

Consistent with literature suggesting KANs excel at scientific computing, MJKAN outperforms MLP in solving the 1D viscous Burgers' equation.

ModelMAE (Mean Absolute Error)MSE (Mean Squared Error)
MJKAN (k=5k=5)0.00440.00003
MJKAN (k=10k=10)0.02260.00059
MJKAN (k=25k=25)0.01540.00031
MJKAN (k=50k=50)0.00910.00011
MLP0.02630.00094

3. Image Classification (Accuracy vs. Efficiency)

On standard vision datasets, MJKAN is competitive with MLP.

  • Observation: Smaller basis sizes (k=5k=5) generally generalize better for classification.
  • Trade-off: Larger basis sizes increase expressiveness but can lead to overfitting on sparse data (e.g., CIFAR-100).
DatasetModelAccuracy (%)Training Time (s)
MNISTMJKAN96.6124.57
MLP97.9120.84
CIFAR-10MJKAN (k=5k=5)50.2127.7
MLP50.3115.2
CIFAR-100MJKAN (k=5k=5)19.2125.3
MLP22.7115.5

4. Computational Cost

The cost of MJKAN scales linearly with the number of basis functions.

Basis Size (kk)Total ParametersGFLOPs
56,0430.0008
1011,9730.0015
2529,7630.0037
5059,4130.0074

πŸ“ Citation

Paper: Bridging KAN and MLP: MJKAN, a Hybrid Architecture with Both Efficiency and Expressiveness