AI foundations

Deep learning: what more layers actually buy you

A retail forecasting team spent six weeks building a deep neural network to predict weekly demand across four thousand product lines. GPU time, a data scientist tuning dropout rates and learning rate schedules, the works. Then somebody on the same team built a gradient-boosted tree over a long weekend, using the same features, and it beat the network on almost every category that mattered. The network was not broken. It simply never had a problem that needed what it was built for.

Deep learning is machine learning done with neural networks that stack many layers between input and output, each layer transforming what the last one produced into something a little more abstract. A network reading photographs might have an early layer responding to edges, a middle layer responding to textures and shapes, and a late layer responding to whole objects, and nobody wrote rules for any of that. The layers learn it from data. That capacity to build its own hierarchy of features, rather than have a person hand it the features in advance, is the entire point of the depth.

We build data and AI systems at Shipshape Data, and the mistake we see most often with deep learning happens before any maths gets involved. Teams reach for a deep network because it is the thing everyone is discussing, then spend months fighting a model that was never suited to a few thousand rows of tabular business data in the first place. This guide covers what the extra layers actually buy you, how the approach differs from classical machine learning, the main architectures and what each is genuinely built for, the data and compute a deep model demands, why more layers can make results worse rather than better, and when the plainer model is the correct engineering decision.

What extra layers actually buy you

A single-layer network can only draw a straight line through a problem, more or less. Add layers and each one gets to combine the outputs of the one before it into something new, so the network builds up a structure of concepts the way a person might, without anyone deciding in advance what those concepts should be. In an image, the early layers tend to notice edges and colour boundaries. A middle layer combines edges into corners and simple shapes. A later layer combines shapes into something recognisable as a wheel, a face, a door. Nobody hand-wrote a rule that says "a wheel is a dark circle with spokes." The network arrived at something functionally like that rule on its own, because arriving at it was the only way to keep reducing its errors on the training data.

Layers compose, they do not just add capacity

It is tempting to think of extra layers as simply more room to store patterns, and there is some truth in that, but the more useful way to think about it is composition. Each layer's job is small: detect a slightly more abstract pattern than the layer before. Stack enough of those small jobs and the network can represent relationships that would need an enormous, unwieldy set of rules if a person tried to write them by hand. For data with that kind of layered structure, pixels into shapes into objects, characters into words into meaning, waveforms into phonemes into speech, depth is a genuinely good match for the problem.

Depth costs data and compute. What it buys back is a machine that discovers its own features, instead of a person writing rules for edges, textures or grammar by hand.

Where the basics still hold

None of this replaces understanding how a single layer actually computes a prediction, weights, a bias, an activation function turning a weighted sum into a signal the next layer can use. If that groundwork feels shaky, our piece on neural networks covers it plainly before you get anywhere near depth. Everything in this guide assumes that part is already familiar.

How this differs from classical machine learning

Classical machine learning, linear and logistic regression, decision trees, random forests, gradient-boosted trees, generally works on features a person has already defined. Recency of purchase. Average order value. Days since last contact. Someone who understands the business decides which numbers matter and calculates them, and the model's job is to find the relationship between those numbers and the outcome. That division of labour is the whole reason classical models are so quick to build and so easy to explain: the hard conceptual work of deciding what matters was done by a person, up front, and can be checked by another person afterwards.

Someone used to write the features

Deep learning removes that division. Feed it raw or lightly processed input, pixels, characters, audio samples, and the network learns which combinations of those raw values are useful on its own, through training rather than through a domain expert's judgement. This is why deep learning dominates on images, text, audio and video: nobody has ever managed to write down, by hand, a reliable set of numeric features that captures "this photo contains a cat" across the full range of cats, angles and lighting that exist in the world. A deep network can learn something close to that from enough labelled examples, because it is not limited to the features a person thought to specify.

The trade you make for that

That power is not free. Learning your own features from raw data needs far more examples than fitting weights to features a person already distilled the signal into, and it needs a lot more compute to do the learning. On genuinely unstructured data this trade is usually worth it, because there is no realistic alternative. On structured tabular data, where a person already knows what a sensible feature looks like, the trade often is not worth it, because classical models reach the same answer with a fraction of the data, the time and the electricity bill.

The architectures and what they are actually built for

"Deep learning" spans several distinct architectures, each shaped by the kind of data it was built to exploit. Picking the wrong one for the data you have is a common and avoidable way to waste a project.

Convolutional networks, for anything with local structure

Convolutional networks assume that nearby pixels matter to each other more than distant ones, and that a useful pattern, an edge, a texture, a small shape, can appear anywhere in an image and still mean the same thing. Instead of learning a separate weight for every pixel position, a convolutional layer learns a small filter and slides it across the whole image, so the same edge detector works in the top corner and the bottom corner alike. That sharing of weights is what makes these networks practical on images at all: without it, the number of parameters needed would be absurd. They remain the sensible default for most image and video work, and for anything else with strong local structure, sensor grids, spectrograms, some kinds of tabular data arranged spatially.

Recurrent networks, and why they mostly got replaced

Recurrent networks were built for sequences: text, speech, time series, anything where order carries meaning. They read one element at a time and carry a hidden state forward, a compressed memory of everything seen so far. In principle that lets them handle sequences of any length. In practice, training a network to remember something from fifty steps ago was genuinely hard, because the gradient used to adjust early weights tends to shrink or explode as it is pushed back through many time steps. Variants like LSTMs and GRUs patched that problem reasonably well for years and are still used, particularly where sequences are short and compute is tight.

Transformers, and the attention mechanism underneath them

