Today marks the culmination of two years of development for some software that could make machine learning a lot easier to program, thereby helping to democratize AI.
That's the hope of Jeremy Howard, a co-founder of San Francisco-based Fast.ai, a startup outfit that is today releasing version 1.0 of "fastai," a set of code libraries designed to radically simplify writing machine learning tasks.
Built on top of Facebook's PyTorch library, which also has its own 1.0 version release today, fastai allows one to do tasks such as run a convolutional neural network for image recognition on the ImageNet benchmark tests with just a handful of lines of code. (ZDNet's Steven J. Vaughan-Nichols has more on Facebook's open-sourcing PyTorch.)
The tools come out of a series of popular courses on machine learning run by Fast.ai, which Howard founded three years ago with his wife, Rachel Thomas. Both individuals had an over-arching goal of making AI much more accessible. "We both believe in the power of deep learning," Howard told ZDNet, "but we were both terrified of the extent to which the current homogenous group of young white men control most of tech, and so we decided to do something about that."
"What I hope is that lots of people will realize that state-of-the-art results of deep learning are something they can achieve even if they're not a Stanford University deep learning PhD."
From the start, Howard and Thomas envisioned a software component for their machine learning courses. In fact, "our internal goal was to get to point where we wouldn't need a course anymore," he says, joking that "the fact we have a course means so far we have failed." In reality, Fast.ai's curricula and work with students were "a way to see what we needed to do" to make the whole process of programming machine learning much simpler.
The fastai library has been developed in bits and pieces over the last two years, mostly by Howard himself, but with some help from students in the courses, especially a French math teacher who did a residency with Howard, Sylvain Gugger.
Today's release is the first time all the parts are coming together in a polished, integrated whole.
Ultimately, "We found Keras was not flexible enough" for Fastai's purposes, says Howard. PyTorch, in contrast, was much more expressive in allowing him to implement new ML algorithms. "The Keras class API doesn't know many things you need to use, you have to tell it a lot more," he explains, "which means you have to be a strong-enough practitioner" of machine learning.
Also: Top 5: Things to know about AI TechRepublic
In contrast, "PyTorch has a very, very nice class library, and the way that it allows you to work with data is really neat, it's easy and flexible."
PyTorch functions that are especially valuable are things such as the "DataLoader" class, which puts the dataset of, say, an image-recognition task onto the graphics processing unit (GPU) for you.
But, "PyTorch lacked Keras's ease-of-use," he notes. "So we decided to start developing our own software to do for PyTorch what Keras did for TensorFlow; but rather than just create a version of Keras, we created something new."
The magic of fastai is evident in the elegance and simplicity of fastai's syntax, which whip together several stages of activity for a whole ML task.
Here, for example, is fastai code for calling into being a convolutional neural network, or CNN, for image recognition, in this case the popular MNIST handwriting recognition test:
data = get_mnist()
learn = ConvLearner(data, tvm.resnet18, metrics=accuracy)
That's all there is too it. Under the hood, the fastai "Learner" class is calling a number of PyTorch resources to make it all work.
Google's Google Cloud was the first to announce support for fastai. There's an interesting article about the use of fastai and PyTorch on Google Cloud by ML researcher Viacheslav Kovalevskyi, over on Medium.
Amazon's Amazon Web Services has announced support, and will be making it available in its "AWS Deep Learning AMIs" and its "Amazon SageMaker." Microsoft has also today announced support in its Azure cloud service. Microsoft's chief technology officer for AI, Joseph Sirosh, said in prepared remarks that Microsoft is "happy to see Fast.ai helping democratize deep learning at scale and leveraging the power of the cloud."
Another way Howard hopes the code will democratize machine learning is by its use in a separate, startup venture called Platform.ai, of which he is Chief Scientist. A domain expert, such as a medical researcher, can upload cell images or other data to Platform.ai, label them, and spit out a deep learning model. The intention is to build easy graphical user interfaces for domain-specific problem solving without the need to be an expert in either AI or cloud computing -- a lot like ideas of AI in medicine that have circulated for decades, but with little payoff up till now.
(While Fast.ai is registered as a Delaware Corporation, its intention, unlike Platform.ai, is not to make money, but rather to provide open-source tools to enable such commercial ventures.)
Howard has pursued such democratic ideals around machine learning in other settings. He was a founder of Enlitic, the San Francisco startup that uses deep learning for things such as recognizing tumors in medical images.
Howard himself has a most interesting background. He got a gig as a strategy consultant with McKinsey & Co. straight out of high school, graduating up quickly from the role of help-desk support there. He then went on to get a B.A. at University of Melbourne in philosophy, but kept consulting in the areas of computer sciences and machine learning.
Howard has great perspective on both the past and the future of machine learning. Long before the recent renaissance in deep learning, with the efforts of Yoshua Bengio at Montreal's MILA, and Geoffrey Hinton of Google's DeepMind, the technology for multi-layer, hierarchical neural nets existed in the 1990s. He cites the "LetNet5" network built by Facebook's Yan LeCun when LeCun was an academic, and multiple "long-short-term memory" models back then.
"We had examples of [networks with] multiple hidden layers, ten to fifteen years ahead of their time, but many of us didn't take notice."
As for the road ahead, Howard is mindful of the recent rush of criticism of deep learning by the likes of Gary Marcus, the NYU cognitive scientist and entrepreneur, who has written long articles describing how deep learning falls short of the Holy Grail of "artificial general intelligence," and continues to tweet regularly about such shortcomings.
Marcus, says Howard, implies deep learning's practitioners are not aware of its limitations, but they actually are aware. "Well, yes, it has things it's not perfect at," he concedes, and "deep learning can't do everything, but it's a jolly useful tool, and it can help people do their jobs better in a lot of ways."
Howard is of a practical bent: "Maybe it doesn't lead us to generalized AI, but who cares. I'm not trying to build a brain, that's not something I'm interested in."
Previous and related coverage:
An executive guide to artificial intelligence, from machine learning and general AI to neural networks.
The lowdown on deep learning: from how it relates to the wider field of machine learning through to how to get started with it.
This guide explains what machine learning is, how it is related to artificial intelligence, how it works and why it matters.
An introduction to cloud computing right from the basics up to IaaS and PaaS, hybrid, public, and private cloud.
- There is no one role for AI or data science: this is a team effort
- Startup Kindred brings sliver of hope for AI in robotics
- AI: The view from the Chief Data Science Office
- Salesforce intros Einstein Voice, an AI voice assistant for enterprises
- It's not the jobs AI is destroying that bother me, it's the ones that are growing
- How Facebook scales AI