Neural Particle Automata
- Neural Particle Automata are a particle-based extension of neural cellular automata featuring continuous positions and internal states for dynamic, local interactions.
- They use differentiable Smoothed Particle Hydrodynamics (SPH) operators to compute local densities, smoothing, and gradients, enabling asynchronous state and position updates.
- The framework leverages CUDA acceleration and stochastic update rules to efficiently simulate large-scale, self-organizing behaviors in morphogenesis, texture synthesis, and classification tasks.
Neural Particle Automata (NPA) are a Lagrangian extension of Neural Cellular Automata (NCA), generalizing the concept of neural automata from static lattice-based cells to dynamic systems of particles with continuous positions and internal states. NPA replaces the Eulerian paradigm—where state is tied to fixed pixels or voxels—with a particle-based approach wherein each particle is individually simulated and interacts locally via neural rules. This framework enables explicit individuation, heterogeneous dynamics across particles, and focused computation in regions of activity. A differentiable Smoothed Particle Hydrodynamics (SPH) formulation, with CUDA-accelerated kernels, allows NPA to scale efficiently to large particle ensembles and supports end-to-end learning of self-organizing behaviors across morphogenesis, texture synthesis, and classification tasks (Kim et al., 22 Jan 2026).
1. Formal Model Specification
NPA operates on a set of particles indexed by in -dimensional space. Each particle is defined by a continuous position and an internal state representing hidden channels. The evolution of the system is governed by a shared, learnable local update rule , typically implemented as a two-layer MLP. At each discrete timestep :
- For each particle , a local perception vector is constructed from its -neighborhood :
- : current state
- : density-normalized, locally smoothed state
- : state gradient
- : density gradient
- Expressed as
- The neural rule computes , yielding updates for state (static) or both position and state (dynamic tasks).
- A stochastic update is applied per particle using , typically for asynchrony:
This model permits both heterogeneity and locality in updates, supporting individuation and dynamic adaptation even in unstructured particle ensembles.
2. Differentiable SPH Perception Operators
To enable fully differentiable, locality-aware perception and interaction, NPA utilizes SPH for estimating densities, smoothing states, and calculating gradients:
- Density Estimation:
where , kernel is Poly6 in 2D, and is usually normalized .
- State Smoothing:
- Gradient Estimation (Difference Form):
- Gradient Correction (Moment Matrix):
In practice, this is implemented as: to ensure numerical stability in backpropagation.
- Density Gradient:
SPH Kernel Functions
| Kernel | Formula | Notes |
|---|---|---|
| Poly6 | Support: | |
| Spiky Gradient | Support: |
A uniform hash-grid bins particles by position for efficient neighbor querying; two CUDA kernel strategies are implemented:
- Particle-centric: One thread per particle, scanning adjacent grid cells.
- Grid-centric: One block per cell, staging per-cell particles in shared memory for coalesced access.
Neighborhoods are discovered on-the-fly; memory grows and computational cost is per particle.
3. Training Regime and Loss Construction
End-to-end NPA training employs backpropagation through SPH kernels and adapts several practices from NCA:
- Persistent state pool for sampling simulation rollouts.
- Variable rollout lengths with .
- Overflow regularization with penalties enforcing .
- Vector-input scaling for stability:
- Stop gradients through positions for perception computations.
- Displacement regularization: penalizes for smooth motion.
Representative Tasks and Losses
| Task | Particle Count () | State Channels () | Loss Function |
|---|---|---|---|
| 2D Morphogenesis | 4096 | 16 | |
| 3D Morphogenesis | 16384 | 24 | Multi-scale SSIM + isotropy regularizer () |
| Texture Synthesis (particles) | 4096 | 16 | VGG OT-loss (on and across channels), power law transform |
| Self-classifying Point Clouds | 512 | 16 | on one-hot labels, result: test accuracy |
Each task utilizes customized rendering—Gaussian splatting for morphogenesis and textures, GSplat-based multi-view for 3D—plus curriculum strategies (progressive difficulty via blurred/sharpened targets) and per-task regularization.
4. Observed Dynamics and Empirical Behavior
NPA demonstrates several salient behaviors across evaluated tasks:
- Robustness to Discretization: Dynamics remain stable across varied and particle number , degrading only under extreme downsampling.
- Stochastic Updates: Varying Bernoulli during inference (from $0.1$ to $1.0$) preserves morphogenetic convergence.
- Self-Regeneration: Local perturbations (state zeroing, slit cuts, clumping) are autonomously repaired by continued application of local update rules.
- Heterogeneous Multi-Species Interaction: Independently trained NPA rules interact within the same simulation, exhibiting cooperation, mixing, and disruption, despite no joint training.
- Hidden State Structure and Persistent Flows: Visualization of RGB-projected hidden states reveals internally consistent, directional channel patterns ("rainbow" flows) and persistent vortex-like movement post-target attainment, which suggests emergent memory/maintenance mechanisms.
- PointMNIST Dynamics: Hidden state clusters, tracked by UMAP, form per digit class over time, indicating emergence of global semantic structure from local exchanges.
5. Essential Algorithms and Mathematical Formulations
Key pseudocode for NPA update:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
1. Build hash-grid index from {x_i} 2. For each particle i (in parallel): # Gather neighborhood N(i): all j in 3^D grid cells around x_i, with ||x_j - x_i|| < ε # Compute local perception via SPH ρ_i, \bar S_i, ∇S_i, ∇ρ_i via SPH sums # Scale vectors ∇S_i ← scale(∇S_i), ∇ρ_i ← scale(∇ρ_i) # Combine perception Z_i = [S_i; \bar S_i; ∇S_i; ∇ρ_i] # Execute neural rule Δy_i = f_θ(Z_i) 3. For each i: δ_i ∼ Bernoulli(p) S_i ← S_i + δ_i·ΔS_i ; x_i ← x_i + δ_i·Δx_i |
Summary mathematical constructs central to NPA:
- SPH Poly6 kernel:
- Spiky gradient kernel:
- Logarithmic scaling:
CUDA constants:
- Each SPH kernel (forward/backward) scans cells per particle.
- Particle-centric (thread/particle), grid-centric (block/cell) strategies—no explicit adjacency lists, neighborhoods discovered per step, memory growth .
6. Theoretical and Practical Significance
NPA synthesizes compactness and robustness characteristic of NCA with the flexibility and resolution of particle-based, Lagrangian models. By leveraging differentiable SPH operators and efficient CUDA implementations, NPA accommodates large-scale, self-organizing particle dynamics with local computation and persistent individuation. Its empirical properties—stability under discretization, resilience to stochastic updates, self-regenerative capacity, and emergent structure—suggest potential utility in a range of simulation, synthesis, and classification domains. The particle framework inherently avoids global synchronization, handles unstructured domains, and empowers the learning of both robust and heterogeneous behaviors from local rules (Kim et al., 22 Jan 2026).