pith. sign in

arxiv: 2604.23995 · v1 · submitted 2026-04-27 · 📡 eess.SY · cs.SY· math.DS· math.RA

Extracting Exact Lie Derivatives Without Backpropagation: A Dual Compiler for Neural Control Barrier Functions

Pith reviewed 2026-05-08 02:10 UTC · model grok-4.3

classification 📡 eess.SY cs.SYmath.DSmath.RA
keywords neural control barrier functionsLie derivativesdual numbersforward differentiationembedded control systemssafety-critical systemsautomatic differentiation alternatives
0
0 comments X

The pith

Encoding system vector fields as dual numbers allows exact Lie derivatives to be computed by forward propagation through neural networks.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The paper establishes that neural control barrier functions can have their exact Lie derivatives extracted using a dual-algebraic extension of the network layers, computed entirely in the forward direction. This approach avoids constructing dynamic computational graphs required by backpropagation, which is problematic for memory and timing analysis on embedded hardware. By treating the state as the real part and the vector field as the dual part of dual numbers, the method propagates directional derivatives exactly for affine layers and componentwise activations. A compiler then translates the trained network into efficient C++ code suitable for microcontrollers.

Core claim

Every affine and componentwise-activation layer admits a dual extension that propagates the exact directional derivative alongside the activation, and the composed dual-extended network evaluates the exact Jacobian-vector-field product with zero truncation error.

What carries the argument

The dual extension of network layers, where each layer is extended to operate on dual numbers encoding both the value and its directional derivative.

If this is right

  • Dynamic graph allocation is eliminated, enabling static memory buffers.
  • Closed-form expressions for floating-point operations and memory footprint allow precise worst-case analysis.
  • Second-order Lie derivatives for relative-degree-two barriers can be computed using hyper-dual arithmetic.
  • Trained neural CBFs can be compiled to self-contained C++ headers for direct execution on hardware like ESP32-S3.
  • Sub-millisecond cycle times support kilohertz-rate safety filters.

Where Pith is reading between the lines

These are editorial extensions of the paper, not claims the author makes directly.

  • This method could extend to other real-time control applications requiring gradient information without backpropagation overhead.
  • Future hardware implementations might integrate this dual compilation directly into neural network accelerators for safety-critical systems.
  • The zero-truncation-error property suggests potential for formal verification of the computed derivatives in safety proofs.

Load-bearing premise

The neural network consists only of affine layers and componentwise activations, with the system vector field known and encodable in the dual part.

What would settle it

Compare the Lie derivative computed by the dual network against the result from symbolic differentiation or high-precision numerical methods on a sample neural CBF; exact match within floating-point precision would support the claim.

Figures

Figures reproduced from arXiv: 2604.23995 by Mohammadreza Kamaldar.

Figure 1
Figure 1. Figure 1: Architectural comparison of gradient extraction mechanisms. view at source ↗
Figure 2
Figure 2. Figure 2: Phase portrait of the Van der Pol (VdP) oscillator under the neural CBF view at source ↗
Figure 3
Figure 3. Figure 3: Hardware profiling on the ESP32-S3 target (Xtensa LX7 at 240 MHz, single core, no OS) over 1000 iterations of randomly sampled states. view at source ↗
read the original abstract

Deploying neural-network control barrier functions (CBFs) on embedded hardware requires evaluating the barrier value and its Lie derivatives along the system vector fields at every control cycle. The standard mechanism for exact gradient extraction, reverse-mode automatic differentiation, constructs a dynamic computational graph whose memory footprint grows with network depth and whose backward traversal obstructs the worst-case execution time analysis required for safety-critical certification. This paper presents a dual-algebraic compiler that extracts the exact barrier value and its Lie derivatives through forward network evaluation alone. Encoding the system state as the real part of a dual number and a target vector field as the dual part, we prove that every affine and componentwise-activation layer admits a dual extension that propagates the exact directional derivative alongside the activation, and that the composed dual-extended network evaluates the exact Jacobian--vector-field product with zero truncation error. We derive closed-form expressions for the dual-pass floating-point operation count and peak memory footprint, prove that the proposed algorithm eliminates dynamic graph allocation, and extend the framework to the second-order Lie derivatives required by relative-degree-two CBFs using hyper-dual arithmetic. An open-source ahead-of-time compiler translates trained neural CBFs into self-contained C++ headers that assemble the complete safety constraint on an ESP32-S3 microcontroller from a statically allocated buffer, with zero dynamic memory allocation and a sub-millisecond cycle budget that supports kilohertz-rate safety filters.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

0 major / 3 minor

