SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.08158 · 2022

MM-SHAP: A Performance-agnostic Metric for Measuring Multimodal Contributions in Vision and Language Models & Tasks

arXiv · PDF · Open in the Atlas

Code that ran

5 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 3 have no contract verdict; 0 failures of our instrument; 5 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2212.08158.json · badge: /api/ran/2212.08158.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
heidelberg-nlp/mm-shap canonical (classifier label)
classifier basis not recorded on the link
5 ran · 5 no recorded run
FunctionStatusWhere it lives
compute_output_dims Ran
ran on a synthesized input
heidelberg-nlp/mm-shap/shap/_explanation.py
code served (permissive licence) · get_code("ac2cc0a75031d92f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import scipy as sp

# Examine the function to understand what it needs:
# - values: needs _compute_shape() called on it - can be list, dict, array, or sparse matrix
# - base_values: needs _compute_shape() called on it or can be None
# - data: needs _compute_shape() called on it or can be None
# - output_names: needs _compute_shape() called on it or can be None

# Create test data with distinct dimensions to probe shapes
# values_shape should be different from data_shape to test interaction_order calculation

# Simple case: values is a list of arrays
values = [np.array([1, 2, 3, 4]), np.array([5, 6, 7, 8])]  # shape (2, 4)

# base_values: list of arrays with different first dim
base_values = [np.array([0.1, 0.2, 0.3, 0.4])]  # shape (1, 4)

# data: smaller shape to test dimension inference
data = [np.array([10, 20, 30]), np.array([40, 50, 60])]  # shape (2, 3)

# output_names: can be a list of strings
output_names = ["output_1", "output_2", "output_3"]  # shape (None,) per the function logic

ARGS = {
    "values": values,
    "base_values": base_values,
    "data": data,
    "output_names": output_names,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
identity Ran
ran on a synthesized input
heidelberg-nlp/mm-shap/shap/links.py
code served (permissive licence) · get_code("71e360cbf88d5730")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numba
import numpy as np

@numba.jit
def identity(x):
    """ A no-op link function.
    """
    return x

# Create a simple numeric array to pass to the identity function
x = np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float64)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numba, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_1d Ran
ran, violated the contract we drafted
heidelberg-nlp/mm-shap/shap/_explanation.py
code served (permissive licence) · get_code("e3c7e31f2f094463")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Test case 1: 1D list of scalars
val_1d_list = [1, 2, 3, 4]

# Test case 2: 1D numpy array
val_1d_array = np.array([1, 2, 3, 4])

# We'll use the 1D list case for ARGS
ARGS = {
    "val": val_1d_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
linnerud Ran
ran, honoured the contract we drafted
heidelberg-nlp/mm-shap/shap/datasets.py
code served (permissive licence) · get_code("dc32c75aaf993f9f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import sklearn.datasets

# The linnerud function takes only one parameter: display
# Looking at the function body, it doesn't actually use the display parameter
# It just loads and returns linnerud data
# So we can set display to either True or False

ARGS = {
    "display": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
logit Ran
ran on a synthesized input
heidelberg-nlp/mm-shap/shap/links.py
code served (permissive licence) · get_code("bb689134796e145f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import numba

# The logit function takes a single parameter x
# It expects x to be array-like with values between 0 and 1 (exclusive)
# The function computes log(x / (1 - x))

# Create a valid input: a numpy array with values strictly between 0 and 1
x = np.array([0.1, 0.5, 0.9, 0.25])

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numba, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
boston Not yet run
unverified (harvested, no recorded run)
heidelberg-nlp/mm-shap/shap/datasets.py
code served (permissive licence) · get_code("aa6dc1f66baa0c61")
How it ran

no invocation recorded.

coef Not yet run
unverified (harvested, no recorded run)
heidelberg-nlp/mm-shap/shap/benchmark/methods.py
code served (permissive licence) · get_code("7b3ebcfb23ea11c3")
How it ran

no invocation recorded.

imagenet50 Not yet run
unverified (harvested, no recorded run)
heidelberg-nlp/mm-shap/shap/datasets.py
code served (permissive licence) · get_code("796121b410630901")
How it ran

no invocation recorded.

linear_shap_corr Not yet run
unverified (harvested, no recorded run)
heidelberg-nlp/mm-shap/shap/benchmark/methods.py
code served (permissive licence) · get_code("ab3ccac5c5ddaa3d")
How it ran

no invocation recorded.

linear_shap_ind Not yet run
unverified (harvested, no recorded run)
heidelberg-nlp/mm-shap/shap/benchmark/methods.py
code served (permissive licence) · get_code("10fe6a267963961d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 7 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 2 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
coef 3 other papers
2 dated earlier, 1 later
2010.13972 (2020-10)
GPUTreeShap: Massively Parallel Exact Calculation of SHAP Scores for Tree Ensembles
2105.12807 (2021-05)
XOmiVAE: an interpretable deep learning model for cancer classification using high-dimensional omics data
2608.16689 (2026-08)
Hide&Seek: Learning to Explain in an End-to-End Differentiable Network
boston 1 other paper
1 dated earlier
2105.12807 (2021-05)
XOmiVAE: an interpretable deep learning model for cancer classification using high-dimensional omics data
imagenet50 1 other paper
1 dated earlier
2105.12807 (2021-05)
XOmiVAE: an interpretable deep learning model for cancer classification using high-dimensional omics data
is_1d 1 other paper
1 later
2402.09259 (2024-02)
SyntaxShap: Syntax-aware Explainability Method for Text Generation
linear_shap_corr 1 other paper
1 dated earlier
2105.12807 (2021-05)
XOmiVAE: an interpretable deep learning model for cancer classification using high-dimensional omics data
linear_shap_ind 1 other paper
1 dated earlier
2105.12807 (2021-05)
XOmiVAE: an interpretable deep learning model for cancer classification using high-dimensional omics data
linnerud 1 other paper
1 dated earlier
2105.12807 (2021-05)
XOmiVAE: an interpretable deep learning model for cancer classification using high-dimensional omics data

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Vision and language models (VL) are known to exploit unrobust indicators in individual modalities (e.g., introduced by distributional biases) instead of focusing on relevant information in each modality. That a unimodal model achieves similar accuracy on a VL task to a multimodal one, indicates that so-called unimodal collapse occurred. However, accuracy-based tests fail to detect e.g., when the model prediction is wrong, while the model used relevant information from a modality. Instead, we propose MM-SHAP, a performance-agnostic multimodality score based on Shapley values that reliably quantifies in which proportions a multimodal model uses individual modalities. We apply MM-SHAP in two ways: (1) to compare models for their average degree of multimodality, and (2) to measure for individual models the contribution of individual modalities for different tasks and datasets. Experiments with six VL models -- LXMERT, CLIP and four ALBEF variants -- on four VL tasks highlight that unimodal collapse can occur to different degrees and in different directions, contradicting the wide-spread assumption that unimodal collapse is one-sided. Based on our results, we recommend MM-SHAP for analysing multimodal tasks, to diagnose and guide progress towards multimodal integration. Code available at \url{https://github.com/Heidelberg-NLP/MM-SHAP}.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2212.08158")
get_code_for_paper("2212.08158")
have("2212.08158")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2212.08158.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2212.08158.svg)](https://syntology.ai/paper/2212.08158)

Connect an agent — have() is free.