{"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/variational-integration-of-learned-dynamical","title":"Variational Learning of Euler-Lagrange Dynamics from Data","arxiv_id":"2112.12619","date":"2021-12-23","proceeding":null,"authors":["Sina Ober-Blöbaum","Christian Offen"],"abstract":"The principle of least action is one of the most fundamental physical principle. It says that among all possible motions connecting two points in a phase space, the system will exhibit those motions which extremise an action functional. Many qualitative features of dynamical systems, such as the presence of conservation laws and energy balance equations, are related to the existence of an action functional. Incorporating variational structure into learning algorithms for dynamical systems is, therefore, crucial in order to make sure that the learned model shares important features with the exact physical system. In this paper we show how to incorporate variational principles into trajectory predictions of learned dynamical systems. The novelty of this work is that (1) our technique relies only on discrete position data of observed trajectories. Velocities or conjugate momenta do {\\em not} need to be observed or approximated and {\\em no} prior knowledge about the form of the variational principle is assumed. Instead, they are recovered using backward error analysis. (2) Moreover, our technique compensates discretisation errors when trajectories are computed from the learned system. This is important when moderate to large step-sizes are used and high accuracy is required. For this, we introduce and rigorously analyse the concept of inverse modified Lagrangians by developing an inverse version of variational backward error analysis. (3) Finally, we introduce a method to perform system identification from position observations only, based on variational backward error analysis.","url_abs":"https://arxiv.org/abs/2112.12619v3","url_pdf":"https://arxiv.org/pdf/2112.12619v3.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":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"variational-integration-of-learned-dynamical","repo_url":"https://github.com/christian-offen/lagrangianshadowintegration","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2112.12619","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2112.12619"}},"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/christian-offen/lagrangianshadowintegration","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":7,"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":"bf0f12c88005d73e","entry":"LP","repo":"christian-offen/lagrangianshadowintegration","repo_kind":"official","path":"LeapfrogJAX.py","file_url":"https://github.com/christian-offen/lagrangianshadowintegration/blob/HEAD/LeapfrogJAX.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":"bf0f12c88005d73e"}},{"code_sha256_prefix":"e3339d869e435fb8","entry":"Leapfrog","repo":"christian-offen/lagrangianshadowintegration","repo_kind":"official","path":"LeapfrogJAX.py","file_url":"https://github.com/christian-offen/lagrangianshadowintegration/blob/HEAD/LeapfrogJAX.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":"e3339d869e435fb8"}},{"code_sha256_prefix":"4b605f6d36f7bfc2","entry":"MyNewtonLAX","repo":"christian-offen/lagrangianshadowintegration","repo_kind":"official","path":"NewtonLAX.py","file_url":"https://github.com/christian-offen/lagrangianshadowintegration/blob/HEAD/NewtonLAX.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":"4b605f6d36f7bfc2"}},{"code_sha256_prefix":"68c86213da81bfb8","entry":"NewtonLAX","repo":"christian-offen/lagrangianshadowintegration","repo_kind":"official","path":"NewtonLAX.py","file_url":"https://github.com/christian-offen/lagrangianshadowintegration/blob/HEAD/NewtonLAX.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":"68c86213da81bfb8"}},{"code_sha256_prefix":"a31e284f5685ffb2","entry":"compare_contour_num","repo":"christian-offen/lagrangianshadowintegration","repo_kind":"official","path":"CompareContours.py","file_url":"https://github.com/christian-offen/lagrangianshadowintegration/blob/HEAD/CompareContours.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":"a31e284f5685ffb2"}},{"code_sha256_prefix":"ee675d90a0e817dd","entry":"modH","repo":"christian-offen/lagrangianshadowintegration","repo_kind":"official","path":"VariationalBEA1d.py","file_url":"https://github.com/christian-offen/lagrangianshadowintegration/blob/HEAD/VariationalBEA1d.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":"ee675d90a0e817dd"}},{"code_sha256_prefix":"e0e1197d9ca5c5b8","entry":"modL","repo":"christian-offen/lagrangianshadowintegration","repo_kind":"official","path":"VariationalBEA1d.py","file_url":"https://github.com/christian-offen/lagrangianshadowintegration/blob/HEAD/VariationalBEA1d.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":"e0e1197d9ca5c5b8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}