What it is
Transfer learning means taking what an AI model learned while doing one job and reusing it for a different job. Instead of building a new model from nothing, you start from one that has already been trained, usually on a huge and varied collection of data, and teach it the new task with a small amount of extra training. The knowledge "transfers" from the first task to the second.
People do this all the time without calling it anything. Picture a concert pianist who sits down at a church organ for the first time. The organ is a different instrument: it has pedals for the feet, several keyboards, and notes that keep sounding until you let go instead of fading away. But the pianist doesn't start from zero. They already read music, already know scales and chords, already have trained fingers and a sense of rhythm. Most of what they need carries over, and they only have to learn the parts that are genuinely new. A beginner who has never touched a keyboard would take years to reach the level the pianist reaches in weeks.
A chef switching from French to Japanese cooking is the same. Knife skills, heat control, tasting as you go, and running a busy kitchen all transfer. The chef needs to learn new ingredients and techniques, not how to cook.
AI models can work the same way, and the reason lies in how neural networks learn. A deep learning model for images is built from many layers. The early layers learn very general things, such as edges, corners, colour patches, and simple textures. Middle layers combine those into patterns like fur, wheels, or eyes. Only the final layers learn the specific answer the model was trained to give, such as "this is a Labrador" or "this is a fire engine." The early and middle layers are useful for almost any picture. A model trained to recognise a thousand everyday objects has already learned to see, in a rough sense, and that ability is worth keeping.
So the basic recipe goes like this:
- Start with a pretrained model. Someone, usually a large lab, trains a big model on a broad task with lots of data. For images, that has often meant millions of labelled photos. For language, it means reading enormous amounts of text, a stage called pretraining.
- Keep most of what it learned. The general layers are kept, sometimes frozen so they can't change at all.
- Swap or add the task-specific part. The final layers, which gave the old answers, are replaced with new ones for your answers, such as "healthy leaf" and "diseased leaf."
- Train briefly on your own examples. Because the model already knows the general patterns, it needs far fewer examples, far less computing, and far less time than training from scratch.
Step 4 is where fine-tuning comes in. Fine-tuning, meaning continued training on a focused set of examples, is the most common way to carry out transfer learning today. The two words are often used almost interchangeably, but transfer learning is the broader idea (reuse what was learned), and fine-tuning is one way of doing it (keep training on the new task).
There's a lighter version too. Sometimes you don't retrain the old layers at all. You run your data through the pretrained model, take what the middle layers produce as a kind of summary of each picture or sentence, and train a small, simple classifier on those summaries. This is called feature extraction, and it's what many no-code tools do behind the scenes. Those summaries are closely related to embeddings, the lists of numbers that capture what a piece of data is "about".
Why it matters
It's why AI stopped being only for giants. Training a large model from scratch takes huge amounts of data, specialised chips, and money. Transfer learning lets one organisation pay that cost once and lets thousands of others build on the result. A small team with a few hundred labelled examples can get a useful model, because the expensive part of learning was already done.
It changed how AI is built: from one model per task to "pretrain once, adapt many times." For most of the history of machine learning, each task got its own model, trained on its own labelled data. A spam filter, a sentiment analyser, and a translation system were separate projects built from scratch. Transfer learning turned this around. Now a lab trains one very large general model, and everyone else adapts it. Stanford researchers named these general models "foundation models" in 2021. Every chatbot you use, from GPT to Claude to Gemini, is a pretrained model that has been adapted, which is transfer learning at enormous scale. The "P" in GPT even stands for "pre-trained."
It makes small data useful. Most real problems don't come with a million labelled examples. A vet clinic might have a few hundred photos of a particular skin condition. A shop might have a few thousand product reviews. A local council might have a few hundred scanned forms. Supervised learning from scratch on that little data tends to fail, because the model memorises the examples instead of learning the pattern. Starting from a pretrained model gives it the general knowledge it would otherwise lack, so it only has to learn the specific distinction.
It saves time, money, and energy. Adapting a model can take minutes or hours instead of weeks. Every project that reuses a model instead of training a new one avoids repeating a large computing bill, which matters for budgets and for electricity use.
It spreads flaws as well as strengths. When thousands of projects are built on the same few base models, a blind spot or bias in the base can show up everywhere. The 2021 Stanford report that named foundation models made this point directly: defects in the base model are inherited by every model adapted from it. That makes knowing where your model came from, and testing it on your own cases, more important, not less.
Real-world examples
Early roots: reusing a network's weights (1992 and 1995)
The idea is older than most people think. At the NIPS conference in 1992 (the proceedings were published in 1993), Lorien Pratt, then at the Colorado School of Mines, presented "Discriminability-Based Transfer between Neural Networks." She took the internal numbers, called weights, from a network trained on one task and used them to start a network for a new task, adjusting them according to how useful they seemed. Networks started this way learned significantly faster than ones started from random numbers.
In December 1995, just after that year's NIPS conference, Pratt and five colleagues, Jonathan Baxter, Rich Caruana, Tom Mitchell, Daniel Silver, and Sebastian Thrun, ran a two-day workshop called "Learning to Learn: Knowledge Consolidation and Transfer in Inductive Systems." Their starting point was that learning every task from scratch has built-in limits, and that systems should reuse knowledge gained on earlier problems. The workshop is often cited as an early landmark for the field. For the next fifteen years transfer learning stayed mostly a research topic, because the networks of the time were small. The idea needed deep learning to become powerful.
"How transferable are features?" (2014)
In November 2014, Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson published a paper, presented at NIPS 2014, with a simple question for a title: "How transferable are features in deep neural networks?" They took an image network trained on ImageNet, the large photo collection behind the deep learning boom, and tested it systematically: split the image categories in two, train on one half, then copy the first one, two, three, or more layers into a new network for the other half, and measure how well it does.
The results turned the layer-by-layer picture into evidence. The first layers learned features that looked much the same whatever the task, similar to simple edge and colour detectors. The deeper the layer, the more specialised it became to the original task, and the less well it transferred. Transfer also worked less well the more different the two tasks were. But even features borrowed from a fairly distant task beat starting with random numbers. And one result surprised the authors: networks that started from transferred layers and were then fine-tuned ended up generalising better, meaning doing better on new images, than networks trained only on the target task, with the benefit lasting through the extra training.
This became the standard recipe in image AI for years: take a network pretrained on ImageNet, keep the early layers, retrain the top.
A skin-cancer classifier built on an everyday-photo network (2017)
In January 2017, a Stanford team including Andre Esteva, Brett Kuprel, and Sebastian Thrun, the same Thrun who co-organised the 1995 workshop, published "Dermatologist-level classification of skin cancer with deep neural networks" in Nature. They didn't build their image model from scratch. They started with a network from Google that had already been trained on 1.28 million images in 1,000 object categories, ordinary things like animals and household objects, none of them skin conditions. Then they trained it further on a collection of nearly 130,000 skin images covering more than 2,000 diseases.
Tested against 21 board-certified dermatologists on photos of skin lesions, including the most common and the deadliest skin cancers, the model matched the doctors' performance. It was a vivid demonstration of transfer learning: a network that learned to see from photos of dogs and cars could be adapted to spot melanoma. The team also said, at the time, that careful testing in real clinics was still needed before any use in practice.
Later research showed why that caution mattered, and it's a lesson about transfer learning in general. In 2019, Julia Winkler and colleagues reported in JAMA Dermatology on a different, commercially approved deep learning system for spotting melanoma. When harmless moles had been marked with a violet skin-marker pen, as is often done before surgery, the system's false alarms soared: its specificity, the share of harmless moles it correctly called harmless, dropped from about 84 percent to about 46 percent. The authors suggested the system had learned to associate pen marks with melanoma, because marked lesions were common among the melanoma training images. Separately, in 2018, dermatologist Adewole Adamson and Avery Smith warned in the same journal that skin-image models trained mostly on lighter skin could perform worse for patients with darker skin. Transfer learning gives a model a head start, but it still learns whatever shortcuts and gaps its new training data contains.
ULMFiT brings transfer learning to text (2018)
By 2017, transfer learning was routine for images but not for language. Most text systems were still trained from scratch for each task. In January 2018, Jeremy Howard of fast.ai and Sebastian Ruder published "Universal Language Model Fine-tuning for Text Classification," known as ULMFiT. Their method first trained a language model, a model that predicts the next word, on a large set of Wikipedia articles, so it learned general facts about English. Then it fine-tuned that model on text from the target task, and finally trained it to classify, for example, whether a film review was positive or negative.
The paper reported error rates 18 to 24 percent lower than the best previous results on most of the six text classification tasks it tested. The result that caught people's attention was about data: with only 100 labelled examples, ULMFiT matched the performance of a model trained from scratch on 100 times more. The authors released their pretrained models and code for free, and wrote in their announcement that they hoped language work would see the same explosion of applications that pretrained ImageNet models had brought to computer vision.
That hope came true quickly. In October 2018, Google released BERT, a transformer pretrained on huge amounts of text and designed to be fine-tuned for many tasks. Within a couple of years, "pretrain on lots of text, then adapt" was simply how language AI was done.
Stanford names "foundation models" (2021)
In August 2021, more than a hundred researchers at Stanford, led by first author Rishi Bommasani, published a long report called "On the Opportunities and Risks of Foundation Models." It gave a name to what transfer learning had become. A foundation model, in their definition, is one trained on broad data at scale that can be adapted to a wide range of tasks. BERT, GPT-3, and the image-and-text model CLIP were among their examples. They chose the word "foundation" to stress that these models are central yet incomplete: a base to build on, not a finished product.
The report was just as much about risk as opportunity. Its authors described "homogenization," the way the whole industry was coming to rest on a handful of base models. That gives enormous leverage, because an improvement to the base helps everything built on it. It also means any defect in the base is inherited by every model adapted from it. The term stuck, and it is now standard in research and industry.
An everyday scenario: the potter's glaze sorter
Imagine Priya, who runs a small pottery studio and sells seconds, pieces with minor glaze flaws, at a discount. Sorting firsts from seconds by eye takes her an hour after every kiln firing, and she wonders whether a phone app could help.
Training an image model from scratch would need thousands of photos she doesn't have. Instead, she uses a free no-code tool that adapts a pretrained image model. She photographs 40 perfect mugs and 40 flawed ones and trains it in a few minutes. It does well on obvious flaws, such as drips and bare patches, because those are the kind of visual features the base model already knows how to see. It struggles with tiny pinholes that only show up under raking light, a detail ordinary photos rarely capture. Priya decides to use the tool as a first pass and check the "firsts" pile herself. That's transfer learning used well: a real head start, with a clear sense of where the borrowed knowledge runs out.
Try it yourself
You can watch transfer learning happen in your browser in about twenty minutes, with Google's free Teachable Machine. It doesn't train a model from scratch: according to Google's own developer tutorial, it takes a pretrained image model called MobileNet, which was trained on a large photo collection, keeps its general visual layers, and trains only a new final layer on your examples. At the time of writing it works without an account, but features and terms change, so check the current details on its site before you start.
- Open the tool. On a laptop or desktop with a webcam, go to teachablemachine.withgoogle.com, click "Get Started", choose "Image Project", then "Standard image model".
- Choose two similar-looking things. Pick two objects that a model built from scratch would find hard to separate with little data: two different mugs, two brands of the same kind of drink can, or two of your pens. Rename "Class 1" and "Class 2" to match.
- Give it only 20 pictures each. Under each class, click "Webcam" and capture about 20 images, moving and turning the object a little. That is a tiny dataset. Training a large image network from nothing on 40 pictures would normally fail.
- Train and time it. Click "Train Model" and note how long it takes. It's usually fast, because only the small final layer is learning. The general knowledge of shapes, edges, and textures was already in MobileNet.
- Test it on new angles. Hold each object up at angles and distances you didn't record and watch the confidence bars. Write down how many of ten tries it gets right.
- Find the edge of the borrowed knowledge. Now make a new project with two classes that depend on something ordinary photos don't capture well: for example, a glass of plain water versus a glass of water with a teaspoon of salt dissolved in it, or two sheets of paper that differ only in a faint pencil mark. Give it 20 pictures of each and test again. If it does no better than guessing, you've found a task where what the base model learned doesn't transfer, because the difference isn't something it ever learned to see.
- Compare the two results. Ask yourself what the first task had that the second lacked. The first task relied on shape, colour, and texture, which MobileNet knows well. The second relied on a difference that is invisible or nearly so. That's the practical test of any transfer learning project: does the base model already "see" the kind of difference you care about?
- Ask a chatbot to explain it. Paste this into any AI chatbot:
I trained Google's Teachable Machine with only 20 photos per class.
It told two similar mugs apart well, but did much worse at telling
plain water from salt water. I've read that Teachable Machine uses transfer
learning from a pretrained model called MobileNet. In plain English,
with no maths, explain why transfer learning worked for the mugs
and not for the water, and give me three questions to ask before
starting a transfer learning project with my own small dataset.
Common mistakes and misunderstandings
Thinking transfer always helps. It doesn't. When the old task and the new one are too different, the borrowed knowledge can be useless or even harmful, a problem called negative transfer. A model that learned from everyday photos has habits that may not suit X-rays, satellite pictures, or microscope slides. In 2019, researchers from Google and Cornell, led by Maithra Raghu, tested standard ImageNet-pretrained networks on medical imaging tasks and found that transfer offered little benefit to performance, and that small, simple models trained from scratch did about as well. Transfer is a strong default, not a law. The only way to know is to compare against a simpler approach on your own test examples.
Assuming the base model's knowledge is neutral. A pretrained model brings everything it learned, including gaps and biases. If the base model saw few examples of certain people, places, accents, or objects, your adapted model inherits that weakness, however good your own examples are. Ask where the base model came from and what data it saw.
Believing your small dataset doesn't need to be good. Transfer learning means you need fewer examples, not careless ones. With only a few hundred examples, a handful of wrong labels or a hidden pattern, like the pen marks in the skin-cancer study, can steer the model badly. Every example carries more weight when there are few of them.
Training too hard and losing what was transferred. If you fine-tune with too much training or on too narrow a dataset, the model can overwrite the general knowledge that made it useful, a problem known as catastrophic forgetting. Practitioners reduce the risk by freezing early layers, training gently, or adjusting only small add-on pieces. For a no-code user, the lesson is to test the adapted model on varied new cases, not just on ones that look like the training set.
Confusing transfer learning with the model "remembering" your examples. Adapting a model changes its internal numbers so it gets better at a task. It doesn't store your photos or documents to look up later. If you want an AI to answer questions from your own documents, that is usually a job for RAG, where the model looks things up before it answers, not for transfer learning.
Thinking you always need to train at all. Today's large foundation models are adaptable enough that, for many text tasks, a good prompt with a few worked examples, known as few-shot prompting, gets you most of the way with no extra training. Try that first. Transfer learning through fine-tuning earns its place when you have a repeated, narrow task, a few hundred good examples, and results from prompting that still aren't good enough.
Treating a high score in testing as proof it works in the world. The skin-cancer story is the warning. A model can match experts on a test set and still fail on real inputs that differ in small ways, such as lighting, camera, skin tone, or a pen mark. Test on examples that look like the real conditions it will face, and keep a person checking results that matter.
Related elements
- Pretraining: the big first stage that creates the general knowledge transfer learning reuses.
- Fine-tuning: the most common way to carry out transfer learning, by training a pretrained model a little more on your own examples.
- Deep Learning: layered networks whose early, general layers are what makes transfer possible.
- Supervised Learning: learning from labelled examples, which transfer learning makes possible with far fewer labels.
- Embeddings: the number summaries a pretrained model produces, often used directly as reusable features.
- Transformer: the design behind BERT and GPT, the models that made pretrain-then-adapt the norm for language.
- Language Model: the kind of model ULMFiT and today's chatbots pretrain before adapting.
- Few-shot: adapting a foundation model with examples in the prompt instead of extra training.
- Continual Learning: the research goal of learning new tasks without forgetting old ones, the problem transfer learning runs into when pushed hard.
- Bias: the flaws a base model can pass on to every model built from it.