Realistic Counterfactual Explanations via Denial Constraints
This paper proposes a novel approach to generating realistic counterfactual explanations in Explainable AI by integrating denial constraints from relational databases to ensure generated instances adhere to data validity rules, thereby improving practical applicability with minimal compromise to distance and diversity metrics.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the world of artificial intelligence, machines often make decisions that affect our lives, from approving loans to diagnosing illnesses. When these systems say "no," it is helpful to know why. One popular way to explain a decision is to imagine a slightly different version of the situation that would have led to a "yes." If a loan application is rejected, a helpful explanation might suggest that earning a little more money or having a slightly higher credit score would have changed the outcome. These imagined alternatives are called counterfactuals. They act as a spotlight, showing exactly which features of a person or object mattered most to the machine's judgment. However, for these explanations to be truly useful, they must make sense in the real world. An explanation that suggests a tiny apartment in a crowded city could suddenly have ten bedrooms is mathematically possible but physically impossible. If the suggested changes are unrealistic, the explanation fails to help the person understand their situation or fix it.
Researchers at Tel Aviv University, eBay, and the Hebrew University of Jerusalem have tackled this problem of unrealistic suggestions. They found that the most advanced tools currently used to generate these explanations often produce results that violate basic rules of reality. For instance, a tool might suggest that a house in a specific neighborhood has a certain number of bathrooms that simply do not exist in that area, or that a person's age and education level contradict known facts about how people live. To fix this, the team combined the methods used to explain AI with techniques from database management, the field that ensures data in computers remains consistent and accurate. They introduced a system that checks every suggested change against a set of logical rules derived from real data. These rules, known as denial constraints, act like a filter, ensuring that any new scenario proposed as an explanation fits within the boundaries of what is actually possible.
The researchers tested their new approach on four different datasets, including information about New York real estate, tax records, and demographic data. They compared their method against the leading existing tool, which is known for finding diverse and close explanations but ignores whether those explanations are realistic. The results were stark. In the real estate dataset, nearly all the explanations generated by the standard tool violated at least one rule of reality. In some cases, every single suggestion it made was impossible. By contrast, the new system produced explanations that violated zero rules. Every scenario it offered was consistent with the data it had seen. This did not come at a heavy price. The new explanations were only slightly further away from the original situation than the unrealistic ones, and they remained just as diverse, offering a wide range of different reasons for the decision. In fact, on some datasets, the new method actually provided better explanations because the standard tool had been forced to wander into impossible territory to find a solution.
A major challenge in this work was speed. Checking every possible change against thousands of rules can be incredibly slow, to the point where a single check might take hours. The team developed a series of clever shortcuts to make the process fast enough for practical use. Instead of checking every rule against every piece of data every time, their system learned to identify which rules were actually relevant to the specific situation at hand. They also built a way to remember previous checks so they did not have to repeat the work. These optimizations made the system up to sixty-three times faster than a direct, unoptimized approach. This speed is crucial because it means the system can be used in real-time applications without waiting for a computer to crunch numbers for an hour.
The study also looked at other methods that try to make explanations realistic, such as those that use complex models to guess what data looks like or those that only pick examples from a pre-existing list. The researchers found that even these sophisticated methods often failed to respect the hard rules of the data. A model might suggest a combination of features that looks statistically likely but still breaks a specific logical rule, like a tax exemption that does not apply to a certain state. The new approach is unique because it guarantees that the explanation will not break any of the rules. It does this by treating the rules as absolute laws rather than soft suggestions. If a suggestion violates a rule, the system adjusts it until it fits, ensuring the final explanation is not just a guess, but a factually valid scenario.
This work highlights a critical gap in how we currently trust and understand artificial intelligence. It shows that being close to the original data is not enough; an explanation must also be grounded in the reality of the world it describes. By ensuring that counterfactuals are realistic, the researchers have made these explanations more trustworthy and useful for the people who need them. Whether it is a homeowner wondering why their property value is low or a job seeker understanding why they were rejected, knowing that the suggested path to a different outcome is actually possible makes the difference between a confusing mathematical trick and a clear, actionable insight. The team's success in balancing realism with diversity and speed suggests that the future of explainable AI lies not just in finding the closest answer, but in finding the true one.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.