页面简介
Explainable AI (XAI) shows why a model made a decision: how it works, its benefits, SHAP and LIME, the laws that require it, and whether ChatGPT is explainable.
正文摘录
Back to GlossaryWhat is explainable AI? Benefits, methods, and examplesExplainable AI (XAI) shows why a model made a decision: how it works, its benefits, SHAP and LIME, the laws that require it, and whether ChatGPT is explainable.Editor: Maeve SentnerUpdated September 2026Explainable AI (XAI) is the set of methods that let a person see why a machine learning model produced a particular output. An explanation shows which inputs pushed the result up or down and by how much, or which rule the model followed. It covers models that are interpretable by design, such as rule lists and small decision trees, and techniques such as SHAP and LIME that explain a complex model after it has been trained.Explaining a model after training is the harder route, because the explanation is a simplified account of the model, not the model itself. A deep neural network or a large ensemble can score a loan application accurately and still offer no reason a person can read, which is why such systems get called black boxes. Explainable AI is the work of getting a usable reason out of a black box, or of choosing a model that never needed one.What is explainable AI?Explainable AI is the part of machine learning concerned with reasons: an explainable system can say what drove a given output in terms the person relying on it understands. DARPA funded a four-year research program on the topic. It defines explainable AI as systems that "can explain their rationale to a human user, characterize their strengths and weaknesses, and convey an understanding of how they will behave in the future," according to Gunning and Aha. DARPA announced the program in 2016 and launched it in May 2017 under the name XAI, the same abbreviation the field uses. The abbreviation is unrelated to xAI, the company behind the Grok models; the FAQ below covers the name clash.Explainability and interpretability overlap, and researchers use them loosely. Doshi-Velez and Kim define interpretability as "the ability to explain or to present in understandable terms to a human." Christoph Molnar's Interpretable Machine Learning notes that the field cannot agree on the difference. He adopts a common split: interpretability maps what a model does into an understandable form, and explainability adds the context a person needs to use it. This page uses a simpler working split: an interpretable model is one a person can read directly, and an explanation is usually an account of one prediction.A definition says what an explanation is; NIST's four principles of AI explainability say what a good one needs. A system should give a reason for each output (explanation) and make that reason understandable to its audience (meaningful). The reason should match how the output was actually produced (explanation accuracy), and the system should operate only under the conditions it was designed for (knowledge limits). NIST treats explanation accuracy as separate from decision accuracy: a model can be right for the wrong reason, and an explanation can describe a reason the model never used.How does explainable AI work?Explainable AI works in one of two ways: build a model whose logic a person can read, or run an explanation method on a model that cannot be read. Molnar calls these interpretability by design and post-hoc interpretability.Interpretable-by-design models are simple enough to show their reasoning. A linear model's weights say how much each input moves the output. A small decision tree or a rule list, "a sequence of IF-THEN rules" in the words of Yang and colleagues, can be followed step by step. That is why rule-based AI is easy to audit: the rule that fired is the reason.Post-hoc methods explain a model after it has been trained, and they come in two kinds. Model-agnostic methods treat the model as a closed box and study how its output changes as the inputs change, so they work on any model. Model-specific methods look inside, for example at a neural network's gradients or at individual neural network units, some of which respond to recognizable concepts such as trees. Either kind can be local, explaining one prediction, or global, describing how inputs affect predictions on average.One credit application shows a local explanation in action. The model is an illustrative credit model that scores applicants from 0 to 100 and approves at 50 or more. The applicant in question earns $48,000, has a 42% debt-to-income ratio, 5 years of credit history, and one recent missed payment, and scores 24, so the model declines.A SHAP-style explanation answers why with an attribution: a list of how much each input contributed to the gap between this score and a comparison point called the baseline. Here the baseline is a typical applicant, with a $60,000 income, a 30% debt-to-income ratio, 8 years of history, and no missed payments, who scores 60. The method uses Shapley values, a game-theory rule for dividing a joint result among contributors (covered under Methods), computed exactly here. The debt-to-income ratio accounts for -15 points, the missed payment for -9, the short credit history for -6, and the lower income for -6. The four contributions add up to exactly -36, the gap between 60 and 24, which makes the explanation checkable.Six of the 36 points come from a combination: the model adds an extra penalty when a high debt-to-income ratio and a missed payment occur together. The Shapley calculation splits that 6 evenly, 3 to each. If all 6 went to debt-to-income instead, the missed payment would tie with two other inputs for second place, so the rule for splitting a shared penalty changes the order of the reasons.The largest negative contributions are the natural candidates for the reasons on a denial notice, starting with debt-to-income and the missed payment. US credit law asks for the principal reasons, not the numbers behind them. Under Regulation B, the reasons for a denial "must be specific and indicate the principal reason(s)," and a statement that the applicant "failed to achieve a qualifying score" is not enough.Regulation B's sample notice lists reasons such as "Excessive obligations in relation to income" and "Delinquent past or present credit obligations with others," which match the two largest contributions here. Its official commentary says the regulation does not require any one method for selecting reasons, and that more than four is "not likely to be helpful to the applicant." An attribution like this one is one way to find them.Benefits of explainable AIThe main benefits of explainable AI are appropriate trust, faster debugging, bias that can be found before it does harm, and decisions that people can check and contest. DARPA's program aimed to help users "understand, appropriately trust, and effectively manage" AI systems. The word appropriately matters: an explanation should make a person trust a good model and doubt a bad one.Debugging is where explainable AI benefits show up first. In the paper that introduced LIME, Ribeiro and colleagues deliberately trained a bad image classifier to tell wolves from huskies, using 20 photos chosen so that every wolf photo had snow in the background. The model then labeled any photo with snow a wolf and any photo without snow a husky. On a test set of 10 photos it got 8 right. LIME's explanations showed what it was actually looking at: the snow, not the animal. Before seeing the explanations, 10 of the 27 graduate students in the study trusted the model; after seeing them, 3 did.The same inspection helps find bias. Attributions across many decisions show which inputs carry the most weight. Checked against data on protected characteristics, they show whether a heavily weighted input, such as a postal code, acts as a stand-in for one. An input that does is a candidate to remove or replace, which is where bias mitigation starts.An explanation also gives the person affected by a decision something to act on. Wachter and colleagues list three purposes for explaining an automated decision. It should help the person understand why the decision was reached, give grounds to contest it, and show what would need to change for a different result.Explainable AI in decision-making turns a model's output into something a reviewer can check. A reviewer who can see why a model flagged a case can overrule it when the reason is wrong and trust it when the reason holds. That makes an explanation a working check on the model.Importance of explainable AIExplainable AI is important because some decisions legally require a reason, and three sets of rules come up most often: US credit law, the EU's GDPR, and the EU AI Act. The first governs lending in the US; the other two apply to decisions about people in the EU.In the US, the Equal Credit Opportunity Act and its implementing rule, Regulation B, require a lender that denies credit to give the applicant specific principal reasons. A 2022 CFPB circular applied that rule to complex algorithms: creditors using them "must still provide a notice that discloses the specific principal reasons," and a model too opaque to understand is no excuse. The CFPB withdrew the circular in May 2025. That removed the agency's guidance, not the rule: Regulation B has no exception for complex models.The GDPR's text says less about explanation than its reputation suggests, and a 2025 court ruling filled the gap for credit scoring. Article 22 gives people the right not to be subject to a decision "based solely on automated processing" that has legal or similarly significant effects. Where such decisions are allowed, people keep the right to human intervention, to express their view, and to contest the decision. Article 15 adds a right to "meaningful information about the logic involved." The word explanation appears only in Recital 71, part of the regulation's preamble, which is not legally binding, a point Wachter and colleagues make at length.The EU Court of Justice read Article 15 more broadly in February 2025, in a case about