How it works · 01 / 05

The leietanic transformation

A learnable function that redraws the feature space so that the logic of the problem becomes geometry.

For dummiesPlain-language view: everyday words, no equations. The full version is one click away.

What the function does

The leietanic function is the map-drawing formula. It takes the measurements of an example and turns them into a position on a new map. The goal is simple to state: examples that obey the same rule should land in the same area, and areas belonging to different classes should be as far apart as possible. The map can have any number of dimensions; two is special because we can draw it.

The leietanic function \(L\colon X\subset\mathbb{R}^F\mapsto Q\subset\mathbb{R}^D\) takes an instance described by \(F\) real numbers and returns a point \(\boldsymbol{q}\) in a \(D\)-dimensional space. Its purpose is a quantification using ordered numbers: instances that obey the same logic should end up in the same area of \(Q\), and areas belonging to different classes should be as isolated from each other as possible. The dimension \(D\) can be anything that suits the model's performance; \(D=2\) is special because it lets us draw the result.

What a good transformation looks like

Consider a hypothetical classification of instruments as guitars or bass guitars. If the number of strings is the relevant logic, a good \(L\) might place 6-string guitars in one region of \(Q\), the less typical 12-string guitars in their own group somewhat apart, and 4-string basses elsewhere, with 6-string basses perhaps close to the 6-string guitars. If instead body size is the logic, \(L\) might simply group all guitars by size and all basses by a larger size. Which logic is found depends on the commonalities in the features, on training, and on other factors such as the number of vortices: one vortex per class constrains the logic to one group per class, two or more allow separate groups for 6-string and 12-string guitars.

Whatever logic is found, the projection should create groups, one or several per class, whose members are on average closer than in the original space, while the distance between groups of different classes is the same or greater than in \(X\). Groups need not be compact or far apart, only far enough for a vortex to tell them apart. When the logic is compact, few samples suffice to determine the criterion; and because \(Q\) is shared by all classes, forming the group of 6-string guitars almost inevitably helps form the group of 4-string basses.

The shape of the function

Think of the formula as a bendable ruler. It starts as a plain straight-line rescaling of the measurements, and then adds a number of folds: places where the line changes direction. Where each fold sits and how sharp it is are learned from the data, so the formula can bend the feature space exactly where the logic needs it. The more folds it has, the more it can express. The folds are what make the formula able to bring together examples that looked different, while staying smooth enough to be trained by nudging.

\(L\) is a linear map of the instance plus a sum of folded linear terms:

\[L(\boldsymbol{x})=\boldsymbol{\Lambda}_a\boldsymbol{x}+\sum_{s=1}^{S}\sum_{r=1}^{R}\boldsymbol{\xi}_{sr}\circ\left|\boldsymbol{\Lambda}_s\boldsymbol{x}+\boldsymbol{\beta}_{sr}\right|\](14)

Each absolute value is a hinge: a straight line that changes slope at a learned point. Summing \(R\) hinges per matrix gives a piecewise-linear function whose breakpoints and slopes are all learned, and the \(S\) matrices allow the folds to happen along different directions of the feature space. This is why the transformation can approximate curves and functions of several variables while remaining differentiable. The connection with piecewise-linear interpolation explains the design; the definition page gives the dimensions of every symbol.

Not a rigid motion

A leietanic transformation must change the balance between same-class and other-class distances. Rotations, translations, reflections and their combinations preserve every Euclidean distance and are therefore explicitly excluded: they cannot make a space easier to classify. Definition 1.