{"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/the-spatially-correlative-loss-for-various","title":"The Spatially-Correlative Loss for Various Image Translation Tasks","arxiv_id":"2104.00854","date":"2021-04-02","proceeding":"CVPR 2021 1","authors":["Chuanxia Zheng","Tat-Jen Cham","Jianfei Cai"],"abstract":"We propose a novel spatially-correlative loss that is simple, efficient and yet effective for preserving scene structure consistency while supporting large appearance changes during unpaired image-to-image (I2I) translation. Previous methods attempt this by using pixel-level cycle-consistency or feature-level matching losses, but the domain-specific nature of these losses hinder translation across large domain gaps. To address this, we exploit the spatial patterns of self-similarity as a means of defining scene structure. Our spatially-correlative loss is geared towards only capturing spatial relationships within an image rather than domain appearance. We also introduce a new self-supervised learning method to explicitly learn spatially-correlative maps for each specific translation task. We show distinct improvement over baseline models in all three modes of unpaired I2I translation: single-modal, multi-modal, and even single-image translation. This new loss can easily be integrated into existing network architectures and thus allows wide applicability.","url_abs":"https://arxiv.org/abs/2104.00854v1","url_pdf":"https://arxiv.org/pdf/2104.00854v1.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":"the-spatially-correlative-loss-for-various","repo_url":"https://github.com/lyndonzheng/F-LSeSim","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"the-spatially-correlative-loss-for-various","repo_url":"https://github.com/kaminyou/urust","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"self-supervised-learning","task_name":"Self-Supervised Learning"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2104.00854","atlas_url":"https://app.syntology.ai/?focus=2104.00854","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2104.00854"}},"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/lyndonzheng/F-LSeSim","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kaminyou/urust","reach":null}],"summary":{"ran":2,"ran_draft_wrong":2,"unverified":4},"by_repo_kind":{"official":{"samples":4,"ran":2,"repositories":1},"listed":{"samples":4,"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":"abb74cdfb0db14b5","entry":"PatchSim","repo":"lyndonzheng/F-LSeSim","repo_kind":"official","path":"models/losses.py","file_url":"https://github.com/lyndonzheng/F-LSeSim/blob/HEAD/models/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"abb74cdfb0db14b5"}},{"code_sha256_prefix":"a2eb8b7b78c106d4","entry":"PatchSim","repo":"kaminyou/urust","repo_kind":"listed","path":"models/lsesim_loss.py","file_url":"https://github.com/kaminyou/urust/blob/HEAD/models/lsesim_loss.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":"a2eb8b7b78c106d4"}},{"code_sha256_prefix":"c4df9e20fb740486","entry":"init_net","repo":"lyndonzheng/F-LSeSim","repo_kind":"official","path":"models/losses.py","file_url":"https://github.com/lyndonzheng/F-LSeSim/blob/HEAD/models/losses.py","link_basis":"first_harvest_node","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":"c4df9e20fb740486"}},{"code_sha256_prefix":"eb1d6ffba8881897","entry":"init_net","repo":"kaminyou/urust","repo_kind":"listed","path":"models/lsesim_loss.py","file_url":"https://github.com/kaminyou/urust/blob/HEAD/models/lsesim_loss.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":"eb1d6ffba8881897"}},{"code_sha256_prefix":"314692ffde795932","entry":"SpatialCorrelativeLoss","repo":"lyndonzheng/F-LSeSim","repo_kind":"official","path":"models/losses.py","file_url":"https://github.com/lyndonzheng/F-LSeSim/blob/HEAD/models/losses.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":"314692ffde795932"}},{"code_sha256_prefix":"215175861ccc5c15","entry":"SpatialCorrelativeLoss","repo":"kaminyou/urust","repo_kind":"listed","path":"models/lsesim_loss.py","file_url":"https://github.com/kaminyou/urust/blob/HEAD/models/lsesim_loss.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":"215175861ccc5c15"}},{"code_sha256_prefix":"e68358ff8e30869e","entry":"init_weights","repo":"lyndonzheng/F-LSeSim","repo_kind":"official","path":"models/losses.py","file_url":"https://github.com/lyndonzheng/F-LSeSim/blob/HEAD/models/losses.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":"e68358ff8e30869e"}},{"code_sha256_prefix":"52cbc66ae3c1a146","entry":"init_weights","repo":"kaminyou/urust","repo_kind":"listed","path":"models/lsesim_loss.py","file_url":"https://github.com/kaminyou/urust/blob/HEAD/models/lsesim_loss.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":"52cbc66ae3c1a146"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}