Integrating Physics and Topology in Neural Networks for Learning Rigid Body Dynamics

Anlei Wei, Olga Fink · DOI

Abstract

Rigid body interactions are fundamental to numerous scientific disciplines, but remain challenging to simulate due to their abrupt nonlinear nature and sensitivity to complex, often unknown environmental factors. These challenges call for adaptable learning-based methods capable of capturing complex interactions beyond explicit physical models and simulations. While graph neural networks can handle simple scenarios, they struggle with complex scenes and long-term predictions. We introduce a novel framework for modeling rigid body dynamics and learning collision interactions, addressing key limitations of existing graph-based methods. Our approach extends the traditional representation of meshes by incorporating higher-order topology complexes, offering a physically consistent representation. Additionally, we propose a physics-informed message-passing neural architecture, embedding physical laws directly in the model. Our method demonstrates superior accuracy, even during long rollouts, and exhibits strong generalization to unseen scenarios. Importantly, this work addresses the challenge of multi-entity dynamic interactions, with applications spanning diverse scientific and engineering domains.

Introduction

Simulating the dynamics of rigid bodies—how they bounce, slide, and collide—is a cornerstone of robotics, computer graphics, and virtual reality. While traditional physics engines like MuJoCo or PhysX are highly effective, they rely on precise knowledge of physical parameters such as friction, mass, and environmental conditions. In real-world scenarios where these parameters are unknown, Graph Neural Networks (GNNs) have emerged as a powerful alternative.

However, standard GNNs suffer from a "representation gap." By treating objects merely as collections of nodes and edges, they often fail to capture the structural integrity of the mesh or the global identity of the object. This leads to physical inconsistencies, as energy transfer during collisions is not modeled through a center of mass, and poor long-term accuracy, where small errors accumulate, causing objects to deform or drift unrealistically over time.

Methodology: The HOPNet Framework

To address these limitations, we propose HOPNet (Higher-Order topological Physics-informed Network). HOPNet introduces two core innovations: a hierarchical topological representation and a physics-constrained message-passing architecture.

Combinatorial Complexes (CC)

Instead of a flat graph, HOPNet represents the environment using Combinatorial Complexes. This structure organizes the scene into a hierarchy of "cells": nodes ($X^0$), edges ($X^1$), mesh triangles/faces ($X^2$), collision contacts ($X^3$), and entire objects ($X^4$). This hierarchy preserves the geometric integrity of individual meshes and the distinct identity of each object in the scene.

Comparison between a standard graph representation (left) and the proposed Combinatorial Complex hierarchy (right), showing the different cell orders from nodes to entire objects.

Physics-Informed Message Passing

HOPNet employs a sequential message-passing strategy inspired by Newtonian mechanics. Rather than indiscriminate information flow, the network processes data in four distinct parts:

  1. Part A: Enhances face embeddings ($X^2$) with local node and edge data.
  2. Part B: Specifically processes inter-object collisions through the collision cells ($X^3$).
  3. Part C: Updates the global state of the entire object ($X^4$) and its constituent nodes ($X^0$).
  4. Part D: Predicts accelerations and the next pose.
The HOPNet architecture diagram showing the four-part message passing flow (A-D) between different topological cell levels to predict object dynamics.

To maintain rigidity over long simulations, the model incorporates a deterministic shape matching step. This ensures that predicted node positions are constrained to a rigid transformation (rotation and translation) of the original object shape.

Experimental Evaluation

We evaluated HOPNet on the MOVi (Multi-Object Video) datasets, which range from simple spheres to complex, high-resolution 3D scans of household items (averaging nearly 8,000 nodes per object).

Key Results and Generalization

HOPNet demonstrated significant improvements over state-of-the-art baselines like FIGNet and MeshGraphNet. On the MOVi-A dataset, it achieved a 50% longer "rollout horizon" before reaching the same error threshold as the best baseline.

A critical finding is the model's ability to generalize. A HOPNet model trained only on simple spheres performed exceptionally well on complex real-world objects. This suggests that the higher-order topology allows the network to learn universal physical principles of face-to-face collisions rather than memorizing specific geometries. Furthermore, when moving from MOVi-A to the more complex MOVi-B dataset, HOPNet's error increased by only 1.85%, whereas a top baseline's error jumped by 117%.

Discussion and Future Work

The inclusion of an "object-level" cell ($X^4$) allows information to traverse an entire object in a single step, preventing the "over-smoothing" common in deep GNNs. This hierarchical approach also enables counterfactual reasoning, such as predicting trajectories correctly even if an object is removed from the scene mid-simulation.

While HOPNet is robust and efficient—maintaining performance even with a 74% reduction in parameters—scaling to meshes with millions of faces remains a challenge. Future work will explore mesh simplification techniques and "system identification" to learn hidden properties like friction directly from visual data. Additionally, extending the framework to handle deformable bodies like cloth or fluids is a promising research direction.

Summary updated

BibTeX
@inproceedings{wei2025integrating,
  author = {Anlei Wei and Olga Fink},
  title = {{Integrating Physics and Topology in Neural Networks for Learning Rigid Body Dynamics}},
  booktitle = {Nature Communications},
  year = {2025},
  doi = {10.1038/s41467-025-62250-7},
}
Figure