{"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/lyapunov-stable-neural-network-control","title":"Lyapunov-stable neural-network control","arxiv_id":"2109.14152","date":"2021-09-29","proceeding":null,"authors":["Hongkai Dai","Benoit Landry","Lujie Yang","Marco Pavone","Russ Tedrake"],"abstract":"Deep learning has had a far reaching impact in robotics. Specifically, deep reinforcement learning algorithms have been highly effective in synthesizing neural-network controllers for a wide range of tasks. However, despite this empirical success, these controllers still lack theoretical guarantees on their performance, such as Lyapunov stability (i.e., all trajectories of the closed-loop system are guaranteed to converge to a goal state under the control policy). This is in stark contrast to traditional model-based controller design, where principled approaches (like LQR) can synthesize stable controllers with provable guarantees. To address this gap, we propose a generic method to synthesize a Lyapunov-stable neural-network controller, together with a neural-network Lyapunov function to simultaneously certify its stability. Our approach formulates the Lyapunov condition verification as a mixed-integer linear program (MIP). Our MIP verifier either certifies the Lyapunov condition, or generates counter examples that can help improve the candidate controller and the Lyapunov function. We also present an optimization program to compute an inner approximation of the region of attraction for the closed-loop system. We apply our approach to robots including an inverted pendulum, a 2D and a 3D quadrotor, and showcase that our neural-network controller outperforms a baseline LQR controller. The code is open sourced at \\url{https://github.com/StanfordASL/neural-network-lyapunov}.","url_abs":"https://arxiv.org/abs/2109.14152v1","url_pdf":"https://arxiv.org/pdf/2109.14152v1.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":"lyapunov-stable-neural-network-control","repo_url":"https://github.com/stanfordasl/neural-network-lyapunov","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2109.14152","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2109.14152"}},"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/stanfordasl/neural-network-lyapunov","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":5},"by_repo_kind":{"official":{"samples":5,"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":"527c39c2f909145f","entry":"compute_discrete_time_system_cost_to_go","repo":"stanfordasl/neural-network-lyapunov","repo_kind":"official","path":"neural_network_lyapunov/hybrid_linear_system.py","file_url":"https://github.com/stanfordasl/neural-network-lyapunov/blob/HEAD/neural_network_lyapunov/hybrid_linear_system.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":"527c39c2f909145f"}},{"code_sha256_prefix":"3c762489913062bc","entry":"concatenate_mixed_integer_constraints","repo":"stanfordasl/neural-network-lyapunov","repo_kind":"official","path":"neural_network_lyapunov/gurobi_torch_mip.py","file_url":"https://github.com/stanfordasl/neural-network-lyapunov/blob/HEAD/neural_network_lyapunov/gurobi_torch_mip.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":"3c762489913062bc"}},{"code_sha256_prefix":"f557243ee7263a30","entry":"rk4_constant_control","repo":"stanfordasl/neural-network-lyapunov","repo_kind":"official","path":"neural_network_lyapunov/integrator.py","file_url":"https://github.com/stanfordasl/neural-network-lyapunov/blob/HEAD/neural_network_lyapunov/integrator.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":"f557243ee7263a30"}},{"code_sha256_prefix":"2e90eed64119934c","entry":"rpy2rotmat","repo":"stanfordasl/neural-network-lyapunov","repo_kind":"official","path":"neural_network_lyapunov/geometry_transform.py","file_url":"https://github.com/stanfordasl/neural-network-lyapunov/blob/HEAD/neural_network_lyapunov/geometry_transform.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":"2e90eed64119934c"}},{"code_sha256_prefix":"141a496852aa63ca","entry":"rpy2rotmat_gradient","repo":"stanfordasl/neural-network-lyapunov","repo_kind":"official","path":"neural_network_lyapunov/geometry_transform.py","file_url":"https://github.com/stanfordasl/neural-network-lyapunov/blob/HEAD/neural_network_lyapunov/geometry_transform.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":"141a496852aa63ca"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}