Summary. The paper introduces a dual-algebraic compiler for neural control barrier functions that computes the exact barrier value and its Lie derivatives (Jacobian-vector-field products) via a single forward pass. By representing the state in the real part and the vector field in the dual part of dual numbers, it defines dual extensions for affine layers and componentwise activations that propagate exact directional derivatives with zero truncation error, leveraging ring homomorphism properties. The framework extends to hyper-dual numbers for second-order Lie derivatives, derives closed-form operation counts and memory bounds, proves elimination of dynamic graph allocation, and includes an ahead-of-time compiler producing self-contained C++ code for embedded platforms such as the ESP32-S3 with static allocation and sub-millisecond execution.

Significance. If the algebraic claims hold, the result is significant for safety-critical embedded control: it replaces reverse-mode AD (with its memory growth and WCET obstacles) by an exact, forward-only method whose complexity is independent of backpropagation. Explicit credit is due for the parameter-free exactness under the stated assumptions, the closed-form flop/memory analysis, the hyper-dual extension, and the open-source AOT compiler that delivers statically allocated, certifiable code. These elements directly address practical deployment barriers for neural CBFs on resource-constrained hardware.

minor comments (3)
  1. [Abstract] Abstract: the phrase 'every affine and componentwise-activation layer' is central to the exactness claim; repeating the assumption explicitly when stating 'zero truncation error' would prevent misreading by readers who expect general nonlinear layers.
  2. [§3 (Compiler and Complexity)] The manuscript states that closed-form expressions for dual-pass floating-point operation count and peak memory are derived, yet the explicit formulas are not reproduced in the sections describing the compiler; placing them in a dedicated lemma or table would strengthen the reproducibility of the complexity claims.
  3. [§4 (Higher-Order Extensions)] The extension to hyper-dual arithmetic for relative-degree-two CBFs is sketched; a short explicit statement of how the second dual part encodes the Lie derivative of the vector field itself would clarify the construction for readers unfamiliar with higher-order dual numbers.

Simulated Author's Rebuttal

0 responses · 0 unresolved

We thank the referee for the positive and accurate summary of our manuscript, which correctly highlights the dual-algebraic compiler, exact Lie derivative extraction via forward passes, closed-form complexity bounds, hyper-dual extension, and the AOT C++ compiler for embedded deployment. We appreciate the recommendation for minor revision.

Circularity Check

0 steps flagged

No significant circularity; derivation is algebraic identity from dual-number ring homomorphism

full rationale

The paper proves that dual extensions of affine layers and componentwise activations compute exact directional derivatives by direct application of dual-number arithmetic (addition, multiplication, and chain rule). This is a first-principles algebraic identity under the stated assumptions (affine + componentwise layers, known vector field), with no fitted parameters renamed as predictions, no self-citation load-bearing the central claim, and no ansatz smuggled in. The result is self-contained against external benchmarks of dual-number calculus and does not reduce to its inputs by construction.

Axiom & Free-Parameter Ledger

0 free parameters · 1 axioms · 0 invented entities

The central claim rests on the algebraic closure properties of dual numbers under affine and componentwise operations; no free parameters or invented entities are introduced.

axioms (1)
  • domain assumption Affine layers and componentwise activations admit exact dual extensions that propagate directional derivatives without truncation.
    Invoked to guarantee zero-error Jacobian-vector products for the composed network.

pith-pipeline@v0.9.0 · 5559 in / 1201 out tokens · 25353 ms · 2026-05-08T02:10:16.545593+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

