Goto

Collaborating Authors

 counterfactual


Which Modality Decides? Counterfactual Modality Attribution for Multimodal Classifiers

arXiv.org Artificial Intelligence

Multimodal classifiers can achieve high accuracy while exploiting modality-specific shortcuts. Modality attribution quantifies the contributions of image and text, but does not by itself identify which input changes would alter a suspicious prediction. We introduce Counterfactual Modality Attribution (CMA), which connects modality-level contributions to explicit prediction-changing edits. CMA uses image and text diffusion priors to generate counterfactual references and constructs a two-player reference game whose Shapley--Taylor decomposition separates image, text, and interaction contributions. The method requires class-score queries but no model gradients. Attribution profiles are compared with a reference population to prioritize predictions with atypical modality reliance for review, while counterfactual edits expose localized evidence for inspection. On controlled image- and text-biased classifiers, CMA identifies the ground truth dominant modality for all evaluated inputs. On planted-shortcut benchmarks, it achieves shortcut-reliance detection AUROCs of 0.987 on Synthetic MNIST and 1.000 on OpenI, with image-shortcut localization IoUs of 0.97 and 0.84, respectively. An API experiment demonstrates applicability to a native multimodal language model with scored answer choices. CMA enables predictions to be screened by modality reliance and investigated through explicit counterfactual edits.


Causal-TS: A Python Library for Causal Discovery in Stationary and Nonstationary Time Series

arXiv.org Artificial Intelligence

We describe Causal-TS, an open-source Python library that provides a common interface and lagged-graph representation for causal discovery (structure learning) from stationary and nonstationary multivariate time series. It learns lagged and contemporaneous causal graphs with constraint-based (CDNOTS, CDNOTS+, Cedar), score-based (LGES, TGES, GES, LASSO-VAR, VARLiNGAM, Granger) and hybrid (GRACE, REAP) methods. The constraint-based methods share 17 linear and nonlinear conditional independence (CI) tests, nine with PyTorch implementations. It also provides candidate-regime detection with per-regime discovery, latent-confounder correction (LUCID), missing- and mixed-data support, a data-driven configuration recommender, a command-line interface, and an optional DoWhy bridge from a discovered graph to causal effect estimates and counterfactuals. The library is pip-installable, tested on Python 3.10-3.14, and available at https://github.com/bloomberg/causal-ts.


Market Impact Estimation via Causal Foundation Models

arXiv.org Artificial Intelligence

When a trader executes a large order, the relevant question is not \emph{what will the price be?} but \emph{what would the price have been had I not traded?} Market impact is thus a causal quantity, yet classical models (Almgren--Chriss, propagators) regress price on flow, which is biased whenever informed flow moves prices through information as well as trading. We present a proof-of-concept \emph{Causal Market Simulator}: a continuous-time causal prior-data fitted network (PFN) trained on a synthetic market prior in which a hidden informational flow confounds the flow--price relation by construction, with confounding strength an exact per-episode knob. On this prior, the naive estimator's bias follows a closed form we confirm empirically (up to 68\% overestimation), while the PFN tracks the unbiased true-parameter oracle at high confounding. Its \emph{do-ablated twin}, the same model with the intervention inputs removed, collapses onto the pre-window mean. Zero-shot, the model responds at the ground-truth scale to metaorders in an ABIDES limit-order book (+0.38 pre-onset standard deviations against seed-replay counterfactuals), and its intervention response replicates on about 2,300 detected flow bursts in BTC/ETH/SOL perpetuals and 3,800 on Nasdaq equities, evidence consistent with, though not proof of, causal transfer. Off-prior the response degrades gracefully, and split-conformal recalibration repairs interval calibration. Transfer hinges on encoding the metaorder as added flow rather than a clamped price level, not on more training. A recurrent state-space variant closes the remaining shape gap: its impact accrues over execution duration where the transformer's stays flat, raising the correlation with measured metaorder impact from +0.68 to between +0.92 and +0.96, at the cost of weaker on-prior deconfounding that traces to the training recipe rather than to recurrence.


When Covariance Is Not Enough: Kernel-Based Regularization for Single-Cell Counterfactuals

