Manuscript Offprint
arXiv:2608.30960Singular Curvature in ReLU Training:Differentiation and the Gradient-Flow Limit Need Not Commute
HARD-RELU GRADIENT DESCENT SELECTS AN EVENT-FREE SENSITIVITY LIMIT
Xiaoyang Li Runni Zhou
College of Medicine and Biological Information Engineering Northeastern University, Shenyang, China
20246389@stu.neu.edu.cn 20246378@stu.neu.edu.cn
ORCID: 0009-0002-4863-5761 ORCID: 0009-0006-8365-4852
ABSTRACT
Classical analyses of discontinuous ODE discretizations show that state convergence need not imply convergence of differentiated sensitivities because fixed-step schemes can miss event-time terms. We ask which derivative limit is selected by exact automatic differentiation through increasingly fine, fixed-horizon hard-ReLU gradient-descent programs, and what the gradient/ReLU structure adds. For deterministic full-batch training with a stable finite itinerary of separated same-direction transverse events, states converge at first order. At every nonresonant mesh, AD exactly differentiates the discrete endpoint, yet these derivatives converge to an event-free regional propagator, while the flow derivative interleaves the classical saltation transfers. Global convexity precludes complete cancellation when an event is strict. Minimal globally 1-strongly convex residual-ReLU risks realize any prescribed reciprocal ratio, subject to an explicit crossing-conditioning/field-scale tradeoff, and a coupled two-coordinate construction gives an open initialization-gradient ranking reversal. In a predeclared 17-parameter ReLU MLP, the finest-mesh state errors are below , whereas AD-to-flow errors remain 0.18–0.39; a four-group outer audit also finds component-sign disagreements, but no top-group reversal. An a posteriori event-corrected product recovers the flow derivative, and smoothing is guaranteed to do so when its transition layer is resolved. These are finite-horizon existence and controlled-verification results, not prevalence or scalability claims for modern stochastic training.
The first convergence alone does not justify the second.
This barrier is classical for discontinuous differential equations. Event times vary with the data, and their derivatives produce saltation transfers; event-blind discretizations can converge in state while retaining an order-one sensitivity error (Stewart & Anitescu, 2010). Switch-detecting schemes can recover sensitivity convergence (Nurkanović et al., 2024), and recent measure-valued formulations encode the same smooth-segment and event decomposition (Khan, 2025). We do not claim any of these general mechanisms as new.
The object not characterized by this literature is the optimizer-time sequence of exact derivatives of increasingly deep hard-ReLU GD programs: the horizon stays fixed, the step size satisfies , and the number of executed training steps grows as . Fixed-program nonsmooth AD theory explains what AD computes at each mesh (Bolte & Pauwels, 2020; Bolte et al., 2022; Park et al., 2024); GD-flow work studies state approximation (Elkabetz & Cohen, 2021). An analogous gradient gap has also been observed for a ReLU ResNet-to-Neural-ODE architectural-depth limit (Gao et al.,
2025). Our limit instead refines optimization time and asks which derivative of the training endpoint is selected, together with the restrictions imposed by gradient and ReLU structure.
In this setting, the classical event-time mechanism yields a precise selection theorem:
The derivative identity on the second line holds at each fixed nonresonant mesh. At an exact interface landing the endpoint map may lack a classical derivative, although a software branch convention still selects a product. The omitted factor is exactly the classical activation-event timing transfer: a hard branch step contributes only , whereas a perturbed flow crosses at a shifted time and retains . The states converge. Their tangent dynamics need not approach the same object.
Gradient structure makes this selection result sharper than a generic hybrid counterexample. The transported saltation product gives the exact multi-event cancellation criterion. For globally convex losses, every event has the same determinant sign, so one strict event rules out complete cancellation. A minimal globally 1-strongly convex residual-ReLU empirical risk realizes any prescribed reciprocal sensitivity ratio, one fixed instance at a time. A bounded-data realization approaches grazing as the ratio grows; a rescaled realization keeps a uniform crossing-speed margin at the cost of a growing field scale. Finally, a genuinely coupled two-coordinate strongly convex construction reverses the ranking of two initialization-gradient components on an open neighborhood. Thus the discrepancy can change the exact decision made by a largest-component sensitivity rule, without asserting that such reversals are prevalent in modern networks.
Controlled network evidence checks that the selection theorem is not confined to separable scalar embeddings. In a predeclared 17-parameter hard-ReLU MLP, state and regional-derivative errors decrease under refinement while the AD-to-flow error remains between 0.18 and 0.39 across three horizons. A four-group training-weight audit records all 20 fixed seeds and all uncovered cases; two of the 15 validated seeds have component-sign disagreements, but none changes the top-ranked group and the measured decision effects are small.
Using classical saltation and BV language, we also give a trajectory-specific atomic-curvature representation of the two limits, and we specialize parameter, reverse-mode, event-correction, and smoothing analyses to the same training setting. The event-corrected product is an a posteriori consistency construction, not a scalable training algorithm. Our theory concerns deterministic full-batch dynamics over a fixed finite horizon with a stable, finite, separated, same-direction transverse itinerary. It excludes grazing, sliding, simultaneous or created events, chattering, and Zeno behavior.
Our contributions are:
-
Fixed-horizon training-limit characterization. We prove state convergence while exact nonresonant hard-ReLU GD derivatives select the event-free ; the limiting flow derivative instead contains the classical saltation transfers. We give the exact transported multi-event cancellation criterion.
-
Learning-specific gradient geometry. We derive the one-event ReLU law and prove convex no-cancellation, together with an explicit scale-transversality tradeoff for prescribed strongly convex sensitivity ratios.
-
Qualitative strongly convex consequence. We construct a coupled residual-ReLU empirical risk whose event-free and flow initialization gradients rank coordinate directions oppositely, with the strict reversal stable on an open neighborhood.
Figure 1 separates the classical flow-side transfer from the discrete-training selection proved here.
2 SETUP AND THE SELECTED DERIVATIVE LIMIT
Let be the activation regions met near a reference trajectory. Each regional field has a extension, with . For hard-ReLU gradient dynamics,
A Differentiate first or take the limit first?

B Pathwise curvature has event atoms

C Interface curvature controls normal transfer

