Technology Fridays: Why Bonsai is a Great Addition to Microsoft’s AI Stack

Jesus Rodriguez
HackerNoon.com
4 min readJun 22, 2018

--

Earlier this week, Microsoft announced that is continuing its acquisition spree by purchasing machine learning startup Bonsai. The should not be completely surprising as Microsoft had already indicated its interest in Bonsai by leading a $7.6M investment round in the startup last year. I’ve written about Bonsai extensively before but today I would like to dig deeper into the elements that make this platform unique in the deep learning space.

At a high level, you can think of Bonsai as a platform that provides a simpler way to build, train and execute deep learning models without dealing with the low level constructs of frameworks such as TensorFlow, MxNet or Microsoft’s own Cognitive Toolkit. However, the Bonsai platform is much more. Bonsai focuses on an area that they like to call machine teaching and that can be seen as a variation of reinforcement learning. In the Bonsai world, the goal of machine teaching models is to program a BRAIN to solve problems in complex environments by following the action-reward model of reinforcement learning algorithms. Specifically, Bonsai’s describes machine teaching in three easy steps.

The BRAIN

The Bonsai platforms abstracts BRAINs using four simple concepts known as STAR (State, Terminal, Action, Reward).

Typically, the implementation of a BRAIN is divided between a model written in a domain specific language known as Inkling and a simulator which is typically authored in Python.

The Inkling Language

Reinforcement learning problems in the Bonsai platform are modeled using Inkling, a functional, domain-specific language specialized on representing learning scenarios. Examples of learning scenarios could be:

  • Learning to play a game
  • Learning to recognize what a handwritten digit is
  • Learning to tell if something is red or what color something is
  • Learning to save electricity in your home
  • Learning to manage a process to specific guidelines

Inkling is based on three fundamental constructs: Concepts, Schemas, Curriculums and Lessons.

The following example, from the Bonsai documentation, represents an Inkling program used to keep the internal temperature of a house. You can see how the language combines the aforementioned constructs.

Using Bonsai

Developers can start using Bonsai by downloading the platforms into their local environment. Depending on the project, the platforms might include dependencies on other technologies such as Anaconda or OpenAI Gym.

Using the Bonsai CLI, we can create a BRAIN by using the following command line.

At that point, its just a matter of starting the Python simulator and process the Inkling model. Bonsai can also be used in Jupyter notebooks. The Bonsai platform provides tools to visualize the monitor the status of the BRAIN.

What Microsoft Get with Bonsai?

By acquiring Bonsai, Microsoft gets leading platform in the reinforcement learning space. We can expect Microsoft to integrate the Bonsai platform with the rest of its artificial intelligence(AI) stack such as Azure Machine Learning or the Cognitive Toolkit.

--

--

Jesus Rodriguez
HackerNoon.com

CEO of IntoTheBlock, President of Faktory, President of NeuralFabric and founder of The Sequence , Lecturer at Columbia University, Wharton, Angel Investor...