Skip to content

v0.2.1

Latest

Choose a tag to compare

@github-actions github-actions released this 23 Oct 08:06
· 2 commits to main since this release
ab72de3

Fixed

  • MatrixKAN is marked experimental. In 0.2.0 the class does not evaluate B-splines with a batched GEMM. b_spline_basis_matrix is the Cox–de Boor recursion with a Python loop over each basis index, and build_recurrence_matrix_batch is unused. A constant matrix cannot represent that recursion because the weights depend on x. The 0.2.0 docstring and README described the GEMM anyway. 0.2.0 stays on PyPI. This release corrects the description. It does not change the forward pass.
  • A Tesla T4 sweep of that loop (torch 2.11.0+cu130, kanx 0.2.0, shape [2, width, 1], width 32–512, batch 1,024–16,384) is slower than vectorized KAN. The ratio falls from about 6.4× to about 3.3× and stays there. At width 32 and batch 4,096 the calls are 2.10 ms and 13.37 ms. The JSON is benchmarks/results/matrixkan_t4_0.2.0.json.
  • The published CPU table is a warmed three-seed run on an Intel Core i9-9900, TensorFlow 2.21.0. The 0.2.0 single-call columns are not averaged in.
  • The static fit_grid_to_data snippet calls model.build((None, n_features)) first. An unbuilt KAN has no layer weights, and fit_grid_to_data raises.
  • Docs no longer say the spline is zero outside [-1, 1], or that knot differences underflow in float16. The basis stays float32 because (x - t_i) cancels near a knot. Float16's largest finite value is 65504. That is a format limit, not an overflow measured in this contraction. bfloat16 is the practical training dtype because float16 gradients underflow without loss scaling.
  • Docs say prune() zeros coefficients and leaves the tensor shape unchanged.

Changed

  • Package version is 0.2.1 in pyproject.toml, kanx.__version__, CITATION.cff, and the Helm chart appVersion.

What's Changed

  • docs: cover 0.2.0 features in the quickstart notebook by @Mattral in #15
  • docs: correct grid, prune, and MatrixKAN claims by @Mattral in #17
  • fix: mark MatrixKAN experimental in 0.2.1 by @Mattral in #18

Full Changelog: v0.2.0...v0.2.1