Transfer learning and the rise of collaborative artificial intelligence
You are parent and wish to teach your 8 year old boy how to play violin? Ok. But does this have anything to do with artificial intelligence (AI)? Welcome to the world of transfer learning…
Recent scientific experiments have shown that very young babies — as young as 9-month old — that learn music can significantly improve many of their cognitive functions, such as their future language acquisition. Children who learn how to play music young get both better verbal and language learning skills than the ones who don’t, because they gain enhanced sound representation abilities and modify their brain connectivity.
For adults, learning language is a great example. Have you not noticed that the more languages you learn, the easier it gets ? Of course, it is much simpler to learn italian when you already know spanish, but that’s mostly related to vocabulary similarities. Now, less obvious…why do we get better at learning russian when we already know english and arabic, languages that do not share any vocabulary similarity ? Probably because: 1) we have captured very general principles and abstract structures common to various languages, and 2) we have just learnt… how to learn.
At the end of the day, that makes of us much faster learners to anything else.
If we climb one level higher in the tower of abstraction, we understand something else: logic is also fundamental to transfer knowledge. The more you study mathematics, the more you develop your logic skills. You will learn faster new fields where logic reasoning is important, such as philosophy. Just look at all these great thinkers, Leibniz, Pascal or Descartes: they were all mathematicians !
What is the conclusion here? Learning one thing in one domain can help you learn faster many other things in different domains, in mixing up common abstract structures and logic. You get it: this idea had to be explored by AI!
Although deep learning algorithms have opened the path for a much stronger AI, current systems are still very simple : to train a deep learning based AI from scratch to recognize a dog vs a cat, you still need to show first to the machine thousands and thousands of examples of labeled images (here cats and dogs). Teach this to your kid, and just a handful examples would be enough, right? So what technology could be created in the AI world to perform as good as kids?
One answer is transfer learning. A key hidden secret behind the success of deep learning. And probably the next revolution in AI.
What is it exactly? Transfer learning is a domain of AI which focuses on the ability for a machine learning algorithm to improve learning capacities on one given dataset through the previous exposure to a different one.
Let’s take two examples:
1) We wrote above that learning some languages can help learning other ones. You probably think: this is only true for humans. No! It is also totally true for machines. Famous translation algorithms, such as Google Translate for example, are very sensitive to this phenomenon! Indeed, if you want to train such an algorithm to translate, let’s say, from english to french, then you should also train it to translate spanish to russian, or even italian to german. You would realize that the quality of english-to-french translation would be much improved! This is stunning on a philosophical level: it means that high cognitive phenomenons are also starting to be incidentally observed in latest AI systems.
2) This second example is also very exciting: how transfer learning can help AI systems to learn from a small number of cases. It is probably the most used story of transfer learning practice at the moment, and one of the hidden reason behind why deep learning is such a success. Let’s suppose you want to create an algorithm which is able to differentiate a breast from a lung cancer based on medical images (such as MRI or pathology images). In principle, deep learning algorithms are very powerful for image recognition and should be the best choice. Using them would require 100k to 1M images in order to achieve a good accuracy. But for most medical applications, this is likely to be a huge problem, as most datasets that physicians and researchers can build are typically around only a few hundred images, maximum!
At Owkin, we deal sometimes with these small datasets of a hundred of ultra high resolution (gigapixel) medical images, making our data matrix super horizontal (few samples of order hundred and very large number of features of order billions). So what can we do? We proceed in two steps:
- Step 1 : we import a huge dataset with 1M images of 10k categories (cats, trucks, computers, etc.) called ImageNet and train a deep convolutional neural network (CNN) to classify the images of this source dataset.
- Step 2 : we use this CNN as a starting point and train it to classify the medical images dataset (target dataset). This procedure is called fine tuning from a warm restart. We have another option: extracting the representation of the images at the penultimate layer in the deep neural network and train any standard classification algorithm on these new features. This is called feature extraction. There are many others, such as penalization of the weights by similarity or multi-task learning for instance !
Having this possibility to transfer knowledge and experience from one task — recognize a cat from a plane — to another — distinguish benign from malignant tumors — is doubtlessly one of the key features that can explain the recent success of deep learning technologies. Indeed, deep learning architecture is very well suited for the transfer learning approach, probably much more than any other type of machine learning algorithm. Why? Well, deep neural networks encode the information contained in the image in a hierarchical way : lowest level layers detect low-level features such as contours and textures, which is a basic and universal work in almost any image recognition problem, while highest level layers detect more complex objects and abstract concepts.
Therefore, during Step 1, all the lowest level layers are trained to discover basic shapes and textures on the huge dataset ImageNet, a set of skills that will be reused during Step 2. The neural network does not need to learn from scratch these basic skills and can build upon what has been learned on the huge dataset.
During Step 2, only the highest level layers need to be updated to adjust to the task, whereas the lower level layers can remain unmodified as their job is universal and less specific.
So when you hear or read about all these new technology startups that use deep learning algorithms to recognize faces or guide self-driving cars, you can safely bet that they are using a transfer learning strategy at some point of their research!
Cool, we now have learned what is transfer learning! We have shown that it is very powerful in the context of deep learning and can explain part of its success. But in addition to be important for deep learning, why is this technology so important for the future of AI?
Well, it’s important for two main reasons:
- The first reason is very simple, yet primordial, and we have already shown an example above : transfer learning brings the power of machine learning to small datasets. It is particularly important in the context of medical studies since the current trend is to gather more and more data for each patient, although the number of patients with clean annotations remains usually quite small. It is a big challenge to deal with these horizontal datasets for which standard statistical methods usually fail. To go beyond classical feature selection and regularization methods, we need to integrate external knowledge, which is precisely what a human would do. Therefore one solution would be to look for other datasets, somehow related in their type or statistical distributions, and use a transfer learning approach to bring the information they contain into the problem you want to solve.
- With classical statistical methods, you always start from a white page each time you address a new question. Burdensome, isn’t it? With transfer learning, AI systems can get closer / mimic to what is so precious in the human intellectual adventure : we think collectively, we share knowledge and reasoning, and at the end of the day, we are dwarfs standing on the shoulders of giants. This ability of AI systems to collaborate is precisely the second reason why transfer learning is so important for the future of AI. We are entering a new era where AI systems can mutually cross-fertilize. Each time a new problem is solved with a machine learning approach, our collective resource of AI algorithms is augmented, so that we are creating a library of algorithms, sometimes even called a zoo of models. With transfer learning, it becomes possible to pitch pretrained algorithms in these libraries to enhance the predictive power of many other AI systems. It is incredibly powerful and contributes to a new emerging system of a global and collaborative artificial intelligence.
We love this idea of a collaborative AI at Owkin.
This is why we are building the first platform to enable every researcher or doctor in the world to create and share a new classification algorithm, empowered by transfer learning technologies. Users just need a unique dataset of medical images that have at least two different labels, whether it is for diagnosis, prognosis or drug response prediction. We’ll talk about that in more details in our next post !
To conclude, it is time to go beyond the classical approach where each problem would be solved independently, starting each time again from a white page. Let’s move on, towards a global platform where transfer learning can make all these algorithms share their secrets, help each other, and at the end accelerate medical discoveries.
Special thanks to Stanislas Chambon, an amazing PhD student working on transfer learning, for sharing his thoughts about this topic !