Transfer Learning and the Future of Enterprise ML
This is a blog about where Enterprise Machine Learning could evolve to over the coming years.
I’ve been around SAP BI for nearly 2 decades, and been training ML algorithms off and on for well over 3 years. In fact it was during the December holidays 3 years ago that I developed my first Machine Learning app (it is a routing-automation app for help desks, that uses deep learning to classify calls based only on their problem texts – turns out there’s a lot you can learn from the words people use to describe their problems).
Since then I have created a few machine learning applications, mostly using SAP HANA databases as my data foundation, but almost all of the algorithms have been hand crafted in Python. Its a technical process and requires skill in a number of areas and experience of enterprise-scale software solutions. Given the power of machine learning more people should be doing this. Why aren’t they? Or perhaps a more informative question is ‘Why is it taking so long for enterprise-scale machine learning to arrive?’
We all know that machine learning is solving many problems at the individual problem level. For example computer vision is now better that human vision for detecting a range of entities in images, and for spotting patterns of disease. There are many other examples of machine learning being applied to and solving discrete problems that use large data sets to train a machine to identify patterns and use those patterns to make predictions on unseen examples. Its truly amazing how far the state of the art has progressed in the last few years.
While crafting discrete solutions I’ve asked myself why more people aren’t doing this, and I’ve been trying to settle on the best way that machine learning can be harnessed at the Enterprise level. Solving that problem will surely unleash the full potential of machine learning upon everyone within the modern enterprise, and in doing so deliver on the Intelligent Enterprise promise.
It seems like every large software vendor is promising to inject machine learning into their solutions in one form or another. But all of this is taking place at the discrete level. Sure, if I have a sentiment analysis problem I can create a pipeline in SAP Data Hub and link to the TextBlob algorithm via the SAP ML Foundation and analyse sentiment. But I’m constrained by what SAP chooses to host on the Machine Learning Foundation. What if none of that quite fits my needs, do I have to train something from scratch?
Hand-crafting algorithms from the ground up is not a scalable solution within the enterprise context. Nor are we all going to become machine learning engineers so that we can do this for ourselves every time we need a new piece of machine automation.
But recently, while I was putting the finishing touches to an ‘intelligent’ cat flap, I used a technique that might actually be a solution to the Enterprise ML problem. Its not a new technique, but I suspect it is currently being overlooked in favour of a technically-purist approach.
Before I give too much away let me explain the problem I faced and how I solved it.
Our family has a problem with the neighbour’s cat (let’s call him Sylvester to protect his privacy, he’s a Siamese) who trespasses into our kitchen through our cat flap and helps himself to our cat’s food. Our cat (Lillie, of the Ragdoll-esque breed type) refuses to wear a collar so one of those electronic unlocking solutions won’t work, and besides they’re quite expensive.
So I had a thought to use a small camera to film the entrance and to code an algorithm to release the flap when it recognised Lillie approaching, but not for Sylvester.
I could have simply taken many photos of Lillie and many of Sylvester and trained my own algorithm, but that would take time and effort and besides Sylvester has decided, for the sake of his own safety, to run away whenever he sees me these days, so all I would have is photos of his tail! Actually I’ve used some poetic license there because I could also have set up a camera and filmed both cats coming through the flap and then extract all the frames containing Lillie and all those containing Sylvester and train a model to spot the differences, and then deploy the model to classify any new approaching cat as either Lillie or Sylvester. But that would take all of my precious holiday time.
Turns out the most efficient way to do this is to take the general work that others have done in the field of image classification and modify it for my specific application. Its a technique called Transverse Learning and is used a lot in the data science field.
I took the MobileNet model, and scraped off the final layer which classifies any image into 1 of 1000 classes. I then re-trained the final layer using general images of Ragdoll cats and Siamese cats (not even Lillie and Sylvester). Oh and by the way I was able to use a Python script to auto-download images from Google so even that task took minutes and not hours.
I now have a model that was trained by the might of Google but tuned to solve my specific Lillie/Sylvester problem. And it took just a couple of hours to create.
The secret sauce here was the Transfer Learning technique that allowed me to use the generic work of others for the heavy lifting but to then tune the model to my specific purposes.
If you extrapolate this approach and imagine it at the Enterprise-scale you quickly understand how it will be possible to use algorithms trained by others and to fine tune them using your own specific data.
In this way a market in enterprise models could evolve. If I discover that 70% of your algorithm would be useful then I can decide to scrape off just the 30% I don’t need and I can nevertheless compensate you appropriately for your efforts. You get return on 70% of your effort (rather than no return at all) and I get up and running much more quickly. And if you are smart you will develop algorithms with the broadest reach to maximise your returns.
And it gets better yet. Imagine an enterprise market place in which you can analyse the value proposition of any enterprise model and decide which elements to use and which to discard. Model producers and consumers can transact in a friction-less way to their mutual benefit.
It is indeed a brave new world.
If you liked this post and would like to see me evolve this thinking further then give me a like, or why not engage with me further via the comments section.
This piece was written in my personal capacity and does not reflect the opinion of either my employer or SAP.