SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.02237 · ACL · 2024

Self-Modifying State Modeling for Simultaneous Machine Translation

Yuchen Liu, Yu Zhou, Chengqing Zong, Donglei Yu, Xiaomian Kang

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 1 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/2406.02237.json · badge: /api/ran/2406.02237.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
EurekaForNLP/SM2 canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
Embedding Ran
ran; our contract draft was wrong, not the code · constructed an object; no result was computed
EurekaForNLP/SM2/fairseq/models/transformer_with_SM2/transformer_with_sm2.py
pointer only (licence: MIT); the stored copy get_code serves, from instance-wise-ordered-transformer/iot, is pointer only (licence: NOASSERTION) · get_code("96cbb5e9ca5b6be0")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from instance-wise-ordered-transformer/iot, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

Embedding Ran
ran; our contract draft was wrong, not the code · constructed an object; no result was computed
EurekaForNLP/SM2/fairseq/models/transformer_with_SM2/transformer_encoder.py
code served (permissive licence) · get_code("8ca9b4cd178263e1")
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, Embedding: 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

torch.manual_seed(0)

ARGS = {
    "num_embeddings": 10,
    "embedding_dim": 4,
}
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 Embedding — 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 Embedding 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
Linear Ran
ran; our contract draft was wrong, not the code · constructed an object; no result was computed
EurekaForNLP/SM2/fairseq/models/transformer_with_SM2/transformer_decoder.py
pointer only (licence: MIT); the stored copy get_code serves, from instance-wise-ordered-transformer/iot, is pointer only (licence: NOASSERTION) · get_code("8cd8cb0d1e9e63e4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from instance-wise-ordered-transformer/iot, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

get_symbols_to_strip_from_output Ran
ran; our contract draft was wrong, not the code
EurekaForNLP/SM2/generate.py
pointer only (licence: MIT); the stored copy get_code serves, from urvashik/knnmt, is pointer only (licence: NONE) · get_code("88ce019380f10478")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from urvashik/knnmt, 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.

last_n_checkpoints Ran
ran; our contract draft was wrong, not the code
EurekaForNLP/SM2/average_checkpoints.py
code served (permissive licence) · get_code("0e87dbe97e1001d2")
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 os
import re
import tempfile
import shutil

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

# Create some checkpoint files that match the expected patterns
checkpoint_files = [
    'checkpoint_1_100.pt',
    'checkpoint_1_200.pt',
    'checkpoint_1_300.pt',
    'checkpoint_1_400.pt',
    'checkpoint_1_500.pt',
]

for filename in checkpoint_files:
    filepath = os.path.join(temp_dir, filename)
    with open(filepath, 'w') as f:
        f.write('')

ARGS = {
    'paths': [temp_dir],
    'n': 2,
    'update_based': True,
    'best_base': False,
    'upper_bound': 400,
    'last': 'checkpoint_1_300.pt',
    'interval': 100,
}
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
module_name_fordropout Ran
ran; our contract draft was wrong, not the code
EurekaForNLP/SM2/fairseq/models/transformer_with_SM2/transformer_encoder.py
pointer only (licence: MIT); the stored copy get_code serves, from acerkoo/lcs, is pointer only (licence: NONE) · get_code("c3fcda996a38b833")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from acerkoo/lcs, 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.

module_name_fordropout Ran
ran; our contract draft was wrong, not the code
EurekaForNLP/SM2/fairseq/models/transformer_with_SM2/transformer_decoder.py
code served (permissive licence) · get_code("e63f8c52be2a8547")
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 torch

torch.manual_seed(0)

ARGS = {
    'module_name': 'TransformerDecoderBase'
}
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 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
average_checkpoints Not yet run
unverified (harvested, no recorded run)
EurekaForNLP/SM2/average_checkpoints.py
code served (permissive licence) · get_code("7cc2e301e30389d1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 1 the same month, 2 later) and 1 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
Linear 58 other papers
50 dated earlier, 7 later, 1 same year, order not determinable · 5 only as an assembly brick
1409.0473 (2014-09)
Neural Machine Translation by Jointly Learning to Align and Translate
1706.03762 (2017-06)
Attention Is All You Need
1904.01681 (2019-04)
Augmented Neural ODEs
and 55 more not named here
Embedding 29 other papers
26 dated earlier, 2 later, 1 same year, order not determinable
1904.01681 (2019-04)
Augmented Neural ODEs
1906.12183 (2019-06)
Neural ODEs as the Deep Limit of ResNets with constant weights
2002.03184 (2020-02)
Time-aware Large Kernel Convolutions
and 26 more not named here
get_symbols_to_strip_from_output 13 other papers
13 dated earlier
2010.00710 (2020-10)
Nearest Neighbor Machine Translation
2105.05498 (2021-05)
Improving Lexically Constrained Neural Machine Translation with Source-Conditioned Masked Span Prediction
2105.13022 (2021-05)
Adaptive Nearest Neighbor Machine Translation
and 10 more not named here
average_checkpoints 4 other papers
4 dated earlier
2002.03184 (2020-02)
Time-aware Large Kernel Convolutions
2008.07772 (2020-08)
Very Deep Transformers for Neural Machine Translation
2210.07535 (2022-10)
AutoMoE: Heterogeneous Mixture-of-Experts with Adaptive Computation for Efficient Neural Machine Translation
and 1 more not named here
module_name_fordropout 3 other papers
2 dated earlier, 1 same year, order not determinable
2210.05144 (2022-10)
Mixture of Attention Heads: Selecting Attention Heads Per Token
2302.05737 (2023-02)
A Reparameterized Discrete Diffusion Model for Text Generation
2024.acl-long.435 (2024 (year only))
Speech Sense Disambiguation: Tackling Homophone Ambiguity in End-to-End Speech Translation
module_name_fordropout 3 other papers
2 dated earlier, 1 the same month
2210.05144 (2022-10)
Mixture of Attention Heads: Selecting Attention Heads Per Token
2404.00656 (2024-04)
WavLLM: Towards Robust and Adaptive Speech Large Language Model
2406.02876 (2024-06)
LCS: A Language Converter Strategy for Zero-Shot Neural Machine Translation
Embedding 1 other paper
1 dated earlier
2007.08742 (2020-07)
A Novel Graph-based Multi-modal Fusion Encoder for Neural 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-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

Simultaneous Machine Translation (SiMT) generates target outputs while receiving stream source inputs and requires a read/write policy to decide whether to wait for the next source token or generate a new target token, whose decisions form a decision path. Existing SiMT methods, which learn the policy by exploring various decision paths in training, face inherent limitations. These methods not only fail to precisely optimize the policy due to the inability to accurately assess the individual impact of each decision on SiMT performance, but also cannot sufficiently explore all potential paths because of their vast number. Besides, building decision paths requires unidirectional encoders to simulate streaming source inputs, which impairs the translation quality of SiMT models. To solve these issues, we propose Self-Modifying State Modeling (SM 2 ), a novel training paradigm for SiMT task. Without building decision paths, SM 2 individually optimizes decisions at each state during training. To precisely optimize the policy, SM 2 introduces Self-Modifying process to independently assess and adjust decisions at each state. For sufficient exploration, SM 2 proposes Prefix Sampling to efficiently traverse all potential states. Moreover, SM 2 ensures compatibility with bidirectional encoders, thus achieving higher translation quality. Experiments show that SM 2 outperforms strong baselines. Furthermore, SM 2 allows offline machine translation models to acquire SiMT ability with fine-tuning 1 .

For agents

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

get_harvested_code_for_paper("2406.02237")
get_code_for_paper("2406.02237")
have("2406.02237")

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

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

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

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

Connect an agent — have() is free.