PROFESSIONAL-MACHINE-LEARNING-ENGINEER practice question 35 of 35

You are building a predictive maintenance model to preemptively detect part defects in bridges. You plan to use high definition images of the bridges as model inputs. You need to explain the output of the model to the relevant stakeholders so they can take appropriate action. How should you build the model?

Full set: 283 questions
Answer options
A: Use scikit-learn to build a tree-based model, and use SHAP values to explain the model output.
B: Use scikit-lean to build a tree-based model, and use partial dependence plots (PDP) to explain the model output.
C: Use TensorFlow to create a deep learning-based model and use Integrated Gradients to explain the model output. Correct answer
D: Use TensorFlow to create a deep learning-based model and use the sampled Shapley method to explain the model output.
Correct Answer:
C. Use TensorFlow to create a deep learning-based model and use Integrated Gradients to explain the model output.
Explanation

The task involves analyzing high-definition images to detect defects, which is a computer vision problem. Deep learning models, specifically Convolutional Neural Networks (CNNs) built with a framework like TensorFlow, are the state-of-the-art for such tasks due to their ability to learn hierarchical features from pixel data. To explain the model's output for an image, a feature attribution method is required. Integrated Gradients is an explainability technique specifically designed for deep, differentiable models. It assigns an importance score to each input feature (pixel), generating a saliency map that visually highlights which parts of the image were most influential in the model's prediction. This directly enables stakeholders to see the visual evidence for a detected defect.

Why Incorrect

A. Tree-based models in scikit-learn are designed for structured (tabular) data and perform poorly on high-dimensional, unstructured data like images without extensive feature engineering.
B. Partial Dependence Plots (PDPs) show the marginal effect of one or two features, which is uninterpretable and computationally infeasible for the thousands of pixel features in an image.
D. The sampled Shapley method is a model-agnostic approach that is computationally intensive and often prohibitively slow for deep learning models with high-dimensional inputs like images, making Integrated Gradients a more practical choice.

References

1. Google Cloud Documentation: Vertex AI Explainable AI documentation states, "For image data, Explainable AI highlights the pixels in your image that contributed to a given prediction... Explainable AI for image data uses the integrated gradients (IG) method. IG is a class of feature attribution methods."

Source: Google Cloud, "Overview of Explainable AI", Section: "Explainable AI methods".

2. TensorFlow Official Tutorials: The official TensorFlow documentation provides a tutorial on using Integrated Gradients for explaining image model predictions. It demonstrates how to "generate an attribution mask to see which pixels were most important for its decision." This confirms it as the standard method within the TensorFlow ecosystem for this exact use case.

Source: TensorFlow.org, "Interpretability with Integrated Gradients" Tutorial.

3. Academic Publication (Original Paper): The Integrated Gradients method was introduced by researchers at Google. The paper establishes its suitability for deep networks and demonstrates its application on image models like GoogleNet.

Source: Sundararajan, M., Taly, A., & Yan, Q. (2017). Axiomatic Attribution for Deep Networks. Proceedings of the 34th International Conference on Machine Learning, PMLR 70:3319-3328. (DOI: 10.48550/arXiv.1703.01365)

Scroll to Top