SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.02380 · 2022

CLEVR-X: A Visual Reasoning Dataset for Natural Language Explanations

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 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; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 0 failures of our instrument; 2 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/2204.02380.json · badge: /api/ran/2204.02380.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
explainableml/clevr-x canonical (classifier label)
classifier basis not recorded on the link
6 ran · 2 no recorded run
FunctionStatusWhere it lives
all_different Ran
ran on a synthesized input
explainableml/clevr-x/question_generation/match_set_templating.py
code served (permissive licence) · get_code("62f10062f826eb9a")
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 str. The image it ran in was not recorded. If your copy returns the same type 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 random
import re
from typing import Dict, List

# Set random seed for reproducibility
random.seed(42)

# Analyze the function to understand what it needs:
# - parts: a list where parts[1] is a string containing format like "init_text(<PATTERN>)"
# - current_objs: a list whose length determines count

# Create test data
parts = [
    "dummy_part_0",
    "initialize(<M1i>) and (<C2s>) with (<Z3si>)"
]

current_objs = [
    "obj1",
    "obj2",
    "obj3"
]

ARGS = {
    "parts": parts,
    "current_objs": current_objs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
join_list_with_comma_and Ran
ran on a synthesized input
explainableml/clevr-x/question_generation/match_set_templating.py
code served (permissive licence) · get_code("775ff81d4bd0205e")
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 str. The image it ran in was not recorded. If your copy returns the same type 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 torch
from typing import Dict, List

def join_list_with_comma_and(list: List[str]) -> str:
    joined_list = ', '.join(list[:-2] + [' and '.join(list[-2:])])
    return joined_list

ARGS = {
    "list": ["apple", "banana", "cherry", "date"]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
post_condition Ran
ran on a synthesized input
explainableml/clevr-x/question_generation/conditions.py
code served (permissive licence) · get_code("707d445a1211e583")
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 function. The image it ran in was not recorded. If your copy returns the same type 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 functools
import torch

def condition(pre_condition=None, post_condition=None):
    """
    Usage:

    @pre_condition(lambda arg: arg > 0)
    def function(arg): # ordinary function
        pass

    class C(object):
        @post_condition(lambda ret: ret > 0)
        def method_fail(self):
            return 0
        @post_condition(lambda ret: ret > 0)
        def method_success(self):
            return 1

    """

    def decorator(func):

        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            if pre_condition is not None:
                assert pre_condition(*args, **kwargs), 'Pre-Condition was not met!'
            retval = func(*args, **kwargs)
            if post_condition is not None:
                assert post_condition(retval), 'Post-Condition was not met!'
            return retval
        return wrapper
    return decorator

def pre_condition(check):
    return condition(pre_condition=check)

def post_condition(check):
    return condition(post_condition=check)


# Set up test examples
torch.manual_seed(0)

# Example 1: Simple function with post_condition
@post_condition(lambda ret: ret > 0)
def successful_function():
    return 5

# Example 2: Method in a class with post_condition
class TestClass(object):
    @post_condition(lambda ret: ret > 0)
    def method_success(self):
        return 1
    
    @post_condition(lambda ret: ret > 0)
    def method_with_arg(self, x):
        return x + 10

# Example 3: More complex post_condition checking tensor properties
@post_condition(lambda ret: ret.shape == torch.Size([2, 4]))
def tensor_function():
    return torch.randn(2, 4)

ARGS = {
    'check': lambda ret: ret > 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
recursive_replace_optionals Ran
ran on a synthesized input
explainableml/clevr-x/question_generation/text_template_handling.py
code served (permissive licence) · get_code("1356268936d14f58")
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 list. The image it ran in was not recorded. If your copy returns the same type 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 re
from typing import Dict, List

ARGS = {
    "texts": [
        ["Hello [world|universe]"],
        ["The [quick|slow] brown fox"],
        ["A [x|y|z] test [optional]"]
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
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
remove_punctuation Ran
ran on a synthesized input
explainableml/clevr-x/question_generation/text_template_handling.py
code served (permissive licence) · get_code("4756f083ebef1e12")
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 str. The image it ran in was not recorded. If your copy returns the same type 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 string

def remove_punctuation(s):
    """removes all punctuatione except < and >"""
    return s.translate(str.maketrans('', '', ''.join(set(string.punctuation) - set(['<', '>']))))

ARGS = {
    's': 'Hello, world! This is a <test> string with punctuation.'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
replace_optionals Ran
ran on a synthesized input
explainableml/clevr-x/question_generation/text_template_handling.py
code served (permissive licence) · get_code("8c321c8584c8d668")
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 str. The image it ran in was not recorded. If your copy returns the same type 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 random
import re

def replace_optionals(s: str) -> str:
    """
  Each substring of s that is surrounded in square brackets is treated as
  optional and is removed with probability 0.5. For example the string

  "A [aa] B [bb]"

  could become any of

  "A aa B bb"
  "A  B bb"
  "A aa B "
  "A  B "

  with probability 1/4.
  """
    pat = re.compile('\\[([^\\[]*?)\\]')
    while True:
        match = pat.search(s)
        if match:
            options = match.group(1).split('|')
            if len(options) == 1:
                option = options[0] if random.random() > 0.5 else ''
            else:
                option = random.choice(options)
            i0 = match.start()
            i1 = match.end()
            s = s[:i0] + option + s[i1:]
        else:
            break
    s = ' '.join(s.split())
    return s

ARGS = {
    "s": "A [aa] B [bb]"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
condition Not yet run
unverified (harvested, no recorded run)
explainableml/clevr-x/question_generation/conditions.py
code served (permissive licence) · get_code("5c3c95c03eba3416")
How it ran

no invocation recorded.

pre_condition Not yet run
unverified (harvested, no recorded run)
explainableml/clevr-x/question_generation/conditions.py
code served (permissive licence) · get_code("76ca3a5e874be14e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 8 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.

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

Providing explanations in the context of Visual Question Answering (VQA) presents a fundamental problem in machine learning. To obtain detailed insights into the process of generating natural language explanations for VQA, we introduce the large-scale CLEVR-X dataset that extends the CLEVR dataset with natural language explanations. For each image-question pair in the CLEVR dataset, CLEVR-X contains multiple structured textual explanations which are derived from the original scene graphs. By construction, the CLEVR-X explanations are correct and describe the reasoning and visual information that is necessary to answer a given question. We conducted a user study to confirm that the ground-truth explanations in our proposed dataset are indeed complete and relevant. We present baseline results for generating natural language explanations in the context of VQA using two state-of-the-art frameworks on the CLEVR-X dataset. Furthermore, we provide a detailed analysis of the explanation generation quality for different question and answer types. Additionally, we study the influence of using different numbers of ground-truth explanations on the convergence of natural language generation (NLG) metrics. The CLEVR-X dataset is publicly available at \url{https://explainableml.github.io/CLEVR-X/}.

For agents

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

get_harvested_code_for_paper("2204.02380")
get_code_for_paper("2204.02380")
have("2204.02380")

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

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

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

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

Connect an agent — have() is free.