Source-linked AI summary

LLMs Don't Know Their Own Decision Boundaries: The Unreliability of Self-Generated Counterfactual Explanations

Harry Mayne, Ryan Othniel Kearns, Yushi Yang, Andrew M. Bean, Eoin Delaney, Chris Russell, Adam Mahdi

arXiv:2509.09396v1cs.LGcs.AIcs.CL

TL;DR

The paper asks whether LLMs can reliably explain their decisions through self-generated counterfactual explanations. It evaluates validity and minimality across models and tabular datasets, finding a consistent trade-off: unconstrained counterfactuals are often valid but excessive, while minimal ones often fail to change predictions. The results caution against relying on SCEs for high-stakes explanations.

  • Problem

    The paper examines whether LLMs can generate self-counterfactual explanations that are both valid and minimal, because unreliable explanations may mislead users about model behaviour.

    Source: §1 · p. 1
  • Method

    The study evaluates SCEs across several LLMs, synthetic tabular datasets, and prompting settings, measuring validity and minimality against the models’ decision boundaries.

    Source: §1 · p. 2, §3.5 · p. 4
  • Results

    LLMs show a validity–minimality trade-off: unconstrained SCEs are typically valid but far from minimal, whereas minimal SCEs are typically too small to change predictions.

    Source: §1 · p. 2, §6 · p. 9
  • Takeaways & Limitations

    SCEs are therefore ineffective or misleading explanations of model behaviour, particularly when used to support downstream decisions in high-stakes settings.

    Source: §6 · p. 9

    The experiments use three synthetic, low-dimensional datasets, and the authors note that self-prediction accuracy and generalisation to more complex datasets remain open limitations.

    Source: §4.5 · p. 8, §7 · p. 10

Abstract

from arXiv · show

To collaborate effectively with humans, language models must be able to explain their decisions in natural language. We study a specific type of self-explanation: self-generated counterfactual explanations (SCEs), where a model explains its prediction by modifying the input such that it would have predicted a different outcome. We evaluate whether LLMs can produce SCEs that are valid, achieving the intended outcome, and minimal, modifying the input no more than necessary. When asked to generate counterfactuals, we find that LLMs typically produce SCEs that are valid, but far from minimal, offering little insight into their decision-making behaviour. Worryingly, when asked to generate minimal counterfactuals, LLMs typically make excessively small edits that fail to change predictions. The observed validity-minimality trade-off is consistent across several LLMs, datasets, and evaluation settings. Our findings suggest that SCEs are, at best, an ineffective explainability tool and, at worst, can provide misleading insights into model behaviour. Proposals to deploy LLMs in high-stakes settings must consider the impact of unreliable self-explanations on downstream decision-making. Our code is available at https://github.com/HarryMayne/SCEs.

1 Introduction

The paper tests whether LLMs can generate self-counterfactual explanations that are both valid and minimal. Across models and settings, validity and minimality trade off, making SCEs unreliable for understanding decision boundaries.

  • Validity requires changing the prediction, whereas minimality requires making the smallest edit needed to change the outcome.Minimal counterfactuals are intended to isolate consequential features and can be more actionable in settings such as clinical decision-making.Source: §1 · p. 1
  • The experiments evaluate SCE validity and minimality across several LLMs, datasets, and evaluation settings using tabular prediction tasks.Natural-language prompts are evaluated in structured tabular environments.Source: §1 · p. 2
  • LLMs usually produce valid counterfactuals, but excessive input changes make them far from minimal and provide little insight into decision boundaries.This pattern is reported for frontier LLMs when simply asked to generate counterfactual explanations.Source: §1 · p. 2, Figure 1 · p. 2
  • When instructed to make minimal counterfactuals, models generally make overly conservative edits that fail to flip predictions.Such invalid explanations can misrepresent the model’s behaviour.Source: §1 · p. 2
  • Because SCEs can be valid but non-minimal or minimal but invalid, they may provide misleading explanations and risk incorrect downstream decisions in high-stakes settings.Source: §1 · pp. 1–2

2 Self-generated counterfactual explanations

Self-generated counterfactual explanations are model-produced alternative inputs intended to change the model’s predicted outcome. Their validity is checked by independently reevaluating the revised input in a new context window.

  • An SCE is an alternative input that the LLM itself generates to produce a specified alternative output.This differs from counterfactuals found by algorithms that iteratively perturb input keywords.Source: §2 · pp. 2–3
  • Independent reevaluation in a new context window tests whether the SCE actually flips the prediction without the original prediction biasing the assessment.Source: §2 · p. 3

3 Methods

The study converts complete, discrete tabular datasets into natural-language prompts, elicits predictions and counterfactuals, and measures validity and minimality against the induced decision boundary.

