SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.07336 · NeurIPS · 2024

SETLEXSEM CHALLENGE: Using Set Operations to Evaluate the Lexical and Semantic Robustness of Language Models

Bardiya Akhbari, Manish Gawali, Nicholas Dronen

arXiv · PDF · Open in the Atlas

Code that ran

19 of 23 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; 2 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 16 failures of our instrument; 4 no recorded run), measured 2026-11-23; 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/2411.07336.json · badge: /api/ran/2411.07336.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
amazon-science/setlexsem-challenge canonical (classifier label)
classifier basis: census
16 ran · 4 no recorded run
amazon-science/SetLexSem-Challenge canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
agg Ran
ran, honoured the contract we drafted
amazon-science/setlexsem-challenge/setlexsem/analyze/hypothesis_testing_utils.py
code served (permissive licence) · get_code("50791cd8d19ae17c")
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 Series. 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 pandas as pd
import torch
import numpy as np

torch.manual_seed(0)

# The function takes a single parameter 'x' which needs:
# - .min() method
# - .max() method
# - .mean() method
# - .std() method
# These are all available on pandas Series, numpy arrays, and torch tensors

# Create a small pandas Series with some numeric values
x = pd.Series([1.0, 2.5, 3.7, 4.2, 5.1])

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Series — a Series output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Series output the recorded ndim 1 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
astype_set Ran
ran; our contract draft was wrong, not the code
amazon-science/SetLexSem-Challenge/setlexsem/generate/generate_sets.py
code served (permissive licence) · get_code("6ee8c0ec3ee6a7a3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned set. 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 ast

# Test case 1: raw_input is a string representation of a set
raw_input_1 = "{'a', 'b', 'c'}"

# Test case 2: raw_input is a list (will be converted to set)
raw_input_2 = [1, 2, 3, 4]

# Test case 3: raw_input is already a set
raw_input_3 = {5, 6, 7}

# Test case 4: raw_input is a tuple (will be converted to set)
raw_input_4 = (8, 9, 10)

# Use one of the test cases for ARGS
ARGS = {"raw_input": raw_input_1}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
create_single_plot Ran
ran on a synthesized input
amazon-science/setlexsem-challenge/setlexsem/analyze/visualize.py
code served (permissive licence) · get_code("382682b1f43803e2")
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 Figure. 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 pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

# Create a sample DataFrame with the required columns
np.random.seed(0)

data = pd.DataFrame({
    'Set operation': ['Union', 'Intersection', 'Difference', 'Union', 'Intersection', 'Difference', 
                      'Union', 'Intersection', 'Difference', 'Union', 'Intersection', 'Difference'],
    'Group A': ['GroupA', 'GroupA', 'GroupA', 'GroupB', 'GroupB', 'GroupB',
                'GroupA', 'GroupA', 'GroupA', 'GroupB', 'GroupB', 'GroupB'],
    'Avg Accuracy': np.random.uniform(60, 95, 12)
})

ARGS = {
    'data': data,
    'hue_group': 'Group A',
    'txt_title': 'Performance Comparison of Set Operations',
    'legend_loc': 'upper right',
    'plot_type': 'bar',
    'figure_size': (8, 3)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, pandas, seaborn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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
create_subplots_1d Ran
ran; our contract draft was wrong, not the code
amazon-science/setlexsem-challenge/setlexsem/analyze/visualize.py
code served (permissive licence) · get_code("01c3ce5d9fb476e6")
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 Figure. 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 pandas as pd
import numpy as np
import matplotlib.pyplot as plt

# Create a sample DataFrame with the required columns
np.random.seed(0)

data = pd.DataFrame({
    'Set operation': ['Union', 'Intersection', 'Difference', 'Union', 'Intersection', 'Difference'] * 2,
    'Avg Accuracy': np.random.uniform(60, 95, 12),
    'Group A': ['GroupA', 'GroupA', 'GroupA', 'GroupB', 'GroupB', 'GroupB'] * 2,
    'Category': ['Cat1', 'Cat1', 'Cat1', 'Cat1', 'Cat1', 'Cat1', 'Cat2', 'Cat2', 'Cat2', 'Cat2', 'Cat2', 'Cat2']
})

ARGS = {
    'data': data,
    'hue_group': 'Group A',
    'break_by': 'Category',
    'txt_title': 'Test Plot Title',
    'legend_loc': 'upper right',
    'plot_type': 'bar'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, pandas, seaborn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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
filter_dataframe Ran
ran; our contract draft was wrong, not the code
amazon-science/setlexsem-challenge/setlexsem/analyze/error_analysis.py
code served (permissive licence) · get_code("fea82b54e26300ae")
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 DataFrame. 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 pandas as pd

# Create a sample dataframe
df_in = pd.DataFrame({
    'name': ['Alice', 'Bob', 'Charlie', 'David', 'Eve'],
    'age': [25, 30, 25, 35, 30],
    'city': ['NYC', 'LA', 'NYC', 'Chicago', 'LA'],
    'salary': [50000, 60000, 55000, 70000, 65000]
})

# Create filter criteria - mix of single values and lists
filter_criteria = {
    'age': 25,
    'city': ['NYC', 'LA']
}

ARGS = {
    'df_in': df_in,
    'filter_criteria': filter_criteria
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
filter_words Ran
ran; our contract draft was wrong, not the code
amazon-science/setlexsem-challenge/setlexsem/generate/sample.py
code served (permissive licence) · get_code("8431ddf5ad802651")
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

# Construct valid arguments for filter_words function
words = ['cat', 'dog', 'elephant', 'bird', 'a', 'tree', 'sun', 'hello', 'world', 'python']
item_len = 3

ARGS = {
    'words': words,
    'item_len': item_len
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk, 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
generate_set_pair Ran
ran; our contract draft was wrong, not the code
amazon-science/SetLexSem-Challenge/setlexsem/generate/generate_sets.py
code served (permissive licence) · get_code("c653593d59f019e1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 random

# Example 1: Using an iterable that yields string representations of sets
def pair_generator_iterable():
    yield ("{1, 2, 3}", "{3, 4, 5}")
    yield ("{2, 4, 6}", "{1, 3, 5}")

# Example 2: Using an iterable that yields lists (which will be converted to sets)
def pair_generator_lists():
    yield ([1, 2, 3], [3, 4, 5])
    yield ([2, 4, 6], [1, 3, 5])

# Example 3: Using a callable that returns a tuple of sets
def random_set_pair_callable():
    return set(random.sample(range(10), 3)), set(random.sample(range(10), 3))

# Example 4: Using a callable that returns sets directly
def fixed_set_pair_callable():
    return {1, 2, 3}, {4, 5, 6}

# We'll use the iterable example with string representations as the main test case
ARGS = {
    "sampler": pair_generator_iterable()
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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, 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_normalized_count Ran
ran; our contract draft was wrong, not the code
amazon-science/setlexsem-challenge/setlexsem/analyze/error_analysis.py
code served (permissive licence) · get_code("600bbee8e77f30f9")
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 pandas as pd
import numpy as np

# Create a small dataframe with a 'res_len_comparison' column
# The function calls df_check[column_name].value_counts(normalize=True)
# So we need a column with repeating values that can be counted
data = {
    'res_len_comparison': ['short', 'long', 'short', 'medium', 'short', 'long', 'long', 'medium']
}
df_check = pd.DataFrame(data)

ARGS = {
    'df_check': df_check,
    'column_name': 'res_len_comparison'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
get_path_root Ran
ran; our contract draft was wrong, not the code
amazon-science/setlexsem-challenge/setlexsem/constants.py
code served (permissive licence) · get_code("8d9b3e28920892c7")
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 os
from pathlib import Path

# The function expects a string path that contains 'setlexsem' as one of its parts
# We'll construct a realistic file path that would be found in a repo structure

this_file = "/home/user/projects/setlexsem/src/utils/helpers.py"

ARGS = {
    "this_file": this_file
}
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
get_stats Ran
ran, honoured the contract we drafted
amazon-science/setlexsem-challenge/setlexsem/analyze/hypothesis_testing_utils.py
code served (permissive licence) · get_code("5afc0bf83778d553")
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 DataFrame. 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 pandas as pd
import numpy as np

# Create a sample DataFrame with the required columns
data = {
    'Set operation': ['union', 'union', 'intersection', 'intersection', 'difference', 'difference'],
    'Token type': ['word', 'char', 'word', 'char', 'word', 'char'],
    'Accuracy': [0.85, 0.92, 0.78, 0.88, 0.81, 0.95]
}
df_in = pd.DataFrame(data)

# Convert categorical columns to category dtype for 'observed=True' parameter
df_in['Set operation'] = df_in['Set operation'].astype('category')
df_in['Token type'] = df_in['Token type'].astype('category')

ARGS = {
    'df_in': df_in
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
make_english_list Ran
ran; our contract draft was wrong, not the code
amazon-science/setlexsem-challenge/setlexsem/generate/prompt.py
code served (permissive licence) · get_code("642f476d5eddbdcf")
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

torch.manual_seed(0)

ARGS = {
    'members': {1, 2, 3}
}
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
make_hps_prompt Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
amazon-science/setlexsem-challenge/setlexsem/generate/generate_prompts.py
code served (permissive licence) · get_code("f829eb3daa3cf327")
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 generator. 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
from itertools import product
from typing import Dict, List, Union

torch.manual_seed(0)

# Analyze the function: it takes optional parameters or a config dict
# It builds a param_grid and uses product() to generate all combinations
# The parameters are: op_list, k_shot, prompt_type, prompt_approach, is_fix_shot
# Each can be a single value or a list; they're normalized to lists in param_grid

ARGS = {
    'op_list': ['add', 'sub', 'mul'],
    'k_shot': [1, 2, 3],
    'prompt_type': ['direct', 'chain_of_thought'],
    'prompt_approach': ['standard', 'optimized'],
    'is_fix_shot': [True, False],
    'config': {}
}
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 generator — a generator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a generator 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
make_sampler_name_from_hps Ran
ran; our contract draft was wrong, not the code
amazon-science/setlexsem-challenge/setlexsem/generate/sample.py
code served (permissive licence) · get_code("ec9a1efddf07bd2e")
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

ARGS = {
    'sampler_hps': {
        'm_A': 10,
        'm_B': 20,
        'item_len': 5,
        'n': 100,
        'overlap_fraction': 0.3,
        'decile_num': 5,
        'swap_status': True
    }
}
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
make_set Ran
ran; our contract draft was wrong, not the code
amazon-science/setlexsem-challenge/setlexsem/generate/prompt.py
code served (permissive licence) · get_code("b3f84cf0a92a6cb5")
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 numpy as np

torch.manual_seed(0)

# The function make_set takes a single parameter 'members' which should be
# a set-like object. It checks len(members), converts to list, and iterates
# through members calling str() on each one.

ARGS = {
    'members': {1, 2, 3}
}
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 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
make_verb Ran
ran; our contract draft was wrong, not the code
amazon-science/setlexsem-challenge/setlexsem/generate/prompt.py
code served (permissive licence) · get_code("3992b00cf71e89e3")
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

def make_verb(members):
    """Make the prompt grammatically correct by defining the verb"""
    return 'is' if len(members) == 1 else 'are'

# The function takes 'members' and checks its length
# So we need to provide a list or sequence with a definite length
# Test with both single and multiple members

ARGS = {
    'members': ['Alice', 'Bob']
}
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
parse_set_pair Ran
ran; our contract draft was wrong, not the code
amazon-science/SetLexSem-Challenge/setlexsem/generate/generate_sets.py
code served (permissive licence) · get_code("39c5d1d50694781a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 ast
import logging

# Set up logging
logger = logging.getLogger(__name__)

# Define the function (already provided, but included for completeness)
def astype_set(raw_input):
    if not isinstance(raw_input, set):
        if type(raw_input) == str:
            raw_input = raw_input.strip()
            set_out = ast.literal_eval(raw_input)
        else:
            set_out = set(raw_input)
        return set_out
    else:
        return raw_input  # Fixed: should return raw_input, not set_out

def parse_set_pair(raw_set_a: str, raw_set_b: str):
    """Parse string representations of sets into Python sets"""
    try:
        set_a = astype_set(raw_set_a)
        set_b = astype_set(raw_set_b)
        return (set_a, set_b)
    except (ValueError, SyntaxError) as e:
        logger.error(f'Failed to parse sets: {e}')
        raise

# Create valid arguments for parse_set_pair
raw_set_a = "{1, 2, 3, 4}"
raw_set_b = "{3, 4, 5, 6}"

ARGS = {
    "raw_set_a": raw_set_a,
    "raw_set_b": raw_set_b
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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, 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
read_yaml Ran
ran; our contract draft was wrong, not the code
amazon-science/setlexsem-challenge/setlexsem/utils.py
code served (permissive licence) · get_code("493412c498a81a41")
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 dict. 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 tempfile
import os
import yaml

# Create a temporary YAML file for testing
temp_dir = tempfile.mkdtemp()
yaml_file_path = os.path.join(temp_dir, "test.yaml")

# Write a simple valid YAML file
test_data = {
    "key1": "value1",
    "key2": 42,
    "key3": ["item1", "item2"],
    "nested": {
        "subkey": "subvalue"
    }
}

with open(yaml_file_path, 'w') as f:
    yaml.dump(test_data, f)

ARGS = {
    "path_to_yaml": yaml_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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_none Ran
ran; our contract draft was wrong, not the code
amazon-science/setlexsem-challenge/setlexsem/generate/generate_prompts.py
code served (permissive licence) · get_code("7086c5b67a013729")
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

def replace_none(list_in):
    return [None if x == 'None' else x for x in list_in]

# Construct a list with mixed content including the string 'None' and other values
list_in = ['None', 'value1', 'None', 42, 3.14, None, 'another_string']

ARGS = {
    'list_in': list_in
}
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
viz_barplot Ran
ran; our contract draft was wrong, not the code
amazon-science/setlexsem-challenge/setlexsem/analyze/visualize.py
code served (permissive licence) · get_code("7d0543bbfc5e3a17")
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 Figure. 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 pandas as pd
import numpy as np

# Create sample data for visualization
np.random.seed(0)

# Generate a small DataFrame with the required columns
data = {
    'Set operation': ['Union', 'Intersection', 'Difference', 'Union', 'Intersection', 'Difference'] * 4,
    'Avg Accuracy': np.random.uniform(50, 95, 24),
    'model_name': ['ModelA', 'ModelB', 'ModelC', 'ModelA', 'ModelB', 'ModelC'] * 4,
    'dataset': ['CIFAR10', 'CIFAR10', 'CIFAR10', 'ImageNet', 'ImageNet', 'ImageNet'] * 4,
    'split': ['train', 'train', 'train', 'train', 'train', 'train', 'test', 'test', 'test', 'test', 'test', 'test'] * 2,
}

df_res = pd.DataFrame(data)

# Define arguments for viz_barplot function
ARGS = {
    'df_res': df_res,
    'hue_group': 'model_name',
    'break_by': None,
    'filter_query': None,
    'save_fig': '',
    'legend_loc': 'upper right',
    'plot_type': 'bar',
    'figure_size': (8, 3),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, pandas, seaborn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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
aws_auth Not yet run
unverified (harvested, no recorded run)
amazon-science/setlexsem-challenge/setlexsem/experiment/lmapi.py
code served (permissive licence) · get_code("7ec1a56a7fb2d0a6")
How it ran

no invocation recorded.

calculate_extra_info Not yet run
unverified (harvested, no recorded run)
amazon-science/setlexsem-challenge/setlexsem/analyze/error_analysis.py
code served (permissive licence) · get_code("7a11de2b701c8b62")
How it ran

no invocation recorded.

count_tokens Not yet run
unverified (harvested, no recorded run)
amazon-science/setlexsem-challenge/setlexsem/experiment/lmapi.py
code served (permissive licence) · get_code("912d808705da066a")
How it ran

no invocation recorded.

invoke_bedrock Not yet run
unverified (harvested, no recorded run)
amazon-science/setlexsem-challenge/setlexsem/experiment/lmapi.py
code served (permissive licence) · get_code("b063a2fc16acb1cd")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

Set theory is foundational to mathematics and, when sets are finite, to reasoning about the world. An intelligent system should perform set operations consistently, regardless of superficial variations in the operands. Initially designed for semantically-oriented NLP tasks, large language models (LLMs) are now being evaluated on algorithmic tasks. Because sets are comprised of arbitrary symbols (e.g. numbers, words), they provide an opportunity to test, systematically, the invariance of LLMs' algorithmic abilities under simple lexical or semantic variations. To this end, we present the SETLEXSEM CHALLENGE, a synthetic benchmark that evaluates the performance of LLMs on set operations. SETLEXSEM assesses the robustness of LLMs' instruction-following abilities under various conditions, focusing on the set operations and the nature and construction of the set members. Evaluating seven LLMs with SETLEXSEM, we find that they exhibit poor robustness to variation in both operation and operands. We show -via the framework's systematic sampling of set members along lexical and semantic dimensions -that LLMs are not only not robust to variation along these dimensions but demonstrate unique failure modes in particular, easy-to-create semantic groupings of "deceptive" sets. We find that rigorously measuring language model robustness to variation in frequency and length is challenging and present an analysis that measures them independently. The code for reproducing the results of this paper, and for generating the SETLEXSEM CHALLENGE dataset, is available at https://github.com/amazon-science/SetLexSem-Challenge.

For agents

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

get_harvested_code_for_paper("2411.07336")
get_code_for_paper("2411.07336")
have("2411.07336")

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

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

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

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

Connect an agent — have() is free.