[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-04-21。"],[[["\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)."]]