Manuscript Offprint

arXiv:2610.38776

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

John Kalkhof, Niklas Ihm, Daniel Kirste, Anirban Mukhopadhyay

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

The scale of modern foundation models enables broad task generalization. In medical imaging, where segmentation demands vary widely across clinical contexts, such flexibility is invaluable. But current models, such as SAM trade adaptability for scale, locking their utility behind high-end infrastructure and leaving behind the low-resource environments most in need of diagnostic support. To bridge this gap, we introduce Foundational-NCA, a lightweight foundation model capable of adapting to a wide range of medical segmentation tasks without retraining. Built on Neural Cellular Automata (NCA), Foundational-NCA incorporates gradient-based learning with genetic optimization over a latent task space, using a compact task vector to guide predictions. This enables dynamic adaptation via a genetic prompt mechanism, allowing the model to generalize across tasks while keeping the parameter count magnitudes lower at just 211 thousand, compared to SAM-based models with 38.9 to 636 million parameters. We evaluate Foundational-NCA on 15 trained and 6 entirely unseen segmentation tasks from the TotalSegmentator dataset, achieving an average Dice score of 84.5% on known tasks and 60.4% on unseen ones. These results demonstrate that task generalization is possible in ultra-compact models, laying the groundwork for resource-efficient, deployable foundation models in clinical environments where infrastructure is limited. By reducing model size by over 180 times, Foundational-NCA takes a step toward a more equitable future for medical AI, one where powerful tools are within reach of every healthcare setting.

1 Introduction

The rise of foundation models has marked a shift from task-specific tools to scalable, unified systems capable of broad generalization. In medical imaging, this versatility promises transformative improvements in diagnostics and patient care [29], enabling accurate, scalable segmentation across clinical contexts. Yet, the immense computational scale of these systems, typically involving hundreds of millions of parameters, restricts their deployment to high-resource environments [1]. Consequently, their substantial benefits remain inaccessible precisely in regions where advanced AI could make the greatest difference: low-resource healthcare settings, such as low and middle-income countries with critical shortages of medical personnel [4, 7, 16, 18, 21].

This disparity has profound implications for global health equity. Accurate and accessible AI-driven segmentation can directly influence patient outcomes, underpinning critical decisions from early disease detection to surgical planning [15, 26, 32]. However, current state-of-the-art solutions, such as the Segment Anything Model (SAM) [13] and its medically-adapted variant MedSAM [15], remain impractically large, requiring between 38.9 and 636 million parameters. This complexity makes their deployment on widely available, cost-effective hardware such as smartphones infeasible, particularly

*Corresponding author: john.kalkhof@inria.fr

Figure

Figure 1: (A) A genetic tree visualizes how Foundational-NCA organizes and separates task prompts for different segmentation targets. (B) These task prompts, combined with positional encoding and the input image, guide the model's dynamic prediction process. (C) Unlike SAM variants, which require millions of parameters, Foundational-NCA achieves strong generalization with just 211K parameters.

problematic in medical settings where strict privacy regulations prevent the transfer of sensitive patient data to external servers [14, 28].

Neural Cellular Automata (NCAs) [6, 20], inspired by self-organizing biological systems, present a promising alternative due to their minimal resource requirements [9], low parameter count [2, 8, 11, 19, 23, 24] and inherent adaptability [10]. Recent advancements, such as Med-NCA [8, 10], have shown that NCA can achieve strong segmentation performance with significantly fewer resources. However, current NCA-based segmentation models are fundamentally limited: they are designed for single-task scenarios and lack the flexibility required to handle multiple tasks dynamically.

In this work, we introduce Foundational-NCA, the first NCA-based foundation model capable of adapting dynamically across multiple segmentation tasks via prompt-based conditioning. Central to our approach is a compact, continuous task vector, optimized using genetic algorithms (GA) [27] to encode specific segmentation objectives. This task vector modulates the NCA's update dynamics at each step, allowing a single fixed model to perform diverse segmentation tasks without any weight modifications (Figure 1). By integrating genetic optimization for task conditioning with gradient-based training of model parameters, Foundational-NCA generalizes effectively across 15 trained anatomical targets and demonstrates promising adaptability to 6 entirely unseen segmentation tasks, delivering foundation-level versatility with only 211K parameters.

Evaluated on the TotalSegmentator dataset [31], Foundational-NCA achieves an average Dice score of 84.5% across 15 training tasks and 60.4% on 6 unseen tasks, using only 211K parameters. In comparison, MedSAM, a 93-million-parameter foundation model, attains 75.8% and 73.4% on the same task sets. While Foundational-NCA shows a trade-off in generalization to unseen targets, it outperforms MedSAM on seen tasks with over 400× fewer parameters, highlighting the potential of compact, prompt-driven models for low-resource scenarios.

By substantially reducing hardware requirements and demonstrating a first step toward generalization within an ultra-lightweight foundation model, Foundational-NCA offers a promising direction for democratizing medical AI. It provides an initial framework toward universally accessible foundation models, compact, adaptive, and with the potential to bring advanced healthcare solutions closer to everyone, everywhere.

References (25)

  • An overview of machine learning within embedded and mobile devices—optimizations and applications
  • Neural cellular automata for lightweight, robust and explainable classification of white blood cell images
  • Introduction to evolutionary computing
  • How to improve access to medical imaging in low-and middle-income countries? EClinicalMedicine, 38, 2021
  • The application of medical artificial intelligence technology in rural areas of developing countries
  • Med-nca: Robust and lightweight segmentation with neural cellular automata
  • Unsupervised training of neural cellular automata on edge devices
  • Med-nca: Bio-inspired medical image segmentation
  • Parameter-efficient diffusion with neural cellular automata
  • Adam: A Method for Stochastic Optimization
  • Digital Health, 8:20552076221134455, 2022
  • Segment anything in medical images
  • Mobile health (mhealth) in low-and middle-income countries
  • Artificial intelligence in low-and middle-income countries: innovating global health radiology
  • mu-nca: Texture generation with ultra-compact neural cellular automata (opens arXiv in a new tab)
  • Growing neural cellular automata
  • PyTorch: An Imperative Style, High-Performance Deep Learning Library
  • Nca-morph: Medical image registration with neural cellular automata (opens arXiv in a new tab)
  • Ncadapt: Dynamic adaptation with domain-specific neural cellular automata for continual hippocampus segmentation
  • SAM 2: Segment Anything in Images and Videos
  • Artificial intelligence-based algorithms in medical image scan segmentation and intelligent visual content generation—a concise overview
  • A systematic review on clinical applications and technical architecture
  • Foundation models in healthcare: Opportunities, risks & strategies forward
  • Theory of self-reproducing automata
  • robust segmentation of 104 anatomic structures in ct images