https://github.com/bioai-oslo/column

https://github.com/bioai-oslo/column

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.6%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: bioAI-Oslo
  • Language: Python
  • Default Branch: main
  • Size: 620 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme

README.md

Movement Drives Emergent Attention and Scalability in Active Neural Cellular Automata

The brain has inspired many interesting artificial intelligence (AI) systems, especially through the distributed columnar architecture of the neocortex. However, as most AI systems rely on static input, the importance of active sensing is often overlooked. In animals, sensing is an active process, where perception depends on motor control. To explore how sensorimotor control impacts behavior in classification tasks, we introduce the Active Neural Cellular Automata (ANCA), a neocortex-inspired model with movable sensors. Active sensing naturally emerges in the ANCA, with belief-informed exploration and attentive behavior to salient information, without adding explicit attention mechanisms. Active sensing both simplifies classification tasks and leads to a highly scalable system. This enables ANCAs to be smaller than the image size without losing information and enables fault tolerance to damaged sensors. Overall, our work provides insight to how distributed architectures can interact with movement, opening new avenues for adaptive AI systems in embodied agents.

A cute rat

Code structure

The configuration for experiments are given in "config" files. To run an experiment with the current config, run

python python3 main.py

There are several flags to modify the output of main.py, f.ex. "-s" will allow you to save. With this option, a folder "experiments" will be made in the folder, and a sub-folder will be added that contains your results. All sub-folder names are unique.

To play an animation of a trained ANCA: python python3 main.py -tp path/to/your/experiment/folder -c path/to/your/experiment/folder/config -v -vn N where N is the amount of samples you want to see an animation for, and "-v" signfies visualization.

To plot the results from any result folder, run

python python3 plot_runs.py path/to/your/experiment/folder

Path can be absolute or relative.

The folder "src" contains the functionality used in main.py. Most notably, "movingncano_tf.py" contains the class of the new system. But keep in mind that how to train the system lies in main.py.

Authors

Mia-Katrin Kvalsund, Kai Olav Ellefsen, Kyrre Glette, Sidney Pontes-Filho, Mikkel Elle Lepperød

Code mainly produced by: Mia-Katrin Kvalsund

Some of Sidney Pontes-Filho's code is also used from this project: Neural Cellular Robot Substrate

The folder structure:

. ├── experiments Example experiment folder │   ├── anca_run_folder ANCA superfolders (per experiment) │   │   ├── run_nr_X_folder A specific run, labelled by time and date │   │   ├── folder data Specific data about all the runs in this folder (such as accuracy, scalability, etc.) │   ├── cnn_superfolder CNN experiments │   │   ├── cnn_run_folder CNN superfolder (per experiment) │   │   │   ├── run_nr_X_folder A specific run, labelled by time and date │   │   │   ├── folder data Specific data about all the runs in this folder (such as accuracy, scalability, etc.) │   ├── vit_superfolder ViT experiments │   │   ├── vit_run_folder ViT superfolder (per experiment) │   │   │   ├── run_nr_X_folder A specific run, labelled by time and date │   │   │   ├── folder data Specific data about all the runs in this folder (such as accuracy, scalability, etc.) ├── src │ ├── active_nca.py The ActiveNCA and supporting functions │ ├── animate.py The animation function used when visualizing from main │ ├── data_processing.py Data loading and pre-processing │ ├── logger.py The Logger object for logging runs │ ├── loss.py All loss and accuracy metrics │ ├── perception_matrix.py The perception matrix init / mapping from substrate to image │ ├── plotting_utils.py Utils for plotting in test scripts │ └── utils.py Utils for src and main ├── tests Various tests │ ├── test_loss.py │ ├── test_moving_nca.py │ ├── test_perception_matrix.py │ ├── thinking_about_loss_energy.py │ ├── thinking_about_normalized_positions.py │ └── thinking_about_plt_Rectangle.py ├── cnn.py All code to do with CNN data generation ├── common_funcs.py Funcs for many test-scripts ├── config Example config ├── img Image folder ├── inspect_focus.py File used to generate active sensing plots ├── main.py Train, test and visualize ├── plot_runs.py Plot one run ├── plot_tuning.py Plot a folder of runs ├── print_stats.py Print stats (accuracy, loss) for a folder of runs ├── requirements.txt Requirements for MacOS ├── requirements_linux.txt Likewise, Linux ├── vit.py All code to do with ViT data generation ├── zero_shot_damage.py Used to test fault tolerance/robustness ├── zero_shot_robustness_vs_scalability.py Used to plot robustness versus scalability └── zero_shot_scalability.py Used to test scalability

