Discussing the article: "Learnable Curves, Not Weights: A Kolmogorov-Arnold Network from Scratch"

 

Check out the new article: Learnable Curves, Not Weights: A Kolmogorov-Arnold Network from Scratch.

This article builds a Kolmogorov–Arnold Network (KAN) in MQL5, where every edge carries a learnable B‑spline curve rather than a scalar weight. We construct the spline basis, assemble edges and a layer, and fit all coefficients by ridge‑regularized least‑squares in a single solve. The model is delivered as an indicator that visualizes the learned curves and an Expert Advisor that acts on the prediction, providing an interpretable, reusable codebase.

A standard neural network learns a number on every connection. The signal flowing along an edge is the input multiplied by that fixed weight, and each neuron then passes the sum through one fixed nonlinearity, a sigmoid or a ReLU. The shape of the nonlinearity is chosen by the developer, never learned. The network only adjusts how much of it to use.

A Kolmogorov-Arnold Network turns that around. There are no scalar weights and no fixed activation. Every edge carries its own small function, a curve that the training process shapes. A neuron simply sums the outputs of the edge functions feeding into it. The network learns the shapes themselves, and because each shape is a function of one input, you can plot it and read what the model decided that input means.

That last property is the reason this is worth building for trading. A conventional model that predicts the next bar is a black box. A KAN, by contrast, gives you a picture: the curve on the RSI edge shows exactly how the model expects RSI to bend the forecast, and the curve on the volatility edge shows the same for ATR. You are not left guessing what the network keyed on.

This article is a full, self-contained build. We implement the B-spline basis using the De Boor-Cox recursion, assemble the edges, layers, and network, and fit the model with a direct least-squares solve instead of gradient descent. This removes learning-rate tuning and gradient-related failure modes. We then feed the network four market features, save the trained model, draw its learned curves on the chart, and trade its prediction in the Strategy Tester. The code is written first and tested against a fixed standard, and the article is written around what the tests actually produced.

Learnable Curves, Not Weights: A Kolmogorov-Arnold Network from Scratch

Author: Hammad Dilber