acceptodds
Under review as a conference paper at ICLR 2027

QIOCE: QAOA-Inspired Optimization for Counterfactual Explanation

Abstract

Generating counterfactual explanations requires solving a constrained mixed discrete–continuous optimization problem that balances validity, proximity, sparsity, and plausibility. Existing quantum approaches often restrict feature representations or combine quantum optimization with substantial classical post-processing, making it difficult to isolate the contribution of the quantum component. We propose QIOCE, a hybrid quantum–classical framework that formulates counterfactual generation as variational quantum optimization and supports both continuous and categorical features through dedicated quantum encodings followed by class-aware classical refinement. To directly assess the contribution of quantum optimization, we compare the variational quantum initialization against multiple classical initialization strategies while keeping the subsequent refinement procedure fixed. Across synthetic, medical, financial, and image benchmarks, quantum initialization consistently improves overall counterfactual quality compared with classical initialization baselines. We further show that measurement-based estimation can replace state-tomographic evaluation while largely retaining these improvements, enabling execution on noisy quantum hardware. Experiments on a gate-based quantum processor further demonstrate the feasibility of the approach under realistic hardware noise. Overall, our results provide controlled empirical evidence that variational quantum initialization can improve counterfactual search beyond improvements introduced by the shared classical refinement stage.

Primary area:
interpretability and explainable AI
Keywords:
Counterfactual Explanations, Quantum Machine Learning, Variational Quantum Algorithms, Explainable AI, Hybrid Quantum–Classical Optimization

Reviews

Among:
Shape:
1234this paper, Bottom 10%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.67 over 3 reviews, above 10% of the others.
Reviewer_jS3kOpenReview ↗
Rating
1
Confidence
2
Informativeness
1
Presentation
2
Soundness
2
Read review
Paper summary

The paper proposes QIOCE, a hybrid quantum and classical method for generating counterfactual explanations for a fixed binary classifier on tabular data with continuous and categorical features, encoding continuous features as Ry rotations on one qubit each and categorical features as one-hot registers. Separate parameter sets for the two class transition directions are learned by sequential transfer across training instances, and at test time a local copy is adapted per instance in two L-BFGS-B stages, the first emphasizing target-class validity and the second improving proximity, sparsity and KDE plausibility, before a classical local refiner polishes the decoded candidate. The claimed contributions are a variational initializer with directional parameter transfer and per-instance adaptation, a tabular evaluation that separates the quality of valid counterfactuals from target-class reachability under a shared refiner, and qualitative image counterfactuals and boundary probes on Digits. Validation comprises a quality comparison on seven small tabular datasets against Growing Spheres, Wachter, DiCE, TABCF and Tabular Diffusion over three seeds, where QIOCE gives the lowest distance on five datasets and the lowest plausibility distance on all seven, an initializer comparison on five datasets against six classical initializers under a shared stochastic refiner, where QIOCE gives the highest or joint highest validity on four though at larger distance, stage diagnostics from single runs showing the quality stage can remove validity and that retaining valid candidates mitigates this at extra cost, and a component ablation on Wine alone.

Critical strengths

An original and carefully framed research direction. To my knowledge, using a variational quantum circuit to initialize counterfactual search is a new idea. The design contains several concrete elements: direction-specific parameter transfer with per-instance adaptation, an encoding that handles both continuous and categorical features, and a decoder that requires only single-qubit marginal Z statistics from one measurement batch. The authors explicitly position the method as a candidate-generation heuristic and do not claim computational quantum advantage. This matters because it makes the work a credible starting point for studying quantum initializers in XAI rather than an overclaimed demonstration.

