{"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/contrastive-learning-of-structured-world-1","title":"Contrastive Learning of Structured World Models","arxiv_id":"1911.12247","date":"2019-11-27","proceeding":"ICLR 2020 1","authors":["Thomas Kipf","Elise van der Pol","Max Welling"],"abstract":"A structured understanding of our world in terms of objects, relations, and hierarchies is an important component of human cognition. Learning such a structured world model from raw sensory data remains a challenge. As a step towards this goal, we introduce Contrastively-trained Structured World Models (C-SWMs). C-SWMs utilize a contrastive approach for representation learning in environments with compositional structure. We structure each state embedding as a set of object representations and their relations, modeled by a graph neural network. This allows objects to be discovered from raw pixel observations without direct supervision as part of the learning process. We evaluate C-SWMs on compositional environments involving multiple interacting objects that can be manipulated independently by an agent, simple Atari games, and a multi-object physics simulation. Our experiments demonstrate that C-SWMs can overcome limitations of models based on pixel reconstruction and outperform typical representatives of this model class in highly structured environments, while learning interpretable object-based representations.","url_abs":"https://arxiv.org/abs/1911.12247v2","url_pdf":"https://arxiv.org/pdf/1911.12247v2.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":"contrastive-learning-of-structured-world-1","repo_url":"https://github.com/tkipf/c-swm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"contrastive-learning-of-structured-world-1","repo_url":"https://github.com/caganselim/COMP541-Project","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"contrastive-learning-of-structured-world-1","repo_url":"https://github.com/ondrejba/action_attention_iclr_22","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"GPL-3.0"}}],"tasks":[{"task_slug":"atari-games","task_name":"Atari Games"},{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"},{"task_slug":"object","task_name":"Object"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1911.12247","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1911.12247"}},"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/tkipf/c-swm","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/caganselim/COMP541-Project","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ondrejba/action_attention_iclr_22","reach":{"status":"ok","spdx":"GPL-3.0"}}],"summary":{"unverified":10},"by_repo_kind":{"official":{"samples":10,"ran":0,"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":"77d0c6157590e526","entry":"compute_wall_collision","repo":"tkipf/c-swm","repo_kind":"official","path":"envs/physics_sim.py","file_url":"https://github.com/tkipf/c-swm/blob/HEAD/envs/physics_sim.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":"77d0c6157590e526"}},{"code_sha256_prefix":"962a1bc92a316173","entry":"crop_normalize","repo":"tkipf/c-swm","repo_kind":"official","path":"data_gen/env.py","file_url":"https://github.com/tkipf/c-swm/blob/HEAD/data_gen/env.py","link_basis":"harvester_set","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":"962a1bc92a316173"}},{"code_sha256_prefix":"730a49531670258a","entry":"fig2rgb_array","repo":"tkipf/c-swm","repo_kind":"official","path":"envs/block_pushing.py","file_url":"https://github.com/tkipf/c-swm/blob/HEAD/envs/block_pushing.py","link_basis":"harvester_set","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":"730a49531670258a"}},{"code_sha256_prefix":"13bd75adaddef15f","entry":"gallery","repo":"tkipf/c-swm","repo_kind":"official","path":"envs/physics_sim.py","file_url":"https://github.com/tkipf/c-swm/blob/HEAD/envs/physics_sim.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":"13bd75adaddef15f"}},{"code_sha256_prefix":"cc674952bed89380","entry":"get_colors","repo":"tkipf/c-swm","repo_kind":"official","path":"utils.py","file_url":"https://github.com/tkipf/c-swm/blob/HEAD/utils.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":"cc674952bed89380"}},{"code_sha256_prefix":"8e0583d19b2de35a","entry":"load_dict_h5py","repo":"tkipf/c-swm","repo_kind":"official","path":"utils.py","file_url":"https://github.com/tkipf/c-swm/blob/HEAD/utils.py","link_basis":"harvester_set","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":"8e0583d19b2de35a"}},{"code_sha256_prefix":"15362d0dcd6a886f","entry":"load_list_dict_h5py","repo":"tkipf/c-swm","repo_kind":"official","path":"utils.py","file_url":"https://github.com/tkipf/c-swm/blob/HEAD/utils.py","link_basis":"harvester_set","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":"15362d0dcd6a886f"}},{"code_sha256_prefix":"ca791728b69bd889","entry":"rgb2gray","repo":"tkipf/c-swm","repo_kind":"official","path":"envs/physics_sim.py","file_url":"https://github.com/tkipf/c-swm/blob/HEAD/envs/physics_sim.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":"ca791728b69bd889"}},{"code_sha256_prefix":"056c87133dcaa814","entry":"square","repo":"tkipf/c-swm","repo_kind":"official","path":"envs/block_pushing.py","file_url":"https://github.com/tkipf/c-swm/blob/HEAD/envs/block_pushing.py","link_basis":"harvester_set","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":"056c87133dcaa814"}},{"code_sha256_prefix":"d15591e079c2aced","entry":"triangle","repo":"tkipf/c-swm","repo_kind":"official","path":"envs/block_pushing.py","file_url":"https://github.com/tkipf/c-swm/blob/HEAD/envs/block_pushing.py","link_basis":"harvester_set","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":"d15591e079c2aced"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}