REVIEW 4 major objections 7 minor 25 references
A control system framework for counterfactuals: an optimization based approach
T0 review · 4 major / 7 minor · reviewed 2026-08-10 · deepseek-v4-flash
Pith's one-line read Counterfactual explanations recast as minimum-effort endpoints of a control system.
desk verdict A sensible reframing of counterfactuals as minimum-effort optimal control, but the moment-based extraction step relies on an unjustified atomicity assumption that can produce non-reachable barycenters. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The engine is the occupation-measure formulation of optimal control. The trajectory is represented by three measures, the initial measure $\mu_0$, the occupation measure $\mu$, and the terminal measure $\mu_\tau$, linked by Liouville's equation $\delta_T \otimes \mu_T = \delta_0 \otimes \mu_0 + L^*\mu$. This turns the nonlinear reachability-and-effort problem into an infinite-dimensional linear program, which the moment-SOS hierarchy approximates by a sequence of semidefinite programs in truncated moment space. The terminal measure's first-order moment $y_{1,\tau}$, or in the dual a polynomial subsolution $v$ of the Hamilton-Jacobi-Bellman equation, is what the extraction algorithms use to read off the counterfactual.
What would settle it
For a two-state linear system with two equally cheap safe endpoints, solving the moment relaxation and checking whether the first moment of the terminal measure is a reachable endpoint under any admissible control would settle the extraction claim: if it is not, Algorithm 1's output is a barycenter rather than a counterfactual.
Extended reading notes
Core claim
The paper's central claim is that a counterfactual can be defined without reference to any classifier, purely from the system dynamics: given a factual $x_f \in X_0$, the CS-counterfactual is $x_{cf} = x(\tau \mid x_f, u^*)$, the endpoint of the trajectory generated by the control $u^*$ that minimizes $\int_0^\tau u^2\,dt$ subject to the dynamics and $x(\tau) \in X_T$. This minimum-effort steering problem is lifted to a linear program over occupation measures, where Liouville's equation encodes the dynamics as a linear constraint. Solving a finite-dimensional moment-SOS relaxation yields a lower bound on the true cost; under the atomicity condition, the first-order moment of the terminal measure gives the counterfactual, and the dual polynomial provides a control law that can be simulated to recover the full trajectory. For uncertain parameters, the same construction is applied to an extended system in which unknown parameters become zero-dynamics states, producing robust counterfactuals that respect the whole range of parameter values.
Load-bearing premise
The extraction step assumes that the optimal terminal measure is concentrated on a single point, so its first-order moment is itself a reachable counterfactual state; finite moment relaxations do not guarantee this atomicity.
Editorial extensions
If this is right
- Counterfactuals produced this way are actual trajectory endpoints, so they are reachable under the system's dynamics rather than arbitrary feature perturbations.
- The method applies to general polynomial, control-affine nonlinear systems and does not require a trained classifier, only a safe set and a dynamic model.
- For uncertain parameter values, the extended-state formulation yields counterfactuals that remain safe for every parameter in the specified set, at the price of lying farther from the boundary.
- The dual solution gives a feedback law, so one can simulate the full factual-to-counterfactual trajectory, not just the terminal point.
- The measure relaxation also computes a lower bound on the minimum control effort, which could serve as a quantitative measure of how hard it is to transition from an unsafe to a safe state.
Reading between the lines
- Editorial inference: the same LP-in-measures machinery could certify infeasibility, meaning that if no measure satisfies the constraints, no control of the allowed form can reach the safe set, which amounts to a formal certificate that a counterfactual does not exist within budget.
- Editorial inference: the dense clusters of counterfactuals seen in the experiments are likely shaped by the system's controllability and the value function's level sets; one could test this by comparing cluster locations against level sets of $v$ from the dual.
- Editorial inference: when the terminal measure is not atomic, a more honest output would be a set or distribution of safe endpoints; checking the rank of the moment matrix $M_d(y_\tau)$ could flag this before extracting a single point.
- Editorial inference: the framework could be extended to stochastic dynamics by replacing Liouville's equation with the Fokker-Planck equation, giving counterfactuals that are reachable with high probability rather than deterministically.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes a control-theoretic definition of counterfactuals: given a factual initial condition in an unsafe set, the counterfactual is the terminal state of a minimum-effort optimal control problem that steers the system to a safe set with free terminal time. The problem is formulated as an infinite-dimensional linear program in occupation measures and solved through the moment-SOS hierarchy. Three extraction algorithms are proposed: reading the counterfactual as the first-order moment of the terminal measure (Algorithms 1 and 3), and simulating a closed-loop trajectory from the approximate dual value function (Algorithm 2). The approach is extended to systems with uncertain parameters by augmenting the state with the uncertain parameters, and numerical experiments are reported on a Bergman glucose-insulin model.
Significance. The idea of grounding counterfactuals in dynamical reachability and minimum effort, rather than in classifier geometry alone, is timely and potentially valuable for safety-critical and biomedical applications. The paper correctly identifies occupation measures and the moment-SOS hierarchy as natural tools for this problem, and the robust extension in Section 4 is a useful addition. However, the central computational claim, that a counterfactual can be read off as the first moment of the terminal measure from a finite relaxation, is not justified and is false in general. Because the numerical results in Sections 3.5 and 4.5 rely on this extraction, the contribution as written is not yet established. If the extraction step is repaired with atomicity certificates or a certified trajectory-recovery procedure, the framework could become a useful addition to the counterfactual-explanation literature.
major comments (4)
- [§3.4, Proposition 1 and Algorithm 1] The proposition infers from mass(mu_tau)=1 that mu_tau is a Dirac measure. This inference is invalid: a non-atomic measure can have total mass 1, and a finite-order truncated moment vector need not even have a representing measure. Consequently, xcf = y_1,tau may be a barycenter of several candidate endpoints and need not be a reachable terminal state of any feasible trajectory. The extraction step must be justified by a flat-extension or rank-one certificate on M_d(y_tau), or replaced by a recovery method that reconstructs an atomic terminal measure; the numerical sections should report such certificates.
- [§4.2, equations (20b)-(22c)] The claim that constraint (22c) together with Liouville's equation implies that the final measure mu_t* is atomic is incorrect. Choosing the test function v=1 in (20b) only gives conservation of mass, <1,mu_0>=<1,mu_t*>, which says nothing about atomicity. The subsequent statement that if (22) admits s optimal solutions then mu_t* is s-atomic is also false: the feasible set of (22) is convex, so any convex combination of optimal terminal measures is again optimal, and the set of optimal endpoints can be a continuum. These errors invalidate Proposition 3 and Algorithm 3 as stated.
- [§3.4, Proposition 2 and Algorithm 2] The dual-based trajectory recovery is not certified. For a finite relaxation order d, the dual solution v_d is only a subsolution of the value function, and the control u*_d(x) obtained from it is not guaranteed to steer the closed-loop system to X_T at time tau=mass(mu). No reachability or optimality proof is provided for Algorithm 2, so this alternative extraction path also does not currently support the paper's claims.
- [§3.4, Theorems 1-3] The formal results are either near-tautological or not established. Theorem 1 only asserts boundedness of trajectories, which follows from compactness of X when the setup is well posed. Theorem 2's proof assumes V(x)=0 on X_T and V(x)>0 elsewhere, which is not established by (6a)-(6d), and the inequality L_f V <= -phi with phi=u^2 does not imply asymptotic stability of X_T because u^2 is a control-dependent quantity rather than a positive definite function of the state alone. Theorem 3 is a boundedness statement on a compact set and provides no convergence or reachability guarantee. These results should be corrected, or their statements and proofs removed, so that the advertised guarantees match what is actually shown.
minor comments (7)
- [§2.1] The sentence 'For alpha=1 we get the mass of the measure' is incorrect in multi-index notation: the mass is y_0=<1,mu>, not the first-order moment y_1.
- [§2.1] The line defining the adjoint operator says 'H*=H', which is not generally true; the correct identity is <Hv,mu>=<v,H*mu>.
- [§2.3, equation (2)] The constraint 'p(x)-sum_i a_i(x)v_i >= 0' is written with 'for all i=1,...,I_max', but the positivity condition applies to the single polynomial in the sum, not to each index i separately.
- [§3.4, Remark after Proposition 1] The expression 'xcf = spt(mu_tau=delta_x_tau)=sum_i beta_i*x_tau_i' is not well-formed: spt of a measure is a set of atoms, not a weighted sum. The intended meaning should be written with the measure itself, e.g. mu_tau=sum_i beta_i*delta_x_tau_i.
- [§3.5] Equation (13) is labeled with two numbers, (13) and (14), for a single displayed polynomial; the duplicate label should be removed.
- [§4.5] The text says 'parameters p3 and p3 are related to the dynamics'; the second occurrence should presumably be p2.
- [§4.5] The observation that counterfactuals lie near the boundary of the safe set is a direct consequence of the free-terminal-time, no-terminal-cost minimum-effort formulation, not an independent empirical discovery; the paper should present it as such.
Circularity Check
Two central 'findings' reduce to definitions: boundary placement is the min-effort terminal-set objective, and Proposition 1's xcf=y1,τ restates Algorithm 1's extraction rule; the mass-one atomicity inference is asserted rather than derived.
-
self definitional
[Section 3.1, Definition 2; Section 3.5, Results under Fig.1]
"Given a CS-factual xf ∈ X0, we define the CS-counterfactual xcf associated with the factual xf ∈ X0 as xcf := x(τ |xf,u∗), xcf ∈ XT ... Counterfactuals lie in the safe set in the vicinity of the boundary (i.e., the diabetic threshold) separating the safe set from the unsafe set."
Definition 2 makes the counterfactual the terminal point of the minimum-effort trajectory that is constrained to end in the safe set XT. Under Assumption 5 the cost is only ∫u^2 with no terminal cost, so the optimal endpoint of a free-terminal-time transfer to XT is generically on the boundary of XT. The observed 'vicinity of the boundary' property is therefore a restatement of the optimization objective and constraints, not an independently derived prediction. The claim is forced by the definition of CS-counterfactual plus Assumption 1.
-
self definitional
[Section 3.4, Algorithm 1 and Proposition 1]
"Algorithm 1: 3: Extract y1,τ from Md(yτ) 4: xcf = y1,τ ... Proposition 1: If mass(µτ) = 1, then the counterfactual xcf = spt(µτ = δxτ) and it holds that xcf = y1,τ."
The extraction rule of Algorithm 1 is precisely the equality xcf = y1,τ. Proposition 1 then 'proves' that same equality under the condition mass(µτ)=1, so the conclusion is the algorithm's definition restated rather than a consequence of the OCP definition of counterfactual. The only nontrivial ingredient needed for the claimed derivation is a certificate that a unit-mass final measure is a Dirac delta; the paper asserts this without proof, and it is false in general (a uniform measure has mass one and its first moment is a barycenter, not an atom). The same reduction-by-definition appears in Algorithm 3/Proposition 3 for the robust case.
full rationale
The paper's moment-SOS computation itself is not circular: it solves a genuine infinite-dimensional LP for minimum-effort control, and the convergence statements are imported from the independent occupation-measure literature (Lasserre, Henrion, Korda, etc.), not from the authors' own prior work. No self-citation is load-bearing for the core LP relaxation. However, two claimed outputs do reduce to their inputs by construction. First, the empirical observation that counterfactuals lie near the safe-set boundary is a direct consequence of Definition 2 (terminal state in XT) together with the minimum-effort objective (no terminal cost), so it has no independent predictive content. Second, the extraction step defines xcf as the first moment y1,τ in Algorithm 1 and then Proposition 1 purports to derive xcf=y1,τ from unit mass; since unit mass does not imply atomicity, the proposition supplies no independent derivation and the equality is simply the algorithm's construction. The same issue affects the robust Algorithm 3/Proposition 3 and the §4.2 claim that mass conservation makes μt* atomic. Those issues are also correctness risks, but the circular aspect is that the 'predicted' counterfactual equals the output variable by definition. Because the core optimization framework remains independently meaningful, the circularity is partial (score 6) rather than total.
Assumptions & free parameters
assumptions (8)
- domain assumption Assumption 1: X0 ⊆ Xu and XT ⊆ Xs, where Xu and Xs are unsafe and safe sets.
- domain assumption Assumption 2: The vector field is polynomial and Lipschitz, and the sets X, XT are semialgebraic.
- domain assumption Assumption 3: The vector field is affine in the control input.
- domain assumption Assumption 4: The control is Lp-measurable with finite norm.
- ad hoc to paper Assumption 5: The effort is the L2 norm of the control and there is no terminal cost.
- domain assumption Assumption 6: Uncertain parameters are constant over time and lie in a known set.
- standard math Convergence of the moment-SOS hierarchy to the true optimal value as d → ∞ (Theorem 4.1 in [12]).
- domain assumption The value function V(x) satisfies V(x)=0 on XT and V(x)>0 elsewhere.
Cite this review
Pith. "Pith review of A control system framework for counterfactuals: an optimization based approach." pith.science (2026). https://pith.science/paper/RSLMHTSW
@misc{pith2026250112914,
author = {Pith},
title = {Pith review of: A control system framework for counterfactuals: an optimization based approach},
year = {2026},
howpublished = {\url{https://pith.science/paper/RSLMHTSW}},
note = {Machine review of arXiv:2501.12914}
}
read the original abstract
Counterfactuals are a concept inherited from the field of logic and in general attain to the existence of causal relations between sentences or events. In particular, this concept has been introduced also in the context of interpretability in artificial intelligence, where counterfactuals refer to the minimum change to the feature values that changes the prediction of a classification model. The artificial intelligence framework of counterfactuals is mostly focused on machine learning approaches, typically neglecting the physics of the variables that determine a change in class. However, a theoretical formulation of counterfactuals in a control system framework - i.e., able to account for the mechanisms underlying a change in class - is lacking. To fill this gap, in this work we propose an original control system, physics-informed, theoretical foundation for counterfactuals, by means of the formulation of an optimal control problem. We apply the proposed methodology to a general glucose-insulin regulation model and results appear promising and pave the way to the possible integration with artificial intelligence techniques, with the aim of feeding machine learning models with the physics knowledge acquired through the system framework.
Figures
Reference graph
Works this paper leans on
-
[1]
A control system framework for counterfactuals: an optimization-based app roach,
P . De Paola, J. Miller, A. Borri, A. Paglialonga, and F. Dabbene, “A control system framework for counterfactuals: an optimization-based app roach,” in Submitted to 19 0 5 10 15 20 25 30 120 140 160 180 200 220 240 0 5 10 15 20 25 30 120 140 160 180 200 220 240 Figure 5: Factuals vs Counterfactuals obtained ford = 4 (top panel) andd = 6 (bottom panel). B...
work page 2025
-
[2]
Robust control- driven counterfactual generation for uncertain systems,
P . De Paola, J. Miller, A. Borri, A. Paglialonga, and F. Da bbene, “Robust control- driven counterfactual generation for uncertain systems,” in Submitted to Pro- ceedings of the 11th IF AC Symposium on Robust Control Design (ROCOND’25), 20 2025
work page 2025
-
[3]
Counterfactual explanations and how to fin d them: literature re- view and benchmarking,
R. Guidotti, “Counterfactual explanations and how to fin d them: literature re- view and benchmarking,” Data Mining and Knowledge Discovery , vol. 38, no. 5, pp. 2770–2824, 2024
work page 2024
-
[4]
Lewis, Counterfactuals
D. Lewis, Counterfactuals. John Wiley & Sons, 2013
2013
-
[5]
Counterfac tual explanations without opening the black box: Automated decisions and the gdpr,
S. Wachter, B. Mittelstadt, and C. Russell, “Counterfac tual explanations without opening the black box: Automated decisions and the gdpr,” Harv. JL & T ech., vol. 31, p. 841, 2017
work page 2017
-
[6]
Counterfactual building and evaluation via explainable support vector dat a description,
A. Carlevaro, M. Lenatti, A. Paglialonga, and M. Mongell i, “Counterfactual building and evaluation via explainable support vector dat a description,” IEEE Access, vol. 10, pp. 60849–60861, 2022
work page 2022
-
[7]
M. Lenatti, A. Carlevaro, A. Guergachi, K. Keshavjee, M. Mongelli, and A. Paglialonga, “A novel method to derive personalized mini mum viable recom- mendations for type 2 diabetes prevention based on counterf actual explanations,” Plos one, vol. 17, no. 11, p. e0272825, 2022
work page 2022
-
[8]
Multi-class coun- terfactual explanations using support vector data descrip tion,
A. Carlevaro, M. Lenatti, A. Paglialonga, and M. Mongell i, “Multi-class coun- terfactual explanations using support vector data descrip tion,” IEEE Transactions on Artificial Intelligence , 2023
work page 2023
Show all 25 references
-
[9]
A survey of contrastive and counterfactual explanation generation methods for explainable artificial intel- ligence,
I. Stepin, J. M. Alonso, A. Catala, and M. Pereira-Fari˜ na, “A survey of contrastive and counterfactual explanation generation methods for explainable artificial intel- ligence,” IEEE Access, vol. 9, pp. 11974–12001, 2021
2021
-
[10]
Counterfactuals and explanation,
B. Kment, “Counterfactuals and explanation,” Mind, vol. 115, no. 458, pp. 261– 310, 2006
2006
-
[11]
Nonlinea r optimal control syn- thesis via occupation measures,
D. Henrion, J. B. Lasserre, and C. Savorgnan, “Nonlinea r optimal control syn- thesis via occupation measures,” in 2008 47th IEEE Conference on Decision and Control, pp. 4749–4754, IEEE, 2008
2008
-
[12]
N onlinear optimal control via occupation measures and lmi-relaxations,
J. B. Lasserre, D. Henrion, C. Prieur, and E. Tr´ elat, “N onlinear optimal control via occupation measures and lmi-relaxations,” SIAM journal on control and opti- mization, vol. 47, no. 4, pp. 1643–1666, 2008
2008
-
[13]
Henrion, M
D. Henrion, M. Korda, and J. B. Lasserre, Moment-sos Hierarchy, The: Lectures In Probability, Statistics, Computational Geometry, Control And Nonlinear Pdes, vol. 4. World Scientific, 2020
2020
-
[14]
J. B. Lasserre, Moments, positive polynomials and their applications , vol. 1. World Scientific, 2009
2009
-
[15]
Peak estimation recovery and safety anal- ysis,
J. Miller, D. Henrion, and M. Sznaier, “Peak estimation recovery and safety anal- ysis,” IEEE Control Systems Letters, vol. 5, no. 6, pp. 1982–1987, 2021. 21
1982
-
[16]
Polynomial approximation of regions of attraction via occupation meas ures: an application to a biological autonomous system,
P . De Paola, A. Borri, A. Paglialonga, P . Palumbo, and F. Dabbene, “Polynomial approximation of regions of attraction via occupation meas ures: an application to a biological autonomous system,” in Proceedings of the IEEE 20th International Conference on Automation Science a...
2024
-
[17]
Linear programming in infini te-dimensional spaces: theory and applications,
P . Nash and E. J. Anderson, “Linear programming in infini te-dimensional spaces: theory and applications,” (No Title), 1987
1987
-
[18]
H. O. Fattorini, Infinite dimensional optimization and control theory , vol. 54. Cambridge University Press, 1999
1999
-
[19]
Khalil, Nonlinear systems
H. Khalil, Nonlinear systems. Prentice Hall, 2002
2002
-
[20]
Q uantitative estima- tion of insulin sensitivity.,
R. N. Bergman, Y . Z. Ider, C. R. Bowden, and C. Cobelli, “Q uantitative estima- tion of insulin sensitivity.,” American Journal of Physiology-Endocrinology And Metabolism, vol. 236, no. 6, p. E667, 1979
1979
-
[21]
The english national health serv ice diabetes preven- tion programme (nhs dpp): A scoping review of existing evide nce,
M. Whelan and L. Bell, “The english national health serv ice diabetes preven- tion programme (nhs dpp): A scoping review of existing evide nce,” Diabetic Medicine, vol. 39, no. 7, p. e14855, 2022
2022
-
[22]
Measu res and lmi for space launcher robust control validation,
D. Henrion, M. Ganet-Schoeller, and S. Bennani, “Measu res and lmi for space launcher robust control validation,” IF AC Proceedings V olumes, vol. 45, no. 13, pp. 236–241, 2012
2012
-
[23]
Bounding extreme events i n nonlinear dynamics using convex optimization,
G. Fantuzzi and D. Goluskin, “Bounding extreme events i n nonlinear dynamics using convex optimization,” SIAM journal on applied dynamical systems , vol. 19, no. 3, pp. 1823–1864, 2020
2020
-
[24]
The long-term effects of physical activity on blo od glucose regula- tion: a model to unravel diabetes progression,
P . F. De Paola, A. Paglialonga, P . Palumbo, K. Keshavjee , F. Dabbene, and A. Borri, “The long-term effects of physical activity on blo od glucose regula- tion: a model to unravel diabetes progression,” IEEE Control Systems Letters , vol. 7, pp. 2916–2921, 2023
2023
-
[25]
A novel mathematical model for predicting the benefi ts of physical activ- ity on type 2 diabetes progression,
P . F. De Paola, A. Borri, F. Dabbene, K. Keshavjee, P . Pal umbo, and A. Paglia- longa, “A novel mathematical model for predicting the benefi ts of physical activ- ity on type 2 diabetes progression,” arXiv preprint arXiv:2404.14915 , 2024. 22
2024 arXiv
Reviewed August 10, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.