A Geometrical Approach to Constructing Neural Networks for Perfect Training-set Classification
Organizations: Laboratory of Parallel and Distributed Systems Institute for Computer Science and Control (SZTAKI) · John von Neumann Faculty of Informatics Obuda University Budapest, Hungary
Abstract
This paper proposes a method for constructing a neural network that achieves perfect classification of all samples in a given training set, without taking regularization into account. The network is constructed on-demand, with its layer sizes and neuron parameters determined through a geometrical analysis of the input data, in which separating hyperplanes are created and mapped to neurons with step activation functions. The proposed architecture consists of two hidden layers with distinct roles: inter-class separation and transformation of the data into a linearly separable representation. Inter-class separation requires every bi-chromatic pair of samples belonging to different classes to be separated by at least one hyperplane. We show that when this separation is achieved through a hierarchical partitioning of the data, the leaf nodes of the oblique decision tree, obtained as a byproduct, directly define the neurons of the linear separability layer, whose size is only one neuron greater than that of the inter-class separation layer. Experiments on the MNIST dataset demonstrate that the proposed method achieves perfect training-set classification, and compact models. The direct correspondence between the decision tree and network neurons enhances interpretability and explainability, while the construction procedure offers opportunities for parallel implementation and improved scalability.
Figures & tables
| Method | Layer sizes | Total number of neurons | Construction times | Total construction time (sequential) | Total number of parameters | Training accuracy |
| Perceptron Algorithm | 0: 27-13-1 1: 21-11-1 2: 37-18-1 3: 55-27-1 4: 37-19-1 5: 47-23-1 6: 27-14-1 7: 30-15-1 8: 91-45-1 9: 77-39-1 | 683 | 0: 134 s 1: 107 s 2: 148 s 3: 163 s 4: 124 s 5: 151 s 6: 120 s 7: 118 s 8: 171 s 9: 155 s | 1 389 s | 365 366 | 100% |
| Support Vector Machine (SVC) | 0: 16-8-1 1: 17-9-1 2: 39-20-1 3: 46-23-1 4: 23-11-1 5: 46-23-1 6: 24-13-1 7: 28-14-1 8: 58-29-1 9: 51-26-1 | 534 | 0: 154 s 1: 143 s 2: 234 s 3: 245 s 4: 182 s 5: 242 s 6: 167 s 7: 183 s 8: 261 s 9: 243 s | 2 056 s | 280 684 | 100% |
| Logistic Regression (LR) | 0: 11-6-1 1: 11-6-1 2: 22-12-1 3: 30-16-1 4: 17-9-1 5: 27-14-1 6: 15-8-1 7: 17-9-1 8: 51-26-1 9: 42-22-1 | 381 | 0: 73 s 1: 75 s 2: 95 s 3: 101 s 4: 77 s 5: 93 s 6: 76 s 7: 79 s 8: 121 s 9: 109 s | 899 s | 194 951 | 100% |
| Method | Layer sizes | Total number of neurons | Total construction time (sequential) | Total number of parameters | Training accuracy |
| Linear Discriminant Analysis (LDA) | 625-626-10 | 1 261 | 384 s | 888 771 | 100% |
| Support Vector Machine (SVC) | 356-357-10 | 723 | 2 070 s | 410 489 | 100% |
| Logistic Regression (LR) | 278-279-10 | 567 | 582 s | 298 871 | 100% |
Neural Network Memorization
Neural network memorization studies how models store and retrieve training examples, how this differs from generalization, and how memory can be measured or controlled.
See all 63 papers