{"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/efficient-non-local-contrastive-attention-for","title":"Efficient Non-Local Contrastive Attention for Image Super-Resolution","arxiv_id":"2201.03794","date":"2022-01-11","proceeding":null,"authors":["Bin Xia","Yucheng Hang","Yapeng Tian","Wenming Yang","Qingmin Liao","Jie zhou"],"abstract":"Non-Local Attention (NLA) brings significant improvement for Single Image Super-Resolution (SISR) by leveraging intrinsic feature correlation in natural images. However, NLA gives noisy information large weights and consumes quadratic computation resources with respect to the input size, limiting its performance and application. In this paper, we propose a novel Efficient Non-Local Contrastive Attention (ENLCA) to perform long-range visual modeling and leverage more relevant non-local features. Specifically, ENLCA consists of two parts, Efficient Non-Local Attention (ENLA) and Sparse Aggregation. ENLA adopts the kernel method to approximate exponential function and obtains linear computation complexity. For Sparse Aggregation, we multiply inputs by an amplification factor to focus on informative features, yet the variance of approximation increases exponentially. Therefore, contrastive learning is applied to further separate relevant and irrelevant features. To demonstrate the effectiveness of ENLCA, we build an architecture called Efficient Non-Local Contrastive Network (ENLCN) by adding a few of our modules in a simple backbone. Extensive experimental results show that ENLCN reaches superior performance over state-of-the-art approaches on both quantitative and qualitative evaluations.","url_abs":"https://arxiv.org/abs/2201.03794v2","url_pdf":"https://arxiv.org/pdf/2201.03794v2.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":"efficient-non-local-contrastive-attention-for","repo_url":"https://github.com/zj-binxia/enlca","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"feature-correlation","task_name":"Feature Correlation"},{"task_slug":"image-super-resolution","task_name":"Image Super-Resolution"},{"task_slug":"super-resolution","task_name":"Super-Resolution"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2201.03794","atlas_url":"https://app.syntology.ai/?focus=2201.03794","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2201.03794"}},"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/zj-binxia/enlca","reach":null}],"summary":{"ran":1,"ran_honours":2,"ran_draft_wrong":3},"by_repo_kind":{"official":{"samples":5,"ran":5,"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":6,"samples":[{"code_sha256_prefix":"630017fbfd183bd2","entry":"ENLA","repo":"zj-binxia/enlca","repo_kind":"official","path":"src/model/ENLA.py","file_url":"https://github.com/zj-binxia/enlca/blob/HEAD/src/model/ENLA.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"630017fbfd183bd2"}},{"code_sha256_prefix":"dfaec139b0b89cc3","entry":"gaussian_orthogonal_random_matrix","repo":"zj-binxia/enlca","repo_kind":"official","path":"src/model/ENLA.py","file_url":"https://github.com/zj-binxia/enlca/blob/HEAD/src/model/ENLA.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dfaec139b0b89cc3"}},{"code_sha256_prefix":"3098ab3648cec16a","entry":"generalized_kernel","repo":"zj-binxia/enlca","repo_kind":"official","path":"src/model/ENLA.py","file_url":"https://github.com/zj-binxia/enlca/blob/HEAD/src/model/ENLA.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3098ab3648cec16a"}},{"code_sha256_prefix":"285e3997b7d7c24b","entry":"linear_attention","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"285e3997b7d7c24b"}},{"code_sha256_prefix":"b2edd96923818916","entry":"orthogonal_matrix_chunk","repo":"zj-binxia/enlca","repo_kind":"official","path":"src/model/ENLA.py","file_url":"https://github.com/zj-binxia/enlca/blob/HEAD/src/model/ENLA.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b2edd96923818916"}},{"code_sha256_prefix":"64fe070397373d0f","entry":"softmax_kernel","repo":"zj-binxia/enlca","repo_kind":"official","path":"src/model/ENLA.py","file_url":"https://github.com/zj-binxia/enlca/blob/HEAD/src/model/ENLA.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"64fe070397373d0f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}