TensorFlow remains the dominant AI modeling framework. Most AI (artificial intelligence) developers continue to use it as their primary open source tool or alongside PyTorch, in which they develop most of their ML (machine learning), deep learning, and NLP (natural language processing) models.
In the most recent O’Reilly survey on AI adoption in the enterprise, more than half of the responding data scientists cited TensorFlow as their primary tool. This finding is making me rethink my speculation, published just last month, that TensorFlow’s dominance among working data scientists may be waning. Neverthless, PyTorch remains a strong second choice, having expanded its usage in the O’Reilly study to more than 36 percent of respondents, up from 29 percent in the previous year’s survey.
Boosting the TensorFlow stack’s differentiation vis-à-vis PyTorch
As the decade proceeds, the differences between these frameworks will diminish as data scientists and other users value feature parity over strong functional differentiation. Nevertheless, TensorFlow remains by far the top AI modeling framework, not just in adoption and maturity, but in terms of the sheer depth and breadth of the stack in supporting every conceivable AI development, training, and deployment scenario. PyTorch, though strong for 80 percent of the core AI, deep learning, and machine learning challenges, has a long way to go before it arrives at feature parity.
Last week, Google’s TensorFlow team distanced its stack further from PyTorch. It held its yearly TensorFlow Dev Summit via livestream (for reasons everybody knows). In spite of the absence of in-person buzz, plenty of important news and analysis came from this purely online event.
What follows is my discussion of the announcements organized into three broad categories: enhancements to the core TensorFlow and its ecosystem, new TensorFlow devops tools, and new TensorFlow add-ons for specialized AI development challenges.
Enhancements to core TensorFlow and its ecosystem
In terms of enhancements to the core open source code, the team announced TensorFlow 2.2. This latest release—which, unlike prior TensorFlow versions, is now compatible with the entire TensorFlow ecosystem—focuses on the performance and stability of the core library. It also adds eager execution at the core, support of NumPy arrays, tf.data, and TensorFlow datasets.
Ensuring full support for cross-device compilation of models built in TensorFlow, the team announced TensorFlow Runtime, which will ship with the core open source code and will ensure that ML models work on different devices and platforms that implement the Multi-Level Intermediate Representation standard, which is supported by 95 percent of hardware manufacturers.
Making sure that models developed in TensorFlow can run on Google’s own neural network processor, the team announced that the previous version, TensorFlow 2.1, also supports Cloud Tensor processing units.
New TensorFlow devops tools
Many enterprise AI developers use TensorFlow to build, train, and deploy deep learning, ML, and NLP models within complex devops workflows. To address these requirements, the team announced new capabilities to accelerate team productivity across the TensorFlow ecosystem:
- Model search and discovery: The team revealed new features for TensorFlow Hub, which contains more than 1,000 ready-to-use models and code snippets.
- Hyperparameter tuning: The team announced Keras Tuner, which simplifies the task of tuning model hyperparameters and works with Keras, TensorFlow, and scikit-learn.
- Simplified pipeline management: Google Cloud AI Pipelines makes it simpler and easier to manage pipelines using TensorFlow Extended.
- Team-based experiment sharing: The team announced dev, a new tool that lets developers and researchers host and share their model-based experiments for free. It provides information and analyses on model performance, on-device workloads, and input pipelines.
- Flexible neural network training: The team unveiled Neural Structured Learning, a tool for training neural networks by using structured signals in addition to feature inputs. Structured signals are often used to represent relations or similarity among samples that may be labeled or unlabeled. Leveraging these signals during neural network training harnesses both labeled and unlabeled data and can improve model accuracy, particularly when the amount of labeled data is relatively small.
New TensorFlow add-ons for specialized AI development challenges
TensorFlow users are working in an astonishing range of sophisticated projects that push AI’s boundaries from every direction. To support these requirements, the team announced the following new tools, extensions, and add-ons that plug into TensorFlow’s ecosystem.
- Graphics layers and viewer: Computer vision is one of the hottest niche markets for AI-driven solutions. To support these developers, the team announced TensorFlow Graphics, which provides graphics functions as a set of differentiable graphics layers to build more efficient computer-vision network architectures. It includes spatial transformers, graphics renderers, and mesh convolutions. It also includes a 3D viewer that works in TensorBoard. It enables explicit modeling of geometric priors and constraints into neural networks for the purpose of building architectures that can be trained robustly, efficiently, and in a self-supervised fashion.
- NLP frameworks and models: Natural language processing is at the heart of many practical AI applications. The TensorFlow team announced T5 Text-to-Text Transfer Transformer, a framework that applies transfer learning to natural language processing. It also released Meena, a neural conversational model that learns to respond sensibly to a given conversational context.
- Browser-based, domain-specific libraries: More AI models are being built in TensorFlow for deployment into browsers and various client- and server-side Web application frameworks. To accelerate developer time-to-value on such projects, the team announced new domain NPM packages for browser-based execution in TensorFlow.js. These include HandPose (detects landmarks on hands using pose estimation), Face Mesh (predict 3D facial landmarks on a human face), and Mobile BERT (Bidirectional Encoder Representations from Transformers) (natural language processing on mobile devices). The team released a new command-line converter wizard to make the conversion of models to TensorFlow.js easier. It launched a new WebAssembly back end for TensorFlow.js in support of fast execution on CPUs, as well as a new Hugging Face NPM package that allows developers to perform question and answering in NodeJS.
- Distributed deep learning language: More AI projects involve distributing computations in parallel across supercomputers, meshes, and other complex computing fabrics. The team announced Mesh TensorFlow, which provides a language for model parallelism and distributed deep learning. It specifies a broad class of distributed tensor computations for various scenarios involving n-dimensional array of processors connected by a network. These scenarios might include deployments in which model parameters are too many to fit on one device, a 3D image model or other data example is so large that its activations do not fit on one device, or in which lower-latency parallel inference is required.
- Probabilistic programming library: Probabilistic programming tools enable easier development of AI applications that involve complex statistical reasoning. The team announced TensorFlow Probability, a library that makes it easy to program with Python models that combine statistical reasoning with deep learning and can deploy efficiently on GPUs (graphics processing units) and TPUs (tensor processing units). The library enables data scientists and other developers to encode domain knowledge for understanding data and making predictions. It includes a wide selection of probabilistic models, layers, distributions, and optimizers.
- RL (Reinforcement learning) development library: RL is the core of many edge, robotics, autonomous vehicle, and other new frontiers in AI. The TensorFlow team announced TF-Agents, a library for designing, implementing, testing, and benchmarking new RL algorithms in TensorFlow.
- Model fairness-metric visualization tool: Fairness, ethics, and bias reduction are becoming more prevalent as objectives that AI development teams must build and train their models to achieve. The team announced a tool and library that will allow developers to visualize the fairness of their models. The Fairness Indicators library enables the computation of common fairness metrics for binary and multiclass classifications, which can be visualized on TensorBoard.
- AI modeling tool for quantum computing environments: Quantum computing is a proving ground for AI applications of potentially mind-boggling sophistication. The team discussed TensorFlow Quantum, a library for hybrid quantum-classical machine learning. This new software-only stack extends TensorFlow to support building and training ML models to be processed on quantum computing platforms. Developed by Google’s X R&D unit, TensorFlow Quantum enables data scientists to use Python code to develop quantum ML models through standard Keras functions. It provides a library of quantum circuit simulators and quantum computing primitives that are compatible with existing TensorFlow APIs. To see where TensorFlow Quantum fits in this emerging niche, check out my recent InfoWorld article discussing the tool, which was announced just before TensorFlow DevWorld 2020.
TensorFlow remains the AI modeling framework to beat
That’s an extraordinarily deep and broad set of announcements, reflecting the deep pockets and vast brainpower that Google and its parent Alphabet are investing in the TensorFlow ecosystem. Taken together, they may not stanch grumbling among AI developers about TensorFlow, which many deem confusing, hard to use, bloated, slow, inefficient, and excessively complex. In fact, the glut of new capabilities may exacerbate those issues to the point where they cause defections to simpler AI modeling frameworks.
Nevertheless, TensorFlow is still very much the framework to beat from the perspective of professional data scientists who are building mission-critical AI projects for production environments. This week’s announcements have made its advantages for heavy-hitting AI development even more pronounced.