Differentiable solver for time-dependent deformation problems with contact

Zizhou Huang, Davi Colli Tozoni, Arvi Gjoka, Zachary Ferguson, Teseo Schneider, Daniele Panozzo, Denis ZorinarXiv 2022 · DOI

TL;DR

This paper introduces a highly general, robust, and efficient differentiable solver for static and dynamic deformation problems involving complex contact and friction. By combining a high-order finite element method (FEM) with the Incremental Potential Contact (IPC) framework and an analytically derived adjoint formulation, the solver can compute gradients with respect to shape, material properties, friction, and initial conditions with less than 10% computational overhead.

What Problem Does This Paper Address?

Differentiable physical simulators are critical for solving inverse problems in robotics, graphics, and engineering—such as optimizing the shape of a structural component to minimize stress or finding the exact initial velocity needed to throw an object into a target location.

However, creating a differentiable solver that handles deformable objects undergoing frictional contact is notoriously difficult. Contact forces are inherently non-smooth (objects suddenly touch or separate), which makes computing gradients mathematically unstable. To get around this, previous differentiable simulators often introduced severe simplifications: restricting contact to flat planes or rigid obstacles, ignoring self-collisions, or limiting optimization to material parameters while completely forbidding shape changes. This paper tackles these limitations head-on, providing a general framework that supports arbitrary geometries, self-collisions, and full differentiability across all physical parameters.

Methods

The authors build their solver on top of the open-source PolyFEM library, integrating several key components:

  1. High-Order Discretization: It uses arbitrary-order Lagrangian finite elements in space and Backward Differentiation Formulas (BDF) in time to ensure high accuracy for non-linear elasticity models.
  2. Incremental Potential Contact (IPC): Instead of traditional hard constraints or tuning-heavy penalty forces, contact and friction are handled via a smooth, barrier-based potential. This guarantees intersection-free and inversion-free states at every timestep, while its smoothness makes it naturally amenable to differentiation.
  3. Analytic Adjoint Method: Rather than relying on Automatic Differentiation (AD)—which can be incredibly slow and memory-intensive when tracking gradients through complex linear solvers and collision loops—the authors analytically derive the adjoint equations for the general BDF time-integration scheme. This allows them to compute exact parametric gradients by solving just one additional linear system per timestep, heavily reusing factorizations from the forward simulation.
  4. Shape Derivative Calculus: To support shape optimization, the solver computes derivatives directly on the physical domain rather than a fixed reference domain. This key choice allows the system to perform dynamic remeshing during the optimization process to maintain element quality without breaking gradient convergence.
An example of the solver optimizing the initial velocity of a yellow bunny to push a blue bunny into a target marker circle.

Datasets

The paper does not use standard machine learning datasets. Instead, the method is evaluated on a diverse suite of simulated engineering and physics scenarios, alongside real-world physical validation:

  • Simulated Benchmarks: 3D beams, interlocking parts, a hanger, a sliding/bouncing ball, colliding tentacles, and complex micro-structures.
  • Physical Validation: The authors fabricated optimized designs (like a 2D hook and a bouncing silicone ball) using 3D-printed PLA molds and silicone rubber to verify that the solver's optimized parameters successfully transfer to reality.

Key Insights and Ideas

  • The Power of Smooth Contact (IPC): Traditional contact formulations introduce discontinuities that break gradient-based optimization. By leveraging IPC's smooth barrier functions, the solver avoids these "gradient cliffs," allowing standard optimization algorithms like L-BFGS to converge reliably.
  • "Optimize-then-Discretize" for Remeshing: In shape optimization, changing an object's geometry can severely distort the underlying simulation mesh. By using shape derivative calculus on the physical domain, the authors can remesh the interior of an object mid-optimization. Because the objective functions depend on domain or boundary integrals rather than individual node positions, remeshing introduces negligible error, as illustrated in the paper's mesh quality analysis.
An example of interior remeshing during shape optimization to maintain high element quality.
  • Massive Speedups over AD: Analytically deriving the local assembly of the elastic force vector for the adjoint equations avoids the massive computational overhead of generic AD frameworks, making the gradient pass practically "free."

Key Results

  • Minimal Computational Overhead: For non-linear, time-dependent problems, computing the gradients adds at most 10% overhead to the cost of the forward simulation.
  • Efficiency vs. Alternatives: Compared to a standard finite difference baseline, which requires running the forward simulation $2n$ times (where $n$ is the parameter dimension), the adjoint method is orders of magnitude faster. For instance, in a shock protection optimization problem with 24 parameters, finite differences took over 63,000 seconds, while the proposed adjoint method took only 131.8 seconds.
  • Robustness vs. Existing Simulators: The solver was compared against state-of-the-art differentiable simulators like DiffPD and GradSim. While GradSim encountered NaN errors due to semi-implicit time integration instabilities in complex contact scenarios, and DiffPD suffered from unphysical self-intersections due to a lack of self-collision handling, the proposed solver consistently produced physically valid, intersection-free results.

Limitations and Future Work

Despite its generality, the solver has a few limitations:

  • Material Restrictions: It currently only supports hyper-elastic and visco-elastic volumetric materials. It does not yet support thin shells (like cloth), plastic deformation, or fluids.
  • No Rigid/Articulated Bodies: Rigid objects must be approximated using very high material stiffness, which significantly slows down the implicit linear solvers.
  • Forward Pass Speed: Because it prioritizes robustness and physical correctness (guaranteeing no intersections), its forward simulation is slower than highly optimized, specialized solvers (like DiffPD) in simple, contact-light scenes.

Future directions include adding support for periodic boundary conditions (crucial for metamaterial design), integrating true rigid body dynamics within the IPC framework, and exploring proxy geometries to accelerate collision handling where high precision isn't required.

Summary updated

BibTeX
@misc{huang2022differentiable,
  author = {Zizhou Huang and Davi Colli Tozoni and Arvi Gjoka and Zachary Ferguson and Teseo Schneider and Daniele Panozzo and Denis Zorin},
  title = {{Differentiable solver for time-dependent deformation problems with contact}},
  year = {2022},
  eprint = {2205.13643},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.13643},
}
Figure