Skip to content

mizutanilab/biomimetic-nn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bio-mimetic layers

We have been studying brain tissues of humans, mice, and fruit flies. We implemented the obtained results into artificial neural networks to design architectures that outperform conventional AIs.

Mouse-mimetic layer used in our study: Murine AI excels at cats and cheese...

Mouse-mimetic layer is based on our study on nanometer-scale 3D structures of mouse brain tissues and also on those of human, such as this. We implemented the mouse-mimetic convolutional layers in generative AIs and found that the resultant mouse AI excels at generating cat face and cheese photos, but underperforms for human faces and birds. Python scripts used in our study are available from here.

How to implement the mouse-mimetic layer in your network

Our code runs on Tensorflow 2.16 / Keras 3.3. Mouse-mimetic versions of the fully connected layer and the 2D convolutional layers are available. Their usage is the same with the Keras layers, except for specifying the %usage of weights and its reduction method. The reduction method for the mouse layer is 2d and its recommended window width is 0.4-0.6, which corresponds to the parameter %usage of 35-60%.

  1. Download mouselayers.py (Tensorflow 2.16) file from our repository to your working directory where your *.py file is placed.
  2. The following is an example code using a mConv2D layer in place of the Conv2D layer:
import keras
from keras import layers
import mouselayers as mouse

model = keras.Sequential([
  layers.Dense(4 * 4 * 1024, activation='relu'),
  layers.Reshape((4, 4, 1024)),
  # layers.Conv2D(512, kernel_size=5, strides=2, padding='same'),
  mouse.mConv2D(512, form='2d', input2d_width=32, output2d_width=32, window2d_width=0.5, kernel_size=5, strides=2, padding='same'),
  layers.Activation('relu'),
  layers.Dense(num_class, activation='sigmoid')
])

In this example, the layers.Conv2D layer was commented out to replace it with a mouse.mConv2D layer of about 50% weight usage, which is defined with argument window2d_width. The %usage best fit to your application depends on a variety of factors, but in most cases 30-50% seems to yield good results. We recommend window2d_width=0.5 as a first choice. The arguments input2d_width and output2d_width should be close to the square root of channel dimensions of input and output layers, respectively. No other modification of your python code is required.

The original schizophrenia-mimicking layer

The original schizophrenia-mimicking layer is based on our study on nanometer-scale 3D structure of neuronal network in schizophrenia cases. We translated the findings into newly designed layers that mimic connection constraints in schizophrenia. Please find the code used in that paper here.

Release notes

2024.10.29 Fully revised in response to the release of mouselayers.py
2020.9.24 Release of this repo.

References

Saiga et al (2024). Murine AI excels at cats and cheese: Structural differences between human and mouse neurons and their implementation in generative AIs. arXiv
Mizutani et al (2022). Schizophrenia-mimicking layers outperform conventional neural network layers. Front. Neurorobot. 16, 851471. DOI
Mizutani et al (2021). Structural diverseness of neurons between brain areas and between cases. Transl. Psychiatry 11, 49. DOI pdf
Mizutani et al (2020) Schizophrenia-mimicking layers outperform conventional neural network layers. arXiv
Mizutani et al (2019) Three-dimensional alteration of neurites in schizophrenia. Transl Psychiatry 9, 85. nature.com

About

Neural network layer mimicking real brain networks

Resources

License

Stars

Watchers

Forks