DiffeoMorph: Learning Distributed 3D Morphogenesis with Rotation-Invariant Spectral Shape Matching

Seong Ho Pahng, Guoye Guan, Benjamin Fefferman, Sahand HormozNeurIPS 2026

TL;DR

How does a uniform ball of biological cells—or a swarm of tiny, identical robots—sculpt itself into a complex 3D object without a central blueprint? DiffeoMorph answers this by providing an end-to-end differentiable framework that teaches decentralized agents local communication rules to self-assemble into intricate 3D shapes. By introducing a clever spectral shape-matching loss, the system learns to build shapes regardless of where they face or how many agents show up, while still knowing its left from its right.

What Problem Does This Paper Address?

Imagine trying to coordinate a flash mob in pitch darkness where nobody knows their GPS coordinates, only how close they are to their neighbors. That is the daily reality of embryonic cells during morphogenesis—the biological process of developing shape—and a grand challenge for swarm robotics and programmable matter.

Machine learning can help discover the local rules that drive this self-organization, either through reinforcement learning (which is notoriously sample-inefficient here) or differentiable simulations like Neural Cellular Automata. However, training a differentiable model requires comparing the simulated shape to a target shape, and existing 3D loss functions are surprisingly brittle. Standard point-cloud metrics often demand the exact same number of agents, known point-to-point correspondences (knowing which specific cell becomes the tip of the ear), or a fixed global orientation. Other relational or spectral metrics fix the orientation issue by throwing away directional data, accidentally making the loss blind to chirality (handedness)—meaning the model can’t tell a left-handed helix from its mirror image.

Methods

DiffeoMorph pairs a standard physics-inspired neural architecture with a brand-new way of measuring 3D shape similarity.

Figure 1: Schematic of DiffeoMorph. (a) A 3D shape represented as a point cloud can be expressed as a linear combination of the 3D Zernike polynomials, composed of radial and angular parts. The expansion coefficients C:={cnℓm} are the Zernike moments. (b) The morphogenesis force model evolves the positions and gene expressions of agents based on their gene expressions and distances to neighbors, without access to absolute position information. The final evolved shape is compared to a target shape using their spectra given by 3D Zernike moments. A bilevel optimization procedure aligns the spectra by learning the unit quaternion (inner optimization) and updates model parameters to minimize the shape-matching loss (outer optimization). (c) As the outer optimization proceeds, the simulation produces the desired target shape.
  • Decentralized Agent Dynamics (Standard): Each agent holds a 3D position and an internal "gene expression" vector. Time evolution is driven by a shared SE(3)-equivariant Graph Neural Network (EGNN)—a network that naturally respects 3D rotations and translations. Agents pass messages based only on internal gene states and pairwise distances, completely blind to global coordinates.
  • Aligned 3D Zernike Loss (Novel): Instead of comparing discrete point clouds, the authors treat shapes as continuous spatial distributions and project them onto 3D Zernike polynomials (think of these as 3D spherical cousins of Fourier waves). This immediately makes the loss invariant to agent ordering and population size.
  • Bilevel Spectral Alignment (Novel): To handle arbitrary 3D orientations without losing chirality, the authors keep the full Zernike spectrum and introduce an inner optimization loop. Using unit quaternions (a smooth, gimbal-lock-free way to represent 3D rotations) and Wigner-D matrices, they rotate the predicted spectrum until it maximally overlaps with the target spectrum before computing the error.
Spectral alignment rotating the Zernike moments of an upright bunny to match a toppled target.
  • Envelope-Theorem Shortcut (Novel): Differentiating through an inner optimization loop is usually a computational headache. Because Wigner-D rotations preserve spectral norms, the aligned loss is locally flat (stationary) at the optimal rotation. By the envelope theorem, gradients through the alignment step vanish! In practice, because numerical solvers stop slightly early, the authors add a lightweight Riemannian implicit-differentiation correction rather than unrolling the loop.

Datasets

Rather than training on massive 3D asset repositories, the authors evaluate DiffeoMorph on a curated progression of five 3D target morphologies designed to systematically test symmetry breaking:

  1. Ellipsoid (axially symmetric)
  2. Crescent
  3. Starfish (dihedral symmetry)
  4. Helical ellipsoid (chiral / handed)
  5. Stanford bunny (complex, asymmetric)

