{"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/a-unified-framework-of-surrogate-loss-by","title":"A Unified Framework of Surrogate Loss by Refactoring and Interpolation","arxiv_id":"2007.13870","date":"2020-07-27","proceeding":"ECCV 2020 8","authors":["Lanlan Liu","Mingzhe Wang","Jia Deng"],"abstract":"We introduce UniLoss, a unified framework to generate surrogate losses for training deep networks with gradient descent, reducing the amount of manual design of task-specific surrogate losses. Our key observation is that in many cases, evaluating a model with a performance metric on a batch of examples can be refactored into four steps: from input to real-valued scores, from scores to comparisons of pairs of scores, from comparisons to binary variables, and from binary variables to the final performance metric. Using this refactoring we generate differentiable approximations for each non-differentiable step through interpolation. Using UniLoss, we can optimize for different tasks and metrics using one unified framework, achieving comparable performance compared with task-specific losses. We validate the effectiveness of UniLoss on three tasks and four datasets. Code is available at https://github.com/princeton-vl/uniloss.","url_abs":"https://arxiv.org/abs/2007.13870v1","url_pdf":"https://arxiv.org/pdf/2007.13870v1.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":"a-unified-framework-of-surrogate-loss-by","repo_url":"https://github.com/princeton-vl/uniloss","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2007.13870","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2007.13870"}},"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/princeton-vl/uniloss","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"ran_draft_wrong":1,"unverified":6},"by_repo_kind":{"official":{"samples":7,"ran":1,"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":"6af95ebe99af2e36","entry":"conv3x3","repo":"princeton-vl/uniloss","repo_kind":"official","path":"multi_classification/resnet.py","file_url":"https://github.com/princeton-vl/uniloss/blob/HEAD/multi_classification/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"6af95ebe99af2e36"}},{"code_sha256_prefix":"3adee5742c021578","entry":"ap_frombins","repo":"princeton-vl/uniloss","repo_kind":"official","path":"binary_classficiation/ap_frombins.py","file_url":"https://github.com/princeton-vl/uniloss/blob/HEAD/binary_classficiation/ap_frombins.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"3adee5742c021578"}},{"code_sha256_prefix":"b11a721c6f455cfd","entry":"binary_ap","repo":"princeton-vl/uniloss","repo_kind":"official","path":"binary_classficiation/binary_ap.py","file_url":"https://github.com/princeton-vl/uniloss/blob/HEAD/binary_classficiation/binary_ap.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"b11a721c6f455cfd"}},{"code_sha256_prefix":"f2408826617b17ac","entry":"get_test_loader","repo":"princeton-vl/uniloss","repo_kind":"official","path":"binary_classficiation/data_loader.py","file_url":"https://github.com/princeton-vl/uniloss/blob/HEAD/binary_classficiation/data_loader.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"f2408826617b17ac"}},{"code_sha256_prefix":"b53a1c00ac666f44","entry":"get_test_loader","repo":"princeton-vl/uniloss","repo_kind":"official","path":"multi_classification/data_loader.py","file_url":"https://github.com/princeton-vl/uniloss/blob/HEAD/multi_classification/data_loader.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"b53a1c00ac666f44"}},{"code_sha256_prefix":"fa23ed58235aa52c","entry":"get_train_valid_loader","repo":"princeton-vl/uniloss","repo_kind":"official","path":"binary_classficiation/data_loader.py","file_url":"https://github.com/princeton-vl/uniloss/blob/HEAD/binary_classficiation/data_loader.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"fa23ed58235aa52c"}},{"code_sha256_prefix":"5b3223075bdf5993","entry":"get_train_valid_loader","repo":"princeton-vl/uniloss","repo_kind":"official","path":"multi_classification/data_loader.py","file_url":"https://github.com/princeton-vl/uniloss/blob/HEAD/multi_classification/data_loader.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"5b3223075bdf5993"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}