SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2023.acl-long.47 · ACL · 2023

Test-time Adaptation for Machine Translation Evaluation by Uncertainty Minimization

Xuebo Liu, Derek Wong, Lidia Chao, Nlp, Min Zhang, Runzhe Zhan, Cuilian Zhang

Code that ran

9 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 4 have no contract verdict; 5 failures of our instrument; 0 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/2023.acl-long.47.json · badge: /api/ran/2023.acl-long.47.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
NLP2CT/TaU canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
average_pooling Ran
ran; our contract draft was wrong, not the code
NLP2CT/TaU/comet/models/pooling_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ironbeliever/car, is pointer only (licence: NONE) · get_code("42452a89c72c37f0")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ironbeliever/car, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

download_file_maybe_extract Ran
ran on a synthesized input
NLP2CT/TaU/comet/download_utils.py
code served (permissive licence) · get_code("894abd4fa2801d20")
How it ran

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

import os
import tempfile
from pathlib import Path

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

# Create a dummy file to simulate what would be downloaded
dummy_file = os.path.join(temp_dir, "dummy.txt")
with open(dummy_file, 'w') as f:
    f.write("test content")

# Set up arguments for download_file_maybe_extract
ARGS = {
    "url": "https://example.com/dummy.txt",
    "directory": temp_dir,
    "filename": "dummy.txt",
    "extension": None,
    "check_files": ["dummy.txt"]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — 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
filtered_sys_score Ran
ran on a synthesized input
NLP2CT/TaU/tau/meta_eval_results.py
code served (permissive licence) · get_code("80a61a047ecc37ef")
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 numpy as np

class MockEvaluator:
    def __init__(self):
        self.std_ref = "ref"
        self._scores = {
            "sys1": [1.5, 2.0, None, 3.5],
            "sys2": [2.5, None, 3.0, 4.0],
            "ref": [1.0, 1.0, 1.0, 1.0]
        }
    
    def Scores(self, level, metric_type):
        return self._scores

evs = MockEvaluator()
input_sys = "sys1"
seg_score = [0.8, 0.9, 1.1, 1.2]

ARGS = {
    "evs": evs,
    "input_sys": input_sys,
    "seg_score": seg_score
}
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 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
gen_tau_cmd Ran
ran on a synthesized input
NLP2CT/TaU/tau/create_tau_exps.py
code served (permissive licence) · get_code("7f10826e0f8292ef")
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 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 os

# Construct the config dictionary with all required nested structure
config = {
    'mtme_data': '/data/mtme',
    'save_dir': '/output/results',
    'model': 'transformer',
    'lr': 0.001,
    'adam_beta1': 0.9,
    'adam_beta2': 0.999,
    'adam_weight_decay': 1e-5,
    'mcd_runs': 5,
    'optimize_paras': 'all',
    'data': {
        'test2020': {
            'de-en': {
                'batch': 32,
                'steps': 100
            }
        }
    }
}

# Define test_set, language_pair, systems, and std_ref
test_set = 'test2020'
language_pair = 'de-en'
systems = 'system1 system2 system3'
std_ref = 'ref0'

# Map all parameters to their values
ARGS = {
    'config': config,
    'test_set': test_set,
    'language_pair': language_pair,
    'systems': systems,
    'std_ref': std_ref
}
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 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mask_fill Ran
ran; our contract draft was wrong, not the code
NLP2CT/TaU/comet/models/pooling_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ironbeliever/car, is pointer only (licence: NONE) · get_code("08d92f5dd3c3960b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ironbeliever/car, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

max_pooling Ran
ran; our contract draft was wrong, not the code
NLP2CT/TaU/comet/models/pooling_utils.py
code served (permissive licence) · get_code("cc641273c7ff8762")
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, 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)

# Create small test tensors
batch_size = 2
seq_length = 3
hidden_size = 4
padding_index = 0

# tokens: [batch_size x seq_length] with word ids
# Include some padding tokens (0) and some non-padding tokens
tokens = torch.tensor([
    [1, 2, 0],      # batch 1: two words, one padding
    [3, 0, 0]       # batch 2: one word, two paddings
], dtype=torch.long)

# embeddings: [batch_size x seq_length x hidden_size]
embeddings = torch.randn(batch_size, seq_length, hidden_size, dtype=torch.float32)

# fill_value: scalar float to use for masking
fill_value = float('-inf')

ARGS = {
    "tokens": tokens,
    "embeddings": embeddings,
    "padding_index": padding_index
}
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, 4) — shape (2, 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
meta_eval Ran
ran on a synthesized input
NLP2CT/TaU/tau/meta_eval_results.py
code served (permissive licence) · get_code("e8303f621cc4056d")
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 MockCorrelation:
    def __init__(self, gold_scores, sys_scores, sys_names):
        self.num_sys = len(sys_names)
        self.num_items = 5
        self.none_count = 0
    
    def Pearson(self, avg_flag, sys_avg_flag):
        return (0.85, 0.01)
    
    def Spearman(self, avg_flag, sys_avg_flag):
        return (0.82, 0.02)
    
    def Kendall(self, avg_flag, sys_avg_flag):
        return (0.78, 0.03)
    
    def KendallLike(self, averaged=False, thresh=0):
        return (0.80,)

class MockEvaluationSet:
    def __init__(self):
        self.docs = ['doc1', 'doc2', 'doc3']
        self.src = ['seg1', 'seg2', 'seg3', 'seg4', 'seg5']
        self.sys_names = {'sys1', 'sys2', 'sys3'}
        self.std_ref = 'ref'
        self.human_sys_names = set()
        self.outlier_sys_names = set()
    
    def StdHumanScoreName(self, level):
        return 'wmt-raw'
    
    def Scores(self, level, gold_name):
        if level == 'sys':
            return {'sys1': [0.5], 'sys2': [0.7], 'sys3': [0.6], 'ref': [0.9]}
        elif level == 'doc':
            return {'sys1': [0.5, 0.6, 0.55], 'sys2': [0.7, 0.75, 0.72], 'sys3': [0.6, 0.65, 0.62], 'ref': [0.9, 0.95, 0.92]}
        elif level == 'seg':
            return {'sys1': [0.5, 0.6, 0.55, 0.58, 0.52], 'sys2': [0.7, 0.75, 0.72, 0.73, 0.71], 'sys3': [0.6, 0.65, 0.62, 0.63, 0.61], 'ref': [0.9, 0.95, 0.92, 0.93, 0.91]}
        return None
    
    def Correlation(self, gold_scores, sys_scores, sys_names):
        return MockCorrelation(gold_scores, sys_scores, sys_names)

scores = {
    'sys': {
        'sys1': [0.5],
        'sys2': [0.7],
        'sys3': [0.6]
    }
}

evs = MockEvaluationSet()

ARGS = {
    'scores': scores,
    'evs': evs,
    'test_set': 'wmt22.news',
    'language_pair': 'en-de',
    'include_human': False,
    'use_outliers': False,
    'avg_type': 'none',
    'thresh': -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 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
system_accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
NLP2CT/TaU/comet/models/metrics.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ironbeliever/car, is pointer only (licence: NONE) · get_code("f2d3315526fe26ab")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ironbeliever/car, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

tensor_lru_cache Ran
ran; our contract draft was wrong, not the code
NLP2CT/TaU/comet/models/lru_cache.py
code served (permissive licence) · get_code("41b37db360252b69")
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 function. 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
from functools import _CacheInfo

torch.manual_seed(0)

# Create a simple test function to be decorated
def test_function(x, y=None):
    """Simple test function that works with tensors and regular arguments"""
    if torch.is_tensor(x):
        return x.sum().item()
    return x + (y or 0)

# Set up arguments for tensor_lru_cache
ARGS = {
    'maxsize': 128,
    'typed': False
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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

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, 5 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 5 later) and 4 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
max_pooling 5 other papers
2 dated earlier, 3 later
2005.00547 (2020-05)
GoEmotions: A Dataset of Fine-Grained Emotions
2109.06352 (2021-09)
Uncertainty-Aware Machine Translation Evaluation
2402.18091 (2024-02)
Polos: Multimodal Metric Learning from Human Feedback for Image Captioning
and 2 more not named here
average_pooling 4 other papers
2 dated earlier, 2 later
2005.00547 (2020-05)
GoEmotions: A Dataset of Fine-Grained Emotions
2109.06352 (2021-09)
Uncertainty-Aware Machine Translation Evaluation
2402.18091 (2024-02)
Polos: Multimodal Metric Learning from Human Feedback for Image Captioning
and 1 more not named here
mask_fill 3 other papers
1 dated earlier, 2 later
2109.06352 (2021-09)
Uncertainty-Aware Machine Translation Evaluation
2402.18091 (2024-02)
Polos: Multimodal Metric Learning from Human Feedback for Image Captioning
2402.18191 (2024-02)
Clustering and Ranking: Diversity-preserved Instruction Selection through Expert-aligned Quality Estimation
tensor_lru_cache 2 other papers
2 later
2402.18191 (2024-02)
Clustering and Ranking: Diversity-preserved Instruction Selection through Expert-aligned Quality Estimation
2605.28227 (2026-05)
Why We Need Speech to Evaluate Speech Translation
system_accuracy 1 other paper
1 later
2402.18191 (2024-02)
Clustering and Ranking: Diversity-preserved Instruction Selection through Expert-aligned Quality Estimation

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

The neural metrics recently received considerable attention from the research community in the automatic evaluation of machine translation. Unlike text-based metrics that have interpretable and consistent evaluation mechanisms for various data sources, the reliability of neural metrics in assessing out-of-distribution data remains a concern due to the disparity between training data and real-world data. This paper aims to address the inference bias of neural metrics through uncertainty minimization during test time, without requiring additional data. Our proposed method comprises three steps: uncertainty estimation, test-time adaptation, and inference. Specifically, the model employs the prediction uncertainty of the current data as a signal to update a small fraction of parameters during test time and subsequently refine the prediction through optimization. To validate our approach, we apply the proposed method to three representative models and conduct experiments on the WMT21 benchmarks. The results obtained from both in-domain and out-of-distribution evaluations consistently demonstrate improvements in correlation performance across different models. Furthermore, we provide evidence that the proposed method effectively reduces model uncertainty. The code is publicly available at https://github.com/NLP2CT/TaU.

For agents

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

get_harvested_code_for_paper("2023.acl-long.47")
get_code_for_paper("2023.acl-long.47")
have("2023.acl-long.47")

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

curl https://syntology.ai/api/ran/2023.acl-long.47.json

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

[![Syntology run record](https://syntology.ai/api/ran/2023.acl-long.47.svg)](https://syntology.ai/paper/2023.acl-long.47)

Connect an agent — have() is free.