SECAI Core · phase 7 of 15
Counterfactual testing
A method of evaluating an AI model by changing one or more input features in a small, targeted way and checking how the model's output changes, to assess fairness, robustness, and causal behavior
The Explain card
- Plain English
- Counterfactual testing changes one or a few input features in a small, deliberate way and checks how the model's output shifts. Small change in, what changed out?
- Example
- A loan-approval model is fed two applications identical in every field except the applicant's postcode. If the decision flips from approve to decline, the model may be leaning on a proxy for protected characteristics rather than creditworthiness.
- Why it matters
- This is how defenders find hidden dependencies, unfair behaviour and brittle decision boundaries before attackers or regulators do. It also reveals which tiny input changes an adversary could exploit.
- Hook
- "What if only this were different?" Ask the model, then watch its face.
Where it sits in the deck
Phase 7: AI-Specific Runtime Controls: Guardrails, Limits, and Enforcement
Responsible AI principles must be enforced mechanically — learn the runtime controls that constrain model inputs, outputs, and resource consumption.