Figure 1: State consistency need not imply tangent consistency. (a) The classical flow-side saltation transfer and the event-free limit selected by exact AD through increasingly fine nonresonant GD programs are distinct objects. (b) Along a reference path, regional curvature is a density and an activation event contributes a speed-normalized atom. (c) Under same-direction transversality, positive, zero, and negative atomic curvature respectively attenuate, preserve, and amplify the direct normal mode.
where is a extension of the continuous loss. The selection theorem needs only the piecewise- field; gradient structure enters Sections 3–4.
The flow crosses interfaces at . Write , , oriented from the incoming to the outgoing region, and assume a stable separated itinerary with
Same-direction is local to each oriented event; it does not require all units to activate. Grazing, sliding, simultaneous, created, terminal, chattering, and Zeno events are excluded. Appendix A gives the full isolating-tube assumptions.
On the canonical mesh , define
Let , let be the piecewise-linear interpolation, and set . If no evaluated iterate lies on an interface, the branch word is locally fixed and
At an exact landing, software still selects a branch product although the endpoint map need not have a classical derivative.
Let propagate between successive events, and set
Theorem 1 (Noncommuting hard-ReLU training limit). Under the assumptions above, for all sufficiently large N,
The selected-product limit includes exact landings under the stated branch convention. Along every nonresonant subsequence ,
The limiting flow derivative is instead
Smooth Euler estimates hold between isolating tubes. Transversality localizes each state crossing to , but every branchwise straddling factor is only . Hence , and it is for locally Lipschitz regional Jacobians; the separate gap may remain . Appendix F proves these claims through smooth-segment stability, event localization, finite-itinerary induction, an coefficient comparison, fundamental-matrix stability, and the hitting-time implicit-function theorem.
Proposition 2 (Transported cancellation criterion). Set and . Then
Moreover,
Thus is sufficient for mismatch, while is not sufficient for equality: transported matrix effects may still fail to cancel.
The assumptions are local nondegeneracy conditions, not a prevalence theorem. Under Proposition 11, transverse points are open on a regular surface; regular grazing and independent simultaneous hits have ambient codimension two, while regular exact discrete landings are measure-zero hypersurfaces inside a fixed branch cell.
3 EVENT GEOMETRY AND ATOMIC CURVATURE
Event time and saltation. At one transverse crossing, an incoming perturbation shifts the event time and the fixed-clock state by
For a continuous piecewise-smooth loss, tangential derivatives agree. With , , and therefore
The direct event update is rank at most one and acts only in the normal mode.
Spatial versus pathwise curvature. The distributional Hessian has a regional density and an interface measure,
The pathwise object must additionally normalize by crossing speed.
Proposition 3 (Speed-normalized pathwise curvature). Along the reference itinerary, define
The left/prepoint Stieltjes system satisfies and . Deleting the atoms gives , the discrete-AD limit.
This trajectory-specific measure is a convenient BV representation, not a canonical pullback of the spatial Hessian measure, and the atom is not exponentiated. Spatial BV calculus and saltation are classical (Demengel, 1984; Ambrosio et al., 2000; Hiskens & Pai, 2000; Kong et al., 2024); the training-limit statement is which part survives in the exact discrete derivative sequence.
One-event discrepancy.
Proposition 4 (One-event rank-one geometry). For one transverse event,
If , the gap has rank one, kernel , and image span . For a terminal scalar objective with gradient ,
Thus the outer-gradient gap vanishes exactly when or . Appendix E also records the random-direction identity .
4 CONVEXITY AND RELU EVENT STRUCTURE
Theorem 5 (Convex attenuation and no complete cancellation). Suppose, in addition to Theorem 1, that is globally convex. At every traversed interface,
Moreover,
Thus, if any event is strict, the product is below one and transported event factors cannot cancel completely.
This is a volumetric statement under same-direction transversality, not a claim that every direction contracts. Conversely, gives : negative singular interface curvature amplifies the direct normal mode and is incompatible with global convexity.
ReLU event law. For one switching preactivation , let , write , and let be the loss gradient at the common boundary output. Corollary 13 shows that, with empirical averaging factor and ,
for inactive-to-active crossing. Thus the projected residual determines attenuation, invisibility, or amplification. This is a single-simple-event statement, not a simultaneous-switch or genericity result.
A minimal strongly convex residual-ReLU risk. For one constant input, consider the empirical squared loss
Theorem 6 (Residual-ReLU phase theorem and prescribed ratios). Fix . Every crosses zero exactly once, at , with
Along every nonresonant canonical-mesh sequence,
For , the objective is globally -strongly convex; for , it is globally nonconvex. Given , , and , the choice
is globally -strongly convex, has minimum one-sided speed , and satisfies
The ratio holds on the open set for each fixed instance; it is not a uniform joint limit. It also does not arise from unstable regional curvature: the regional Hessians are 1 and 2.
Lemma 7 (Ratio-conditioning tradeoff). At a same-direction event, let . If and , then
The bounded-data family
is globally 1-strongly convex and realizes , but its outgoing speed is . The uniform-margin construction in Theorem 6 instead scales the incoming field, targets, and initialization as . Hence an unbounded sequence of reciprocal ratios cannot keep both quantities uniformly conditioned.
A qualitative outer decision.
Corollary 8 (Strongly convex initialization-gradient ranking reversal). For positive event-free sensitivities and transfer ratios , the strict ranking reverses after event transfer exactly when
This open set is nonempty exactly when . A globally 1-strongly convex realization at is
initialized at
Its separated events have minimum speed one, and for ,
Thus the largest-magnitude coordinate is 1 for and 2 for . Exact discrete AD has the first ranking on all sufficiently fine nonresonant meshes. The itinerary and strict reversal persist on an open neighborhood relative to the displayed separable parameter family.
Corollary 9 (Coupled strongly convex ranking reversal). Let be the preceding loss and set
There are arbitrarily small for which this finite-sample affine/residual-ReLU squared loss is genuinely coupled, globally more than 1-strongly convex, and retains the separated itinerary and opposite rankings. These properties persist on an open neighborhood of that nonzero coupling point.
The construction proves a robust low-dimensional possibility and rules out separability as its cause; it does not claim typicality in large networks. Complete proofs and the squared-loss realization are in Appendix M.
5 PARAMETER EXTENSIONS AND RECOVERY
Parameters and reverse mode. Let enter a regional field, the initialization, or an activation surface. With , , and , smooth segments obey . A moving event gives the classical affine transfer
At a fixed base parameter and nonresonant mesh, the finite branch word is locally constant, so AD is the classical discrete parameter derivative. Its vanishing-step limit continues without (26). Reverse mode pulls a terminal covector back by and includes the corresponding moving-surface accumulator. Appendix J states and proves these claims with the joint branch-constancy and itinerary-persistence assumptions. They specialize classical hybrid parameter and adjoint formulas to the training-limit comparison; they are not claimed as new hybrid calculus.
A posteriori event correction. Given approximations of the event times and states, one-sided transfers, and regional propagators, define
If their respective errors are , then Theorem 22 gives
This is a consistency diagnostic, not a complete event solver or a scalable training algorithm. A direct implementation must detect and localize the relevant switches and estimate one-sided data for each of them.
Resolved smoothing. For the scalar or genuinely autonomous normal layer , let . Appendix N proves
Thus recovers saltation. The displayed condition is sufficient, not necessary: it keeps Euler tangent factors away from zero and permits a logarithmic comparison. The sharp-first limit is directed through nonresonant meshes and retains profile, phase, and tail dependence; is not asserted to be universal across smoothing families.
6 CONTROLLED NUMERICAL VERIFICATION
The experiments test the limiting objects and their derivative consequences; they do not estimate prevalence in large networks. Every plotted point comes from preserved CSV, JSON, or NPZ output. Executed-program AD and independent centered finite differences provide separate checks.
6.1 ANALYTIC SANITY CHECKS
For the minimal residual-ReLU risk in Theorem 6, we sweep over eight nonresonant meshes. All 88 runs have one crossing and a unit minimum one-sided speed. At the finest mesh, the worst sensitivity-ratio and outer-gradient-ratio errors are and . PyTorch AD agrees with the analytic branch product to , and centered finite differences to . The two-coordinate ranking reversal holds at every tested mesh: ranks coordinate 1 first, whereas ranks coordinate 2 first. Appendix O reports the complete scalar, two-parameter, and smoothing controls.
6.2 A NONSEPARABLE 17-PARAMETER RELU NETWORK
We next use a full-batch, float64 2–4–1 hard-ReLU MLP with biases and squared loss on a fixed two-moons split of 64 training and 64 validation samples. Within each activation region, a high-accuracy DOP853 solve integrates the state and regional variational equation. Every sample–unit preactivation is monitored; isolated same-direction roots are localized and receive saltation transfers. Three solver tolerances and eight fixed Rademacher JVP finite differences validate the reference.
Before inspecting any derivative gap, the full cases were selected by taking the first covered eventful width-4 seed for each . This rule selects seed 0, with 8, 15, and 23 events. At , the normalized state errors are , and the relative errors from to are . In contrast, the errors to remain 0.183, 0.208, 0.389, while the a posteriori event-corrected errors fall to .
The coverage denominator is explicit. Across widths 4 and 8, 20 fixed seeds, and the three horizons, 105 of 120 trajectories satisfy the event screen; 15 are retained as uncovered because their event separation is below the stated threshold. This screen records where the current theorem can be checked in this protocol, not how often the effect occurs in modern training.


