Contents
We are working on the general mapping performed by one feedforward neural network layer, , with pre-activation , where is an input vector, is a weight matrix, is a bias vector, and is applied element-wise unless stated otherwise. The setting is a standard feedforward neural network layer with compatible dimensions, deterministic forward propagation, and activation functions such as sigmoid or ReLU.
Deep Breakdown
A general neural network layer takes an input vector, applies a linear transformation, then applies a non-linear activation. This is one of the core building blocks of modern machine learning.
The mapping happens in two stages:
- Linear stage: combine input features using learned weights and biases.
- Non-linear stage: apply an activation function so the network can represent non-linear relationships.
Without the activation, stacked layers collapse into one overall linear map. With the activation, the network can learn boundaries, interactions, and patterns that logistic regression alone cannot express.
For one layer:
or equivalently:
Where:
- is the input vector.
- contains trainable weights.
- contains trainable biases.
- is the pre-activation vector.
- is the output of the layer, often called the activation.
- is the activation function, applied element-wise for standard dense layers.
In data analytics and data science, this layer mapping matters because it defines how raw or engineered features are turned into internal representations.
It is the basis of:
- logistic units,
- hidden layers,
- output layers,
- backpropagation,
- representation learning,
- deep learning model design.
For a dense layer with input features and output units:
- So the layer maps one vector in to another vector in .
This is called a mapping because it defines a function from inputs to outputs. The learned parameters and determine what the layer does. Training adjusts these parameters to reduce prediction error.