Handwritten digits
A classic ten-class image task where all models perform well. The logic replicant reaches 98.21% and cuts the MLP's error by 29%.
A classic image task. The logic replicant scores 98.2% and makes about 29% fewer mistakes than the best rival.
What happened
Recognising handwritten digits is a classic task that modern methods handle well, so this is a sanity check. Digits written by different people vary a lot, and some are ambiguous even for a person. The small neural network reached 97.5%. The logic replicant reached 98.2%, about 29% fewer mistakes, using an eight-dimensional map that gives each digit at most two islands.
The digits, drawn
Numbers
| Model | Accur. (train) | Accur. (test) | Precis. (test) | Recall (test) | Configuration |
|---|---|---|---|---|---|
| Replicant | 99.99% | 98.21% | 98.21% | 98.21% | \(S=4, R=4, D=8, |V|=20\) |
| RF | 100.00% | 89.22% | 93.38% | 89.47% | 100 estim., all features |
| MLP | 100.00% | 97.49% | 97.49% | 97.55% | 50 neurons, 1 hidden layer |
| SOM | 93.83% | 93.23% | 92.28% | 93.36% | 10 000 neurons (100×100) |
| XGBoost | 99.64% | 93.70% | 93.71% | 93.89% | 100 estim., max depth 11 |
Analysis
As an image multiclass problem, high accuracies are unsurprising. The RF has the lowest test accuracy, 89.22%, despite 100% in training, the largest drop of the group. The SOM, with 10 000 neurons, reaches 93.23% with the smallest drop, 0.60 points, its best result across all datasets. XGBoost sits in the middle at 93.70%. The two best are the MLP, 97.49%, and the logic replicant, 98.21%. The replicant exploits its internal logic representation in an 8-dimensional \(Q\) that splits the instances into no more than two groups per class. Both accuracies are high, but the replicant reduces the error relative to the MLP by 28.69%.
The logic, made visible
The leietanic function discriminates the majority of instances into well-delimited groups, despite clear irregularities in their shape and size. Digit 1 forms a pair of groups while the rest have one; a few outliers of digits 4 and 9 appear as isolated instances. The vortices in (b) delimit the space each class takes: a large logic distributed over the whole plane, with a clear irregularity in the borders between classes. Digit 1 requires two main groups, and some of its vortices are completely isolated from the others, meaning there are general exceptions in the found logic, sub-logics nested in the main one.