MNIST-Classification-Feature-Extraction
by mmalloy0405 / Dec 1, 2026 / Neurons 104,300 / Synapses 310,015
This genome is an MNIST classification project. It extracts various features from images in the MNIST dataset and feeds them to classifier objects. Utilizes the FEAGI Trainer.
MNIST, Feature Extraction, Classification
Michael Malloy Augustine George
This project focuses on using the FEAGI trainer to classify numbers within the MNIST dataset. This task has two main focus points, the classification task, and using feature extraction to send relevant features that are extracted from the numbers to the classifier.
Feature extraction within Neurorobotics studio is done by using either vector connectivity rules, pattern connectivity rules, or a combination of the two to find common patterns within the number inputs and extract those patterns to separate cortical areas. Our work uses vector and pattern connectivity rules. The three types of feature groups that this project focuses on are orientation, curves, and the enclosed area.
The orientation extraction uses 8 separate connectivity rules to take out the line shapes features that can commonly be found in most numbers. The 8 orientation features all go to their own 28x28x3 cortical areas. The areas are labeled: 0-Degree, 22.5-Degree, 45-Degree, 67.5-Degree, 90-Degree, 112.5-Degree, 135-Degree, and 157.5-Degree. You can view each connectivity rule used in the images listed below this paragraph in the same corresponding order as listed in the previous sentence.
The other extraction performed is focused on the curves within the numbers. The curve extraction uses 4 separate connectivity rules to take out the Top Right, Bottom Right, Top Left, and Bottom Left curves. The curves are also extracted to 4 separate 28x28x3 areas. There is also a 28x28x3 area where all 4 curve mappings are fed to show the combination of all 4 mappings. This area is also downsized to a separate 14x14x1 area that can be used as a downsized curve input for classification. The 4 curve mappings corresponding to Top Right, Bottom Right, Top Left, and Bottom Left are shown in the images below in the same corresponding order.
The enclosed area extraction focuses on finding the space surrounded by a closed loop in an abstract shape. The circuit sends the same 28x28 input to two groups of cortical areas. The first group inverts the input and extracts its outlines. This leaves two edges in the Clean Outline area. One follows the outside of the shape and the other follows the inside.
The second group extends the shape in 8 directions and combines the projections in one cortical area. A pixel where all 8 projections overlap receives 8 excitatory signals, one from each direction. The circuit applies 7 units of inhibition to every pixel in the area. Only pixels that receive all 8 signals stay active, and together they form a filled silhouette of the original shape.
The circuit inverts the silhouette so that only the background outside the shape is active. This background suppresses the outer edge, leaving the inner edge of the shape in the Inner Outline area. The inner outline feeds into two cortical areas labeled Extend Left and Extend Right. These areas extend the outline in opposite directions along each row. The Enclosed Area output keeps the pixels where the two extensions overlap, showing the shape and location of the space inside the loop.
The poster below brings all four steps together in one diagram. It shows how the circuit finds the digit’s boundaries, builds a filled silhouette, and uses both results to isolate and fill the enclosed area.
The other half of this project focuses on the classification task. Two separate approaches were taken to complete this goal. The first approach includes using NRS’s built in classifier object and the second approach includes a manual implementation of the classifier using memory areas and connections. The built-in classifier approach can be found in the Classifier-W/Mem Circuit. This circuit contains two memory areas labeled Feature 1 and Feature 2. The Feature 1 area has episodic memory connections feeding into it from all of the orientation circuit’s outputs. The Feature 2 area has one episodic memory connection from the downsized curve input. These two feature memory areas are both fed into the classifier object as Classifier Samples. There is also a TrainingArea interconnect area that takes the input from the Image Class Teacher IPU and also feeds it into the classifier and a Classifier Class. The Sample Memory Area and Class Memory Area parameters within the classifier are set to 10 for initial neuron lifespan, 10 for lifespan growth rate, and 100 for long term memory threshold. Besides this, all of the settings are the same as when the classifier is imported into the project.
Because the classifier was going through ongoing updates during this project, a manual classifier was also made which can be found under the Manual-Classifier circuit. This manual classifier works similarly to the classifier object without abstracting away the main parts of the circuit. It similarly takes in features from two memory areas that come from the Features Circuit within the project. These two feature memory areas feed into one Sample-Memory area. There is also a Class memory area that has an associative connection coming from the sample memory area and an episodic connection coming from the Training Area.
To detect error within the manual classifier there is a nested Error-Circuit that returns two 1x1x1 values that correspond to an incorrect answer and a correct answer during the classification training task. This error circuit is set up by simply attaching the Training area and the twin area to separate blocks, and then tracking if any area on the training and twin are firing when they are not supposed to be. An incorrect answer would be recorded if either the training area and the twin area are firing in two different places or if there are multiple neurons firing in the twin area. The output for this error circuit is connected to a reward and punishment modulator that affects the associative connection between the Sample Memory and Class Memory areas.
The project can easily be evaluated on either of the two classifiers. You can switch them by simply connecting the output areas within the two circuits to the main OPU and you will see your results of the classifier in the FEAGI trainer.
A full circuit schematic can be found below. It shows the Image Vision IPU and Image Class Teacher IPU as the main inputs on the left side. From there they they are fed into the various feature extraction circuits which then feed their outputs into the two classifier implementations. Finally the Manual Classifier output feeds to the Image Class OPU for evaluation by the FEAGI Trainer. To use the classifier object implementation simply connect the Classifier Training area A full circuit schematic can be found below. It shows the Image Vision IPU and Image Class Teacher IPU as the main inputs on the left side. From there they they are fed into the various feature extraction circuits which then feed their outputs into the two classifier implementations. Finally the Manual Classifier output feeds to the Image Class OPU for evaluation by the FEAGI Trainer. To use the classifier object implementation simply connect the Classifier Training area Class Output to the Image Class OPU and disconnect the manual classifier connection.
