SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2109.06860 · EMNLP · 2021

Broaden the Vision: Geo-Diverse Visual Commonsense Reasoning

Kai-Wei Chang, Nanyun Peng, Ziniu Hu, Harold Li, Da Liunian

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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 8 have no contract verdict; 0 failures of our instrument; 1 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/2109.06860.json · badge: /api/ran/2109.06860.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
wadeyin9712/gd-vcr canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
converId Ran
ran on a synthesized input
wadeyin9712/gd-vcr/vilbert_beta/script/convert_lmdb_VCR.py
code served (permissive licence) · get_code("9905a41b46f307b0")
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 int, ndim 0, dtype family int, 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 torch
import numpy as np

def setup():
    # The function takes two parameters: img_id (string) and c (int)
    # img_id is split by '-' and the first element determines the branch
    # The first element should contain 'train', 'val', or 'test'
    # The second element should be a numeric string
    # c is used only in the 'val' branch to choose between two offsets
    
    img_id = "train-12345"
    c = 1
    
    return img_id, c

img_id, c = setup()

ARGS = {
    "img_id": img_id,
    "c": c
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
fix_item Ran
ran on a synthesized input
wadeyin9712/gd-vcr/visualbert/dataloaders/vcr_data_utils.py
code served (permissive licence) · get_code("46ddc1aeff61e561")
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. 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.

from collections import defaultdict

# Define a minimal item dict that satisfies fix_item's requirements
item = {
    'question': ['The', 'cat', [1, 2], 'sat'],
    'answer_choices': [
        ['on', 'the', 'mat'],
        ['under', 'the', 'table']
    ],
    'rationale_choices': [
        ['because', [1], 'was', 'comfortable'],
        ['because', [2], 'was', 'dark']
    ],
    'objects': {
        1: 'person',
        2: 'person',
        3: 'object'
    }
}

ARGS = {
    'item': item,
    'answer_label': 0,
    'rationales': True
}
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 tuple — a tuple 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
generate_answer_choices Ran
ran on a synthesized input
wadeyin9712/gd-vcr/build_dataset/similarity.py
code served (permissive licence) · get_code("c96b2567710f4ba3")
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 int, ndim 0, dtype family int, 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 torch
import numpy as np

torch.manual_seed(0)

# Analyze the function to understand what arguments are needed:
# - i: index (int)
# - relevance_results: 2D array/list, indexed as [i][j + itera * bucket_size]
# - similarity: 2D array/list, indexed as [i][candidate]
# - similarity_answers: 2D array/list, indexed as [choice][candidate]
# - choices: list that can be iterated over
# - itera: iteration index (int)
# - thres: threshold (float, default 0.9)
# - thres1: threshold (float, default 0.2)

# The function accesses:
# - relevance_results[i][j + itera * bucket_size]
# - similarity[i][candidate]
# - similarity_answers[choice][candidate]
# - len(relevance_results[0]) to compute bucket_size

# Let's construct minimal valid data:
# bucket_size = len(relevance_results[0]) / 3, so let's use 12 columns -> bucket_size = 4

num_items = 2  # for dimension of first index
num_features = 12  # for len(relevance_results[0])
bucket_size = num_features // 3  # = 4

# relevance_results: shape (2, 12) - scores for relevance
relevance_results = torch.rand(num_items, num_features).numpy().tolist()

# similarity: shape (2, 12) - similarity scores between items and candidates
similarity = torch.rand(num_items, num_features).numpy().tolist()

# For similarity_answers, we need it indexed by [choice][candidate]
# choices will be a list of indices, candidates come from range(num_features)
# So similarity_answers should have num_choices rows and num_features columns
num_choices = 3
similarity_answers = torch.rand(num_choices, num_features).numpy().tolist()

# Setup parameters
i = 0  # which item to process
itera = 0  # iteration index (0 or 1, etc.)
choices = [0, 1, 2]  # list of choice indices
thres = 0.9  # relevance threshold
thres1 = 0.2  # similarity threshold

ARGS = {
    'i': i,
    'relevance_results': relevance_results,
    'similarity': similarity,
    'similarity_answers': similarity_answers,
    'choices': choices,
    'itera': itera,
    'thres': thres,
    'thres1': thres1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
getEuclidean Ran
ran on a synthesized input
wadeyin9712/gd-vcr/build_dataset/question_cluster.py
code served (permissive licence) · get_code("78e86f22ea46c2c2")
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 float, 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 math

def getEuclidean(point1, point2):
    dimension = len(point1)
    dist = 0.0
    for i in range(dimension):
        dist += (point1[i] - point2[i]) ** 2
    return math.sqrt(dist)

# Construct valid arguments
point1 = [1.0, 2.0, 3.0, 4.0]
point2 = [5.0, 6.0, 7.0, 8.0]

ARGS = {
    "point1": point1,
    "point2": point2
}
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 float, 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
k_means Ran
ran on a synthesized input
wadeyin9712/gd-vcr/build_dataset/question_cluster.py
code served (permissive licence) · get_code("34b7e4798f39686c")
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. 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 math
import random
import time

# Set seed for reproducibility
random.seed(42)

# Create a small dataset with 6 points in 3-dimensional space
dataset = [
    [1.0, 2.0, 3.0],
    [1.5, 2.5, 3.5],
    [10.0, 11.0, 12.0],
    [10.5, 11.5, 12.5],
    [5.0, 5.0, 5.0],
    [5.5, 5.5, 5.5],
]

# Number of clusters
k = 3

# Number of iterations
iteration = 2

ARGS = {
    "dataset": dataset,
    "k": k,
    "iteration": iteration,
}
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 tuple — a tuple 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
limit_range Ran
ran on a synthesized input
wadeyin9712/gd-vcr/build_dataset/similarity.py
code served (permissive licence) · get_code("56ced5a70a36ad9e")
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 torch

torch.manual_seed(0)

# Construct valid arguments for limit_range function
# The function processes choices (list of lists containing tokens and/or lists of indices)
# and limits indices to be less than objects_size

# choices: a list of "choices" where each choice is a list of tokens
# Tokens can be either:
#   - regular tokens (strings, numbers, etc.)
#   - lists of indices that need to be clamped to [0, objects_size-1]
choices = [
    [0, [1, 5, 8], "token1", [2, 10]],
    [[3, 7], "token2", [0, 4, 9]],
    ["token3", [6, 12, 2], 1]
]

# objects_size: the maximum valid index (exclusive upper bound)
# Indices >= objects_size will be clamped to objects_size - 1
objects_size = 6

ARGS = {
    "choices": choices,
    "objects_size": objects_size
}
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 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
retokenize_with_alignment Ran
ran on a synthesized input
wadeyin9712/gd-vcr/visualbert/dataloaders/vcr_data_utils.py
code served (permissive licence) · get_code("be08e5e375ccf6be")
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 2, 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 torch
import numpy as np

class BasicTokenizer:
    def tokenize(self, text):
        # Simple mock: split on spaces and lowercase
        return text.lower().split()

class WordpieceTokenizer:
    def tokenize(self, token):
        # Simple mock: split longer tokens into subword pieces
        if len(token) > 3:
            return [token[:3], token[3:]]
        return [token]

class MockTokenizer:
    def __init__(self):
        self.basic_tokenizer = BasicTokenizer()
        self.wordpiece_tokenizer = WordpieceTokenizer()

# Create test data
span = ["hello", "world"]
tokenizer = MockTokenizer()

ARGS = {
    "span": span,
    "tokenizer": tokenizer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
text_preprocessing Ran
ran on a synthesized input
wadeyin9712/gd-vcr/build_dataset/relevance_model.py
code served (permissive licence) · get_code("ea2f5a5e3b004c3a")
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, ndim 1, 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 torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - x: iterable of tokens, where each token can be either a list (of indices) or a regular token
# - objects: indexable collection (list or dict) where objects[idx] returns either 'person' or some other string

# Build minimal valid arguments
x = [
    'hello',                    # regular token (string)
    [0, 1],                     # list of indices
    'world',                    # regular token
    [5],                        # list with single index
    42                          # regular token (number)
]

# objects should be indexable by the indices used in x
# Indices used: 0, 1, 5 (max is 5)
# Need at least 6 elements to safely index up to 5
objects = [
    'person',      # idx 0
    'person',      # idx 1
    'object',      # idx 2
    'place',       # idx 3
    'thing',       # idx 4
    'person'       # idx 5
]

ARGS = {
    'x': x,
    'objects': objects
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
process_ctx_ans_for_bert Not yet run
unverified (harvested, no recorded run)
wadeyin9712/gd-vcr/visualbert/dataloaders/vcr_data_utils.py
code served (permissive licence) · get_code("ad276e7a73c8649e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 9 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

Commonsense is defined as the knowledge that is shared by everyone. However, certain types of commonsense knowledge are correlated with culture and geographic locations and they are only shared locally. For example, the scenarios of wedding ceremonies vary across regions due to different customs influenced by historical and religious factors. Such regional characteristics, however, are generally omitted in prior work. In this paper, we construct a Geo-Diverse Visual Commonsense Reasoning dataset (GD-VCR) to test vision-and-language models' ability to understand cultural and geo-location-specific commonsense. In particular, we study two state-of-the-art Vision-and-Language models, VisualBERT and ViLBERT trained on VCR, a standard multimodal commonsense benchmark with images primarily from Western regions. We then evaluate how well the trained models can generalize to answering the questions in GD-VCR. We find that the performance of both models for non-Western regions including East Asia, South Asia, and Africa is significantly lower than that for Western region. We analyze the reasons behind the performance disparity and find that the performance gap is larger on QA pairs that: 1) are concerned with culture-related scenarios, e.g., weddings, religious activities, and festivals; 2) require high-level geo-diverse commonsense reasoning rather than low-order perception and recognition. Dataset and code are released at https://github.com/ WadeYin9712/GD-VCR.

For agents

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

get_harvested_code_for_paper("2109.06860")
get_code_for_paper("2109.06860")
have("2109.06860")

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

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

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

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

Connect an agent — have() is free.