TorchCurves adds differentiable B-spline and Legendre curves to PyTorch
Original title: TorchCurves: Differentiable Parametric Curves
Coefficients can train with a surrounding model, with timings against NumPy, SciPy and EfficientKAN.
TorchCurves is a PyTorch library that treats vector-valued parametric curves as learnable primitives. Batches of scalar inputs map to B-spline or Legendre polynomial curves, with gradients through inputs and coefficients. It provides trainable modules, reusable basis modules and a functional interface for embeddings, Kolmogorov-Arnold networks and functional regression. Timing experiments compare evaluation with NumPy and SciPy and KAN training with EfficientKAN, without custom hardware kernels.
- The library is available on GitHub at alexshtf/torchcurves.
- Authors say the approach is practical for some sizes and costly for others.
- Implementation uses classical evaluation plus vectorized PyTorch operations.
From the original article
1 min read at arxiv.orgWe present TorchCurves, a PyTorch library that treats vector-valued parametric curves as learnable primitives. Its central operation maps batches of scalar inputs to points on curves represented in B-spline or Legendre polynomial bases, with differentiation through both inputs and coefficients. Curve coefficients can be optimized jointly with the surrounding model or produced by another network.
By Alex Shtoff · arxiv.org
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.