Paper deep dive
Which Modality Decides? Counterfactual Modality Attribution for Multimodal LLMs
Vahidin Hasic, Chao Wang, Luis C. Garcia-Peraza-Herrera, David Watson, Senka Krivic
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 90%
Last extracted: 8/5/2026, 3:25:34 AM
Summary
The paper introduces Counterfactual Modality Attribution (CMA), a framework for quantifying modality-level contributions in Multimodal Large Language Models (MLLMs). CMA uses coupled diffusion priors to generate image-only, text-only, and joint counterfactuals, then applies Shapley values from cooperative game theory to attribute prediction decisions to specific modalities. It aims to reveal hidden modality reliance and unsafe reasoning in high-stakes applications like clinical decision support.
Entities (7)
Relation Signals (6)
Counterfactual Modality Attribution → targets → Multimodal Large Language Models
confidence 95% · propose Counterfactual Modality Attribution (CMA), the first framework for quantifying modality-level contributions in MLLMs.
Counterfactual Modality Attribution → uses → Shapley Values
confidence 95% · CMA ... converts them into principled modality attribution scores through a cooperative game-theoretic formulation based on Shapley values.
Counterfactual Modality Attribution → uses → Diffusion Models
confidence 95% · CMA generates image-only, text-only, and joint multimodal counterfactuals using coupled diffusion priors
DDPM → usedfor → Image Modality
confidence 90% · For the image modality, we employ the Denoising Diffusion Probabilistic Model (DDPM)
RDLM → usedfor → Text Modality
confidence 90% · For the text modality, we adopt the Riemannian Diffusion Language Model (RDLM)
Counterfactual Modality Attribution → evaluatedon → Clinical Dataset
confidence 85% · We evaluate CMA on ... a real-world multimodal clinical dataset.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Multimodal large language models (MLLMs) increasingly support high-stakes decision making by combining complementary information from images and text. While existing explainability methods identify influential image regions or text tokens, they cannot answer a fundamental question: which modality drives a prediction? Consequently, a model may produce the correct output while relying on the wrong source of evidence, masking shortcut learning and unsafe reasoning. We formulate modality attribution as a complementary explainability objective for multimodal foundation models and propose Counterfactual Modality Attribution (CMA), the first framework for quantifying modality-level contributions in MLLMs. CMA generates image-only, text-only, and joint multimodal counterfactuals using coupled diffusion priors and converts them into principled modality attribution scores through a cooperative game-theoretic formulation based on Shapley values. We evaluate CMA on controlled synthetic benchmarks with known ground-truth modality reliance and on a real-world multimodal clinical dataset. CMA correctly identifies the decision-driving modality in 98% of controlled cases and consistently outperforms baselines, revealing failures of cross-modal reasoning that remain invisible to predictive accuracy alone. Our results establish modality attribution as a complementary dimension of explainability beyond feature attribution, providing a principled framework for auditing multimodal foundation models in safety-critical applications.
Tags
Links
- Source: https://arxiv.org/abs/2608.00076v2
- Canonical: https://arxiv.org/abs/2608.00076v2
Trouble viewing inline? Open PDF directly →
Full Text
48,093 characters extracted from source content.
Expand or collapse full text
Which Modality Decides? Counterfactual Modality Attribution for Multimodal LLMs Vahidin Hasić1 , Chao Wang2, Luis C. Garcia-Peraza-Herrera2, David Watson2 , Senka Krivic1 Abstract Multimodal large language models (MLLMs) increasingly support high-stakes decision making by combining complementary information from images and text. While existing explainability methods identify influential image regions or text tokens, they cannot answer a fundamental question: which modality drives a prediction? Consequently, a model may produce the correct output while relying on the wrong source of evidence, masking shortcut learning and unsafe reasoning. We formulate modality attribution as a complementary explainability objective for multimodal foundation models and propose Counterfactual Modality Attribution (CMA), the first framework for quantifying modality-level contributions in MLLMs. CMA generates image-only, text-only, and joint multimodal counterfactuals using coupled diffusion priors and converts them into principled modality attribution scores through a cooperative game-theoretic formulation based on Shapley values. We evaluate CMA on controlled synthetic benchmarks with known ground-truth modality reliance and on a real-world multimodal clinical dataset. CMA correctly identifies the decision-driving modality in 98% of controlled cases and consistently outperforms baselines, revealing failures of cross-modal reasoning that remain invisible to predictive accuracy alone. Our results establish modality attribution as a complementary dimension of explainability beyond feature attribution, providing a principled framework for auditing multimodal foundation models in safety-critical applications. Introduction Multimodal large language models (MLLMs) are increasingly deployed in high-stakes applications where images and text provide complementary evidence for decision making. In clinical decision support, for example, models combine radiological images with electronic health records (EHRs), laboratory measurements, medication histories, and physician notes to assist diagnosis and treatment recommendations (Acosta et al. 2022; Soenksen et al. 2022; Simon and others 2025). Although integrating multiple modalities often improves predictive performance, benchmark accuracy alone does not reveal how a model reached its decision. A prediction may be correct while relying disproportionately on a single modality, ignoring clinically decisive information contained in another. Such hidden modality reliance can lead to unsafe or unreliable behavior that remains invisible to conventional performance metrics. Thus, understanding which modality actually drives a prediction is as important as determining whether the prediction itself is correct. Figure 1: Illustration of modality attribution failure in a medical MLLM. A patient with pneumonia is correctly diagnosed from chest X-ray imaging. However, the EHR specifies a severe penicillin allergy. When the model properly integrates both image and text modalities, it recommends azithromycin, leading to safe recovery. If the model relies predominantly on the image modality and ignores the allergy information, it prescribes amoxicillin, potentially triggering life-threatening anaphylaxis. This concern is especially acute when different modalities provide complementary but functionally distinct information for downstream decision-making. For example, a chest X-ray may support a diagnosis of community-acquired pneumonia, while the accompanying EHR records a severe penicillin allergy that should alter the recommended treatment (Fig. 1). A model that correctly diagnoses pneumonia but ignores the allergy information may recommend an unsafe beta-lactam antibiotic despite making the correct diagnosis. Recent studies show that strong predictive performance does not necessarily imply faithful multimodal reasoning. Models may exploit modality-specific shortcuts instead of integrating complementary evidence (Joshi et al. 2026; Asadi et al. 2026), making benchmark accuracy insufficient for determining whether predictions genuinely rely on multiple modalities. This motivates a fundamental question that existing evaluation protocols cannot answer: which modality actually drives the prediction? Existing explainability methods identify influential image regions or textual tokens (Selvaraju et al. 2017; Ben Melech Stan et al. 2024; Li and others 2025), explaining where evidence is located within individual modalities. However, because they operate locally within single channels, they do not quantify the relative contribution of entire modalities or determine whether a prediction was driven primarily by the image, the text, or their interaction. In clinical settings, for instance, a saliency map may highlight a lung opacity while failing to reveal that critical text notes were completely disregarded. We argue that modality attribution constitutes a distinct explainability problem, complementary to feature attribution. Moreover, measuring modality attribution with naive interventions on individual modalities introduces out-of-distribution artifacts that corrupt model representations and distort confidence estimates. Faithful attribution instead requires counterfactual reasoning with manifold perturbations alongside a game-theoretic formulation to isolate both individual and non-linear joint modality contributions. To address this challenge, we introduce Counterfactual Modality Attribution (CMA), a model-agnostic framework for quantifying modality-level contributions in pretrained MLLMs. CMA generates realistic image-only, text-only, and joint counterfactuals using coupled diffusion priors. These define a two-player cooperative game whose Shapley values provide principled modality attribution scores, quantifying each modality’s causal contribution to the final prediction. Unlike existing explainability methods, CMA explicitly separates reliance on individual modalities from their joint interaction, enabling direct auditing of multimodal reasoning at the modality level. The source code is provided in the supplementary material and will be released upon acceptance. Our main contributions are summarized as follows: • A complementary explainability objective. We formulate modality attribution as a complementary objective for multimodal foundation models, alongside feature attribution, and show how it can identify which modality drives a prediction. • A novel multimodal counterfactual framework. We propose Counterfactual Modality Attribution (CMA), the first framework that generates synchronized image-only, text-only, and joint counterfactuals for pretrained MLLMs, enabling principled modality-level attribution. • A principled attribution formulation. We introduce a cooperative game-theoretic formulation that converts multimodal counterfactuals into interpretable Shapley-based modality attribution scores, quantifying individual modality contributions and cross-modal interactions. • Extensive experimental validation. We demonstrate on controlled synthetic benchmarks and a real-world clinical dataset that CMA accurately identifies decision-driving modalities and uncovers multimodal reasoning failures that remain hidden to conventional explainability methods and predictive accuracy alone. Related Work Existing work on explainability for multimodal models spans feature attribution, counterfactual explanations, and diffusion-based models. We briefly review these directions and discuss their relation to modality-level attribution. Feature-level explainability for MLLMs. Most explainability methods for multimodal large language models aim to identify where predictive evidence is located within an input. Gradient- and attention-based approaches such as LVLM-Interpret (Ben Melech Stan et al. 2024) generate spatial attribution maps over visual tokens, while TAM (Li and others 2025) improves token-level explanations by suppressing contextual noise. EAGLE (Chen et al. 2026) analyzes the relative influence of linguistic priors and perceptual evidence during autoregressive generation, and recent surveys summarize advances in multimodal explainability and mechanistic interpretability (Dang and others 2024; Lin and others 2025). A complementary research direction studies internal representations through sparse autoencoders, attribution graphs, and circuit analysis (Gao et al. 2024; Marks et al. 2025; Dunefsky et al. 2024; Ameisen et al. 2025; Lou et al. 2025; Olson et al. 2025). M-SHAP (Parcalabescu and Frank 2023) and MultiViz (Liang et al. 2022) provide multimodal comparisons by aggregating token-, patch-, or segment-level importance across the image and text modalities. M-SHAP estimates modality shares from token- and patch-level Shapley values, whereas MultiViz fits separate local LIME surrogates for the two modalities. These methods provide useful feature-level or local importance signals, but their modality summaries depend on fine-grained coalition choices or surrogate fits. These methods explain feature importance within modalities, whereas our objective is modality-level attribution of the final prediction. Counterfactual explanations. Counterfactual explanations characterize model behavior by identifying minimal input changes that alter a prediction, providing intuitive explanations in the input space (Wachter et al. 2018; Boreiko et al. 2022; Guidotti 2024). Diffusion-based approaches such as DiME (Jeanneret et al. 2022), DVCE (Augustin et al. 2022), ACE (Jeanneret et al. 2023), FastDiME (Weng et al. 2024), and UVCE (Augustin et al. 2023) generate realistic image counterfactuals, while recent work extends this paradigm to video (Wang et al. 2026). For text, methods including MiCE (Ross et al. 2021), Polyjuice (Wu et al. 2021), and recent LLM-based approaches (Nguyen et al. 2025) generate minimal label-flipping textual edits. However, these methods intervene on a single modality and therefore cannot capture cross-modal dependencies or quantify how multiple modalities jointly contribute to a prediction. CMA instead generates synchronized image-only, text-only, and joint multimodal counterfactuals within a unified framework, enabling principled estimation of both modality contributions and cross-modal interactions. Diffusion models. Recent advances in diffusion modeling have enabled high-quality generation across both continuous and discrete domains. DDPMs (Ho et al. 2020) provide powerful image priors, while RDLM (Jo and Hwang 2025), NeoDiff (Li et al. 2025), EvoToken-DLM (Zhong et al. 2026), Efficient-DLM (Fu et al. 2025), and LLaDA (Nie et al. 2025) extend diffusion to language generation. Omni-Diffusion (Li et al. 2026) further demonstrates unified multimodal diffusion across images, text, and speech. These methods focus on generation rather than explanation and do not perform counterfactual attribution of model decisions. In contrast, CMA synchronizes pretrained image and text diffusion priors under classifier guidance to generate coordinated multimodal counterfactuals rather than multimodal synthesis. Background Our framework builds upon two established diffusion models, one for images and one for text. This section briefly summarizes the formulations required for the proposed method, while full details can be found in the original works. Image Diffusion For the image modality, we employ the Denoising Diffusion Probabilistic Model (DDPM) of Ho et al. (2020), which provides a realistic image prior for generating plausible counterfactuals. Given a clean image x0Ix_0^I, the forward diffusion process progressively corrupts the image with Gaussian noise according to q(xsI∣x0I)=(α¯sx0I,(1−α¯s)),q(x_s^I x_0^I)=N ( α_sx_0^I,\,(1- α_s)I ), where α¯s=∏r=1s(1−βr) α_s= _r=1^s(1- _r) is determined by the variance schedule βss=1T\ _s\_s=1^T, and I denotes the identity matrix. The reverse process is parameterized by a denoising network ϵθ(xsI,s) _θ(x_s^I,s) that predicts the injected noise. Following Ho et al. (2020), the corresponding estimate of the clean image and the reverse-process posterior mean are x^0I x_0^I =xsI−1−α¯sϵθ(xsI,s)α¯sand = x_s^I- 1- α_s\, _θ(x_s^I,s) α_s~~and μθ(xsI,s) _θ(x_s^I,s) =1αs(xsI−βs1−α¯sϵθ(xsI,s)), = 1 _s (x_s^I- _s 1- α_s _θ(x_s^I,s) ), used during the guided reverse diffusion process. Text Diffusion. For the text modality, we adopt the Riemannian Diffusion Language Model (RDLM) (Jo and Hwang 2025), which enables diffusion-based generation over discrete text while remaining differentiable. RDLM represents tokens on a hyperspherical manifold using base-b decomposition, allowing realistic text counterfactuals to be generated through a continuous diffusion process. The forward process progressively transforms token representations toward a masked prior, while the reverse process predicts token distributions by solving the corresponding reverse-time stochastic differential equation on the manifold. The denoising network outputs per-digit logits ℓθ(XsT,s) _θ(X_s^T,s), which are converted into a probability distribution pθp_θ via the softmax transformation. The reverse diffusion process is driven by the drift bθ(XtT,t)=c(t)∑k=0b−1pθ,kϑksinϑk(ek−cos(ϑk)XtT),b_θ(X_t^T,t)=c(t) _k=0^b-1p_θ,k _k _k (e_k- ( _k)X_t^T ), where ϑk=arccos⟨XtT,ek⟩ _k= X_t^T,e_k and c(t)c(t) is the time-dependent scaling function defined by Jo and Hwang (2025). One reverse diffusion step is computed using the exponential map Xt−ΔtT=ExpXtT(bθΔt+β(t)Δtz⟂),X_t- t^T=Exp_X_t^T (b_θ t+ β(t) t\,z_ ), where z⟂z_ denotes Gaussian noise projected onto the tangent space of the hypersphere. The predicted token distribution pθp_θ is later modified by our guidance mechanism during counterfactual generation. Shapley-Based Modality Attribution. To quantify modality-level contributions, we adopt the Shapley value from cooperative game theory (Shapley 1953; Lundberg and Lee 2017), which provides a principled attribution of each player’s contribution to a cooperative outcome. Given a set of players N and a value function v:2N→ℝv:2^N assigning a utility to every coalition S⊆NS N, the Shapley value of player i is defined as ϕv(i)=∑S⊆N∖i|S|!(|N|−|S|−1)!|N|![v(S∪i)−v(S)]. _v(i)= _S N \i\ |S|!\,(|N|-|S|-1)!|N|! [v(S∪\i\)-v(S) ]. The Shapley value measures the average marginal contribution of a player to all possible coalitions. It is uniquely characterized by four desirable axioms: efficiency, ensuring that attributions sum to the total coalition value; symmetry, assigning equal attribution to players with identical contributions; dummy, assigning zero attribution to players that never affect the outcome; and additivity, ensuring consistency across combined value functions. In CMA, the two players correspond to the image and text modalities, while coalition values are computed from classifier predictions on the generated counterfactuals. Methodology Let f denote a pretrained multimodal classifier that maps an image–text pair x=(xI,xT)x=(x^I,x^T) to logits over C classes, where xI∈ℝ3×H×Wx^I ^3× H× W is an image and xT=(w1,…,wL)∈Lx^T=(w_1,…,w_L) ^L is a sequence of text tokens from vocabulary V. The predicted class is y^=argmaxcfc(xI,xT). y= _cf_c(x^I,x^T). Our objective is to quantify the contribution of each modality to the prediction y y, distinguishing whether the decision is primarily driven by the image, the text, or their interaction. As illustrated in Fig. 2, CMA consists of three stages. First, independently pretrained diffusion priors provide realistic image and text priors for generating plausible counterfactuals. Second, synchronized reverse diffusion generates image-only, text-only, and joint multimodal counterfactuals under the guidance of a pretrained classifier, producing minimal prediction-changing interventions that remain close to the data manifold. Finally, these counterfactuals define a two-player cooperative game in which the image and text modalities act as players, and Shapley values quantify both their individual contributions and their interaction. The resulting modality attribution scores reveal which modality primarily drives the model’s prediction. Figure 2: Overview of the proposed Counterfactual Modality Attribution (CMA) framework. (1) Independently pretrained image and text diffusion priors are synchronized during reverse diffusion and jointly guided by gradients from the pretrained MLLM to generate realistic image-only, text-only, and joint counterfactuals. (2) Combining original and counterfactual modalities forms the four coalitions required for modality attribution. (3) Treating image and text as players in a two-player cooperative game, Shapley values quantify their relative contributions to the model prediction, producing Image% and Text% attribution scores. Counterfactual Generation Unlike existing diffusion-based counterfactual methods that operate on a single modality, CMA jointly optimizes synchronized image and text diffusion processes, enabling image-only, text-only, and joint multimodal counterfactual generation within a unified framework. Let y y denote the original prediction. Counterfactual generation is formulated as an untargeted optimization problem using the Carlini–Wagner (2017) margin ℒCW(xI,xT)=fy^(xI,xT)−maxc≠y^fc(xI,xT),L_CW(x^I,x^T)=f_ y(x^I,x^T)- _c≠ yf_c(x^I,x^T), which becomes negative once a competing class exceeds the confidence of the original prediction. During reverse diffusion, the image and text diffusion models are synchronized at the same diffusion timestep. Synchronization ensures that each modality is optimized while conditioned on the evolving state of the other, enabling coherent multimodal counterfactuals and capturing cross-modal interactions. The current image estimate x^0I x_0^I and predicted text distribution pθp_θ are jointly evaluated by the pretrained classifier, allowing both modality-specific gradients to be computed from a single backward pass, gI=∇x^0IℒCW,gT=∇ℓθℒCW.g^I= _ x_0^IL_CW, g^T= _ _θL_CW. The gradients are normalized independently to prevent differences in gradient magnitude across modalities from dominating the optimization, and are incorporated into the corresponding reverse diffusion processes. By selectively enabling classifier guidance (Dhariwal and Nichol 2021) for one or both diffusion models, CMA naturally supports image-only, text-only, and joint counterfactual generation within the same optimization framework. Image-only counterfactuals. To estimate the contribution of the visual modality, classifier guidance is applied only to the image diffusion model while the accompanying text remains fixed. The image posterior mean is updated using the normalized classifier gradient together with an ℓ1 _1 proximity regularizer, μ←μθ(xsI,s)−βs(λcg^I+λ11Nsign(x^0I−x0I)),μ← _θ(x^I_s,s)- _s ( _c g^I+ _1 1Nsign( x^I_0-x^I_0) ), followed by the standard DDPM sampling step. Dynamic inpainting further preserves unchanged regions by restoring pixels whose predicted changes remain below a threshold. The resulting counterfactual is (x′I,xT)(x I,x^T), where only the image has been modified. Text-only counterfactuals. To isolate the textual contribution, guidance is applied only to the text diffusion model while the image remains unchanged. The predicted token distribution is updated before computing the RDLM reverse drift, pθ←softmax(logpθ−(λcTg^T+λ1T(pθ−d0))),p_θ ( p_θ- (λ^T_c g^T+λ^T_1(p_θ-1_d_0) ) ), where d01_d_0 denotes the original token representation. Tokens whose predicted change falls below a threshold remain unchanged throughout reverse diffusion. The generated counterfactual is (xI,x′T)(x^I,x T), where only the textual modality is modified. Joint counterfactuals. The proposed framework also supports simultaneous optimization of both modalities. In this setting, the image and text diffusion models evolve simultaneously under shared classifier guidance while remaining synchronized throughout reverse diffusion, allowing each modality to adapt to changes in the other during optimization. This coordinated generation captures cross-modal dependencies that independent unimodal counterfactuals cannot represent, producing faithful multimodal counterfactual explanations. The resulting multimodal counterfactual is (x′I,x′T)(x I,x T). Modality Attribution The generated image-only, text-only, and joint counterfactuals naturally define a modality attribution problem. We formulate this as a two-player cooperative game in which the image and text modalities act as players, while the logit output of the classifier assigned to the original predicted class defines the coalition value. Unlike feature attribution methods, this formulation directly attributes the classifier prediction to entire modalities rather than individual features or tokens. For a coalition S⊆I,TS \I,T\, modalities in S remain unchanged, while the remaining modalities are replaced by their counterfactual counterparts, i.e., x~SM=xM x_S^M=x^M if M∈SM∈ S, and x~SM=x′M x_S^M=x M otherwise. The coalition value is defined as the logit assigned to the original predicted class y y, v(S)=fy^(x~SI,x~ST).v(S)=f_ y( x_S^I, x_S^T). Evaluating the classifier on the original sample together with the three generated counterfactuals yields the four coalition values, v(I,T) v(\I,T\) =fy^(xI,xT), =f_ y(x^I,x^T), v(I) v(\I\) =fy^(xI,x′T), =f_ y(x^I,x T), v(T) v(\T\) =fy^(x′I,xT), =f_ y(x I,x^T), v(∅) v( ) =fy^(x′I,x′T). =f_ y(x I,x T). Since modality attribution involves only two players, the Shapley values admit the following closed-form solution, θI _I =12(v(I)−v(∅)+v(I,T)−v(T)), = 12\! (v(\I\)-v( )+v(\I,T\)-v(\T\) ), θT _T =12(v(T)−v(∅)+v(I,T)−v(I)), = 12\! (v(\T\)-v( )+v(\I,T\)-v(\I\) ), ensuring that the total attribution equals the logit score change produced by jointly perturbing both modalities. For interpretability, we additionally report normalized modality contributions, Image%=100|θI||θI|+|θT|,Text%=100|θT||θI|+|θT|. Image\%= 100| _I|| _I|+| _T|, Text\%= 100| _T|| _I|+| _T|. which quantify the relative influence of the image and text modalities on the prediction. The larger normalized attribution identifies the modality that primarily drives the classifier prediction. Because the attribution is computed from realistic counterfactual interventions rather than feature perturbations, the resulting scores are directly comparable across samples and modalities. Results Code for reproducing all results is included in the supplement and will be released publicly on a dedicated GitHub repository upon acceptance. Further implementation details, including network architectures, training configurations, diffusion schedules, and other model hyperparameters, are provided in the supplementary material. Experimental Setup We evaluate CMA on two complementary multimodal benchmarks: a controlled synthetic benchmark with known ground-truth modality reliance, enabling quantitative evaluation of attribution accuracy, and a real clinical benchmark representing the high-stakes multimodal setting illustrated in Fig. 1. Synthetic Multimodal MNIST To enable quantitative evaluation of modality attribution, we construct a controlled multimodal benchmark by pairing colored MNIST (LeCun et al. 1998) digits with textual prompts specifying a per-sample color-to-code mapping. Solving the task requires combining visual and textual information to determine the target label. Prompt templates and mappings are randomized, and train, validation, and test splits use disjoint source images. We create three variants with known modality dependence. The Balanced variant requires both modalities and predicts the concatenation of the digit and mapped code (100 classes). The Image-Biased variant predicts only the digit, while the Text-Biased variant predicts only the mapped code. These controlled settings provide ground-truth modality attributions, enabling direct quantitative evaluation of CMA. Multiclass OpenI We additionally evaluate CMA on the publicly available OpenI chest X-ray dataset (Demner-Fushman et al. 2016), where each sample consists of a frontal chest radiograph paired with its corresponding radiology report. Since OpenI provides neither classification labels nor official data splits, we construct a reproducible single-label multiclass benchmark by mapping the annotated Problems field, or MeSH terms when unavailable, to a curated set of canonical pathologies. Reports with multiple or ambiguous labels are excluded, and stratified train, validation, and test splits are generated. Multimodal Classifier We use Gemma-3-4B-IT (Gemma Team 2025) with a lightweight two-layer MLP classification head. Unless stated otherwise, the backbone remains pretrained. During counterfactual generation, the pretrained classifier provides shared gradients for both image and text modalities using differentiable image inputs and soft text embeddings. Separate classifiers are trained for each Synthetic MNIST variant and the OpenI benchmark. (a) Original (pred = 34) (b) Image-only CF (pred = 54) (c) Text-only CF (pred = 30) (d) Joint CF (pred = 53) (e) Original (Nodule) (f) Image-only CF (Normal) (g) Text-only CF (Nodule) (h) Joint CF (Normal) Figure 3: Qualitative comparison of generated counterfactuals across different generation modes for Synthetic MNIST (top row, a–d) and Multiclass OpenI dataset (bottom row, e–h): Image-only mode generates counterfactual images while keeping text fixed; Text-only mode modifies text while keeping images fixed; and Joint mode simultaneously updates both image and text modalities to flip the prediction. Notably, the text-only counterfactual for OpenI (g) does not flip the decision to Normal because the shortcut feature in the image input remains unperturbed and determines the model’s Nodule prediction in this case. Counterfactual Generation We evaluate CMA across three counterfactual generation modes: image-only, text-only, and joint generation. Fig. 3 shows representative examples on the Synthetic MNIST (top row) and OpenI (bottom row) datasets. The OpenI example demonstrates that CMA can expose clinically irrelevant shortcuts learned by the classifier. The original radiograph is labeled and predicted as Nodule. To reach the target class Normal, CMA removes the ECG leads and electrodes, after which the classifier changes its prediction to Normal. Because these devices are not diagnostic evidence of a pulmonary nodule, the counterfactual reveals that the model relies on a spurious correlation between monitoring equipment and the Nodule label. This provides direct evidence that CMA identifies decision-critical features. Additionally, if we look at the modalities individually in Fig. 3, the text-only counterfactual edit for OpenI (Fig. 3g) does not flip the decision because the shortcut feature (the ECG leads) in the unperturbed image input is highly crucial to the Nodule prediction and is sufficient to sustain it. Synthetic MNIST provides a controlled complementary result. Image-only and text-only counterfactuals affect only their respective modalities, whereas joint generation modifies both in a coordinated manner. The resulting predictions cannot be explained as the independent sum of unimodal edits, demonstrating that CMA captures cross-modal interactions rather than treating the modalities independently. Modality Attribution We evaluate CMA on the controlled Synthetic MNIST benchmark with known ground-truth modality dependence. Two biased multimodal classifiers are trained: an Image-Biased model that relies only on image information and a Text-Biased model that relies only on text. We compare CMA against feature-, perturbation-, subset-selection-, and multimodal-attribution baselines. These methods represent different explainability techniques applied to MLLMs. However, none was originally designed to produce modality-level attribution scores; instead, they assign importance to individual pixels, tokens, patches, or input subsets. To enable a direct comparison with CMA, we adapt each baseline by aggregating its native fine-grained attributions into a single attribution share for each modality and evaluate all methods under a common protocol: 1. Input × Gradient (Ancona et al. 2017). Local feature attributions are aggregated over image pixels and text embeddings to obtain modality-level attribution scores. 2. Perturbation SHAP. We use the same two-player Shapley formulation as CMA but replace diffusion-generated counterfactuals with static perturbations (constant background image and masked text), isolating the benefit of realistic counterfactual generation. 3. EAGLE (Chen et al. 2026). We adapt EAGLE’s submodular subset-selection framework to multimodal inputs and aggregate selected image regions and text spans into modality-level attribution scores. 4. M-SHAP (Parcalabescu and Frank 2023). We adapt M-SHAP’s fine-grained Shapley game, using text tokens and image patches as players, and aggregate the absolute Shapley values within each modality. 5. MultiViz (Liang et al. 2022). We adapt its unimodal LIME analysis by fitting local surrogates separately to image segments and text words, then normalize the two coefficient masses into modality shares. Fig. 4 compares CMA with these baselines. Across both controlled settings baseline methods fail to recover the known model bias reliably. M-SHAP and MultiViz achieve 100%100\% hits on the text-biased samples, but achieve only 0%0\% and 3%3\% hits, respectively, on the image-biased setting. M-SHAP’s fine-grained token–patch game can distribute importance according to local feature effects rather than the whole-modality decision rule, while MultiViz derives its split from two local linear surrogates whose coefficient masses need not reflect causal reliance. These results complement the failure modes of gradient-, perturbation-, and subset-selection-based methods where local sensitivity, static replacements, feature granularity, and surrogate fit cannot correctly identify the biased modality. In contrast, CMA correctly identifies the ground-truth modality in 98%98\% of samples by using minimal, realistic counterfactual interventions to directly test whether changing a modality changes the prediction. Figure 4: Modality attribution accuracy on image-biased and text-biased Synthetic MNIST benchmarks. A hit indicates that the identified dominant modality matches the known ground-truth model bias. Whiskers denote 95% Wilson confidence interval across evaluation samples. (a) OpenI Medical Dataset (b) Synthetic MNIST Dataset Figure 5: Modality attribution share (%\%) under progressive corruption of image and text modalities for (a) OpenI medical dataset and (b) Synthetic MNIST dataset. Error bands indicate standard error across test samples. As corruption increases, attribution share decays to 0%0\%, shifting entirely to the uncorrupted modality. Ablation Study We perform a controlled per-modality corruption study to evaluate whether CMA tracks the evidence available to the model rather than assigning a fixed preference to either modality. Image and text are progressively corrupted from 0%0\% to 100%100\% in 10%10\% increments. Image corruption progressively replaces pixels with the background value, while text corruption masks increasing numbers of tokens through the attention mechanism. Figure 5 presents the results on OpenI and the balanced Synthetic MNIST benchmark. As information in one modality is progressively removed, its attribution decreases toward 0%0\%, while the complementary modality receives the remaining attribution. This behaviour demonstrates that CMA is input-faithful and adapts its attribution to the evidence available for each prediction rather than assigning fixed modality preferences. When one modality is completely corrupted, the intact modality naturally receives 100%100\% attribution. Rather than indicating successful multimodal reasoning, this reveals a collapse to unimodal decision-making, where the prediction is supported solely by the remaining modality. Such failure modes can remain hidden when evaluating only prediction accuracy but are made explicit by modality attribution. Discussion CMA introduces modality attribution as a complementary perspective on explainability for multimodal large language models. Existing methods primarily explain where evidence is located by highlighting important pixels, tokens, or internal representations. In contrast, CMA explains which modality ultimately drives a prediction by combining realistic multimodal counterfactual generation with Shapley value attribution. Our results demonstrate that these two forms of explanation capture different properties of model behavior and should be viewed as complementary rather than competing approaches. The experiments also provide broader insights into multimodal reasoning. Image-only and text-only counterfactuals isolate the contribution of individual modalities, while joint counterfactuals reveal non-additive interactions that cannot be recovered from independent unimodal interventions. Furthermore, the corruption experiments show that modality attribution adapts continuously to the evidence available to the model rather than assigning fixed preferences to individual modalities. Together, these findings suggest that reliable auditing of multimodal foundation models requires reasoning about modality interactions in addition to feature-level explanations. Beyond medical applications, CMA is applicable to any differentiable multimodal architecture and can support auditing in domains such as autonomous systems, document understanding, robotics, and multimodal decision support, where understanding the relative contribution of different information sources is critical for trustworthy deployment. Limitations CMA has several limitations. First, the quality of the attribution depends on the quality of the generated counterfactuals. Although manifold-constrained diffusion priors substantially improve the realism of generated edits, imperfect counterfactual generation may affect attribution quality. Second, CMA provides model-relative, reference-dependent counterfactual attributions rather than causal effects in the underlying data-generating process, and different valid counterfactual references may lead to different attribution scores. The current framework also operates at the modality level and therefore does not identify which individual image regions or textual spans within a modality are responsible for a prediction. Extending CMA to hierarchical explanations that jointly attribute importance across modalities and within-modality features is an important direction for future work. Finally, diffusion-based counterfactual generation introduces additional computational cost compared with gradient- or perturbation-based explainability methods, limiting the current implementation to offline analysis. Conclusion We introduced Counterfactual Modality Attribution (CMA), a novel explainability framework that, to the best of our knowledge, provides the first principled modality attribution method for multimodal large language models. By combining synchronized multimodal counterfactual generation with a two-player cooperative Shapley formulation, CMA quantifies the contribution of each modality to a model’s prediction while explicitly accounting for cross-modal interactions. Experiments on controlled synthetic benchmarks with known ground-truth modality reliance and a real clinical chest X-ray benchmark demonstrate that CMA accurately identifies the modality driving a prediction and substantially outperforms existing feature-, perturbation-, and subset-selection-based explainability methods. We hope CMA provides a foundation for more transparent, trustworthy, and systematically auditable multimodal AI systems deployed in high-stakes decision-making environments. References J. N. Acosta, G. J. Falcone, P. Rajpurkar, and E. J. Topol (2022) Multimodal biomedical AI. Nature Medicine 28 (9), p. 1773–1784. Cited by: Introduction. E. Ameisen, J. Lindsey, A. Pearce, W. Gurnee, N. L. Turner, B. Chen, C. Citro, D. Abrahams, S. Carter, B. Hosmer, et al. (2025) Circuit tracing: revealing computational graphs in language models. Transformer Circuits Thread. Cited by: Related Work. M. Ancona, E. Ceolini, C. Öztireli, and M. Gross (2017) Towards better understanding of gradient-based attribution methods for deep neural networks. arXiv preprint arXiv:1711.06104. Cited by: Modality Attribution. M. Asadi, J. W. O’Sullivan, F. Cao, T. Nedaee, K. Rajabalifardi, F. Li, E. Adeli, and E. Ashley (2026) MIRAGE: the illusion of visual understanding. arXiv preprint arXiv:2603.21687. Cited by: Introduction. M. Augustin, V. Boreiko, F. Croce, and M. Hein (2022) Diffusion visual counterfactual explanations. Advances in Neural Information Processing Systems 35, p. 364–377. Cited by: Related Work. M. Augustin, Y. Neuhaus, and M. Hein (2023) DiG-in: diffusion guidance for investigating networks–uncovering classifier differences neuron visualisations and visual counterfactual explanations. arXiv preprint arXiv:2311.17833. Cited by: Related Work. G. Ben Melech Stan, E. Aflalo, G. Bhatt, S. T. Chen, S. Tseng, G. Sod-Moriah, S. Tsiper, Y. Yaniv, and V. Lal (2024) LVLM-Interpret: an interpretability tool for large vision-language models. In IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, p. 8182–8187. Cited by: Introduction, Related Work. V. Boreiko, M. Augustin, F. Croce, P. Berens, and M. Hein (2022) Sparse visual counterfactual explanations in image space. p. 133–148. Cited by: Related Work. N. Carlini and D. Wagner (2017) Towards Evaluating the Robustness of Neural Networks . In 2017 IEEE Symposium on Security and Privacy (SP)Proceedings of the IEEE/CVF conference on computer vision and pattern recognitionProceedings of the IEEE conference on computer vision and pattern recognitionInternational conference on learning representationsProceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)DAGM German Conference on Pattern RecognitionProceedings of the Asian conference on computer visionProceedings of the IEEE/CVF Conference on Computer Vision and Pattern RecognitionProceedings of the IEEE/CVF International Conference on Computer Vision, Vol. , p. 39–57. External Links: ISSN 2375-1207 Cited by: Counterfactual Generation. R. Chen, X. Guo, K. Liu, S. Liang, S. Liu, Q. Zhang, L. Wang, H. Zhang, and X. Cao (2026) Where MLLMs attend and what they rely on: explaining autoregressive token generation. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, Cited by: Related Work, Modality Attribution. Y. Dang et al. (2024) Explainable and interpretable multimodal large language models: a comprehensive survey. arXiv preprint arXiv:2412.02104. Cited by: Related Work. D. Demner-Fushman, M. D. Kohli, M. B. Rosenman, S. E. Shooshan, L. Rodriguez, S. Antani, G. R. Thoma, and C. J. McDonald (2016) Preparing a collection of radiology examinations for distribution and retrieval. Journal of the American Medical Informatics Association 23 (2), p. 304–310. Cited by: Multiclass OpenI. P. Dhariwal and A. Nichol (2021) Diffusion models beat gans on image synthesis. Advances in neural information processing systems 34, p. 8780–8794. Cited by: Counterfactual Generation. J. Dunefsky, P. Chlenski, and N. Nanda (2024) Transcoders find interpretable LLM feature circuits. In Advances in Neural Information Processing Systems, Cited by: Related Work. Y. Fu, L. Whalen, Z. Ye, X. Dong, S. Diao, J. Liu, C. Wu, H. Zhang, E. Xie, S. Han, et al. (2025) Efficient-DLM: from autoregressive to diffusion language models, and beyond in speed. arXiv preprint arXiv:2512.14067. Cited by: Related Work. L. Gao, T. D. la Tour, H. Tillman, G. Goh, R. Troll, A. Radford, I. Sutskever, J. Leike, and J. Wu (2024) Scaling and evaluating sparse autoencoders. arXiv preprint arXiv:2406.04093. Cited by: Related Work. Gemma Team (2025) Gemma 3 technical report. arXiv preprint arXiv:2503.19786. Cited by: Multimodal Classifier. R. Guidotti (2024) Counterfactual explanations and how to find them: literature review and benchmarking. Data Mining and Knowledge Discovery 38 (5), p. 2770–2824. Cited by: Related Work. J. Ho, A. Jain, and P. Abbeel (2020) Denoising diffusion probabilistic models. In Advances in Neural Information Processing Systems, Vol. 33, p. 6840–6851. Cited by: Related Work, Image Diffusion, Image Diffusion. G. Jeanneret, L. Simon, and F. Jurie (2022) Diffusion models for counterfactual explanations. p. 858–876. Cited by: Related Work. G. Jeanneret, L. Simon, and F. Jurie (2023) Adversarial counterfactual visual explanations. p. 16425–16435. Cited by: Related Work. J. Jo and S. J. Hwang (2025) Continuous diffusion model for language modeling. In Advances in Neural Information Processing Systems, Cited by: Related Work, Text Diffusion., Text Diffusion.. S. Joshi, H. Yin, R. Adiga, R. Monti, A. Carranza, A. Fang, A. Deng, A. Abbas, B. Larsen, C. Blakeney, et al. (2026) DatBench: discriminative, faithful, and efficient VLM evaluations. arXiv preprint arXiv:2601.02316. Cited by: Introduction. Y. LeCun, L. Bottou, Y. Bengio, P. Haffner, et al. (1998) Gradient-based learning applied to document recognition. Proceedings of the IEEE 86 (11), p. 2278–2324. Cited by: Synthetic Multimodal MNIST. B. Li, Z. Gao, and L. Xu (2025) Unifying continuous and discrete text diffusion with non-simultaneous diffusion processes. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics, p. 565. Cited by: Related Work. L. Li, Z. Long, Y. Shen, H. Gao, H. Cao, X. Sun, C. Shan, R. He, and C. Fu (2026) Omni-Diffusion: unified multimodal understanding and generation with masked discrete diffusion. In International Conference on Machine Learning, Cited by: Related Work. Y. Li et al. (2025) Token activation map to visually explain multimodal LLMs. In IEEE/CVF International Conference on Computer Vision, Cited by: Introduction, Related Work. P. P. Liang, Y. Lyu, G. Chhablani, N. Jain, Z. Deng, X. Wang, L. Morency, and R. Salakhutdinov (2022) Multiviz: towards visualizing and understanding multimodal models. arXiv preprint arXiv:2207.00056. Cited by: Related Work, Modality Attribution. Y. Lin et al. (2025) A survey on mechanistic interpretability for multi-modal foundation models. arXiv preprint arXiv:2502.17516. Cited by: Related Work. H. Lou, C. Li, J. Ji, and Y. Yang (2025) SAE-V: interpreting multimodal models for enhanced alignment. In International Conference on Machine Learning, Cited by: Related Work. S. M. Lundberg and S. Lee (2017) A unified approach to interpreting model predictions. In Advances in Neural Information Processing Systems, Vol. 30. Cited by: Shapley-Based Modality Attribution.. S. Marks, C. Rager, E. J. Michaud, Y. Belinkov, D. Bau, and A. Mueller (2025) Sparse feature circuits: discovering and editing interpretable causal graphs in language models. In International Conference on Learning Representations, Cited by: Related Work. V. B. Nguyen, C. Seifert, and J. Schlötterer (2025) Guiding LLMs to generate high-fidelity and high-quality counterfactual explanations for text classification. arXiv preprint arXiv:2503.04463. Cited by: Related Work. S. Nie, F. Zhu, Z. You, X. Zhang, J. Ou, J. Hu, J. Zhou, Y. Lin, J. Wen, and C. Li (2025) Large language diffusion models. arXiv preprint arXiv:2502.09992. Cited by: Related Work. M. L. Olson, M. Hinck, N. Ratzlaff, C. Li, P. Howard, V. Lal, and S. Tseng (2025) Probing the representational power of sparse autoencoders in vision models. arXiv preprint arXiv:2508.11277. Cited by: Related Work. L. Parcalabescu and A. Frank (2023) Mm-shap: a performance-agnostic metric for measuring multimodal contributions in vision and language models & tasks. p. 4032–4059. Cited by: Related Work, Modality Attribution. A. Ross, A. Marasovic, and M. E. Peters (2021) MiCE: explaining NLP models via minimal contrastive editing. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, p. 3094–3109. Cited by: Related Work. R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, and D. Batra (2017) Grad-cam: visual explanations from deep networks via gradient-based localization. In Proceedings of the IEEE international conference on computer vision, p. 618–626. Cited by: Introduction. L. S. Shapley (1953) A value for n-person games. In Contributions to the Theory of Games, Vol. 2, p. 307–317. Cited by: Shapley-Based Modality Attribution.. P. Simon et al. (2025) The future of multimodal AI in medicine: a pragmatic roadmap. arXiv preprint arXiv:2505.20316. Cited by: Introduction. L. R. Soenksen, Y. Ma, C. Zeng, L. Boussiarès, D. S. W. Ting, P. Rajpurkar, and N. H. Shah (2022) Integrated multimodal artificial intelligence framework for healthcare applications. npj Digital Medicine 5 (1), p. 149. Cited by: Introduction. S. Wachter, B. Mittelstadt, and C. Russell (2018) Counterfactual explanations without opening the black box: automated decisions and the GDPR. Harvard Journal of Law & Technology 31 (2), p. 841–887. Cited by: Related Work. C. Wang, C. Che, X. Chen, S. Tsoka, and L. C. Garcia-Peraza-Herrera (2026) Back to the feature: explaining video classifiers with video counterfactual explanations. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, Cited by: Related Work. N. Weng, P. Pegios, E. Petersen, A. Feragen, and S. Bigdeli (2024) Fast diffusion-based counterfactuals for shortcut removal and generation. In European Conference on Computer Vision, p. 351–368. Cited by: Related Work. T. Wu, M. T. Ribeiro, J. Heer, and D. Weld (2021) Polyjuice: generating counterfactuals for explaining, evaluating, and improving models. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics, p. 6707–6723. Cited by: Related Work. L. Zhong, L. Wu, B. Fang, T. Feng, C. Jing, W. Wang, J. Zhang, H. Chen, and C. Shen (2026) Beyond hard masks: progressive token evolution for diffusion language models. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics, Cited by: Related Work.