Owner

  • Name: bioAI
  • Login: bioAI-Oslo
  • Kind: organization

GitHub Events

Total
  • Watch event: 1
  • Public event: 1
  • Push event: 25
Last Year
  • Watch event: 1
  • Public event: 1
  • Push event: 25

Dependencies

requirements.txt pypi
  • cma ==3.3.0
  • gym ==0.26.2
  • ipython ==8.10.0
  • keras ==2.11.0
  • matplotlib ==3.7.0
  • numpy ==1.24.2
  • tensorflow-macos ==2.11.0
  • tqdm *
requirements_linux.txt pypi
  • Farama-Notifications ==0.0.4
  • Markdown ==3.4.4
  • MarkupSafe ==2.1.3
  • Pillow ==10.0.0
  • Pygments ==2.16.1
  • Werkzeug ==2.3.7
  • absl-py ==1.4.0
  • asttokens ==2.4.0
  • astunparse ==1.6.3
  • backcall ==0.2.0
  • box2d-py ==2.3.5
  • cachetools ==5.3.1
  • certifi ==2023.7.22
  • charset-normalizer ==3.2.0
  • cloudpickle ==2.2.1
  • cma ==3.3.0
  • contourpy ==1.1.0
  • cycler ==0.11.0
  • decorator ==5.1.1
  • executing ==1.2.0
  • flatbuffers ==23.5.26
  • fonttools ==4.42.1
  • gast ==0.4.0
  • google-auth ==2.22.0
  • google-auth-oauthlib ==1.0.0
  • google-pasta ==0.2.0
  • grpcio ==1.58.0
  • gym ==0.26.2
  • gym-notices ==0.0.8
  • gymnasium ==0.29.1
  • h5py ==3.9.0
  • idna ==3.4
  • ipython ==8.10.0
  • jedi ==0.19.0
  • keras ==2.14.0
  • kiwisolver ==1.4.5
  • libclang ==16.0.6
  • llvmlite ==0.40.1
  • localconfig ==1.1.3
  • matplotlib ==3.7.0
  • matplotlib-inline ==0.1.6
  • ml-dtypes ==0.2.0
  • numba ==0.57.1
  • numpy ==1.24.2
  • oauthlib ==3.2.2
  • opencv-python ==4.8.1.78
  • opt-einsum ==3.3.0
  • packaging ==23.1
  • parso ==0.8.3
  • pexpect ==4.8.0
  • pickleshare ==0.7.5
  • pip ==22.0.2
  • prompt-toolkit ==3.0.39
  • protobuf ==4.24.4
  • ptyprocess ==0.7.0
  • pure-eval ==0.2.2
  • pyasn1 ==0.5.0
  • pyasn1-modules ==0.3.0
  • pygame ==2.5.2
  • pyparsing ==3.1.1
  • python-dateutil ==2.8.2
  • requests ==2.31.0
  • requests-oauthlib ==1.3.1
  • rsa ==4.9
  • setuptools ==59.6.0
  • six ==1.16.0
  • stack-data ==0.6.2
  • swig ==4.1.1
  • tensorboard ==2.14.1
  • tensorboard-data-server ==0.7.1
  • tensorboard-plugin-wit ==1.8.1
  • tensorflow ==2.14.0
  • tensorflow-estimator ==2.14.0
  • tensorflow-io-gcs-filesystem ==0.34.0
  • termcolor ==2.3.0
  • tqdm ==4.66.1
  • traitlets ==5.9.0
  • typing_extensions ==4.7.1
  • urllib3 ==1.26.16
  • wcwidth ==0.2.6
  • wheel ==0.41.2
  • wrapt ==1.14.1