Manuscript Offprint
arXiv:2610.31900Distributed Swarm Morphogenesis with Neural Cellular Automata
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Ray Verma, Eliseo Ferrante, and Anthony Tzes
Abstract—Swarm morphogenesis requires robots to assemble desired shapes through local interactions. We present a modular framework integrating neural cellular automata (NCA) with existing site selection and collision-aware control. Within this framework, we introduce a decentralized attachment-site discovery mechanism. Robots already in the formation update and share local NCA states to identify new attachment sites, enabling progressive growth without a predefined list of sites during deployment. To bridge the mismatch between conventional NCA growth and gradual physical assembly, we additionally propose offline sparse-retention fine-tuning that simulates partial attachment, together with a false-positive loss that penalizes invalid site activations. Simulations demonstrate formation of diverse lattice morphologies, scaling to several hundred robots, and substantial improvements in morphology accuracy from the proposed fine-tuning. Experiments with Crazyflie quadrotors validate the integrated execution pipeline using robot-relative observations reconstructed from external tracking.
Index Terms—Swarm Robotics, Multi-Robot Systems, Morphogenesis, Formation Control, Neural Networks.
I. INTRODUCTION
Swarm morphogenesis aims to generate large-scale physical structures through local interactions among robots. Applications include coordinated aerial displays, distributed inspection, search, surveillance, and defence, where formations may need to scale or adapt across environments. Reliance on GPS, motion capture, or centralized estimation can limit applicability where signals or infrastructure are unavailable, including GNSS-denied environments; relative-sensing approaches instead use onboard vision [1], ranging and odometry [2], or distance-only measurements [3], [4]. Here, we consider local-relative sensing without globally referenced robot poses.
Distributed task-allocation methods assign tasks to robots [5], while assignment-based shape-formation methods allocate or dynamically select robot goals [6], [7]. Assignment-free methods guide robots to fill specified shapes without explicit robot-to-site assignments [8], [9]. These approaches differ in how robots occupy the shape, but both assume its geometry is supplied beforehand. We instead consider distributed attachment-site discovery. Essentially, we determine which physical attachment sites should exist as the morphology develops, so that a global structure can emerge from a local developmental rule trained offline, rather than a stored goal list. Existing assignment and control methods then coordinate robots to occupy these sites.
NCAs suit distributed attachment-site discovery because local computations generate global structure without a central coordinator. Each cell updates its state from neighbors, enabling pattern growth and regeneration [10], with extensions to graphs and higher-resolution generation [11], [12], [13]. We use these states to discover physical attachment sites, establishing a first step toward neural swarm morphogenesis.
The framework separates NCA attachment-site generation from assignment and control, allowing independent replacement. These methods can be replaced without altering NCA attachment-site generation. We use the artificial-light-field assignment and constrained controller of [7].
Standard Growing NCAs train on virtual grids without assembly constraints. During deployment, the NCA should instead evolve using local states of a gradually and asynchronously assembled formation. This mismatch can impair attachment-site predictions, motivating offline fine-tuning.
We propose an NCA-based framework for distributed swarm morphogenesis with three main contributions:
-
Modular lattice-morphogenesis framework. We couple developmental attachment-site generation, distributed assignment, and collision-aware control.
-
Distributed attachment-site discovery method. Robots in the formation exchange and update local NCA states to identify candidate attachment sites to occupy. This allows the formation to develop progressively without providing robots with a complete list of attachment sites.
-
Offline fine-tuning adapts a pretrained NCA to physical assembly using simulated partial attachment. An additional false-positive loss penalizes activation outside the desired morphology.
The attachment-site discovery layer is modular with respect to assignment and control; the reported implementation uses the artificial-light-field assignment and constrained controller in [7].
Formation-control methods vary in geometric representation and spatial-information requirements [14]. GPS or indoor positioning systems have been used in [15]; relative approaches use vision, ranging, odometry, or distance measurements [1], [2], [3], [4]. Shapes can be represented
R. Verma and E. Ferrante are with the Department of Computer Science, New York University Abu Dhabi United Arab Emirates
A. Tzes is with the Department of Electrical Engineering, New York University Abu Dhabi, United Arab Emirates as continuous regions or density fields [16], or discrete lattices [17]. We adopt lattices for their well-defined attachment sites during progressive assembly.
Distributed task allocation provides coordination mechanisms [5]. Shape-formation methods use task swapping or dynamic assignment [6], [7], assignment-free strategies [8], [9], or learned decentralized control [18]. Progressive self-assembly methods incorporate robots incrementally into a developing formation [19], [20], [21]. Although these approaches differ in how robots join or occupy a shape, they rely on prescribed geometry or designed assembly rules rather than learned local attachment-site generation.
Graph Neural Networks (GNNs) enable learned decentralized interactions through neighborhood message passing [18]. Our NCA follows a similar principle but operates on a regular lattice rather than a general graph. Its shared symbolic frame preserves neighbor directions, allowing spatially ordered updates without permutation-invariant aggregation or explicit edge features. We therefore formulate progressive attachment-site generation using the simpler NCA setting, without requiring the general GNN framework.
Morphogenetic approaches generate structure through local rules, including gene-regulatory models [22] and reaction-diffusion dynamics demonstrated in robot swarms [23]. NCAs use learned local updates to generate and regenerate patterns [10], with extensions to graph-based interactions [11], [12]. NCAs have regenerated simulated soft robots [24] and classified shapes in physical modular robot systems [25]. To the best of our knowledge: i) NCAs have not been established for morphogenesis in swarms of independently mobile robots, and ii) no existing method uses learned NCAs for distributed attachment-site discovery in mobile robot swarms. Unlike methods requiring predefined geometry, our approach generates candidate sites incrementally during deployment. Consequently, these methods provide no directly comparable baseline for learned local attachment-site generation under incremental physical assembly.
III. METHODOLOGY
The methodology has two phases: offline training and deployment. During offline training, an NCA is trained for each desired morphology to reconstruct its reference image and then fine-tuned with sparse retention to account for gradual robot assembly. During deployment, NCA weights remain fixed while local cell states evolve. At each control step, each robot uses only current local observations and received broadcasts. An attachment cycle proceeds as follows. The seed robot occupies symbolic cell and its local NCA predicts cell as foreground. The seed advertises that cell and its predicted NCA state. A nearby Joiner receives the advertisement, maps into its own body frame using the local lattice estimate, and selects it through distributed assignment. The controller moves the Joiner to the site; once attachment succeeds, it also becomes an Advertiser that can generate further candidate sites based on its own NCA state. The remainder formalizes estimation, discovery, assignment, and control for this cycle.
A. Problem Setting
We consider N homogeneous holonomic robots progressively assembling a desired formation using only local sensing and communication. One robot is designated the initial seed and remains stationary throughout assembly.
We describe local interactions through two representative roles: an Advertiser is an attached robot that updates local NCA states and advertises candidate attachment sites, while a Joiner is unattached and discovers and approaches locally advertised sites. These roles are temporary: after attachment, a Joiner becomes an Advertiser.
We represent possible attachment positions on a symbolic square lattice. The seed is assigned lattice coordinate . Adjacent lattice positions correspond to prescribed physical robot spacing . The desired morphology is a finite connected set of cells containing the seed, with at most one robot per cell and . This symbolic lattice specifies the robots' relative arrangement. The complete desired morphology is available during offline training but not to robots during deployment. Each robot can measure its speed and sensed neighbors' relative positions. Robots broadcast symbolic cells, NCA states, and advertised sites.
The NCA operates decentrally on Advertiser-maintained cell-state patches rather than a shared global formation representation. An Advertiser can announce only unoccupied cells adjacent to its occupied position. Joiners discover sites through nearby Advertisers, and attachment requires a site reachable by the controller.
B. Local Lattice-Frame Estimation
An Advertiser specifies attachment sites on the symbolic lattice, whereas a Joiner observes positions in its body frame. Lattice frame estimation connects these descriptions by estimating a rigid transform between the Joiner's body frame and symbolic coordinates using nearby attached Advertisers as references. Let denote the neighboring Advertisers observed by robot at time . For each attached robot , let be its observed body-frame position and let be its symbolic lattice cell. For lattice spacing , the scaled coordinate is .
Robot estimates a rotation and translation aligning scaled lattice coordinates with observed neighbour positions. This yields the rigid least-squares problem
This transform maps symbolic cell c into the observing robot's body frame,
Initially, fewer than two attached robots may provide insufficient anchors to determine Eq. (1). The first robot that attaches to a seed-advertised neighboring cell therefore