Every simulation starts from a minimally patterned sphere of agents (a Fibonacci lattice shell with a Poisson-disk sampled core), seeded with 1 to 3 small patches of "organizer cells" (inspired by embryonic biology) and perturbed with Gaussian noise.

Key Insights and Ideas

  • Symmetry dictates the minimum "seed" information: You don't need to micromanage every part of a shape—you didn't need five organizer patches to grow a five-armed starfish, just two! However, breaking reflection symmetry to reliably grow a chiral shape (like a left-handed helix or the Stanford bunny) strictly requires three orthogonal organizer groups to establish an oriented 3D coordinate frame. With only two, the model "cheats" by memorizing random noise in the training sphere and fails when rotated.
  • Cells invent their own intrinsic GPS: How do identical agents figure out whether they belong in the bunny's ear or tail? Analyzing the learned gene expressions revealed that agents spontaneously organize their internal states to align with the Laplace–Beltrami eigenmodes (the natural geometric harmonics, like vibration modes on a drum) of the final 3D shape.
  • Morphogenesis as choreography, not just sculpture: By applying the shape loss at multiple intervals alongside velocity penalties, the agents learned to stabilize into a stationary bunny or continuously oscillate between short and long ellipsoids well past the training horizon.

Key Results

  • Superior Generalization Under Rotation: Benchmarked against Graph Neural Cellular Automata (GNCA) and Neural Particle Automata (NPA), GNCA failed to train under minimal spatial cues (scoring $12.15 \times 10^{-2}$ spectral loss on the bunny). Non-equivariant NPA achieved slightly lower loss on unrotated training setups ($0.17 \times 10^{-2}$ vs. DiffeoMorph's $0.23 \times 10^{-2}$ on the bunny), but shattered when the initial organizers were rotated, with error spiking to $5.93 \times 10^{-2}$. DiffeoMorph stayed rock-solid at $0.46 \times 10^{-2}$.
  • Noise Resilience: Under heavy positional noise ($0.2\epsilon$) and rotated organizers, DiffeoMorph outperformed NPA across all five shapes (e.g., $0.96 \times 10^{-2}$ vs. $8.02 \times 10^{-2}$ on the starfish, and $2.15 \times 10^{-2}$ vs. $6.87 \times 10^{-2}$ on the bunny).
  • Population Agnostic: Direct optimization experiments confirmed that both sparse ($N=1000$) and dense ($N=3000$) clouds smoothly morph into the exact same target geometry.

Limitations and Future Work

Currently, each trained network represents a single-purpose morphogenetic program dedicated to one shape (or one oscillatory cycle). For future work, the authors propose multi-target training using a single conditional policy capable of switching morphologies on demand. They also plan to investigate information-theoretic bottlenecks—specifically, how the dimensionality of the internal "gene" vector limits the complexity and variety of 3D shapes a swarm can ultimately form.

Summary updated

Abstract

Biological systems can form complex three-dimensional structures through the collective behavior of agents that share a common update rule and operate without central control. How such distributed control gives rise to precise global patterns remains a central question not only in developmental biology but also in distributed robotics, programmable matter, and multi-agent learning. Here, we introduce DiffeoMorph, an end-to-end differentiable framework for learning a morphogenesis protocol that guides a population of agents to morph into a target 3D shape. Each agent updates its position and internal state using an SE(3)-equivariant graph neural network, based on its own internal state and signals received from other agents. To train this system, we introduce a new shape-matching loss based on 3D Zernike polynomials, which compares the predicted and target shapes as continuous spatial distributions, not as discrete point clouds, and is invariant to agent ordering, number of agents, and global orientation. To achieve rotation invariance while preserving reflection sensitivity, we include an alignment step that optimally rotates the predicted Zernike spectrum to match the target before computing the loss. We perform benchmarking to establish the advantages of our shape-matching loss over other standard distance metrics for shape comparison tasks. We then demonstrate that DiffeoMorph can form a range of complex shapes from minimally patterned initial conditions. DiffeoMorph provides a general framework for learning distributed control strategies for morphogenesis, swarm robotics, and programmable self-assembly.
BibTeX
@inproceedings{pahng2026diffeomorph,
  author = {Seong Ho Pahng and Guoye Guan and Benjamin Fefferman and Sahand Hormoz},
  title = {{DiffeoMorph: Learning Distributed 3D Morphogenesis with Rotation-Invariant Spectral Shape Matching}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=6WbQEdAa2e},
}
Figure