Figure 2: The selected sensitivity limit persists in a nonseparable network and changes a controlled outer decision. (a) For the predeclared 17-parameter case at T = 1, state, regional, and event-corrected errors decrease with the mesh, whereas ordinary AD remains separated from the hybrid-flow derivative. (b) The 20 fixed seeds are shown without outcome-based selection; validated gaps, sign disagreements, and uncovered cases are distinguished. (c) At a matched update norm, the discrete-AD and hybrid-flow directions exchange their ordering when evaluated on the finite GD program versus the hybrid-flow surrogate. Absolute loss differences are small.
6.3 A TRAINING-GROUP-WEIGHT DECISION
Four positive parameters weight training groups defined by class and spatial half, and the outer objective is clean validation MSE. For the predeclared seed-0, , case, discrete AD is within of the regional limit but from the hybrid-flow derivative; event correction is within of the latter. Among 20 fixed seeds, 15 pass all reference and finite-difference gates. Their regional-to-flow relative gaps have minimum/median/maximum 0.00189/0.0647/0.250; two seeds have component-sign disagreements, while none changes the largest-magnitude group.
The derivative difference changes an exact local choice even when it does not change the top group. With equal- -norm weight updates of 0.005, all four tested proposals preserve the seed-0 itinerary. On the actual finite-N outer objective, the discrete-AD proposal beats the hybrid-flow proposal by ; on the hybrid-flow outer objective, their ordering reverses by . The effect is reproducible but small, so it supports derivative-level relevance rather than a practical performance claim. Figure 2 summarizes the network and outer-parameter evidence; Appendix O records every seed, failure, event, tolerance, and finite-difference check.
7 RELATED WORK AND NOVELTY BOUNDARY
Established mechanisms. Event-time derivatives, saltation, hybrid adjoints, and switch-aware schemes are classical (Hiskens & Pai, 2000; Tolsma & Barton, 2002; Taringoo & Caines, 2009; Corner et al., 2020; Nurkanović et al., 2024). Stewart & Anitescu (2010) already prove persistent mesh-refinement gradient errors for discontinuous ODE simulations. Fixed-program and generalized nonsmooth differentiation study program-dependent selections (Bolte & Pauwels, 2020; Bolte et al., 2022; Park et al., 2024; Grazzi et al., 2024; Boustany, 2024); measure-valued hybrid AD also represents smooth densities and event atoms (Khan, 2025). None of these general devices is claimed as new here.
Exact learning boundary. Gao et al. (2025) prove smooth model-gradient convergence in an architectural-depth limit and report a numerical ReLU gradient plateau; our object is instead the exact derivative of a -step optimizer endpoint. GD-flow state comparison and ReLU boundary curvature are also established (Elkabetz & Cohen, 2021; Duersch et al., 2024). The pair characterized
Table 1: Closest limit objects.
| Line of work | limit/depth | derivative or event object | difference relevant here |
|---|---|---|---|
| Discontinuous ODE sensitivity (Stewart & Anitescu, 2010) | fixed-horizon mesh refinement | persistent derivative error from unresolved events | general numerical antecedent; not the hard-ReLU optimizer endpoint or its two limiting products |
| Switch detection (Nurkanović et al., 2024; Ma et al., 2021) | event-resolving refinement | localized event time and convergent sensitivity | supplies the repair principle, not the event-blind GD selection theorem |
| Fixed-program AD (Bolte & Pauwels, 2020; Park et al., 2024) | fixed graph or fixed-point iteration | program/generalized derivative selection | here is classical and program depth is |
| ResNet–Neural-ODE depth (Gao et al., 2025) | architectural | model-output parameter gradient | adjacent ReLU plateau; our limit refines optimizer time and differentiates the training endpoint motivates, but does not establish, endpoint-derivative consistency |
| GD versus flow (Elkabetz & Cohen, 2021) | training steps | state approximation | |
| This work | fixed , optimizer | versus saltation-interleaved | exact selection/cancellation, convex no-cancellation, prescribed strongly convex ratios, and open coupled ranking reversal |
here is
Gradient structure then yields the transported cancellation criterion, convex no-cancellation, the ratio-conditioning tradeoff, and the coupled ranking reversal. Table 1 gives the compact boundary; Appendix L records the full citation map.
8 LIMITATIONS AND CONCLUSION
Limitations. We study deterministic full-batch GD at a fixed finite horizon. The reference trajectory has a stable finite itinerary of separated, same-direction transverse events; grazing, sliding, simultaneous or created events, chattering, and Zeno behavior are excluded. The complete smoothing theorem is scalar or requires an autonomous normal reduction. We make no prevalence claim for modern networks, and explicit event tracking is not presented as a scalable training algorithm.
Conclusion. At each fixed nonresonant step size, AD exactly differentiates the executed hard-ReLU GD program. Yet differentiation and the vanishing-step limit need not commute: discrete derivatives approach an event-free limit, while the flow derivative retains activation-event transfers. Global 1-strong convexity permits any prescribed reciprocal ratio, subject to an explicit field-scale/transversality tradeoff, and does not prevent a robust coupled initialization-gradient ranking reversal. These discrepancies carry to outer derivatives of differentiated flow surrogates, even though the fixed-step AD derivatives remain correct for their discrete programs. A resolved smoothing layer or an a posteriori event-corrected product recovers flow sensitivity under the stated conditions; neither result is presented as a scalable training method. The broader methodological question is therefore: when does a continuous-time training surrogate remain valid after differentiation?
REPRODUCIBILITY STATEMENT
The appendix states every assumption used by the theorems, gives complete proofs, and records the numerical definitions. Numerical marks are read from preserved JSON or NPZ arrays; analytic curves and schematics are regenerated from the stated formulas. No plotted value is digitized from a raster image.
REFERENCES
Mark Ainsworth and Yeonjong Shin. Plateau phenomenon in gradient descent training of ReLU networks: Explanation, quantification, and avoidance. SIAM Journal on Scientific Computing, 43(5):A3438–A3468, 2021. doi: 10.1137/20M1353010. URL https://epubs.siam.org/doi/10.1137/20M1353010.
Luigi Ambrosio, Nicola Fusco, and Diego Pallara. Functions of Bounded Variation and Free Discontinuity Problems. Oxford Mathematical Monographs. Oxford University Press, Oxford, 2000. doi: 10.1093/oso/9780198502456.001.0001. URL https://academic.oup.com/book/53762.
Jérôme Bolte and Edouard Pauwels. A mathematical model for automatic differentiation in machine learning. In Advances in Neural Information Processing Systems, volume 33, pp. 10809–10819. Curran Associates, Inc., 2020. URL https://arxiv.org/abs/2006.02080.
Jérôme Bolte, Edouard Pauwels, and Samuel Vaiter. Automatic differentiation of non-smooth iterative algorithms. In Advances in Neural Information Processing Systems, volume 35, pp. 26404–26417, 2022. doi: 10.52202/068431-1915. URL https://proceedings.neurips.cc/paper_files/paper/2022/hash/a9077da44185792cb63599cc9e0357bc-Abstract-Conference.html.
Ryan Boustany. On the numerical reliability of nonsmooth autodiff: A Max-Pool case study. Transactions on Machine Learning Research, 2024. URL https://openreview.net/forum?id=142xsInVfp.
Samuel A. Burden, S. Shankar Sastry, Daniel E. Koditschek, and Shai Revzen. Event-selected vector field discontinuities yield piecewise-differentiable flows. SIAM Journal on Applied Dynamical Systems, 15(2):1227–1267, 2016. doi: 10.1137/15M1016588. URL https://epubs.siam.org/doi/10.1137/15M1016588.
Ricky T. Q. Chen, Brandon Amos, and Maximilian Nickel. Learning neural event functions for ordinary differential equations. In The Ninth International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=kW_zpEmMLdP.
Sebastien Corner, Adrian Sandu, and Corina Sandu. Adjoint sensitivity analysis of hybrid multibody dynamical systems. Multibody System Dynamics, 49:395–420, 2020. doi: 10.1007/s11044-020-09726-0. URL https://link.springer.com/article/10.1007/s11044-020-09726-0.
Françoise Demengel. Fonctions à hessien borné. Annales de l'Institut Fourier, 34(2):155–190, 1984. doi: 10.5802/aif.969. URL https://www.numdam.org/item/AIF_1984__34_2_155_0/.
Mario di Bernardo, Christopher J. Budd, Alan R. Champneys, and Piotr Kowalczyk. Piecewise-smooth Dynamical Systems: Theory and Applications, volume 163 of Applied Mathematical Sciences. Springer London, 2008. doi: 10.1007/978-1-84628-708-4. URL https://link.springer.com/book/10.1007/978-1-84628-708-4.
Luca Dieci and Luciano Lopez. A survey of numerical methods for IVPs of ODEs with discontinuous right-hand side. Journal of Computational and Applied Mathematics, 236(16):3967–3991, 2012. doi: 10.1016/j.cam.2012.02.011. URL https://www.sciencedirect.com/science/article/pii/S0377042712000684.
Jed A. Duersch, Tommie A. Catanach, Alexander Safonov, and Jeremy Wendt. Curvature in the looking-glass: Optimal methods to exploit curvature of expectation in the loss landscape, 2024. URL https://arxiv.org/abs/2411.16914. arXiv preprint, v1.
Omer Elkabetz and Nadav Cohen. Continuous vs. discrete optimization of deep neural networks. In Advances in Neural Information Processing Systems, volume 34, pp. 4947–4960, 2021. URL https://papers.nips.cc/paper/2021/hash/274ad4786c3abca69fa097b85867d9a4-Abstract.html.
A. F. Filippov. Differential Equations with Discontinuous Righthand Sides, volume 18 of Mathematics and Its Applications. Kluwer Academic Publishers, Dordrecht, 1988. doi: 10.1007/978-94-015-7793-9. URL https://link.springer.com/book/10.1007/978-94-015-7793-9.
Santos Galán, William F. Feehery, and Paul I. Barton. Parametric sensitivity functions for hybrid discrete/continuous systems. Applied Numerical Mathematics, 31(1):17–47, 1999. doi: 10.1016/S0168-9274(98)00125-1. URL https://doi.org/10.1016/S0168-9274(98)00125-1.
Tianxiang Gao, Siyuan Sun, Hailiang Liu, and Hongyang Gao. Global convergence in neural ODEs: Impact of activation functions. In The Thirteenth International Conference on Learning Representations, 2025. URL https://proceedings.iclr.cc/paper_files/paper/2025/hash/2fd37205c429a30cc1bb0afdbbf96857-Abstract-Conference.html.
Riccardo Grazzi, Massimiliano Pontil, and Saverio Salzo. Nonsmooth implicit differentiation: Deterministic and stochastic convergence rates. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 16250–16274. PMLR, 2024. URL https://proceedings.mlr.press/v235/grazzi24a.html.
William W. Hager. Runge–kutta methods in optimal control and the transformed adjoint system. Numerische Mathematik, 87:247–282, 2000. doi: 10.1007/s002110000178. URL https://link.springer.com/article/10.1007/s002110000178.
Ian A. Hiskens and M. A. Pai. Trajectory sensitivity analysis of hybrid systems. IEEE Transactions on Circuits and Systems I: Fundamental Theory and Applications, 47(2):204–220, 2000. doi: 10.1109/81.828574. URL https://ieeexplore.ieee.org/document/828574.
Arnulf Jentzen and Adrian Riekert. Convergence analysis for gradient flows in the training of artificial neural networks with ReLU activation. Journal of Mathematical Analysis and Applications, 517(2):126601, 2023. doi: 10.1016/j.jmaa.2022.126601. URL https://www.sciencedirect.com/science/article/pii/S0022247X22006151.
Sham M. Kakade and Jason D. Lee. Provably correct automatic sub-differentiation for qualified programs. In Advances in Neural Information Processing Systems, volume 31, pp. 7125–7135. Curran Associates, Inc., 2018. URL https://arxiv.org/abs/1809.08530.
Muhammad Haris Khan. Measure-valued automatic differentiation for hybrid and non-smooth systems. Differentiable Systems and Scientific Machine Learning Workshop at EurIPS 2025, 2025. URL https://openreview.net/forum?id=9D5TnNGIxa. Accepted workshop paper; no formal proceedings.
Nathan J. Kong, J. Joe Payne, James Zhu, and Aaron M. Johnson. Saltation matrices: The essential tool for linearizing hybrid dynamical systems. Proceedings of the IEEE, 112(6):585–608, 2024. doi: 10.1109/JPROC.2024.3440211. URL https://ieeexplore.ieee.org/document/10638633.
Wonyeol Lee, Hangyeol Yu, Xavier Rival, and Hongseok Yang. On correctness of automatic differentiation for non-differentiable functions. In Advances in Neural Information Processing Systems, volume 33, pp. 6719–6730. Curran Associates, Inc., 2020. URL https://arxiv.org/abs/2006.06903.
Yingbo Ma, Vaibhav Dixit, Michael J. Innes, Xingjian Guo, and Christopher Rackauckas. A comparison of automatic differentiation and continuous sensitivity analysis for derivatives of differential equation solutions. In 2021 IEEE High Performance Extreme Computing Conference (HPEC), pp. 1–9. IEEE, 2021. doi: 10.1109/HPEC49654.2021.9622796. URL https://ieeexplore.ieee.org/document/9622796.
Armin Nurkanović, Mario Sperl, Sebastian Albrecht, and Moritz Diehl. Finite elements with switch detection for direct optimal control of nonsmooth systems. Numerische Mathematik, 156(3):1115–1162, 2024. doi: 10.1007/s00211-024-01412-z. URL https://link.springer.com/article/10.1007/s00211-024-01412-z.
Sejun Park, Sanghyuk Chun, and Wonyeol Lee. What does automatic differentiation compute for neural networks? In The Twelfth International Conference on Learning Representations, pp. 52559–52585, 2024. URL https://proceedings.iclr.cc/paper_files/paper/2024/hash/e8711daef520be07cb9852390c673de8-Abstract-Conference.html.
J. M. Sanz-Serna. Symplectic runge–kutta schemes for adjoint equations, automatic differentiation, optimal control, and more. SIAM Review, 58(1):3–33, 2016. doi: 10.1137/151002769. URL https://epubs.siam.org/doi/10.1137/151002769.
Radu Serban and Antonio Recuero. Sensitivity analysis for hybrid systems and systems with memory. Journal of Computational and Nonlinear Dynamics, 14(9):091006, 2019. doi: 10.1115/1.4044028. URL https://doi.org/10.1115/1.4044028.
David Stewart. A high accuracy method for solving ODEs with discontinuous right-hand side. Numerische Mathematik, 58:299–328, 1990. doi: 10.1007/BF01385627. URL https://link.springer.com/article/10.1007/BF01385627.
David E. Stewart and Mihai Anitescu. Optimal control of systems with discontinuous differential equations. Numerische Mathematik, 114(4):653–695, 2010. doi: 10.1007/s00211-009-0262-2. URL https://link.springer.com/article/10.1007/s00211-009-0262-2.
Farzin Taringoo and Peter E. Caines. The sensitivity of hybrid systems optimal cost functions with respect to switching manifold parameters. In Hybrid Systems: Computation and Control, pp. 475–479. Springer, 2009. doi: 10.1007/978-3-642-00602-9_38. URL https://doi.org/10.1007/978-3-642-00602-9_38.
John E. Tolsma and Paul I. Barton. Hidden discontinuities and parametric sensitivity calculations. SIAM Journal on Scientific Computing, 23(6):1861–1874, 2002. doi: 10.1137/S106482750037281X. URL https://epubs.siam.org/doi/10.1137/S106482750037281X.
Hong Zhang, Shrirang Abhyankar, Emil M. Constantinescu, and Mihai Anitescu. Discrete adjoint sensitivity analysis of hybrid dynamical systems with switching. IEEE Transactions on Circuits and Systems I: Regular Papers, 64(5):1247–1259, 2017. doi: 10.1109/TCSI.2017.2651683. URL https://doi.org/10.1109/TCSI.2017.2651683.
A ASSUMPTIONS AND NOTATION
Let . In a neighborhood of a compact tube around the reference trajectory, a finite family of open regions forms a piecewise-smooth partition. On , write for the regional vector field and . The state and derivative-selection theorem is stated for this piecewise- field. In the hard-ReLU gradient specialization,
The following are the common base assumptions for the sharp-interface results; individual theorems state any additions.
(A1) Each has a extension to a neighborhood of , and and are uniformly bounded there. When a result invokes gradient, Hessian, convexity, or ReLU structure, each additionally has a extension, its one-sided loss traces agree on common interfaces, and .
(A2) Every interface met by the reference trajectory is locally a regular hypersurface , with . The defining function is oriented so that the trajectory moves from to . At the event state , the associated unit normal is . We use in formulas invariant to rescaling of , and whenever a coefficient or spectral statement requires a unit normal.
(A3) The patched Carathéodory solution exists on , remains in , and has exactly events
Consecutive events and the endpoints of the time interval are separated by at least . Each event has an isolating neighborhood containing no other interface met by the trajectory. On a neighborhood of , this event count, order, separation, and itinerary persist.
(A4) The crossings are uniformly same-direction transverse. For some , after shrinking the isolating neighborhoods if necessary,
on the respective one-sided neighborhoods.
Here “same-direction” is local to the oriented event: the normal points from the incoming region to the outgoing region. It does not require all ReLU units to switch in one common global direction; it excludes grazing, sliding, and opposing one-sided normal velocities at that crossing.
(A5) There is no grazing, sliding, chattering, simultaneous multi-surface hit, event creation, Zeno accumulation, or event at the terminal time .
These assumptions give a unique piecewise-classical trajectory and a locally stable event order. At an exact discrete boundary landing, the state update selects one of the adjacent one-sided fields whose oriented normal component remains at least . This condition is needed for the state estimate. Whenever ordinary AD is identified with a classical derivative of the discrete endpoint map, we additionally require that no iterate land exactly on an interface. At an exact hit, software AD still returns a selected branch product, but that product need not be a classical derivative.
We use the canonical meshes . Let denote the Euler/GD iterates and define the endpoint map and its piecewise-linear interpolation by
We use for the product returned by the executed branch convention, including at exact hits. On a nonresonant mesh it is both ordinary branchwise AD and the classical derivative , and we write it as . We use for the event-free regional continuum product, for the true flow derivative, and for the event-aware corrected sensitivity. The matrix propagates the regional variational equation between and , with and .
Rate assumption. Under (A1), the regional Jacobians are uniformly continuous on the relevant compact sets. We write
Thus as . An sensitivity rate additionally requires locally Lipschitz regional Jacobians; in the gradient setting, suffices.
B PIECEWISE-SMOOTH RELU OBJECTIVES
Proposition 10 (Finite-sample ReLU objectives). Consider a finite ReLU network on a finite data set, with a loss smooth in the network outputs. On every fixed activation-pattern cell, the empirical risk is smooth (and polynomial for squared loss). The risk is continuous across activation boundaries. At a point where exactly one preactivation vanishes and its parameter gradient is nonzero, the boundary is locally a regular hypersurface and the one-sided parameter gradients have well-defined traces.
Proof. Fixing every ReLU mask replaces each activation by either zero or its preactivation. The network output is then a finite composition of affine and multilinear operations in the parameters. It is polynomial on that mask cell, and so is a squared empirical risk. ReLU itself is continuous, hence the network and risk traces agree across a mask boundary. If a single preactivation vanishes with , the implicit-function theorem makes a regular hypersurface. Smooth regional formulas provide the gradient traces.
Proposition 11 (Local codimension of exceptional activation events). Work inside a fixed surrounding activation pattern, where a preactivation and the incoming regional field are . The following statements are local.
-
If , then is a regular hypersurface near . The transverse subset is open in .
-
Let . If zero is a regular value of , then the grazing set has codimension one in , hence codimension two in .
-
If two preactivations vanish and their gradients are linearly independent, their simultaneous-hit set is a codimension-two submanifold.
-
Fix an executed-branch cell of an -step GD program and one evaluated state . If at an exact landing, then the initializations producing that landing form a local hypersurface. For fixed and finitely many activation surfaces, the union of all such regular exact-landing sets has Lebesgue measure zero inside the branch cell.
Proof. The first statement is the implicit-function theorem, and continuity of makes its nonzero set open. The regular-value theorem applied to gives the grazing codimension. Applying the implicit-function theorem to the map proves the simultaneous hit statement when its two gradient rows are independent. On a fixed branch cell, every executed regional update is , so is . The final hypersurface claim is again the implicit-function theorem; a finite union of regular hypersurfaces has Lebesgue measure zero.
For canonical meshes , a useful conditional consequence is available. If every exact-landing map in every fixed branch cell has zero as a regular value, then for each the resonant initialization set is a finite union of measure-zero hypersurfaces. Taking the countable union over shows that almost every initialization is nonresonant for all canonical meshes. This statement is about initialization under the displayed regular-value condition; it does not assert that nonresonant step sizes are generic or dense for one fixed initialization.
These statements explain only local geometry under the displayed nondegeneracy conditions. They do not prove that a modern-network trajectory has a globally stable finite itinerary, that grazing or simultaneous events never occur, or that the sensitivity mismatch is prevalent.
The output is generally not piecewise affine in all network parameters. For a two-layer unit , it is bilinear on an active cell, and the squared risk may have degree four.
Only piecewise smoothness is used here. For a shallow squared-loss sample, orient from inactive to active. At , with output coefficient and residual , direct differentiation gives
up to the empirical averaging factor. The jump is normal to the activation surface. A simultaneous change of several samples or units is outside the single-interface result.
C EVENT-TIME DERIVATIVE AND SALTATION
For one event, let be the nominal impact at time , let , and let be the incoming perturbation evaluated at the nominal time. The perturbed event time obeys
The perturbed impact point changes by , while the outgoing segment loses time . Returning to the nominal clock gives
This is the saltation matrix without a state reset. The event time is by the implicit-function theorem because . Iterating this calculation over the stable itinerary gives the hybrid product in Theorem 14.
D DISTRIBUTIONAL HESSIAN AND SINGULAR INTERFACE CURVATURE
Proposition 12 (Distributional Hessian). Let a hypersurface split a neighborhood into minus and plus regions. Suppose is continuous and has extensions with one-sided gradients. For the unit normal from minus to plus, there is a scalar trace such that
and, as a matrix-valued distribution,
Proof. The traces of and agree on . Their tangential derivatives therefore agree, so their gradient difference is normal: . Integrating each component of by parts on the two regions gives the regional Hessians as volume terms. The outward normal of the minus region is , while that of the plus region is ; the boundary terms combine as , which is the stated measure.
The decomposition is standard BV calculus. Its role here is to locate the curvature omitted by regional Hessian products. Pulling the interface term through a transverse trajectory must account for the changing normal speed. In the resolved layer of Appendix N, the scalar identity converts the concentrated curvature into , exactly the normal saltation factor. A naive exponential of the bare hypersurface mass would be incorrect.
E ATOMIC CURVATURE AND EVENT GEOMETRY
This section proves the pathwise-curvature, one-event, convexity, and ReLU-event statements used in Sections 3 and 4. The Stieltjes convention below is part of the definition; it is important because the vector field itself jumps at an event.
E.1 PREPOINT STIELTJES FORMULATION
Along the reference trajectory, write
and define the finite matrix-valued measure
Here and below, event data are evaluated at the nominal event state. A right-continuous matrix function Z, with left limits, solves the prepoint Stieltjes system when
Thus an atom acts linearly on the left limit. Equation (30) is not an exponential convention for matrix atoms.
Proof of Proposition 3. Off the event times, the absolutely continuous part of (30) gives
At , subtracting the left limit from the right value gives
Hence
Solving the regional linear equations and applying these finitely many jumps in chronological order yields
Existence and uniqueness follow from the same finite construction. If the atoms are removed from , the solution remains continuous at each event and its terminal value is . Theorem 1 identifies this atom-free solution with the vanishing-step branchwise-AD limit.
The spatial measure in Proposition 12 and the pathwise measure in (29) are related but not identical objects. Since the trajectory velocity has two one-sided values at the interface, a bare distributional pullback does not select a crossing speed. The incoming-speed normalization and the prepoint convention in (30) encode the fixed-clock event derivative. In particular, is generally different from .
E.2 ONE-EVENT RANK-ONE GEOMETRY
Proof of Proposition 4. For one event, Theorem 1 and (9) give
(31)
Both regional fundamental matrices are invertible, so and . If , (31) is therefore a nonzero outer product and has rank one. A rank-one matrix has one nonzero singular value . This proves
The same outer-product formula gives
and, for ,
Since the last vector factor is nonzero, the hypergradient discrepancy vanishes exactly when or .
Finally, if is uniform on the unit sphere in , then , and hence
This is a directional statement at a fixed event, not a prevalence claim for network trajectories.
E.3 CONVEXITY AND THE SIGN OF AN EVENT
Proof of Theorem 5. Let be an event point and let point from the minus to the plus region. For sufficiently small , the points and lie in the adjacent smooth regions. Monotonicity of the gradient of a differentiable convex function gives
Divide by and pass to the one-sided traces. Since , the limit is .
Gradient structure gives
Same-direction transversality makes both sides positive. Therefore
with exactly when . This attenuates the direct normal mode; tangential modes remain eigenvectors with eigenvalue one.
Every regional fundamental matrix is invertible and has positive determinant by Liouville's formula. The matrix determinant lemma gives . Taking determinants in the saltation-interleaved product and in yields
If any convex event is strict, one while all other factors are at most one and positive. The product is then less than one, so ; exact transported cancellation is impossible.
If , the same speed identity gives under a same-direction crossing. The trace monotonicity argument above also shows that such a downward normal-gradient jump is incompatible with global convexity. This is negative singular interface curvature. The converse statement is deliberately local: fixes the sign of the atomic part but does not, without convex regional Hessians, prove global convexity.
E.4 A RELU EVENT IN RESIDUAL/DOWNSTREAM COORDINATES
Corollary 13 (Residual/downstream ReLU event law). Suppose one preactivation switches while all other masks remain fixed. Let , write , let be the loss gradient at the common boundary output, and set . With empirical averaging factor and oriented normal ,
For an inactive-to-active crossing,
Under same-direction transversality, the sign of gives attenuation, invisibility, or amplification. For squared loss, is the residual projected onto the switching unit's downstream output direction.
Proof of Corollary 13. Let be the changing preactivation and . With every other mask fixed, write the active and inactive network outputs near z as
The two outputs agree at z, while differentiation gives
Let be the loss gradient at the common output and let be the empirical averaging factor. The parameter-gradient jump from inactive to active is
Set . For activation, the oriented normal is . For deactivation, incoming and outgoing sides are exchanged and the oriented normal is ; both the gradient jump and change sign. Thus, in either orientation,
For an inactive-to-active event, n = q, and substitution into (9) yields
Under same-direction transversality, the signs of and therefore give attenuation, invisibility, and amplification as stated. For squared loss, is the residual, so is its inner product with the downstream output direction .
F GENERAL STATE AND FIRST-VARIATION THEOREM
Put . The executed-branch Euler/GD recursion and its selected branch product are
At an exact hit, is the admissible adjacent branch selected by the convention in Appendix A. On the th smooth segment, let solve
and abbreviate , with and .
Let and bound the regional fields and Jacobians on the compact tube. Constants below may depend on , the geometry and radii of the isolating tubes, and the positive distance from the reference path to all other interfaces outside those tubes. They do not depend on . This dependence is necessarily nonuniform as .
Theorem 14 (State consistency and first-variation selection). Under (A1)–(A5), there are and such that, for every ,
and
If the regional Jacobians are locally Lipschitz, the right-hand side is .
The terminal flow map is on a neighborhood with the same itinerary, and
For every nonresonant subsequence , the endpoint map is classically differentiable near and
At a resonant mesh, the selected product still satisfies (38), but need not be a classical derivative.
The proof is split into six lemmas to expose the event-tube induction and the matrix limit.
Lemma 15 (Smooth-segment Euler stability). Suppose the exact and numerical paths use the same regional extension on grid indices . With ,
The corresponding piecewise-linear interpolation has an additional error.
Proof. The exact regional solution has local defect at most . Lipschitz continuity of the field gives
Discrete Gronwall and prove (41). Both the exact path and the interpolant move at uniformly bounded speed within a step.
Lemma 16 (Single-event localization). Consider the isolating tube of event , and suppose the numerical path reaches its incoming part with error . For sufficiently small , the transition index
exists and is unique inside the tube, the numerical path does not recross there, and
In particular, an incoming error gives first-order event localization.
Proof. Uniformly on either one-sided part of the tube, Taylor expansion gives
The remainder is uniform because is and is bounded. By (A4), the increment is at least for all small , including an exact hit under the admissible convention. Hence the discrete normal coordinate is strictly increasing and can cross zero at most once.
Before the event, Lemma 15 and the smoothness of give an normal-coordinate error. Along the exact incoming and outgoing arcs, . The numerical and exact crossing clocks therefore differ by at most . Bounded speed then gives the state estimate in (42). Strict progress on the outgoing side precludes a recrossing before the path leaves the tube.
Lemma 17 (Finite-itinerary induction). For all sufficiently small , the numerical path visits the same regions and isolating tubes as the reference path, in the same order, and has exactly one branch transition in each tube. Its error on leaving every tube is , with a constant uniform over the finite itinerary.
Proof. Before the first tube, Lemma 15 gives error. Lemma 16 localizes the transition. During the bounded number of timing-mismatch steps, either one-sided field moves the state by at most ; thus the outgoing restart error remains . The positive distance from all other interfaces fixes the next region. Restart Lemma 15 on the outgoing segment. The -separated tubes and finite event count allow this argument to be iterated; a finite composition of its Gronwall constants is still independent of . The final segment and the interpolation estimate prove (37).
Lemma 18 (Branch-mismatch set). Let be the exact branch and let on . Define
Then . For
we have
Proof. Lemma 16 confines a branch disagreement at event to an interval around ; the intervals are disjoint for small . Their total length is at most . Outside them, both paths use the same regional extension, and Lemma 17 plus within-step motion gives . Inside them, both coefficients have norm at most . Integration proves (44).
Lemma 19 (Fundamental-matrix stability). Let and be the fundamental matrices for the stepwise coefficient and the exact coefficient , respectively. Then
Proof. Variation of constants gives
Both propagators have norm at most , which proves (45). On one step, the exact cocycle of is , and
A telescoping product estimate over uniformly bounded factors proves (46).
Lemma 20 (Flow-map differentiability and saltation). On a neighborhood with the stable itinerary, every event time and event state is . If denotes the incoming regional flow and its hitting time, then
The fixed-clock derivative across the event is , and finite chronological composition gives (39).
Proof. The hitting equation is . Its derivative with respect to time is , so the implicit-function theorem proves the first claim and (47). An incoming perturbation changes the event time by
Returning the outgoing perturbation to the nominal clock gives
Regional flow maps and event maps are ; composing the finitely many maps in chronological order proves (39).
Proof of Theorem 14. Lemma 17 proves the state estimate. Lemmas 18 and 19 give
Lemma 20 proves the flow derivative. If the mesh is nonresonant, every evaluated regional sign is strict and persists in a neighborhood of . The endpoint is then a finite composition of regional Euler maps, and the chain rule identifies its classical derivative with the selected branch product. At an exact landing, this neighborhood argument can fail, while the already proved product convergence remains valid.
In the continuous-loss gradient specialization, implies
Thus is symmetric with rank at most one, tangent directions have eigenvalue one, and the normal eigenvalue is . For , ; for , .
G MULTI-EVENT CANCELLATION CRITERION
Several nontrivial saltation matrices do not by themselves imply a matrix mismatch: transported event effects may cancel.
Proposition 21 (Transported saltation criterion). For , define
Then
Consequently,
A sufficient, but not necessary, condition for mismatch is
Equality of the scalar product to one only makes the determinant of the transported matrix product equal to one; it does not imply that the matrix product is 1. Regional propagation can rotate and couple the affected directions before subsequent events. For any submultiplicative matrix norm normalized by , set
Then the exact log-volume correction is
and
The first-order sum contains the transported event contributions; contains their ordered interactions. These are upper bounds only. No lower bound follows from , because transported factors may cancel. For one event,
so equality holds if and only if . In the continuous-loss gradient setting this is equivalent to equality of the one-sided gradients. A single genuine gradient jump therefore forces a matrix mismatch, although perturbation directions satisfying are unaffected by that event.
Proof. Every regional fundamental matrix is invertible. Expanding and cancelling regional factors from the outside inward gives
which proves the factorization and exact cancellation criterion. Moreover,
so the determinant condition follows. Under (A4), every ratio is positive; taking logarithms proves (54).
Expanding the ordered product in (50) gives
Submultiplicativity therefore yields
Using proves (55) and the first inequality in (57). The final inequality follows from for .
For one event, invertibility of and makes (58) zero exactly when . Since the denominator is nonzero, the latter is equivalent to , or .
H EVENT-AWARE FIRST-VARIATION CONSISTENCY
Let and be a posteriori event times and states with the correct event count and order. Suppose
Evaluate one-sided data at the localized event and define
Let be approximations of the regional propagators and assume
Define the a posteriori corrected product
Theorem 22 (Consistency of an a posteriori event-corrected product). Under (A1)–(A5), if the supplied event data have the correct stable itinerary and , then
More quantitatively,
The corrected matrix is not, in general, the derivative of unmodified hard-branch GD. It is the derivative of an event-aware solver only when that solver differentiates the localized event time and split steps.
Proof. All exact and numerical factors are uniformly bounded, and their number is fixed. A telescoping perturbation bound for the finite product, together with (39), proves (64) and the stated conclusions.
For the intended split hard-GD construction, use the -accurate state path from Theorem 14, localize each event with error , and evaluate the one-sided fields and normals consistently. Transversality then gives , while Lemmas 18–19 give
This specialization recovers the earlier convergence rate without treating the theorem as a complete event-detection algorithm.
I ARBITRARY-GAP CONSTRUCTION
Corollary 23 (Arbitrarily large discrete-to-flow derivative gap). Let and, for , define
For every , the open strip
has a stable one-event itinerary before time . On , both regional Hessians equal , and
Consequently,
Thus any multiplicative gap is obtained by taking , and any additive gap by taking . If , the true flow is expansive although ordinary branchwise AD converges to the strict contraction .
For and any step size with no exact interface landing,
Inserting the exact event matrix once gives
Here the inserted saltation matrix is exact. Since , so the entire difference in (72) is the ordinary Euler error of the regional dynamics. There is no event-localization or one-sided-data error in this construction; those additional errors are represented by and in Theorem 22. The loss is regionwise strongly convex but not globally convex.
Proof. The additive constant makes the two traces agree at . On the left, , so a point with reaches the interface at
The strict strip inequalities are exactly . Both one-sided speeds at impact are positive, namely and , so the crossing is stable and same-direction transverse. The regional fundamental matrices are scalar contractions whose total duration is , while
This proves the regional and true derivatives and both gap formulas. Since both regional Hessians are , every executed Euler Jacobian is , irrespective of the branch count. The regional factors commute with , proving the corrected formula. Finally, the normal derivative of jumps downward from to , so the continuous loss has negative singular interface curvature and is not globally convex.
J HYPERPARAMETER SENSITIVITY AND REVERSE MODE
This section proves Theorem 25 and Corollary 26. The formulas are classical hybrid sensitivity identities; their role here is to compare the derivative of a hard-ReLU training flow with the limit of exact derivatives of its nonresonant discrete programs.
J.1 PARAMETER-DEPENDENT ASSUMPTIONS
Let . In addition to (A1)–(A5), suppose that each regional field is jointly in state and parameter on the relevant compact tube. Write
The matrices and are uniformly continuous on that tube. Each event function is , and the initialization is with . The event count, order, separation, and same-direction transversality persist on a parameter neighborhood of the reference value. The mesh, horizon, state dimension, and program depth are held fixed while differentiating with respect to .
Let
Lemma 24 (Joint branch constancy for a fixed program). Fix a base parameter and a finite Euler/GD program. If every activation function evaluated by the executed program is nonzero at , then all executed branch signs are constant on a neighborhood of . On that neighborhood the endpoint is , and its classical parameter derivative is the branchwise AD recursion (77).
Proof. The initialization and all regional update maps are continuous in . A nonzero finite list of activation values retains its signs on a sufficiently small neighborhood. Induction over the finite program depth therefore fixes the branch word. The endpoint is then a composition of jointly regional maps, and the chain rule gives the stated recursion.
Theorem 25 (Parameter derivatives and the vanishing-step limit). Fix a base parameter , and assume the conditions above, including persistence of the stable separated itinerary on a neighborhood of . The horizon, mesh, and program depth are held fixed while taking . Regionally,
At event ,
At each mesh that is nonresonant at , branchwise AD is the classical parameter derivative. Along any such vanishing-mesh sequence it converges to the regional inhomogeneous sensitivity continued without event jumps, whereas the limiting flow derivative obeys the displayed affine event transfer.
J.2 FORWARD JUMP AND THE DISCRETE LEARNING LIMIT
Proof of Theorem 25. Inside a smooth region, ordinary differentiation gives
At event , perturb the parameter by and denote the resulting event-time change by . Differentiating on the incoming side gives
Returning the outgoing perturbation to the nominal clock yields
Since this holds for every parameter perturbation,
The dimensions are .
Equivalently, augment the state by the constant parameter:
The ordinary saltation matrix of the augmented system is
which gives a second derivation of both the sign and the block dimensions.
At a fixed Euler/GD program that is nonresonant at , with held fixed while differentiating, Lemma 24 gives the exact derivative recursion
Introduce the augmented regional coefficient and sensitivity
The discrete factor corresponding to (77) is
Outside event windows, the state estimate and uniform continuity imply that both and approach their reference regional coefficients. Inside event windows their norms are bounded and the total window length is . Consequently,
The same fundamental-matrix comparison used in Theorem 14 gives
where solves (74) and is continued without a jump at each nominal event time. If are locally Lipschitz, the right-hand side is .
The true flow derivative instead obeys (75). For one event, subtracting the event-free continuation and propagating to T gives the useful identity
If , a parameter direction has zero event-induced gap exactly when its first-order event-time change vanishes. If , the gap vanishes identically.
The formula separates three cases. If a parameter enters only the initialization, then , , and events act through . If it enters the vector field but not the interface, then regional forcing is accumulated and subsequently transferred by , while . If it enters the interface explicitly, the affine term is present. These effects coexist when a parameter enters all three objects.
J.3 REVERSE MODE
Corollary 26 (Event-aware adjoint). For a terminal scalar objective , let and solve regionally. Then
and
Omitting these event terms gives the adjoint of the regional sensitivity limit, not generally the derivative of the limiting flow.
Proof of Corollary 26. For a terminal scalar objective , set
on each regional segment. The fixed-clock forward event map in (75) pulls covectors back by
Indeed,
This proves that the transpose, rather than the inverse transpose, is the correct jump for the fixed-clock derivative map.
Between events,
At an event, (80) gives
Integrating segment by segment and adding the jumps yields
where
If , the direct event accumulator vanishes, but the event can still change the gradient through the jump . Omitting all event terms gives the regional continuous adjoint and hence the transpose of the event-free sensitivity limit. Reverse-mode AD through every fixed nonresonant discrete program remains its exact classical derivative.
K A RESTRICTED EVENT-BLIND ONE-STEP EXTENSION
The Euler calculation is not the only way to obtain the event-free derivative limit. Regional consistency alone, however, is insufficient: it places no restriction on the derivative of a step that samples more than one region. The following result states the additional hypotheses needed for a safe extension.
Theorem 27 (Conditional event-blind one-step derivative criterion). Assume (A1)–(A5). Consider a fixed-step method whose executed update is a piecewise- map , where records a locally fixed finite pattern of regional evaluations. Suppose the following bounds hold uniformly on the relevant compact tube.
- On a step whose evaluations remain in one region ,
- Every mixed step in an isolating event tube satisfies
-
The method makes oriented interface progress at least in each event tube and executes at most mixed steps per event, with and independent of .
-
No evaluation used by the executed program lies exactly on an interface.
Then the numerical state converges uniformly on , and the exact Jacobian of the executed program satisfies
The derivative of the limiting flow remains the saltation-interleaved product in Theorem 1. Thus the two derivatives differ whenever the transported event product is nonidentity.
Proof. On pure regional steps, (83) gives the standard first-order consistency and stability recursion. In each isolated event tube, positive progress and the mixed-step bound imply an timing error and only local defects of size . Restarting the regional recursion after every separated event gives uniform state convergence by the same finite induction as Theorem 14.
For the derivative, pure regional factors have the expansion . Their ordered products converge to the corresponding regional fundamental matrices. Every mixed factor is , and only finitely many such factors occur, so their combined product converges to , not to a nonidentity saltation matrix. A finite product perturbation argument across the separated itinerary proves (86). Strict branch evaluations make this product the classical derivative of the executed finite program.
The theorem includes Euler/GD. It also includes any event-blind regional one-step construction that satisfies the mixed-step hypotheses, irrespective of its higher regional order. It does not cover an event-localizing method, whose mixed-step derivative is designed to retain the event-time transfer, or an adaptive, implicit, or stage-switching scheme unless those hypotheses are verified separately. Smooth preconditioned Euler is covered relative to its own limiting field , provided the same event and regularity assumptions hold; this is not a statement about the unpreconditioned gradient flow. Fixed-coefficient momentum and heavy-ball limits are not covered.
L EXTENDED PRIOR-ART CITATION MAP
Table 1 in the main text compares the limiting objects. This appendix records the primary citation anchors behind its rows. The convex and residual-ReLU consequences named in the final row are results of this paper; saltation, switch localization, and discontinuous-ODE sensitivity are not presented as new.
The broader classical flow-side context is anchored by Filippov (1988); di Bernardo et al. (2008); Burden et al. (2016); Hiskens & Pai (2000); Tolsma & Barton (2002); Galán et al. (1999); Taringoo & Caines (2009); Corner et al. (2020); Kong et al. (2024); Zhang et al. (2017); Serban & Recuero (2019). The hybrid numerical-sensitivity and switch-detection rows use Stewart & Anitescu (2010); Stewart (1990); Dieci & Lopez (2012); Nurkanović et al. (2024); Ma et al. (2021); Chen et al. (2021). Fixed-program nonsmooth differentiation is represented by Kakade & Lee (2018); Lee et al. (2020); Bolte & Pauwels (2020); Bolte et al. (2022); Park et al. (2024); Grazzi et al. (2024); Boustany (2024); a recent workshop formulation of event-concentrated sensitivity is Khan (2025). Smooth discretize-differentiate comparators include Hager (2000); Sanz-Serna (2016); the direct architectural-depth ML comparator is Gao et al. (2025). The learning-state and ReLU-curvature context uses Elkabetz & Cohen (2021); Ainsworth & Shin (2021); Jentzen & Riekert (2023); Duersch et al. (2024); Demengel (1984); Ambrosio et al. (2000).
M FINITE-SAMPLE RELU EMPIRICAL-RISK REALIZATION
Proposition 28 (Exact residual-ReLU flow and discrete derivatives). Fix , , and , and consider
For , let and . The flow has exactly one stable transverse crossing before , and
The regional Hessians are and , while the interface coefficient is . If , the objective is globally 1-strongly convex; in the crossing range its unique minimizer is .
For , define
If , the step size is nonresonant, the first positive iterate is , and
Moreover, the piecewise-linear GD interpolation converges uniformly to the flow at for each fixed pair .
Proof. For the constant input x = 1, define the standard two-output residual-ReLU network and target
Then is exactly (87). Its regional vector fields and Hessians are
Before the event, , which reaches zero at . The initialization interval is exactly the condition . The one-sided speeds at zero are and , so the crossing is stable, same-direction transverse, and has saltation factor . After the event,
so there is no recrossing. Multiplication of the regional propagators and the event factor gives the stated formulas for and .
The normal derivative jumps from to , hence . If , the function is convex: its left derivative at zero is 0, its right derivative has trace , and the latter then increases with slope one. Since is 1-strongly convex, their sum is globally 1-strongly convex. For , its positive-region critical point is positive and is therefore the unique minimizer. For , the downward derivative jump instead proves global nonconvexity.
For the discrete dynamics, while ,
Thus an exact landing occurs precisely when is an integer, and otherwise the first positive iterate is . The incoming update gives . Since , the outgoing recurrence
is a convex combination of positive quantities at each step and therefore stays positive. Hence the discrete itinerary also has one crossing. Its branch sequence is locally fixed at nonresonant sizes, and differentiating the two affine recurrences gives (88). Because , . Taking logarithms in (88) therefore gives the claimed Jacobian limit. The standard uniform comparisons and , together with the crossing-time and overshoot errors, prove the uniform state bound. Its constant may depend on .
Corollary 29 (Uniform-margin amplification and convex attenuation). Fix , , and a prescribed event ratio . Choose
Then the event occurs at , , and . If , the objective is globally 1-strongly convex. In particular, for , the choice , gives
(89) while a common interface tube has normal-speed lower bound for every . The limit is taken for each fixed and then ; the Euler state-error constant is not asserted to be uniform in .
Proof. The parameter choice gives and makes the smaller of and equal to . The event-time formula and Proposition 28 prove the ratio. When , , so global 1-strong convexity follows from that proposition. In the reciprocal family, the incoming speed is . On the incoming side of it is at least , while on the outgoing side the speed is . This proves the uniform transversality claim.
Proposition 30 (Exact-hit set for the residual-ReLU family). For the pre-event recurrence in Proposition 28, the positive step sizes that place an evaluated iterate exactly at the interface are
This set is countable, has Lebesgue measure zero, and accumulates at zero. Requiring selects only its intersection with the mesh family . For every , infinitely many canonical meshes are nonresonant.
Proof. An exact hit at iterate means , which is equivalent to (90). The set is countable and , proving accumulation at zero. On a resonant canonical mesh, the corresponding index is
If every sufficiently large canonical mesh were resonant, both and would be integers, while their integer difference would converge to , which is impossible. Hence an infinite nonresonant subsequence exists.
Corollary 31 (Scalar outer-gradient consequence). Under Theorem 6, along any nonresonant mesh sequence, let satisfy , let , and let . Then
Proof of Corollary 31. At every nonresonant step size, the ordinary chain rule gives
Proposition 28, continuity of , and state convergence therefore yield . The stable-itinerary flow map is classically differentiable, so
Both limits are nonzero because and . This proves the stated factor- relation.
At resonance, an evaluated iterate equals zero. If another step remains, the incoming and outgoing updates from that state differ by , which is propagated through the remaining outgoing recurrence. The endpoint map therefore need not have a classical derivative; software AD returns a selected branch product. The state estimate still holds under the admissible positive-speed selection. This is why every derivative statement above, including Theorem 6 and Corollary 31, follows a nonresonant sequence.
Proof of Corollary 8. For positive , the two desired strict inequalities are and , proving (21). This interval is nonempty exactly when . Strict inequalities define an open subset of .
Equation (22) is the half-squared risk of the one-sample, four-output network
with target . Each coordinate loss has , so Proposition 28 makes it globally 1-strongly convex. Their sum is globally 1-strongly convex on .
The initialization formula in Proposition 28 gives coordinate event times and . The corresponding ratios are
Both outgoing speeds equal one; the incoming speeds are 4 and 4/3. The events are therefore separated by 0.2 and have one-sided speed margin one. Since the system is separable, the event-free and flow initialization Jacobians are diagonal, with entries
For , its terminal gradient is , which proves (24). The regional ranking follows from . The flow ranking is reversed because , so .
At nonresonant meshes, the two scalar executed programs are locally smooth and their exact derivatives converge coordinatewise to the regional values. Because the regional inequality is strict, exact discrete AD has the same ranking for all sufficiently small step sizes. Finally, the event-time and ratio formulas are continuous where , , and the event times lie strictly inside . The two ranking margins, event separation, and normal speeds are also strict. They therefore persist on an open neighborhood relative to the displayed separable target-initialization parameter family.
Proof of Lemma 7. Since is a unit vector and both normal speeds are positive,
For (20), the parameters in (16) are and . Proposition 28 gives global 1-strong convexity, incoming speed one, outgoing speed , and . The target and initialization remain bounded for fixed , but the transverse margin tends to zero. In the uniform-margin parameterization, , , and , proving the asserted linear scale growth.
Proof of Corollary 9. On a fixed activation region, the smooth quadratic part of has Hessian
The two residual-ReLU terms are convex because . Hence is globally -strongly convex and is more than 1-strongly convex whenever .
At , the event times, normal speeds, event separation, and both ranking margins computed above are strict. Regional ODE solutions depend continuously on . In each isolating tube, the event equation has nonzero time derivative, so the implicit-function theorem gives a unique nearby event time and state. Induction over the two separated events shows that the itinerary, regional fundamental matrices, saltation matrices, and both terminal gradients vary continuously. All strict inequalities therefore persist near the origin. Choose a sufficiently small point with , and then a ball around it small enough that , and all event and ranking margins persist. This is an open set in the explicit coupled parameter family.
Finally, let and , where . Up to an additive constant,
Thus the coupled objective is a finite-dimensional affine/residual-ReLU squared loss. This completes the proof.
N SMOOTHING AND DISCRETIZATION THEORY
This section gives a self-contained scalar result that separates three effects: truncating a smoothing profile, discretizing its inner dynamics, and taking the sharp-interface limit. It also records the phase qualification needed for the sharp-first limit. Throughout, the update is written with a plus sign because the vector field already includes the negative gradient.
N.1 LAYER ASSUMPTIONS, RESCALING, AND ENTRY-EXIT CONVENTION
Let satisfy the following standing assumptions:
(S1) and there are constants such that for every ;
(S2) the positive traces
exist;
(S3) and .
For the sharp-first result we additionally assume
Assumption (S1) is the scalar same-direction transversality condition. In particular, neither grazing nor reversal of the continuous trajectory occurs inside the layer. The scalar saltation factor is
For a smoothing width , define
The inner variables
give the exact map and fixed-itinerary cocycle
We use the following entry–exit convention for the canonical layer. Given a normalized half-window , set and
The index is finite because every increment is at least . The product in (97) is the derivative of the -fold iterate on a phase cell on which is locally constant. At a phase where the stopping index changes, the stopped map need not be differentiable; no derivative across such a phase boundary is claimed. The physical tube is . A localized interface limit requires both and .
N.2 EXACT FLOW TRANSFER AND RESOLVED EULER TRANSFER
Lemma 32 (Exact scalar flow transfer). For the inner flow and its variational equation,
the transfer from to is
Consequently, as .
Proof. Along the trajectory,
Integrating between the entry and exit points proves (98). The trace limit follows from (S2).
Define the logarithmic tail truncation
Theorem 33 (Resolved discrete layer). Under (S1)–(S3), suppose that
Then
where one admissible constant is
In particular, if and , then .
Proof. Write and, for , set
Because , Taylor's formula with integral remainder gives
Condition (100) gives , whereas (S1) gives . With , the mean-value theorem for the logarithm yields
The intervals are disjoint. Summing and using the telescoping product of the therefore gives
The exit overshoot obeys
Since ,
Combining (103), (104), and (99) proves the claim.
Remark 34 (Rate, entry phase, and physical localization). If , then
An entry displacement adds only another endpoint term to the proof. If , the choice gives an bound, provided an embedded interface also satisfies . For fixed , however, the resolved limit is , not exactly ; a fixed-window error must not be reported as Euler discretization error.
N.3 THE TWO ORDERS OF LIMITS
Iterated limits are meaningful only after fixing a common state map. Fix and , take , and define
The horizon assumption places the limiting sharp trajectory strictly on the positive side at time .
Theorem 35 (Smooth-first iterated limit). Under (S1)–(S3),
Proof. For fixed , the vector field is smooth and globally Lipschitz. Standard Euler convergence applied jointly to the state and variational equations gives
where is the flow of . The scalar autonomous identity from Lemma 32 gives
For any reached point , elapsed time is characterized by
The integrand is bounded by and converges pointwise away from zero to on the negative side and on the positive side. Dominated convergence, followed by monotonic inversion of the time-of-flight map, shows that converges to the sharp trajectory endpoint
Thus the denominator and numerator in (108) converge to and , respectively.
For the opposite order, define the sharp Euler orbit
The value of is irrelevant when the orbit is nonresonant.
Theorem 36 (Nonresonant sharp-first limit). Assume (S1)–(S3) and (92). Fix and suppose that
Then
Consequently, for the set of step sizes satisfying (110),
Before the first crossing, condition (110) is equivalent to .
Proof. For fixed , the sharp orbit has finitely many states and
Induction in (105), using the trace convergence in (S2) at each state away from zero, gives for every . Hence for all sufficiently small . For each of the finitely many Jacobian factors,
by (92). Their product therefore converges to one. The outer limit in (112) is then the limit of the constant inner-limit value one over nonresonant step sizes.
Remark 37 (Why the phase qualification is necessary). For the tanh profile below, and the tails are exponential. If a sharp iterate satisfies , all preceding smooth-versus-sharp state errors are exponentially small in , so . The corresponding factor behaves as
whose magnitude diverges. Resonant step sizes can accumulate at zero. Thus an unrestricted statement is generally false. The proved replacement is the directed nonresonant limit (112).
N.4 FINITE-RATIO TRANSFER DEPENDS ON PHASE AND PROFILE
At fixed , equation (96), rather than the trace ratio alone, is the limiting inner problem.
Proposition 38 (Phase and profile are genuine data). At finite , the fixed-itinerary cocycle need not be determined by .
Proof. Phase dependence follows already from the explicit tanh calculations in Subsection N.5: the same profile and give transfers near 46 and 1 for two different incoming phases.
For profile dependence, fix a finite itinerary away from a stopping-index boundary. Choose a smooth bump supported in a small neighborhood of , disjoint from all later sampled states, such that and . For sufficiently small , the function remains positive and has the same traces. Every sampled state is unchanged because , but the first cocycle factor changes because . Hence the transfer changes while the traces do not.
N.5 TANH-PROFILE CONSTRUCTIONS
Consider
This profile satisfies all assumptions above. In the expanding example and , so and .
Skip. With , exit threshold 20, and ,
There is one factor and
This is a constructive skip phase, not a universal large- limit.
Tuned hit. Choose
Then and . Thus
More generally, taking and lands exactly at the maximizer . For the increasing profile the following step exits for all sufficiently large , and
The phase is returned with (and hence with ); this is not a fixed-phase divergence statement.
Same ratio, different phases. At with exit threshold 20, direct iteration gives
This supplies the phase comparison used in Proposition 38.
Orientation reversal of the discrete cocycle. For the contracting twin , , take , , and . The orbit contains
At the near-central sample,
The two preceding factors are positive. For , the magnitude of the negative derivative in (113) decreases, and all remaining factors are at least 0.9635. Therefore exactly one sampled factor is negative and
The continuous same-direction saltation factor is ; the sign reversal is a finite-step critical-regime effect. The inequality merely makes a negative factor possible. It does not force a given phase to sample that factor, nor does it determine the parity of all negative factors in a longer itinerary.
N.6 EFFECTIVE RESOLUTION AND SCOPE BEYOND THE SCALAR FLAT LAYER
The local dimensionless stiffness is
For (113) with traces 0.2 and 2, . The condition is a sufficient condition for Theorem 33; it is not a necessary condition for an accidental finite- value to lie near . Across a family of profiles, also does not replace the tail error, positivity bounds, or appearing in (101). The contrast quantity measures net trace gain, not local spike resolution.
The preceding proofs are scalar. They extend without new ideas only when a multidimensional system genuinely reduces to an autonomous normal coordinate, for example at a flat interface with fixed normal, a rank-one normal jump, and separately controlled tangential dynamics. In that setting the scalar normal factor is embedded in the usual matrix
The scalar proof does not establish a general matrix theorem: matrix cocycles do not telescope through a scalar speed ratio, normal-tangential blocks need not commute, and tangential drift can change both interface location and incoming phase. For a curved interface, flattening changes the normal across the physical tube of radius and introduces curvature terms. Any claimed bound therefore requires a separate geometric argument with bounded curvature, transverse speed, tangential regularity, and . Grazing, sliding, chattering, and simultaneous interface hits are outside the scope of this section.
Logical scope. The results above do not assert an unrestricted sharp-first iterated limit, an exact saltation value at fixed , an error without a tail term, or universality of over arbitrary smoothing families. They also do not assert that every unresolved phase skips the layer, that the tuned-hit divergence holds at fixed phase, or that forces orientation reversal. Finally, the scalar argument does not by itself prove a curved-interface or general multidimensional extension.
O NUMERICAL METHODS AND REPRODUCIBILITY
All numerical plots use deterministic resolution sweeps. Analytic curves are recomputed from the parameters below, and plotted numerical values are read from preserved JSON or NPZ arrays rather than digitized from raster figures.
Residual-ReLU curvature-phase sweep. The main scalar study uses the minimal one-sample residual-ReLU graph
For each
we choose , , and , with . Hence the event time is 0.3, the minimum one-sided speed is exactly one, and . The eight step sizes are 0.04, 0.02, 0.01, 0.005, 0.002, 0.001, 0.0005, 0.0002. All 88 rows are nonresonant and have one crossing. The outer objective is , and the diagnostic event-aware derivative inserts the exact scalar event factor into the discrete regional product.
The script stores the branch-stability radius and exact-hit distance for every row. The minimum normal speed is one, the minimum resonance distance is 0.150005 of a step, and the minimum branch-stability radius is . Maximum discrepancies are for PyTorch endpoint AD, for its outer derivative, for the centered finite-difference endpoint derivative, and for the finite-difference outer derivative.
A Event transfer across the convexity split