Critical weaknesses
  1. The contribution of the quantum component is not demonstrated. The variational circuit has only 2p = 10 parameters shared across all qubits, is fully classically simulable at the evaluated sizes, and its phase layer does not encode the counterfactual objective (as the authors acknowledge). The paper lacks the key control: a classical parametric initializer of the same form and parameter count. The only relevant ablation (Table 7, QIOCE_RandInit) uses a single dataset, a single run, and no uncertainty estimates, and QIOCE does not achieve the lowest refined distance there. Without this control, the observed gains cannot be attributed to the quantum parameterization rather than to the KDE guidance, the refinement stage, or the larger search budget. This is consequential because the quantum initializer is the paper's central claimed contribution.

  2. The experimental evaluation is inconsistent and insufficiently controlled.

  • Results for the same method and dataset differ substantially across sections (e.g., QIOCE on Wine: L2 0.602 in Table 1, 2.710 in Table 2, 0.781 in Table 7), and it is unclear which configuration constitutes the proposed method.
  • Table 1 reports 100% validity for all six methods on all seven datasets. By contrast, the stage study (Figure 5) shows that standard QIOCE reaches only 29/50 valid outputs on Wine after refinement, largely because the quality-optimization stage (Step 2) removes validity obtained in Step 1 (19 → 12 valid). I understand that these studies use different protocols, but this makes it unclear which QIOCE configuration and refiner are evaluated in Table 1 and how it reaches 100% validity. The authors should clarify this and state whether any instance filtering was applied.
  • The Sparsity column in Table 1 shows an unusual pattern: every mean, averaged over three seeds and many per seed, ends in a zero in the hundredths place (e.g., 9.10 on Diabetes with n = 133), and the standard deviations take only the values 0.00–0.30. Please explain how these values were computed and rounded.
  • Training protocols, architectures, and hyperparameters for the generative baselines (TABCF, Tabular Diffusion) are not reported; Appendix B describes them only by name and results. Several classical baselines appear poorly tuned (e.g., 5% validity for the genetic algorithm on the linearly separable Iris task), and DiCE is run in its random-search mode.
  • The plausibility metric (distance to the nearest training point of any class) favors QIOCE, which explicitly optimizes KDE density; the class-conditional variant defined in Appendix C.2 is not reported.
  • Wall-clock runtime is not reported, and classifier query budgets are unmatched (Table 6 shows thousands of calls per instance for QIOCE).
  • Evaluation is limited to small, low-dimensional datasets (at most 13 features), without standard recourse benchmarks such as Adult, German Credit, or HELOC. These issues prevent a reliable assessment of whether QIOCE improves on existing methods.
Questions for authors

Clarification requests (answers could change my assessment):

  1. Which QIOCE configuration produced the results in Table 1? Table 1 reports 100% validity for all six methods on all seven datasets, whereas Table 5 shows that standard QIOCE ends with 22/50 (Iris) and 29/50 (Wine) valid outputs.

  2. How were the Sparsity means and standard deviations in Table 1 computed and rounded? Every mean, although averaged over many instances per seed and three seeds, ends in a zero in the hundredths place (e.g., 9.10 on Diabetes), and some fractional means have a standard deviation of exactly 0.00.

  3. What architectures, training hyperparameters, and sampling budgets were used for TABCF and Tabular Diffusion, given training sets as small as ~124 instances (Wine)? How was 100% validity achieved: by rejection sampling, post-hoc filtering, or another mechanism?

1 comment
AuthorsOpenReview ↗

Matched Controls, Experimental Clarifications, and Additional Evidence

