How Nanit is Using MissingLink to Streamline Deep Learning Training and Accelerate Time to Market
Poor sleep can be problematic for both parents and children in the early years of life. Sleep is critical to the physical and mental development of young children. Meanwhile, dealing with poor sleep is exhausting for parents, who lose 44 nights of sleep on average in a child’s first year.
As parents themselves, Nanit co-founders Dr. Assaf Glazer and Tor Ivry experienced this problem and shared a vision of build a product that would improve life for parents of young children. Hence, Nanit was born.
Nanit’s sleep advisor uses computer vision, image recognition, and deep learning to monitor and analyze a child’s sleep behavior and provide guidelines for improving the quantity and quality of its sleep.
Why Deep Learning for Nanit
With help from psychologists and sleep and behavioral experts, Nanit has gained a deep understanding of the sleep behavior of young children and their parents. To improve on that, the company collects data from users and runs hundreds of deep learning experiments each month. Over the course of these iterative experiments, which use tagged representative data, the team trains an optimized model of the statistical correlations between parameters such as body and eye movements and a child’s sleep patterns.
The Nanit deep learning model can then make accurate inferences about children and their sleep patterns in the general population, providing parents with hands-on, personalized, expert sleep training guidelines.
For example, Nanit may learn that a certain child wakes up crying several times during the night, but usually falls back to sleep after just a few minutes. The advice to that child’s parents, therefore, will be to let her cry for a few minutes rather than rushing in immediately to pick her up. Nanit therefore helps parents to reinforce their child’s ability to put herself back to sleep.
In the early stages of the company, Nanit ran hundreds of experiments and trained dozens of models using Tensorflow and Keras, two popular open source deep learning frameworks, as well as home-grown tools and processes.
However, the Nanit team ran into fundamental challenges regarding scalability, data exploration, versioning, security, and tracking. They also encountered productivity issues, with their data scientists spending a lot of time on infrastructure and operations, rather than on the core problem. Let’s take an in-depth look at some of the challenges Nanit faced.
Challenge: Keep track of the best models
In data science, versioning and source control are far more complex because users must track and version their data repositories. With numerous training models being run on different sources of data and hyperparameters, the Nanit team found it difficult to compare results across all experiments. It was even more complicated to reliably and easily reproduce experiments that produced the best results.
Once Nanit began running hundreds of experiments on terabytes of data to train complex deep neural networks, they knew that they needed “…to track what data was used to train the model because it affects the performance. [However] the tools that we looked at didn’t have the ability built-in to support that,” said Tor Ivry, Nanit co-founder and CTO.
Another major blocker for the Nanit team was its ability to quickly reproduce experiments. Deep learning experiments are very complex, as each is comprised of a specific dataset (perhaps from multiple data sources), hyperparameters, code for running the experiment and evaluating the results, and so on. It would save a lot of time if all of these elements could easily and faithfully be reaggregated to reproduce a successful experiment.
Solution: Data versioning and experiment tracking tool
Nanit’s data scientists and developers, who are the main consumers of the MissingLink platform, use it to precisely track experiments, model versions, and multiple data sources. MissingLink provides them with immutable data versions—once a data version is committed, it cannot be modified after being created and changes will automatically be captured in a new version.
Deep learning experiments are very complex. Each one is comprised of a specific dataset (perhaps from multiple data sources), hyperparameters, code for running the experiment and evaluating the results, and so on. It would save a lot of time if all of these elements could be easily and faithfully reaggregated in order to reproduce a successful experiment.
However, the Nanit team found that reproducing experiments is a time-consuming process—and not always successful. Today, thanks to the way MissingLink automatically stores information on all experiment-related elements, the Nanit team can seamlessly revisit, examine, and reproduce experiments.
Challenge: Data exploration
Data exploration is one of the pillars of data science. In order to thoroughly test a hypothesis, the data scientist must have clear insight into the data and how it is structured prior to training. However, given the very large quantities of data and the fact that they are not typically stored in a relational database, data exploration and querying in deep learning are far from trivial tasks.
At Nanit, the team wanted to be able to slice and cluster the data so that it could test different models based on various combinations of parameters, such as sleep times, specific sleep durations (e.g., from the first to the fourth hour), room temperature, the level of lighting, and so on. The team knew that these decisions would have considerable impact on the performance of its models, but without the proper tools, it found the data exploration and querying process to be very challenging and time-consuming.
Solution: Advanced slicing of data is one query away
With MissingLink, Nanit’s data scientists can easily store metadata on their data—across different servers, different data types, different sizes of images and tables, and more. It then becomes as easy as using a relational database to explore, slice, aggregate, and cluster the data, with complete transparency into how any given dataset is structured.
Challenge: Keeping data private and protected
Nanit’s customers entrust the company with highly sensitive data—images and videos of their sleeping children. In return, they expect the company to strictly uphold the highest standards of data privacy. The servers and all data repositories must be super secure, and all data must be anonymized and encrypted. No third-party tool or platform should ever have access to the data.
Thus, when considering third-party version control solutions for their deep learning data, Nanit prioritized the ability to maintain in-house security and privacy practices. The company also wanted to avoid redefining their custom workflow to adapt to the new tool.
Solution: Serverless hybrid architecture
The Nanit training dataset contains highly sensitive data provided by Nanit’s customers. Two key data management requirements for MissingLink were: the data never leaves Nanit’s premises, and only the Nanit team has access to it.
MissingLink’s unique data management implementation allows Nanit to manage its huge and constantly evolving datasets, which can contain millions of data points, all without having to upload the raw data. MissingLink’s serverless hybrid architecture allows Nanit to manage its data on the cloud, but the data itself resides on Nanit’s storage facilities only.
Just as DevOps tools and processes have dramatically accelerated the delivery of software products and features, MissingLink’s deep learning operations (DeepOps) platform has simplified and streamlined Nanit’s learning lifecycle, infrastructure, and operations so that its data scientists can focus on real solutions to real problems.
Accelerate time to market – Nanit believes that, thanks to MissingLink, its R&D pace has increased significantly, which translates into accelerated time to market for value-capturing product enhancements.
“With MissingLink we eliminated a huge portion of time that the algorithm team spent on infrastructure and this time converted to working on researching . Also the research time accelerated because we could do more in less time. ” Tor Ivry, Nanit co-founder and CTO
Improved productivity and greater focus – With MissingLink, the data science team is now working optimally. Instead of expending time and resources on managing data and infrastructure, they can focus on core research and algorithms.
“Like Slack, the real power of MissingLink is from the bottom up. It is an enabling tool that lets data scientists focus on what they really like: core issues and technology.“ Tor Ivry, Nanit co-founder and CTO
MissingLink brings all of the advantages of DevOps to the field of deep learning. By streamlining data, experiment, and infrastructure management for data scientists, MissingLink frees them to focus on their core competencies. In the case of Nanit, the AI team has significantly accelerated the time-to-market for improvements and new features—bringing greater relief to young babies and their parents even faster.