Kolmogorov-Arnold Networks (KAN)¶
Meta Information¶
| Item | Details |
|---|---|
| Title | KAN: Kolmogorov-Arnold Networks |
| Authors | Ziming Liu, Yixuan Wang, Sachin Vaidya, Fabian Ruehle, James Halverson, Marin Soljacic, Thomas Y. Hou, Max Tegmark |
| Affiliation | MIT, Caltech, Northeastern University |
| Venue | ICLR 2025 (Oral) |
| arXiv | 2404.19756 |
| Code | github.com/KindXiaoming/pykan |
| Published | April 2024 (v1), February 2025 (camera-ready) |
Overview¶
Kolmogorov-Arnold Networks (KANs)는 Multi-Layer Perceptrons (MLPs)의 대안으로 제안된 신경망 아키텍처다. Kolmogorov-Arnold 표현 정리에 기반하여 설계되었으며, 기존 MLP와 근본적으로 다른 접근 방식을 취한다.
Kolmogorov-Arnold Representation Theorem¶
1957년 Andrey Kolmogorov가 증명하고 Vladimir Arnold가 확장한 이 정리는 다음을 말한다:
모든 다변수 연속 함수 f(x1, ..., xn)은 단변수 함수들의 합성으로 표현할 수 있다.
수학적으로:
여기서:
- phi_{q,p}: 단변수 내부 함수
- Phi_q: 단변수 외부 함수
이는 고차원 함수 근사 문제를 단변수 함수 학습 문제로 변환할 수 있음을 의미한다.
Architecture Comparison¶
MLP vs KAN¶
| Aspect | MLP | KAN |
|---|---|---|
| Activation Location | Node (neuron) | Edge (weight) |
| Activation Type | Fixed (ReLU, GELU, etc.) | Learnable (spline) |
| Linear Weights | Yes | No |
| Mathematical Basis | Universal Approximation Theorem | Kolmogorov-Arnold Theorem |
| Interpretability | Low | High |
KAN Architecture¶
Input Layer Hidden Layer(s) Output Layer
o o o
\ / \
[phi_1] [phi_3] [phi_5]
\ / \
o------------o-----------o
/ \ /
[phi_2] [phi_4] [phi_6]
/ \ /
o o o
[phi_i] = Learnable univariate function (B-spline)
핵심 차이점: 1. Edge-based activation: 활성화 함수가 노드가 아닌 엣지에 위치 2. Learnable splines: B-spline으로 파라미터화된 학습 가능한 활성화 함수 3. No linear weights: 선형 가중치 없이 모든 변환이 비선형 함수
B-Spline Parameterization¶
KAN은 각 엣지의 활성화 함수를 B-spline으로 파라미터화한다:
여기서:
- b(x) = silu(x) = x / (1 + e^(-x)): residual basis function
- spline(x): B-spline function
- w_b, w_s: trainable weights
B-spline의 장점: - 지역적 제어 (local control) - 부드러운 함수 근사 - Grid extension을 통한 점진적 정밀도 향상
Grid Extension¶
학습 중 spline의 grid 크기를 점진적으로 확장하여 정밀도를 높일 수 있다:
# 초기: grid=3
model = KAN(width=[2, 5, 1], grid=3)
model.fit(X, y)
# 확장: grid=10
model = model.refine(grid=10)
model.fit(X, y)
Advantages¶
1. Accuracy with Fewer Parameters¶
PDE solving 벤치마크에서: - 2-Layer width-10 KAN: MSE = 10^-7 - 4-Layer width-100 MLP: MSE = 10^-5
KAN이 100배 더 정확하면서 100배 더 적은 파라미터 사용.
2. Neural Scaling Laws¶
KAN의 스케일링 법칙이 MLP보다 빠르다:
| Method | Scaling Exponent (alpha) |
|---|---|
| MLP | ~4 |
| KAN | ~3 |
Test loss가 파라미터 수 N에 대해 O(N^(-alpha))로 감소할 때, 더 높은 alpha는 더 빠른 수렴을 의미.
3. Interpretability¶
KAN은 학습된 함수를 시각화하고 해석할 수 있다:
model.plot() # 네트워크 구조와 각 함수 시각화
model.auto_symbolic() # 기호적 표현 추출
model.symbolic_formula() # 수학 공식으로 변환
과학적 발견에서 유용: - 물리 법칙 재발견 (예: 상대성 이론의 시간 팽창 공식) - 수학적 관계 추출
4. Catastrophic Forgetting Resistance¶
연속 학습(continual learning) 시나리오에서 MLP보다 이전 태스크를 더 잘 기억한다.
Limitations¶
1. Training Speed¶
KAN은 MLP보다 약 10배 느린 학습 속도를 보인다: - Spline 연산이 행렬 곱셈보다 느림 - 기호 분기(symbolic branch)가 병렬화되지 않음
최적화 팁:
2. Compositional Structure¶
Spline은 복잡한 구성적 구조를 효율적으로 활용하지 못한다. 고차원 구성적 함수에서 MLP가 더 유리할 수 있다.
3. Hardware Efficiency¶
동일한 정확도를 위해 더 많은 하드웨어 자원이 필요할 수 있다 (복잡한 분류 태스크에서).
4. Hyperparameter Sensitivity¶
MLP와 다른 튜닝 전략이 필요: - 작은 모델에서 시작 (width 5-10, grid 3) - 점진적으로 확장 - MLP의 O(10^2) 이상의 width 직관이 적용되지 않음
Variants and Extensions¶
| Variant | Description | Application |
|---|---|---|
| FastKAN | Radial Basis Functions 사용, 빠른 학습 | 일반 목적 |
| Efficient-KAN | 최적화된 구현 | 대규모 모델 |
| Temporal-KAN (T-KAN) | 시계열 데이터 특화 | Time Series Forecasting |
| GraphKAN | 그래프 구조 데이터 | Graph Learning |
| FourierKAN | Fourier basis 사용 | 주기적 패턴 |
| WavKAN | Wavelet basis 사용 | 신호 처리 |
| ConvKAN | Convolutional 구조 적용 | Computer Vision |
| KANRL | 강화학습 적용 | Reinforcement Learning |
FastKAN¶
# FastKAN은 B-spline 대신 Radial Basis Functions 사용
# 2배 정도 빠른 backward pass
pip install fastkan
from fastkan import FastKAN
Temporal-KAN for Time Series¶
Applications¶
1. Scientific Discovery¶
- 물리 법칙 발견: 데이터에서 물리 공식 추출
- 수학적 관계: 변수 간 관계를 기호적으로 표현
- PDE Solving: 편미분 방정식 수치 해법
2. Time Series Forecasting¶
Temporal-KAN은 전통적인 LSTM/Transformer 대비: - 더 적은 파라미터로 경쟁력 있는 성능 - 예측 근거의 해석 가능성
3. Graph Learning¶
GraphKAN 권장 사항: - Latent space에서 KAN 사용 - 입력/출력에 linear embedding/unembedding 레이어 추가
4. Computational Biology¶
- Genomics 태스크
- 단백질 구조 예측
- Drug discovery
Implementation¶
Installation¶
Basic Usage¶
from kan import KAN
import torch
# 1. 데이터 준비
X = torch.randn(1000, 2) # 2차원 입력
y = torch.sin(X[:, 0] * X[:, 1]).unsqueeze(1) # f(x,y) = sin(xy)
# 2. 모델 생성
# width: 각 레이어의 뉴런 수 [input, hidden..., output]
# grid: B-spline의 grid 크기
# k: B-spline의 차수
model = KAN(width=[2, 5, 1], grid=5, k=3)
# 3. 학습
dataset = {'train_input': X[:800], 'train_label': y[:800],
'test_input': X[800:], 'test_label': y[800:]}
model.fit(dataset, steps=200)
# 4. 시각화
model.plot()
Symbolic Regression¶
# 기호적 표현 자동 탐색
model.auto_symbolic()
# 특정 엣지에 기호 함수 고정
model.fix_symbolic(layer=0, edge=(0, 0), fun='sin')
model.fix_symbolic(layer=0, edge=(1, 0), fun='sin')
# 공식 추출
formula = model.symbolic_formula()
print(formula) # sin(x_0 * x_1)
Hyperparameter Tuning Guide¶
# 1. 작은 모델에서 시작
model = KAN(width=[5, 1, 1], grid=3, k=3)
# 2. Underfitting이면 width 증가
model = KAN(width=[5, 5, 1], grid=3, k=3)
# 3. 여전히 underfitting이면 depth 증가
model = KAN(width=[5, 3, 3, 1], grid=3, k=3)
# 4. 성능이 좋으면 grid extension으로 정밀도 향상
model = model.refine(grid=10)
# 5. 해석가능성이 필요하면 sparsification
model.fit(dataset, lamb=0.01) # L1 regularization
pruned_model = model.prune()
Efficiency Mode¶
# 기호 분기 비활성화로 학습 속도 향상
model.speed()
# 직접 학습 루프 사용 시 필수!
for epoch in range(epochs):
pred = model(X)
loss = criterion(pred, y)
loss.backward()
optimizer.step()
Comparison Table¶
| Criterion | MLP | KAN | Winner |
|---|---|---|---|
| Training Speed | Fast | 10x slower | MLP |
| Parameter Efficiency | Moderate | High | KAN |
| Accuracy (small scale) | Good | Better | KAN |
| Accuracy (large scale) | Better | Depends | MLP |
| Interpretability | Low | High | KAN |
| Hardware Efficiency | High | Moderate | MLP |
| Continual Learning | Poor | Better | KAN |
| Implementation Ease | Easy | Moderate | MLP |
When to Use KAN¶
Use KAN when: - Interpretability is crucial (scientific discovery) - Working with small-scale, well-defined problems - Parameter efficiency matters - Need to extract symbolic formulas - PDE solving or physics-informed learning
Use MLP when: - Training speed is critical - Large-scale classification/regression - Standard deep learning pipelines - Hardware constraints exist
Related Work¶
Survey Papers¶
- "A Survey on Kolmogorov-Arnold Network" (ACM Computing Surveys, 2025)
- "KAN 2.0: Kolmogorov-Arnold Networks Meet Science" (arXiv, 2024)
Alternative Architectures¶
- Rational Neural Networks: 유리 함수 기반 활성화
- Neural Additive Models (NAMs): 해석 가능한 가산 모델
- Symbolic Regression: 유전 프로그래밍 기반 공식 탐색
References¶
- Liu, Z., et al. (2025). KAN: Kolmogorov-Arnold Networks. ICLR 2025.
- Liu, Z., et al. (2024). KAN 2.0: Kolmogorov-Arnold Networks Meet Science. arXiv:2408.10205.
- Kolmogorov, A. N. (1957). On the representation of continuous functions of several variables by superposition of continuous functions of one variable and addition.
- Arnold, V. I. (1957). On functions of three variables.
- Li, Z., et al. (2024). Exploring the Limitations of KAN in Classification. arXiv:2407.17790.
Citation¶
@inproceedings{liu2025kan,
title={KAN: Kolmogorov-Arnold Networks},
author={Liu, Ziming and Wang, Yixuan and Vaidya, Sachin and Ruehle, Fabian and Halverson, James and Solja{\v{c}}i{\'c}, Marin and Hou, Thomas Y and Tegmark, Max},
booktitle={International Conference on Learning Representations},
year={2025}
}