liveBook · Manning

Multilayer perceptron

As explained in Evolutionary Deep Learning: Genetic algorithms and neural networks

A multilayer perceptron is a feedforward neural network composed of an input layer, one or more hidden layers, and an output layer of interconnected units.

A multilayer perceptron (MLP) is a feedforward neural network with an input layer, one or more hidden layers, and an output layer. A simple NumPy MLP provides a transparent model for binary classification and a base network for neuroevolution. section 6.0 section 6.1

The implementation-driven workflow uses the MLP to:

  • Construct a network with two inputs, a configurable middle layer, and one output. section 6.1
  • Train the network across generated classification, moons, circles, blobs, and Gaussian-quantiles datasets. section 6.1
  • Compare predictions and accuracy with a scikit-learn logistic-regression baseline. section 6.1
  • Replace conventional backpropagation training with genetic search over the network’s weights and parameters. section 6.2

Evolving an MLP’s weights

Represent every network parameter as a gene, reshape gene slices into the original parameter tensors, and install them as new weights. DEAP evaluates each individual by setting those parameters, predicting the dataset labels, and returning a fitness value; selection, crossover, and mutation then evolve the population. section 6.2

Figure 6.1 Backpropagation vs. neuroevolution optimization

Compare the two optimization paths: backpropagation pushes calculated loss through the network, whereas neuroevolution searches directly over weight values. section 6.1

How Evolutionary Deep Learning: Genetic algorithms and neural networks covers it

How deep it goes
Explains NumPy construction, training, prediction, parameter replacement, and genetic evaluation without presenting extensive mathematical derivations.
Examples
Demonstrates binary classification on generated classification, moons, circles, blobs, and Gaussian-quantiles datasets, including an all-ones weight configuration.
What it assumes
Assumes a solid deep-learning background while reviewing the MLP’s structure and internal workings through NumPy.
What you can do after
Build a NumPy MLP, inspect its predictions, compare accuracy, and optimize its weights with DEAP genetic algorithms.
How it connects
Connects multilayer perceptrons with backpropagation, logistic regression, genetic algorithms, evolutionary strategies, and differential evolution.

Also explained in

Compare how 2 books explain multilayer perceptron →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Evolutionary Deep Learning: Genetic algorithms and neural networks. The section links point to the parts of the book it draws on.