Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should the neurons in a neural network be asynchronous?

I am designing a neural network and am trying to determine if I should write it in such a way that each neuron is its own 'process' in Erlang, or if I should just go with C++ and run a network in one thread (I would still use all my cores by running an instance of each network in its own thread).

Is there a good reason to give up the speed of C++ for the asynchronous neurons that Erlang offers?

like image 285
Joe Avatar asked Jul 07 '16 16:07

Joe


4 Answers

I'm not sure I understand what you're trying to do. An artificial neural network is essentially represented by the weight of the connections between nodes. The nodes themselves don't exist in isolation; their values are only calculated (at least in feed-forward networks) through the forward-propagation algorithm, when it is given input.

The backpropagation algorithm for updating weights is definitely parallelizable, but that doesn't seem to be what you're describing.

like image 170
instigatorofawe Avatar answered Nov 07 '22 02:11

instigatorofawe


The usefulness of having neurons in a Neural Network (NN), is to have a multi-dimension matrix which coefficients you want to handle ( to train them, to change them, to adapt them little by little, so as they fit well to the problem you want to solve). On this matrix you can apply numerical methods (proven and efficient) so as to find an acceptable solution, in an acceptable time.

IMHO, with NN (namely with back-propagation training method), the goal is to have a matrix which is efficient both at run-time/predict-time, and at training time.

I don't grasp the point of having asynchronous neurons. What would it offers ? what issue would it solve ?

Maybe you could explain clearly what problem you would solve putting them asynchronous ?

I am indeed inverting your question: what do you want to gain with asynchronicity regarding traditional NN techniques ?

like image 30
Stephane Rolland Avatar answered Nov 07 '22 00:11

Stephane Rolland


It would depend upon your use case: the neural network computational model and your execution environment. Here is a recent paper (2014) by Plotnikova et al, that uses "Erlang and platform Erlang/OTP with predefined base implementation of actor model functions" and a new model developed by the authors that they describe as “one neuron—one process” using "Gravitation Search Algorithm" for training:

http://link.springer.com/chapter/10.1007%2F978-3-319-06764-3_52

To briefly cite their abstract, "The paper develops asynchronous distributed modification of this algorithm and presents the results of experiments. The proposed architecture shows the performance increase for distributed systems with different environment parameters (high-performance cluster and local network with a slow interconnection bus)."

Also, most other answers here reference a computational model that uses matrix operations for the base of training and simulation, for which the authors of this paper compare by saying, "this case neural network model [ie matrix operations based] becomes fully mathematical and its original nature (from neural networks biological prototypes) gets lost"

The tests were run on three types of systems;

  1. IBM cluster is represented as 15 virtual machines.
  2. Distributed system deployed to the local network is represented as 15 physical machines.
  3. Hybrid system is based on the system 2 but each physical machine has four processor cores.

They provide the following concrete results, "The presented results evidence a good distribution ability of gravitation search, especially for large networks (801 and more neurons). Acceleration depends on the node count almost linearly. If we use 15 nodes we can get about eight times acceleration of the training process."

Finally, they conclude regarding their model, "The model includes three abstraction levels: NNET, MLP and NEURON. Such architecture allows encapsulating some general features on general levels and some specific for the considered neural networks features on special levels. Asynchronous message passing between levels allow to differentiate synchronous and asynchronous parts of training and simulation algorithms and, as a result, to improve the use of resources."

like image 1
Ahmed Ferozpuri Avatar answered Nov 07 '22 02:11

Ahmed Ferozpuri


It depends what you are after.

2nd Generation of Neural Networks are synchronous. They perform computations on an input-output basis without a delay, and can be trained either through reinforcement or back-propagation. This is the prevailing type of ANN at the moment and the easiest to get started with if you are trying to solve a problem via machine learning, lots of literature and examples available.

3rd Generation of Neural Networks (so-called "Spiking Neural Networks") are asynchronous. Signals propagate internally through the network as a chain-reaction of spiking events, and can create interesting patterns and oscillations depending on the shape of the network. While they model biological brains more closely they are also harder to make use of in a practical setting.

like image 1
Steven de Salas Avatar answered Nov 07 '22 01:11

Steven de Salas