Transformers replaced recurrence with attention: instead of reading a sequence one step at a time, every position looks directly at every other position and learns how much weight to give each one. That sidesteps the long-memory problem recurrent networks struggled with, and because there is no step-by-step dependency, the computation parallelises across modern hardware far better too. This is the architecture behind almost every large language model in current use, and increasingly behind image models as well. It rests on turning raw tokens into embeddings, numeric representations that place similar meanings near each other in space, which is worth understanding in its own right if you are building anything on top of a language model.

Best for unstructured data with strong local or sequential structure: images, audio, text, video, cases where a person genuinely could not write down the useful features by hand. Watch for: defaulting to the largest architecture on offer. A pretrained transformer can outperform a small convolutional network on images, but only with the compute and the volume of examples to fine-tune it properly. On a few thousand photographs, a smaller convolutional network usually trains faster and generalises just as well.

What depth demands: data and compute

The capability comes with a bill, and the bill has two parts: examples and machines.

The data floor is real

A network with millions of parameters needs a correspondingly large number of examples to learn genuine patterns rather than memorise its training set. There is no fixed number that applies everywhere, it depends on the problem's complexity and how much the examples vary, but as a rough feel: classical models can produce something usable on a few hundred rows, while a deep network trained from scratch on a narrow, specific task typically wants tens of thousands of labelled examples at minimum, and the large public models were trained on datasets that run to billions. Labelling that much data, or gathering it, is frequently the actual bottleneck on a project, well before the model architecture becomes the interesting question.

Compute is not optional

Training a deep network of any real size needs specialised hardware, GPUs or TPUs, because the matrix operations involved do not run practically on a general-purpose processor at that scale. Training runs can take hours for a modest model and weeks for a large one, and even after training, serving the model in production has its own cost: a twelve-layer network answering requests in real time needs infrastructure a decision tree simply does not. Fine-tuning an existing pretrained model rather than training one from nothing brings the bar down a long way, which is the route most teams should actually take, but it does not remove the bar entirely.

Why more layers can make things worse

Depth is not free upside. Past a certain point, adding layers introduces failure modes classical models rarely see.

Overfitting at scale

A network with more parameters than the training data can justify will find spurious patterns and treat them as real, performing brilliantly on data it has already seen and badly on anything new. This is the same overfitting problem that affects any model, but deep networks are unusually prone to it, because their capacity to memorise is so much larger than a linear model's or a shallow tree's. Regularisation, dropout and early stopping all help, but none of them substitutes for having enough genuinely varied data in the first place.

Training headaches that come with depth

Deep networks are also harder to train, mechanically. Gradients pushed back through many layers can shrink towards nothing or grow without bound, leaving early layers barely updating at all or updating wildly. Techniques like residual connections and batch normalisation exist specifically to manage this, and modern architectures build them in as standard, but a network that will not train stably is a common and genuinely frustrating way to lose a week.

The explanation that disappears

A decision tree's logic can be read off, a series of if-then splits a person can walk through line by line. A twelve-layer network's decision cannot be read off in any comparable way. There are tools that offer an approximate explanation after the fact, but they are approximations of a decision the network reached through millions of internal weights, not the decision itself. In a regulated process, a loan decision, a hiring shortlist, a medical triage, that gap between an approximate explanation and an actual one is frequently the difference between a model you are allowed to deploy and one you are not.

When a simpler model is the better call

Most of the business data we actually see at client sites is tabular: rows and columns, named fields, numbers a person already understands the meaning of. That is precisely the situation classical machine learning was built for, and depth rarely earns its cost there.

Tabular data usually does not need it

Gradient-boosted trees and their relatives routinely match or beat deep networks on structured tabular problems, churn, credit risk, demand forecasting, fraud flags, and they do it with a fraction of the build time, the compute and the tuning effort. Tabular features a person can engineer are usually already close to optimal, so a network has little left to discover by learning its own representation, and it pays a large cost in data and compute to arrive at roughly the same answer a tree reaches directly.

Small data, tight deadlines, a need to explain the answer

If you have a few thousand rows rather than a few million, if the deadline is weeks rather than a quarter, or if someone downstream will need to explain a specific decision to a regulator or a customer, those are three separate reasons to start simple, and any one of them is usually sufficient on its own. Deep learning is the right call when the data is genuinely unstructured and there is enough of it: photographs, free text, audio, video. It is the wrong call when the honest answer to "could a person write these features by hand" is yes.

Best for tabular business data, structured rows and columns, with thousands or tens of thousands of examples rather than millions, where a gradient-boosted tree or even a logistic regression usually matches deep learning at a fraction of the build time. Watch for: the moment someone asks why a decision was made. A tree's splits can be read off; a twelve-layer network's cannot, and if the model sits inside a regulated process that gap matters more than a percentage point of accuracy.

Where to start

Start with the data you actually have, not the architecture you would like to use. If it is unstructured, images, free text, audio, and there is a genuine volume of it, deep learning is probably earning its keep and the sensible move is to fine-tune an existing pretrained model rather than train one from nothing. If it is tabular, rows and columns with named fields, build the classical baseline first: a gradient-boosted tree, honestly validated, usually takes an afternoon and gives you a number to beat before you commit weeks to anything heavier.

Whichever route it turns out to be, decide upfront how you will know the model is actually working once it leaves the notebook, and budget for that monitoring rather than treating it as an afterthought. A model that looked strong in testing and drifts quietly in production is a different failure with the same root cause: nobody checked whether the thing that seemed clever on day one was still true on day ninety.

If you are trying to work out whether your problem genuinely needs the extra layers, or you have a deep learning project that has quietly stalled on data you do not yet have enough of, talk to us. We would rather tell you the boring model is the right call now than watch a project spend a quarter chasing an architecture the problem never asked for.

Start at your core.

Tell us where your data is today and what you want AI to do. We will come back with a straight answer on what your foundation needs and where the quickest real win is.

Talk to us