SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.09369 · 2024

Massively Multi-Cultural Knowledge Acquisition & LM Benchmarking

arXiv · PDF · Open in the Atlas

Code that ran

7 of 14 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, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 7 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/2402.09369.json · badge: /api/ran/2402.09369.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
yrf1/llm-massivemulticulturenormsknowledge-nclb canonical (classifier label)
classifier basis: census
7 ran · 7 no recorded run
FunctionStatusWhere it lives
enum_list_of_keys Ran
ran; our contract draft was wrong, not the code
yrf1/llm-massivemulticulturenormsknowledge-nclb/src/preproc_data.py
code served (permissive licence) · get_code("2fa0004a087a12a8")
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 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

# Build a nested dictionary structure that matches the function's expected format
# The function iterates through 4 levels of nesting: k1, k2, k3, k4
# and skips the 'metadata' key at the first level

dict_x = {
    'model_config': {
        'layer1': {
            'weights': {
                'param_a': torch.randn(2, 4),
                'param_b': torch.randn(3, 5)
            },
            'biases': {
                'param_c': torch.randn(4),
                'param_d': torch.randn(5)
            }
        },
        'layer2': {
            'weights': {
                'param_e': torch.randn(2, 3),
                'param_f': torch.randn(4, 6)
            }
        }
    },
    'metadata': {
        'should_skip': {
            'nested': {
                'values': 'ignored'
            }
        }
    },
    'training_config': {
        'optimizer': {
            'settings': {
                'lr': 0.001,
                'momentum': 0.9
            }
        }
    }
}

ARGS = {
    'dict_x': dict_x
}
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, ndim 2, 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
filter_by_CultureProfileElements Ran
ran; our contract draft was wrong, not the code
yrf1/llm-massivemulticulturenormsknowledge-nclb/eval/utils.py
code served (permissive licence) · get_code("2d66c77e326695e8")
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 torch
import numpy as np

# Construct output_s_list
# Each element is a tuple: (c, t1, tit, query_s, lbl, pred_output)
output_s_list = [
    (0, "text1", "http://example.com/page1", "What is culture?", "label1", 0.95),
    (1, "text2", "http://example.com/page2", "Tell me about traditions.", "label2", 0.87),
]

# Construct scraped_data_wProfile
# Structure: {key: {subkey1: {subkey2: {subkey3: {url, sent_profile_extracted}}}}}
scraped_data_wProfile = {
    "metadata": {"some": "metadata"},
    "article1": {
        "section1": {
            "subsection1": {
                "http://example.com/page1": {
                    "url": "http://example.com/page1",
                    "sent_profile_extracted": {
                        "sent1": {
                            "sent_elaborated": "What is culture?",
                            "subCulture_dim": "individualism",
                            "genCulture_dim": "N/A",
                        }
                    }
                }
            }
        }
    },
    "article2": {
        "section2": {
            "subsection2": {
                "http://example.com/page2": {
                    "url": "http://example.com/page2",
                    "sent_profile_extracted": {
                        "sent2": {
                            "sent_elaborated": "Tell me about traditions.",
                            "subCulture_dim": "N/A",
                            "genCulture_dim": "collectivism",
                        }
                    }
                }
            }
        }
    },
}

ARGS = {
    "output_s_list": output_s_list,
    "scraped_data_wProfile": scraped_data_wProfile,
    "mode": "subCulture",
    "culture_dimension": "subCulture_dim",
}
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 — 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
ln_by_ln_inference Ran
ran; our contract draft was wrong, not the code
yrf1/llm-massivemulticulturenormsknowledge-nclb/eval/benchmark_Mistral.py
code served (permissive licence) · get_code("17f85a76874f51d2")
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 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 torch.nn as nn
import pandas as pd
from datetime import datetime

torch.manual_seed(0)

class MockTokenizer:
    def __call__(self, text):
        # Returns a dict with 'input_ids' key
        return {'input_ids': [101, 2054, 2003, 1045, 102]}
    
    def decode(self, token_ids):
        # Simple mock decode that returns text with [/INST] marker
        if isinstance(token_ids, torch.Tensor):
            token_ids = token_ids.tolist()
        return "[INST] question [/INST] True, the answer is true."

