Neural networks

Teaching material and code examples to neural network programming and parameter regression (in Matlab).

I usually run through the code several times before publishing it and especially the parts that have been used in a course/workshop have been commented, but do let me know if you find any bug or have any particular question. Please consider I am not a programmer, but a cognitive neuroscientist, so these examples do not represent the best possible practice for coding.

By the way, if you think there is a better way to code the same functions or if you simply want to share your code for neural networks, please feel free to comment!

Creative Commons Licence
This work by Vincenzo Fiore is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Workshop UCL – 01/2015

Slides and (Matlab) code MSc workshop held in UCL , January 2015 (two parts): Download slides. Download code examples, 1 (zip file)- main file: “workshop”. It includes all the examples reported in the first part of the workshop. The neural units are computed as simplified leaky intergrators characterised by a  tanh as transfer function. Download code examples, 2 (zip file)- main …

View page »

Minimal onset detector and parameter regression

The following code examples represent four distinct codes to solve in different ways the task of generating a small onset detector neural network, as portrayed in the figure below: An arbitrary input reaches two units performing a simple (identical) computation. The output unit (neuron 1) receives the excitatory input and, with a very short delay due to the …

View page »

Mean field activity

In this case a layer of interconnected leaky neurons is characterised by a positive tanh as a transfer function. The time component is slower than the one we have in spiking neurons (the decay of the leaky is at least 100 times slower), as a consequence each of these slow units can be conceived as simulating the average activity …

View page »

Spiking neurons, cluster example

Quick example to create a cluster of interconnected spiking neurons controlled by a leaky integrator for the action potential. A simple input is provided characterised by the same numerosity of the neural cluster. All parameters can be changes to see the effect of different types of connectivity on the overall activity. NB the simulation relies on …

View page »

Layer of clusters with lateral inhibitions

Download the compressed folder to run the simulation in Matlab: zip_files. The main file “cluster_competition” calls several functions to build a structure of clusters and the relative connections. In a way this is the equivalent of the simulations presented in the mean field example, where this time we have a cluster of spiking neurons per each single unit simulating the mean field …

View page »

Simple time series regression using genetic algorithms

It is not surprising that artificial neural networks have been primarily developed as a tool to approximate, estimate and forecast the evolution of time series in the future starting from a dataset describing the past. Indeed, a record of neural activity in a single neuron (spiking) or population (mean field) is just one of the many possible examples …

View page »

Pattern raiders: regressions of complex time series

NB In this example I use most of the code and concepts already presented when explaining simple time series regressions using genetic algorithms. Please refer to that text for the basic explanations. In the previous example we were happy with the idea to get rid of many features in the target time series that were considered unimportant. …

View page »

Basal Ganglia: package to simulate mean field neural dynamics

Very briefly, you can download here a Matlab code to simulate the neural activity in a single, 3-channel, cortico-striatal loop. The parameters used in this example have been hand tuned to replicate the dynamics described in Fiore et al. 2016,Changing pattern in the basal ganglia: motor switching under reduced dopaminergic drive. As a start, you can …

View page »

Leave a Reply

%d bloggers like this: