このドキュメントでは、BigQuery ML が XAI とも呼ばれる Explainable AI(AI)をサポートする仕組みについて説明します。
Explainable AI は、データ行の各特徴がどのように予測結果に影響を与えるかを定義することで、予測 ML モデルが分類タスクと回帰タスクに対して生成する結果の理解を容易にします。この情報は多くの場合、特徴アトリビューションと呼ばれます。この情報を使用して、モデルが期待どおりに動作していることを検証すること、モデルのバイアスを認識すること、モデルやトレーニング データの改善方法を知ることができます。
BigQuery ML と Vertex AI にはいずれも、特徴ベースの説明を提供する Explainable AI のサービスがあります。説明可能性は、BigQuery ML で利用することも、Vertex AI にモデルを登録してそこで利用することもできます。
BigQuery ML モデルが Model Registry に登録されていて、Explainable AI をサポートするモデルタイプの場合、エンドポイントにデプロイするときに、モデルで Explainable AI を有効にできます。BigQuery ML モデルを登録すると、関連するすべてのメタデータが入力されます。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[[["\u003cp\u003eBigQuery ML supports Explainable AI (XAI), which helps users understand how individual features contribute to predictions in classification and regression models.\u003c/p\u003e\n"],["\u003cp\u003eXAI in BigQuery ML offers both local explainability, detailing the impact of features on individual predictions, and global explainability, showing a feature's overall influence on the model across a dataset.\u003c/p\u003e\n"],["\u003cp\u003eBigQuery ML provides Explainable AI support for various models, including time series and non-time series, with different methods like Shapley values, Tree SHAP, and Integrated Gradients, depending on the model type.\u003c/p\u003e\n"],["\u003cp\u003eBigQuery ML models can be registered in Vertex AI, where Explainable AI can be enabled during deployment, allowing users to obtain explanations through online predictions with an extra cost.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eML.EXPLAIN_PREDICT\u003c/code\u003e and \u003ccode\u003eML.GLOBAL_EXPLAIN\u003c/code\u003e SQL functions are supported to achieve explainability, with time-series models also having \u003ccode\u003eML.EXPLAIN_FORECAST\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# BigQuery Explainable AI overview\n================================\n\nThis document describes how BigQuery ML supports\nExplainable artificial intelligence (AI), sometimes called XAI.\n\nExplainable AI helps you understand the results that\nyour predictive machine learning model generates for classification and\nregression tasks by defining how each feature in a row of data contributed to\nthe predicted result. This information is often referred to as feature\nattribution. You can use this information to verify that the model is behaving\nas expected, to recognize biases in your models, and to inform ways to\nimprove your model and your training data.\n\nBigQuery ML and Vertex AI both have Explainable AI\nofferings which offer feature-based explanations. You can perform\nexplainability in BigQuery ML, or you can\n[register your model](/bigquery/docs/managing-models-vertex#register_models)\nin Vertex AI and perform explainability there.\n\nFor information about the supported SQL statements and functions for each\nmodel type, see\n[End-to-end user journey for each model](/bigquery/docs/e2e-journey).\n\nLocal versus global explainability\n----------------------------------\n\nThere are two types of explainability: local explainability and global\nexplainability. These are also known respectively as\n*local feature importance* and *global feature importance*.\n\n- Local explainability returns feature attribution values for each explained example. These values describe how much a particular feature affected the prediction relative to the baseline prediction.\n- Global explainability returns the feature's overall influence on the model and is often obtained by aggregating the feature attributions over the entire dataset. A higher absolute value indicates the feature had a greater influence on the model's predictions.\n\nExplainable AI offerings in BigQuery ML\n---------------------------------------\n\nExplainable AI in BigQuery ML supports a variety of machine\nlearning models, including both time series and non-time series models. Each of\nthe models takes advantage of a different explainability method.\n\n^1^`ML_EXPLAIN_PREDICT` is an extended version of `ML.PREDICT`.\n\n^2^`ML.GLOBAL_EXPLAIN` returns the global explainability\nobtained by taking the mean absolute attribution that each feature receives for\nall the rows in the evaluation dataset.\n\n^3^`ML.EXPLAIN_FORECAST` is an extended version of `ML.FORECAST`.\n\n^4^`ML.ADVANCED_WEIGHTS` is an extended version of `ML.WEIGHTS`.\n\nExplainable AI in Vertex AI\n---------------------------\n\nExplainable AI is available in Vertex AI for the following\nsubset of exportable supervised learning models:\n\nSee\n[Feature Attribution Methods](/vertex-ai/docs/explainable-ai/overview#feature-attribution-methods)\nto learn more about these methods.\n\n### Enable Explainable AI in Model Registry\n\nWhen your BigQuery ML model is registered in\nModel Registry, and if it is a type of model that supports\nExplainable AI, you can enable Explainable AI on the model when deploying to an\nendpoint. When you register your BigQuery ML model, all of the\nassociated metadata is populated for you.\n| **Note:** Explainable AI incurs a minor additional cost. See [Vertex AI pricing](/vertex-ai/pricing) to learn more.\n\n1. [Register your BigQuery ML model to the Model Registry](/bigquery/docs/managing-models-vertex#register_models).\n2. Go to the **Model Registry** page from the BigQuery section in the Google Cloud console.\n3. From the Model Registry, select the BigQuery ML model and click the model version to redirect to the model detail page.\n4. Select **More actions** from the model version. more_vert\n5. Click **Deploy to endpoint**.\n6. Define your endpoint - create an endpoint name and click continue.\n7. Select a machine type, for example, `n1-standard-2`.\n8. Under **Model settings**, in the logging section, select the checkbox to enable Explainability options.\n9. Click **Done** , and then **Continue** to deploy to the endpoint.\n\nTo learn how to use XAI on your models from the\nModel Registry, see\n[Get an online explanation using your deployed model](/vertex-ai/docs/tabular-data/classification-regression/get-online-predictions#online-explanation).\nTo learn more about XAI in Vertex AI, see\n[Get explanations](/vertex-ai/docs/explainable-ai/getting-explanations).\n\nWhat's next\n-----------\n\n- Learn how to [manage BigQuery ML models in Vertex AI](/bigquery/docs/managing-models-vertex)."]]