Answers are grounded in this paper and cite their sources.
Computational study demonstrates unified causal inference and counterfactual query operators across relational datasets, suggesting enhanced decision-support capabilities in database engines.
Relational databases power high-stakes decisions in lending, healthcare, and justice, yet SQL lacks native constructs for causal and counterfactual reasoning. Prior SQL-based causal systems address parts of this gap but do not unify treatment-effect estimation with counterfactual generation in a single, composable SQL surface. We present a system that extends the SQL dialect with two declarative operators: EXPLAIN_CAUSALLY_WHY (ψ) for estimating average and conditional treatment effects via meta-learners, and EXPLAIN_COUNTERFACTUAL (φ) for generating diverse, constraint-respecting alternatives via a hybrid KD-tree/LSH pipeline. Both operators consume standard SQL relations (joins, filters, projections) and return table-valued results with optional diagnostics, confidence intervals, and feasibility metrics. We formalize the operators in relational algebra, and describe our prototype system called PsiQL. On four evaluation datasets, PsiQL recovers a protective TWINS treatment effect, returns a non-significant COMPAS point ATE with imbalance diagnostics, flags HMDA covariate imbalance via built-in SMD checks, and generates constraint-respecting counterfactuals; a synthetic Census run serves as a balanced pipeline proof-of-concept alongside a real ACS diagnostic under severe imbalance.
No takes yet. Share an insight, caveat, or question.
Peter et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: