SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.11689 · EMNLP · 2022

SLING: Sino LINGuistic Evaluation of Large Language Models

Yixiao Song, Mohit Iyyer, ♢ Kalpesh, Krishna Rajesh Bhatt

arXiv · PDF · Open in the Atlas

Code that ran

6 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 6 have no contract verdict; 0 failures of our instrument; 3 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/2210.11689.json · badge: /api/ran/2210.11689.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
Yixiao-Song/SLING_Data_Code canonical (classifier label)
classifier basis not recorded on the link
6 ran · 3 no recorded run
FunctionStatusWhere it lives
evaluate_response Ran
ran on a synthesized input
Yixiao-Song/SLING_Data_Code/SLING_Code/gpt3_sling.py
code served (permissive licence) · get_code("48860298c011eb23")
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 math
import numpy as np

# Construct a response dict matching the expected structure
response = {
    'choices': [
        {
            'text': 'The quick brown fox jumps over the lazy dog.',
            'logprobs': {
                'token_logprobs': [
                    -0.5,  # First token (will be skipped by [1:])
                    -0.3,
                    -0.4,
                    -0.2,
                    -0.6,
                    -0.1,
                    -0.5,
                    -0.4,
                    -0.3,
                    -0.2,
                ]
            }
        }
    ]
}

max_tokens = 100

