AI Toolkits: A Primer

If you’re not an AI specialist, but trying to understand the area, it helps to know the major tools that data scientists use to create AI systems. I thought I would survey the common toolkits, highlight which are the most popular, and explain which ecosystems they connect to.

Machine learning

Contemporary AI workloads divide into two classes. The first of these classes, and the overwhelming majority, is machine learning. These incorporate the most common algorithms used by data scientists: linear models, k-means clustering, decision trees and so on. Though we now talk of them as part of AI, this is what data scientists have been doing for a long time!

Toolkits to handle this first class of workloads are integrated into every statistics package in common use. Commercial offerings include SAS, SPSS and MATLAB; and the common open source platforms R and Python. The big data platforms of Apache Spark and Hadoop also have their own machine learning toolkits for parallel machine learning (Spark’s MLLIB and Apache Mahout.)

Today, Python is emerging to take the lead as the most popular programming language for data science in industry: a role that is being accelerated by Anaconda, a distribution of the most popular data science components for Python, including the capable scikit-learn.

For more on where the boundaries between machine learning, deep learning and AI lie, read my Bluffer’s guide to AI, Deep Learning and Data Science.

Deep learning

The second class of AI workload has received considerably more attention and hype in the last two years: a specialization of neural networks called deep learning. Deep learning is fueling interest in AI, or “cognitive” technologies, with applications such as image recognition, voice recognition, automatic game playing and autonomous vehicles.

The landscape of deep learning toolkits is evolving rapidly. Both academia and companies such as Google or Facebook have been investing in deep learning for years, and as a result there are multiple strong alternatives. The main toolkits in use are:

  • TensorFlow: from Google, and probably the highest profile at the time of writing. A “second generation” deep learning library, built by those experienced with earlier frameworks. Very accessible from Python.
  • MXNet: has high profile adoption, including Amazon Web Services, and is integrated with many programming languages.
  • Deeplearning4J: a commercially-supported deep learning framework with strong performance in a Java environment, making it attractive for enterprise applications.
  • Torch: a powerful framework in use at places such as Facebook and Twitter, but written in Lua, with less first-class support for other programming languages.
  • Caffe: has a particular emphasis on computer vision applications. Core language is C++, with a Python interface.
  • CTNK: Microsoft’s offering in the deep learning space, with Python and C++ APIs.
  • Theano: one of the oldest deep learning frameworks, written in Python. Used broadly in academia, but isn’t that well suited to production use.

Many of these deep learning frameworks operate at a lower level than everyday developers would like, and so have higher-level libraries on top of them which make their use more friendly. The most important of these is Keras, a Python library which supports the creation of deep learning applications that can run on either TensorFlow, Theano or Deeplearning4j. An alternative, H2O, provides support for TensorFlow, MXNet and Caffe from R, Python, and Scala among other languages.

If you have no specific reason to choose any of the alternatives, then the Keras and TensorFlow combination appears the strongest “default” choice going forward, on account of its developer experience, Google’s reputation in AI, and the importance of the Python ecosystem.

Your choice of deployment environment might affect your toolkit choice, too. For example, it’s unsurprising that TensorFlow is best supported by Google’s Cloud. I’ve written more on this topic here: The four options for AI in the cloud.

If you liked this and want to hear more, please join my newsletter.

Like what you read? Give Edd Wilder-James a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.