The Floor
Preprint reports lower instruction counts for robot dynamics derivatives
Researchers propose analytical algorithms for contracted derivatives of multibody dynamics. In tests on serial-chain models, they report fewer computational-graph instructions than the comparison methods.

Researchers report that analytical algorithms for calculating contracted robot-dynamics derivatives required fewer computational-graph instructions than the methods they compared them with on serial-chain models. The finding comes from a preprint on multibody inverse and forward dynamics, rather than a reported timing benchmark.
Source arxiv.org
The preprint was submitted to arXiv on December 2 by Horea-Alexandru Cărămizaru, Shuli Wang, Carlos Mastalli and Michael Mistry. It presents algorithms for contracted first- and second-order derivatives and compares them with automatic differentiation and other formulations.
Computing less of the derivative
Derivatives of robot dynamics are evaluated repeatedly in optimization applications including optimal control, state estimation and system identification, the paper explains. Some downstream algorithms need a contracted derivative rather than the complete derivative: contraction combines derivative information in a specified direction and can avoid constructing information the algorithm does not use.
For a vector-valued dynamics map, the complete second-order derivative contains a Hessian for every output. The paper describes differential dynamic programming as an example that uses second-order dynamics terms contracted with a value-function gradient, producing a matrix rather than the full third-order tensor.
The proposed inverse-dynamics approach embeds contraction in the rigid-body derivative recursion. The researchers derive a reverse-mode algorithm for the contracted first-order derivative and extend it to second order, using spatial-algebra identities to avoid constructing costly intermediate derivative operators.
The authors also derive two formulations for contracted second-order forward-dynamics derivatives. Both use the contracted inverse-dynamics derivatives and first-order forward-dynamics derivatives, but have different computational characteristics.
Comparison on model chains
The team evaluated serial-chain multibody models ranging from 2 to 50 degrees of freedom. Its measure was the number of computational-graph instructions needed to evaluate each algorithm, with all methods implemented in CasADi v3.7.2; Pinocchio v3.8.0 was used for model parsing and numerical validation.
The researchers report that all analytical derivatives matched the CasADi automatic-differentiation reference with an absolute Frobenius error below 10-9. The comparison included successive automatic-differentiation operations, CasADi's dedicated Hessian implementation, previously derived analytical formulations, and calculation of a full derivative followed by contraction.
The tests also considered common-subexpression elimination, a graph optimization that identifies and shares repeated expressions. According to the paper, it substantially narrowed the instruction-count gap for several generic automatic-differentiation constructions, while having comparatively little effect on the dedicated Hessian formulations.
Two routes to forward dynamics
For second-order forward dynamics, the paper reports that the direct analytical formulation required the fewest instructions over the investigated range, despite cubic asymptotic complexity. The other proposed formulation retains quadratic complexity but has higher overhead; the authors consider it more suitable for sufficiently large systems.
The paper attributes the inverse-dynamics gains to both algebraic reformulation and graph-level redundancy elimination. In the analytical derivation, contraction is incorporated before certain intermediate derivatives are formed; graph optimization can remove repeated expressions in the resulting computation, but does not recover those analytical reformulations.
Sources
- Original source · Preprint arXiv “Contracted Derivatives for Multibody Dynamics: Analysis and Optimization” arXiv:2612.03114