We thank the reviewer for recognizing QIOCE's originality. We added parameter-matched controls, ten-seed results, and clarified the evaluation protocols.

  1. Contribution of the variational component. We added two five-layer, 10-parameter controls: MeanField, which projects the state onto the product of its one-qubit marginals after each CNOT, and a shared nonlinear classical map with offsets and neighboring-feature mixing. Both share QIOCE's directional transfer, adaptation, objective, KDE, and refiner. Each variational arm has 132 initialization + 64 refinement query allowances; Genetic receives the same 196-query total. We ran 10 seeds on paired factuals, reporting realized queries, CPU times, and SDs. On Iris, refined validity was 91.7±6.4% (QIOCE), 60.4±9.7% (MeanField), and 82.9±16.1% (classical map). The 31.3 pp gap versus MeanField under matched budgets supports a contribution from the correlated circuit representation beyond KDE and classical refinement. It is not universal: the classical map slightly outperforms QIOCE on Wine validity; Genetic leads all five datasets on S(0.5) (target-valid within normalized L2≤0.5). We do not claim quantum speedup.
  2. Table 1's 100% validity: generation protocol. Table 1 employed validity-conditioned resampling (generate–check–retry): candidates failing the fixed target classifier's validity test were rejected and generation repeated until a target-valid result was returned. The 54/54 on Wine counts successful returned counterfactuals after this procedure, not first-attempt success. Accordingly, Table 1 compares L2, sparsity and plausibility conditional on validity; it must not be read as evidence of 100% single-attempt reliability or matched generation cost. TABCF likewise reports quality only for valid CFs and success separately (Panagiotou et al., 2024, Sec. 4.4). We clarify the retry rule and denominator. The other tables address different settings: Table 2 (Wine L2=2.710, validity 90%) disables internal QIOCE refinement, uses the same external stochastic refiner for all initializers, and includes failures in validity and average distance. Table 5 (29/50 Wine) is a separate stage diagnostic showing validity loss after Step 2. Table 7 (Wine L2=0.781) is a single-run, 50-factual component ablation with a 150-proposal refiner. Table 1 (Wine L2=0.602) evaluates complete generators with seeds 42, 66, 79. Different samples/refiners explain the distinct outcomes.
  3. Sparsity reporting. Eq. 12 counts feature changes, thresholding continuous changes at 0.01. We average within each seed, then compute the mean and sample SD across the unrounded seed-level means (42, 66, 79). For QIOCE only, mean sparsity was rounded to one decimal but formatted to two (e.g. 9.1 shown as 9.10); SD is independently computed from unrounded seed results and rounded only for display. Thus ±0.00 reflects display rounding, not necessarily zero variability.
  4. Generative baselines. TABCF uses a transformer-VAE and Gumbel–Softmax. Its published reference setup specifies 4,000 VAE epochs, KL coefficient β annealed 10⁻³→10⁻⁵, τ=1, and up to 5,000 SGD steps per CF (Panagiotou et al., 2024). TDCE uses a TabDDPM-style U-Net denoiser and classifier-guided diffusion (Zhang et al., 2026). Since our target model is a Random Forest, TDCE's input gradients were obtained from a differentiable surrogate approximating RF predictions (R²=0.98); final target validity was always checked against the original RF, not the surrogate. DiCE used the documented CARLA random-search wrapper rather than a claimed tuned optimum.
  5. Plausibility, costs, and larger-scale evidence. Table 1 reports any-class nearest-neighbor plausibility, distinct from target-class KDE and the class-conditional metric in Appendix C.2. The new matched study records realized query counts and wall time. We additional test "Give Me Some Credit" dataset (120,000 train; 30,000 held out; 10 seeds; 240 paired factuals/seed), QIOCE achieved 96.2±3.1% refined validity versus Genetic 90.0±10.4%, but S(0.5) was 12.1±6.9% vs 44.6±8.8%, showing the validity–proximity trade-off on a larger training set (10 features, not a wider circuit). On ibm_fez, 15 independent 10-qubit Diabetes circuits ran concurrently on 150 physical qubits; 11/15 candidates were hardware-valid and 15/15 after classical refinement, not evidence of a 150-qubit correlated optimizer. We corrected text and figure placement and provide settings, seed results, query counts and runtimes.
Reviewer_nqw9OpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper proposes QIOCE, a hybrid quantum-classical method for generating counterfactual explanations. The method represents continuous features with qubit rotations while categorical features with one-hot qubit registers. It uses QAOA-inspired variational circuit that learns separate parameters for the two class-transition directions (0->1 and 1->0) on training data. At test time, those parameters are adapted to each instance in two steps (first validity, then quality), decoded from single-qubit measurements, and then refined classically. Experiments include seven tabular datasets, an initializer comparison under shared refinement, qualitative digit examples, and a small IBM hardware run.

Critical strengths
  • Interesting direction: an exploration of quantum initialization for counterfactual search.
  • Useful stage analysis: The experiments show that quality optimization can harm validity, and retaining valid candidates fixes this.
  • Hardware-friendly decoding: decoding uses only single-qubit measurements without state tomography, and the pipeline runs end-to-end on real hardware (ibm_fez).
Critical weaknesses
  • Unclear benefit of the quantum part: The circuit has only 10 shared parameters, and there is no classical baseline with the same parameter count and query budget. Could the authors add one?
  • Inconsistent results: Table 1 reports "All methods generate valid counterfactuals for all attempted instances" meaning 100% validity, but Table 2 shows 75–100%. The hardware claim also mentions up to 150 qubits, but only a 2-qubit example is shown. Could the authors clarify?
  • Presentation: There are issues with the text and table/figure placements which are making it hard to follow the paper. For instance:
    • The text at line 269 continues at line 345.
    • Line 352, latex issue.
    • Tables and figures are far away from where they are mentioned.
  • Scope: It might be a good start or show the effect of quantum approach, but also only small toy datasets. Could this study extend to large datasets.
  • Experiments and Reproducibility: Results use only three seeds, Table 2 reports no standard deviations. Also, it is hard to justify why those seeds are selected, can authors run more experiments from seeds 1 to 10. Can authors share anonymized link to the code to check the validity of the experiments?
Questions for authors

Please check the weaknesses.

1 comment
AuthorsOpenReview ↗

Parameter-Matched Controls, Robustness Evaluation, and Clarifications