22 extracted references · 22 canonical work pages

  1. [1]

    Control barrier function based quadratic programs for safety critical systems,

    A. D. Ames, X. Xu, J. W. Grizzle, and P. Tabuada, “Control barrier function based quadratic programs for safety critical systems,”IEEE Trans. Autom. Contr ., vol. 62, no. 8, pp. 3861–3876, 2017

  2. [2]

    Control barrier functions: Theory and applications,

    A. D. Ames, S. Coogan, M. Egerstedt, G. Notomista, K. Sreenath, and P. Tabuada, “Control barrier functions: Theory and applications,” inProc. Europ. Contr . Conf., 2019, pp. 3420–3431

  3. [3]

    Safe control with learned certificates: A survey of neural Lyapunov, barrier, and contraction methods,

    C. Dawson, S. Gao, and C. Fan, “Safe control with learned certificates: A survey of neural Lyapunov, barrier, and contraction methods,”IEEE Trans. on Robotics, vol. 39, no. 3, pp. 1749–1767, 2023

  4. [4]

    How to train your neural control barrier function,

    O. Soet al., “How to train your neural control barrier function,” inProc. IEEE Int. Conf. on Robotics Autom., 2024, pp. 11 532–11 539

  5. [5]

    Learning control barrier functions from expert demonstrations,

    A. Robey, H. Hu, L. Lindemann, H. Zhang, D. V . Dimarogonas, S. Tu, and N. Matni, “Learning control barrier functions from expert demonstrations,”Proc. IEEE Conf. Dec. Contr ., pp. 3717–3724, 2020

  6. [6]

    Learning for safety- critical control with control barrier functions,

    A. Taylor, A. Singletary, Y . Yue, and A. Ames, “Learning for safety- critical control with control barrier functions,” inProc. Conf. Robot Learning, 2020, pp. 708–717

  7. [7]

    Automatic differentiation in machine learning: A survey,

    A. G. Baydin, B. A. Pearlmutter, A. A. Radul, and J. M. Siskind, “Automatic differentiation in machine learning: A survey,”J. Machine Learning Research, vol. 18, no. 153, pp. 1–43, 2018

  8. [8]

    Learning repre- sentations by back-propagating errors,

    D. E. Rumelhart, G. E. Hinton, and R. J. Williams, “Learning repre- sentations by back-propagating errors,”Nature, vol. 323, pp. 533–536, 1986

  9. [9]

    Goodfellow, Y

    I. Goodfellow, Y . Bengio, and A. Courville,Deep Learning. MIT Press, 2016

  10. [10]

    Pytorch: An imperative style, high-performance deep learning library,

    A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antigaet al., “Pytorch: An imperative style, high-performance deep learning library,” inAdvances in Neural Information Processing Systems, 2019, vol. 32

  11. [11]

    Tensorflow: A system for large-scale machine learning,

    M. Abadi, P. Barham, J. Chen, Z. Chen, A. Davis, J. Dean, M. Devin, S. Ghemawat, G. Irving, M. Isardet al., “Tensorflow: A system for large-scale machine learning,” in12th USENIX Symposium on Operating Systems Design and Implementation, 2016, pp. 265–283

  12. [12]

    Buttazzo,Hard Real-Time Computing Systems: Predictable Schedul- ing Algorithms and Applications

    G. Buttazzo,Hard Real-Time Computing Systems: Predictable Schedul- ing Algorithms and Applications. Springer Nature, 2023

  13. [13]

    Kopetz and W

    H. Kopetz and W. Steiner,Real-Time Systems: Design Principles for Distributed Embedded Applications, 3rd ed. Springer Nature, 2022

  14. [14]

    The misra c coding standard and its role in the development and analysis of safety-and security- critical embedded software,

    R. Bagnara, A. Bagnara, and P. M. Hill, “The misra c coding standard and its role in the development and analysis of safety-and security- critical embedded software,” inInt. Static Analysis Symposium, 2018, pp. 5–23

  15. [15]

    Overview of the second edition of ISO 26262: Functional safety—road vehicles,

    R. Debouk, “Overview of the second edition of ISO 26262: Functional safety—road vehicles,”J. System Safety, vol. 55, no. 1, pp. 13–21, 2019

  16. [16]

    The worst-case execution-time problem—overview of methods and survey of tools,

    R. Wilhelm, J. Engblom, A. Ermedahl, N. Holsti, S. Stephan, D. Lundqvist, F. Mueller, A. Puigjaner, F. Stappert, and P. Stenström, “The worst-case execution-time problem—overview of methods and survey of tools,”ACM Transactions on Embedded Computing Systems, vol. 7, no. 3, pp. 1–53, 2008

  17. [17]

    Predictability considerations in the design of multi-core embedded systems,

    C. Cullmann, C. Ferdinand, G. Gebhard, D. Grund, C. Maiza, J. Reineke, B. Triquet, and R. Wilhelm, “Predictability considerations in the design of multi-core embedded systems,”Proc. Embedded Real Time Software and Systems, vol. 36, p. 42, 2010. 12

  18. [18]

    Preliminary sketch of biquaternions,

    W. K. Clifford, “Preliminary sketch of biquaternions,”Proceedings of the London Mathematical Society, vol. s1-4, no. 1, pp. 381–395, 1871

  19. [19]

    Griewank and A

    A. Griewank and A. Walther,Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation, 2nd ed. SIAM, 2008

  20. [20]

    H. K. Khalil,Nonlinear Systems, 3rd ed. Prentice Hall, 2002

  21. [21]

    Bottema and B

    O. Bottema and B. Roth,Theoretical Kinematics. New York: Dover Publications, 1990

  22. [22]

    High-order control barrier functions,

    W. Xiao and C. Belta, “High-order control barrier functions,”IEEE Trans. Autom. Contr ., vol. 67, no. 7, pp. 3655–3662, 2022