class MockGenerator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(5, 5)
    
    def generate(self, input_ids):
        # Returns tensor of token ids
        batch_size = input_ids.shape[0]
        return torch.tensor([[101, 2054, 2003, 1045, 102]], dtype=torch.long)

# Create a small dataframe with required columns
df_data = {
    0: ['category1', 'category2'],
    1: ['time1', 'time2'],
    4: ['title1', 'title2'],
    9: ['Is this true?', 'Is this false?'],
    10: [True, False]
}
df = pd.DataFrame(df_data)

model = MockGenerator()
tokenizer = MockTokenizer()
output_s_list = []
output_tracker = set()
result_fname = '/tmp/test_results.json'

ARGS = {
    'df': df,
    'model': model,
    'tokenizer': tokenizer,
    'output_s_list': output_s_list,
    'output_tracker': output_tracker,
    'result_fname': result_fname
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, 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
run_eval_per_s_query Ran
ran, honoured the contract we drafted
yrf1/llm-massivemulticulturenormsknowledge-nclb/eval/benchmark_Mistral.py
code served (permissive licence) · get_code("0b5e8fa2c8ed015f")
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 Tensor, ndim 2, dtype family int, shape (1, 64) 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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal generator that has a generate method
class MinimalGenerator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 8)
    
    def generate(self, input_ids):
        # Takes input_ids tensor and returns some output
        # input_ids shape: [batch_size, seq_len]
        batch_size = input_ids.shape[0]
        # Return a tensor of generated tokens
        return torch.randint(0, 100, (batch_size, 64))

# Create a minimal query_s dict with 'input_ids' key
query_s = {
    'input_ids': [101, 2054, 2003, 1045]  # Example token IDs
}

# Create the generator
generator = MinimalGenerator()

ARGS = {
    'query_s': query_s,
    'generator': generator,
    'max_gen_len': 64,
    'ckpt_type': ''
}
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 Tensor, ndim 2, dtype family int, shape (1, 64) — shape (1, 64) 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
run_eval_per_s_query Ran
ran; our contract draft was wrong, not the code
yrf1/llm-massivemulticulturenormsknowledge-nclb/eval/benchmark_OpenAI.py
code served (permissive licence) · get_code("0f928623ca171da3")
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
import torch.nn as nn

torch.manual_seed(0)

class MockGenerator:
    def chat_completion(self, dialogs, max_gen_len=64, temperature=0.0, top_p=1.0):
        return [[{'generation': {'content': 'True'}}]]

class MockLocalLlama:
    def __call__(self, prompt, max_gen_len, temperature, generator, stop_=None):
        return ['True']

def use_local_llama(prompt, max_gen_len, temperature, generator, stop_=None):
    return ['True']

query_s = "Is the sky blue?"
generator_meta = MockGenerator()
generator_hf = MockLocalLlama()
max_gen_len = 64
ckpt_type_meta = 'meta'
ckpt_type_hf = 'hf'

ARGS = {
    'query_s': query_s,
    'generator': generator_meta,
    'max_gen_len': max_gen_len,
    'ckpt_type': ckpt_type_meta
}
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
run_eval_per_s_query Ran
ran; our contract draft was wrong, not the code
yrf1/llm-massivemulticulturenormsknowledge-nclb/eval/benchmark_llama.py
code served (permissive licence) · get_code("a558311992567d15")
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
import torch.nn as nn


class MockGenerator:
    def chat_completion(self, dialogs, max_gen_len=64, temperature=0.0, top_p=1.0):
        # dialogs is a list of conversations
        # each conversation is a list of message dicts with 'role' and 'content'
        # Returns a list of results, each with [0] being a dict with 'generation' key
        return [[{
            'generation': {
                'content': 'True'
            }
        }]]


query_s = "Is the sky blue?"
generator = MockGenerator()
max_gen_len = 64
ckpt_type = ''