Fig. 1. Swarm Morphogenesis time evolution. At each step , Advertisers maintain local NCA state around their occupied symbolic cells, assemble a neighborhood patch from observed attached neighbors, apply an NCA update, and advertise neighbouring unoccupied foreground cells as candidate attachment sites. Joiners can then occupy these advertised cells and become Advertisers, so the set of attached cells grows progressively toward the desired morphology.
uses its local body-frame to define the initial lattice axis and join the seed, after which, the rigid transform can be estimated. This estimator maps symbolic to local coordinates for assignment and control, assuming sufficient sensing range to observe three adjacent robots.
C. Distributed NCA Attachment-Site Discovery
We use a Growing Neural Cellular Automaton (NCA) as the learned developmental model [10]. Each symbolic lattice cell has a state containing red, green, blue, and alpha (RGBA) channels and additional internal channels. RGB represents appearance, while alpha predicts whether the cell belongs to the morphology. The shared local update rule evolves these states using each cell's neighborhood; its architecture and offline training are described in Section III-E. Weights remain fixed during deployment.
Each Advertiser maintains a persistent NCA-state patch centered on its occupied cell . Let denote this patch at control step and be an NCA cell state in the patch. The patch provides context to update the occupied center and adjacent candidate sites. Figure 1 illustrates this local discovery process.
At each control step, the Advertiser refreshes with nearby occupied-cell states received from Advertisers broadcasting their symbolic coordinates and NCA states. It then performs an NCA update on the patch
It examines the four cardinally adjacent cells of . It advertises a cell only if the cell is locally known to be unoccupied and its updated alpha value , where is the foreground threshold. Each advertisement contains the candidate's symbolic coordinate and updated NCA state.
A Joiner selects an advertised unoccupied cell and approaches it. For duplicate advertisements, it averages alpha values to evaluate the site and deterministically selects one full NCA state to initialize upon attachment. It becomes an Advertiser and advertises new candidate sites.
D. Assignment and Control
Once candidate attachment sites are advertised, Joiners use the distributed artificial-light-field (ALF) assignment of Li et al. [7] to select candidates. The ALF assigns intensities from locally observed robot positions and favors lower-intensity candidates, corresponding to nearby cells with low robot density.
The constrained controller of [7] converts weighted goals into velocity commands, balancing goal tracking, collision avoidance, and velocity smoothing under speed and safety constraints. Both modules are replaceable components of the NCA attachment-site discovery framework.
E. NCA Training and Fine-Tuning
We train the local operator offline on the complete desired morphology. A standard Growing NCA first learns to reconstruct the reference image; sparse-retention fine-tuning then adapts its weights to gradual assembly and irreversible simulated attachment. The learned weights remain fixed during deployment (Section III-C).
- Growing NCA Training: The operator follows Growing NCA [10]: at each step, a convolution extracts features from each cell's neighborhood, a shared network predicts a state change, and that change is added to the current state. A stochastic per-cell update mask emulates asynchronous updates during training. The same operator is used during deployment in Eq. (3). Starting from one living seed, training unrolls H sampled steps and optimizes weights by backpropagation through time. For reference RGBA image of morphology , the final-state reconstruction loss is
- Sparse-Retention Fine-Tuning: Ordinary NCA growth permits cells to activate temporarily or grow ahead of the structure. During physical assembly, however, only NCA states at occupied robot cells are used to predict adjacent attachment sites, where each Advertiser updates only a local patch around its occupied cell as robots gradually join. Applying this restriction to a standard NCA may therefore expose it to unfamiliar developmental dynamics, and may produce unsuitable predictions from such partial, irregular states. Sparse-retention fine-tuning exposes the model to this restricted regime so it can form the target progressively from the occupied frontier, improving deployment-time predictions.
Sparse-retention rollouts emulate gradual assembly: update virtual state, identify foreground cells adjacent to the occupied morphology, randomly retain some as newly attached, and prune unsupported state before continuing. Let be the state at step , and the occupied lattice sites representing Advertisers. With denoting cardinally adjacent cells, the unoccupied frontier and eligible candidates are
where is the foreground retention threshold. To model slow, intermittent, and non-uniform arrivals, a subset of candidates is sampled from the retention distribution :
where contains the newly retained candidates.
To enforce the limited spatial extent of NCA state during physical assembly, virtual states outside occupied cells and their adjacent cells are removed after retention:
This permits nearby predictions while pruning distant activity, exposing the NCA to partial, irregular assemblies. Sparse-retention rollouts are also mixed with ordinary NCA rollouts to preserve unconstrained developmental dynamics.
a) False positive: Because adjacency alone cannot exclude invalid sites, we additionally penalize foreground activation outside the desired morphology. Let indicate membership in the desired morphology and be background cells. Alpha above threshold incurs
where is the average over . Combining this penalty across the rollout with final RGBA reconstruction gives
TABLE I PARAMETERS FOR OFFLINE TRAINING AND SIMULATED DEPLOYMENT.
| Parameter | Value |
|---|---|
| State channels | 16 |
| Foreground threshold | 0.5 |
| Training Rollout horizon | [64, 96) steps |
| False-activation threshold | 0.2 |
| Loss weights () | (2.0, 4.0) |
| Lattice spacing | 0.5 |
Thus fine-tuning encourages local physical growth while suppressing false-positive sites.
IV. RESULTS
For each desired morphology, we train a dedicated NCA offline. We then conduct two simulation studies: (i) formation progression and scaling, to evaluate the framework's ability to assemble different morphologies and accommodate increasing swarm sizes; and (ii) a fine-tuning ablation, to assess the effects of sparse retention and false-positive loss on deployment accuracy. We also perform physical quadrotor experiments are presented in Section IV-B.
For offline training, a Growing NCA first learns to reconstruct a reference image and is subsequently fine-tuned using sparse retention. For an robot experiment, the reference image is scaled so that its foreground-cell count is closest to . For fine-tuning, the retention distribution selects no candidate sites with probability 0.15, all with probability 0.10, and otherwise retains candidates independently with probability .
For all simulations, NCA weights remain fixed and robot-local updates are asynchronous. Initial robot positions are sampled uniformly in the arena. Results are computed over 30 random seeds. Experimental parameters are reported in Table I.
We measure morphology accuracy by the F1 score (Dice overlap) between the expected and occupied cells. Let denote the foreground cells of the desired morphology and the cells occupied by robots at time :
F1 equals 1 when the occupied cells exactly match the desired morphology, and decreases when cells are missing or incorrectly occupied.
For an episode ending at time , saturation time is the earliest time from which the score remains close to the final value:
with such that the F1 score at is within of its terminal value.
A. Simulation Results
a) Formation and Scaling: We evaluate four morphologies (Lizard, Tree, Pretzel, and Hand-heart) using 250 robots, and vary the robot count for Tree. Figure 2

