FCx: An algorithm for finding Feasible Counterfactual Explanations

arXiv cs.LG Papers

Summary

The paper presents FCx, an algorithm for generating feasible counterfactual explanations by using a modified Variational Autoencoder with causal inference to ensure modifications are realistic, low-cost, and compatible with real-world changes.

arXiv:2609.19383v1 Announce Type: new Abstract: Counterfactual (CF) explanations identify changes that alter an input's classification. While existing methods produce realistic and low-cost CFs, they often fail to ensure feasibility, by suggesting non-constructive modifications or incompatible with future changes (e.g., changing an individual's race to secure a job offer). We introduce a refinement of CF explanations that explicitly enforces feasibility. Our approach is the first to efficiently generate CFs that are realistic, low-cost and feasible. We accommodate both hard feasible constraints, specified by domain knowledge users, and soft feasible constraints, inferred automatically via causal inference from the dataset. Our method, Feasible Counterfactual Explanations (FCx), is based on a modified Variational Autoencoder (VAE) optimized with a multi-factor loss function. We measure the cost of a change based on the absolute change in values (proximity) as well as the number of features changed (sparsity) while realism is measured based on the LOF for density estimation, guaranteeing that CFs reside in densely populated regions. Extensive experiments on four public datasets show that our approach matches state-of-the-art performance across multiple metrics while guaranteeing feasibility.
Original Article
View Cached Full Text

Cached at: 09/18/26, 08:54 AM

