TorchCurves: Differentiable Parametric Curves

Alex Shtoff

Published November 10, 2026 · on the feed November 11, 2026 · ▲ 3 · arXiv 2611.14516

The abstract

We 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. The library provides trainable modules, reusable basis modules, and a functional interface, supporting applications ranging from continuous feature embeddings to Kolmogorov-Arnold networks and functional regression. Its implementation combines classical evaluation algorithms with vectorized PyTorch operations, emphasizing readability and maintainability without custom hardware kernels. Timing experiments compare curve evaluation against NumPy and SciPy and KAN training against EfficientKAN across a range of problem sizes. The results illustrate where this generality remains computationally practical and where overhead is substantial. Library is available on GitHub at https://github.com/alexshtf/torchcurves.

The Brief

1:40

A short podcast summary of the paper. Written and voiced by AI.

Transcript

TorchCurves. Differentiable Parametric Curves. By Alex Shtoff. Published on the tenth of November.

TorchCurves is a PyTorch library built around one idea: vector-valued parametric curves treated as learnable primitives, pieces a model can train like any other layer. A curve here is a function from a single number to a point, possibly in many dimensions, whose shape is set by coefficients, and the library makes those coefficients something gradient descent can reach.

Its central operation takes batches of scalar inputs and maps them to points on curves. Those curves are represented in either B-spline or Legendre polynomial bases, and differentiation flows through both the inputs and the coefficients. That opens two ways to use a curve. Its coefficients can be optimized jointly with the surrounding model, or produced by another network.

The library offers trainable modules, reusable basis modules, and a functional interface. The applications it supports range from continuous feature embeddings to Kolmogorov-Arnold networks and functional regression. Underneath, it combines classical evaluation algorithms with vectorized PyTorch operations. The emphasis is on readability and maintainability, with no custom hardware kernels.

Timing experiments make two comparisons across a range of problem sizes: curve evaluation against NumPy and SciPy, and KAN training against EfficientKAN. The results illustrate where this generality remains computationally practical, and where the overhead is substantial. The abstract does not claim the library is faster everywhere. It presents the timings as a map of where the general approach pays its way and where it costs.

The trade is made deliberately and reported both ways. Plain vectorized code over custom kernels buys a library that is easier to read and keep up, and the timings show where that choice holds up.

More with an account

Listen to every day’s papers

Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.

Join free
KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.