B Reciprocal sensitivity and hypergradient gaps
C Worst-case errors under step refinement
state event-aware outer gradient vs.
Figure 3: Analytic residual-ReLU phase sweep. (a) The endpoint-sensitivity ratio follows across globally strongly convex attenuation, the interface, and nonconvex amplification at a fixed speed margin. (b) Endpoint- and outer-gradient reciprocal ratios equal in the continuum limit. (c) State, regional-AD, and corrected errors vanish under refinement, while ordinary AD remains separated from the flow derivative for . Lines connect deterministic values.
Nontrivial-network protocol. We generate a deterministic two-moons data set with 64 training and 64 validation samples, noise 0.08, and targets in . Training inputs are standardized once and stored with the artifact. The models are fully connected hard-ReLU networks of widths and , with biases, full-batch squared loss, float64 arithmetic, and 20 fixed Xavier initializations. We screen , and for the full width-4 derivative cases use with .
Within each activation region, DOP853 integrates the state, the regional variational equation, and four group-weight sensitivity columns. Each sample-unit preactivation is an event function. Sign-changing events are bracketed and bisected to width at most , after which the one-sided saltation transfer is inserted. Three solver tolerances are checked. Eight fixed normalized Rademacher JVPs provide centered finite-difference validation of each reported flow and discrete derivative. A run is labeled uncovered if events are separated by less than , a normalized one-sided speed is below , the one-sided directions oppose, an exact initial or terminal hit occurs, or the solver fails. All excluded runs and their reasons remain in the artifact.
The complete screen has 120 architecture-seed-horizon rows: 105 are covered and 15 fail the event-separation gate. The three full derivative cases are selected before examining the discrepancy by taking the lowest covered, eventful width-4 seed at each horizon; this rule selects seed 0. The event counts are 8, 15, and 23. Across all 18 mesh rows, the largest discrete JVP finite-difference relative error is , the largest flow JVP error is , and the largest four-group discrete derivative error is .
Training-group-weight outer audit. Training samples are partitioned into four groups by class and the sign of the first standardized coordinate, with counts 24, 8, 9, 23. Four positive weights enter the full-batch inner loss, and the outer objective is clean validation MSE. All 20 fixed width-4 seeds at are audited: 15 pass the reference and finite-difference gates, three fail the original separation screen, one has tolerance-dependent event separation, and one finite-difference perturbation leaves the covered regime. Among the 15 validated seeds, the regional-to-flow hypergradient relative gaps have minimum/median/maximum 0.00189/0.0647/0.2500; two seeds have component-sign disagreements and none changes the largest-magnitude group. These are conditional counts for this fixed controlled protocol, not estimates for modern networks.
For the predeclared seed-0, case and equal--norm weight steps of 0.005, all four tested proposals retain the reference itinerary. On the actual finite GD outer objective, the exact discrete-AD proposal has validation loss 0.2645315026, while the hybrid-flow proposal has 0.2645318411. On the hybrid-flow outer objective, their losses are 0.2645532177 and 0.2645529628, respectively. The order therefore switches with the differentiated object, but the absolute separations are only and . At radius 0.05, the itinerary changes, so the local derivative theorem no longer orders the finite proposals; this stress case is also retained.
Two-parameter residual-ReLU problem. The second study uses
with , and . This analytically prescribed trajectory has one verified event. The exact event time is 0.3, the event state is , the one-sided normal speeds are 1 and 1.9124409981, and . We use the same eight nonresonant step sizes as above. Each row stores the state, initialization Jacobian, moving-threshold sensitivity, event-aware counterparts, PyTorch reverse derivatives, centered finite differences, and forward–adjoint pairings. All independent checks meet the reported tolerances; the largest PyTorch discrepancy is , the largest discrete finite-difference discrepancy is , and the largest flow finite-difference discrepancy is . Continuous forward–adjoint agreement is within , while the independently implemented discrete event-aware reverse recurrence agrees with its forward counterpart within .
Identity-Hessian control. The two-bowl construction of Appendix I is retained as a mechanism-isolating control: , so all persistent discrepancy comes from the interface transfer rather than regional curvature. This exact construction is not used as the main learning realization.
Smoothing grid. The profile is , with normalized window . Both and use 25 logarithmically spaced values from to , giving 625 finite float64 cells and . Transfer is the product in (97), and error is . The truncation floor is approximately . Figure 5 is the fixed-profile heatmap associated with this scalar theorem. It illustrates the sufficient resolution condition; it does not define a universal phase boundary.
Two-parameter residual-ReLU ERM: state convergence with persistent derivative gaps