arXiv.org Artificial Intelligence

Counterfactual editing of single cells, predicting how an observed cell would look had one factor been different, enables in-silico screening where experiments are infeasible, but is useful only if the edit is faithful to the individual and not merely to the condition. Concept bottleneck generative models make the effects of interventions interpretable by decomposing a cell's representation into known and unknown factors. Previous work uses a linear cross-covariance penalty to disentangle known and unknown dimensions. We demonstrate that this first-order criterion does not fully separate information when non-linear interactions are present. We first demonstrate the inadequacy of linear cross-factor penalization with simulation experiments with controlled edits and known non-linear covariate effects. We then demonstrate that adding a nonlinear kernel criterion, the normalized Hilbert-Schmidt Independence Criterion, is able to recover the true intervention effects on simulation data. Finally, we apply the non-linear concept bottleneck model to a complex single-cell RNA-seq dataset and find that it improves the ability to generate counterfactual expression profiles of cells under different tissue environments.


A Framework for Task-Agnostic Counterfactual Fairness in Transformers through Activation Steering

arXiv.org Artificial Intelligence

Bias in transformer-based models is a growing concern as these architectures become more prevalent in automated decision-making systems, such as prediction models for hiring, lending, and clinical treatment recommendation. Mechanistic interpretability (MI) is a growing body of work that measures meaningful causal effects of activations on model output by identifying human-interpretable features encoded in model activations. When such features correspond to sensitive attributes, they provide a direct way to quantify the bias those attributes introduce and to causally intervene to mitigate it. However, counterfactual fairness (CF) methods have not been systematically adapted to this setting of intervening on interpretable mechanisms in transformers. We propose a framework, Mechanistic Interpretability for Counterfactual Fairness (MICF), that utilizes MI tools to reformulate CF constraints in terms of transformer activations, unifying former approaches into a single pipeline for fairness analysis in transformers. MICF does not require a prior causal model or specific transformer architecture. We evaluate MICF on real-world tabular data and show that CF can be improved across different prediction tasks.


Inside VLM Chart Reading: Tracing Value Reading from Vertical Bar Charts Across Space and Depth

arXiv.org Artificial Intelligence

Vision-language models (VLMs) can answer chart questions accurately, but output accuracy alone provides limited insight into the internal representations supporting exact value reading. We study value reading from vertical bar charts through controlled counterfactual activation patching in Qwen2.5-VL-7B-Instruct and InternVL3.5-8B. Our study connects three analyses. First, under one-tick bar-height counterfactuals, patching states selected by the changed-height region produces greater restoration of the original answer preference than patching states selected by the invariant bar body. Across language-model depth, restoration from legend- and series-related positions declines earlier than restoration from bar-geometry and axis-scale positions. Second, we identify middle-layer states at series-related prompt positions that can restore answer preference under legend swaps. Resetting these states selectively weakens restoration from an earlier visual-legend patch, demonstrating their causal role in the downstream effects of that intervention. Third, a factorial analysis shows that both models can combine geometry and scale states from separate donors to favor the combined target answer. Together, these results provide causal evidence about the internal states supporting exact bar-value reading.


CounterFlow: Target-Conditioned Flow Matching for Visual Counterfactuals

arXiv.org Artificial Intelligence

On the one hand, in generative modeling, diffusion models currently dominate the landscape for high-quality image, video, and audio synthesis (Rombach et al., 2022; Ho et al., 2022; Liu et al., 2023a). However, they are also well-known for their slow training times and their stochastic sampling paths. To address these limitations, Lipman et al. (2023); Albergo and Vanden-Eijnden (2023); Liu et al. (2023b) introduced Conditional Flow Matching (CFM). CFM is a generative modeling framework based on Continuous Normalizing Flows (CNFs) that uses standard regression objectives for training. Moreover, instead of relying on diffusion processes, CFM generates examples by integrating the CNF's ODE along deterministic trajectories. On the other hand, the generative models' ability to generate complex data distributions and thus to produce realistic examples is particularly appealing for eXplainable Artificial Intelligence (XAI, Dwivedi et al., 2023), where one aims to produce counterfactual explanations (Wachter et al., 2017), i.e., examples (i) close to a given input, (ii) plausible, and (iii) that change the model's prediction. Unlike adversarial examples that rely on imperceptible noise to fool the classifier, counterfactual examples expose meaningful changes, helping users to trust the model while enabling developers to debug it. Our work leverages CFM to create counterfactual explanations: rather than generating images from random noise, our approach transports an input sample toward a counterfactual conditioned on a user-defined target class, while jointly optimizing for plausibility and proximity; see Figure 1.


