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
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.
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
- 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
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.
Referee Report
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)
- [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.
- [§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.
- [§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
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
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
axioms (1)
- domain assumption Affine layers and componentwise activations admit exact dual extensions that propagate directional derivatives without truncation.
Reference graph
Works this paper leans on
-
[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
work page 2017
-
[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
work page 2019
-
[3]
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
work page 2023
-
[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
work page 2024
-
[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
work page 2020
-
[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
work page 2020
-
[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
work page 2018
-
[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
work page 1986
-
[9]
I. Goodfellow, Y . Bengio, and A. Courville,Deep Learning. MIT Press, 2016
work page 2016
-
[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
work page 2019
-
[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
work page 2016
-
[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
work page 2023
-
[13]
H. Kopetz and W. Steiner,Real-Time Systems: Design Principles for Distributed Embedded Applications, 3rd ed. Springer Nature, 2022
work page 2022
-
[14]
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
work page 2018
-
[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
work page 2019
-
[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
work page 2008
-
[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
work page 2010
-
[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]
A. Griewank and A. Walther,Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation, 2nd ed. SIAM, 2008
work page 2008
-
[20]
H. K. Khalil,Nonlinear Systems, 3rd ed. Prentice Hall, 2002
work page 2002
-
[21]
O. Bottema and B. Roth,Theoretical Kinematics. New York: Dover Publications, 1990
work page 1990
-
[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
work page 2022
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.