Logic Replicant
A supervised machine learning algorithm for multiclass classification. Instead of grouping instances that look alike, it learns and replicates the logic that connects an instance to its class.
The idea
Suppose you want a computer to sort things into groups: which patients have which condition, which handwritten squiggle is which digit, which nucleus comes out of a nuclear reaction. Most machine learning tools do this by comparison: a new thing goes with the known things it most resembles. That works when look-alikes really do belong together.
It fails when the reason behind the groups is a rule, because a rule can put two look-alikes in different groups and two very different things in the same one. Think of sorting light switches by whether an odd number of them are on: change one switch and the answer flips, although the panel looks almost the same.
The logic replicant is built to discover the rule. It does not ask "what does this resemble?" but "what is the reason this belongs where it belongs?", and then applies that reason to new cases. The picture below shows the trick: it redraws the map so that things obeying the same rule end up together.
Every non-random classification problem has a reason that connects an instance to its class, whether or not that reason is known: a law of physics, a biological mechanism, a social convention, a mathematical abstraction. Most classifiers never look for this reason. They look for instances that resemble each other and assume that resemblance implies a shared class. A random forest, a nearest-neighbour method or a gradient-boosted ensemble all work this way.
The logic replicant is built to find and replicate the reason itself. It is a supervised multiclass classifier that contains a parametric, differentiable function whose job is to approximate the real function describing the problem. It classifies by applying that logic, not by measuring similarity in the original features, so instances that look very different can be classified together and near-identical instances can be told apart when the logic requires it.
Two components
A logic replicant has two parts. The first is a map-drawing formula: it takes the measurements of an example and places it as a point on a new map, bending the original picture so that examples that follow the same rule land close together, even if they looked different, and examples with different answers land apart, even if they looked alike. The second part is a set of vortices: figurative whirlpools planted on that map, each belonging to one class and claiming the territory around it. An example is classified by whichever vortex pulls hardest where it landed.
Training nudges both parts, thousands of small steps at a time, until every territory contains examples of one class only. Because the vortices are few and simple, the map-drawing formula has to do the real work of bringing each class together, and the cheapest way to do that is to encode the actual rule of the problem. How the map is drawn · how vortices work.
A logic replicant is a pair \(\langle L, V\rangle\).
- \(L\), the leietanic function, transforms every input instance \(\boldsymbol{x}\) from the feature space \(X\) into a point \(\boldsymbol{q}=L(\boldsymbol{x})\) of a space \(Q\) whose dimension is a free design choice. It is a linear map plus a sum of folded linear terms, so it can bend the feature space into regions where each class is isolated. How the transformation works · formal definition.
- \(V\), the vortices, are simple scalar fields placed in \(Q\), each assigned to one class. The class whose field is greatest at \(\boldsymbol{q}\) is the prediction. With one vortex per class this is a Voronoi tessellation of \(Q\). How the vortices work.
Training adjusts both so that \(Q\) contains low-entropy isolations: regions occupied by a single class. Because the vortices are deliberately few and simple, the transformation is forced to bring all instances of a class together, and the most economical way to do that is to encode the actual logic of the problem. Why this yields compact logics.
Dataset size is not part of the definition
The method does not care how many examples you have. The same recipe works with twenty rows or twenty million. It has been tested on four very different problems, from a pure logic puzzle to proteins in mice, nuclear reactions and handwritten digits, and it gave the most accurate answers in all four. A faster implementation for very large datasets is in the works.
Nothing in the model depends on the number of instances: the transformation, the vortices, the loss and the training procedure are the same whether the dataset has twenty rows or twenty million. The published validation covers four multiclass problems of very different nature, from a deterministic Boolean function to protein-expression profiles, nuclear reactions and images, with the logic replicant obtaining the best test accuracy in all of them. The empirical evidence pages report those results; a speed-optimised implementation for larger data is part of the planned work.