What is a neural network?
A neural network is a mathematical model of connected artificial neurons that learns a mapping from input to output by adjusting its connection weights through training.
It is also called an artificial neural network (ANN). It differs from deep learning in that the network is a family of models, while deep learning is the approach of learning with many-layered versions of it. The name comes from biological neurons, but it does not copy the brain; it runs on linear algebra and gradient-based optimisation.
- Topic
- Core concepts
- Also known as
- Artificial neural network, ANN
- Origin
- 1943, McCulloch and Pitts
How a neural network works
- Each neuron adds a bias to the weighted sum of its inputs and passes the result through an activation function.
- Neurons are arranged in input, hidden and output layers; each layer's output feeds the next.
- The output is compared with the true value by a loss function; weights are updated by backpropagation and gradient descent to reduce the error.
- The architecture fits the task: fully connected, convolutional, recurrent or Transformer networks.
In more detail
Why non-linear activations matter
Without non-linear activation functions such as ReLU, GELU or SiLU, any stack of linear layers reduces mathematically to a single matrix multiplication. Non-linearity allows neural networks to approximate arbitrary continuous functions (the universal approximation property) and separate non-linearly separable patterns.
Training deep networks stably
As networks grow deeper, training can suffer from vanishing or exploding gradients as error signals propagate backward. Modern architectures address this using residual skip connections, normalisation layers (BatchNorm, LayerNorm, RMSNorm) and adaptive optimisers such as AdamW alongside dropout or weight decay to prevent overfitting.
Neural network or tree model, depending on the data
Neural networks dominate unstructured modalities (images, audio, text), yet on structured tabular data of moderate size, gradient-boosted decision trees (such as XGBoost or LightGBM) frequently achieve higher accuracy with less tuning and lower compute cost. Choosing a neural network should therefore match the data modality rather than defaulting to deep models.
Why a neural network matters for on-premises AI
The number and size of layers directly set the memory and compute an on-premise server needs. A trained network's knowledge lives in its weight files, which count as intellectual property and are protected with access controls. Because decisions are spread across the weights, explainability is hard; regulated decisions need explanation methods and robustness testing.
A manufacturing plant uses a neural network in its in-house image processing line to classify product photos for quality control.
Common questions
Do neural networks work like the human brain?
No. The term is inspired by biological neurons, but modern networks are mathematical functions built on matrix multiplication and gradient-based optimisation.
How many layers should a neural network have?
There is no fixed rule. The number is set by trial and validation against the problem's complexity, the amount of data and the compute budget.
Related terms
- Backpropagation
- Activation function
- Deep learning
- Multilayer perceptron
- Transformer
- Convolutional neural network
- Model weights
- Parameter
- Perceptron
- Loss function
Sources
- McCulloch and Pitts, A Logical Calculus of the Ideas Immanent in Nervous Activity, 1943
- Rumelhart, Hinton and Williams, Learning representations by back-propagating errors, Nature, 1986
- Goodfellow, Bengio and Courville, Deep Learning, Chapter 6
In the glossary: Glossary, M to Q