We thank the reviewer for recognizing the value of variational initialization, stage-wise analysis, and measurement-based decoding. We have added parameter-matched controls, a ten-seed evaluation, and clearer experimental reporting.

  1. Matched classical controls and statistical evidence. We evaluated seeds 1–10, using paired held-out factuals within each dataset/seed across all methods. Two five-layer, ten-parameter controls match QIOCE's parameter count:
  • MeanField: After each CNOT, replaces the joint state with a product of its one-qubit marginals, removing inter-qubit correlations.
  • Shared classical map: A nonlinear transformation with shared offsets and neighboring-feature mixing. Both use the same direction-specific parameter transfer, instance-specific adaptation, optimization losses, and target-class KDE as QIOCE. Each variational arm receives 132 initializer-query and 64 shared-refiner-query allowances; Genetic receives the same 196-query total allowance. We report realized query counts and CPU wall times. On Iris, refined validity is 91.7 ± 6.4% (QIOCE), 60.4 ± 9.7% (MeanField), and 82.9 ± 16.1% (classical map) (mean ± sample SD over ten seeds). QIOCE's 31.3 percentage-point advantage over MeanField under matched parameter counts and query allowances supports a contribution from the correlated variational representation, beyond shared KDE guidance and refinement. This is not universal: the classical map slightly exceeds QIOCE's validity on Wine, and Genetic leads on S(0.5) (target-valid within L2 ≤ 0.5) across the five datasets.
  1. Why Tables 1 and 2 report different validity. The tables assess different pipelines and factual samples. Table 1 compares complete counterfactual generators, including QIOCE's own validity search and proximity refinement. In the reported full-pipeline Wine experiment, 54/54 outputs are target-valid; L2, sparsity, and plausibility are summarized across seeds 42, 66, and 79. Table 2 isolates initialization: QIOCE's internal refinement is disabled and replaced with the same external stochastic refiner applied to every initializer. It includes failures in validity and mean distance. Thus, 90% validity for Wine in Table 2 is not inconsistent with 54/54 in Table 1; the procedures, samples, and evaluation objectives differ. We clarified this distinction in the revised text.
  2. Hardware execution and scope. Our illustrated hardware case is two-qubit Moons on ibm_fez (8,192 shots), using single-qubit marginal readout without tomography. In an additional physical-device experiment, 150 active physical qubits executed 15 independent ten-qubit Diabetes instances in parallel, with parameters optimized offline. Readout yielded 11/15 target-valid candidates, improving to 15/15 after classical refinement. This is parallel execution of small circuits, not a single 150-qubit correlated optimizer or evidence of quantum speedup.
  3. Larger dataset, presentation, and reproducibility. We extended the evaluation to Give Me Some Credit, which has 150,000 labeled rows and ten features. For each of ten seeds, we trained the classifier on 120,000 rows and evaluated all methods on the same 240 factuals sampled from the 30,000 held-out rows. After refinement, QIOCE reached the target on 96.2 ± 3.1% of attempts, compared with 90.0 ± 10.4% for Genetic. Within normalized L2 ≤ 0.5, the rates were 12.1 ± 6.9% for QIOCE and 44.6 ± 8.8% for Genetic. This extends the evaluation to a larger training set and shows a trade-off between reaching the target and finding a nearby counterfactual. The dataset has ten features, so circuit-width scaling remains open. We corrected the broken variant name near line 352, repaired displaced text and figure/table placement, and checked the revised rendering. An anonymized reproduction package - https://anonymous.4open.science/r/ooo-001C/ contains code, settings, per-seed outputs, and summaries. Overall, the new evidence directly addresses parameter-matched controls, seeds 1–10, query allowances, validity reporting, hardware scope, and reproducibility. It supports QIOCE as an effective variational initializer in certain regimes without claiming quantum computational advantage.
Reviewer_9UCfOpenReview ↗
Rating
2
Confidence
2
Informativeness
1
Presentation
2
Soundness
3
Read review
Paper summary

The paper presents a method for generating counterfactual explanations using a quantum-classical framework. The goal is to create an alternative for an input to a classifier that looks like the input but has a different label prediction according to the classifier used.

Critical strengths

The problem is of value for many areas in applied machine learning in industry. I haven't seen a quantum inspired method employed before, and so I think this would be a novel approach to the problem.

Critical weaknesses

While the method may be novel, the experiments weren't very convincing that this is a significant contribution. The simple MNIST problem is blurry and unclear that anything very advanced is called for since the problem is very simple. Many of the data sets also seem simple so I don't know that a very advanced method is needed. My impression is that a very advanced quantum technique might be more than is really necessary for a simple problem like this.

Questions for authors

No questions

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.