Fig. 2. Formation progression and scalability. Left: representative assembly sequences for four desired morphologies using 250 robots at , , , and progression, with reference images and corresponding F1 accuracy trajectories over time. Right: saturation time and final F1 versus robot count for Tree morphology; shaded regions denote one standard deviation.
contains representative formation rollouts and scaling results. Dark colored robots denote Advertisers, while light colored robots denote Joiners. Formations are rotated and scaled for visualization.
The rollouts show that the local developmental mechanisms can form branched, compact, and holed lattice morphologies without a deployment-time goal list. Morphologies that expand broadly in multiple directions, such as Tree, form faster, whereas those with narrow paths or constrained branches, such as Lizard and Hand-heart, require longer formation times. Nonetheless, these runs converge towards F1 values close to 1, confirming that the assembled formations increasingly match their desired morphologies. In the scaling study, grows approximately linearly with robot count, while the final F1 score only decreases slowly, indicating that morphologies remain stable across scale. The shaded regions show one standard deviation.
b) Ablation Study: To evaluate the proposed developmental attachment-site generation mechanism independently of the assignment and control components, we use standard Growing NCA as the baseline and progressively introduce the proposed sparse-retention and false-positive suppression mechanisms. Table II reports the deployment F1 score at for these configurations on the Tree morphology with 250 robots.
Sparse-retention increases the final F1 score relative to standard Growing NCA, demonstrating the benefit of training on partial assembly states. Adding the false-positive loss further improves mean F1 and significantly reduces variation across runs. The ablation thereby provides direct empirical justification for the proposed fine-tuning procedure, that significantly increases both performance and consistency.
TABLE II FINE-TUNING ABLATION.
| Training configuration | Std. | |
|---|---|---|
| Standard Growing NCA | 0.583 | 0.107 |
| + Sparse-retention fine-tuning | 0.764 | 0.141 |
| + False-positive loss | 0.988 | 0.004 |
B. Hardware Validation
For hardware validation, we use eight Crazyflie quadrotors to assemble two desired lattice morphologies, E and 4. Since the platform lacks the required relative-position sensing, Lighthouse tracking and centralized computation are used as an experimental interface to provide robot positions and reconstruct local-frame observations. These local observations are consumed by the proposed framework and return body-frame velocity commands. This setup preserves the algorithm's local information structure despite the platform's sensing limitations.
Figure 3 shows overhead snapshots and corresponding lattice-state visualizations during the formation of E and 4. The sequences illustrate progressive attachment-site discovery and robot recruitment, resulting in the desired formations. These experiments demonstrate the execution of the proposed pipeline on physical robots despite localization noise, actuation error, and asynchronous motion
V. CONCLUSION
We presented a modular NCA-based framework for distributed swarm morphogenesis, integrating learned

