counterfactual
In plain wordsA statement about what would have happened if something had been different — 'had I left earlier, I would have caught the train'. AI uses counterfactuals to explain decisions and to measure causes.
- 1
Causality and statistics
A claim or quantity about the outcome that would have occurred, for a particular unit or situation, had some antecedent been different from what actually happened. In the potential-outcomes framework every unit has an outcome under each treatment, only one of which is ever observed — the 'fundamental problem of causal inference' — so causal effects are contrasts involving counterfactual outcomes. In Judea Pearl's structural causal modelsstructural causal model, n.: A precise description of what causes what in a system — a diagram of arrows plus equations — that predicts what would happen if you intervened, not just what tends to occur together., counterfactuals are computed in three steps: abduction (inferring unobserved background conditions from the evidence), action (intervening to set the antecedent) and prediction. Pearl places them on the top rung of his 'ladder of causation', above association and intervention, because they require the most causal knowledge.
- 2
Machine learning
A minimally modified input used to probe or explain a model. Counterfactual explanationscounterfactual explanation, n.: An explanation that tells someone the smallest change that would have produced a different outcome — for example, that the application would have been accepted if it had listed two more years of work experience. state what would have to change for a decision to flip (a loan approved had income been higher); counterfactual data augmentation swaps attributes to weaken spurious correlationsspurious correlation, n.: A link in data that fools you: two things move together, yet neither drives the other, because a hidden shared cause, the way the data were collected or luck produced the pattern. AI models readily latch onto such links.; counterfactual fairnesscounterfactual fairness, n.: A fairness test that asks: had this person been of another race or sex, with everything that would have followed from that, would the system have decided the same way? asks whether a decision would change had a protected attributeprotected attribute, n.: A personal trait, such as race, sex, religion, age or disability, that the law says must not be used to treat people unfairly. been different; and activation patchingactivation patching, n.: An experiment that copies part of a model's internal state from its run on one input into its run on another, to see which internal parts actually cause a change in the answer. runs counterfactual forward passes inside a network.
A counterfactual with only the applicant's postcode changed flipped the decision, a red flag for proxy discrimination.
Origin
Philosophers analyzed counterfactual conditionals in the 1940s (Nelson Goodman, 'The Problem of Counterfactual Conditionals', 1947), and David Lewis's Counterfactuals (1973) gave them a possible-worlds semantics. Jerzy Neyman (1923) and Donald Rubin (1974) built statistics on potential outcomes, and Judea Pearl formalized counterfactuals within structural causal models in the 1990s.
Related
- causal inferencecausal inference, n.: Working out whether one thing actually causes another, rather than merely occurring alongside it — for example, whether a new feature made users stay longer or just happened at the same time.
- counterfactual explanationcounterfactual explanation, n.: An explanation that tells someone the smallest change that would have produced a different outcome — for example, that the application would have been accepted if it had listed two more years of work experience.
- counterfactual fairnesscounterfactual fairness, n.: A fairness test that asks: had this person been of another race or sex, with everything that would have followed from that, would the system have decided the same way?
- structural causal modelstructural causal model, n.: A precise description of what causes what in a system — a diagram of arrows plus equations — that predicts what would happen if you intervened, not just what tends to occur together.
- do-calculusdo-calculus, n.: A set of mathematical rules, devised by Judea Pearl, for working out the effect of deliberately changing something using only observational data plus a diagram of what causes what.
- activation patchingactivation patching, n.: An experiment that copies part of a model's internal state from its run on one input into its run on another, to see which internal parts actually cause a change in the answer.
Mentioned in
causal inferencecausal inference, n.: Working out whether one thing actually causes another, rather than merely occurring alongside it — for example, whether a new feature made users stay longer or just happened at the same time., counterfactual explanationcounterfactual explanation, n.: An explanation that tells someone the smallest change that would have produced a different outcome — for example, that the application would have been accepted if it had listed two more years of work experience., Judea PearlJudea Pearl, prop. n.: An Israeli-American computer scientist who gave AI the mathematics for reasoning under uncertainty and, later, for telling cause and effect apart from mere correlation., causal mediation analysiscausal mediation analysis, n.: A statistical method for splitting a cause's effect into the part that flows through some go-between and the part that does not; in AI it is used to find which internal parts carry a behavior., do-calculusdo-calculus, n.: A set of mathematical rules, devised by Judea Pearl, for working out the effect of deliberately changing something using only observational data plus a diagram of what causes what., structural causal modelstructural causal model, n.: A precise description of what causes what in a system — a diagram of arrows plus equations — that predicts what would happen if you intervened, not just what tends to occur together., uplift modelinguplift modeling, n.: Predicting not who will buy, recover or respond, but whose behavior will actually change because of an action such as a discount or a treatment, so that it is offered only where it makes a difference.