SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2011.01536 · 2020

TransQuest: Translation Quality Estimation with Cross-lingual Transformers

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-21; 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/2011.01536.json · badge: /api/ran/2011.01536.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
tharindudr/transQuest canonical (classifier label)
classifier basis not recorded on the link
9 ran · 3 no recorded run
FunctionStatusWhere it lives
convert_example_to_feature_sliding_window Ran
ran on a synthesized input
tharindudr/transQuest/transquest/algo/sentence_level/monotransquest/utils.py
code served (permissive licence) · get_code("0931caf14453c7a9")
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

class SimpleTokenizer:
    def __init__(self):
        self.vocab = {
            '[CLS]': 101,
            '[SEP]': 102,
            '[PAD]': 0,
            'hello': 7592,
            'world': 2088,
            'this': 2023,
            'is': 2003,
            'a': 1037,
            'test': 3231,
            'sample': 6233,
            'text': 3231,
        }
    
    def tokenize(self, text):
        words = text.lower().split()
        tokens = []
        for word in words:
            if word in self.vocab:
                tokens.append(word)
            else:
                tokens.append('[UNK]')
        return tokens
    
    def convert_tokens_to_ids(self, tokens):
        ids = []
        for token in tokens:
            ids.append(self.vocab.get(token, 0))
        return ids

class SimpleExample:
    def __init__(self, text_a, text_b=None, label=0):
        self.text_a = text_a
        self.text_b = text_b
        self.label = label

tokenizer = SimpleTokenizer()
example = SimpleExample(
    text_a="hello world this is a test sample text",
    text_b=None,
    label=0
)

example_row = (
    example,                    # example
    64,                         # max_seq_length
    tokenizer,                  # tokenizer
    'classification',           # output_mode
    False,                      # cls_token_at_end
    '[CLS]',                    # cls_token
    '[SEP]',                    # sep_token
    1,                          # cls_token_segment_id
    False,                      # pad_on_left
    0,                          # pad_token_segment_id
    False,                      # sep_token_extra
    False,                      # multi_label
    0.5,                        # stride
    0,                          # pad_token
    False,                      # add_prefix_space
    True,                       # pad_to_max_length
)

ARGS = {
    'example_row': example_row,
    'pad_token': 0,
    'sequence_a_segment_id': 0,
    'sequence_b_segment_id': 1,
    'cls_token_segment_id': 1,
    'pad_token_segment_id': 0,
    'mask_padding_with_zero': True,
    'sep_token_extra': False,
}
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
cos_sim Ran
ran, honoured the contract we drafted
tharindudr/transQuest/transquest/algo/sentence_level/siamesetransquest/util.py
code served (permissive licence) · get_code("19d2149e7c25cfe7")
How it ran

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

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create two small tensors with distinct dimensions
# a: (2, 4) - 2 vectors of dimension 4
# b: (3, 4) - 3 vectors of dimension 4
a = torch.randn(2, 4)
b = torch.randn(3, 4)

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
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
dot_score Ran
ran on a synthesized input
tharindudr/transQuest/transquest/algo/sentence_level/siamesetransquest/util.py
code served (permissive licence) · get_code("012009d484af4f75")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 3) 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)

# Create two small tensors with distinct dimensions
# a: shape (2, 4) - 2 vectors of dimension 4
# b: shape (3, 4) - 3 vectors of dimension 4
a = torch.randn(2, 4)
b = torch.randn(3, 4)

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
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
format_to_test Ran
ran on a synthesized input
tharindudr/transQuest/transquest/algo/word_level/microtransquest/format.py
code served (permissive licence) · get_code("5a83b1990534ed1d")
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

class Args:
    def __init__(self):
        self.tag = "[TAG]"

# Create test data: list of (source_sentence, target_sentence) tuples
to_test = [
    ("The quick brown fox", "jumps over the"),
    ("Hello world example", "test sentence here"),
]

# Create args object with the tag attribute
args = Args()

ARGS = {
    "to_test": to_test,
    "args": args,
}
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
pearson_corr Ran
ran on a synthesized input
tharindudr/transQuest/transquest/algo/sentence_level/monotransquest/evaluation.py
code served (permissive licence) · get_code("12fed9e96649da47")
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 torch
import numpy as np
from scipy.stats import pearsonr, spearmanr

torch.manual_seed(0)

# The function pearson_corr takes two array-like arguments: preds and labels
# It computes the Pearson correlation coefficient between them using scipy.stats.pearsonr
# Both arguments should be 1D or 2D array-like structures (lists, numpy arrays, or torch tensors)

# Create small prediction and label arrays
preds = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
labels = np.array([1.1, 2.1, 2.9, 4.2, 4.8])

