Take the 2-minute tour ×

I'm not looking for a Neural Networks library, since I'm creating new kinds of networks. For that I need a good "dataflow" language.

Of course you can do this in C, C++, Java and co. but dealing from scratch with the multithreading etc. would be a nightmare.

At the other extremity, languages like Oz or Erlang seem more adapted, but they don't have many libraries, and they are harder to master (it's easy to play with them, but is it OK to create complete software ?).

What would you suggest ?

share|improve this question
This link might be helpfull. trapexit.org/Erlang_and_Neural_Networks –  scrapcodes Oct 13 '12 at 14:02
add comment

8 Answers

up vote 9 down vote accepted

I watched an interesting conference presentation about using Erlang for Neural Networks. You might want to check it out:


I also know that the presented system is going to be open-sourced any day now according the authors tweet.

share|improve this answer
Yes thanks, I've seen it too, very interesting. I might go with this solution, Erlang seems quite mature now. My only concern with this solution is the complete asynchronousness of the network, you have no way to control any "timing". –  Blacksad Jul 1 '11 at 22:40
In Erlang, you can deal with time and synchronization very easily. Much easier that in any other practical languages. So even if the basic system doesn't support that out of the box, it may not be very hard to extend it. Erlang is great for doing concurrent soft real-time systems by design. Besides telecom, there are other classes of systems that rely on this property, including trading, CEP, etc. –  alavrik Jul 2 '11 at 0:01
Luopan, accept this answer if it is the best solution for you –  Muzaaya Joshua Jul 2 '11 at 9:01
it is easy to deal with synchronization in such a network. Along signal (as a part of message) you can keep 'generation' of the message. You can also maintain 'tick' messages. Yet another approach would use states machines consuming just one signal and handling sync in some event way. –  user425720 Jul 3 '11 at 0:15
add comment

Erlang is very well suited for NN.

  1. Neurons can be modeled by processes (no problem with having millions of them)
  2. Connections/synapses can be represented by PIDs of target neuron. It is very easy to initialize such a network as part of standard init procedure in OTP. Communication would be realized by message passing.
  3. Maybe it would be good to have global address space in ETS/mnesia (build in datastores) in order to do dynamic reconfiguration of network structure.
  4. Pattern matching in receive block can determine what kind of signal neuron receives and modify it on the fly.
  5. It would be very easy to monitor such a network.

Also consider that Erlang NN would be 'live' all the time. You would be able to query neurons, layers, routers etc any time. In C/C++ you just read current state of arrays/data structure.

Regarding performance, we all know that C/C++ is orders of magnitude faster than Erlang, however NN topic is tricky.

If the network would hold very few neurons, in very wide address space, in regular array, iterating over it again and again could be costly (in C). Equivalent situation in Erlang would be solved by single query to root/roots (input layer) neurons, which would propagate query directly to well addressed neighborhs.

share|improve this answer
The difference in performance between C/C++ and Erlang is VERY test dependant. For small tests like incrementing the fields in an array C/C++ is definitely much faster than Erlang, but for large, real applications the difference will be very small, if there is any at all. Complexity tends to favour those systems which are designed to handle it, like Erlang. –  rvirding Jul 3 '11 at 22:05
add comment

If you have any Java experience, then use Scala which is a JVM language that is based on the same concept of "actors" as Erlang. But it is less strict than Erlang and can easily use any existing Java libraries.

Then, when you find a computationally expensive task that would work better in Erlang, you can use Erlang's jinterface library to communicate between your Scala code and your distributed Erlang nodes.

share|improve this answer
add comment

If you are interested in data flow programming and multi-threading then I would suggest National Instruments LabVIEW. In this case you don't need to bother about multi-threading since its already there and you can also use OOP since now OOP is also native with LabVIEW. LabVIEW OOP is also purely based on data flow programming paradigm.

share|improve this answer
add comment

Using Java does not mean dealing from scratch with multithreading - just use one of numerous Java Actor Libraries.

share|improve this answer
add comment

DXNN1, and DXNN2 which was built and introduced in the textbook: Handbook of Neuroevolution Through Erlang: http://www.amazon.com/Handbook-Neuroevolution-Through-Erlang-Gene/dp/1461444624/ref=zg_bs_760204_22

Are open source and available at: https://github.com/CorticalComputer

share|improve this answer
add comment

It's not a language in and of itself, but Emergent is very powerful and can be highly customized (it has a full scripting language).

It's open source, too, which could be helpful as a guide if you need to make your own version for your novel architectures.

share|improve this answer
add comment

Why reinvent the wheel? Try PyBrain. It's free and very comprehensive:

share|improve this answer
Thanks ! But I'm trying to avoid (for performance reasons) my old love Ruby, so I cannot cheat her with Python :) –  Blacksad Jul 1 '11 at 22:41
@Luopan : I don't see that fact mentioned in your question. Why limit yourself with arbitrary criteria? –  Mitch Wheat Jul 2 '11 at 0:52
You also can try Peach, both Peach and PyBrain are developed with the concern of performance (Peach is based on NumPy, that is implemented in C), and both are used successfully in scientific (with a lot of processing) applications. –  renatopp Jul 3 '11 at 14:48
and the downvote is because? –  Mitch Wheat Dec 24 '12 at 10:52
add comment

Your Answer


