{"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/structured-prediction-with-projection-oracles","title":"Structured Prediction with Projection Oracles","arxiv_id":"1910.11369","date":"2019-10-24","proceeding":"NeurIPS 2019 12","authors":["Mathieu Blondel"],"abstract":"We propose in this paper a general framework for deriving loss functions for structured prediction. In our framework, the user chooses a convex set including the output space and provides an oracle for projecting onto that set. Given that oracle, our framework automatically generates a corresponding convex and smooth loss function. As we show, adding a projection as output layer provably makes the loss smaller. We identify the marginal polytope, the output space's convex hull, as the best convex set on which to project. However, because the projection onto the marginal polytope can sometimes be expensive to compute, we allow to use any convex superset instead, with potentially cheaper-to-compute projection. Since efficient projection algorithms are available for numerous convex sets, this allows us to construct loss functions for a variety of tasks. On the theoretical side, when combined with calibrated decoding, we prove that our loss functions can be used as a consistent surrogate for a (potentially non-convex) target loss function of interest. We demonstrate our losses on label ranking, ordinal regression and multilabel classification, confirming the improved accuracy enabled by projections.","url_abs":"https://arxiv.org/abs/1910.11369v2","url_pdf":"https://arxiv.org/pdf/1910.11369v2.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":"structured-prediction-with-projection-oracles","repo_url":"https://github.com/mblondel/projection-losses","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"BSD-2-Clause"}}],"tasks":[{"task_slug":"prediction","task_name":"Prediction"},{"task_slug":"structured-prediction","task_name":"Structured Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1910.11369","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1910.11369"}},"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/mblondel/projection-losses","reach":{"status":"ok","spdx":"BSD-2-Clause"}}],"summary":{"ran_draft_wrong":2,"unverified":9},"by_repo_kind":{"official":{"samples":11,"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":"25ac6d739afaa06d","entry":"dual_obj_grad","repo":"mblondel/projection-losses","repo_kind":"official","path":"ot.py","file_url":"https://github.com/mblondel/projection-losses/blob/HEAD/ot.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"25ac6d739afaa06d"}},{"code_sha256_prefix":"cc69b6533f603128","entry":"solve_dual","repo":"mblondel/projection-losses","repo_kind":"official","path":"ot.py","file_url":"https://github.com/mblondel/projection-losses/blob/HEAD/ot.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"cc69b6533f603128"}},{"code_sha256_prefix":"7ac4bde3e1feac1c","entry":"KL_project_fista","repo":"mblondel/projection-losses","repo_kind":"official","path":"fista.py","file_url":"https://github.com/mblondel/projection-losses/blob/HEAD/fista.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"7ac4bde3e1feac1c"}},{"code_sha256_prefix":"27a0ccf872a4dac3","entry":"Shannon_negentropy","repo":"mblondel/projection-losses","repo_kind":"official","path":"estimators.py","file_url":"https://github.com/mblondel/projection-losses/blob/HEAD/estimators.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"27a0ccf872a4dac3"}},{"code_sha256_prefix":"d260cac7e446d8c2","entry":"constrained_softmax","repo":"mblondel/projection-losses","repo_kind":"official","path":"simplex.py","file_url":"https://github.com/mblondel/projection-losses/blob/HEAD/simplex.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"d260cac7e446d8c2"}},{"code_sha256_prefix":"847d3bf81c700e47","entry":"fista","repo":"mblondel/projection-losses","repo_kind":"official","path":"fista.py","file_url":"https://github.com/mblondel/projection-losses/blob/HEAD/fista.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"847d3bf81c700e47"}},{"code_sha256_prefix":"6850f879e956991a","entry":"inv_permutation","repo":"mblondel/projection-losses","repo_kind":"official","path":"polytopes.py","file_url":"https://github.com/mblondel/projection-losses/blob/HEAD/polytopes.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"6850f879e956991a"}},{"code_sha256_prefix":"d67988018f769486","entry":"load_label_ranking_data","repo":"mblondel/projection-losses","repo_kind":"official","path":"data.py","file_url":"https://github.com/mblondel/projection-losses/blob/HEAD/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"d67988018f769486"}},{"code_sha256_prefix":"1e799e4b7f928f01","entry":"project_fw","repo":"mblondel/projection-losses","repo_kind":"official","path":"fw.py","file_url":"https://github.com/mblondel/projection-losses/blob/HEAD/fw.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"1e799e4b7f928f01"}},{"code_sha256_prefix":"c89cdda212022733","entry":"project_simplex","repo":"mblondel/projection-losses","repo_kind":"official","path":"simplex.py","file_url":"https://github.com/mblondel/projection-losses/blob/HEAD/simplex.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"c89cdda212022733"}},{"code_sha256_prefix":"417f1bc504ead8e6","entry":"semi_dual_obj_grad","repo":"mblondel/projection-losses","repo_kind":"official","path":"ot.py","file_url":"https://github.com/mblondel/projection-losses/blob/HEAD/ot.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"417f1bc504ead8e6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}