Package: splineKANr 0.5.3

splineKANr: B-Spline Kolmogorov-Arnold Networks in Native R 'torch'

Implements Kolmogorov-Arnold Networks (KAN) whose edge functions are B-splines plus a residual base activation, written in native R on top of the 'torch' package. Provides Cox-de Boor basis evaluation with explicit extrapolation policies, multi-layer networks, Adam and L-BFGS training with validation, early stopping, input and output normalization, gradient clipping and reproducible seeds, adaptive (sample-based) grid updates, grid refinement, KAN-specific sparsity regularization, pruning, edge-function visualization and model persistence. A dependency-free base R reference implementation with analytic gradients is included as a numerical oracle and as a training backend that does not need 'libtorch'. The design follows Liu et al. (2024) <doi:10.48550/arXiv.2404.19756>.

Authors:Thang Le-Dinh [aut, cre, cph]

splineKANr_0.5.3.tar.gz
splineKANr_0.5.3.zip(r-4.7-any)splineKANr_0.5.3.zip(r-4.6-any)splineKANr_0.5.3.zip(r-4.5-any)
splineKANr_0.5.3.tgz(r-4.6-any)splineKANr_0.5.3.tgz(r-4.5-any)
splineKANr_0.5.3.tar.gz(r-4.7-any)splineKANr_0.5.3.tar.gz(r-4.6-any)
splineKANr_0.5.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
splineKANr/json (API)

# Install 'splineKANr' in R:
install.packages('splineKANr', repos = c('https://thangpro9999.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/thangpro9999/splinekanr/issues

On CRAN:

Conda:

4.30 score 37 exports 24 dependencies

Last updated from:dc17939672. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK132
source / vignettesOK195
linux-releaseOK118
macos-releaseOK300
macos-oldrelOK176
windows-develOK88
windows-releaseOK88
windows-oldrelOK73
wasm-releaseOK90

Exports:kan_activation_checkkan_benchmarkkan_bspline_basiskan_bspline_basis_rkan_bspline_deriv_rkan_edge_functionkan_edge_importancekan_extend_gridkan_fd_gradient_rkan_fitkan_forward_rkan_gradient_rkan_init_statekan_layerkan_loadkan_make_gridkan_metricskan_module_from_statekan_netkan_partial_dependencekan_plot_historykan_plot_networkkan_prunekan_refinekan_reg_controlkan_regularization_rkan_savekan_scalekan_scalerkan_speckan_synthetickan_unscalekan_update_gridkan_validate_allkan_validate_basiskan_validate_derivativekan_validate_gradient

Dependencies:bitbit64callrclicorodescfarvergluejsonlitelabelinglifecyclemagrittrotelprocessxpsR6RColorBrewerRcpprlangsafetensorsscalestorchviridisLitewithr

Getting started with splineKANr
1. Fit a model | 2. Inspect the learned functions | 3. Grid refinement, pruning, regularization | 4. Save and reload | 5. Numerical validation | References

Last update: 2026-10-29
Started: 2026-10-29

B-spline Kolmogorov-Arnold Networks in R: method, validation and an application to PLS-SEM latent scores
1. Model | 2. Estimation | 3. Validation | 4. Benchmark | 5. Application: predicting satisfaction and loyalty from PLS-SEM scores | References

Last update: 2026-10-29
Started: 2026-10-29

Readme and manuals

Help Manual

Help pageTopics
Fraction of layer inputs outside the spline domainkan_activation_check
Multi-seed convergence and accuracy benchmarkkan_benchmark
B-spline basis in torch (Cox-de Boor, batched)kan_bspline_basis
B-spline basis by the Cox-de Boor recursion (base R reference)kan_bspline_basis_r
First derivative of the B-spline basis (base R reference)kan_bspline_deriv_r
Evaluate one edge function on a grid of inputskan_edge_function
Edge importance (mean absolute edge activation)kan_edge_importance
Extend a domain grid by uniform knots on both sideskan_extend_grid
Central finite-difference gradient of the MSE loss (base R)kan_fd_gradient_r
Fit a B-spline Kolmogorov-Arnold Networkkan_fit
Forward pass of a KAN in base Rkan_forward_r
Mean squared error loss and analytic gradients in base Rkan_gradient_r
Initialize KAN parameterskan_init_state
A single B-spline KAN layer (torch module)kan_layer
Build an extended uniform knot gridkan_make_grid
Regression accuracy metricskan_metrics
Build a torch module from a statekan_module_from_state
Multi-layer B-spline KAN (torch module)kan_net
Partial dependence of the prediction on one predictorkan_partial_dependence
Plot the training historykan_plot_history
Plot the network structurekan_plot_network
Prune edges and hidden nodes with small activationskan_prune
Refine the grid of a model (grid extension)kan_refine
Regularization settingskan_reg_control
Regularization penalty in base Rkan_regularization_r
Save and load a fitted KANkan_load kan_save
Apply or invert a scalerkan_scale kan_unscale
Fit a column scalerkan_scaler
Specify a B-spline KAN architecturekan_spec
Synthetic regression problemskan_synthetic
Update spline grids from data (adaptive grid)kan_update_grid
Run all numerical validationskan_validate_all
Validate the B-spline basiskan_validate_basis
Validate the first derivative of the B-spline basiskan_validate_derivative
Validate parameter gradients of the networkkan_validate_gradient
Plot the edge functions of a KAN layerplot.kan_model
Predict from a fitted KANpredict.kan_model