What Is Deep Learning, and How Does It Work?
Deep learning uses layered neural networks to find patterns in images, text and sound. Learn how it works, where it fits and what it needs to run well.
On this page
Short answer
Deep learning is a branch of machine learning that uses neural networks with several layers to learn patterns directly from data. Each layer turns raw input, such as pixels or words, into more useful features, and the final layer produces a prediction, such as a label, a summary or the next word in a sentence.
What is deep learning?
Deep learning is machine learning done with neural networks that have many layers. The word deep refers to the number of layers, not to how hard the idea is: a network with two layers is shallow, while one with ten or a hundred layers is deep.
Each layer takes the output of the layer before it and builds something more useful from it. Early layers in an image model might notice edges and colours, middle layers might notice shapes and textures, and later layers might recognise a face, a product or a document type. The model learns these steps from examples, not from rules written by a person.
Deep learning sits inside machine learning, which sits inside artificial intelligence. The table below shows how it differs from the older style of machine learning that most teams used first.
| Aspect | Traditional machine learning | Deep learning |
|---|---|---|
| Features | A person chooses the features to feed in | The network learns features from raw data |
| Data needed | Works with hundreds or thousands of examples | Usually needs thousands or millions of examples |
| Typical input | Tables of numbers and categories | Images, audio, video and raw text |
| Typical tasks | Scoring, ranking and simple classification | Image, speech and language understanding |
If your data is a tidy table and you have a few thousand rows, traditional machine learning is often the better first step. Deep learning earns its place when the input is messy and high-dimensional, such as photos, voice recordings or long documents. For a fuller comparison, see Deep Learning vs Machine Learning: What's the Difference?
How does a neural network learn?
A neural network learns by adjusting small numbers, called weights, until its answers match the examples it was shown. It starts with random weights, makes a guess, measures how wrong the guess was, and then nudges the weights a little in the direction that would have made the guess better.
This loop runs over the training data many times. Each pass is called an epoch, and a model may train for tens or hundreds of epochs. The measure of wrongness is called the loss, and the method that nudges the weights is called backpropagation: the error is passed back through the layers so each layer learns how much it contributed to the mistake.
Training needs three things to work well. First, enough labelled examples, so the model sees each case many times. Second, a held-out test set that the model never trains on, so you can tell whether it learned the pattern or just memorised the examples. Third, enough compute, usually graphics cards, because the weight updates involve millions or billions of small calculations.
When training is done, the weights are frozen and the model is used to make predictions on new data. If the new data looks like the training data, the answers are usually good. If it looks very different, the answers can be wrong, which is why testing on fresh examples matters. Read How to Test AI Models Before You Ship Them before putting a model in front of users.
What are the main types of deep learning models?
Different deep learning models suit different kinds of input. Choosing the wrong shape wastes time, so it helps to know the four families that cover most business work.
- Convolutional networks (CNNs). Built for images and video. They scan for local patterns such as edges and textures, then combine them into objects. Common uses are defect detection, document scanning and photo tagging.
- Transformers. Built for sequences such as text, code and audio. They weigh which parts of the input matter most for each output, which makes them strong at summarising, drafting and answering questions. Most large language models are transformers.
- Recurrent networks (RNNs). An older family for sequences, still used in some forecasting and signal work, though transformers have replaced them in most language tasks.
- Generative models. Built to produce new content, such as images, audio or text, by learning the patterns in the training data. Diffusion models and autoencoders belong here.
In practice, most teams do not build these from scratch. They start from a pre-trained model and adapt it to their own data, a method called fine-tuning. That keeps the cost down and gives a working baseline in weeks rather than months.
Where is deep learning used today?
Deep learning is used wherever the input is too messy for fixed rules. Image recognition is the oldest success: sorting photos, reading scanned documents, checking products on a line and spotting damage in photos. Language work is the newest large use: drafting replies, summarising long documents, translating and searching by meaning rather than by keyword.
Speech is another common use. Transcription turns calls and meetings into text, and voice assistants turn spoken requests into actions. Recommendation systems use deep learning to rank products, articles and videos for each person, based on what similar people chose before.
Forecasting also uses it, for example predicting demand, machine faults or payment delays from long histories of readings and transactions. The pattern is the same in each case: lots of raw input, a clear output to predict, and a cost for getting it wrong that is low enough to accept occasional errors.
It is a poor fit where the rules are fixed and exact, such as tax calculation or access control, and where every answer must be explainable in plain words. In those cases a rule-based system or a simpler model is easier to check and to defend. Machine learning in general is explained in What Is Machine Learning, and How Does It Work?
What data and compute does deep learning need?
Deep learning needs more data than traditional machine learning, and the data needs to match the job. A model trained on clean studio photos will struggle with phone photos taken in bad light. A model trained on formal documents will struggle with chat messages. Collecting and labelling the right examples is usually the largest part of a deep learning project.
Labelling means attaching the correct answer to each example: this photo shows a damaged parcel, this message is a refund request, this recording says these words. Teams often label a few thousand examples by hand and then use the first model to suggest labels for the rest, with a person checking the uncertain ones.
Compute is the second cost. Training a large model needs graphics cards or cloud accelerators, and training runs can take hours or days. Running a trained model, called inference, is much cheaper and often runs on ordinary servers. Many teams train in the cloud and run the finished model on their own servers or on a hosted service.
If you have only a few hundred examples, start with transfer learning: take a model that was already trained on a large public dataset and fine-tune it on your examples. This works well for images and text, and it is how most small teams get a useful model without a large labelling budget.
Example (hypothetical): a support team sorts tickets
Example (hypothetical): a support team receives 600 tickets a day. Sorting them by hand takes about 3 minutes each, which is 600 x 3 = 1,800 minutes, or 30 hours a day across the team.
The team trains a text classifier on 5,000 labelled tickets from the past year. In testing, the model sorts 480 of the 600 tickets correctly on its own. The remaining 120 go to a person for review, taking about 2 minutes each, which is 120 x 2 = 240 minutes, or 4 hours a day.
The daily sorting time falls from 30 hours to about 4 hours, saving roughly 26 hours a day. The team keeps the model honest by checking a sample of its automatic decisions each week and retraining it when new ticket types appear.
What are the common mistakes?
The most common mistake is starting with deep learning when a simpler method would do. If a spreadsheet rule or a small traditional model answers the question, use that first and measure it. Deep learning should be the answer to a measured gap, not the starting point.
- Training on the wrong data. Examples that do not match real input produce a model that looks good in testing and fails in use.
- Testing on training data. A model that memorised its examples scores well and teaches you nothing. Always test on data the model has never seen.
- Ignoring the error cost. A model that is right 90 percent of the time is fine for ranking search results and poor for approving refunds. Match the use to the accuracy you measured.
- No plan for drift. Language, products and customer behaviour change, so a model left alone slowly gets worse. Plan a regular check and retrain cycle.
A small pilot with a clear success measure beats a large build with a vague goal. Pick one task, label a few thousand examples, train a simple model, and compare it with the current way of doing the job.
Key takeaways
- Deep learning learns features from raw data instead of needing hand-picked ones
- Training adjusts weights by measuring errors and nudging them in the right direction
- CNNs suit images, transformers suit text, generative models produce new content
- It needs labelled data that matches real input, plus enough compute to train
- Transfer learning lets small teams start from a pre-trained model
- Test on data the model has never seen, and plan for drift over time
Frequently asked questions
What is the difference between AI, machine learning and deep learning?
Artificial intelligence is the broad field of making computers do tasks that need judgement. Machine learning is one way to do that, by learning patterns from examples instead of following fixed rules. Deep learning is one kind of machine learning, using neural networks with many layers to learn patterns from raw data such as images and text.
How many layers make a network deep?
There is no strict number. A network with two or three layers is usually called shallow, while one with ten or more layers is called deep. Modern language and vision models have dozens or hundreds of layers. What matters is not the count but whether the layers let the model build useful features step by step.
Does deep learning need a lot of data?
Usually yes, though transfer learning lowers the bar. A model trained from scratch on images or text often needs tens of thousands of examples or more. Starting from a pre-trained model and fine-tuning it on your own data can work with a few thousand examples, sometimes fewer for a narrow task.
Can deep learning explain its answers?
Only partly. Some methods show which parts of the input influenced an answer, such as highlighting words or image regions. But a deep network does not give a plain-language reason for a decision, which is why it is a poor fit for decisions that must be fully explained.
What hardware does deep learning need?
Training usually needs graphics cards or cloud accelerators because the calculations are large and parallel. Running a trained model is much lighter and often works on ordinary servers. Many teams train in the cloud and run the finished model on their own infrastructure or a hosted service.
When should a team avoid deep learning?
Avoid it when the rules are fixed and exact, when you have only a small amount of data, or when every answer must be explainable. A rule-based system or a simpler machine learning model is easier to test, cheaper to run and simpler to defend in those cases.