{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/self-modifying-state-modeling-for","title":"Self-Modifying State Modeling for Simultaneous Machine Translation","arxiv_id":"2406.02237","date":"2024-06-04","proceeding":null,"authors":["Donglei Yu","Xiaomian Kang","Yuchen Liu","Yu Zhou","Chengqing Zong"],"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 \\textit{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 \\textbf{S}elf-\\textbf{M}odifying \\textbf{S}tate \\textbf{M}odeling (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.","url_abs":"https://arxiv.org/abs/2406.02237v1","url_pdf":"https://arxiv.org/pdf/2406.02237v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"self-modifying-state-modeling-for","repo_url":"https://github.com/EurekaForNLP/SM2","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.02237","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.02237"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/EurekaForNLP/SM2","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":3,"ran":4,"unverified":1},"by_repo_kind":{"official":{"samples":8,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"96cbb5e9ca5b6be0","entry":"Embedding","repo":"EurekaForNLP/SM2","repo_kind":"official","path":"fairseq/models/transformer_with_SM2/transformer_with_sm2.py","file_url":"https://github.com/EurekaForNLP/SM2/blob/HEAD/fairseq/models/transformer_with_SM2/transformer_with_sm2.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"96cbb5e9ca5b6be0"}},{"code_sha256_prefix":"8ca9b4cd178263e1","entry":"Embedding","repo":"EurekaForNLP/SM2","repo_kind":"official","path":"fairseq/models/transformer_with_SM2/transformer_encoder.py","file_url":"https://github.com/EurekaForNLP/SM2/blob/HEAD/fairseq/models/transformer_with_SM2/transformer_encoder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8ca9b4cd178263e1"}},{"code_sha256_prefix":"8cd8cb0d1e9e63e4","entry":"Linear","repo":"EurekaForNLP/SM2","repo_kind":"official","path":"fairseq/models/transformer_with_SM2/transformer_decoder.py","file_url":"https://github.com/EurekaForNLP/SM2/blob/HEAD/fairseq/models/transformer_with_SM2/transformer_decoder.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8cd8cb0d1e9e63e4"}},{"code_sha256_prefix":"88ce019380f10478","entry":"get_symbols_to_strip_from_output","repo":"EurekaForNLP/SM2","repo_kind":"official","path":"generate.py","file_url":"https://github.com/EurekaForNLP/SM2/blob/HEAD/generate.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"88ce019380f10478"}},{"code_sha256_prefix":"0e87dbe97e1001d2","entry":"last_n_checkpoints","repo":"EurekaForNLP/SM2","repo_kind":"official","path":"average_checkpoints.py","file_url":"https://github.com/EurekaForNLP/SM2/blob/HEAD/average_checkpoints.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0e87dbe97e1001d2"}},{"code_sha256_prefix":"c3fcda996a38b833","entry":"module_name_fordropout","repo":"EurekaForNLP/SM2","repo_kind":"official","path":"fairseq/models/transformer_with_SM2/transformer_encoder.py","file_url":"https://github.com/EurekaForNLP/SM2/blob/HEAD/fairseq/models/transformer_with_SM2/transformer_encoder.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c3fcda996a38b833"}},{"code_sha256_prefix":"e63f8c52be2a8547","entry":"module_name_fordropout","repo":"EurekaForNLP/SM2","repo_kind":"official","path":"fairseq/models/transformer_with_SM2/transformer_decoder.py","file_url":"https://github.com/EurekaForNLP/SM2/blob/HEAD/fairseq/models/transformer_with_SM2/transformer_decoder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e63f8c52be2a8547"}},{"code_sha256_prefix":"7cc2e301e30389d1","entry":"average_checkpoints","repo":"EurekaForNLP/SM2","repo_kind":"official","path":"average_checkpoints.py","file_url":"https://github.com/EurekaForNLP/SM2/blob/HEAD/average_checkpoints.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7cc2e301e30389d1"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}