Multilayer perceptron
A multilayer perceptron is a feedforward neural network composed of fully connected layers with nonlinear transformations.
Rearchitecting LLMs
A multilayer perceptron is a feed-forward neural network composed of successive learned linear transformations and nonlinear activations.
- How it is used
- Targets Transformer MLPs for structural optimization and activation inspection.
- How deep it goes
- Explains classic and gated forward paths, tensor dimensions, paired pruning, reconstruction, and hook placement.
- Examples
- Uses DistilGPT2’s 768→3072→768 MLP and Llama-3.2-1B’s gated 2048→8192→2048 MLP.
- What you can do after
- Operate/configure gated MLP width pruning and inspect intermediate activations with PyTorch hooks.
Read how Rearchitecting LLMs explains multilayer perceptron →
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.
- How it is used
- Uses a transparent classification network as the basis for comparing gradient training with evolutionary weight optimization.
- 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 you can do after
- Build a NumPy MLP, inspect its predictions, compare accuracy, and optimize its weights with DEAP genetic algorithms.
Fight Fraud with Machine Learning
A multilayer perceptron is a feedforward neural network composed of fully connected layers that transform input features into predictions.
- How it is used
- Uses individual transaction features to establish a fraud-detection baseline before applying models that exploit graph relationships.
- How deep it goes
- Explains layer dimensions, activation, dropout, initialization, training, evaluation, and learning curves, but stops short of neighborhood aggregation.
- Examples
- Uses the Elliptic Bitcoin dataset, 165-feature transactions, PyTorch listings, learning curves, graph visualizations, and licit-versus-illicit predictions.
- What you can do after
- Builds and evaluates a PyTorch MLP baseline for binary or extensible multiclass transaction classification.
Read how Fight Fraud with Machine Learning explains multilayer perceptron →
Graph Neural Networks in Action
A multilayer perceptron is a feed-forward neural network composed of one or more fully connected hidden layers between its input and output layers.
- How it is used
- Uses node features as tabular inputs to establish a non-GNN classification baseline before testing graph-structured models.
- How deep it goes
- Defines layers, activations, loss, optimizer settings, epochs, and evaluation, but does not derive the network mathematically.
- Examples
- Uses node-feature classification, flattened image inputs, dog-or-cat outputs, and node2vec traversal vectors as examples.
- What you can do after
- Build it from scratch in PyTorch and compare its predictions with logistic regression, XGBoost, and graph neural network baselines.
Read how Graph Neural Networks in Action explains multilayer perceptron →
Also covered in
- Build AI Drug Discovery PipelinesIn early access (MEAP)
- CUDA for LLMs
What to know first
- parameterA parameter is a value or named input that specifies or influences the behavior, computation, or output of a function, model, or system.
- accuracyAccuracy is the degree to which a result agrees with a specified truth, reference, or criterion, commonly measured as the proportion of evaluated predictions that are correct.
- deep learningDeep learning is a machine-learning approach that uses neural networks with multiple computational layers to learn representations from data.
- graph neural networkA graph neural network is a neural-network model that learns representations or predictions from graph-structured data by combining information from connected entities.
Related concepts
- ReLUuses · ReLU is an activation function that maps an input x to the greater of x and zero.
- matrix-matrix multiplicationuses · Matrix multiplication is an operation on compatible matrices in which each entry of the product is the dot product of a row of the first matrix and a column of the second.
- torch.nn.Moduleuses · torch.nn.Module is PyTorch’s base class for neural-network components, providing an interface for computation and managing registered parameters and submodules.
- softmaxuses · Softmax is a function that exponentiates each value in a score vector and normalizes the results to produce positive values summing to one, forming a probability distribution.
- attentioncontrasts with · Attention is a neural-network mechanism that computes input-dependent relevance weights to combine information from representations for a context-dependent computation.
Questions about multilayer perceptron
What is multilayer perceptron?
A multilayer perceptron is a feedforward neural network composed of fully connected layers with nonlinear transformations.
Which Manning books explain multilayer perceptron?
Rearchitecting LLMs, Evolutionary Deep Learning: Genetic algorithms and neural networks, Fight Fraud with Machine Learning and Graph Neural Networks in Action.
What should I know before learning multilayer perceptron?
Manning books that teach multilayer perceptron usually introduce parameter, accuracy, deep learning and graph neural network first.
What is the difference between multilayer perceptron and attention?
A multilayer perceptron is a feedforward neural network composed of fully connected layers with nonlinear transformations. Attention is a neural-network mechanism that computes input-dependent relevance weights to combine information from representations for a context-dependent computation.
What is multilayer perceptron also called?
Multilayer perceptron is also called MLP or multi-layer perceptron.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