Winner's Curse Drives False Promises in Data-Driven Decisions

arXiv.org Artificial Intelligence

A major challenge in data-driven decision-making is accurate policy evaluation---i.e., guaranteeing that a learned decision-making policy achieves the promised benefits. A popular strategy is model-based policy evaluation, which estimates a model from data to infer counterfactual outcomes. This strategy is known to produce unwarrantedly optimistic estimates of the true benefit due to the winner's curse. We searched the recent literature on data-driven decision-making, identifying a sample of 55 papers published in Management Science in the past decade; all but two relied on this flawed methodology. Several common justifications are provided: (1) the estimated models are accurate, stable, and well-calibrated, (2) the historical data uses random treatment assignment, (3) the model family is well-specified, and (4) the evaluation methodology uses sample splitting. Unfortunately, we show that no combination of these justifications avoids the winner's curse. First, we provide a theoretical analysis demonstrating that the winner's curse can cause large, spurious reported benefits even when all these justifications hold. Second, we perform a simulation study based on the recent and consequential data-driven refugee matching problem. We construct a synthetic refugee matching environment (calibrated to closely match the real setting) but designed so that no assignment policy can improve expected employment compared to random assignment. Model-based methods report large, stable gains of around 60% even when the true effect is zero; these gains are on par with improvements of 22-75% reported in the literature. Our results provide strong evidence against model-based evaluation.


Causal inference and model explainability analysis of a real world sales dataset

arXiv.org Artificial Intelligence

Most major retailers today have multiple divisions focused on various aspects, such as marketing, supply chain, online customer experience, store customer experience, employee productivity, and vendor fulfillment. They also regularly collect data corresponding to all these aspects as dashboards and weekly/monthly/quarterly reports. Although several machine learning and statistical techniques have been in place to analyze and predict key metrics, such models typically lack interpretability. Moreover, such techniques also do not allow the validation or discovery of causal links. In this paper, we aim to provide a recipe for applying model interpretability and causal inference for deriving sales insights. In this paper, we review the existing literature on causal inference and interpretability in the context of problems in e-commerce and retail, and apply them to a real-world dataset. We find that an inherently explainable model has a lower variance of SHAP values, and show that including multiple confounders through a double machine learning approach allows us to get the correct sign of causal effect.


Graph-Regularized Synthetic Control for Stable Counterfactual Estimation under Donor Redundancy

arXiv.org Artificial Intelligence

Synthetic control methods estimate counterfactual outcomes by weighting untreated donor units to match a treated unit before treatment. In recent applications, however, the donor pool can be large, highly correlated, and short in pre-treatment history, yielding many near-equivalent solutions with unstable and difficult-to-interpret donor weights. We propose Graph-Regularized Synthetic Control (Graph-SC), a convex estimator that augments the classical pre-treatment matching objective with a graph Laplacian penalty. The graph encodes similarity among donor trajectories, encouraging coherent weights over structurally related donors while preserving the transparency of synthetic controls. We provide theoretical results characterizing the bias-variance tradeoff induced by graph regularization and establish efficient convergence guarantees with an accelerated proximal gradient method. Across a controlled simulation under donor redundancy, the California Proposition 99 benchmark, and observational counterfactual analyses on the Waymo Open Motion Dataset, Graph-SC improves weight stability, reduces sensitivity to redundant donor pools, and maintains competitive pre- and post-treatment accuracy relative to classical and regularized synthetic control baselines. Our results suggest that graph regularization is most valuable not as a universal accuracy booster, but as a principled mechanism for selecting stable and interpretable counterfactuals from near-equivalent synthetic controls with comparable pre-treatment fit.