This repository contains the reference implementation and experiment scripts for the paper:
MorphoNAS: Embryogenic Neural Architecture Search Through Morphogen-Guided Development, submitted for peer review. Preprint: arXiv:2507.13785v1.
Authors: Mykola Glybovets, Sergii Medvid
MorphoNAS is a morphogenetic neural architecture search (NAS) system. Compact genomes encode morphogen dynamics and threshold-based developmental rules that deterministically grow a neural network from a single progenitor cell via local chemical interactions. We evaluate MorphoNAS in two domains:
- Structural targeting: evolving genomes that develop into predefined random graph configurations (8-31 nodes)
- Functional performance: solving CartPole with compact evolved RNN controllers (6-7 neurons under size pressure)
The codebase includes experiment pipelines, analysis scripts, and utilities to reproduce the results reported in the preprint.
src/experimentA.py: structural targeting experiments (graph properties)experimentB.py: RNN controller experiments (CartPole)regenerate_displays.py: regenerate visualizations for experiment outputs- Additional modules: genome, evolution, morphogen and neural propagation, displays, etc.
experiments/_ExpA_graph_properties/: configs and results for Experiment A_ExpB_RNN_controller/: configs and results for Experiment B
experimentA.sh,experimentB.sh: end-to-end scripts for setup, running, and post-processingrequirements.txt: Python dependencies
- Create a virtual environment and install dependencies
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt- Run experiments via helper scripts
# Experiment A: structural targeting
bash experimentA.sh
# Experiment B: RNN controller (CartPole)
bash experimentB.shEach script will set up the environment, run the experiments, and regenerate displays.
You can also run components directly:
# Experiment A (generate configs, run, then regenerate displays)
python src/experimentA.py --generate-configs --run-experiments --seed=54210 --experiment-seed=65420
python src/regenerate_displays.py experiments/_ExpA_graph_properties/results/*/
# Experiment B (run multiple trials, regenerate displays, and run analyses)
python src/experimentB.py --run-experiments --experiment-seed=65420 --num-runs=100
python src/regenerate_displays.py experiments/_ExpB_RNN_controller/results/*/
python src/experimentB_analysis.py experiments/_ExpB_RNN_controller K01_cartpole
python src/experimentB_analysis.py experiments/_ExpB_RNN_controller K02_cartpole_minOutputs (plots, metrics, and intermediate JSON/CSV artifacts) are stored under the corresponding experiments/*/results/ directories.
- Experiment A visualizations are regenerated via
src/regenerate_displays.pyoverexperiments/_ExpA_graph_properties/results/*/. - Experiment B includes additional analyses:
src/experimentB_analysis.py experiments/_ExpB_RNN_controller K01_cartpolesrc/experimentB_analysis.py experiments/_ExpB_RNN_controller K02_cartpole_min
If you use this repository or build upon MorphoNAS, please cite the preprint:
@misc{glybovets2025morphonas,
title = {MorphoNAS: Embryogenic Neural Architecture Search Through Morphogen-Guided Development},
author = {Mykola Glybovets and Sergii Medvid},
year = {2025},
eprint = {2507.13785},
archivePrefix= {arXiv},
primaryClass = {cs.NE},
url = {https://arxiv.org/abs/2507.13785}
}- Python version: it was run on Python 3.13. See
requirements.txtfor dependencies. - The experiments were run on a single machine in CPU-only mode. CPU: Apple M2 Pro, RAM: 96GB.
- Random seeds can be controlled via the CLI flags shown above to support reproducibility.
For questions, bug reports, or feature requests, please open an issue in this repository. For paper-related inquiries, refer to the contact information on the preprint page: arXiv:2507.13785v1.