YUFENG GUO: Getting explanations for your predictions
is becoming increasingly important.
How can we use Cloud AI Platform's Prediction service
to generate explanations?
Stay tuned to find out.
[MUSIC PLAYING]
Welcome to "AI Adventures" where we explore the art, science,
and tools of machine learning.
My name is Yufeng Guo, and on this episode,
we're going to explore AI Explanations, which is now
built into Cloud AI Platform's Prediction service,
allowing you to have feature attributions for each
and every one of your predictions.
AI Explanations integrates feature attributions
into AI Platform Prediction and it
helps you understand your model's outputs
for classification and regression tasks.
This means AI Explanations can tell you
how much each feature in the data
contributed to the predicted results.
This is super useful because you can then
verify the model is behaving as you would expect, recognize
bias as it's happening, and get ideas for how you can improve
your training data and model.
Feature attributions are available for tabular data as
well as image data, and are specific
to individual predictions.
Currently, there is the limitation in AI Explanations
that it only supports models trained on TensorFlow 1.x.
And if you're using Keras to specify your model,
you will need to convert it into an estimator using
the model to estimator utility.
Now, let's talk a little bit about the particulars
of feature attribution and how it works.
AI Explanations offers two methods--
sampled Shapley and integrated gradients.
Both methods are based on the concept of Shapley values,
which is a cooperative game theory algorithm that
assigns credit to each player in a game
for a particular outcome.
Here, each feature is treated as a player in that game.
And proportional credit is assigned
to each of those features for the outcome of a prediction.
Integrated gradients are best suited
for differential models like neural networks.
It's especially useful for models with large feature
spaces.
It computes the gradients of the output with respect
to the input, multiplied element-wise
with the input itself.
For those who remember their calculus class,
this is, essentially, a Taylor approximation of the prediction
function at the input.
Bet you didn't expect to see a Taylor approximation
reference today.
Now, let's talk briefly about the other feature attribution
method--
sampled Shapley.
It assigns credit for the outcome of each feature
and also considers different permutations of those features,
and is most suitable for non-differential models
like ensembles of trees.
There are a number of articles and research papers
which dive way deeper into these explainability methods which
I've linked to below.
They're all very well-written and super interesting to read.
So if you like these topics, I would encourage you to dive in
and check them out.
If you are ready to try out AI Explanations
for your deployed model, head on over to the guides
in the documentation.
There's one for tabular data and another one for image data.
And, best of all, they're presented as Colab notebooks,
so it's super easy to try it out.
One final note before we wrap up.
Last episode, we talked about the What-If Tool,
an open-source tool for understanding
your model's predictions.
AI Explanations can be used in concert with the What-If Tool
to get an even more in-depth understanding
of your predictions.
The process for doing that is also detailed in those Colab
notebooks I mentioned earlier, and I'll
be sure to link to it in the description below.
Thanks for watching this episode of Cloud "AI Adventures."
And if you enjoyed it, click that Like button,
and be sure to subscribe to get all the latest episodes right
when they come out.
For now, check out AI Explanations on Google Cloud AI
Platform to get your predictions explained.
[MUSIC PLAYING]