ARGS = {
    'response': response,
    'max_tokens': max_tokens,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
get_ppl Ran
ran on a synthesized input
Yixiao-Song/SLING_Data_Code/SLING_Code/utils.py
code served (permissive licence) · get_code("5cc704944bd4d2c9")
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. 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 torch.nn as nn

torch.manual_seed(0)

class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.embedding = nn.Embedding(100, 4)
        self.linear = nn.Linear(4, 100)
    
    def forward(self, input_ids, **kwargs):
        x = self.embedding(input_ids)
        logits = self.linear(x)
        return {'logits': logits}

class MinimalTokenizer:
    def __init__(self):
        self.vocab_size = 100
    
    def __call__(self, sentence, return_tensors=None):
        token_ids = [5, 10, 15, 20]
        input_ids = torch.tensor([token_ids])
        result = {'input_ids': input_ids}
        return result
    
    def convert_ids_to_tokens(self, token_ids):
        return ['token_' + str(i.item()) for i in token_ids]

model = MinimalModel()
tokenizer = MinimalTokenizer()
list_of_sentences = ["hello world", "this is a test"]

ARGS = {
    'model': model,
    'tokenizer': tokenizer,
    'list_of_sentences': list_of_sentences
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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
get_response Ran
ran on a synthesized input
Yixiao-Song/SLING_Data_Code/SLING_Code/gpt3_sling.py
code served (permissive licence) · get_code("2eff6ef3426dba90")
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 MockResponse. 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 openai

# Mock the openai module to avoid network calls
class MockResponse:
    def __init__(self):
        self.choices = [{"text": "This is a mock response.", "logprobs": None}]
        self.usage = {"prompt_tokens": 10, "completion_tokens": 20, "total_tokens": 30}

def mock_create(**kwargs):
    return MockResponse()

openai.Completion = type('Completion', (), {'create': staticmethod(mock_create)})

# Define arguments for get_response function
ARGS = {
    "prompt": "What is the meaning of life?",
    "max_tokens": 150,
    "temperature": 0.7,
    "top_p": 1,
    "n": 1,
    "logprobs": 1,
    "stop": None,
    "echo": True,
}
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 MockResponse — a MockResponse output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockResponse 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_token_log_prob Ran
ran on a synthesized input
Yixiao-Song/SLING_Data_Code/SLING_Code/utils.py
code served (permissive licence) · get_code("7e07d3bc59036cf4")
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. 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 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 MockTokenizer:
    def __call__(self, sentence, return_tensors=None):
        # Simulate tokenizer output with input_ids
        # Return a dict with 'input_ids' and 'attention_mask'
        batch_size = 1
        seq_len = 5
        vocab_size = 100
        input_ids = torch.randint(0, vocab_size, (batch_size, seq_len))
        attention_mask = torch.ones(batch_size, seq_len)
        return {
            'input_ids': input_ids,
            'attention_mask': attention_mask
        }
    
    def convert_ids_to_tokens(self, token_ids):
        # token_ids is a 1D tensor
        # Return a list of token strings
        return [f"token_{int(tid)}" for tid in token_ids]

class MockModel(nn.Module):
    def __init__(self, vocab_size=100, seq_len=5, hidden_dim=4):
        super().__init__()
        self.vocab_size = vocab_size
        self.hidden_dim = hidden_dim
        # Simple linear layer to project to vocab logits
        self.linear = nn.Linear(hidden_dim, vocab_size)
    
    def forward(self, input_ids, attention_mask=None, **kwargs):
        batch_size, seq_len = input_ids.shape
        # Create dummy hidden states and project to logits
        hidden_states = torch.randn(batch_size, seq_len, self.hidden_dim)
        logits = self.linear(hidden_states)
        return {'logits': logits}

model = MockModel(vocab_size=100, seq_len=5, hidden_dim=4)
tokenizer = MockTokenizer()
sentence = "hello world test sentence"

ARGS = {
    'model': model,
    'tokenizer': tokenizer,
    'sentence': sentence
}
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 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
load_climp_dataset Ran
ran on a synthesized input
Yixiao-Song/SLING_Data_Code/SLING_Code/Run_CLiMP/PanGu_climp.py
code served (permissive licence) · get_code("288f9b462debe734")
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 os
import tempfile

# Create a temporary directory and file for CLiMP-data
temp_dir = tempfile.mkdtemp()
climp_dir = os.path.join(temp_dir, 'CLiMP-data')
os.makedirs(climp_dir, exist_ok=True)

# Create a sample CSV file with the expected format
# Header + pairs of (good, bad) sentences
filename = 'test_dataset.csv'
filepath = os.path.join(climp_dir, filename)

sample_data = """header1,header2,header3
good sentence 1,data,good text
bad sentence 1,data,bad text
good sentence 2,data,good text 2
bad sentence 2,data,bad text 2
"""

with open(filepath, 'w') as f:
    f.write(sample_data)

# Patch the file opening to use our temp directory
import builtins
original_open = builtins.open

def patched_open(file_path, *args, **kwargs):
    if 'CLiMP-data/' in file_path:
        # Replace the path with our temp directory path
        file_path = file_path.replace('CLiMP-data/', climp_dir + '/')
    return original_open(file_path, *args, **kwargs)

builtins.open = patched_open

ARGS = {
    'filename': 'test_dataset.csv',
    'skip_header': True,
    'extract': lambda x: x[-2]
}
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, 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
perplexity Ran
ran on a synthesized input
Yixiao-Song/SLING_Data_Code/SLING_Code/gpt3_sling.py
code served (permissive licence) · get_code("daf29ee91adcf61e")
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
import numpy as np

# The function takes log_probs as a parameter
# It uses len() on log_probs, so it needs to be a sequence
# It uses np.sum() on log_probs, so it should be array-like
# The result is used in math.exp(), which expects a numeric value

# Create a small array of log probabilities
log_probs = np.array([-0.5, -1.2, -0.8, -1.5])

ARGS = {
    "log_probs": log_probs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
jieba_cnt Not yet run
unverified (harvested, no recorded run)
Yixiao-Song/SLING_Data_Code/count_sling_vocab.py
code served (permissive licence) · get_code("897e1a480e3ffd4d")
How it ran

no invocation recorded.

load_climp_dataset Not yet run
unverified (harvested, no recorded run)
Yixiao-Song/SLING_Data_Code/SLING_Code/utils.py
code served (permissive licence) · get_code("54522b02308a3a16")
How it ran

no invocation recorded.

run_lstm Not yet run
unverified (harvested, no recorded run)
Yixiao-Song/SLING_Data_Code/SLING_Code/lstm_sling.py
code served (permissive licence) · get_code("c5b0960e041cfacf")
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-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

To understand what kinds of linguistic knowledge are encoded by pretrained Chinese language models (LMs), we introduce the benchmark of Sino LINGuistics (SLING), which consists of 38K minimal sentence pairs in Mandarin Chinese grouped into 9 high-level linguistic phenomena. Each pair demonstrates the acceptability contrast of a specific syntactic or semantic phenomenon (e.g., The keys are lost vs. The keys is lost), and an LM should assign lower perplexity to the acceptable sentence. In contrast to the CLiMP dataset (Xiang et al., 2021), which also contains Chinese minimal pairs and was created by translating the vocabulary of the English BLiMP dataset, the minimal pairs in SLING are derived primarily by applying syntactic and lexical transformations to naturally-occurring, linguist-annotated sentences from the Chinese Treebank 9.0, thus addressing severe issues in CLiMP's data generation process. We test 18 publicly available pretrained monolingual (e.g., BERT-base-zh, CPM) and multi-lingual (e.g., mT5, XLM) language models on SLING. Our experiments show that the average accuracy for LMs is far below human performance (69.7% vs. 97.1%), while BERT-base-zh achieves the highest accuracy (84.8%) of all tested LMs, even much larger ones. Additionally, we find that most LMs have a strong gender and number (singular/plural) bias, and they perform better on local phenomena than hierarchical ones. 1

For agents

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

get_harvested_code_for_paper("2210.11689")
get_code_for_paper("2210.11689")
have("2210.11689")

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

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

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

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

Connect an agent — have() is free.