ARGS = {
    'query_s': query_s,
    'generator': generator,
    'max_gen_len': max_gen_len,
    'ckpt_type': ckpt_type
}
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
topic_filt_4Wil Ran
ran; our contract draft was wrong, not the code
yrf1/llm-massivemulticulturenormsknowledge-nclb/src/preproc_data.py
code served (permissive licence) · get_code("90f74a0232938024")
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 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

# Create a valid argument for topic_filt_4Wil
# The function expects topic_cat_vec which is a list/array of numbers
# Looking at the function logic:
# - It can have length 6, 7, 12, or 13
# - It converts each element to a formatted string then back to float
# - It maps indices to topic names based on length

# Let's create a test case with length 7 (a basic case)
topic_cat_vec = [0.1, 0.2, 0.15, 0.25, 0.1, 0.05, 0.15]

ARGS = {
    'topic_cat_vec': topic_cat_vec
}
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 1, 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
get_init_neg_ChatGPT Not yet run
unverified (harvested, no recorded run)
yrf1/llm-massivemulticulturenormsknowledge-nclb/src/construct_mm_benchmark.py
code served (permissive licence) · get_code("16d32f9178023e5a")
How it ran

no invocation recorded.

ln_by_ln_inference Not yet run
unverified (harvested, no recorded run)
yrf1/llm-massivemulticulturenormsknowledge-nclb/eval/benchmark_llama.py
code served (permissive licence) · get_code("03a1c44ac8696099")
How it ran

no invocation recorded.

read_computed_stats Not yet run
unverified (harvested, no recorded run)
yrf1/llm-massivemulticulturenormsknowledge-nclb/eval/utils.py
code served (permissive licence) · get_code("54ae785eb9f2b038")
How it ran

no invocation recorded.

read_from_json_per_c_t Not yet run
unverified (harvested, no recorded run)
yrf1/llm-massivemulticulturenormsknowledge-nclb/eval/benchmark_Mistral.py
code served (permissive licence) · get_code("f1d36b9d9d7e8538")
How it ran

no invocation recorded.

read_from_json_per_c_t Not yet run
unverified (harvested, no recorded run)
yrf1/llm-massivemulticulturenormsknowledge-nclb/eval/benchmark_Vicuna.py
code served (permissive licence) · get_code("6046e31eabdfb031")
How it ran

no invocation recorded.

read_from_json_per_c_t Not yet run
unverified (harvested, no recorded run)
yrf1/llm-massivemulticulturenormsknowledge-nclb/eval/benchmark_llama.py
code served (permissive licence) · get_code("7e2c5b0ef97143b9")
How it ran

no invocation recorded.

self_check_neg Not yet run
unverified (harvested, no recorded run)
yrf1/llm-massivemulticulturenormsknowledge-nclb/src/construct_mm_benchmark.py
code served (permissive licence) · get_code("cf415e0cdfeaee77")
How it ran

no invocation recorded.

Also present in other papers' code

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

Pretrained large language models have revolutionized many applications but still face challenges related to cultural bias and a lack of cultural commonsense knowledge crucial for guiding cross-culture communication and interactions. Recognizing the shortcomings of existing methods in capturing the diverse and rich cultures across the world, this paper introduces a novel approach for massively multicultural knowledge acquisition. Specifically, our method strategically navigates from densely informative Wikipedia documents on cultural topics to an extensive network of linked pages. Leveraging this valuable source of data collection, we construct the CultureAtlas dataset, which covers a wide range of sub-country level geographical regions and ethnolinguistic groups, with data cleaning and preprocessing to ensure textual assertion sentence self-containment, as well as fine-grained cultural profile information extraction. Our dataset not only facilitates the evaluation of language model performance in culturally diverse contexts but also serves as a foundational tool for the development of culturally sensitive and aware language models. Our work marks an important step towards deeper understanding and bridging the gaps of cultural disparities in AI, to promote a more inclusive and balanced representation of global cultures in the digital domain.

For agents

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

get_harvested_code_for_paper("2402.09369")
get_code_for_paper("2402.09369")
have("2402.09369")

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

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

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

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

Connect an agent — have() is free.