Table of Contents
Fetching ...

Elastic Locomotion with Mixed Second-order Differentiation

Siyuan Shen, Tianjia Shao, Kun Zhou, Chenfanfu Jiang, Sheldon Andrews, Victor Zordan, Yin Yang

TL;DR

The paper addresses the difficulty of animating high-resolution soft bodies under complex contact by formulating elastic locomotion as an inverse simulation that solves for muscle activations to meet high-level targets. It introduces a mixed differentiation framework (CSFD-AD) that combines reverse automatic differentiation with complex-step finite differences to efficiently compute first- and second-order derivatives (the Hessian) of a barrier-based loss, enabling robust Newton-based optimization. An interior-point barrier approach handles wide-area contacts, enabling stable, high-dimensional optimization that outperforms gradient-based and LCP-based methods on diverse tasks. The results validate the method across crawling, jumping, walking, and rolling scenarios, demonstrating strong convergence, scalability to many contact points, and broad applicability to differentiable simulation of soft-body locomotion.

Abstract

We present a framework of elastic locomotion, which allows users to enliven an elastic body to produce interesting locomotion by prescribing its high-level kinematics. We formulate this problem as an inverse simulation problem and seek the optimal muscle activations to drive the body to complete the desired actions. We employ the interior-point method to model wide-area contacts between the body and the environment with logarithmic barrier penalties. The core of our framework is a mixed second-order differentiation algorithm. By combining both analytic differentiation and numerical differentiation modalities, a general-purpose second-order differentiation scheme is made possible. Specifically, we augment complex-step finite difference (CSFD) with reverse automatic differentiation (AD). We treat AD as a generic function, mapping a computing procedure to its derivative w.r.t. output loss, and promote CSFD along the AD computation. To this end, we carefully implement all the arithmetics used in elastic locomotion, from elementary functions to linear algebra and matrix operation for CSFD promotion. With this novel differentiation tool, elastic locomotion can directly exploit Newton's method and use its strong second-order convergence to find the needed activations at muscle fibers. This is not possible with existing first-order inverse or differentiable simulation techniques. We showcase a wide range of interesting locomotions of soft bodies and creatures to validate our method.

Elastic Locomotion with Mixed Second-order Differentiation

TL;DR

The paper addresses the difficulty of animating high-resolution soft bodies under complex contact by formulating elastic locomotion as an inverse simulation that solves for muscle activations to meet high-level targets. It introduces a mixed differentiation framework (CSFD-AD) that combines reverse automatic differentiation with complex-step finite differences to efficiently compute first- and second-order derivatives (the Hessian) of a barrier-based loss, enabling robust Newton-based optimization. An interior-point barrier approach handles wide-area contacts, enabling stable, high-dimensional optimization that outperforms gradient-based and LCP-based methods on diverse tasks. The results validate the method across crawling, jumping, walking, and rolling scenarios, demonstrating strong convergence, scalability to many contact points, and broad applicability to differentiable simulation of soft-body locomotion.

Abstract

We present a framework of elastic locomotion, which allows users to enliven an elastic body to produce interesting locomotion by prescribing its high-level kinematics. We formulate this problem as an inverse simulation problem and seek the optimal muscle activations to drive the body to complete the desired actions. We employ the interior-point method to model wide-area contacts between the body and the environment with logarithmic barrier penalties. The core of our framework is a mixed second-order differentiation algorithm. By combining both analytic differentiation and numerical differentiation modalities, a general-purpose second-order differentiation scheme is made possible. Specifically, we augment complex-step finite difference (CSFD) with reverse automatic differentiation (AD). We treat AD as a generic function, mapping a computing procedure to its derivative w.r.t. output loss, and promote CSFD along the AD computation. To this end, we carefully implement all the arithmetics used in elastic locomotion, from elementary functions to linear algebra and matrix operation for CSFD promotion. With this novel differentiation tool, elastic locomotion can directly exploit Newton's method and use its strong second-order convergence to find the needed activations at muscle fibers. This is not possible with existing first-order inverse or differentiable simulation techniques. We showcase a wide range of interesting locomotions of soft bodies and creatures to validate our method.
Paper Structure (30 sections, 27 equations, 13 figures, 2 tables)

This paper contains 30 sections, 27 equations, 13 figures, 2 tables.

Figures (13)

  • Figure 1: An overview of our computational pipeline. Elastic locomotion solves an inverse simulation problem. The user specifies high-level kinematic targets the body expects to achieve, which is formulated as a scalar-value loss function combining the target function and regularization terms. We use classic line-search Newton to solve this problem. The Hessian of the loss function is obtained by our mixed second-order differentiation scheme, which combines CSFD and AD to efficiently calculate contact-in-the-loop loss Hessian.
  • Figure 2: Muscle arrangement. We highlight the arrangement of muscles in some examples reported in the paper. We assume the muscle setup is provided.
  • Figure 3: CSFD-AD procedure. We show an illustrative example of using CSFD-AD to compute the self inner product of a 3-vector $\bm{x}$: $f=\bm{x} \cdot \bm{x}$.
  • Figure 4: Convergence curves under different combinations of losses. We compare the convergence performance using gradient descent hu2019difftaichi, quasi-Newton (L-BFGS) du2021diffpdhuang2022differentiable, and full Newton (our method) at some representative frames of different elastic locomotions and combinations of loss functions. Newton's method consistently outperforms other optimization algorithms after a proper warm start. If the body does not undertake extensive collisions (e.g., the third and fourth plots), L-BFGS also yields good convergence.
  • Figure 5: Comparison with gradient descent. An I-shaped soft-body player tries to "shoot" a ball into a basket under user-specific trajectory. Gradient descent fails to converge the loss sufficiently, while the soft-body player always secures the score with Newton's method (ours).
  • ...and 8 more figures