SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.15544 · NeurIPS · 2022

Refining Low-Resource Unsupervised Translation by Language Disentanglement of Multilingual Model

Xuan-Phi Nguyen, Shafiq Joty, Wu Kui, Ai Aw

arXiv · PDF · Open in the Atlas

Code that ran

2 of 2 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2205.15544.json · badge: /api/ran/2205.15544.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
nxphi47/refine_unsup_multilingual_mt canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
IterativeRefinementGenerator Ran
ran on a synthesized input · constructed an object; no result was computed
nxphi47/refine_unsup_multilingual_mt/fairseq/iterative_refinement_generator.py
code served (permissive licence) · get_code("e199ac94bb440f27")
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 an instance of its own class, IterativeRefinementGenerator: the run constructed the object and did not call it, so no result was computed. 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
import numpy as np

torch.manual_seed(0)

# Create a minimal target dictionary
class TargetDict:
    def __init__(self):
        self._bos = 0
        self._pad = 1
        self._unk = 2
        self._eos = 3
        self._vocab_size = 50
    
    def bos(self):
        return self._bos
    
    def pad(self):
        return self._pad
    
    def unk(self):
        return self._unk
    
    def eos(self):
        return self._eos
    
    def __len__(self):
        return self._vocab_size

# Create a minimal encoder
class MinimalEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.embed = nn.Embedding(50, 4)
    
    def forward(self, src_tokens, src_lengths):
        return self.embed(src_tokens)
    
    def reorder_encoder_out(self, encoder_out, order):
        return encoder_out.index_select(0, order)

# Create a minimal model
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.encoder = MinimalEncoder()
        self.allow_ensemble = False
        self.allow_length_beam = False
    
    def forward_encoder(self, encoder_input):
        src_tokens, src_lengths = encoder_input
        return self.encoder(src_tokens, src_lengths)
    
    def initialize_output_tokens(self, encoder_out, src_tokens):
        bsz, src_len = src_tokens.size()
        # Return a simple namedtuple-like object with output_tokens
        class DecoderOut:
            def __init__(self, output_tokens):
                self.output_tokens = output_tokens
            
            def _replace(self, **kwargs):
                if 'history' in kwargs:
                    out = DecoderOut(self.output_tokens)
                    out.history = kwargs['history']
                    return out
                return self
        
        output_tokens = torch.full((bsz, src_len + 2), 1, dtype=torch.long)
        return DecoderOut(output_tokens)
    
    def regenerate_length_beam(self, decoder_out, beam_size):
        # Repeat along batch dimension
        return decoder_out

# Create target dictionary
tgt_dict = TargetDict()

# Create models
models = [MinimalModel()]

ARGS = {
    'tgt_dict': tgt_dict,
    'models': models,
    'eos_penalty': 0.0,
    'max_iter': 10,
    'max_ratio': 2,
    'beam_size': 1,
    'decoding_format': None,
    'retain_dropout': False,
    'adaptive': True,
    'retain_history': False,
    'reranking': 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 IterativeRefinementGenerator — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a IterativeRefinementGenerator 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
hash_path_to_int Ran
ran, honoured the contract we drafted
nxphi47/refine_unsup_multilingual_mt/examples/multiling_bt_disentangle/sweeps/swp_mling_bt_disentangle_indic.py
code served (permissive licence) · get_code("199b0fed79fbbf53")
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) 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 hashlib

def hash_path_to_int(s):
    return int(hashlib.sha256(s.encode('utf-8')).hexdigest(), 16) % 10 ** 8

# The function takes a single string parameter 's'
# It encodes it to UTF-8, hashes it with SHA256, converts to int, and mods by 10^8

ARGS = {
    "s": "example_path_string"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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

Also present in other papers' code

Of 2 samples lifted from this paper's linked repositories, 2 carry a function identity and 0 do not. Of the 2 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

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

Abstract

Numerous recent work on unsupervised machine translation (UMT) implies that competent unsupervised translations of low-resource and unrelated languages, such as Nepali or Sinhala, are only possible if the model is trained in a massive multilingual environment, where these low-resource languages are mixed with high-resource counterparts. Nonetheless, while the high-resource languages greatly help kick-start the target low-resource translation tasks, the language discrepancy between them may hinder their further improvement. In this work, we propose a simple refinement procedure to separate languages from a pre-trained multilingual UMT model for it to focus on only the target low-resource task. Our method achieves the state of the art in the fully unsupervised translation tasks of English

For agents

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

get_harvested_code_for_paper("2205.15544")
get_code_for_paper("2205.15544")
have("2205.15544")

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

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

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

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

Connect an agent — have() is free.