{"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-semidefinite-programming-based-1","title":"Efficient semidefinite-programming-based inference for binary and multi-class MRFs","arxiv_id":"2012.02661","date":"2020-12-04","proceeding":"NeurIPS 2020 12","authors":["Chirag Pabbaraju","Po-Wei Wang","J. Zico Kolter"],"abstract":"Probabilistic inference in pairwise Markov Random Fields (MRFs), i.e. computing the partition function or computing a MAP estimate of the variables, is a foundational problem in probabilistic graphical models. Semidefinite programming relaxations have long been a theoretically powerful tool for analyzing properties of probabilistic inference, but have not been practical owing to the high computational cost of typical solvers for solving the resulting SDPs. In this paper, we propose an efficient method for computing the partition function or MAP estimate in a pairwise MRF by instead exploiting a recently proposed coordinate-descent-based fast semidefinite solver. We also extend semidefinite relaxations from the typical binary MRF to the full multi-class setting, and develop a compact semidefinite relaxation that can again be solved efficiently using the solver. We show that the method substantially outperforms (both in terms of solution quality and speed) the existing state of the art in approximate inference, on benchmark problems drawn from previous work. We also show that our approach can scale to large MRF domains such as fully-connected pairwise CRF models used in computer vision.","url_abs":"https://arxiv.org/abs/2012.02661v2","url_pdf":"https://arxiv.org/pdf/2012.02661v2.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-semidefinite-programming-based-1","repo_url":"https://github.com/locuslab/sdp_mrf","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":null}],"tasks":[],"methods":[{"method_slug":"crf","method_name":"CRF"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2012.02661","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2012.02661"}},"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/locuslab/sdp_mrf","reach":null}],"summary":{"ran_honours":5,"ran_fixture":2,"unverified":2},"by_repo_kind":{"official":{"samples":9,"ran":7,"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":"74fe1ce7849f0817","entry":"LSE","repo":"locuslab/sdp_mrf","repo_kind":"official","path":"sdp_mrf/solvers.py","file_url":"https://github.com/locuslab/sdp_mrf/blob/HEAD/sdp_mrf/solvers.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"74fe1ce7849f0817"}},{"code_sha256_prefix":"078d4c6caaf8bb4d","entry":"ensure_C","repo":"locuslab/sdp_mrf","repo_kind":"official","path":"sdp_mrf/solvers.py","file_url":"https://github.com/locuslab/sdp_mrf/blob/HEAD/sdp_mrf/solvers.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"078d4c6caaf8bb4d"}},{"code_sha256_prefix":"276e6384cce7f620","entry":"get_f","repo":"locuslab/sdp_mrf","repo_kind":"official","path":"sdp_mrf/solvers.py","file_url":"https://github.com/locuslab/sdp_mrf/blob/HEAD/sdp_mrf/solvers.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"276e6384cce7f620"}},{"code_sha256_prefix":"db42752c7986c8d4","entry":"get_simplex","repo":"locuslab/sdp_mrf","repo_kind":"official","path":"sdp_mrf/solvers.py","file_url":"https://github.com/locuslab/sdp_mrf/blob/HEAD/sdp_mrf/solvers.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"db42752c7986c8d4"}},{"code_sha256_prefix":"f3eef2a362cd37ce","entry":"get_string_from_vector","repo":"locuslab/sdp_mrf","repo_kind":"official","path":"sdp_mrf/solvers.py","file_url":"https://github.com/locuslab/sdp_mrf/blob/HEAD/sdp_mrf/solvers.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f3eef2a362cd37ce"}},{"code_sha256_prefix":"dd46cca59b6d89f0","entry":"obtain_rounded_v","repo":"locuslab/sdp_mrf","repo_kind":"official","path":"sdp_mrf/solvers.py","file_url":"https://github.com/locuslab/sdp_mrf/blob/HEAD/sdp_mrf/solvers.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dd46cca59b6d89f0"}},{"code_sha256_prefix":"83fe58ac1845e2a8","entry":"rand_unit_vector","repo":"locuslab/sdp_mrf","repo_kind":"official","path":"sdp_mrf/solvers.py","file_url":"https://github.com/locuslab/sdp_mrf/blob/HEAD/sdp_mrf/solvers.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"83fe58ac1845e2a8"}},{"code_sha256_prefix":"145ab8571d9356b3","entry":"M4PlusSolver","repo":"locuslab/sdp_mrf","repo_kind":"official","path":"sdp_mrf/solvers.py","file_url":"https://github.com/locuslab/sdp_mrf/blob/HEAD/sdp_mrf/solvers.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":"145ab8571d9356b3"}},{"code_sha256_prefix":"29da6a3bf1666757","entry":"Solver","repo":"locuslab/sdp_mrf","repo_kind":"official","path":"sdp_mrf/solvers.py","file_url":"https://github.com/locuslab/sdp_mrf/blob/HEAD/sdp_mrf/solvers.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":"29da6a3bf1666757"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}