Blog

Beyond the Hype: The Reality of Machine Learning

     
By on October 29, 2019 - 7 Minutes

The crazy thing about machine learning is that people keep talking like it’s the future. Like it’s something we’re going to get to in five, 10 years’ time. In reality, we’re already using it in all aspects of our daily lives. The automated chatbots that answer our online queries; the email filters that decide which messages are worth our attention; the social networks that tell us who to be friends with. All of them are built on machine learning, or ML, technology.

Analysts are now telling us that the ML market will soon be worth $20 billion. In case that didn’t grab our attention, they keep saying that ML is a make-or-break opportunity. Those who don’t jump aboard, they say, will be left eating dust. 

But, beneath all the hype, the reality is a bit more complicated — at least for the average company. ML might offer a glittering future, paved with golden possibilities, but the road remains pockmarked with snags and complications. If you want to develop your own ML technology, you’ll need to think carefully about whether it’ll truly work for you.

The Latest Trends

On the surface, ML is certainly making huge strides. Fields such as speech recognition (as seen in Siri and Alexa) and speech synthesis (automatic transcriptions and translations), are grabbing the headlines because they’re nearing human-level accuracy. But really we’re seeing progress across the board.

Financial programs are being built to predict market trends. Medical companies are building programs to diagnose tumors. Consumer industries, notably the clothing sector, are being revolutionized by recommendation engines which can gauge a consumer’s fashion sense and make more accurate suggestions.

However, in terms of the core ‘science’ of ML, we’re not seeing a huge amount of development. Most of the key breakthroughs were made way back in the 1970s and 80s; today’s advances are much smaller steps, the high-hanging fruit which can only be accessed by the giants of the technological world.

To build an ML algorithm, companies have typically needed immense computing power — not to mention access to an endless supply of PhD students who can do the heavy lifting at the research stage. For start-up development teams that don’t have those resources, ML still provides a huge challenge. 

To really understand that challenge, we need to go deep into an ML program and understand what it involves.

The Model

Essentially, each machine learning program is designed to solve a specific question. Who is the person in this picture? Is this email spam? Will the car crash if we execute this maneuver?

The bit that answers the question is known as a model. It’s an algorithm that sits inside the mobile or web app. Whenever a user poses the question, the device refers it to the model, which in turn generates its output and provides the appropriate response.

Building a model is a three-stage process. First, the algorithm needs to be coded. Then it needs to be trained to ensure the correct responses under real-world pressure. Finally, it needs to be integrated into the client’s mobile or web app.

Each of these stages can be hugely time-consuming. To train the model, developers often require tens of thousands of training examples. If the model can’t generate the required level of accuracy then the team will have to go back to the drawing board, meaning countless iterations. 

Then, if things weren’t already complex enough, the team handling stage three (the software integration) will probably be different to the one handling stages one and two, so they’ll have their own deadlines to hit.

Countless Challenges

Apple and Google have, superficially at least, simplified that final stage by making their smartphones ML-ready. Apple’s CoreML framework, and Google’s TensorFlow, have provided a toolbox to integrate machine learning models into an app. 

But this carries its own challenges. CoreML only works on Apple platforms and TensorFlow works out of the box on Android but requires extra steps on Apple platforms. Most clients will demand that their ML program works across both platforms, so developers need to factor in both sets of demands.

In fact, there are all kinds of challenges to take into account. An ML developer needs to consider what kind of data their model needs (images, text or video data); how deep their model needs to be, and how many ‘layers’ it’s going to need; above all, whether they have the computing power to take the project on. If they’re a small development team working off a bunch of laptops, they probably won’t.

To get around this problem, developers can use ‘off-the-peg’ models which have already been developed by someone else (Amazon Web Services has actually created its own marketplace). Alternatively they can try what’s known as transfer learning, taking an existing model and using it as the starting point for their own project. If, let’s say, you’re building an ML model to recognize athletic gear, you can crib from a number of much wider apparel-focused models already on the market. 

However this means you won’t have full quality control. There might be bugs in the initial model, or it might not provide the results you need with the required accuracy. Most importantly of all, models need to be scalable. As new data appears, or data trends change, you’ll need to create a new version of the model. So, if someone else is responsible for the model, you’ll be depending on them.

Some Practical Examples

At Mobile Jazz, we’ve experienced these challenges and frustrations first-hand. We’ve developed a number of ML projects, mastering the respective Apple and Google frameworks along the way.

Our biggest project took us around five months to build. It’s a program for a physiotherapy technology startup called PeerWell, which helps patients prepare for and recover from surgery. PeerWell wanted to help these patients recognize tripping hazards in their homes, using the technology embedded in their smartphones.

Trying to solve this problem with traditional coding techniques was really tough. However ML offered the possibility to take raw data and learn from it, without needing to tell the app what to do every time the user came across a potential obstacle.

To build the model we followed an iterative approach, where we took an algorithm developed by the client, trained it and delivered it ready for integration in both iOS and Android apps. We were obliged to continually re-test and re-integrate the model — and trust us, this took a while. The model contained several operations that were not supported by all platforms; we had to root out each of these operations individually and change the model.

Then we used transfer learning to train a newer version of the model with the help of a pre-trained, publicly available one. Finally, we built a test suite in both CoreML and TensorFlow so that we could check that the model worked as expected — in other words, it provided the same results when integrated in the smartphones as it did in isolation. 

It was a hugely challenging project, but we’re pleased to reveal that the app is now up and running. We feel the project demonstrates our ability not just to build something that’s cool, but also to create a ‘living’ piece of technology that can keep evolving.

If you have your own vision for an ML project, we’d be delighted to help you realize it. The future of machine learning remains a long and winding road, with plenty of wrong turns along the way, but we feel the destination will be worth it.

Read the comments
Borja Arias
Borja is a software engineer specializing in iOS development. He is passionate about creating systems that work seamlessly to solve complex problems for the user.

Want to receive more insightful articles like this? Subscribe here.


By submitting your information you agree to our Privacy Policy