Skip to content

luyanaa/glowing-journey

Repository files navigation

glowing-journey

The Bayesian C. elegans project.

Overall Assumption

Bayesian Brains without Probabilities, using Bayesian Neural Network to model the C. elegans neural system.

The bio-physical interpretation is that the brain is a Bayesian model. Parameters of neurons and synapses are represented as distribution (currently Normal distributon based on obersavation).

Thus, by input some signal (acts as sampling from the world distribution), the model generates a distribution of output. The signal generated by the network acts as an observation to the output.

Model Description

Refer to Source Code in c302

Single Step Model

The "NematodeForStep" model acts like a Markov-Chain like model, where it inputs:

  1. Voltage from last step (Markov's Previous Status) $x_{t-1}$
  2. External Input and Voltage Clamp from this step $input_{t}$

The input will go over the pipeline below:

  1. deal with clamp, synapse dynamics (with current I, not logged)
  2. the neuron dynamics (with voltage V, logged in $x_t$)
  3. add noise to neuron output according to Signal-to-Noise Ratio here.

However, it should be explicitly pointed out that it's not really a Markov model. The TBA GRU-based extrasynaptic connection and neuron dynamics are with memory.

Recurrent Model

The "RecurrentNematode" model acts as an RNN (Recurrent Neural Network) here. It wraps single-step model, and use Euler Step method to infer the dynamics.

TODO: Using better ODE solvers other than naive Euler-Step.

Neuron Model

The key neuron models here are Conductance-based non-spiking Model, GRU-based model and Spiking model.

Conductance-based Model

The conductance model here is based on A generic conductance-based model of non-spiking Caenorhabditis elegans neurons and its mathematical analysis.

$$ C \frac{dV}{dt} = I -g_{Ca} x_{Ca} (V-E_{Ca}) - g_{Kir} h_{Kir\infty}(V) (V-E_{K})\ - g_{K} x_{K} (V-E_{K}) -g_{L} (V-E_{L}) $$

To simplify this model, we can assume the $h_{}$ and $x_{}$ here is constant. The equation turns into a $I - \Sigma{g(V-E)}$ style, where the sigma can be turned into a simple $g(V-E)$ to reduce the parameters.

GRU-based Model

Simply using PyTorch GRU and wrap it as a neuron.

Spiking-based Model

TODO

Synapse Model

Simple Model & Wick's Model

Simple model directly calculates $(V_{pre}-V_{post}) \times g_{syn}$ as output for synapse between pre-synpatic and post-synpatic, while Wick's using an exponential decay here.

GRU-based Model

Simply using PyTorch GRU and wrap it as a synapse.

Training Algorithm

Mainly with Pyro.

Stochastic Variational Inference

Refer to SVI Part I: An Introduction to Stochastic Variational Inference in Pyro¶

Sequential Monte-Carlo Filter

TODO

About

The Bayesian C. elegans Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages