{"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/cocoa-mt-a-dataset-and-benchmark-for","title":"CoCoA-MT: A Dataset and Benchmark for Contrastive Controlled MT with Application to Formality","arxiv_id":"2205.04022","date":"2022-05-09","proceeding":"Findings (NAACL) 2022 7","authors":["Maria Nădejde","Anna Currey","Benjamin Hsu","Xing Niu","Marcello Federico","Georgiana Dinu"],"abstract":"The machine translation (MT) task is typically formulated as that of returning a single translation for an input segment. However, in many cases, multiple different translations are valid and the appropriate translation may depend on the intended target audience, characteristics of the speaker, or even the relationship between speakers. Specific problems arise when dealing with honorifics, particularly translating from English into languages with formality markers. For example, the sentence \"Are you sure?\" can be translated in German as \"Sind Sie sich sicher?\" (formal register) or \"Bist du dir sicher?\" (informal). Using wrong or inconsistent tone may be perceived as inappropriate or jarring for users of certain cultures and demographics. This work addresses the problem of learning to control target language attributes, in this case formality, from a small amount of labeled contrastive data. We introduce an annotated dataset (CoCoA-MT) and an associated evaluation metric for training and evaluating formality-controlled MT models for six diverse target languages. We show that we can train formality-controlled models by fine-tuning on labeled contrastive data, achieving high accuracy (82% in-domain and 73% out-of-domain) while maintaining overall quality.","url_abs":"https://arxiv.org/abs/2205.04022v1","url_pdf":"https://arxiv.org/pdf/2205.04022v1.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":"cocoa-mt-a-dataset-and-benchmark-for","repo_url":"https://github.com/amazon-research/contrastive-controlled-mt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"cocoa-mt-a-dataset-and-benchmark-for","repo_url":"https://github.com/awslabs/sockeye","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"mxnet","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"translation","task_name":"Translation"},{"task_slug":null,"task_name":"valid"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2205.04022","atlas_url":"https://app.syntology.ai/?focus=2205.04022","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.04022"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/awslabs/sockeye","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/amazon-research/contrastive-controlled-mt","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran":2,"unverified":10},"by_repo_kind":{"official":{"samples":12,"ran":2,"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":"45b09cb09f2fcd26","entry":"float_greater_or_equal","repo":"awslabs/sockeye","repo_kind":"official","path":"sockeye/arguments.py","file_url":"https://github.com/awslabs/sockeye/blob/HEAD/sockeye/arguments.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"45b09cb09f2fcd26"}},{"code_sha256_prefix":"299cad4b4564705e","entry":"int_greater_or_equal","repo":"awslabs/sockeye","repo_kind":"official","path":"sockeye/arguments.py","file_url":"https://github.com/awslabs/sockeye/blob/HEAD/sockeye/arguments.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"299cad4b4564705e"}},{"code_sha256_prefix":"c368bc95cab7628c","entry":"average","repo":"awslabs/sockeye","repo_kind":"official","path":"sockeye/average.py","file_url":"https://github.com/awslabs/sockeye/blob/HEAD/sockeye/average.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c368bc95cab7628c"}},{"code_sha256_prefix":"51c1e44ee3d7ddbf","entry":"define_buckets","repo":"awslabs/sockeye","repo_kind":"official","path":"sockeye/data_io.py","file_url":"https://github.com/awslabs/sockeye/blob/HEAD/sockeye/data_io.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"51c1e44ee3d7ddbf"}},{"code_sha256_prefix":"e8b08e1f3ef35f68","entry":"define_parallel_buckets","repo":"awslabs/sockeye","repo_kind":"official","path":"sockeye/data_io.py","file_url":"https://github.com/awslabs/sockeye/blob/HEAD/sockeye/data_io.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e8b08e1f3ef35f68"}},{"code_sha256_prefix":"6f9de756bd25f7f5","entry":"get_bucket","repo":"awslabs/sockeye","repo_kind":"official","path":"sockeye/data_io.py","file_url":"https://github.com/awslabs/sockeye/blob/HEAD/sockeye/data_io.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6f9de756bd25f7f5"}},{"code_sha256_prefix":"8075a144d8193c67","entry":"get_fp32_state_dict_from_zero1_checkpoint","repo":"awslabs/sockeye","repo_kind":"official","path":"sockeye/convert_deepspeed.py","file_url":"https://github.com/awslabs/sockeye/blob/HEAD/sockeye/convert_deepspeed.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8075a144d8193c67"}},{"code_sha256_prefix":"1bcf34acc4bfc5b5","entry":"interleaved_matmul_encdec_qk","repo":"awslabs/sockeye","repo_kind":"official","path":"sockeye/layers.py","file_url":"https://github.com/awslabs/sockeye/blob/HEAD/sockeye/layers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1bcf34acc4bfc5b5"}},{"code_sha256_prefix":"7b06d9d749b67e62","entry":"interleaved_matmul_encdec_valatt","repo":"awslabs/sockeye","repo_kind":"official","path":"sockeye/layers.py","file_url":"https://github.com/awslabs/sockeye/blob/HEAD/sockeye/layers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7b06d9d749b67e62"}},{"code_sha256_prefix":"dbfe68e8c251c012","entry":"load_args","repo":"awslabs/sockeye","repo_kind":"official","path":"sockeye/arguments.py","file_url":"https://github.com/awslabs/sockeye/blob/HEAD/sockeye/arguments.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"dbfe68e8c251c012"}},{"code_sha256_prefix":"0dd5254345198861","entry":"parallel_subsample","repo":"awslabs/sockeye","repo_kind":"official","path":"sockeye/checkpoint_decoder.py","file_url":"https://github.com/awslabs/sockeye/blob/HEAD/sockeye/checkpoint_decoder.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0dd5254345198861"}},{"code_sha256_prefix":"80f8f7625e2ab5ff","entry":"strategy_best","repo":"awslabs/sockeye","repo_kind":"official","path":"sockeye/average.py","file_url":"https://github.com/awslabs/sockeye/blob/HEAD/sockeye/average.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"80f8f7625e2ab5ff"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}