3 Methods

  • The method uses discrete tabular datasets containing every feature combination, enabling the exact closest boundary-crossing counterfactual to be identified.The datasets are simplified versions of real-world datasets with two to four features.Source: §3.1 · p. 3, §3.2 · p. 3
  • Numerical and ordinal tabular instances are converted into natural-language inputs, while SCEs are evaluated in the original tabular space.This restricted input space makes minimality measurable.Source: §3.1 · p. 3
  • For each instance, the model first predicts a class, then revises the input toward the complementary class; predictions over the complete dataset define its decision boundary.Validity measures whether the revision crosses that boundary.Source: §3.1 · p. 3
  • The experiments cover income, house-price, and heart-disease binary classification datasets, using two to four discrete input features.The datasets contain 1,920, 1,600, and 1,936 instances, respectively.Source: §3.2 · p. 3

3.4 Prompt settings

  • Seven open-source and proprietary LLMs are evaluated under unconstrained and minimal prompting settings.The unconstrained setting asks for any prediction-flipping counterfactual, whereas the minimal setting explicitly requests the smallest necessary edit.Source: §3.3 · p. 3, §3.4 · p. 3

4 Results

Across datasets and evaluation settings, LLMs exhibit a persistent validity–minimality trade-off: unconstrained SCEs usually flip predictions but change inputs excessively, while minimal SCEs are closer yet often fail to flip predictions.

4.1 Valid but not minimal

  • 100% validity across all three datasets for o3 still came with mean excess distances of 0.16, 0.42, and 0.50.These correspond to overshooting the decision boundary by an average of 16% of the dataset span on income, with larger excess distances on house prices and heart disease.Source: §4.1 · p. 4
  • Only 2.89% average exact-match accuracy identified the minimal counterfactual in the unconstrained setting.Table 1 reports that models rarely identify the exact minimal valid counterfactual, although performance is higher under minimal prompting and no model exceeds 32%.Source: §4.1 · p. 4, Table 1 · p. 5

4.2 Minimal but rarely valid

  • Validity fell from 97.14% to 36.30% on income under minimal prompting, while valid SCEs had much smaller excess distances of 0.02, 0.01, and 0.02 for o3.Across models and datasets, exact-match accuracy rose to 14.9%, indicating a trade-off rather than reliable joint satisfaction of validity and minimality.Source: §4.2 · p. 5

4.3 Where do models place SCEs?

  • Unconstrained models often maximize or minimize every feature on monotonic tasks, while minimal prompting produces conservative edits that usually fail to cross the boundary.For house prices, o3 selected the maximum or minimum point in 46% of cases; in heart disease, this occurred in 34% of SCEs, whereas income showed region preferences instead.Source: §4.3 · p. 5

4.4 Robustness analysis

  • The validity–minimality trade-off persisted across alternative distance functions, prompt variations, and temperature 1.0 decoding.None of the tested prompt variations produced SCEs that were both valid and minimal.Source: §4.4 · p. 6

4.5 What limits performance?

  • Decision boundaries were stable except near the boundary, and 91.4% of originally invalid SCEs remained invalid across 50 perturbations.This suggests that boundary inconsistency does not explain the observed failures.Source: §4.5 · p. 7

5 Related work

The paper situates SCEs within counterfactual and self-explanation research, extending prior validity-focused work by evaluating minimality and their trade-off. It uses complete tabular input spaces to measure minimality precisely.

Counterfactual explanations

  • In NLP, counterfactuals are commonly generated through keyword perturbations or separate language models rather than by the predicting model itself.Source: §5 · p. 8
  • Prior counterfactual-explanation research seeks actionable explanations by identifying the closest possible world, motivating minimality as a central property.Source: §5 · p. 8
  • Complete tabular datasets restrict the input space enough to locate exact minimum counterfactuals and measure SCE minimality precisely.Source: §5 · p. 9

Self-explanations and SCEs

  • SCEs are structured self-explanations in which an LLM generates a counterfactual input intended to explain its own prediction.Source: §5 · p. 9
  • Earlier SCE studies primarily measured validity, whereas this work evaluates both validity and minimality and examines their trade-off.Source: §5 · p. 9

6 Conclusion

The paper concludes that SCEs exhibit a validity–minimality trade-off: unconstrained prompts produce trivially valid but uninformative edits, while minimal prompts often fail to change predictions. Models also struggle to engage in accurate self-prediction, limiting SCE reliability.

  • SCEs trade off validity and minimality: unconstrained prompts yield trivially valid counterfactuals, whereas minimal prompts often produce edits that fail to flip predictions.Source: §6 · p. 9
  • Because unreliable SCEs can mislead human decision-making and potentially cause harm, high-stakes LLM deployments should account for their impact.Source: §6 · p. 9
  • Models do not spontaneously engage in self-prediction, and explicitly prompting self-prediction in reasoning traces does not significantly improve aggregate performance.Source: §6 · p. 9

7 Limitations

