Gradient boosting with Kolmogorov-Arnold Network (KAN) learners -- an interpretable alternative to tree-based boosting (XGBoost/LightGBM/CatBoost).
Project description
KANBoost
Gradient boosting with Kolmogorov-Arnold Network (KAN) learners — an interpretable, from-scratch alternative to tree-based boosting frameworks (XGBoost, LightGBM, CatBoost).
Instead of decision trees as weak learners, KANBoost fits a sequence of small, shallow KAN networks to the pseudo-residuals of the previous stage, following the classic Friedman (2001) gradient boosting recipe. Because each KAN edge is a learnable univariate spline rather than an opaque weight, the resulting ensemble exposes per-feature shape functions that are directly inspectable — closer to a Generalized Additive Model than a black box.
Status: early-stage research project. This is not a drop-in replacement for CatBoost/XGBoost in production. See Benchmarks and Honest limitations below before using this for anything important.
Why this exists
As of mid-2026, there is no widely-used, pip-installable library that combines KAN with gradient boosting. A closely related idea was published as GB-KAN (ICAART 2026), but no public code accompanies that paper. KANBoost is an independent, from-scratch open-source implementation of the same general idea, plus:
- automatic handling of categorical features (smoothed target-mean encoding, done fold-safe), instead of requiring manual one-hot encoding
- built-in early stopping on a validation set
- approximate feature importances derived from learned spline coefficients
Install
git clone https://github.com/tuamah/kanboost.git
cd kanboost
pip install -r requirements.txt
pip install -e .
Quickstart
import pandas as pd
from sklearn.model_selection import train_test_split
from kanboost import KANBoostClassifier
df = pd.read_csv("your_data.csv")
X = df.drop(columns=["target"])
y = df["target"].values
X_train, X_val, y_train, y_val = train_test_split(X, y, test_size=0.2)
model = KANBoostClassifier(
n_estimators=100,
learning_rate=0.2,
kan_hidden=4,
kan_grid=3,
categorical_cols=["region", "plan_type"], # optional
early_stopping_rounds=10,
)
model.fit(X_train, y_train, eval_set=(X_val, y_val))
probs = model.predict_proba(X_val)[:, 1]
importances = model.feature_importances()
Benchmarks
Preliminary results on a real-world telecom churn dataset (100K rows, 10 numeric features used, 8K-row sample for the KANBoost run due to current training-speed limits):
| Model | Test AUC | Notes |
|---|---|---|
| CatBoost (tuned, full data, ~100 columns) | 0.6992 | production baseline |
| KANBoostClassifier (this repo, 10 features, 8K sample) | 0.64 | early prototype, untuned |
| Plain KAN (no boosting) | 0.65 | single model, same features |
| Plain MLP | 0.59–0.62 | same features |
Read this table honestly: KANBoost does not yet beat CatBoost on this dataset. The goal of this repo, at this stage, is to establish a working, extensible implementation and an honest baseline — not to claim state-of-the-art results.
Honest limitations
- Speed: each weak learner is a full KAN forward/backward pass in pure PyTorch. This is currently far slower per-iteration than a histogram-based tree split in XGBoost/CatBoost/LightGBM.
- Tuning: hyperparameters (
kan_grid,kan_hidden,kan_steps,learning_rate) interact in ways that are not yet well understood; expect to need real tuning for your dataset. - Categorical encoding is a simple smoothed target-mean encoder, not CatBoost's ordered boosting scheme — it can leak on small folds if not used carefully.
- Missing values are not yet handled natively; impute before fitting.
Roadmap
See ROADMAP.md for the full project plan, including
planned speed optimizations (FastKAN-style RBF basis, torch.compile),
symbolic-formula extraction for the full ensemble, and benchmark
expansion to standard UCI datasets.
Contributing
Issues and PRs welcome, especially:
- speed optimizations for the per-iteration KAN fit
- better categorical encoding
- benchmark results on additional public datasets
License
MIT — see LICENSE.
Citation / related work
If you use this, please also cite the KAN paper and, where relevant, the GB-KAN paper this project is conceptually closest to:
Liu, Z., Wang, Y., Vaidya, S., et al. (2024). KAN: Kolmogorov-Arnold
Networks. arXiv:2404.19756.
[GB-KAN authors] (2026). Gradient Boosting with Interpretable
Kolmogorov-Arnold Networks. ICAART 2026.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kanboost-0.0.2.tar.gz.
File metadata
- Download URL: kanboost-0.0.2.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d85edea9f22bc72c8908ae0de8b834f72e1286b2034fb32e24cde57e0b398f9a
|
|
| MD5 |
2f174cafdb9ea0a9c75d0b60583cc53f
|
|
| BLAKE2b-256 |
7d3e53fa5f1d45ae457e9e06cd687eb5048254500ac07a04c022435ad85331e0
|
File details
Details for the file kanboost-0.0.2-py3-none-any.whl.
File metadata
- Download URL: kanboost-0.0.2-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa67e7f2b4d96cc2004e1634f8591de777f3b0f1a061c40c49cb5354b15d4c5b
|
|
| MD5 |
31b457bf3b8f6ee71a5c67ec22bc2c5e
|
|
| BLAKE2b-256 |
3ad741eccf66990d43abe6982080b21e70b73120c85a516e3fc45d9f91b17997
|