SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.11005 · 2024

Assessing Dialect Fairness and Robustness of Large Language Models in Reasoning Tasks

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 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 1 has no contract verdict; 3 failures of our instrument; 3 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/2410.11005.json · badge: /api/ran/2410.11005.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
fangru-lin/redial_dialect_robustness_fairness canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
FunctionStatusWhere it lives
find_answer_comprehensive Ran
ran; our contract draft was wrong, not the code
fangru-lin/redial_dialect_robustness_fairness/utils/utils.py
code served (permissive licence) · get_code("59f2900e7b1f8bc2")
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 re

def find_answer_comprehensive(answer):
    """
    Find the answer from the response.
        Parameters:
            answer (str): response
    """
    try:
        ans = re.findall('<answer>(.*?)</answer>', answer, re.DOTALL)[-1].strip().lower()
        return ans
    except:
        return ''


# Setup code to construct valid arguments
ARGS = {
    'answer': '<answer>Hello World</answer>'
}
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
generate_from_openai_chat_completion Ran
ran on a synthesized input
fangru-lin/redial_dialect_robustness_fairness/utils/llm_call.py
code served (permissive licence) · get_code("ad59a66e901fd34f")
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 coroutine. 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 asyncio
from unittest.mock import AsyncMock, MagicMock
import json

# Create a mock OpenAI client
mock_client = AsyncMock()

# Create a mock response object that has the expected structure
mock_choice = MagicMock()
mock_choice.message.content = "This is a generated response."

mock_response = MagicMock()
mock_response.choices = [mock_choice]
mock_response.model_dump_json = MagicMock(return_value=json.dumps({
    "choices": [{"message": {"content": "This is a generated response."}}]
}))

# Set up the mock client to return the mock response
mock_client.chat.completions.create = AsyncMock(return_value=mock_response)

ARGS = {
    "client": mock_client,
    "task_prompts": ["What is 2+2?", "What is the capital of France?"],
    "nshot_prompt": "Answer the following question: ",
    "model": "gpt-4o-0513",
    "system_prompts": ["You are a helpful assistant.", "You are a helpful assistant."],
    "n_choices": 1,
    "temperature": 0.7,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine 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
inference Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
fangru-lin/redial_dialect_robustness_fairness/utils/open_llm_call.py
code served (permissive licence) · get_code("6b96fd4ade51244c")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 transformers
from unittest.mock import Mock, MagicMock
import os
import tempfile

torch.manual_seed(0)

# Create a minimal tokenizer mock
class MockTokenizer:
    def __call__(self, texts, return_tensors=None, padding=False, truncation=False, max_length=None):
        # Return a mock that has input_ids and attention_mask
        result = Mock()
        result['input_ids'] = torch.tensor([[1, 2, 3, 4], [5, 6, 7, 8]])
        result['attention_mask'] = torch.tensor([[1, 1, 1, 1], [1, 1, 1, 1]])
        return result
    
    def decode(self, token_ids, skip_special_tokens=False):
        return "generated text output"

# Create a minimal model config mock
class MockConfig:
    def __init__(self):
        self._name_or_path = "meta-llama/Llama-2-7b"

# Create a minimal model mock
class MockModel(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.config = MockConfig()
        self.linear = torch.nn.Linear(4, 4)
    
    def generate(self, input_ids, attention_mask=None, max_new_tokens=100, do_sample=False, temperature=1.0, top_p=1.0, num_return_sequences=1, **kwargs):
        batch_size = input_ids.shape[0]
        return torch.tensor([[1, 2, 3, 4, 5, 6, 7, 8] for _ in range(batch_size)])

# Create a minimal pipeline mock
class MockPipeline:
    def __init__(self):
        self.model = MockModel()
    
    def __call__(self, messages, max_new_tokens=100, eos_token_id=None, do_sample=False, temperature=1.0, top_p=1.0, return_full_text=False, batch_size=1, num_return_sequences=1, **kwargs):
        # Return list of lists of dicts with 'generated_text' key
        batch = messages
        result = []
        for _ in batch:
            result.append([{'generated_text': 'This is a generated response.'} for _ in range(num_return_sequences)])
        return result

# Create temporary directory for saving
temp_dir = tempfile.mkdtemp()

# Build ARGS dictionary
ARGS = {
    'pipeline': MockPipeline(),
    'user_prompts': ['What is machine learning?', 'Explain AI in one sentence.'],
    'terminators': [2, 3],
    'model': MockModel(),
    'tokenizer': MockTokenizer(),
    'save_dir': temp_dir,
    'save_name': 'output.json',
    'sys_prompts': ['You are a helpful assistant.', 'You are a helpful assistant.'],
    'max_new_tokens': 512,
    'temperature': 0.7,
    'top_p': 0.95,
    'batch_size': 2,
    'num_return_sequences': 1,
    'instruction_tuned': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm, transformers — 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
str_to_timedelta_list Ran
ran; our contract draft was wrong, not the code
fangru-lin/redial_dialect_robustness_fairness/utils/utils.py
code served (permissive licence) · get_code("7a893a21638d9a89")
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.

from datetime import timedelta
import datetime as dt

# The function converts a string representation of timedelta objects back to actual timedelta objects
# It uses eval with a restricted namespace containing timedelta and datetime

# Valid test string that represents a list of timedelta objects
time_str = '[datetime.timedelta(seconds=4800), datetime.timedelta(seconds=4800)]'

ARGS = {
    'time_str': time_str
}
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, 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
check_correctness_comprehensive Not yet run
unverified (harvested, no recorded run)
fangru-lin/redial_dialect_robustness_fairness/utils/utils.py
code served (permissive licence) · get_code("702a98c04d4c24bb")
How it ran

no invocation recorded.

init_pipeline Not yet run
unverified (harvested, no recorded run)
fangru-lin/redial_dialect_robustness_fairness/utils/open_llm_call.py
code served (permissive licence) · get_code("1b20637da1c0aa54")
How it ran

no invocation recorded.

pipe_and_infer Not yet run
unverified (harvested, no recorded run)
fangru-lin/redial_dialect_robustness_fairness/utils/open_llm_call.py
code served (permissive licence) · get_code("f00384bec73e9e28")
How it ran

no invocation recorded.

Also present in other papers' code

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

Language is not monolithic. While benchmarks, including those designed for multiple languages, are often used as proxies to evaluate the performance of Large Language Models (LLMs), they tend to overlook the nuances of within-language variation and thus fail to model the experience of speakers of non-standard dialects. Focusing on African American Vernacular English (AAVE), we present the first study aimed at objectively assessing the fairness and robustness of LLMs in handling dialects across canonical reasoning tasks, including algorithm, math, logic, and integrated reasoning. We introduce ReDial (Reasoning with Dialect Queries), a benchmark containing 1.2K+ parallel query pairs in Standardized English and AAVE. We hire AAVE speakers, including experts with computer science backgrounds, to rewrite seven popular benchmarks, such as HumanEval and GSM8K. With ReDial, we evaluate widely used LLMs, including GPT, Claude, Llama, Mistral, and the Phi model families. Our findings reveal that almost all of these widely used models show significant brittleness and unfairness to queries in AAVE. Our work establishes a systematic and objective framework for analyzing LLM bias in dialectal queries. Moreover, it highlights how mainstream LLMs provide unfair service to dialect speakers in reasoning tasks, laying a critical foundation for future research.

For agents

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

get_harvested_code_for_paper("2410.11005")
get_code_for_paper("2410.11005")
have("2410.11005")

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

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

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

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

Connect an agent — have() is free.