11/15/2019
5 Challenges for Developing Mobile Apps with AI & Machine Learning Capabilities
5 Challenges for Developing Mobile Apps with AI & Machine Learning Capabilities Usm systems Nov 15 ¡ 9 min read
Many of your favorite mobile apps are currently using some form of neural networks and/or machine learning techniques to personalize your experience. For example, Spotify and Apple Music, leaders in the music industry, use AI-powered recommendations for generating music suggestions. Another shining example of the power of AI in apps is voice assistant tools such as Siri, Google Assistant, and Alexa. First, let’s define what mobile machine learning is and how it’s different than web-based ML.
Machine learning https://medium.com/@fugenxmobileapp/5-challenges-for-developing-mobile-apps-with-ai-machine-learning-capabilities-ac006bb4c29b
1/7
11/15/2019
5 Challenges for Developing Mobile Apps with AI & Machine Learning Capabilities
So What is Mobile Machine Learning? Mobile machine learning is a growing field of ML that doesn’t involve data centers and giant clusters of high-powered GPU machines. Instead, we can now run machine learning operations on mobile devices to avoid the network bottleneck. Most of the above-mentioned applications use a combination of on-device network and cloud services to generate results. However, on-device deep learning techniques have significantly evolved over the past two years, and they now cover a lot of everyday use cases without making any network calls. These include speech recognition, image recognition, object detection, gesture recognition, translation and text classification. Choosing a deep learning strategy for mobile applications might be harder because of the lack of relevant resources to get started. In this article, we’ll talk about some of the common challenges you might face while integrating AI elements into your mobile application.
Finding Mobile App Features that are Good Choices for AI Understandably, introducing your app to AI involves a bit of hard work in the beginning. Most organizations need to start by looking at the best options that will help them adapt to a digital-first, rapidly changing market. This includes deciding on a long-term plan for the stack that you’re going to use and determining whether or not it’s possible to apply your model on a device. They also need to deal efficiently with tactical areas like securing mobile access to data, integrating the apps’ backend to existing legacy systems, implementing API-based architectures, and adopting agile development methods. However, once this planning stage is completed, positive results should soon follow. Here are some of the features that modern applications rely on AI to employ.
Automated Reasoning Automated reasoning is the science of enabling computers to apply logical reasoning while solving problems, like proving theorems and solving puzzles. It’s this technology that allows AI-powered machines to defeat human beings at games like chess or Jeopardy and industry tasks like market stock trading.
https://medium.com/@fugenxmobileapp/5-challenges-for-developing-mobile-apps-with-ai-machine-learning-capabilities-ac006bb4c29b
2/7
11/15/2019
5 Challenges for Developing Mobile Apps with AI & Machine Learning Capabilities
Services like Uber use similar algorithms to calculate millions of data points from Uber drivers who have driven similar routes in the past. The app then factors this information into making predictions like time to destination, estimated fare, etc.
Recommendation Systems Recommendation systems are perhaps the most effective and most straightforward application of AI in mobile apps. They can be used for almost any given solution. One of the primary reasons a lot of apps fail within a year of their launch is because they are unable to continuously supply the user with content that’s relevant. As such, they fail to keep the user engaged. While these services may be providing fresh and updated content at regular intervals, if the content isn’t relevant to the user at the time, it will fail to pique their interest and keep them engaged. On-device AI can help in monitoring users’ choices and then using this information to continuously update a deep learning algorithm with new data points. This ensures the recommendations made by the app are what the user will most likely love.
Learning Behavioral Patterns Most AI-based platforms are now capable of learning from a user’s behavioral patterns and using this information to make the next session more intuitive and seamless. Let’s take Snaptravel as an example. Snaptravel is a part-bot, part-human hotel booking service. It makes use of a combination of natural language processing and machine learning to have realisticsounding conversations with users and visitors based on their preferences. In case the bot is unable to understand and answer a particular question, a human agent takes over. The bot adds this question and answer puzzle to its information base to not make the same mistake again.
Computer Vision Computer vision is an excellent use case for machine learning, and lots of mobile applications use this for a wide range of purposes. Computer vision is what powers Apple’s Face ID algorithm to verify whether it’s you when you point the camera at your
https://medium.com/@fugenxmobileapp/5-challenges-for-developing-mobile-apps-with-ai-machine-learning-capabilities-ac006bb4c29b
3/7
11/15/2019
5 Challenges for Developing Mobile Apps with AI & Machine Learning Capabilities
face. It’s also the same technology that lets Snapchat add filters like glasses, hats, and doggy ears into your Snaps. From an AI perspective, the most important part of computer vision is the recognition and classification of images. There are a few APIs that you can use like Google’s Vision API. However, offloading the image processing to a remote server just isn’t good enough for certain use cases. But here’s the good news — there are pre-trained models that you can use within your app that handle some of these difficult AI tasks. For instance, you can use a library like OpenCV to implement image tracking, image recognition, or programmatic image filtering. You can integrate OpenCV with your Android, iOS and, Cordova platforms. You might also find popular open-source implementations on GitHub.
Training Your AI Model On Device The biggest obstacle with machine learning is the ability to collate user data and use it for training. It’s still early days for training your data on a device, and businesses end up training on a server and then return the model improvements in the form of updates. Most mobile applications use ML for inference, and very little learning happens on the device. However, there are certain cases where it’s important that the learning happens on the device so that the model is trained specifically for each individual user. For instance, a predictive keyboard will have a generic model that’s trained in a particular language. But over time, it learns and customizes the model based on the user input and predicts what you’ll write next. Let’s imagine that we’re building an AI model of our own. There are many ways you could implement this: 1. Use a public dataset without learning anything from the user. The model is trained offline and the application offers the improved version as updates; however, it’s hard to achieve a personalized predictive keyboard using this technique. 2. Central learning using the user data stored on servers. Assuming that the user data is already stored on servers, you could use the data to train your AI model and then personalize it based on each user’s behavior. The biggest issues with this strategy are
https://medium.com/@fugenxmobileapp/5-challenges-for-developing-mobile-apps-with-ai-machine-learning-capabilities-ac006bb4c29b
4/7
11/15/2019
5 Challenges for Developing Mobile Apps with AI & Machine Learning Capabilities
privacy, security, and scalability. If your business takes privacy seriously, this might not be the right strategy for you. 3. Distributed learning. Here, you could offer a pre-trained model to the user and the application will fine-tune it based on the user’s data. The cost of training the model is distributed among the users. There’s a significant drawback that other users can’t benefit from your model.
APIs Alone Aren’t Enough. Here’s Why As you might already know, there are many existing APIs that offer AI as a service in various domains. However, merely adding intelligence to a mobile app by way of calling an API is not as easy as it sounds. A certain degree of refinement may be required to suit your app and mold it according to its use case. Adding additional capabilities to an app just for a touch of glamour is perhaps not the best idea. According to Nir Bar-Lev, co-founder and CEO of Allegro.ai, a deep learning computer vision platform: The more your application requires specific domain knowledge, the less you can rely on AI APIs available today as solutions for your needs. AI is a learning paradigm. The conventional best practice rule of thumb is that the more data there is, the more accurate the results. However, it’s not only the quantity of data that’s important but also its specificity to the problem or use case the AI model is being asked to address. This means that the more specific or esoteric your domain area is, the less performance and quality should be expected from existing AI APIs. As mobile developers know, there are many different factors that impact the effectiveness of an app. AI adds an additional layer of complexity that needs to be understood, both in isolation and in how it affects the mobile app itself. The effort to get things “right” is an ongoing process and entails experimentation, measurement, and monitoring, as well as improvement. Developers also need to be alert to IP leaks. With each API call, they run the risk of sharing their base IP with the API provider. By using third-party APIs, you are bound to follow their ToCs and Privacy policies. It might be a good idea to thoroughly go through the documents to ensure that they’re not selling your data. https://medium.com/@fugenxmobileapp/5-challenges-for-developing-mobile-apps-with-ai-machine-learning-capabilities-ac006bb4c29b
5/7
11/15/2019
5 Challenges for Developing Mobile Apps with AI & Machine Learning Capabilities
Model protection is a potential benefit of training your AI model on the device. Since there is no communication with a cloud-based API, your model nor the user data leaves the device which is good for privacy
Be Wary Of How Your App Uses Mobile Resources Mobile apps have to be developed keeping resource utilization in mind. What can be done with GPU clusters in the cloud cannot be done on a mobile device. Therefore, developers need to consider how each model and algorithm they plan to use effects resources like battery power and memory use. According to Progress’ Tcherevik, resource utilization is an additional parameter that developers need to monitor. You will also need a backup plan for devices with lower specifications in case they’re not able to run processor-intensive tasks. It goes back to the developer’s continuous deployment workflow. Establish a feedback loop and have a process and culture of continuous evaluation and improvement. Things don’t change solely because of technology. A change in consumer behavior or a market trend can make as negative an impact as wrongly implemented AI. Although there are solutions like Google’s TensorFlow Lite and Apple’s Core ML for mobile and embedded devices, there are very few resources that teach you how to implement them for a production environment. There have been attempts made in the past year to take some common ML use cases and wrap them in an API so that developers can easily integrate them with their application. ML Kit for Firebase is the most popular platform that lets you do this. The common mobile use cases covered by ML Kit include: recognizing text, detecting faces, scanning barcodes, labeling images and recognizing landmarks, etc.
Finding the Right Training Data Is Important There is, generally speaking, never a shortage of data. However, a lack of useful data available on a device could be a potential concern. Even if it’s available, you’ll need to transform the data to make it useful and since you’d need to support Android and iOS (at the very least), you’ll need to maintain two different codebases, too.
https://medium.com/@fugenxmobileapp/5-challenges-for-developing-mobile-apps-with-ai-machine-learning-capabilities-ac006bb4c29b
6/7
11/15/2019
5 Challenges for Developing Mobile Apps with AI & Machine Learning Capabilities
Keep in mind that there are certain issues that need to be overcome to truly train an application on-device: 1. Large models require large data. The current training methods for deep neural algorithms require lots of data that the applications are simply are not able to generate or process. However, there’s a lot of research going on at the moment to learn using limited data using techniques known as one-shot learning. 2. Training on multiple devices. What if the user runs the application on multiple devices, like a phone, tablet, and PC? You’d need to develop a mechanism to share the model between these devices. The decision needs to be made only after determining whether the user behavior is similar in all the three platforms. 3. What happens on app updates? When an improved version of the model is released as an update, how do you plan to add the local improvements with the updated model? This might require retraining the model based on the user data again.
Conclusion Mobile applications have been trying to integrate AI models into their user experiences for the past few years. The earliest form of adoption was using APIs, but thanks to modern sensors and powerful processors, devices are capable of doing more complex tasks like text classification and image processing on their own. However, there still are certain challenges associated with implementing machine learning features on mobile phones, and we’ve covered some of the most important ones here. So, what are your thoughts on developing mobile apps with AI & deep learning capabilities? Let us know in the comments. Want to know more about AI services then have a free visit for USM systems
Arti cial Intelligence
Machine Learning
Ai In Mobile Apps
Ai Services
Ai Solutions
About
Help
https://medium.com/@fugenxmobileapp/5-challenges-for-developing-mobile-apps-with-ai-machine-learning-capabilities-ac006bb4c29b
Legal
7/7