SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2025.findings-acl.931 · ACL Findings · 2025

The Devil Is in the Word Alignment Details: On Translation-Based Cross-Lingual Transfer for Token Classification Tasks

Goran Glavaš, Benedikt Ebing

Open in the Atlas

Code that ran

19 of 26 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; 5 honoured the contract we drafted, 1 violated it and 3 have no contract verdict; 10 failures of our instrument; 7 no recorded run), measured 2026-11-24; 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/2025.findings-acl.931.json · badge: /api/ran/2025.findings-acl.931.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
bebing93/devil-in-details canonical (classifier label)
classifier basis: census
12 ran · 2 no recorded run
ikergarcia1996/T-Projection canonical (classifier label)
classifier basis: census
7 ran · 5 no recorded run
FunctionStatusWhere it lives
calculate_external_jumps Ran
ran, honoured the contract we drafted
bebing93/devil-in-details/AccAlign/aer.py
code served (permissive licence) · get_code("3aba17e1a40bed9c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# The function takes alignments as a parameter
# alignments should be a list of sets, where each set contains source indices
# aligned to each target word

ARGS = {
    "alignments": [set(), {1, 2, 4}, {2}, {4}, set()]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calculate_internal_jumps Ran
ran, honoured the contract we drafted
bebing93/devil-in-details/AccAlign/aer.py
code served (permissive licence) · get_code("1e122f7f394f5663")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Setup code for calculate_internal_jumps

ARGS = {
    "alignments": [
        {1, 2, 4},
        {42}
    ]
}
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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
clean_translation Ran
ran; our contract draft was wrong, not the code
bebing93/devil-in-details/devil_in_details/translation/postprocess_translation.py
code served (permissive licence) · get_code("da53eaa47189e7e6")
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 clean_translation(text):
    text = text.replace('\u200c', ' ').replace('\u200b', ' ').replace('\u200d', ' ').replace('\u200e', ' ').replace('\xa0', ' ')
    text = re.sub('\\s+', ' ', text)
    return text

ARGS = {
    'text': 'Hello\u200cworld\u200bzero\u200dwidth\u200ejoiner\xa0nbsp'
}
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
collate_fn_t5 Ran
ran on a synthesized input
ikergarcia1996/T-Projection/utils/dataset.py
code served (permissive licence) · get_code("21f973debfcf938f")
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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal data_collator_seq2seq that accepts a list and returns a dict with 'input_ids'
class MinimalDataCollator(nn.Module):
    def __init__(self):
        super().__init__()
    
    def __call__(self, batch):
        # Expects a list of token id lists, returns dict with 'input_ids'
        # Pad to max length in batch
        max_len = max(len(x) for x in batch) if batch else 1
        padded = [x + [0] * (max_len - len(x)) for x in batch]
        return {'input_ids': torch.tensor(padded, dtype=torch.long)}

# Create a minimal pad_fn (tokenizer-like) that pads sequences
def pad_fn(batch):
    # Expects a list of items, returns dict with 'input_ids'
    if isinstance(batch[0], (list, torch.Tensor)):
        max_len = max(len(x) if isinstance(x, (list, torch.Tensor)) else 1 for x in batch)
        padded = []
        for x in batch:
            if isinstance(x, torch.Tensor):
                x = x.tolist()
            if isinstance(x, list):
                padded.append(x + [0] * (max_len - len(x)))
            else:
                padded.append([x] + [0] * (max_len - 1))
        return {'input_ids': torch.tensor(padded, dtype=torch.long)}
    else:
        # Single items - wrap and pad
        return {'input_ids': torch.tensor([[x] + [0] * (max_len - 1) for x in batch], dtype=torch.long)}

# Create a sample batch with 2 examples
# Each example has 9 components: (model_input, task_name, idx, source_words, source_entities, source_labels, target_words, target_entities, target_labels)
batch = [
    (
        [1, 2, 3],           # model_input (will go through data_collator_seq2seq)
        [4],                 # task_name
        0,                   # idx
        [5, 6],              # source_words
        [7],                 # source_entities
        [8, 9],              # source_labels
        [10],                # target_words
        [11, 12],            # target_entities
        [13]                 # target_labels
    ),
    (
        [2, 3, 4, 5],        # model_input
        [5],                 # task_name
        1,                   # idx
        [6, 7, 8],           # source_words
        [9, 10],             # source_entities
        [11],                # source_labels
        [12, 13],            # target_words
        [14],                # target_entities
        [15, 16]             # target_labels
    )
]

data_collator_seq2seq = MinimalDataCollator()

ARGS = {
    'data_collator_seq2seq': data_collator_seq2seq,
    'pad_fn': pad_fn,
    'batch': batch
}
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
cosine_similarity Ran
ran, violated the contract we drafted
ikergarcia1996/T-Projection/calculate_scores_nmts.py
code served (permissive licence) · get_code("a6a8dbc2de61f945")
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 float64, ndim 0, 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 numpy as np

# Create two small numpy arrays for cosine similarity computation
a = np.array([1.0, 2.0, 3.0, 4.0])
b = np.array([2.0, 1.0, 0.5, 1.5])

ARGS = {
    "a": a,
    "b": b,
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
create_target_tags Ran
ran, honoured the contract we drafted
bebing93/devil-in-details/devil_in_details/alignment/postprocess_alignment_ttrain.py
code served (permissive licence) · get_code("04dad10207c650c5")
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 int; 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
from typing import List, Dict, Optional, Any

torch.manual_seed(0)

# Construct entity_mappings based on how the function uses it:
# - Iterates over .values()
# - Each mapping has 'trg_indices' (list) and 'src_type' (int)
# - trg_indices can be empty or contain indices into trg_tags list
entity_mappings = {
    0: {
        'trg_indices': [1, 2, 3],
        'src_type': 5
    },
    1: {
        'trg_indices': [5],
        'src_type': 3
    },
    2: {
        'trg_indices': [],
        'src_type': 7
    }
}

# trg_length: Length of target sequence
# Should be large enough to accommodate the indices in entity_mappings
trg_length = 10

ARGS = {
    'entity_mappings': entity_mappings,
    'trg_length': trg_length
}
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 int — 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
judge_if_Chinese_and_Japanese_token Ran
ran, honoured the contract we drafted
bebing93/devil-in-details/devil_in_details/translation/preprocess_translation.py
code served (permissive licence) · get_code("87513aa41428a339")
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 int; 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 re

def judge_if_Chinese_and_Japanese_token(pretokenized_text):
    """
    Adpoted from https://github.com/edchengg/easyproject/blob/main/ner/decode_marker_conll.py

    Judge each token in a pretokenized sent if Chinese or Japanese
    Input:
        a sentence. ['增加', '一项', '提醒', '在', '今天', '下午', '4']
    Output:
        a 0, 1 list, 1 means is Chinese token, 0 means not.
        [1, 1, 1, 1, 1, 1, 0]
    """
    'U+0E00..U+0E7F'
    return [1 if re.search('[\\u3040-\\u30ff\\u3400-\\u4dbf\\u4e00-\\u9fff\\uf900-\\ufaff\\uff66-\\uff9f\\u0E00-\\u0E7F]+', i) != None else 0 for i in pretokenized_text]


ARGS = {
    'pretokenized_text': ['增加', '一项', '提醒', '在', '今天', '下午', '4']
}
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 int — 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
load_jsonl Ran
ran; our contract draft was wrong, not the code
bebing93/devil-in-details/devil_in_details/utils.py
code served (permissive licence) · get_code("0e1cca42a6a2578a")
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 json
import tempfile
import os

# Create a temporary JSONL file for testing
temp_dir = tempfile.mkdtemp()
temp_filepath = os.path.join(temp_dir, "test_data.jsonl")

# Write some test data to the temporary file
test_data = [
    {"id": 1, "text": "hello world"},
    {"id": 2, "text": "foo bar"},
    {"id": 3, "nested": {"key": "value"}}
]

with open(temp_filepath, 'w', encoding='utf-8') as f:
    for item in test_data:
        f.write(json.dumps(item) + '\n')

# Define ARGS dictionary with the filepath parameter
ARGS = {
    "filepath": temp_filepath
}
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
load_text_lines Ran
ran; our contract draft was wrong, not the code
bebing93/devil-in-details/devil_in_details/utils.py
code served (permissive licence) · get_code("cfc2baf0b9bdb4e9")
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 tempfile
import os

# Create a temporary text file with sample content
temp_dir = tempfile.mkdtemp()
temp_filepath = os.path.join(temp_dir, "test_file.txt")

with open(temp_filepath, 'w', encoding='utf-8') as f:
    f.write("line one\n")
    f.write("line two\n")
    f.write("line three\n")

ARGS = {
    "filepath": temp_filepath
}
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
map_entities Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bebing93/devil-in-details/devil_in_details/alignment/postprocess_alignment_ttrain.py
code served (permissive licence) · get_code("ed9ecf9b780a2faf")
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 torch
import numpy as np

# Construct arguments for map_entities function

# src_entity_indices: List of lists containing token indices for each entity
src_entity_indices = [
    [0, 1],      # Entity 0 spans tokens 0-1
    [3, 4, 5]    # Entity 1 spans tokens 3-4-5
]

# src_entity_types: List of entity type IDs for each entity
src_entity_types = [1, 2]  # Entity 0 is type 1, Entity 1 is type 2

# srcidx2trgidx: Mapping from source token index to list of target token indices
srcidx2trgidx = {
    0: [0],
    1: [1],
    3: [2],
    4: [3],
    5: [4]
}

# src_tokens: Source language tokens
src_tokens = ["hello", "world", "foo", "bar", "baz", "qux"]

# trg_tokens: Target language tokens
trg_tokens = ["bonjour", "monde", "barre", "bas", "qux"]

# complete_source: Whether to require complete source alignment
complete_source = False

# complete_target: Whether to require complete target alignment (no gaps)
complete_target = False

ARGS = {
    "src_entity_indices": src_entity_indices,
    "src_entity_types": src_entity_types,
    "srcidx2trgidx": srcidx2trgidx,
    "src_tokens": src_tokens,
    "trg_tokens": trg_tokens,
    "complete_source": complete_source,
    "complete_target": complete_target
}
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 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
parse_alignment_line Ran
ran, honoured the contract we drafted
bebing93/devil-in-details/devil_in_details/utils.py
code served (permissive licence) · get_code("2cb872d3ad14b847")
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 int; 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 logging

logger = logging.getLogger(__name__)

# Test case 1: Valid alignment line with multiple alignments
line_valid = "0-0 1-1 2-2 3-3"

# Test case 2: Empty line
line_empty = ""

# Test case 3: Single alignment
line_single = "0-0"

# We'll use the valid case as the primary test
ARGS = {
    "line": "0-0 1-1 2-2 3-3"
}
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 2, dtype family int — 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
prepare_pair Ran
ran on a synthesized input
ikergarcia1996/T-Projection/utils/dataset.py
code served (permissive licence) · get_code("a9efb832af418aec")
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 torch
import numpy as np
from transformers import PreTrainedTokenizer

torch.manual_seed(0)

class StandInTokenizer(PreTrainedTokenizer):
    """Minimal tokenizer implementation for testing."""
    
    def __init__(self):
        # Initialize with minimal required attributes
        self.src_lang = None
        self.tgt_lang = None
        self.eos_token_id = 2
        self.pad_token_id = 0
        self.vocab_size = 100
        self.model_max_length = 512
    
    def __call__(self, text=None, target_txt=None, return_tensors=None, 
                 padding=False, truncation=False, max_length=None):
        """Mock tokenization that returns input_ids and attention_mask."""
        # Simple mock: convert text length to token count
        if target_txt is not None:
            token_count = len(target_txt.split())
        else:
            token_count = len(text.split()) if text else 5
        
        # Cap at max_length if specified
        if max_length:
            token_count = min(token_count, max_length)
        
        input_ids = list(range(1, token_count + 1))
        attention_mask = [1] * len(input_ids)
        
        return {
            'input_ids': input_ids,
            'attention_mask': attention_mask
        }
    
    def get_vocab(self):
        return {str(i): i for i in range(self.vocab_size)}
    
    @property
    def vocab_size(self):
        return self._vocab_size
    
    @vocab_size.setter
    def vocab_size(self, value):
        self._vocab_size = value

tokenizer = StandInTokenizer()

ARGS = {
    'tokenizer': tokenizer,
    'source_lang': 'en',
    'target_lang': 'fr',
    'source_txt': 'hello world',
    'target_txt': 'bonjour monde',
    'max_length': 128,
    'decoder_start_token_id': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, transformers — 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
return_extended_attention_mask Ran
ran; our contract draft was wrong, not the code
bebing93/devil-in-details/AccAlign/self_training_modeling_adapter.py
code served (permissive licence) · get_code("68af8f0bf09d4f06")
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 4, dtype family float, shape (2, 1, 1, 4) 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

torch.manual_seed(0)

# Test case 1: 3D attention mask
attention_mask_3d = torch.ones(2, 1, 4)  # batch=2, seq_len=4, with extra dim
dtype_test = torch.float32

# Test case 2: 2D attention mask
attention_mask_2d = torch.ones(2, 4)  # batch=2, seq_len=4

# Use the 2D case for ARGS
ARGS = {
    "attention_mask": attention_mask_2d,
    "dtype": dtype_test
}
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 4, dtype family float, shape (2, 1, 1, 4) — shape (2, 1, 1, 4) 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
split_sentence Ran
ran on a synthesized input
ikergarcia1996/T-Projection/utils/utils.py
code served (permissive licence) · get_code("d08c38f92e838808")
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 re

# Create a regex pattern that matches tags (e.g., <tag>, [tag], etc.)
tag_regex = re.compile(r'<[^>]+>')

# Create a sample sentence with tags embedded in words
sentence = "Hello<tag>world and foo<another>bar test"

# Recursion limit - standard value
recursion_limit = 256

ARGS = {
    "tag_regex": tag_regex,
    "sentence": sentence,
    "recursion_limit": recursion_limit,
}
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
to_bilou_encoding Ran
ran; our contract draft was wrong, not the code
ikergarcia1996/T-Projection/datasets/tag_encoding.py
code served (permissive licence) · get_code("d2660d11a380300e")
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

# Setup code for to_bilou_encoding function

# The function takes a list of tags and converts them to BILOU encoding
# Tags should be in BIO format (B-TYPE, I-TYPE, O)
# BILOU format uses: B (Beginning), I (Inside), L (Last), O (Outside), U (Unit/single)

ARGS = {
    "tags": [
        "B-PER",
        "I-PER",
        "O",
        "B-LOC",
        "O",
        "B-ORG",
        "I-ORG",
        "I-ORG",
        "O"
    ]
}
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
to_iob2_encoding Ran
ran; our contract draft was wrong, not the code
ikergarcia1996/T-Projection/datasets/tag_encoding.py
code served (permissive licence) · get_code("6c7118a2f5cc50e4")
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

# Construct valid arguments for to_iob2_encoding
# The function takes a list of IOB-format tags and converts them to IOB2 format

# Create a list of tags in various formats that the function will process
tags = [
    'B-PER',      # Beginning of person entity
    'I-PER',      # Inside person entity
    'O',          # Outside any entity
    'U-ORG',      # Unit (single token entity) of organization
    'B-LOC',      # Beginning of location entity
    'I-LOC',      # Inside location entity
    'I-ORG',      # Inside organization (but previous was not ORG, so should become B-ORG)
    'O',
    'B-PER',
    'I-PER',
]

ARGS = {
    'tags': tags
}
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 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
to_iob_encoding Ran
ran; our contract draft was wrong, not the code
ikergarcia1996/T-Projection/datasets/tag_encoding.py
code served (permissive licence) · get_code("f709c942540a746b")
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 typing import List

def to_iob_encoding(tags: List[str]) -> List[str]:
    prev_tag_b: str = 'O'
    prev_tag_t: str = ''
    for i in range(len(tags)):
        tag = tags[i]
        if tag == 'O':
            prev_tag_b = 'O'
            prev_tag_t = ''
        else:
            try:
                b, t = tag.split('-')
            except ValueError:
                raise ValueError(f'Error tag {tag}, unable to split the tag in 2 fields.')
            if (b == 'B' or b == 'U') and prev_tag_b != 'O' and (prev_tag_t == t):
                tags[i] = f'B-{t}'
            else:
                tags[i] = f'I-{t}'
            prev_tag_b = b
            prev_tag_t = t
    return tags


# Test cases with various tag sequences
tags_1 = ['O', 'B-PER', 'I-PER', 'O', 'B-LOC', 'I-LOC', 'I-LOC']
tags_2 = ['U-PER', 'B-ORG', 'I-ORG', 'O']
tags_3 = ['B-PER', 'B-PER', 'I-LOC', 'O', 'U-ORG']

ARGS = {
    'tags': ['O', 'B-PER', 'I-PER', 'O', 'B-LOC', 'I-LOC', 'I-LOC']
}
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
to_list Ran
ran; our contract draft was wrong, not the code
bebing93/devil-in-details/AccAlign/aer.py
code served (permissive licence) · get_code("b1ea1c1a0b203c9a")
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

ARGS = {
    "A": {(2, 1), (0, 0), (3, 1)}
}
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 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
validate_instance_completeness Ran
ran; our contract draft was wrong, not the code
bebing93/devil-in-details/devil_in_details/alignment/postprocess_alignment_ttrain.py
code served (permissive licence) · get_code("f7a0026847f122bf")
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 bool, 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 torch
import numpy as np
from collections import Counter

# Set random seed for reproducibility
torch.manual_seed(0)

# Test case 1: Matching entity type counts
src_entity_types_1 = [0, 1, 1, 2, 0, 2]
trg_tags_1 = [0, 1, 1, 2, 0, 2]

# Test case 2: Non-matching counts (should fail validation)
src_entity_types_2 = [0, 0, 1, 1, 2]
trg_tags_2 = [0, 1, 1, 2, 2]

# Using test case 1 for ARGS (matching counts)
ARGS = {
    "src_entity_types": src_entity_types_1,
    "trg_tags": trg_tags_1,
}
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 bool, 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
ensemble_predictions Not yet run
unverified (harvested, no recorded run)
bebing93/devil-in-details/devil_in_details/evaluation/evaluate_bio.py
code served (permissive licence) · get_code("e8d9709ecacb3679")
How it ran

no invocation recorded.

find_dictionary Not yet run
unverified (harvested, no recorded run)
ikergarcia1996/T-Projection/label_projection.py
code served (permissive licence) · get_code("75b5a35ddead7bab")
How it ran

no invocation recorded.

get_score Not yet run
unverified (harvested, no recorded run)
ikergarcia1996/T-Projection/label_projection.py
code served (permissive licence) · get_code("fafc9230eec0ad80")
How it ran

no invocation recorded.

label2name Not yet run
unverified (harvested, no recorded run)
ikergarcia1996/T-Projection/utils/label_names.py
code served (permissive licence) · get_code("70bab034f9244cb1")
How it ran

no invocation recorded.

map_entities Not yet run
unverified (harvested, no recorded run)
bebing93/devil-in-details/devil_in_details/evaluation/project_translate_test_logits_bio.py
code served (permissive licence) · get_code("aab6b35b1eca8c96")
How it ran

no invocation recorded.

name2label Not yet run
unverified (harvested, no recorded run)
ikergarcia1996/T-Projection/utils/label_names.py
code served (permissive licence) · get_code("346a92eaf1c6cc2d")
How it ran

no invocation recorded.

prepare_sl Not yet run
unverified (harvested, no recorded run)
ikergarcia1996/T-Projection/utils/dataset.py
code served (permissive licence) · get_code("9c228dec5c5a3aeb")
How it ran

no invocation recorded.

Also present in other papers' code

Of 26 samples lifted from this paper's linked repositories, 26 carry a function identity and 0 do not. Of the 26 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 0 later) and 21 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.

FunctionAlso present inEarliest-datedOthers named
label2name 1 other paper
1 dated earlier
2106.09685 (2021-06)
LoRA: Low-Rank Adaptation of Large Language Models
name2label 1 other paper
1 dated earlier
2106.09685 (2021-06)
LoRA: Low-Rank Adaptation of Large Language Models
to_bilou_encoding 1 other paper
1 dated earlier
2310.03668 (2023-10)
GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction
to_iob2_encoding 1 other paper
1 dated earlier
2310.03668 (2023-10)
GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction
to_iob_encoding 1 other paper
1 dated earlier
2310.03668 (2023-10)
GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction

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-24.

Repositories linked to this paper

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

Abstract

Translation-based strategies for cross-lingual transfer (XLT) such as translate-traintraining on noisy target language data translated from the source language-and translatetest-evaluating on noisy source language data translated from the target language-are competitive XLT baselines. In XLT for token classification tasks, however, these strategies include label projection, the challenging step of mapping the labels from each token in the original sentence to its counterpart(s) in the translation. Although word aligners (WAs) are commonly used for label projection, the low-level design decisions for applying them to translation-based XLT have not been systematically investigated. Moreover, recent markerbased methods, which project labeled spans by inserting tags around them before (or after) translation, claim to outperform WAs in label projection for XLT. In this work, we revisit WAs for label projection, systematically investigating the effects of low-level design decisions on token-level XLT: (i) the algorithm for projecting labels between (multi-)token spans, (ii) filtering strategies to reduce the number of noisily mapped labels, and (iii) the pre-tokenization of the translated sentences. We find that all of these substantially impact translation-based XLT performance and show that, with optimized choices, XLT with WA offers performance at least comparable to that of markerbased methods. We then introduce a new projection strategy that ensembles translate-train and translate-test predictions and demonstrate that it substantially outperforms the markerbased projection. Crucially, we show that our proposed ensembling also reduces sensitivity to low-level WA design choices, resulting in more robust XLT for token classification tasks. We first detail our pipeline for label projection with WA focusing on the low-level design choices we investigate: mapping labeled spans, filtering strategies, and pre-tokenization (García-Ferrero et al., 2022). We then describe our new translation-based XLT approach for token-level tasks that ensembles T-Train and T-Test. Translation-based XLT entails two paradigms: (1) creating noisy target language training data by

For agents

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

get_harvested_code_for_paper("2025.findings-acl.931")
get_code_for_paper("2025.findings-acl.931")
have("2025.findings-acl.931")

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

curl https://syntology.ai/api/ran/2025.findings-acl.931.json

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

[![Syntology run record](https://syntology.ai/api/ran/2025.findings-acl.931.svg)](https://syntology.ai/paper/2025.findings-acl.931)

Connect an agent — have() is free.