Abstract
In this paper we introduce Smooth Particle Networks (SPNets), a framework for integrating fluid dynamics with deep networks. SPNets adds two new layers to the neural network toolbox: ConvSP and ConvSDF, which enable computing physical interactions with unordered particle sets. We use these layers in combination with standard neural network layers to directly implement fluid dynamics inside a deep network, where the parameters of the network are the fluid parameters themselves (e.g., viscosity, cohesion, etc.). Because SPNets are implemented as a neural network, the resulting fluid dynamics are fully differentiable. We then show how this can be successfully used to learn fluid parameters from data, perform liquid control tasks, and learn policies to manipulate liquids.
Introduction: The Challenge of Fluid Representation
Liquids present a significant hurdle for robotics and deep learning. Unlike rigid bodies, fluids are highly unstructured and deformable, making it difficult to represent their state in a way that neural networks can effectively process. Traditional high-fidelity fluid simulators often operate as "black boxes"—while they can simulate forward motion accurately, they do not provide the gradients necessary for standard optimization techniques. This lack of differentiability prevents researchers from using backpropagation to infer physical parameters or optimize complex control policies for liquid manipulation.
SPNets addresses this gap by providing a particle-based fluid dynamics model that is fully integrated into the deep learning ecosystem as a differentiable graph.
Methods: Physics as a Differentiable Layer
The core innovation of SPNets is the implementation of the Position Based Fluids (PBF) algorithm as a series of neural network layers. This approach allows the network to leverage the "inductive bias" of analytical physics rather than attempting to learn fluid behavior from scratch.
Two specialized layers are introduced to handle particle interactions:
- ConvSP (Smooth Particle Convolution): This layer computes particle-particle interactions using a smoothing kernel. It allows the network to calculate properties like density, pressure, and viscosity by aggregating information from a particle's neighbors.
- ConvSDF (Signed Distance Function Convolution): This layer manages interactions between particles and static rigid objects. By utilizing Signed Distance Functions, the network can differentiably resolve collisions, "pushing" particles out of solid boundaries.
By chaining these layers, the entire simulation becomes a differentiable function. A loss calculated at the end of a simulation (e.g., the amount of liquid spilled) can be backpropagated to adjust input actions or internal fluid parameters.
Datasets and Evaluation
The framework was evaluated using both synthetic and real-world data:
- Synthetic Data: The authors used Nvidia FleX to generate ground-truth particle data for various scenarios, such as a ladle scooping and pouring liquid. This allowed for precise testing of system identification (recovering viscosity and cohesion).
- Real-World Data: Twelve pouring sequences were recorded using a physical robot. To obtain ground-truth liquid locations, a thermographic camera tracked heated water, providing pixel-level labels for evaluation.
Key Insights: Learning from Silhouettes
A significant finding is that SPNets can recover 3D fluid parameters using only 2D camera projections. The "silhouette" of a liquid during a pour provides sufficient information for the analytical gradients to converge on the correct underlying physics.
Furthermore, the differentiability of the model transforms control tasks into optimization problems. For instance, achieving a specific pour weight involves defining a target state and using gradients to find the optimal cup trajectory. The paper also demonstrates "perception-in-the-loop," where a CNN processes RGB images to correct simulation drift in real-time, aligning the model's state with reality.
Key Results
- System Identification: SPNets successfully recovered ground-truth viscosity and cohesion parameters within a few hundred iterations.
- High-Precision Control: In a "Plate" task (tilting a plate to roll liquid into bowls), the system achieved near 100% success. In a "Catching" task, it captured over 98% of a moving liquid stream.
- Real-World Tracking: Integrating perception with SPNets improved the Intersection-over-Union (IOU) score from 36.1% (simulation only) to 56.8%.
- Efficiency: The system is computationally efficient, processing 9,000 particles in approximately 1/15th of a second on a Titan Xp GPU.
Limitations and Future Work
Current limitations include the assumption of a known initial state (volume and position) and a focus on incompressible liquids. Future research may extend SPNets to granular materials like sand or more complex multi-fluid interactions. Additionally, "residual learning"—using neural networks to bridge the gap between idealized PBF physics and real-world observations—remains a promising avenue for improving accuracy.
Summary updated