# FCx: An algorithm for finding Feasible Counterfactual Explanations
Source: [https://arxiv.org/html/2609.19383](https://arxiv.org/html/2609.19383)
Markou Kleopatraemail:[klmark@di\.uoa\.gr](mailto:[email protected])Affiliation:National and Kapodistrian University of Athens,,Department of Informatics and Telecommunications,Athens,GreeceVana KalogerakiAffiliation:Athens University of Economics and Business,,Department of Informatics,Athens,Greeceemail:[vana@aueb\.gr](mailto:[email protected])andGunopulos Dimitriosemail:[dg@di\.uoa\.gr](mailto:[email protected])Affiliation:National and Kapodistrian University of Athens,,Department of Informatics and Telecommunications,Athens,Greece

© none

###### Abstract\.

Counterfactual \(CF\) explanations identify changes that alter an input’s classification\. While existing methods produce realistic and low\-cost CFs, they often fail to ensure feasibility, by suggesting non\-constructive modifications or incompatible with future changes \(e\.g\., changing an individual’s race to secure a job offer\)\. We introduce a refinement of CF explanations that explicitly enforces feasibility\. Our approach is the first to efficiently generate CFs that are realistic, low\-cost and feasible\. We accommodate both hard feasible constraints, specified by domain knowledge users, and soft feasible constraints, inferred automatically via causal inference from the dataset\. Our method,Feasible Counterfactual Explanations \(FCx\), is based on a modified Variational Autoencoder \(VAE\) optimized with a multi\-factor loss function\. We measure the cost of a change based on the absolute change in values \(proximity\) as well as the number of features changed \(sparsity\) while realism is measured based on the LOF for density estimation, guaranteeing that CFs reside in densely populated regions\. Extensive experiments on four public datasets show that our approach matches state\-of\-the\-art performance across multiple metrics while guaranteeing feasibility\.

###### Keywords:

Feasibility, Counterfactual Explanations, Sparsity, Density Estimation, Causality

## 1\.Introduction

Understanding predicted output is a crucial element of any Machine Learning \(ML\) model\. Researchers often question whether a model’s predictions are interpretable and applicable to real\-world scenarios\. In various fields, including criminal justice\([Dressel and Farid, 2018](https://arxiv.org/html/2609.19383#bib.bib2)\), clinical healthcare\([Cresswell et al\., 2017](https://arxiv.org/html/2609.19383#bib.bib24)\), loan approvals, and hiring decisions, the ability of a system to provide a valid explanation is essential for guiding future actions\. In addition,\([Wachter et al\., 2018](https://arxiv.org/html/2609.19383#bib.bib14)\)displays in detail the legal rights that an individual has, regarding an explanation over the output, since its personal data has been used in similar occasions\. Given these considerations, it is crucial to make ML models more interpretable and provide individuals with actionable insights on how to achieve a desired prediction outcome\([Miller, 2019](https://arxiv.org/html/2609.19383#bib.bib1)\)\. Counterfactual \(CF\) explanations\([Wachter et al\., 2018](https://arxiv.org/html/2609.19383#bib.bib14)\)serve as a widely used form of local explanations, as they align with the ML model while remaining interpretable\. A local CF explanation refers to minor perturbations in the input features that remain close to the original instance but result in a different model prediction\.

A commonly used example to explain this concept answers the question, "What changes should an individual make to qualify for a loan that is currently denied?" Any potential modification that shifts the model’s decision from the original class to the desired one is considered a CF example\. Figure[1](https://arxiv.org/html/2609.19383#S1.F1)presents a visual illustration of two counterfactual examples, both of which are technically valid; however, their classification as feasible or infeasible is determined by the extent to which they satisfy the predefined constraints of the model\.

![Refer to caption](https://arxiv.org/html/2609.19383v1/counterfactual_definition4.png)Figure 1\.Illustrative example of possible Counterfactual Explanations feasible and infeasibleHowever, there are several questions arisen regarding these examples\. Are actually all these modifications applicable to the real world? Are all CF explanations easily adaptable to real\-world applications? The answer is negative to these questions\. A Machine Learning model can learn from data distributions to recognize patterns and try to imitate them, but it lacks logic\. Its produced results cannot apply to a multifactorial real\-world scenario\. Therefore, it is quite common to see CF examples suggesting unachievable goals \(see Figure[1](https://arxiv.org/html/2609.19383#S1.F1)\)\. For example, a hiring application would propose to a candidate to obtain a degree in a two\-month period or extreme cases become younger to get a particular job, while both suggestions are infeasible and useless to the user\. Resolving feasibility is essential because counterfactual explanations are often interpreted as practical guidance on how to achieve a desired outcome \(e\.g\., securing future loan approval\)\. When counterfactuals are unattainable or depend on model behavior in sparse, unreliable regions of the feature space, they can mislead and in some cases even offend those who receive them, undermining trust and reducing their real\-world usefulness\([Poyiadzi et al\., 2020](https://arxiv.org/html/2609.19383#bib.bib15);[Mothilal et al\., 2020](https://arxiv.org/html/2609.19383#bib.bib13);[Verma et al\., 2024](https://arxiv.org/html/2609.19383#bib.bib4)\)\.

We approachfeasibilityby enforcing constraints that promote \(i\) real\-world applicability, \(ii\) realism, and \(iii\) consistency with causal constraints among features, thereby yielding counterfactual scenarios that are both valid and meaningful\. There are two primary approaches to formulating such constraints\. First, domain experts can provide prior knowledge to establish logical constraints manually\([Mahajan et al\., 2019](https://arxiv.org/html/2609.19383#bib.bib9)\)\(hard causal feasibility constraints\)\. Second, causal discovery algorithms can be used to identify existing dependencies within a dataset, enabling the construction of a full or partial causal graph \(soft causal feasibility constraints\)\. In this work, we introduce a straightforward methodology that effectively generates CF examples while ensuring compliance with both types of causal constraints\.

A CF example may be potentially feasible but unlikable based on the probability distribution that we have seen\. It is important to provide CF examples that are highly probable to reside in densely populated regions\. So, to make our model robust, in addition to feasibility, we employed other criteria that can be used to determine whether we are going to select a CF example or not\. In our work, we use a statistical state\-of\-the\-art technique that helps us first estimate the density of the latent space and then learn to generate CF examples in these dense regions eliminating outliers\. Figure[2](https://arxiv.org/html/2609.19383#S1.F2)demonstrates one of our goals, the identification of dense regions where it is more likely a point to be a feasible CF example\. Our network is trained to generate CFs examples in densely populated regions \(grey area\) and to exclude the outliers\. Theorangedots represent the feasible CF examples, thebluedots represent the infeasible CF examples and thegreendots are the outliers, respectively\. This technique can strengthen the probability of finding feasible CF examples when they learn to be located in much more dense regions, rather than being spread in the entire space\. We chose to use the density\-based LOF technique\([Breunig et al\., 2000](https://arxiv.org/html/2609.19383#bib.bib19)\)to eliminate CF outliers\. We apply the technique in the lower dimensionality latent spacezzof a Variational Autoencoder model\([Kingma and Welling, 2013](https://arxiv.org/html/2609.19383#bib.bib7)\)because density based techniques work better in lower dimensionality spaces\. Intuitively, our goal is to produce CF examples that are likely to be real examples and be located in dense regions with examples\. This is achieved after training the VAE and formulating its loss function to satisfy our desiderata\.

![Refer to caption](https://arxiv.org/html/2609.19383v1/counterfactual_density.png)Figure 2\.Illustrative example that depicts the existence of outlier CF examples outside densely populated regionsCounterfactual \(CF\) explanations must offer individualsactionablealternatives, helping them navigate toward solutions tailored to real\-world occasions\. However, an important consideration is determining the point at which a solution becomes impractical due to excessive modifications\. Users typically prefer achieving their desired outcome with minimal adjustments\. This highlights the need for a metric that quantifies the number of changes required\.

To address this, we incorporate a sparsity constraint into our methodology, improving the model’s robustness while reducing unnecessary alterations\([Virgolin and Fracaros, 2023](https://arxiv.org/html/2609.19383#bib.bib6)\)\. As illustrated in Figure[3](https://arxiv.org/html/2609.19383#S1.F3), three feasible CF examples suggest different ways an individual could qualify for a loan\. The most desirable CF example is the one that requires the fewest modifications \(represented by the orange dot, highlighted with a blue dashed line\)\. In this work, we introduce sparsity as a guiding principle, enabling the model to generate CF explanations that minimize the cost of achieving the desired outcome\.

![Refer to caption](https://arxiv.org/html/2609.19383v1/counterfactual_sparsity.png)Figure 3\.Illustrative example of possible reconstructed feasible suggestions with a preference \(bold dashed arrow\) to the one with the least amount of changes for the end\-userFinally, in this paper, our main contributions can be summarized as follows:

- •We introduce Feasible Counterfactual Explanations \(FCx\), a novel approach to generate counterfactual efficiently \(CF\) explanations that ensure realism, low\-cost modifications and feasibility, incorporating both hard feasibility constraints \(from domain knowledge\) and soft feasibility constraints \(inferred via causal inference\)\.
- •We incorporate sparsity into our model, aiming for low\-cost modifications through the fewest possible changes when generating CF examples\.
- •Additionally, we ensured that generated CFs reside in densely populated regions, avoiding unrealistic or outlier cases\. To do that, we used the Local Outlier Factor \(LOF\) technique in reduced dimensionality space\.
- •FCx manages to effectively integrate diverse elements, such as causal constraints, sparsity, and density\-based validation, to adapt to varying dataset characteristics and ensure the generation of realistic and feasible counterfactual examples\.

## 2\.Related work

The research surrounding explainable machine learning \(XAI\) has grown vastly these past years\([Bodria et al\., 2023](https://arxiv.org/html/2609.19383#bib.bib3);[Verma et al\., 2024](https://arxiv.org/html/2609.19383#bib.bib4);[Karimi et al\., 2021](https://arxiv.org/html/2609.19383#bib.bib5);[Dhurandhar et al\., 2018](https://arxiv.org/html/2609.19383#bib.bib12);[Mothilal et al\., 2020](https://arxiv.org/html/2609.19383#bib.bib13);[Joshi et al\., 2019](https://arxiv.org/html/2609.19383#bib.bib10);[Pawelczyk et al\., 2020](https://arxiv.org/html/2609.19383#bib.bib11);[Mahajan et al\., 2019](https://arxiv.org/html/2609.19383#bib.bib9);[Wang et al\., 2023](https://arxiv.org/html/2609.19383#bib.bib22);[Salimi et al\., 2023](https://arxiv.org/html/2609.19383#bib.bib26)\), with counterfactual \(CF\) examples receiving significant attention\.\([Verma et al\., 2024](https://arxiv.org/html/2609.19383#bib.bib4)\)provides a comprehensive review of the algorithmic diversity in this field, identifying existing gaps and outlining future research directions\. Additionally,\([Karimi et al\., 2021](https://arxiv.org/html/2609.19383#bib.bib5)\)presents a collection of methods focused on algorithmic recourse, which aims to systematically reverse unfavorable algorithmic decisions by offering explanations and actionable recommendations for affected individuals\.

Some approaches move beyond traditional supervised learning techniques and incorporate self\-supervised methods\. For instance,\([Dhurandhar et al\., 2018](https://arxiv.org/html/2609.19383#bib.bib12)\)employs contrastive learning to justify black\-box classifier predictions\. Other studies explore different aspects of CF explanations:\([Mothilal et al\., 2020](https://arxiv.org/html/2609.19383#bib.bib13)\)emphasizes on the diversity of CF examples and has been implemented as a Python library for generating them, while\([Joshi et al\., 2019](https://arxiv.org/html/2609.19383#bib.bib10)\)focuses on producing actionable CF examples by minimizing the number of required changes\. The work in\([Pawelczyk et al\., 2020](https://arxiv.org/html/2609.19383#bib.bib11)\)highlights the importance of faithfulness in CF explanations by balancing proximity \(ensuring CF examples are not local outliers\) and connectedness \(ensuring CFs remain close to valid input values\)\. Similarly,\([Mahajan et al\., 2019](https://arxiv.org/html/2609.19383#bib.bib9)\)prioritizes feasibility by leveraging structural causal models\.

Further contributions include\([Rugolon et al\., 2023](https://arxiv.org/html/2609.19383#bib.bib21)\), which evaluates CF explanations based on sparsity and LOF\. Sparsity measures the minimal changes required for a patient to achieve a positive outcome, while LOF assesses whether the generated CF remains close to the data distribution of the desired class\. Feasibility on synthetic and image datasets is investigated by\([Poyiadzi et al\., 2020](https://arxiv.org/html/2609.19383#bib.bib15)\), which leverages high\-density paths within the data manifold to propose achievable and realistic counterfactual changes\. Additionally, feasibility is studied at both the population and individual levels:\([Fragkathoulas et al\., 2026](https://arxiv.org/html/2609.19383#bib.bib27)\)generates feasible group/subgroup counterfactuals for fairness auditing, while\([Bove et al\., 2023](https://arxiv.org/html/2609.19383#bib.bib28)\)examine how to present multiple feasible counterfactual options for a single instance\.

More recent works have further explored generative and causality\-aware mechanisms for producing realistic and feasible CF explanations\. In\([Hellemans et al\., 2025](https://arxiv.org/html/2609.19383#bib.bib30)\), the authors introduce FCEGAN, a generative framework based on counterfactual templates that allows users to specify mutable features at inference time, enabling flexible CF generation under user\-defined constraints\. Similarly,\([Guyomard et al\., 2026](https://arxiv.org/html/2609.19383#bib.bib29)\)proposes VCNet and ImmutableVCNet to generate realistic class\-consistent CFs using conditional variational autoencoders, while\([Crupi et al\., 2024](https://arxiv.org/html/2609.19383#bib.bib31)\)formulates CF explanations as interventions in latent space in order to incorporate causal relations and provide feasible recommendations\.

## 3\.Problem Definition

In this section, we provide an in depth presentation of our problem definition, followed by the basic components of our model\.

Let𝐱∈ℝd\\mathbf\{x\}\\in\\mathbb\{R\}^\{d\},y∈\{0,1\}y\\in\\\{0,1\\\}represent the input data point withddfeatures andyythe input class\. Given an example\(𝐱\)\(\\mathbf\{x\}\)and a target classy′y\\primewe would like to generate a CF example to minimize the following:

\(1\)minxc​f∈𝒞⁡Dist⁡\(x,xc​f\)\+∑\(p,q\)∈𝒞Penalty\_h​\(xpc​f,xqc​f\)\+\\displaystyle\\operatorname\{min\}\_\{x^\{cf\}\\in\\mathcal\{C\}\}\\operatorname\{Dist\}\(x,x^\{cf\}\)\+\\sum\_\{\(p,q\)\\in\\mathcal\{C\}\}\\text\{Penalty\\\_h\}\\left\(x^\{cf\}\_\{p\},x^\{cf\}\_\{q\}\\right\)\+\+∑\(p,q\)∈𝒞Penalty\_s\(xc​fp,xc​fq\)\+\\displaystyle\+\\sum\_\{\(p,q\)\\in\\mathcal\{C\}\}\\text\{Penalty\\\_s\}\\left\(x^\{cf\}\_\{p\},x^\{cf\}\_\{q\}\\right\)\+\+‖𝐱c​f−𝐱‖0\+\\displaystyle\+\\left\\\|\\mathbf\{x\}^\{cf\}\-\\mathbf\{x\}\\right\\\|\_\{0\}\+\+LOF​\(xc​f\)\\displaystyle\+\\text\{LOF\}\(x^\{cf\}\)
such thath\(xc​f\)=y′h\(x^\{cf\}\)=y\\prime, wherehhrefers to a trained classifier andh⁡\(xc​f\)h\(x^\{cf\}\)indicates the predicted class of the cf example\.

Breaking down the components of the Equation[1](https://arxiv.org/html/2609.19383#S3.E1), we have:

- •D​i​s​t\\text\{D\}istthat refers to a distance measurement such asL​1/L​2L1/L2distance
- •𝒞\\mathcal\{C\}is a set of causal relationships between pairs of features with\(p,q\)∈𝒞\(p,q\)\\in\\mathcal\{C\}represents a directed relationship betweenxp⟶xqx\_\{p\}\\longrightarrow x\_\{q\}
- •xpc​fx^\{cf\}\_\{p\}andxqc​fx^\{cf\}\_\{q\}are the cf values of the featuresppandqq, respectively,
- •Penalty\_h​\(xpc​f,xqc​f\)\\text\{Penalty\\\_h\}\(x^\{cf\}\_\{p\},x^\{cf\}\_\{q\}\)that measures how much the valuesxpc​fx^\{cf\}\_\{p\}andxqc​fx^\{cf\}\_\{q\}violate the hard causal relationship between them
- •given an adjacency matrixAAextracted from a causal graph which depicts the relationships between features in a dataset, there is aPenalty\_s​\(xpc​f,xqc​f\)\\text\{Penalty\\\_s\}\(x^\{cf\}\_\{p\},x^\{cf\}\_\{q\}\)which encourages zero covariance between non\-connected pairs of features and non\-zero covariance for connected ones, to measure every soft causal relationship between features
- •‖𝐱c​f−𝐱‖0\\left\\\|\\mathbf\{x\}^\{cf\}\-\\mathbf\{x\}\\right\\\|\_\{0\}which penalizes the number of feature changes
- •LOF​\(xc​f\)\\text\{LOF\}\(x^\{cf\}\)which encouragesxc​fx^\{cf\}to be in a dense region of a data distribution where LOF indicating how isolatedxc​fx^\{cf\}is from high\-density regions\.

### 3\.1\.Feasibility and Density estimation

Feasibility is the most critical aspect of our model, with various components from the previous problem definition \(see Section[3](https://arxiv.org/html/2609.19383#S3)\) contributing to its formulation\. We consider a CF example feasible when the following definition is satisfied\.

###### Definition 3\.1\.

Feasibility: Let the \(𝐱\\mathbf\{x\},yy\) be the input features and the predicted outcome of the model andy​’y\\textquoterightbe the desired output class\. We can define a CF example \(xc​fx^\{cf\},yc​fy^\{cf\}\) asfeasible, if the desired classy​’y\\textquoterightis equal to theyc​fy^\{cf\}output, the changes fromxxtox​’x\\textquoteright, satisfies all constraints provided by domain knowledge and all variables that conduct acausal model\(i\.e\. a structure that depicts all possible relations between the variables of a dataset\), lie within the input domain\([Mahajan et al\., 2019](https://arxiv.org/html/2609.19383#bib.bib9)\)\.

What if a CF example can be characterized as feasible according to the previous Definition 3\.1, following every condition that is proposed \(distance, validity and the hard causal constraints\), but is located far from other CF points in the example space? Certainly, there will be such points\. Our model tries to eliminate such points considering them as outliers\. That’s because these points are located outside the identified dense regions and consequently the probability of them being feasible is more likely to be significantly smaller\.

To efficiently eliminate such outlier CF examples and identify more densely populated regions, we use a state\-of\-the\-art density\-based outlier detection technique, specifically the statistical LOF and we used it both as a learnable parameter and as a metric\. For completeness, we include the definition of LOF provided by\([Breunig et al\., 2000](https://arxiv.org/html/2609.19383#bib.bib19)\)\.

###### Definition 3\.2\.

Local Outlier Factor: is a density\-based technique that uses the nearest neighbor search to identify the anomalous points\([Belyadi and Haghighat, 2021](https://arxiv.org/html/2609.19383#bib.bib20)\)\. The advantage of using LOF is identifying points that are outliers relative to a local cluster of points\. For instance, when using the LOF technique, neighbors of a certain point are identified and compared against the density of the neighboring points\. So, given a set of points in the counterfactual spaceXc​f=\{xc​f​1,xc​f​2,…,xc​f​n\}X^\{cf\}=\\left\\\{x^\{cf1\},x^\{cf2\},\\ldots,x^\{cfn\}\\right\\\}, we compute the pairwise Euclidean distances between all points in the set and then apply the KNN method to find the k\-nearest neighbors for each point\. Based on this KNN distances we calculate theReachability distance\(rd\), as denoted in Equation[2](https://arxiv.org/html/2609.19383#S3.E2)below:

\(2\)rdk⁡\(xc​f​i,xc​f​j\)=max⁡\(dist⁡\(xc​f​i,xc​f​j\),k​\-dist​\(xc​f​j\)\)\{\\operatorname\{rd\}\_\{k\}\\left\(x^\{cfi\},x^\{cfj\}\\right\)\}=\\max\\left\(\\operatorname\{dist\}\\left\(x^\{cfi\},x^\{cfj\}\\right\),\\mathrm\{k\}\\text\{\-dist\}\\left\(x^\{cfj\}\\right\)\\right\)
wherek​\-dist​\(xc​f​j\)\\mathrm\{k\}\\text\{\-dist\}\(x^\{cfj\}\)is the distance fromxc​f​jx^\{cfj\}to the k\-thnearest neighbor\. So, theLocal Reachability Density \(LRD\)is formed as follows in Equation[3](https://arxiv.org/html/2609.19383#S3.E3)and computes the local reachability density for each point\.

\(3\)LRDk⁡\(xc​f​i\)=\(∑xc​f​j​knn∈\(xc​f​i\)rdk⁡\(xc​f​i,xc​f​j\)k\)−1\\operatorname\{LRD\}\_\{k\}\\left\(x^\{cfi\}\\right\)=\\left\(\\frac\{\\sum\_\{x^\{cfj\}\\operatorname\{knn\}\\in\\left\(x^\{cfi\}\\right\)\}\\operatorname\{rd\}\_\{k\}\\left\(x^\{cfi\},x^\{cfj\}\\right\)\}\{k\}\\right\)^\{\-1\}
Given the LRD, the LOF is formed as denoted in Equation[4](https://arxiv.org/html/2609.19383#S3.E4)and is defined as the average ratio of the local reachability density ofxc​f​ix^\{cfi\}to those of its k\-nearest neighbors\.

\(4\)LOFk⁡\(xc​f​i\)=∑xc​f​j∈knn⁡\(xc​f​i\)LRDk⁡\(xc​f​j\)LRDk⁡\(xc​f​i\)k\\operatorname\{LOF\}\_\{k\}\\left\(x^\{cfi\}\\right\)=\\frac\{\\sum\_\{x^\{cfj\}\\in\\operatorname\{knn\}\\left\(x^\{cfi\}\\right\)\}\\frac\{\\operatorname\{LRD\}\_\{k\}\\left\(x^\{cfj\}\\right\)\}\{\\operatorname\{LRD\}\_\{k\}\\left\(x^\{cfi\}\\right\)\}\}\{k\}
Finally, our goal is to achieve LOF≈1\\approx 1, which can be translated into dense regions with normal points, while LOF≫1\\gg 1indicates the existence of outliers\.

### 3\.2\.Hard Causal constraints

Suppose we establish constraints to define the feasibility of a counterfactual \(CF\) example by leveraging a causal model or fundamental domain knowledge specific to a dataset and its attributes\. For instance, in the context of loan applications, if individuals must adjust certain factors to qualify, a CF example that reduces the "age" attribute would be characterized as unrealistic\. This is because it contradicts the causal rule that age can only increase over time\([Mahajan et al\., 2019](https://arxiv.org/html/2609.19383#bib.bib9)\)\.

To make our approach adaptable to various objectives, we rely on logical constraints derived from basic domain knowledge\. To establish a foundational framework, we first developed a simpler model using a single attribute to define theUnary Constraint Model\(FCx\-U\), as represented in Equation[5](https://arxiv.org/html/2609.19383#S3.E5)\. This allowed us to validate the functionality of the model\. Furthermore, we created paired attribute combinations that could form logical constraints \(constraints from pairs that directly influence each other with no exceptional rules\), leading to the development of theBinary Constraint Model\(FCx\-B\), as illustrated in Equation[6](https://arxiv.org/html/2609.19383#S3.E6)\.

We use the Adult dataset\([Becker and Kohavi, 1996](https://arxiv.org/html/2609.19383#bib.bib16)\), which is thoroughly described in Section[5\.1](https://arxiv.org/html/2609.19383#S5.SS1)to form an illustrative example\. This dataset includes attributes such asageandeducationwhich logically form the following constraint\. If an individual attains a higher level of education, their age should also be greater\. Based on this reasoning, we introduce Equations[5](https://arxiv.org/html/2609.19383#S3.E5)and[6](https://arxiv.org/html/2609.19383#S3.E6)into our feasibility evaluation model, enabling it to learn and preserve these constraints\.

\(5\)xagec​f≥xagex\_\{\\text\{age\}\}^\{cf\}\\geq x\_\{\\text\{age\}\}
\(6\)\(xe​dc​f\>xe​d⟹xagec​f\>xage\)​AND\(xe​dc​f=xe​d⟹xagec​f≥xage\)\\begin\{array\}\[\]\{l\}\\left\(x\_\{ed\}^\{cf\}\>x\_\{ed\}\\Longrightarrow x\_\{\\text\{age\}\}^\{cf\}\>x\_\{\\text\{age \}\}\\right\)\\text\{ AND \}\\\\ \\left\(x\_\{ed\}^\{cf\}=x\_\{ed\}\\Longrightarrow x\_\{\\text\{age\}\}^\{cf\}\\geq x\_\{\\text\{age\}\}\\right\)\\end\{array\}

### 3\.3\.Soft Causal constraints

Are we satisfied using only hard causal constraints to maintain feasibility? The answer is no\. That’s because we only look at specific pairs of features whose relationship if violated will automatically lead to infeasible CF examples\.

For this reason and after a series of experimentation on causal discovery techniques, we applied an intuitive method to introduce automatically extracted soft causal relationships, incorporating all possible pair\-wise relations among every feature in a dataset\. We employed PC\-Algorithm\([Spirtes et al\., 2001](https://arxiv.org/html/2609.19383#bib.bib18)\)before training, a causal discovery algorithm that met our criteria, to extract a Directed Acyclic Graph \(DAG\) from our data\. In detail, the PC\-Algorithm is a constrained\-based method that extracts a DAG by testing conditional independencies between features\. It first builds an undirected graph by removing edges based on statistical tests \(skeleton\), then orients the remaining ones to guarantee acyclicity and identify causal directions wherever possible\.

So, letGGbe the causal graph andA∈\{0,1\}d×dA\\in\\\{0,1\\\}^\{d\{\\times\}d\}be derived fromGG, whereAp,q=1A\_\{p,q\}=1indicates a directed causal influence from featureYpY\_\{p\}to featureYqY\_\{q\}andAp,q=0A\_\{p,q\}=0indicate that there is no directed causal influence fromYpY\_\{p\}toYqY\_\{q\}\. All existing and non\-existing feature relations inAA, extracted from the graphGGwill form the soft causal constraints for our model\.

This procedure will be described in detail in the loss function section below\.

### 3\.4\.Sparsity

An important aspect regarding the effectiveness of a CF explanation issparsity\. When generating a CF example, we aim to modify the fewest possible features, to make the explanation more interpretable for the end\-user and simultaneously guide the CF example to alter its class \(see Figure[3](https://arxiv.org/html/2609.19383#S1.F3)\)\([Virgolin and Fracaros, 2023](https://arxiv.org/html/2609.19383#bib.bib6)\)\.

Given a feature vector𝐱=\(x1,x2,…,xd\)\\mathbf\{x\}=\(x\_\{1\},x\_\{2\},\.\.\.,x\_\{d\}\)and its corresponding CF example𝐱c​f=\(x1c​f,x2c​f,…,xdc​f\)\{\\mathbf\{x\}^\{cf\}\}=\(x\_\{1\}^\{cf\},x\_\{2\}^\{cf\},\.\.\.,x\_\{d\}^\{cf\}\), we define sparsity in Equation[7](https://arxiv.org/html/2609.19383#S3.E7)as the total number of features that changed :

\(7\)S⁡\(𝐱,𝐱c​f\)=∑p=1d1​\(xp≠xpc​f\)S\\left\(\\mathbf\{x\},\\mathbf\{x\}^\{cf\}\\right\)=\\sum\_\{p=1\}^\{d\}1\\left\(x\_\{p\}\\neq x\_\{p\}^\{cf\}\\right\)where1​\(xp≠xpc​f\)1\\left\(x\_\{p\}\\neq x\_\{p\}^\{cf\}\\right\)is an indicator function that equals to11ifxpx\_\{p\}is modified and00otherwise\. Our goal is to minimizeS⁡\(𝐱,𝐱c​f\)S\\left\(\\mathbf\{x\},\\mathbf\{x\}^\{cf\}\\right\)\.

## 4\.Our Approach

In this section, we provide an in\-depth description of the proposed FCx framework, detailing the architecture of the VAE\-based counterfactual generator, its interaction with the pretrained black\-box classifier, the training algorithm, and the composite loss function used to guide the generation of feasible, valid, sparse, causally coherent and distributionally plausible counterfactual explanations\.

### 4\.1\.Architecture

In this section, we provide a high\-level overview of our feasibility model architecture, as illustrated in Figure[4](https://arxiv.org/html/2609.19383#S4.F4)as well as the algorithm of our training procedure\. During training, input valuesXXare inserted into the encoder of a Variational Autoencoder \(VAE\)\([Kingma and Welling, 2013](https://arxiv.org/html/2609.19383#bib.bib7)\), which generates a lower\-dimensional latent space representation\. The decoder then attempts to reconstruct each input back to its original size, ensuring that every output serves as a counterfactual \(CF\) example\.

![Refer to caption](https://arxiv.org/html/2609.19383v1/method_s_causal2.drawio.png)Figure 4\.Overview of the FCx ArchitectureTo guide the network in generating CFs examples that satisfy our main key criteria: proximity, validity, feasibility, sparsity, and density, a seven\-part loss function is applied at each training epoch\. The black\-box model is used to predict the class of both the input and generated CF example, and it also contributes to the validity loss computation\. A more detailed breakdown of the VAE’s architecture will be provided in Section[5\.2](https://arxiv.org/html/2609.19383#S5.SS2), along with Figure[5](https://arxiv.org/html/2609.19383#S5.F5)\.

Initially, we train a black\-box model, consisting of two linear layers, to classify input and output data points into two distinct classes\. This gurantees compliance with the definition of a counterfactual \(CF\) example, where each input is paired with its desired \(opposite\) class\. The output from this stage of the architecture is later incorporated into the validity loss function, serving as a pretrained model to accurately predict the correct class\.

As a second and final step of our model, we utilize a Variational Autoencoder \(VAE\) to generate feasible CF examples\. Our main goal is to create feasible CF examples from the input data points by satisfying both hard and soft causal constraints\. For this reason, the VAE’s encoder, which works as a bottleneck, is trained with heterogeneous dataXXand produces a low\- dimensional representation of them in latent spacezz\. Finally, the output ofzzmust be reconstructed to its original dimensions in the decoder part of the VAE\.

Our model was trained with a multifactorial loss function, which will be described in detail in the next section\.

### 4\.2\.Loss function

For the training of the VAE, we created a loss function that includes the main components from the problem definition defined in Section[3](https://arxiv.org/html/2609.19383#S3)\. Our loss function consists of seven parts in total, a KL\- Divergence loss for the regularization of the latent space of the VAE, a proximal distance loss, a classification \(validity\) loss, a two part causal constraints loss, hard and soft, sparsity and LOF losses\.

Starting with the Equation[8](https://arxiv.org/html/2609.19383#S4.E8)where the HingeLoss guarantees that the classifierhhassigns CF examples to the correct class withβ\\betabeing a hyperparameter from a margin\. The second term of this equation measures the proximity loss, which is a distance function\(L​1/L​2\)\(L1/L2\)that ensures that the generated CF example remains proximal to the original input\.

\(8\)argminxc​f⁡HingeLoss⁡\(h⁡\(xc​f\),y′,β\)\+d⁡\(x,xc​f\)\\operatorname\{argmin\}\_\{x^\{cf\}\}\\operatorname\{HingeLoss\}\\left\(h\\left\(x^\{cf\}\\right\),y^\{\\prime\},\\beta\\right\)\+d\(x,x^\{cf\}\)Since we are using a VAE \(an encoder that maps the input features into a latent space and a decoder to reconstruct the CF example from the encoder’s representation\), we need a KL\-Divergence loss to assure that the learned conditioned distribution remains close to a standard Gaussian priorN⁡\(0,I\)N\(0,I\), working as a regularizer of the model to ensure a smooth latent space, denoted as:

\(9\)KL\(Q\(z∣x,y′\)∥P\(z∣y′,x\)\)\\operatorname\{KL\}\\left\(Q\\left\(z\\mid x,y^\{\\prime\}\\right\)\\\|P\\left\(z\\mid y^\{\\prime\},x\\right\)\\right\)\. As for the hard causal constraints, we usem​a​x​\(0,x−xc​f\)max\(0,x\-x^\{cf\}\)term for the unary constraint, wherexpx\_\{p\}denotes the featureppof input x andm​a​x​\(0,\(xqx​f−xq\)−α−β⁡\(xpc​f−xp\)−m​i​n​\(0,β\)\)max\(0,\(x\_\{q\}^\{xf\}\-x\_\{q\}\)\-\\alpha\-\\beta\(x\_\{p\}^\{cf\}\-x\_\{p\}\)\-min\(0,\\beta\)\)for the binary one, whereα,β\\alpha,\\betaare adjustable parameters andxqx\_\{q\}denotes the featureqqof inputxx\.

The soft causal constraints can be described as a two\-fold Equation[10](https://arxiv.org/html/2609.19383#S4.E10)below:

\(10\)ℒsoft​\(xc​f\)=λnc​∑\(p,q\)∈ℰc\(Cov⁡\(Yp,Yq\)\)2\+\\displaystyle\\mathcal\{L\}\_\{\\text\{soft\}\}\(x^\{cf\}\)=\\lambda\_\{\\mathrm\{nc\}\}\\sum\_\{\(p,q\)\\in\\mathcal\{E\}^\{c\}\}\\left\(\\operatorname\{Cov\}\\left\(Y\_\{p\},Y\_\{q\}\\right\)\\right\)^\{2\}\+λc​∑\(p,q\)∈ℰ\(max⁡\(0,θ−Cov⁡\(Yp,Yq\)\)\)2\\displaystyle\\lambda\_\{\\mathrm\{c\}\}\\sum\_\{\(p,q\)\\in\\mathcal\{E\}\}\\left\(\\max\\left\(0,\\theta\-\\operatorname\{Cov\}\\left\(Y\_\{p\},Y\_\{q\}\\right\)\\right\)\\right\)^\{2\}
whereℰc\\mathcal\{E\}^\{c\}is a set of all the non\-connected variable pairs\(p,q\)\(p,q\),ℰ\\mathcal\{E\}is the set of all connected ones andθ\\thetabeing a minimum covariance threshold that must be maintained from the connected variables andYYis the adjacency matrix\.

The loss functionℒsparsity=‖𝐱c​f−𝐱‖0\\mathcal\{L\}\_\{\\text\{sparsity\}\}=\\left\\\|\\mathbf\{x\}^\{cf\}\-\\mathbf\{x\}\\right\\\|\_\{0\}, denotes sparsity between the input value and the generated CF example from their features, calculated withL​0/L​1L0/L1norm\.

The final part of the loss function is LOF which is calculated from the mean of the LOF scores for all pointsnnin the latent spacezz, withkkneighbors, as denoted in Equation[11](https://arxiv.org/html/2609.19383#S4.E11)described in Section[3\.1](https://arxiv.org/html/2609.19383#S3.SS1)\.

\(11\)ℒLOF​\(z\)=1n​∑i=1nLOFk⁡\(zc​f​i\)\\mathcal\{L\}\_\{\\text\{LOF\}\}\(z\)=\\frac\{1\}\{n\}\\sum\_\{i=1\}^\{n\}\\operatorname\{LOF\}\_\{k\}\\left\(z^\{cfi\}\\right\)

### 4\.3\.Training algorithm

Our method is formalized in Algorithm[1](https://arxiv.org/html/2609.19383#alg1), which trains a VAE\-based generator for producing feasible counterfactual explanations\. Given an input instance, the generator modifies only the mutable attributes while explicitly preserving immutable features\. Counterfactual candidates are optimized through a composite objective that combines reconstruction\-based proximity, predictive validity toward the target class, sparsity of feature changes, feasibility constraints, causal regularization, latent\-space distributional consistency, and KL regularization\. This encourages the generated counterfactuals to be actionable, causally coherent, close to the original instance, and consistent with the underlying data distribution\.

Algorithm 1Training Feasible Counterfactual Explanations \(FCx\)1:Inputs:Dataset

𝒟\\mathcal\{D\}\(encoded\); pretrained classifier

ff; mutable indices

ℳ\\mathcal\{M\}, immutable indices

ℐ\\mathcal\{I\}; causal adjacency matrix

AA; epochs

EE; batch size

BB; weights

λrec,λval,λfeas,λcausal,λspar,λlof\\lambda\_\{\\mathrm\{rec\}\},\\lambda\_\{\\mathrm\{val\}\},\\lambda\_\{\\mathrm\{feas\}\},\\lambda\_\{\\mathrm\{causal\}\},\\lambda\_\{\\mathrm\{spar\}\},\\lambda\_\{\\mathrm\{lof\}\}; margin

mm\.

2:Outputs:Trained generator parameters

\(ϕ,θ\)\(\\phi,\\theta\)\.

3:Initialize:conditional VAE encoder

qϕ​\(z∣xℳ,y\)q\_\{\\phi\}\(z\\mid x\_\{\\mathcal\{M\}\},y\)and decoder

pθ​\(xℳ′∣z,y\)p\_\{\\theta\}\(x^\{\\prime\}\_\{\\mathcal\{M\}\}\\mid z,y\)
4:for

e←1e\\leftarrow 1to

EEdo

5:for allmini\-batches

X⊂𝒟−X\\subset\\mathcal\{D\}\_\{\-\}of size

BBdo

6:Target label

y←1−arg​max⁡f​\(X\)y\\leftarrow 1\-\\operatorname\*\{arg\\,max\}f\(X\)
7:Sample latent

z∼qϕ​\(z∣Xℳ,y\)z\\sim q\_\{\\phi\}\(z\\mid X\_\{\\mathcal\{M\}\},y\)
8:Decode counterfactual candidates

xℳ′∼pθ\(⋅∣z,y\)x\_\{\\mathcal\{M\}\}^\{\\prime\}\\sim p\_\{\\theta\}\(\\cdot\\mid z,y\)
9:Form full candidate

x′x^\{\\prime\}by enforcing immutables:

xℐ′←Xℐx^\{\\prime\}\_\{\\mathcal\{I\}\}\\leftarrow X\_\{\\mathcal\{I\}\}
10:

Lrec←Proximity​\(x′,X\)L\_\{\\mathrm\{rec\}\}\\leftarrow\\textsc\{Proximity\}\(x^\{\\prime\},X\)
11:

Lval←ValidityHinge​\(f⁡\(x′\),y,m\)L\_\{\\mathrm\{val\}\}\\leftarrow\\textsc\{ValidityHinge\}\(f\(x^\{\\prime\}\),y;m\)
12:

Lcausal←SoftCausalRegularization​\(xℳ′,A\)L\_\{\\mathrm\{causal\}\}\\leftarrow\\textsc\{SoftCausalRegularization\}\(x^\{\\prime\}\_\{\\mathcal\{M\}\},A\)
13:

Lfeas←FeasibilityHardConstraints​\(x′,X\)L\_\{\\mathrm\{feas\}\}\\leftarrow\\textsc\{FeasibilityHardConstraints\}\(x^\{\\prime\},X\)
14:

Lspar←SparsityPenalty​\(x′,X\)L\_\{\\mathrm\{spar\}\}\\leftarrow\\textsc\{SparsityPenalty\}\(x^\{\\prime\},X\)
15:

LKL←KLDivergence​\(qϕ\)L\_\{\\mathrm\{KL\}\}\\leftarrow\\textsc\{KLDivergence\}\(q\_\{\\phi\}\)
16:

Llof←LOFRegularization​\(z\)L\_\{\\mathrm\{lof\}\}\\leftarrow\\textsc\{LOFRegularization\}\(z\)
17:

L←λrec​Lrec\+LKL\+λval​Lval\+λfeas​Lfeas\+λcausal​Lcausal\+λspar​Lspar\+λlof​LlofL\\leftarrow\\lambda\_\{\\mathrm\{rec\}\}\\,L\_\{\\mathrm\{rec\}\}\+L\_\{\\mathrm\{KL\}\}\+\\lambda\_\{\\mathrm\{val\}\}\\,L\_\{\\mathrm\{val\}\}\+\\lambda\_\{\\mathrm\{feas\}\}\\,L\_\{\\mathrm\{feas\}\}\+\\lambda\_\{\\mathrm\{causal\}\}\\,L\_\{\\mathrm\{causal\}\}\+\\lambda\_\{\\mathrm\{spar\}\}\\,L\_\{\\mathrm\{spar\}\}\+\\lambda\_\{\\mathrm\{lof\}\}\\,L\_\{\\mathrm\{lof\}\}
18:Update

\(ϕ,θ\)\(\\phi,\\theta\)by backpropagation and an optimizer step

19:endfor

20:Optionally checkpoint and early\-stop based on the loss

21:endfor

22:return

\(ϕ,θ\)\(\\phi,\\theta\)

### 4\.4\.Immutable Attributes

A key aspect of training the VAE, which can significantly influence the quality of the generated counterfactual explanations, is the treatment of immutable attributes\. Following\([Joshi et al\., 2019](https://arxiv.org/html/2609.19383#bib.bib10)\), we define an attribute as immutable when its value should remain unchanged in a counterfactual instance\. For example, the attributeraceis considered immutable, since it cannot constitute an actionable change suggested by a counterfactual explanation\. To ensure this constraint, immutable attributes are excluded from the generative modification process during VAE training\. However, they are preserved from the original instance and reintroduced when constructing the final counterfactual candidate used for prediction\. This guarantees that the generated explanations modify only actionable features while maintaining consistency with the individual’s fixed characteristics\.

## 5\.Experiments and results

In this section, there will be an extended description of the datasets that we used, the preprocessing techniques that were applied to them\. In Section[5\.4](https://arxiv.org/html/2609.19383#S5.SS4), there will be a full presentation of all metrics that have been utilized to evaluate the model\. In addition, an in depth overview of the experimental results of our method against a variety of different methods that generate CF examples will be presented for all four datasets\. The source code and dataset are available at[https://anonymous\.4open\.science/r/FCx\_Finding\-Feasible\-Counterfactual\-Explanation\-3835](https://anonymous.4open.science/r/FCx_Finding-Feasible-Counterfactual-Explanation-3835)

### 5\.1\.Datasets

We use four publicly available datasets as benchmarks, selected for their consistent use in previous studies\. A summary of each dataset, including the total number of instances, the count of categorical, binary, and continuous attributes, the final number of inputs remaining after preprocessing, and the chosen decision/target class, will be provided\. Lastly, we adopt an 80%:10%:10% split for training, validation, and testing, respectively\.

The Adult Income dataset\([Becker and Kohavi, 1996](https://arxiv.org/html/2609.19383#bib.bib16)\), sourced from the UCI Machine Learning Repository, is a real\-world dataset widely used for similar applications\. It is designed to classify whether an individual’s income exceeds 50K per year\. The dataset contains a total of 48,842 instances, of which we utilized 32,561\. We selected 9 attributes, including 5 categorical, 2 binary, and 2 numerical/continuous features, resulting in a total of 9 features\.

The KDD Census\-Income dataset\([UCI Machine Learning Repository, 2000](https://arxiv.org/html/2609.19383#bib.bib25)\)consists of weighted census data from the 1994 and 1995 Current Population Surveys conducted by the U\.S\. Census Bureau\. Similar to the Adult dataset, it is used to classify whether an individual’s annual income exceeds 50K\. The dataset includes 299,285 instances, of which we utilized 199,522\. A total of 41 attributes were selected, comprising 32 categorical, 2 binary, and 7 numerical/continuous features, resulting in 164 features in total\.

The Law School dataset\([Wightman, 1998](https://arxiv.org/html/2609.19383#bib.bib17)\)contains law school admission records from 163 U\.S\. law schools in 1991\. Its primary objective is to predict whether a candidate will pass the bar exam\. The dataset originally consisted of 20,798 instances, of which we utilized 20,512\. A total of 10 attributes were selected, including 1 categorical, 3 binary, and 6 numerical/continuous features, resulting in 21 features overall\.

The Folktables database\([Ding et al\., 2021](https://arxiv.org/html/2609.19383#bib.bib23)\)is sourced from the ASC PUMS\. It can be used as a comparable replacement to the Adult dataset and it is designed to classify whether an individual’s income exceeds 50K per year\. The dataset contains approximately 1\.5M instances, of which we utilized approximately 900K\. We selected 9 attributes, including 5 categorical, 1 binary, and 2 numerical/continuous features, resulting in a total of 9 features\.

### 5\.2\.Implementation Settings

This section provides a detailed description of the Variational Autoencoder \(VAE\) implementation, as illustrated in Figure[5](https://arxiv.org/html/2609.19383#S5.F5)below\. Both the encoder and decoder consist of five linear layers, each followed by a ReLU activation function\. To enhance training stability, batch normalization is applied after each linear layer\. The fifth linear layer of the encoder estimates the mean \(μ\\mu\) and variance \(σ2\\sigma^\{2\}\), with a sigmoid activation function applied to the variance to ensure its positivity\. Additionally, a dropout rate of10%10\\%is introduced in each layer\. The termNum\. Featuresrefers to the size of each input processed by the encoder, including the target class\. The latent space dimensionzzis set to match the total number of features in each dataset, as discussed in Section[5\.7](https://arxiv.org/html/2609.19383#S5.SS7)\.

![Refer to caption](https://arxiv.org/html/2609.19383v1/NETWORK.drawio.png)Figure 5\.Our detailed VAE network
### 5\.3\.Preprocessing

We applied the same techniques across all datasets during the preprocessing\. First, any rows containing missing values were removed from the final dataset format\. Continuous features were normalized to a range between 0 and 1, while categorical features were transformed using one\-hot encoding\. Binary attributes were converted to values of 0 and 1\. The number of remaining instances has already been reported in Section[5\.1](https://arxiv.org/html/2609.19383#S5.SS1)\. Finally, we extracted the causal graphGGfrom the preprocessed data, representing all connected and non\-connected pairs in the adjacency matrix\.

### 5\.4\.Evaluation metrics

We used five metrics to evaluate the performance of our model regarding the feasibility of our generated CF examples\.

- •Validity:as “Validity", we measure the percentage \(%\) of CF examples for which the predicted class aligns with the target class from the classifier\.
- •Feasibility Score:as “Feasibility score", we measure the percentage \(%\) of the CF examples that satisfied the logical constraints, unary or binary\.
- •Continuous and Categorical proximity:We define “Continuous proximity" as the averageL1L\_\{1\}distance between the continuous features of the input value and the corresponding ones of the generated CF example and then we finally calculate the mean as−1k∑i=1kdist\(ci,𝒙\)\-\\frac\{1\}\{k\}\\sum\_\{i=1\}^\{k\}\\text\{ dist\}\\left\(c\_\{i\},\\boldsymbol\{x\}\\right\), where\(−1\)\(\-1\)multiplication, clarifies the proximity term,kkis the total number of CF examples andxc​f​ix^\{cfi\}is a certain CF example\. For "Categorical proximity", we first determine the total number of categorical feature alterations between the input value and its corresponding CF examples\. The mean is then computed in the same manner as for continuous proximity\.
- •Sparsity:We measure the number of features that changes for every input value to its corresponding CF example and from them, we calculate the mean “Sparsity score"\.
- •Local Outlier Factor:With this technique, we determine how likely a data point is to be an outlier with respect to the k\-closest instances in a multidimensional dataset\. More specifically, we calculate the number of feasible CF examples that are further from the other CF points and the average LOF score which indicates to the density in the example space\.

### 5\.5\.Comparative methods

Both Tables[1](https://arxiv.org/html/2609.19383#S5.T1)and[2](https://arxiv.org/html/2609.19383#S5.T2)present the results of all methods applied to the four datasets\. Mahajan Un/Bin\([Mahajan et al\., 2019](https://arxiv.org/html/2609.19383#bib.bib9)\), VC\-Net\([Guyomard et al\., 2026](https://arxiv.org/html/2609.19383#bib.bib29)\), FCEGAN\([Hellemans et al\., 2025](https://arxiv.org/html/2609.19383#bib.bib30)\)and CEILS\([Crupi et al\., 2024](https://arxiv.org/html/2609.19383#bib.bib31)\)have been included as state\-of\-the\-art methods to enable a direct comparison with our proposed approach\. The methods REVISE\([Joshi et al\., 2019](https://arxiv.org/html/2609.19383#bib.bib10)\), C\-CHVAE\([Pawelczyk et al\., 2020](https://arxiv.org/html/2609.19383#bib.bib11)\), CEM\([Dhurandhar et al\., 2018](https://arxiv.org/html/2609.19383#bib.bib12)\), and FACE\([Poyiadzi et al\., 2020](https://arxiv.org/html/2609.19383#bib.bib15)\)were reproduced using the CARLA\([Pawelczyk et al\., 2021](https://arxiv.org/html/2609.19383#bib.bib8)\)Python library\. CARLA is a benchmarking tool designed for counterfactual \(CF\) explanations, supporting various machine learning \(ML\) models and datasets\. For the experiments involving DiCE\([Mothilal et al\., 2020](https://arxiv.org/html/2609.19383#bib.bib13)\), we used one of its built\-in models, named "random"\. DiCE is also a Python library that facilitates the generation of CF explanations to interpret ML\-based predictions\. A more detailed description of all these methods can be found in Section[2](https://arxiv.org/html/2609.19383#S2)\.

### 5\.6\.Results

In this subsection, we present the final details regarding the datasets and provide a comprehensive overview of all experimental results, as summarized in both Tables[1](https://arxiv.org/html/2609.19383#S5.T1)and[2](https://arxiv.org/html/2609.19383#S5.T2)\.

First, it is important to highlight that for the datasets, we used theageattribute alone to define the unary constraint, and in combination witheducation, it formed the binary constraint for the Adult, Folktables and KDD\-Census datasets\. In these cases, theIncomeattribute served as the target or desired class\. Similarly, for the Law School dataset, the unary constraint was based on thelsatattribute, while the binary constraint was formed by combininglsatwithtier\. In this case, thePass the barattribute was the target or desired class\.

For the models from\([Mahajan et al\., 2019](https://arxiv.org/html/2609.19383#bib.bib9)\)and our approach, we trained two separate models, one for theUnary constraintand another for theBinary constraints\. In both cases, feasibility was used as both a learning parameter and an evaluation metric\.

Table 1\.Results on the Adult and Census datasetsTable 2\.Results on Law\-school and Folktables datasetsSeveral conclusions can be drawn from the results presented in both Tables[1](https://arxiv.org/html/2609.19383#S5.T1)and[2](https://arxiv.org/html/2609.19383#S5.T2)\. First, in almost all four datasets, our methods achieved the highestFeasibilityscores\. Specifically, in the Adult dataset, FCx\-U and FCx\-B attained feasibility scores of74\.91%74\.91\\%and82\.92%82\.92\\%, respectively\. In the Law School dataset, they reached93\.33%93\.33\\%and94\.9%94\.9\\%, while in Folktables we achieved91\.04%91\.04\\%and84\.32%84\.32\\%in FCx\-U and FCx\-B, respectively\. In the KDD\-Census dataset, FCx\-B achieved a feasibility score of90\.75%90\.75\\%; however, the C\-CHVAE method outperformed our approach in the Unary model, achieving98\.87%98\.87\\%\. Despite this, the validity score for C\-CHVAE was only48\.44%48\.44\\%, indicating that our model with100%100\\%was better trained and more likely to generate valid counterfactual \(CF\) examples\.

RegardingValidity, our model consistently produced valid CF examples with the desired class, achieving a100%100\\%score for validity in every experiment\. In terms ofSparsity, the best results across all four datasets were obtained by CEM\. However, these results are of lesser concern since high sparsity alone does not necessarily translate to better performance unless accompanied by strong validity and feasibility scores\.

For LOF, almost all methods achieved values close to 1, suggesting that the generated CF examples closely resemble normal data points\. Our methods demonstrated superiority in the Adult and Law School datasets, achieving the best feasibility scores while maintaining competitive sparsity and LOF values\. In contrast, the KDD\-Census and Folktables datasets posed a greater challenge due to their combination of high\-dimensional feature space and large sample size, resulting in elevated LOF values and more outliers\.

Furthermore, our models consistently outperformed the method proposed by\([Mahajan et al\., 2019](https://arxiv.org/html/2609.19383#bib.bib9)\), which is most directly comparable to ours, in all evaluation metrics, while also surpassing more recent state\-of\-the\-art methods such as\([Hellemans et al\., 2025](https://arxiv.org/html/2609.19383#bib.bib30)\)and\([Crupi et al\., 2024](https://arxiv.org/html/2609.19383#bib.bib31)\)\. Our methods, FCx\-U and FCx\-B can both be characterized as successful since they reduce sparsity to achieve high feasibility scores, they manage to create densely populated regions and eliminate outliers and the validity scores demonstrate that our model produces valid CF examples of the desired class\.

### 5\.7\.Ablation Study

In this section, we assess the impact of the key components of FCx through a comprehensive ablation analysis that considers: \(1\) the dimensionality of the latent spacezzfor each dataset to determine the optimal setting for our model, \(2\) the ideal number of neighborskkin LOF to ensure comprehensive coverage of all input instances in the latent space, \(3\) the robustness of the PC algorithm used to extract soft causal constraints, \(4\) an overview of the hyperparameter tuning for both our models \(5\) different combinations of our model’s components to assess their individual and collective contributions and \(6\) the behavior of all the components used in our model during training and validation\.

#### 5\.7\.1\.Dimensionality of latent space

To determine the optimal number of dimensions in the latent spacezz, we experimented with sizes considering the total number of input features\. As shown in Figure[6](https://arxiv.org/html/2609.19383#S5.F6), the best feasibility scores were obtained with 10 dimensions for Adult and Law, 30 for KDD\-Census and 40 for Folktables given their larger size\. All subsequent experiments maintained these latent space dimensions\.

![Refer to caption](https://arxiv.org/html/2609.19383v1/z_vs_feasibility_icdm.png)Figure 6\.Experimentation of dimensions in latent spacezz
#### 5\.7\.2\.Finding optimal number of neighbors for LOF

For LOF, we experimented with variouskkvalues, representing the number of nearest neighbors in KNN and LRD, to determine the most suitable for each dataset\. As shown in Figure[7](https://arxiv.org/html/2609.19383#S5.F7), choosing an extremely smallkkleads to excessive noise detection, while a very highkkreduces local outlier detection\. To balance these effects, we setk=20k=20for the Adult dataset and followed a similar approach for KDD\-Census \(k=50k=50\), Law School \(k=15k=15\) and Folktables \(k=70k=70\), as mentioned in Table[3](https://arxiv.org/html/2609.19383#S5.T3)\.

![Refer to caption](https://arxiv.org/html/2609.19383v1/k-values_p1.png)

\(a\) LOF scores

![Refer to caption](https://arxiv.org/html/2609.19383v1/k-values_p2.png)

\(b\) Number of outliers

Figure 7\.Hyperparameter analysis ofkkin LOF for the Adult dataset
#### 5\.7\.3\.Robustness analysis for PC algorithm

Our framework is not dependent on the PC algorithm; it is compatible with adjacency matrices derived from any causal discovery method\. We selected the PC algorithm due to its suitability for our data\. However, its parameters, including the independence test and significance threshold, can be tuned specifically for each dataset, minimizing the risk of imposing unrealistic constraints from spurious edges\. Empirical evaluations across four distinct datasets substantiate the reliability and strong performance of our method under diverse conditions\. To evaluate PC’s sensitivity in high\-dimensional settings, we performed a robustness analysis by varyingα\\alpha\(0\.001, 0\.01, 0\.05, 0\.1\) and reporting mean and standard deviation for feasibility: 79\.97% ±2\.71 \(Adult\), 91\.31% ±3\.12 \(Census\), 91% ±3\.84 \(Law\) and 82% ±2\.63 \(Folktables\) with similarly low variance across other metrics, further confirming the method’s robustness\.

#### 5\.7\.4\.Hyperparameter tuning

An overview of the hyperparameter tuning for each dataset employed in the FCx\-U and FCx\-B methods is provided in Table[3](https://arxiv.org/html/2609.19383#S5.T3), including the chosen number of neighbors for LOF training\.

Table 3\.Implementation settings
#### 5\.7\.5\.Ablation study of loss components

We conducted an ablation study to assess the contribution of each component to our method and its impact on feasibility\. We first trained a baseline model incorporating only feasibility constraints \(proximity, validity, and hard causal constraints\)\. Our findings in Table[4](https://arxiv.org/html/2609.19383#S5.T4), demonstrate that FCx, which integrates all proposed elements, outperforms all other configurations by achieving the highest feasibility score, highlighting the significance of each component\. Regarding training time, incorporating additional components leads to increased computational cost, as expected, which is acceptable given our focus on improving feasibility rather than reducing training time\.

Table 4\.Experimental study to measure the impact of the different components in our method on feasibility and the duration of the training process
#### 5\.7\.6\.Training and validation loss function and components

Finally, in the following figures, we report the evolution of all the components that compose the loss function of our model through time\. The total training loss, comprising the ELBO and the additional regularization terms, is lower\-bounded by design, which ensures that the optimization process remains stable throughout training\. Although the non\-convex nature of VAE\-based models prevents guarantees of global optimality, standard gradient\-based optimization methods can reliably converge to stationary points that correspond to local optima under reasonable smoothness assumptions\. This behavior is also supported empirically by the reported curves\. Overall, the model converges rapidly: the full loss decreases sharply during the first 5\-10 epochs and then stabilizes, with training and validation curves remaining close throughout, indicating good generalization\. The validity penalty collapses to near zero within the first few epochs, suggesting that the model quickly learns to satisfy the feasibility criteria for generated counterfactuals\. Reconstruction and LOF losses decrease more gradually and stabilize after approximately 15\-25 epochs, indicating continued improvement in reconstruction fidelity and adherence to the data distribution\. Sparsity and soft causal loss terms improve more slowly, with a small train validation gap appearing in later epochs, where training continues to decrease while validation flattens, which is consistent with mild late\-stage over\-specialization\. Finally, the KL term increases initially and then stabilizes, reflecting an increasing and then steady use of the latent representation as optimization proceeds\.

![Refer to caption](https://arxiv.org/html/2609.19383v1/full_loss_train_vs_val.png)\(a\)Training and validation loss
![Refer to caption](https://arxiv.org/html/2609.19383v1/constraint_loss_train_vs_val.png)\(b\)Hard constraint loss
![Refer to caption](https://arxiv.org/html/2609.19383v1/kl_train_vs_val.png)\(c\)KL component
![Refer to caption](https://arxiv.org/html/2609.19383v1/recon_train_vs_val.png)\(d\)Reconstruction loss
![Refer to caption](https://arxiv.org/html/2609.19383v1/lof_loss_train_vs_val.png)\(e\)LOF loss
![Refer to caption](https://arxiv.org/html/2609.19383v1/reg_loss_train_vs_val.png)\(f\)Soft causal loss
![Refer to caption](https://arxiv.org/html/2609.19383v1/sparsity_train_vs_val.png)\(g\)Sparsity loss
![Refer to caption](https://arxiv.org/html/2609.19383v1/validity_train_vs_val.png)\(h\)Validity loss

Figure 8\.Training and validation losses and their components\.

## 6\.Conclusions

Following an extensive series of experiments conducted across four diverse datasets, we derived several key insights regarding the performance and behavior of our proposed method\. Firstly, our approach consistently outperformed existing baseline methods in terms of feasibility\. This was achieved by incorporating both hard and soft causal constraints, enabling the model to effectively uncover and leverage previously unseen causal relationships among features\. Such capability significantly reduces the need for manual intervention and underscores the method’s relevance and adaptability to real\-world applications where domain knowledge may be limited or incomplete\. Secondly, the integration of sparsity constraints into the counterfactual \(CF\) generation process yielded notable improvements\. By promoting minimal but meaningful changes to feature values, sparsity ensured that the generated counterfactuals remained interpretable and actionable, aligning with realistic expectations of what can be changed in practice\. Additionally, the application of the LOF technique further strengthened the reliability of our CF examples\. By prioritizing generation within dense data regions, LOF helped prevent the creation of outliers or implausible instances, thereby enhancing the overall credibility of the counterfactuals\. Lastly, our analysis maintained the critical importance of the underlying dataset structure in determining feasibility\. The specific relationships and distributions of features within a dataset directly influence the causal constraints that guide CF generation\. As a result, respecting and adapting to the structure of each dataset is essential to producing counterfactuals that are not only valid but also useful and constructive to the user\.

## References

- Becker and Kohavi \(1996\)B\. Becker and R\. KohaviAdult\.Note:UCI Machine Learning RepositoryDOI: https://doi\.org/10\.24432/C5XW20Cited by:[§3\.2](https://arxiv.org/html/2609.19383#S3.SS2.p3.1),[§5\.1](https://arxiv.org/html/2609.19383#S5.SS1.p2.1)\.
- Belyadi and Haghighat \(2021\)H\. Belyadi and A\. HaghighatUnsupervised machine learning: clustering algorithms\.pp\. 125–168\.External Links:ISBN 9780128219294,[Document](https://dx.doi.org/10.1016/B978-0-12-821929-4.00002-0)Cited by:[Definition 3\.2](https://arxiv.org/html/2609.19383#S3.Thmtheorem2.p1.1)\.
- Bodriaet al\.\(2023\)F\. Bodria, F\. Giannotti, R\. Guidotti, F\. Naretto, D\. Pedreschi, and S\. RinzivilloBenchmarking and survey of explanation methods for black box models\.Data Mining and Knowledge Discovery37,pp\. 1719–1778\.External Links:[Document](https://dx.doi.org/10.1007/S10618-023-00933-9/TABLES/9),ISSN 1573756XCited by:[§2](https://arxiv.org/html/2609.19383#S2.p1.1)\.
- Boveet al\.\(2023\)C\. Bove, M\. Lesot, C\. A\. Tijus, and M\. DetynieckiInvestigating the intelligibility of plural counterfactual examples for non\-expert users: an explanation user interface proposition and user study\.New York, NY, USA\.External Links:ISBN 9798400701061,[Link](https://doi.org/10.1145/3581641.3584082),[Document](https://dx.doi.org/10.1145/3581641.3584082)Cited by:[§2](https://arxiv.org/html/2609.19383#S2.p3.1)\.
- Breuniget al\.\(2000\)M\. M\. Breunig, H\. Kriegel, R\. T\. Ng, and J\. SanderLOF: identifying density\-based local outliers\.InProceedings of the 2000 ACM SIGMOD International Conference on Management of Data,SIGMOD ’00,New York, NY, USA,pp\. 93–104\.External Links:ISBN 1581132174,[Link](https://doi.org/10.1145/342009.335388),[Document](https://dx.doi.org/10.1145/342009.335388)Cited by:[§1](https://arxiv.org/html/2609.19383#S1.p5.1),[§3\.1](https://arxiv.org/html/2609.19383#S3.SS1.p3.1)\.
- Cresswellet al\.\(2017\)K\. M\. Cresswell, D\. W\. Bates, A\. Wright, and A\. SheikhChapter 1 \- an overview of clinical informatics\.InKey Advances in Clinical Informatics,A\. Sheikh, K\. M\. Cresswell, A\. Wright, and D\. W\. Bates \(Eds\.\),pp\. 3–11\.External Links:ISBN 978\-0\-12\-809523\-2,[Document](https://dx.doi.org/https%3A//doi.org/10.1016/B978-0-12-809523-2.00001-7),[Link](https://www.sciencedirect.com/science/article/pii/B9780128095232000017)Cited by:[§1](https://arxiv.org/html/2609.19383#S1.p1.1)\.
- Crupiet al\.\(2024\)R\. Crupi, A\. Castelnovo, D\. Regoli, and B\. San Miguel GonzalezCounterfactual explanations as interventions in latent space\.Data Mining and Knowledge Discovery,pp\. 1–37\.Cited by:[§2](https://arxiv.org/html/2609.19383#S2.p4.1),[§5\.5](https://arxiv.org/html/2609.19383#S5.SS5.p1.1),[§5\.6](https://arxiv.org/html/2609.19383#S5.SS6.p7.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.11.2),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.23.2),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.11.2),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.23.2)\.
- Dhurandharet al\.\(2018\)A\. Dhurandhar, P\. Chen, R\. Luss, C\. Tu, P\. Ting, K\. Shanmugam, and P\. DasTowards contrastive explanations with pertinent negatives\.InNeural Information Processing Systems,External Links:[Link](https://api.semanticscholar.org/CorpusID:3401346)Cited by:[§2](https://arxiv.org/html/2609.19383#S2.p1.1),[§2](https://arxiv.org/html/2609.19383#S2.p2.1),[§5\.5](https://arxiv.org/html/2609.19383#S5.SS5.p1.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.18.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.6.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.18.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.6.1)\.
- Dinget al\.\(2021\)F\. Ding, M\. Hardt, J\. Miller, and L\. SchmidtRetiring adult: new datasets for fair machine learning\.Advances in Neural Information Processing Systems34\.Cited by:[§5\.1](https://arxiv.org/html/2609.19383#S5.SS1.p5.1)\.
- Dressel and Farid \(2018\)J\. Dressel and H\. FaridThe accuracy, fairness, and limits of predicting recidivism\.Science Advances4,pp\. eaao5580\.External Links:[Document](https://dx.doi.org/10.1126/sciadv.aao5580)Cited by:[§1](https://arxiv.org/html/2609.19383#S1.p1.1)\.
- Fragkathoulaset al\.\(2026\)C\. Fragkathoulas, V\. Papanikou, E\. Pitoura, and E\. TerziFACEGroup: feasible and actionable counterfactual explanations for group fairness\.InMachine Learning and Knowledge Discovery in Databases\. Research Track,R\. P\. Ribeiro, B\. Pfahringer, N\. Japkowicz, P\. Larrañaga, A\. M\. Jorge, C\. Soares, P\. H\. Abreu, and J\. Gama \(Eds\.\),Cham,pp\. 41–59\.Cited by:[§2](https://arxiv.org/html/2609.19383#S2.p3.1)\.
- Guyomardet al\.\(2026\)V\. Guyomard, F\. Fessant, T\. Bouadi, and T\. GuyetGenerating efficiently realistic counterfactual explanations\.Machine Learning115,pp\.\.External Links:[Document](https://dx.doi.org/10.1007/s10994-025-06947-2)Cited by:[§2](https://arxiv.org/html/2609.19383#S2.p4.1),[§5\.5](https://arxiv.org/html/2609.19383#S5.SS5.p1.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.21.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.9.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.21.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.9.1)\.
- Hellemanset al\.\(2025\)S\. Hellemans, A\. Algaba, S\. Verboven, and V\. GinisFlexible counterfactual explanations with generative models\.External Links:2502\.17613,[Link](https://arxiv.org/abs/2502.17613)Cited by:[§2](https://arxiv.org/html/2609.19383#S2.p4.1),[§5\.5](https://arxiv.org/html/2609.19383#S5.SS5.p1.1),[§5\.6](https://arxiv.org/html/2609.19383#S5.SS6.p7.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.10.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.22.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.10.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.22.1)\.
- Joshiet al\.\(2019\)S\. Joshi, O\. Koyejo, W\. Vijitbenjaronk, B\. Kim, and J\. GhoshTowards realistic individual recourse and actionable explanations in black\-box decision making systems\.CoRRabs/1907\.09615\.External Links:[Link](http://arxiv.org/abs/1907.09615),1907\.09615Cited by:[§2](https://arxiv.org/html/2609.19383#S2.p1.1),[§2](https://arxiv.org/html/2609.19383#S2.p2.1),[§4\.4](https://arxiv.org/html/2609.19383#S4.SS4.p1.1),[§5\.5](https://arxiv.org/html/2609.19383#S5.SS5.p1.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.16.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.4.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.16.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.4.1)\.
- Karimiet al\.\(2021\)A\. Karimi, G\. Barthe, B\. Schölkopf, and I\. ValeraA survey of algorithmic recourse: definitions, formulations, solutions, and prospects\.External Links:2010\.04050Cited by:[§2](https://arxiv.org/html/2609.19383#S2.p1.1)\.
- Kingma and Welling \(2013\)D\. P\. Kingma and M\. WellingAuto\-encoding variational bayes\.CoRRabs/1312\.6114\.External Links:[Link](https://api.semanticscholar.org/CorpusID:216078090)Cited by:[§1](https://arxiv.org/html/2609.19383#S1.p5.1),[§4\.1](https://arxiv.org/html/2609.19383#S4.SS1.p1.1)\.
- Mahajanet al\.\(2019\)D\. Mahajan, C\. Tan, and A\. SharmaPreserving causal constraints in counterfactual explanations for machine learning classifiers\.ArXivabs/1912\.03277\.Cited by:[§1](https://arxiv.org/html/2609.19383#S1.p4.1),[§2](https://arxiv.org/html/2609.19383#S2.p1.1),[§2](https://arxiv.org/html/2609.19383#S2.p2.1),[§3\.2](https://arxiv.org/html/2609.19383#S3.SS2.p1.1),[Definition 3\.1](https://arxiv.org/html/2609.19383#S3.Thmtheorem1.p1.1),[§5\.5](https://arxiv.org/html/2609.19383#S5.SS5.p1.1),[§5\.6](https://arxiv.org/html/2609.19383#S5.SS6.p3.1),[§5\.6](https://arxiv.org/html/2609.19383#S5.SS6.p7.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.14.2),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.15.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.2.2),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.3.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.14.2),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.15.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.2.2),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.3.1)\.
- Miller \(2019\)T\. MillerExplanation in artificial intelligence: insights from the social sciences\.Artificial Intelligence267,pp\. 1–38\.External Links:ISSN 0004\-3702,[Document](https://dx.doi.org/https%3A//doi.org/10.1016/j.artint.2018.07.007),[Link](https://www.sciencedirect.com/science/article/pii/S0004370218305988)Cited by:[§1](https://arxiv.org/html/2609.19383#S1.p1.1)\.
- Mothilalet al\.\(2020\)R\. K\. Mothilal, A\. Sharma, and C\. TanExplaining machine learning classifiers through diverse counterfactual explanations\.FAT\* 2020 \- Proceedings of the 2020 Conference on Fairness, Accountability, and Transparency,pp\. 607–617\.External Links:[Document](https://dx.doi.org/10.1145/3351095.3372850),ISBN 9781450369367Cited by:[§1](https://arxiv.org/html/2609.19383#S1.p3.1),[§2](https://arxiv.org/html/2609.19383#S2.p1.1),[§2](https://arxiv.org/html/2609.19383#S2.p2.1),[§5\.5](https://arxiv.org/html/2609.19383#S5.SS5.p1.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.19.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.7.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.19.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.7.1)\.
- Pawelczyket al\.\(2021\)M\. Pawelczyk, S\. Bielawski, J\. van den Heuvel, T\. Richter, and G\. KasneciCARLA: a python library to benchmark algorithmic recourse and counterfactual explanation algorithms\.External Links:2108\.00783Cited by:[§5\.5](https://arxiv.org/html/2609.19383#S5.SS5.p1.1)\.
- Pawelczyket al\.\(2020\)M\. Pawelczyk, K\. Broelemann, and G\. KasneciLearning model\-agnostic counterfactual explanations for tabular data\.InProceedings of The Web Conference 2020,WWW ’20,New York, NY, USA,pp\. 3126–3132\.External Links:ISBN 9781450370233,[Link](https://doi.org/10.1145/3366423.3380087),[Document](https://dx.doi.org/10.1145/3366423.3380087)Cited by:[§2](https://arxiv.org/html/2609.19383#S2.p1.1),[§2](https://arxiv.org/html/2609.19383#S2.p2.1),[§5\.5](https://arxiv.org/html/2609.19383#S5.SS5.p1.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.17.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.5.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.17.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.5.1)\.
- Poyiadziet al\.\(2020\)R\. Poyiadzi, K\. Sokol, R\. Santos\-Rodriguez, T\. De Bie, and P\. FlachFACE: feasible and actionable counterfactual explanations\.InProceedings of the AAAI/ACM Conference on AI, Ethics, and Society,AIES ’20,New York, NY, USA,pp\. 344–350\.External Links:ISBN 9781450371100,[Link](https://doi.org/10.1145/3375627.3375850),[Document](https://dx.doi.org/10.1145/3375627.3375850)Cited by:[§1](https://arxiv.org/html/2609.19383#S1.p3.1),[§2](https://arxiv.org/html/2609.19383#S2.p3.1),[§5\.5](https://arxiv.org/html/2609.19383#S5.SS5.p1.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.20.1),[Table 1](https://arxiv.org/html/2609.19383#S5.T1.2.8.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.20.1),[Table 2](https://arxiv.org/html/2609.19383#S5.T2.2.8.1)\.
- Rugolonet al\.\(2023\)F\. Rugolon, M\. Bampa, and P\. PapapetrouA workflow for generating patient counterfactuals in lung transplant recipients\.pp\. 291–306\.External Links:ISBN 978\-3\-031\-23632\-7,[Document](https://dx.doi.org/10.1007/978-3-031-23633-4%5F20)Cited by:[§2](https://arxiv.org/html/2609.19383#S2.p3.1)\.
- Salimiet al\.\(2023\)P\. Salimi, N\. Wiratunga, D\. Corsar, and A\. WijekoonTowards feasible counterfactual explanations: a taxonomy guided template\-based nlg method\.InECAI 2023,External Links:ISBN 9781643684376,ISSN 1879\-8314,[Link](http://dx.doi.org/10.3233/FAIA230499),[Document](https://dx.doi.org/10.3233/faia230499)Cited by:[§2](https://arxiv.org/html/2609.19383#S2.p1.1)\.
- Spirteset al\.\(2001\)P\. Spirtes, C\. Glymour, and R\. ScheinesCausation, prediction, and search\.The MIT Press\.External Links:ISBN 9780262284158,[Document](https://dx.doi.org/10.7551/mitpress/1754.001.0001),[Link](https://doi.org/10.7551/mitpress/1754.001.0001)Cited by:[§3\.3](https://arxiv.org/html/2609.19383#S3.SS3.p2.1)\.
- UCI Machine Learning Repository \(2000\)UCI Machine Learning RepositoryCensus\-Income \(KDD\)\.Note:UCI Machine Learning RepositoryDOI:[10\.24432/C5N30T](https://doi.org/10.24432/C5N30T)External Links:[Link](https://archive.ics.uci.edu/dataset/117/census+income+kdd)Cited by:[§5\.1](https://arxiv.org/html/2609.19383#S5.SS1.p3.1)\.
- Vermaet al\.\(2024\)S\. Verma, V\. Boonsanong, M\. Hoang, K\. Hines, J\. Dickerson, and C\. ShahCounterfactual explanations and algorithmic recourses for machine learning: a review\.ACM Comput\. Surv\.56\(12\)\.External Links:ISSN 0360\-0300,[Link](https://doi.org/10.1145/3677119),[Document](https://dx.doi.org/10.1145/3677119)Cited by:[§1](https://arxiv.org/html/2609.19383#S1.p3.1),[§2](https://arxiv.org/html/2609.19383#S2.p1.1)\.
- Virgolin and Fracaros \(2023\)M\. Virgolin and S\. FracarosOn the robustness of sparse counterfactual explanations to adverse perturbations\.Artificial Intelligence316,pp\. 103840\.External Links:ISSN 0004\-3702,[Document](https://dx.doi.org/https%3A//doi.org/10.1016/j.artint.2022.103840),[Link](https://www.sciencedirect.com/science/article/pii/S0004370222001801)Cited by:[§1](https://arxiv.org/html/2609.19383#S1.p7.1),[§3\.4](https://arxiv.org/html/2609.19383#S3.SS4.p1.1)\.
- Wachteret al\.\(2018\)S\. Wachter, B\. Mittelstadt, and C\. RussellCounterfactual explanations without opening the black box: automated decisions and the gdpr\.Harvard Journal of Law & Technology31\.External Links:[Document](https://dx.doi.org/10.1177/1461444816676645),[Link](https://perma.cc/3HF6-G9DS];)Cited by:[§1](https://arxiv.org/html/2609.19383#S1.p1.1)\.
- Wanget al\.\(2023\)Z\. Wang, I\. Miliou, I\. Samsten, and P\. PapapetrouCounterfactual explanations for time series forecasting\.Proceedings \- IEEE International Conference on Data Mining, ICDM,pp\. 1391–1396\.External Links:[Document](https://dx.doi.org/10.1109/ICDM58522.2023.00180),ISBN 9798350307887,ISSN 15504786Cited by:[§2](https://arxiv.org/html/2609.19383#S2.p1.1)\.
- Wightman \(1998\)L\. F\. WightmanLSAC national longitudinal bar passage study\. lsac research report series\.\.External Links:[Link](https://api.semanticscholar.org/CorpusID:151073942)Cited by:[§5\.1](https://arxiv.org/html/2609.19383#S5.SS1.p4.1)\.

Similar Articles

Explanations-Driven Active Feature Acquisition for Algorithmic Recourse

arXiv cs.LG

The paper proposes an Explanation-Driven Feature Acquisition (EDFA) method that unifies counterfactual, semifactual, and alterfactual explanations to jointly address algorithmic recourse and feature acquisition, aiming for lower-cost and more actionable recourse with validity guarantees.

PACE: A Neuro-Symbolic Framework for Plausible and Actionable Counterfactual Explanations

arXiv cs.AI

This paper introduces PACE, a modular neuro-symbolic framework that combines a neural predictive model with symbolic reasoning to generate counterfactual explanations that respect domain-specific feasibility constraints. A case study on the Adult Income dataset demonstrates that incorporating symbolic rules yields more plausible and actionable explanations.