Skip to content

v0.1.6 — Grid-range fix, honest benchmarks, hardened API + K8s

Choose a tag to compare

@Mattral Mattral released this 03 Jun 18:55

The most important correctness release to date.

The #1 KAN production bug, fixed

kanx.fit_grid_to_data(model, X) calibrates every KANLinear layer's B-spline
grid to the observed input range. Without this, inputs outside the default
[-1, 1] grid silently zero out the spline path — producing wrong predictions
with no error. If you are using KANX in production on real-world data, upgrade
to this version.

kanx.check_input_range(model, X) logs a WARNING at inference time when inputs
exceed the model's grid range.

Honest benchmarks

The previous "265× MSE win" headline compared against a deliberately
overparameterised MLP. The new benchmark trains for 100 epochs and includes
parameter-matched baselines. The real number: ~75× MSE improvement vs a
parameter-matched MLP, ~25× vs an MLP 10× larger — on a smooth separable
target that favours KANs. Caveats are documented prominently in results.md.

Security and hardening

  • KANX_API_KEY env var enables API key auth on predict/load/reset endpoints.
  • KANX_RATE_LIMIT_RPM enables per-IP rate limiting (returns 429 on burst).
  • Docker: non-root user, readOnlyRootFilesystem-compatible.
  • K8s: CPU+memory limits set (required for HPA to function), all Linux
    capabilities dropped, runAsNonRoot, seccompProfile: RuntimeDefault.

New examples

Five new scripts in examples/: tabular regression, classification, time
series forecasting, edge function visualisation, and a full ONNX pipeline.

Tests

113 tests total (up from 101). New suites for grid-range guards and API
hardening. Branch coverage now enforced in addition to line coverage.

Full changelog: https://github.com/Mattral/KANX/blob/main/CHANGELOG.md