This demo is not yet supported on iPhone devices. Please use desktop/laptop or Android devices.
We introduce Neural Particle Automata (NPA), a Lagrangian generalization of Neural Cellular Automata (NCA) from static lattices to dynamic particle systems. Unlike classical Eulerian NCA where cells are fixed to pixels or voxels, NPA represent each cell as a particle with a continuous position and an internal state, both updated by a shared learnable neural rule. This particle-based formulation yields clear individuation of cells, allows heterogeneous dynamics, and focuses computation on regions where activity is present. However, particle systems introduce two challenges: neighborhoods are dynamic, and a naive implementation of local interactions scales quadratically with the number of particles. We address these issues by replacing grid-based perception with differentiable Smoothed Particle Hydrodynamics (SPH) operators, backed by memory-efficient CUDA kernels for scalable end-to-end training. Across tasks including morphogenesis, point-cloud classification, and particle-based texture synthesis, we show that NPA retain key NCA behaviors such as robustness and regeneration, while enabling new behaviors specific to particle systems. These results position NPA as a compact neural model for learning self-organizing particle systems.
SPH perception is the particle-based counterpart of convolutional perception in grid-based Neural Cellular Automata. Each particle \(i\) has a continuous position \(\mathbf{x}_i\) and an internal state \(\mathbf{S}_i\); instead of reading from fixed lattice neighbors, it aggregates nearby particles \(j\) inside a support radius \(\epsilon\) using smooth kernels. These local sums estimate quantities such as density \(\rho_i\), smoothed state \(\tilde{\mathbf{S}}_i\), density gradient \(\nabla\rho_i\), the moment matrix \(\mathbf{M}_i\), and 0th- or 1st-order state gradients. In Neural Particle Automata, these measurements form a compact local perception vector for a shared update rule, preserving the locality of NCA while allowing particles to live on irregular and dynamic configurations.
This demo visualizes those operators around the selected center particle. For clarity, particles live in 2D, all particle masses are set to \(m_i=1.0\), and each state has only three channels, shown as RGB color; the center particle's state is fixed to \((0,0,0)\). The dashed circle marks the \(\epsilon\)-neighborhood, and the bottom plots show the smoothing kernel \(W_\epsilon(r)\) and spiky gradient kernel's magnitude \(\|W_\epsilon^{\nabla}(r)\|\) as functions of distance \(|r|\), with dots indicating where particles fall along those kernels. Density and count display scalar neighborhood summaries; smoothing shows the kernel-averaged RGB state; and \(\nabla\rho\) points toward the direction where particle density increases, indicating which side of the center particle is more crowded.
The state-gradient modes estimate how the RGB state changes around the center particle. The 0th-order estimator uses differences \(\mathbf{S}_j-\mathbf{S}_i\), so a constant state field gives exactly zero gradient even if the particles are irregularly placed. Under uneven sampling, however, this difference formula can be biased for fields that change linearly. The 1st-order correction uses the moment matrix \(\mathbf{M}_i\), which summarizes the local geometry of the neighbors around particle \(i\): roughly, it describes how the neighbor offsets and kernel-gradient directions cover space. Multiplying by \(\mathbf{M}_i^{-1}\) normalizes out this local geometric distortion, making the gradient estimate exact for locally linear fields when the neighborhood is well-conditioned. In the demo, the RGB arrows visualize per-channel state gradients, while the moment-matrix view shows the local geometric directions used by this correction.
{ }