Improving Memory Efficiency for Training KANs via Meta Learning

Zhangchi Zhao, Jun Shu, Deyu Meng, Zongben Xu

Abstract

Kolmogorov-Arnold Networks (KANs) have emerged as a powerful alternative to Multi-Layer Perceptrons (MLPs), offering superior interpretability and function approximation by placing learnable univariate functions on edges rather than nodes. However, KANs suffer from a significant "parameter explosion" because each edge requires its own set of spline coefficients, leading to high GPU memory consumption. This paper introduces MetaKANs, a meta-learning framework designed to compress KANs by generating edge weights through a compact meta-learner and learnable prompts. Experimental results demonstrate that MetaKANs reduce parameter counts by 3x to 9x and significantly lower memory overhead while maintaining or improving accuracy across symbolic regression, partial differential equations (PDEs), and image classification tasks.

Introduction

While traditional MLPs use fixed activation functions on nodes and learnable weights on edges, KANs utilize learnable activation functions (typically splines) directly on the edges. This architectural shift allows KANs to excel at capturing complex mathematical relationships. However, the memory cost is steep: a KAN can require 10x to 100x more parameters than an MLP of equivalent width and depth. This inefficiency limits the scalability of KANs, particularly for high-dimensional datasets like image classification.

MetaKANs address this bottleneck by reframing the weight-learning process. Instead of storing and optimizing every spline coefficient independently, the framework learns a shared "knowledge base" of functional forms, effectively regularizing the network and drastically reducing its memory footprint.

Methodology: The Meta-Learning Framework

The core innovation of MetaKANs is the decoupling of functional identity from functional parameters. The architecture consists of three primary components:

  1. The Meta-Learner ($M_\theta$): A small, auxiliary 2-layer MLP that acts as a weight generator. It learns the underlying patterns of the univariate functions required by the network.
  2. Learnable Prompts ($z$): Each edge in the KAN is assigned a unique, learnable scalar prompt. This prompt serves as a low-dimensional identifier for that specific edge.
  3. Weight Generation: During the forward pass, the meta-learner takes the prompt $z$ as input and outputs the spline coefficients (weights $w$) for that edge's activation function.

By using this approach, the model only needs to store the parameters of the tiny meta-learner and one scalar per edge, rather than an entire set of spline coefficients per edge. This perspective treats the KAN as a multi-task learning system where each edge represents a "task" within a shared functional family.

Layer Clustering

To ensure the model remains expressive in deep architectures, the authors introduce a clustering algorithm. Rather than using one meta-learner for the entire network, layers are grouped based on their dimensions, and each cluster is assigned a dedicated meta-learner. This prevents the meta-learner from becoming a bottleneck in very large networks.

Experimental Evaluation

The researchers evaluated MetaKANs against standard KAN benchmarks and several variants, including FastKAN (RBF-based), WavKAN (wavelet-based), and ConvKAN (convolutional).

Datasets

  • Symbolic Regression: The Feynman Dataset, consisting of over 100 physics equations.
  • PDEs: Solving the Poisson, Allen-Cahn, and Sine-Gordon equations.
  • Image Classification: Benchmarks ranging from MNIST and Fashion-MNIST to more complex datasets like SVHN, CIFAR-10, and CIFAR-100.

Key Results and Insights

1. Parameter and Memory Efficiency

MetaKANs achieved comparable or superior performance to standard KANs while using only 1/3 to 1/9 of the parameters. More importantly, MetaKANs exhibit superior memory scaling. In standard KANs, increasing the grid size (the resolution of the splines) causes GPU memory usage to skyrocket. In contrast, MetaKAN memory usage remains relatively flat because the meta-learner's size does not scale linearly with the grid resolution.

2. Performance Gains

On the CIFAR-10 dataset, a 4-layer MetaKANConv achieved an accuracy of 45.97%, outperforming the baseline KANConv's 41.92%. This improvement occurred despite the MetaKANConv having nearly 90% fewer parameters, suggesting that the meta-learning framework acts as a powerful regularizer that prevents overfitting.

3. Interpretability and Symbolic Discovery

In symbolic regression tasks, MetaKANs discovered cleaner and more accurate mathematical formulas than original KANs. Standard KANs often produce "noisy" or overly complex expressions; by forcing weights to be generated from a shared space, MetaKANs favor simpler, more structured functional forms.

4. Prompt Visualization

Analysis of the learned prompts ($z$) revealed that edges performing similar mathematical roles (e.g., edges contributing to a specific trigonometric component of a PDE solution) clustered together in the prompt space. This confirms that the meta-learner effectively learns to categorize the types of univariate functions needed for a given task.

Conclusion and Future Work

MetaKANs provide a robust solution to the memory inefficiency of Kolmogorov-Arnold Networks, making them more practical for large-scale applications. While MetaKANs significantly close the gap, they still trail state-of-the-art CNNs and Transformers on high-complexity image tasks like CIFAR-100. Future research may focus on more sophisticated clustering heuristics and the potential for transfer learning, where a meta-learner trained on one dataset could provide a "zero-shot" initialization for KANs on entirely new tasks.

Summary updated

BibTeX
@inproceedings{zhao2025improving,
  author = {Zhangchi Zhao and Jun Shu and Deyu Meng and Zongben Xu},
  title = {{Improving Memory Efficiency for Training KANs via Meta Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=9biCmI3Mnd},
}
Figure