{"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/learning-rigid-body-dynamics-with-lagrangian","title":"Learning Articulated Rigid Body Dynamics with Lagrangian Graph Neural Network","arxiv_id":"2209.11588","date":"2022-09-23","proceeding":null,"authors":["Ravinder Bhattoo","Sayan Ranu","N. M. Anoop Krishnan"],"abstract":"Lagrangian and Hamiltonian neural networks (LNNs and HNNs, respectively) encode strong inductive biases that allow them to outperform other models of physical systems significantly. However, these models have, thus far, mostly been limited to simple systems such as pendulums and springs or a single rigid body such as a gyroscope or a rigid rotor. Here, we present a Lagrangian graph neural network (LGNN) that can learn the dynamics of articulated rigid bodies by exploiting their topology. We demonstrate the performance of LGNN by learning the dynamics of ropes, chains, and trusses with the bars modeled as rigid bodies. LGNN also exhibits generalizability -- LGNN trained on chains with a few segments exhibits generalizability to simulate a chain with large number of links and arbitrary link length. We also show that the LGNN can simulate unseen hybrid systems including bars and chains, on which they have not been trained on. Specifically, we show that the LGNN can be used to model the dynamics of complex real-world structures such as the stability of tensegrity structures. Finally, we discuss the non-diagonal nature of the mass matrix and its ability to generalize in complex systems.","url_abs":"https://arxiv.org/abs/2209.11588v2","url_pdf":"https://arxiv.org/pdf/2209.11588v2.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":"learning-rigid-body-dynamics-with-lagrangian","repo_url":"https://github.com/m3rg-iitd/rigid_body_dynamics_graph","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"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":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2209.11588","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2209.11588"}},"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":"deterministic:regex_extraction","url":"https://github.com/M3RG-IITD/rigid_body_dynamics_graph","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/m3rg-iitd/rigid_body_dynamics_graph","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":1,"ran_draft_wrong":2,"ran_honours":1,"unverified":3},"by_repo_kind":{"official":{"samples":6,"ran":3,"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":1,"samples":[{"code_sha256_prefix":"5549bd0c9f053842","entry":"SquarePlus","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"5549bd0c9f053842"}},{"code_sha256_prefix":"c2660facd7797ec1","entry":"forward_pass","repo":"m3rg-iitd/rigid_body_dynamics_graph","repo_kind":"official","path":"src/lnn.py","file_url":"https://github.com/m3rg-iitd/rigid_body_dynamics_graph/blob/HEAD/src/lnn.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c2660facd7797ec1"}},{"code_sha256_prefix":"d272330ee11ef862","entry":"initialize_mlp","repo":"m3rg-iitd/rigid_body_dynamics_graph","repo_kind":"official","path":"src/models.py","file_url":"https://github.com/m3rg-iitd/rigid_body_dynamics_graph/blob/HEAD/src/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d272330ee11ef862"}},{"code_sha256_prefix":"218440470f3ee0d8","entry":"layer","repo":"m3rg-iitd/rigid_body_dynamics_graph","repo_kind":"official","path":"src/lnn.py","file_url":"https://github.com/m3rg-iitd/rigid_body_dynamics_graph/blob/HEAD/src/lnn.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"218440470f3ee0d8"}},{"code_sha256_prefix":"f732b52feb01d5a5","entry":"LNN","repo":"m3rg-iitd/rigid_body_dynamics_graph","repo_kind":"official","path":"src/lnn.py","file_url":"https://github.com/m3rg-iitd/rigid_body_dynamics_graph/blob/HEAD/src/lnn.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":"f732b52feb01d5a5"}},{"code_sha256_prefix":"86a60d7eb39f2e3d","entry":"ReLU","repo":"m3rg-iitd/rigid_body_dynamics_graph","repo_kind":"official","path":"src/models.py","file_url":"https://github.com/m3rg-iitd/rigid_body_dynamics_graph/blob/HEAD/src/models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"86a60d7eb39f2e3d"}},{"code_sha256_prefix":"6c259a677bed3680","entry":"SquarePlus","repo":"m3rg-iitd/rigid_body_dynamics_graph","repo_kind":"official","path":"src/models.py","file_url":"https://github.com/m3rg-iitd/rigid_body_dynamics_graph/blob/HEAD/src/models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6c259a677bed3680"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}