The paper’s limitations concern the minimality metric, incomplete analysis of self-prediction, and restricted synthetic datasets. These constraints leave the treatment of invalid counterfactuals, self-prediction mechanisms, and real-world generalisation unresolved.

Alternative minimality metrics

  • Mean excess distance measures minimality for valid SCEs but does not characterize invalid SCEs or how far they lie from the decision boundary.Source: §7 · p. 10

Self-prediction capabilities

  • The study does not analyze self-prediction accuracy in detail or establish whether LLMs are fundamentally capable of accurate self-prediction.Source: §7 · p. 10
  • The mechanisms by which models might achieve self-prediction remain unexamined, leaving prompted or fine-tuned self-prediction as a future research question.Source: §7 · p. 10

Generalisation to real-world datasets

  • Experiments use three synthetic datasets with only two to four input dimensions, so generalisation to more complex, higher-dimensional real-world data is unresolved.Source: §7 · p. 10

A Main experiment implementation details

The experiments use complete synthetic tabular datasets, several LLMs, and a two-stage prediction/SCE pipeline. Model predictions over every instance define decision boundaries used to evaluate counterfactual validity and minimality.

Datasets

  • Each synthetic dataset contains every combination of its discrete feature values, completely representing the input space for exact boundary evaluation.Source: §A.1 · p. 12
  • The tasks cover income, house prices, and heart disease using discrete tabular features and binary prediction targets.Source: §A.1 · pp. 12–13
  • The heart-disease dataset contains 1,936 distinct instances formed from 11 × 2 × 8 × 11 feature-value combinations.Source: §A.1 · p. 13

Models and execution

  • The experiments evaluate open and proprietary LLMs, with most models run at temperature 0 and o3 at its fixed temperature of 1.Source: §A.2 · p. 13

Experimental pipeline

  • The pipeline first collects predictions for every dataset instance, then prompts each model to generate an SCE that should produce the complementary class.Source: §A.3 · p. 13

A.4 Evaluation metrics

The evaluation measures whether self-generated counterfactual explanations change predictions and how close they are to the smallest prediction-flipping change. Gower’s Distance provides the main minimality measure over the tabular datasets.

  • Validity measures whether a revised input produces the intended target prediction when evaluated by a new model instance.Source: §A.4 · p. 13
  • Minimality is evaluated with Gower’s Distance, which compares tabular instances feature by feature.Source: §A.4 · p. 13
  • Gower’s Distance uses non-negative feature weights and supports binary, continuous, and ordinal variables.Source: §A.4 · p. 13
  • Because the datasets use numerical, binary, or rank-converted ordinal features, Gower’s Distance simplifies to normalized feature differences.Source: §A.4 · p. 13
  • The resulting distance averages per-feature differences normalized by feature range, ranging from 0 for identical instances to 1 for maximally different instances.Source: §A.4 · p. 16

B.1 Full result tables

The main experiment reports validity and excess distance for self-generated counterfactual explanations, alongside analyses of alternative distance functions and prompt perturbations. The supplied results describe the evaluation scope but do not provide the table’s cell values.

  • Table 6 reports average validity and excess distance for the main experiment at temperature 0.0.Source: §B.1 · p. 16, Table 6 · p. 17
  • The analysis compares Llama 3.3 70B’s results under multiple distance functions, including L1, L2, and cosine distance.Source: §C.1 · pp. 16–17
  • The cosine distance compares embeddings of templated tabular inputs using one minus cosine similarity.Source: §C.1 · p. 17
  • The prompt-perturbation experiment generated 20 versions of the SCE-eliciting prompt and evaluated changes in Llama 3.3 70B’s behavior.Source: §C.2 · p. 17

C.3 Results at temperature 1.0

At temperature 1.0, aggregate SCE results differ little from the corresponding evaluation, while models generally struggle to combine validity with minimality. A separate validation task tests whether models can identify the closest point under Gower’s Distance.

  • At temperature 1.0, aggregate results show minimal differences, consistent with an earlier experiment by Dehghanighobadi et al. (2025).Source: §C.3 · p. 17
  • The decision-boundary consistency experiment generated 50 income-task prompt perturbations using OpenAI’s o3.Source: §D.1 · p. 17
  • The Gower-distance validation baseline asks models to select the closest house-price instance among four alternatives.Source: §D.2 · p. 18
  • Accuracy is measured over 1000 trials against the implementation of Gower’s Distance, with random-choice accuracy equal to 25%.Source: §D.2 · p. 18
  • DeepSeek-R1 70B’s reasoning trace suggests that it misunderstands the self-explanation task and does not explicitly self-predict in its chain-of-thought.Source: §D.3 · p. 18

E Incentivising models to self-predict

The self-prediction ablation prompts models through repeated candidate generation, self-prediction, evaluation, revision, and selection. Despite following this procedure in context, aggregate performance changes little and self-predictions are often wrong.

E Incentivising models to self-predict

Loading 2509.09396v1…