Deep Mind continues its active contributions to the artificial intelligence(AI) and deep learning(DL) developer communities. In recent months, the Google subsidiary has regularly open source some of the AI and DL tools and frameworks used in some of their high profile solutions. Sonnet is the latest addition to DeepMind’s open source stack.
DeepMind’s Sonnet is a framework for the implementation of neural networks using Tensorflow. The framework provides a higher level of abstraction for the construction of neural networks based on a TensorFlow computation graph.
Almost since its launch, Google tensorflow skyrocketed to become the most popular, open source DL framework in the market. DeepMind itself, switched to TensorFlow after years of using Torch (another popular framework) as its underlying DL stack. the number of DL applications built using TensorFlow has grown exponentially and yet the framework remains somewhat complex for mainstream developers.
Despite its high adoption, TensorFlow remains a low-level framework for assembling computation using a data flow graph. TensorFlow developers typically need to combine elements such as tensors, Sessions or Variables into a computing graph. even though TensorFlow is mostly used for DL applications, the data flow graph abstraction is generic enough that it can be applied in other computation problems. as a result, AI developers are forced to become intimately familiar with the underlying TensorFlow graphs in order to correctly architect its applications even though many of those details are completely irrelevant to DL models. DeepMind obviously encountered some of those challenges when deciding to implement Sonnet.
At a high level, Sonnet provides a programming model for implementing neural networks using TensorFlow. More specifically, Sonnet enables the creation of Python objects that represent components of a neural network which later can be assembled as part of a TensorFlow graph.
Modules are a core concept of Sonnet. Conceptually, Sonnet’s Modules encapsulate elements of a neural network such as models which an be combined multiple times into a data flow graph. That process abstracts low-level aspects of TensorFlow applications such as session building or variable sharing. Modules can be combined using arbitrarily complex models and Sonnet enable developers to build their own Modules using a simple programming model.
The higher level programming constructs and the module-based configuration, connection separation are certainly tangible advantages of Sonnet. However, I believe some of the biggest benefit of the new DL framework might be hidden beneath the surface. Here are some of my favorite benefits related to Sonnet:
— Multi-Neural Network Applications: Implementing multi-neural network solutions such as multi-layer neural networks or adversarial neural networks in TensorFlow is something short of a nightmare. Sonnet’s Module programming model can help to implement individual neural networks that can be combined to implement higher level networks.
— Neural Network training: Sonnet simplifies the training of neural networks by focusing on individual modules.
— Testing: Sonnet’s higher level programming model simplifies the automated testing of neural networks using mainstream frameworks.
— Extensibility: Developers can easily extend Sonnet by implementing their own modules. they can even control the construction of the TensorFlow graph related to that module.
— Composability: Imagine having access to an ecosystem of built and trained neural network modules that can be dynamically composed into higher level networks. Sonnet is certainly a step forward in that direction.
If DeepMind is successful with Sonnet, my prediction is that we are going to see an explosion on the number of modules as well as similar frameworks that abstract the implementation of different types neural networks using TensorFlow as the underlying runtime.