{"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/arxiv-2605-05395","title":"Differentiable Parameter Optimization for DAEs with State-Dependent Events","arxiv_id":"2605.05395","date":"2026-05-06","proceeding":null,"authors":["Ion Matei","Maksym Zhenirovskyy","Anthony Wong"],"abstract":"Differential-algebraic equations (DAEs) with state-dependent events arise in systems whose continuous dynamics are constrained by algebraic equations and interrupted by mode changes, switching logic, impacts, or state reinitializations. Gradient-based parameter learning for such systems is challenging because algebraic variables are implicitly defined, event times depend on the parameters, and reset maps introduce discontinuities. This paper studies differentiable parameter optimization for semi-explicit DAEs with events. We formulate the learning problem as a constrained least-squares problem with DAE dynamics, algebraic constraints, guard equations, and reset maps. We then develop two complementary gradient-computation strategies. The first is an automatic-differentiation-through-simulation method that solves algebraic variables inside the vector field, differentiates the algebraic solve using the implicit function theorem, and handles events through segmented differentiable integration. The second is an explicit discrete-adjoint method that represents the forward simulation as an event-split residual system and computes gradients by solving for the Lagrange multipliers of smooth-segment and event residuals. The formulation clarifies that residual terms in the adjoint method are equality constraints, not heuristic penalties. We compare the two approaches in terms of gradient interpretation, event-time handling, implementation complexity, and local validity. Both methods provide gradients for the event path selected by the forward simulation and are valid under fixed event ordering and transversal guard crossings.","url_abs":"https://arxiv.org/abs/2605.05395","url_pdf":"https://arxiv.org/pdf/2605.05395","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":null,"mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2605.05395"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/ionmatei/diff-dae-events","reach":null}],"summary":{"ran":10,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":12,"ran":10,"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":12,"samples":[{"code_sha256_prefix":"21cf44a1eb686d10","entry":"bias_parameters","repo":"ionmatei/diff-dae-events","repo_kind":"found_in_text","path":"src/run/optimization_cauer_events.py","file_url":"https://github.com/ionmatei/diff-dae-events/blob/HEAD/src/run/optimization_cauer_events.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"21cf44a1eb686d10"}},{"code_sha256_prefix":"c1d936869c8dd981","entry":"bias_parameters","repo":"ionmatei/diff-dae-events","repo_kind":"found_in_text","path":"src/run/optimization_cauer_events_da.py","file_url":"https://github.com/ionmatei/diff-dae-events/blob/HEAD/src/run/optimization_cauer_events_da.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c1d936869c8dd981"}},{"code_sha256_prefix":"ca99f3eef710682f","entry":"evaluate_ida_mse","repo":"ionmatei/diff-dae-events","repo_kind":"found_in_text","path":"src/run/_cauer_events_ida_loss.py","file_url":"https://github.com/ionmatei/diff-dae-events/blob/HEAD/src/run/_cauer_events_ida_loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ca99f3eef710682f"}},{"code_sha256_prefix":"83c41ec311554ea0","entry":"load_config","repo":"ionmatei/diff-dae-events","repo_kind":"found_in_text","path":"src/run/optimization_cauer_events.py","file_url":"https://github.com/ionmatei/diff-dae-events/blob/HEAD/src/run/optimization_cauer_events.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"83c41ec311554ea0"}},{"code_sha256_prefix":"5acf0a12123a87d4","entry":"load_spec","repo":"ionmatei/diff-dae-events","repo_kind":"found_in_text","path":"src/run/simulate_cauer_events_compare.py","file_url":"https://github.com/ionmatei/diff-dae-events/blob/HEAD/src/run/simulate_cauer_events_compare.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5acf0a12123a87d4"}},{"code_sha256_prefix":"a7b66696b167a738","entry":"prepare_loss_targets","repo":"ionmatei/diff-dae-events","repo_kind":"found_in_text","path":"src/run/optimization_cauer_events_da.py","file_url":"https://github.com/ionmatei/diff-dae-events/blob/HEAD/src/run/optimization_cauer_events_da.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a7b66696b167a738"}},{"code_sha256_prefix":"c71979bdade8d3b1","entry":"save_prediction_error_plot","repo":"ionmatei/diff-dae-events","repo_kind":"found_in_text","path":"src/benchmark/plot_three_methods_N.py","file_url":"https://github.com/ionmatei/diff-dae-events/blob/HEAD/src/benchmark/plot_three_methods_N.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c71979bdade8d3b1"}},{"code_sha256_prefix":"e9160e7f48cf7848","entry":"save_prediction_error_vs_time_plot","repo":"ionmatei/diff-dae-events","repo_kind":"found_in_text","path":"src/benchmark/plot_three_methods_N.py","file_url":"https://github.com/ionmatei/diff-dae-events/blob/HEAD/src/benchmark/plot_three_methods_N.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e9160e7f48cf7848"}},{"code_sha256_prefix":"50c41f6befa1ec91","entry":"save_validation_loss_plot","repo":"ionmatei/diff-dae-events","repo_kind":"found_in_text","path":"src/benchmark/plot_three_methods_N.py","file_url":"https://github.com/ionmatei/diff-dae-events/blob/HEAD/src/benchmark/plot_three_methods_N.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"50c41f6befa1ec91"}},{"code_sha256_prefix":"64fca5ed852c2c37","entry":"stack_segments","repo":"ionmatei/diff-dae-events","repo_kind":"found_in_text","path":"src/run/simulate_cauer_events_compare.py","file_url":"https://github.com/ionmatei/diff-dae-events/blob/HEAD/src/run/simulate_cauer_events_compare.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"64fca5ed852c2c37"}},{"code_sha256_prefix":"a4c18405f1677f0c","entry":"run_one_case","repo":"ionmatei/diff-dae-events","repo_kind":"found_in_text","path":"src/benchmark/benchmark_three_methods_N.py","file_url":"https://github.com/ionmatei/diff-dae-events/blob/HEAD/src/benchmark/benchmark_three_methods_N.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":"a4c18405f1677f0c"}},{"code_sha256_prefix":"8907b435c1742cf6","entry":"save_case","repo":"ionmatei/diff-dae-events","repo_kind":"found_in_text","path":"src/benchmark/benchmark_three_methods_N.py","file_url":"https://github.com/ionmatei/diff-dae-events/blob/HEAD/src/benchmark/benchmark_three_methods_N.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":"8907b435c1742cf6"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}