{"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/are-graph-neural-networks-optimal","title":"Are Graph Neural Networks Optimal Approximation Algorithms?","arxiv_id":"2310.00526","date":"2023-10-01","proceeding":null,"authors":["Morris Yau","Nikolaos Karalias","Eric Lu","Jessica Xu","Stefanie Jegelka"],"abstract":"In this work we design graph neural network architectures that capture optimal approximation algorithms for a large class of combinatorial optimization problems, using powerful algorithmic tools from semidefinite programming (SDP). Concretely, we prove that polynomial-sized message-passing algorithms can represent the most powerful polynomial time algorithms for Max Constraint Satisfaction Problems assuming the Unique Games Conjecture. We leverage this result to construct efficient graph neural network architectures, OptGNN, that obtain high-quality approximate solutions on landmark combinatorial optimization problems such as Max-Cut, Min-Vertex-Cover, and Max-3-SAT. Our approach achieves strong empirical results across a wide range of real-world and synthetic datasets against solvers and neural baselines. Finally, we take advantage of OptGNN's ability to capture convex relaxations to design an algorithm for producing bounds on the optimal solution from the learned embeddings of OptGNN.","url_abs":"https://arxiv.org/abs/2310.00526v7","url_pdf":"https://arxiv.org/pdf/2310.00526v7.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":"are-graph-neural-networks-optimal","repo_url":"https://github.com/penlu/bespoke-gnn4do","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"combinatorial-optimization","task_name":"Combinatorial Optimization"},{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"}],"methods":[{"method_slug":"graph-neural-network","method_name":"Graph Neural Network"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.00526","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.00526"}},"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/penlu/bespoke-gnn4do","reach":{"status":"ok"}}],"summary":{"ran":6,"unverified":7},"by_repo_kind":{"official":{"samples":13,"ran":6,"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":13,"samples":[{"code_sha256_prefix":"49aa42235df7ad05","entry":"e1_projector","repo":"penlu/bespoke-gnn4do","repo_kind":"official","path":"problem/baselines.py","file_url":"https://github.com/penlu/bespoke-gnn4do/blob/HEAD/problem/baselines.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"49aa42235df7ad05"}},{"code_sha256_prefix":"f9504b4360b1518c","entry":"featurize_batch","repo":"penlu/bespoke-gnn4do","repo_kind":"official","path":"model/training.py","file_url":"https://github.com/penlu/bespoke-gnn4do/blob/HEAD/model/training.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f9504b4360b1518c"}},{"code_sha256_prefix":"929c874577947a6d","entry":"get_kamis_score","repo":"penlu/bespoke-gnn4do","repo_kind":"official","path":"kamis.py","file_url":"https://github.com/penlu/bespoke-gnn4do/blob/HEAD/kamis.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"929c874577947a6d"}},{"code_sha256_prefix":"893ec2c23d74dbf8","entry":"max_cut_sdp","repo":"penlu/bespoke-gnn4do","repo_kind":"official","path":"problem/baselines.py","file_url":"https://github.com/penlu/bespoke-gnn4do/blob/HEAD/problem/baselines.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"893ec2c23d74dbf8"}},{"code_sha256_prefix":"3409de43caa9035a","entry":"random_orthogonal_matrix","repo":"penlu/bespoke-gnn4do","repo_kind":"official","path":"utils/graph_utils.py","file_url":"https://github.com/penlu/bespoke-gnn4do/blob/HEAD/utils/graph_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3409de43caa9035a"}},{"code_sha256_prefix":"944467b97937b163","entry":"vertex_cover_obj","repo":"penlu/bespoke-gnn4do","repo_kind":"official","path":"problem/losses.py","file_url":"https://github.com/penlu/bespoke-gnn4do/blob/HEAD/problem/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"944467b97937b163"}},{"code_sha256_prefix":"f902914db1ae1dbd","entry":"gen_graph","repo":"penlu/bespoke-gnn4do","repo_kind":"official","path":"utils/graph_utils.py","file_url":"https://github.com/penlu/bespoke-gnn4do/blob/HEAD/utils/graph_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f902914db1ae1dbd"}},{"code_sha256_prefix":"0139feb1ee03cd3b","entry":"get_validation_score","repo":"penlu/bespoke-gnn4do","repo_kind":"official","path":"kamis.py","file_url":"https://github.com/penlu/bespoke-gnn4do/blob/HEAD/kamis.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0139feb1ee03cd3b"}},{"code_sha256_prefix":"87983881cde22896","entry":"load_model","repo":"penlu/bespoke-gnn4do","repo_kind":"official","path":"model/saving.py","file_url":"https://github.com/penlu/bespoke-gnn4do/blob/HEAD/model/saving.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"87983881cde22896"}},{"code_sha256_prefix":"84ae23bf65494964","entry":"max_cut_obj","repo":"penlu/bespoke-gnn4do","repo_kind":"official","path":"problem/losses.py","file_url":"https://github.com/penlu/bespoke-gnn4do/blob/HEAD/problem/losses.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"84ae23bf65494964"}},{"code_sha256_prefix":"0c645b2295bbb309","entry":"predict","repo":"penlu/bespoke-gnn4do","repo_kind":"official","path":"model/training.py","file_url":"https://github.com/penlu/bespoke-gnn4do/blob/HEAD/model/training.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0c645b2295bbb309"}},{"code_sha256_prefix":"f19e1cf876592813","entry":"random_rotation","repo":"penlu/bespoke-gnn4do","repo_kind":"official","path":"utils/graph_utils.py","file_url":"https://github.com/penlu/bespoke-gnn4do/blob/HEAD/utils/graph_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f19e1cf876592813"}},{"code_sha256_prefix":"98b652e02b8b5fe2","entry":"vertex_cover_constraint","repo":"penlu/bespoke-gnn4do","repo_kind":"official","path":"problem/losses.py","file_url":"https://github.com/penlu/bespoke-gnn4do/blob/HEAD/problem/losses.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"98b652e02b8b5fe2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}