{"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/neural-lyapunov-control-for-discrete-time-1","title":"Neural Lyapunov Control for Discrete-Time Systems","arxiv_id":"2305.06547","date":"2023-05-11","proceeding":"NeurIPS 2023 11","authors":["Junlin Wu","Andrew Clark","Yiannis Kantaros","Yevgeniy Vorobeychik"],"abstract":"While ensuring stability for linear systems is well understood, it remains a major challenge for nonlinear systems. A general approach in such cases is to compute a combination of a Lyapunov function and an associated control policy. However, finding Lyapunov functions for general nonlinear systems is a challenging task. To address this challenge, several methods have been proposed that represent Lyapunov functions using neural networks. However, such approaches either focus on continuous-time systems, or highly restricted classes of nonlinear dynamics. We propose the first approach for learning neural Lyapunov control in a broad class of discrete-time systems. Three key ingredients enable us to effectively learn provably stable control policies. The first is a novel mixed-integer linear programming approach for verifying the discrete-time Lyapunov stability conditions, leveraging the particular structure of these conditions. The second is a novel approach for computing verified sublevel sets. The third is a heuristic gradient-based method for quickly finding counterexamples to significantly speed up Lyapunov function learning. Our experiments on four standard benchmarks demonstrate that our approach significantly outperforms state-of-the-art baselines. For example, on the path tracking benchmark, we outperform recent neural Lyapunov control baselines by an order of magnitude in both running time and the size of the region of attraction, and on two of the four benchmarks (cartpole and PVTOL), ours is the first automated approach to return a provably stable controller. Our code is available at: https://github.com/jlwu002/nlc_discrete.","url_abs":"https://arxiv.org/abs/2305.06547v3","url_pdf":"https://arxiv.org/pdf/2305.06547v3.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":"neural-lyapunov-control-for-discrete-time-1","repo_url":"https://github.com/jlwu002/nlc_discrete","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2305.06547","atlas_url":"https://app.syntology.ai/?focus=2305.06547","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.06547"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/jlwu002/nlc_discrete","reach":null}],"summary":{"ran_draft_wrong":6,"ran":1,"unverified":2},"by_repo_kind":{"official":{"samples":6,"ran":6,"repositories":1},"community":{"samples":3,"ran":1,"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":9,"samples":[{"code_sha256_prefix":"7a8f63af71c44b82","entry":"AddCounterexamples","repo":"YaChienChang/Neural-Lyapunov-Control","repo_kind":"community","path":"Functions.py","file_url":"https://github.com/YaChienChang/Neural-Lyapunov-Control/blob/HEAD/Functions.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7a8f63af71c44b82"}},{"code_sha256_prefix":"8ffc4cbf41fed774","entry":"LyapunovNet","repo":"jlwu002/nlc_discrete","repo_kind":"official","path":"cartpole.py","file_url":"https://github.com/jlwu002/nlc_discrete/blob/HEAD/cartpole.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8ffc4cbf41fed774"}},{"code_sha256_prefix":"85dc7956a39f744d","entry":"dynamics","repo":"jlwu002/nlc_discrete","repo_kind":"official","path":"inverted_pendulum.py","file_url":"https://github.com/jlwu002/nlc_discrete/blob/HEAD/inverted_pendulum.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"85dc7956a39f744d"}},{"code_sha256_prefix":"df5a56be751f167e","entry":"dynamics","repo":"jlwu002/nlc_discrete","repo_kind":"official","path":"path_tracking.py","file_url":"https://github.com/jlwu002/nlc_discrete/blob/HEAD/path_tracking.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"df5a56be751f167e"}},{"code_sha256_prefix":"18bc758ff642c3a7","entry":"gradient_lyap_diff","repo":"jlwu002/nlc_discrete","repo_kind":"official","path":"inverted_pendulum.py","file_url":"https://github.com/jlwu002/nlc_discrete/blob/HEAD/inverted_pendulum.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"18bc758ff642c3a7"}},{"code_sha256_prefix":"ad7e7d4507340013","entry":"lyap_diff","repo":"jlwu002/nlc_discrete","repo_kind":"official","path":"inverted_pendulum.py","file_url":"https://github.com/jlwu002/nlc_discrete/blob/HEAD/inverted_pendulum.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ad7e7d4507340013"}},{"code_sha256_prefix":"f38aa1e4e1e18e4e","entry":"lyap_diff","repo":"jlwu002/nlc_discrete","repo_kind":"official","path":"path_tracking.py","file_url":"https://github.com/jlwu002/nlc_discrete/blob/HEAD/path_tracking.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f38aa1e4e1e18e4e"}},{"code_sha256_prefix":"adf1e35d9990d872","entry":"CheckLyapunov","repo":"YaChienChang/Neural-Lyapunov-Control","repo_kind":"community","path":"Functions.py","file_url":"https://github.com/YaChienChang/Neural-Lyapunov-Control/blob/HEAD/Functions.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":"adf1e35d9990d872"}},{"code_sha256_prefix":"984efa36de019e21","entry":"dtanh","repo":"YaChienChang/Neural-Lyapunov-Control","repo_kind":"community","path":"Functions.py","file_url":"https://github.com/YaChienChang/Neural-Lyapunov-Control/blob/HEAD/Functions.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"984efa36de019e21"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}