{"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/modeling-dual-read-write-paths-for","title":"Modeling Dual Read/Write Paths for Simultaneous Machine Translation","arxiv_id":"2203.09163","date":"2022-03-17","proceeding":"ACL 2022 5","authors":["Shaolei Zhang","Yang Feng"],"abstract":"Simultaneous machine translation (SiMT) outputs translation while reading source sentence and hence requires a policy to decide whether to wait for the next source word (READ) or generate a target word (WRITE), the actions of which form a read/write path. Although the read/write path is essential to SiMT performance, no direct supervision is given to the path in the existing methods. In this paper, we propose a method of dual-path SiMT which introduces duality constraints to direct the read/write path. According to duality constraints, the read/write path in source-to-target and target-to-source SiMT models can be mapped to each other. As a result, the two SiMT models can be optimized jointly by forcing their read/write paths to satisfy the mapping. Experiments on En-Vi and De-En tasks show that our method can outperform strong baselines under all latency.","url_abs":"https://arxiv.org/abs/2203.09163v2","url_pdf":"https://arxiv.org/pdf/2203.09163v2.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":"modeling-dual-read-write-paths-for","repo_url":"https://github.com/ictnlp/dual-paths","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"translation","task_name":"Translation"},{"task_slug":"de-en","task_name":"de-en"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.09163","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.09163"}},"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":"deterministic:regex_extraction","url":"https://github.com/pytorch/fairseq","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ictnlp/dual-paths","reach":null}],"summary":{"ran":2,"ran_fixture":1,"ran_draft_wrong":1,"unverified":5},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"found_in_text":{"samples":8,"ran":3,"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":"bfc25556c610f9a1","entry":"FairseqIncrementalState","repo":"pytorch/fairseq","repo_kind":"found_in_text","path":"fairseq/sequence_generator.py","file_url":"https://github.com/pytorch/fairseq/blob/HEAD/fairseq/sequence_generator.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":"bfc25556c610f9a1"}},{"code_sha256_prefix":"f920993ca7cda2a9","entry":"NGramRepeatBlock","repo":"pytorch/fairseq","repo_kind":"found_in_text","path":"fairseq/sequence_generator.py","file_url":"https://github.com/pytorch/fairseq/blob/HEAD/fairseq/sequence_generator.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":"f920993ca7cda2a9"}},{"code_sha256_prefix":"b06a8bc83bad0d7d","entry":"generate_dual_path","repo":"ictnlp/dual-paths","repo_kind":"official","path":"fairseq/modules/dual_path.py","file_url":"https://github.com/ictnlp/dual-paths/blob/HEAD/fairseq/modules/dual_path.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b06a8bc83bad0d7d"}},{"code_sha256_prefix":"a0f6171fabf48af6","entry":"with_incremental_state","repo":"pytorch/fairseq","repo_kind":"found_in_text","path":"fairseq/sequence_generator.py","file_url":"https://github.com/pytorch/fairseq/blob/HEAD/fairseq/sequence_generator.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a0f6171fabf48af6"}},{"code_sha256_prefix":"a01ab4fabbe7ef3b","entry":"EnsembleModel","repo":"pytorch/fairseq","repo_kind":"found_in_text","path":"fairseq/sequence_generator.py","file_url":"https://github.com/pytorch/fairseq/blob/HEAD/fairseq/sequence_generator.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":"a01ab4fabbe7ef3b"}},{"code_sha256_prefix":"56c74cd2ed871afe","entry":"FairseqDecoder","repo":"pytorch/fairseq","repo_kind":"found_in_text","path":"fairseq/sequence_generator.py","file_url":"https://github.com/pytorch/fairseq/blob/HEAD/fairseq/sequence_generator.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":"56c74cd2ed871afe"}},{"code_sha256_prefix":"e67d47b827a110ab","entry":"FairseqIncrementalDecoder","repo":"pytorch/fairseq","repo_kind":"found_in_text","path":"fairseq/sequence_generator.py","file_url":"https://github.com/pytorch/fairseq/blob/HEAD/fairseq/sequence_generator.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":"e67d47b827a110ab"}},{"code_sha256_prefix":"2b54878118a0c256","entry":"SequenceGenerator","repo":"pytorch/fairseq","repo_kind":"found_in_text","path":"fairseq/sequence_generator.py","file_url":"https://github.com/pytorch/fairseq/blob/HEAD/fairseq/sequence_generator.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":"2b54878118a0c256"}},{"code_sha256_prefix":"c06fe96f995054ea","entry":"is_cuda_extension_usable","repo":"pytorch/fairseq","repo_kind":"found_in_text","path":"fairseq/sequence_generator.py","file_url":"https://github.com/pytorch/fairseq/blob/HEAD/fairseq/sequence_generator.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":"c06fe96f995054ea"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}