{"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/context-aware-cross-attention-for-non","title":"Context-Aware Cross-Attention for Non-Autoregressive Translation","arxiv_id":"2011.00770","date":"2020-11-02","proceeding":"COLING 2020 8","authors":["Liang Ding","Longyue Wang","Di wu","DaCheng Tao","Zhaopeng Tu"],"abstract":"Non-autoregressive translation (NAT) significantly accelerates the inference process by predicting the entire target sequence. However, due to the lack of target dependency modelling in the decoder, the conditional generation process heavily depends on the cross-attention. In this paper, we reveal a localness perception problem in NAT cross-attention, for which it is difficult to adequately capture source context. To alleviate this problem, we propose to enhance signals of neighbour source tokens into conventional cross-attention. Experimental results on several representative datasets show that our approach can consistently improve translation quality over strong NAT baselines. Extensive analyses demonstrate that the enhanced cross-attention achieves better exploitation of source contexts by leveraging both local and global information.","url_abs":"https://arxiv.org/abs/2011.00770v1","url_pdf":"https://arxiv.org/pdf/2011.00770v1.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":"context-aware-cross-attention-for-non","repo_url":"https://github.com/alphadl/CCAN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2011.00770","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2011.00770"}},"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/alphadl/CCAN","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":2,"ran":2,"unverified":6},"by_repo_kind":{"listed":{"samples":10,"ran":4,"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":"493dc499480b9ef8","entry":"dehyphenate","repo":"alphadl/CCAN","repo_kind":"listed","path":"generate_cmlm.py","file_url":"https://github.com/alphadl/CCAN/blob/HEAD/generate_cmlm.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"493dc499480b9ef8"}},{"code_sha256_prefix":"90b79fe15491de83","entry":"is_master","repo":"alphadl/CCAN","repo_kind":"listed","path":"fairseq/distributed_utils.py","file_url":"https://github.com/alphadl/CCAN/blob/HEAD/fairseq/distributed_utils.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":"90b79fe15491de83"}},{"code_sha256_prefix":"e978a47511700c72","entry":"predict_length_beam","repo":"alphadl/CCAN","repo_kind":"listed","path":"generate_cmlm.py","file_url":"https://github.com/alphadl/CCAN/blob/HEAD/generate_cmlm.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e978a47511700c72"}},{"code_sha256_prefix":"82bdf940665aeeb4","entry":"safe_readline","repo":"alphadl/CCAN","repo_kind":"listed","path":"fairseq/binarizer.py","file_url":"https://github.com/alphadl/CCAN/blob/HEAD/fairseq/binarizer.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":"82bdf940665aeeb4"}},{"code_sha256_prefix":"59755e76d7c3f48b","entry":"all_reduce","repo":"alphadl/CCAN","repo_kind":"listed","path":"fairseq/distributed_utils.py","file_url":"https://github.com/alphadl/CCAN/blob/HEAD/fairseq/distributed_utils.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":"59755e76d7c3f48b"}},{"code_sha256_prefix":"2020c8115ac4366b","entry":"dataset_dest_prefix","repo":"alphadl/CCAN","repo_kind":"listed","path":"preprocess.py","file_url":"https://github.com/alphadl/CCAN/blob/HEAD/preprocess.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":"2020c8115ac4366b"}},{"code_sha256_prefix":"27cb9a85ba28e204","entry":"distributed_init","repo":"alphadl/CCAN","repo_kind":"listed","path":"fairseq/distributed_utils.py","file_url":"https://github.com/alphadl/CCAN/blob/HEAD/fairseq/distributed_utils.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":"27cb9a85ba28e204"}},{"code_sha256_prefix":"0204f69b696b0e8e","entry":"load_checkpoint","repo":"alphadl/CCAN","repo_kind":"listed","path":"fairseq/checkpoint_utils.py","file_url":"https://github.com/alphadl/CCAN/blob/HEAD/fairseq/checkpoint_utils.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":"0204f69b696b0e8e"}},{"code_sha256_prefix":"c6a6a0734f184953","entry":"load_checkpoint_to_cpu","repo":"alphadl/CCAN","repo_kind":"listed","path":"fairseq/checkpoint_utils.py","file_url":"https://github.com/alphadl/CCAN/blob/HEAD/fairseq/checkpoint_utils.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":"c6a6a0734f184953"}},{"code_sha256_prefix":"7256f41709277ec8","entry":"save_checkpoint","repo":"alphadl/CCAN","repo_kind":"listed","path":"fairseq/checkpoint_utils.py","file_url":"https://github.com/alphadl/CCAN/blob/HEAD/fairseq/checkpoint_utils.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":"7256f41709277ec8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}