A 211K Parameter Foundation Model: Genetic Prompting in Neural Cellular Automata

John Kalkhof, Niklas Ihm, Daniel Kirste, Anirban MukhopadhyayarXiv 2026

TL;DR

Foundational-NCA is an ultra-compact foundation model for medical image segmentation that packs foundation-level versatility into just 211,000 parameters—over 400x smaller than MedSAM. By combining Neural Cellular Automata (NCA) with a "genetic prompting" mechanism, the model can adapt to new, unseen anatomical structures without retraining its weights, making high-performance medical AI deployable on low-resource hardware like smartphones.

What Problem Does This Paper Address?

Modern "foundation models" like the Segment Anything Model (SAM) have revolutionized computer vision by generalizing to almost any task. However, in medical imaging, these models face a massive deployment barrier: scale. With hundreds of millions of parameters, models like MedSAM require high-end GPUs and massive infrastructure, which are often unavailable in low-resource healthcare settings or rural clinics. Furthermore, strict privacy regulations often prohibit sending sensitive patient data to the cloud for processing.

Previous attempts to use lightweight Neural Cellular Automata (NCA)—models inspired by biological self-organization—showed promise for single-task segmentation but lacked the flexibility to handle multiple organs or generalize to new ones. The authors aim to bridge this gap, creating a model that is both tiny enough for an edge device and flexible enough to be a true "foundation" for medical segmentation.

Methods

The authors introduce Foundational-NCA, which builds upon the multi-scale Med-NCA backbone. The core innovation is a dual-prompting system that guides the model's local update rules:

  1. Task Prompting: The model is conditioned on a compact, 3D latent task vector. This vector acts as a "genetic" instruction, telling the model what to segment. It modulates the NCA's update dynamics through multiplicative conditioning (see Figure 2).
  2. Positional Prompting: A coordinate-based prompt tells the model where to start, helping it localize specific anatomical regions.
Figure 2: (A) A single input image is paired with a task-specific latent vector, enabling the model to produce different segmentation outputs for the same input. (B) The task vector serves as a multiplicative conditioning signal within the NCA architecture, modulating the update dynamics. (C) Training alternates between two phases: model updates are performed via gradient descent, while task vector optimization is carried out using genetic optimization.

To train this system, the authors use a hybrid Alternating Genetic and Gradient-Based Optimization scheme. While standard backpropagation trains the model's weights, a Genetic Algorithm (GA) evolves the population of task vectors. To adapt to a completely new organ at inference time, the model doesn't need retraining; instead, a quick genetic search finds the optimal task vector using just a single annotated scan.

Datasets

The model was evaluated using the TotalSegmentator dataset, which contains 1,228 CT scans with 117 anatomical labels.

  • Task Set A (Seen): 15 structures used during training (e.g., kidneys, liver, hips, lungs).
  • Task Set B (Unseen): 6 structures held out to test generalization (e.g., sternum, stomach, urinary bladder).

Key Insights and Ideas

  • Emergent Latent Geometry: Even though the model is never given explicit class labels, the task space organizes itself geographically. Anatomies with similar shapes or locations naturally cluster together on the latent unit sphere (see Figure 4).
  • Decoupling "What" from "How": The NCA weights learn the general "physics" of how to grow a segmentation mask, while the task vector provides the semantic goal. This decoupling is what allows a 211K parameter model to behave like a foundation model.
  • Continuous Task Space: The task space is continuous, not discrete. By interpolating between two task vectors (e.g., from liver to kidney), the model's output smoothly morphs from one organ segmentation to the other, demonstrating a robust and interpretable latent representation.
Figure 4: The four globes illustrate how automatically optimized task vectors align with the tasks they are intended to solve. Each globe presents the task sphere from a different viewing angle to highlight the spatial distribution of task representations.

Key Results

Foundational-NCA achieves remarkable efficiency without sacrificing too much accuracy:

  • Parameter Count: Only 211K parameters, compared to 93.7M for MedSAM and up to 636M for SAM.
  • Performance on Seen Tasks: Achieved an average Dice score of 84.5%, actually outperforming the much larger MedSAM (75.8%) on the same set of 15 organs.
  • Generalization to Unseen Tasks: Achieved a Dice score of 60.4% on entirely new organs. While this trails MedSAM (73.4%), it represents a massive leap for ultra-compact models.
  • Qualitative Success: As shown in Figure 3, the model captures complex shapes like the liver and hip bone with high fidelity, comparable to state-of-the-art heavyweights.
Figure 3: Exemplary segmentation results comparing Foundational-NCA with Med-SAM.

Limitations and Future Work

  • Generalization Gap: The model struggles with highly variable or deformable organs (like the stomach or bladder) that it hasn't seen before. The authors suggest that training on a more diverse set of organs would enrich the latent task space.
  • Training Complexity: The hybrid GA/Gradient descent approach is computationally expensive, taking roughly 93 hours to train. Future work could focus on unifying these passes to speed up training.
  • Prompt Dependency: Ablation studies showed that the positional prompt is critical; without it, performance on unseen tasks collapses, indicating the model relies heavily on spatial anchoring.

Summary updated

BibTeX
@misc{kalkhof2026k,
  author = {John Kalkhof and Niklas Ihm and Daniel Kirste and Anirban Mukhopadhyay},
  title = {{A 211K Parameter Foundation Model: Genetic Prompting in Neural Cellular Automata}},
  year = {2026},
  eprint = {2610.38776},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.38776},
}
Figure