Fig. 3. Real-robot experiments with eight Crazyflie quadrotors. Top: overhead snapshots during formation of E and 4. Bottom: corresponding lattice-state visualizations, with gray and red circles denoting Joiners and Advertisers respectively, and colored cells indicating foreground morphology sites.
attachment-site discovery with existing assignment and collision-aware control. Robots progressively assemble desired formations without a predefined list of attachment sites during deployment. The ablation demonstrates that fine-tuning substantially improves morphology accuracy over standard Growing NCA, while the additional false-positive loss achieves high accuracy with consistent results. Simulations demonstrate diverse morphologies and scalability to large swarms, while Crazyflie experiments validate the integrated pipeline on physical robots.
REFERENCES
[1] E. Montijano, E. Cristofalo, D. Zhou, M. Schwager, and C. Sagiés, "Vision-based distributed formation control without an external positioning system," IEEE Transactions on Robotics, vol. 32, no. 2, pp. 339–351, 2016.
[2] K. Guo, X. Li, and L. Xie, “Ultra-wideband and odometry-based cooperative relative localization with application to multi-uav formation control,” IEEE Transactions on Cybernetics, vol. 50, no. 6, pp. 2590–2603, 2020.
[3] R. Suttner and Z. Sun, “Formation shape control based on distance measurements using Lie bracket approximations,” SIAM Journal on Control and Optimization, vol. 56, no. 6, pp. 4405–4433, 2018.
[4] J. Lü, K. Ze, S. Yue, K. Liu, W. Wang, and G. Sun, “Concurrent-learning based relative localization in shape formation of robot swarms,” IEEE Transactions on Automation Science and Engineering, vol. 22, pp. 11188–11204, 2025.
[5] H.-L. Choi, L. Brunet, and J. P. How, “Consensus-based decentralized auctions for robust task allocation,” IEEE Transactions on Robotics, vol. 25, no. 4, pp. 912–926, 2009.
[6] H. Wang and M. Rubenstein, “Shape formation in homogeneous swarms using local task swapping,” IEEE Transactions on Robotics, vol. 36, no. 3, pp. 597–612, 2020.
[7] X. Li, R. Zhou, Y. Zhang, and G. Sun, “Distributed shape formation of multirobot systems via dynamic assignment,” IEEE Transactions on Industrial Electronics, vol. 72, no. 3, pp. 3017–3027, Mar. 2025.
[8] G. Sun, R. Zhou, Z. Ma, Y. Li, R. Groß, Z. Chen, and S. Zhao, "Mean-shift exploration in shape assembly of robot swarms," Nature Communications, vol. 14, p. 3476, 2023.
[9] Y. Zhang, R. Zhou, X. Li, and G. Sun, “Mean-shift shape formation of multi-robot systems without target assignment,” IEEE Robotics and Automation Letters, vol. 9, no. 2, pp. 1772–1779, 2024.
[10] A. Mordvintsev, E. Randazzo, E. Niklasson, and M. Levin, “Growing neural cellular automata,” Distill, vol. 5, no. 2, 2020.
[11] D. Grattarola, L. Livi, and C. Alippi, “Learning graph cellular automata,” in Advances in Neural Information Processing Systems, vol. 34, 2021, pp. 20983–20994.
[12] G. Gala, D. Grattarola, and E. Quaeghebeur, “E(n)-equivariant graph neural cellular automata,” Transactions on Machine Learning Research, 2024.
[13] E. Pajouheshgar, Y. Xu, A. Abbasi, A. Mordvintsev, W. Jakob, and S. Süsstrunk, “Neural cellular automata: From cells to pixels,” in ACM SIGGRAPH 2026 Conference Papers. Association for Computing Machinery, 2026, pp. 1–11.
[14] K.-K. Oh, M.-C. Park, and H.-S. Ahn, “A survey of multi-agent formation control,” Automatica, vol. 53, pp. 424–440, 2015.
[15] H. Yang, X. Bao, S. Zhang, and X. Wang, “A multi-robot formation platform based on an indoor global positioning system,” Applied Sciences, vol. 9, no. 6, p. 1165, 2019.
[16] Y. Xiang, J. Song, Z. Zheng, X. Lei, and Z. Peng, “Density-driven progressive shape formation for swarm robots in dynamic environments,” IEEE Robotics and Automation Letters, vol. 11, no. 2, pp. 1186–1193, 2026.
[17] Z. Nie, Q. Zhang, X. Wang, F. Wang, and T. Hu, “Triangular lattice formation in robot swarms with minimal local sensing,” IET Cyber-Systems and Robotics, vol. 5, no. 2, 2023.
[18] C. Jiang, X. Huang, and Y. Guo, “End-to-end decentralized formation control using a graph neural network-based learning method,” Frontiers in Robotics and AI, vol. 10, p. 1285412, 2023.
[19] M. Rubenstein, A. Cornejo, and R. Nagpal, “Programmable self-assembly in a thousand-robot swarm,” Science, vol. 345, no. 6198, pp. 795–799, 2014.
[20] G. Li, D. St-Onge, C. Pinciroli, A. Gasparri, E. Garone, and G. Beltrame, “Decentralized progressive shape formation with robot swarms,” Autonomous Robots, vol. 43, no. 6, pp. 1505–1521, 2019.
[21] Z. Pan, G. Wen, H. Yin, S. Yin, and Z. Tan, “Crystallization-inspired design and modeling of self-assembly lattice-formation swarm robotics,” Sensors, vol. 24, no. 10, p. 3081, 2024.
[22] Y. Meng, H. Guo, and Y. Jin, “A morphogenetic approach to flexible and robust shape formation for swarm robotic systems,” Robotics and Autonomous Systems, vol. 61, no. 1, pp. 25–38, 2013.
[23] I. Slavkov, D. Carrillo-Zapata, N. Carranza, X. Diego, F. Jansson, J. Kaandorp, S. Hauert, and J. Sharpe, “Morphogenesis in robot swarms,” Science Robotics, vol. 3, no. 25, p. eaau9178, 2018.
[24] K. Horibe, K. Walker, and S. Risi, “Regenerating soft robots through neural cellular automata,” in Genetic Programming, ser. Lecture Notes in Computer Science, vol. 12691. Springer, 2021, pp. 36–50.
[25] K. Walker, R. B. Palm, R. Moreno, A. Faiña, K. Støy, and S. Risi, "Physical neural cellular automata for 2D shape classification," in 2022 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2022, pp. 12 667–12 673.