How Neural Networks Learn

How are neural networks different from machine learning?

Neural networks are one type of machine learning, not a rival to it. This compares them with classic methods on data needs, features, and explainability.

On this page
  1. Machine learning is the umbrella term
  2. What makes a model a neural network
  3. How the two compare in practice
  4. Where neural networks stand out
  5. Where simpler methods can be the better choice
  6. Where deep learning fits
  7. Summary

Neural networks are not a rival to machine learning. They are one type of machine learning. Machine learning is the broad field of building models that learn patterns from data, and neural networks are one family of models within it. Comparing them is a bit like asking how squares differ from rectangles: one is a special case of the other.

Machine learning is the umbrella term

Machine learning covers any method that improves at a task by learning from examples instead of following rules a person wrote by hand. Common examples include:

  • linear and logistic regression
  • decision trees and random forests
  • support vector machines
  • k-nearest neighbors
  • gradient-boosted trees
  • neural networks

Neural networks sit on that list next to the others. The label “machine learning” describes the whole family, so the useful question is which member of the family fits a given problem.

What makes a model a neural network

A neural network arranges simple units in layers. Each unit takes a weighted sum of its inputs, adds a bias term, and passes the result through an activation function such as ReLU or sigmoid. The weights and biases are the parameters that training adjusts. The number of layers and units is usually chosen in advance.

Neural networks are typically trained with gradient-based optimization, using backpropagation to work out how each weight should change. Other methods use different procedures. A decision tree, for example, is usually built by choosing splits in the data, not by gradient descent.

How the two compare in practice

These are tendencies, not hard rules.

Classic methods (such as trees and linear models) Neural networks
Typical inputs Tables of features, often designed by people Raw or high-dimensional data, such as images, audio, or text
Data needed Often workable with smaller datasets Often need large datasets to do well
Feature design Often done by people Often learned from the data
Explainability Simpler models can be inspected directly Harder to explain, though explanation tools exist
Training compute Often modest Often needs specialized hardware such as GPUs

Where neural networks stand out

Neural networks have had their most visible successes on images, speech, and language. These are cases where the raw input is large and complex and the useful patterns are hard to describe by hand. Convolutional networks, widely used for images, are one example. The reasons they suit that work are covered in “Why Convolutional Neural Networks Are Preferred for Computer Vision Applications.”

Where simpler methods can be the better choice

For small tables of data, a linear model or a random forest is often competitive with a neural network, and it is usually faster to train and easier to explain. A common practical approach is to start with a simple baseline and move to a neural network when the data is large and unstructured, or when simpler models stop improving.

The choice depends on the problem, not on which family is newer. “The No Free Lunch Rule in Machine Learning” makes the broader point that no single method wins on every problem.

Where deep learning fits

Deep learning refers to neural networks with many layers. The usual ordering is that artificial intelligence is the broadest field, machine learning is a part of it, neural networks are one part of machine learning, and deep learning is a part of neural networks. The boundary between a basic neural network and a deep one is covered in “The Difference Between Artificial Neural Networks and Deep Neural Networks.”

Summary

Neural networks are a type of machine learning. Whether one fits a problem better than a classic method depends on the kind of data, how much of it there is, and how much the result needs to be explained.

The complete guide to how neural networks learn

How Neural Networks and Machine Learning Actually Learn
Read the guide

Keep exploring

Guides from other topics

All topics →