ARGS = {
    "preds": preds,
    "labels": labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — 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
post_process Ran
ran on a synthesized input
tharindudr/transQuest/transquest/algo/word_level/microtransquest/format.py
code served (permissive licence) · get_code("eff4679b609af119")
How it ran

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

import torch
import numpy as np

# Create a minimal args object with required attributes
class Args:
    def __init__(self):
        self.default_quality = "O"  # Default tag when index out of range

# Create sample predicted_sentences: list of lists of dicts
# Each dict represents a word's prediction with tag as value
predicted_sentences = [
    [
        {"tag": "B-PER"},
        {"tag": "I-PER"},
        {"tag": "O"},
        {"tag": "B-LOC"},
        {"tag": "O"},
    ],
    [
        {"tag": "B-ORG"},
        {"tag": "O"},
        {"tag": "B-PER"},
        {"tag": "O"},
    ]
]

# Create sample test_sentences with [SEP] token separating source and target
test_sentences = [
    "hello world [SEP] foo bar baz",
    "john smith [SEP] jane doe"
]

args = Args()

ARGS = {
    "predicted_sentences": predicted_sentences,
    "test_sentences": test_sentences,
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pytorch_cos_sim Ran
ran on a synthesized input
tharindudr/transQuest/transquest/algo/sentence_level/siamesetransquest/util.py
code served (permissive licence) · get_code("0516f9a26d1c518b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 3) 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)

# Create two small tensors with distinct dimensions
# a: batch_size=2, embedding_dim=4
a = torch.randn(2, 4)

# b: batch_size=3, embedding_dim=4
b = torch.randn(3, 4)

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
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
rmse Ran
ran on a synthesized input
tharindudr/transQuest/transquest/algo/sentence_level/monotransquest/evaluation.py
code served (permissive licence) · get_code("caa8fa90a6034056")
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 float32, 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 numpy as np
import torch

torch.manual_seed(0)

# Create small prediction and label arrays
preds = np.array([1.5, 2.3, 3.1, 4.2], dtype=np.float32)
labels = np.array([1.2, 2.5, 3.0, 4.5], dtype=np.float32)

ARGS = {
    "preds": preds,
    "labels": labels
}
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 float32, 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
spearman_corr Ran
ran on a synthesized input
tharindudr/transQuest/transquest/algo/sentence_level/monotransquest/evaluation.py
code served (permissive licence) · get_code("200c1f8d26b88021")
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 torch
import numpy as np
from scipy.stats import pearsonr, spearmanr

torch.manual_seed(0)

# Create small prediction and label arrays
preds = np.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6])
labels = np.array([0.15, 0.25, 0.35, 0.38, 0.52, 0.58])

ARGS = {
    "preds": preds,
    "labels": labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — 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
convert_example_to_feature Not yet run
unverified (harvested, no recorded run)
tharindudr/transQuest/transquest/algo/sentence_level/monotransquest/utils.py
code served (permissive licence) · get_code("1eb3821a4613f649")
How it ran

no invocation recorded.

convert_examples_to_features Not yet run
unverified (harvested, no recorded run)
tharindudr/transQuest/transquest/algo/sentence_level/monotransquest/utils.py
code served (permissive licence) · get_code("6a3ab13e452a9b0f")
How it ran

no invocation recorded.

prepare_data Not yet run
unverified (harvested, no recorded run)
tharindudr/transQuest/transquest/algo/word_level/microtransquest/format.py
code served (permissive licence) · get_code("457f4b6965c80637")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 12 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 12 later) and 0 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
cos_sim 2 other papers
2 later
2023.findings-acl.892 (2023 (year only))
"A Little is Enough": Few-Shot Quality Estimation based Corpus Filtering improves Machine Translation
2601.12407 (2026-01)
De-Anonymization at Scale via Tournament-Style Attribution
convert_example_to_feature 1 other paper
1 later
2023.findings-acl.892 (2023 (year only))
"A Little is Enough": Few-Shot Quality Estimation based Corpus Filtering improves Machine Translation
convert_example_to_feature_sliding_window 1 other paper
1 later
2023.findings-acl.892 (2023 (year only))
"A Little is Enough": Few-Shot Quality Estimation based Corpus Filtering improves Machine Translation
convert_examples_to_features 1 other paper
1 later
2023.findings-acl.892 (2023 (year only))
"A Little is Enough": Few-Shot Quality Estimation based Corpus Filtering improves Machine Translation
dot_score 1 other paper
1 later
2023.findings-acl.892 (2023 (year only))
"A Little is Enough": Few-Shot Quality Estimation based Corpus Filtering improves Machine Translation
format_to_test 1 other paper
1 later
2023.findings-acl.892 (2023 (year only))
"A Little is Enough": Few-Shot Quality Estimation based Corpus Filtering improves Machine Translation
pearson_corr 1 other paper
1 later
2023.findings-acl.892 (2023 (year only))
"A Little is Enough": Few-Shot Quality Estimation based Corpus Filtering improves Machine Translation
post_process 1 other paper
1 later
2023.findings-acl.892 (2023 (year only))
"A Little is Enough": Few-Shot Quality Estimation based Corpus Filtering improves Machine Translation
prepare_data 1 other paper
1 later
2023.findings-acl.892 (2023 (year only))
"A Little is Enough": Few-Shot Quality Estimation based Corpus Filtering improves Machine Translation
pytorch_cos_sim 1 other paper
1 later
2023.findings-acl.892 (2023 (year only))
"A Little is Enough": Few-Shot Quality Estimation based Corpus Filtering improves Machine Translation
rmse 1 other paper
1 later
2023.findings-acl.892 (2023 (year only))
"A Little is Enough": Few-Shot Quality Estimation based Corpus Filtering improves Machine Translation
spearman_corr 1 other paper
1 later
2023.findings-acl.892 (2023 (year only))
"A Little is Enough": Few-Shot Quality Estimation based Corpus Filtering improves Machine Translation

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

Repositories linked to this paper

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

Abstract

Recent years have seen big advances in the field of sentence-level quality estimation (QE), largely as a result of using neural-based architectures. However, the majority of these methods work only on the language pair they are trained on and need retraining for new language pairs. This process can prove difficult from a technical point of view and is usually computationally expensive. In this paper we propose a simple QE framework based on cross-lingual transformers, and we use it to implement and evaluate two different neural architectures. Our evaluation shows that the proposed methods achieve state-of-the-art results outperforming current open-source quality estimation frameworks when trained on datasets from WMT. In addition, the framework proves very useful in transfer learning settings, especially when dealing with low-resourced languages, allowing us to obtain very competitive results.

For agents

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

get_harvested_code_for_paper("2011.01536")
get_code_for_paper("2011.01536")
have("2011.01536")

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

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

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

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

Connect an agent — have() is free.