Deep learning is the branch of machine learning that made most of AI's recent advances possible: speech recognition, machine translation, computer vision and large language models. Behind the term are artificial neural networks made up of many layers. This guide explains how they work, without formulas, but with precision.
The artificial neuron
An artificial neuron is a very simple mathematical function, loosely inspired by the biological neuron:
- it receives several input values;
- it multiplies each one by a weight, which indicates its importance;
- it adds them all up and adds a bias;
- it applies an activation function, which introduces non-linearity and determines the output.
On its own, a neuron does almost nothing interesting. It is the combination of thousands, or even billions, of neurons organized in layers that makes it possible to model very complex relationships.
Why "deep"?
A neural network is organized in successive layers:
- the input layer receives the raw data (pixels, sounds, text split into tokens);
- the hidden layers gradually transform this data into increasingly abstract representations;
- the output layer provides the result: a category, a value, or the next token of a text.
We speak of deep learning when the network has many hidden layers. In an image recognition network, the first layers detect edges, the next ones shapes, and then whole objects. Nobody explicitly programs these steps: they emerge from training.
Key takeaway: the strength of deep learning is that it learns the useful features of the data on its own, whereas older approaches required defining them by hand.
How a network learns
Training is based on an iterative principle:
- the network makes a prediction on an example;
- the gap with the right answer is measured using a loss function;
- the backpropagation algorithm calculates in which direction to adjust each weight to reduce that error;
- an optimization method (usually a variant of gradient descent) applies these adjustments;
- the operation is repeated on a very large number of examples.
This process requires a lot of data and computing power, hence the use of specialized processors (GPUs, dedicated chips).
The main architectures
| Architecture | Principle | Typical uses |
|---|---|---|
| Dense network (multilayer perceptron) | Each neuron is connected to all neurons in the next layer | Tabular data, simple tasks |
| Convolutional network (CNN) | Filters that scan the image to detect local patterns | Computer vision, image analysis |
| Recurrent network (RNN, LSTM) | Processes sequences while keeping a memory of the previous element | Time series, older language processing systems |
| Transformer | "Attention" mechanism that links each element to all others in a sequence | LLMs, translation, summarization, and increasingly vision |
The Transformer, at the heart of LLMs
The Transformer architecture, introduced in 2017, profoundly changed language processing. Its attention mechanism lets the model weigh the importance of each word relative to the others, regardless of how far apart they are in the text. Combined with massive training volumes, it gave rise to the large language models used today in AI assistants.
Practical example: in the sentence "The customer called the technician back because he hadn't shown up," the attention mechanism helps the model link "he" to the technician rather than the customer, taking the whole context into account.
The limitations of deep learning
Despite its performance, deep learning has limitations to keep in mind in any project:
- Opacity: it is hard to explain precisely why a network produced a given output. This is often called a "black box."
- Resource needs: training large models is costly in data, computing power and energy.
- Sensitivity to data: a network reproduces the biases and gaps in its training data.
- Fragility outside the training distribution: when faced with situations very different from those seen during training, performance can drop without warning.
- Confident errors: a generative model can state a wrong answer with the same confidence as a correct one.
What this means for a business
In practice, very few businesses need to train their own deep network. Most of the time, they use already-trained models accessible through an API, and focus their efforts on:
- the quality of the information provided to the model (offers, rules, documentation);
- framing the use cases: what the assistant can do, and what it must pass on to a human;
- integration with existing tools (CRM, messaging, calendar);
- the security and confidentiality of the data exchanged.
This pragmatic approach is the one we favor in our chatbot and AI assistant projects. For security issues, see Security, confidentiality and model limitations.
