Google levels up on machine learning, introduces TensorNetwork library

Azure Machine Learning

Google’s AI and machine learning department can’t be stopped and keeps releasing open source projects – TensorNetwork is the latest addition to the tool zoo and aims at facilitating the manipulation of tensor networks.

It was developed together with the Perimeter Institute for Theoretical Physics, which recently hit the news as one of the collaborators behind the black hole images released earlier this year, and Alphabet subsidiary X.

TensorNetwork is meant to help physicists as well as machine learning researchers to implement algorithms that make use of sparse data structures called tensor networks. The latter stem from the world of physics. There they are, for example, used to deal with quantum states in various subfields of quantum physics by offering a more suitable representation for high-dimensional tensors, which is another name for multi-dimensional arrays.

Lately, however, there seems to be an interest in tensor networks in machine learning, putting them to use in areas such as image recognition and for more general classification tasks. According to Google’s researchers, what has been stopping adoption of the approach up until now was the focus on physics applications in literature and the lack of an easy way to use it on accelerated hardware.

TensorNetwork is meant to tackle these problems by pointing out machine learning examples, and offering capabilities to use GPUs for better performance. Main objects of the library are TensorNetworks, which keep track of sets of Node objects and contain methods for typical tasks such as adding nodes, connecting them, and manipulating the edges that emerge from this process. Nodes represent the tensors mentioned, while there are three kinds of edges used to describe contractions of the tensors in the network (more details can be found in a paper introducing the library).

With all the Google input on the project, it doesn’t come as a huge surprise that the backend of TensorNetwork is popular numerical computation library TensorFlow, which was dreamed up at the same company. Using it, according to TensorNetwork’s creators, lowers the entry barrier to trying the network approach, since many practitioners are already familiar with the tool.

Moving forward, the team aspires to see adoption of the library spread to other disciplines such as chemistry, but also work on time series analysis for machine learning and circuit simulation in physics. The project is protected under the Apache License 2.0, with code available on GitHub.