QIOCE: QAOA-Inspired Optimization for Counterfactual Explanation
Anonymous authors
ICLR 2027
TL;DR. QIOCE uses variational quantum optimization to improve counterfactual search over classical initialisation baselines while supporting heterogeneous features and execution on noisy quantum hardware.
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.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
ICLR 2027
Under review · 3 reviews · OpenReview
Updated 24 Nov 2026, 16:48 UTC.
- Rating
- 1/4
- Confidence
- 2/4
- Soundness
- 2/3
- Presentation
- 2/3
- Informativeness
- 1/3
Read review
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.
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.
Weaknesses
-
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.
-
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 the authors
Clarification requests (answers could change my assessment):
-
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.
-
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.
-
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
- Rating
- 2/4
- Confidence
- 2/4
- Soundness
- 2/3
- Presentation
- 2/3
- Informativeness
- 2/3
Read review
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.
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).
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 the authors
Please check the weaknesses.
1 comment
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.
- 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.
- 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.
- 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.
- 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.
- Rating
- 2/4
- Confidence
- 2/4
- Soundness
- 3/3
- Presentation
- 2/3
- Informativeness
- 1/3
Read review
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.
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.
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 the authors
No questions
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
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.