Figure 4: Matrix and parameter limits omit the same event. States approach the flow endpoints, while branchwise derivatives approach regional limits and remain separated from the flow derivatives; event-aware forward and adjoint calculations restore both.
Fixed-profile resolution map; dashed: sufficient contour

Figure 5: A fixed-profile smoothing resolution study. For the tanh profile and normalized window stated above, (a) shows the discrete tangent transfer and (b) its error to the saltation factor. The lightly marked contour is only the sufficient fixed-profile condition , not a necessary threshold. The theorem retains tail truncation and entry-phase dependence and makes no universality claim across smoothing families.
Artifact structure. The two main experiment directories contain complete CSV/JSON/NPZ arrays, configuration, seed, software versions, validation summary, editable SVG, and vector PDF. Their generating scripts copy the validated vector exports into the manuscript figure directory. No numerical value is recovered from a raster image.
P ADDITIONAL SCOPE AND EXCLUDED REGIMES
Multidimensional scope. The sharp-interface results are fully multidimensional. Tangential modes pass through an interface of a continuous piecewise-smooth loss unchanged, while the normal mode is multiplied by . Regional dynamics before and after an event may rotate and couple these modes, which is why the exact multiple-event criterion uses transported factors. The smoothing theorem is narrower: it extends directly only when the system admits an autonomous scalar normal coordinate with separately controlled tangential propagation. A general curved layer introduces tangential drift, a varying normal, noncommuting matrix cocycles, and flattening-curvature terms. No general curved-interface theorem is claimed.
Excluded regimes and rate qualifications. The sharp-interface and smoothing results retain the following restrictions.
-
Piecewise regularity gives the modulus estimate for ordinary AD; an sensitivity rate needs Lipschitz regional Hessians or an equivalent time-regularity assumption.
-
At an exact discrete interface landing, may not exist even though software AD returns a selected branch product.
-
Constants are nonuniform near grazing because event-time and saltation formulas contain .
-
Opposite-sign normal speeds can produce sliding or nonunique patched solutions. Simultaneous hits require a separate multi-surface analysis and cannot be assigned an arbitrary ordered saltation product.
-
Infinite or nonseparated event sequences invalidate the finite induction and finite-product perturbation arguments.
-
If is an event time, the fixed-time derivative may be one-sided or convention-dependent.
-
Multiple nonidentity event factors can cancel after transport; a switch count alone is not a mismatch criterion.
-
The identity requires ; in one dimension the norm is .
-
Positive-definite regional Hessians do not imply global convexity of a continuous nonsmooth loss.
-
The resolved smoothing theorem includes a tail term and does not make universal across profile families. Its sharp-first identity limit is directed through nonresonant step sizes.