Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Can you please explain neural networks in simple words with an example?

share|improve this question
    
First links in a google search: en.wikipedia.org/wiki/Neural_network and en.wikipedia.org/wiki/Artificial_neural_network –  Walter Apr 28 '11 at 14:23
1  
I searched their first, but it was not simple. –  LifeH2O Apr 28 '11 at 14:27
6  
then try simple.wikipedia.org/wiki/Neural_network –  DavRob60 Apr 28 '11 at 14:52

4 Answers 4

up vote 8 down vote accepted

A neural network is a class of computing system. They are created from very simple processing nodes formed into a network. They are inspired by the way that biological systems such as the brain work, albeit many orders of magnitude less complex at the moment.

They are fundamentally pattern recognition systems and tend to be more useful for tasks which can be described in terms of pattern recognition. They are 'trained' by feeding them with datasets with known outputs.

As an example imagine that you are trying to train a network to output a 1 when it is given a picture of a cat and a 0 when it sees a picture that is not a cat. You would train the network by running lots of pictures of cats through it and using an algorithm to tweak the network parameters until it gave the correct response. The parameters are usually a gain on each input and a weight on each node as well as the actual structure of the network (how many nodes, in how many layers, with what interconnections).

Recognising cat pictures is actually a quite complex problem and would require a complex neural network (possibly starting with one node per pixel). A usual starting point for experimenting with neural networks is to try and implement simple logic gates, such as AND, OR, NOT etc. as neural nets.

Neural networks can be a very fast way of achieving a complex result. They are very interesting for AI research because they are a model for the animal brain.

One of the major disadvantages of neural networks is that it is very hard to reverse engineer them. If your network decides one particular image of an elephant is actually a cat you can't really determine 'why' in any useful sense. All you can really do is try training/tweaking the network further.

Neural networks tend to be used for well-bounded tasks such as coin/note recognition in vending machines, or defect spotting on production lines.

The best place to start if you are interested is probably to google 'perceptron' which is the name for one of the earliest neural network elements.

share|improve this answer
    
Thank you for simple examples and explanation –  LifeH2O Apr 29 '11 at 6:45

I study artificial intelligence in a masters program, and we use neural networks quite a lot. They are actually quite useful.

I think the problem for neural nets are their name. This both confuses what a neural network actual is, and makes some people question their merits because they expect them to act like brains, when they are really a fancy type of function.

The best way to understand a neural net is to move past the name. Don't think of it as a model of a brain... its not... this was the intention in the 1960s but its 2011 and they are used all the time for machine learning and classification.

A neural network is actually just a mathematical function. You enter a vector of values, those values get multiplied by other values, and a value or vector of values is output. That is all it is.

They are very useful in problem domains where there is no known function for approximating the given features (or inputs) to their outputs (classification or regression). One example would be the weather - there are lots of features to the weather - type, temperature, movement, cloud cover, past events, etc - but nobody can say exactly how to calculate what the weather will be 2 days from now. A neural network is a function that is structured in a way that makes it easy to alter its parameters to approximate weather predication based on features.

Thats the thing... its a function and has a nice structure suited to "learning". One would take the past five years of weather data - complete with the features of the weather and the condition of the weather 2 days in the future, for every day in the past five years. The network weights (multiplying factors which reside in the edges) are generated randomly, and the data is run through. For each prediction, the NN will output values that are incorrect. Using a learning algorithm based in calculus, such as back-propogation, one can use the output error values to update all the weights in the network. After enough runs through the data, the error levels will reach some lowest point (there is more to that, but I won't get into it here - most important is over fitting). The goal is to stop the learning algorithm when error levels are at a best point. The network is then fixed and at this point it is just a mathematical function that maps input values into output values just like any old equation. You feed new data in and trust that the output values are a good approximation.

To those who claim they are failed: they aren't. They are extremely useful in many domains. How do you think researchers figure out correlations between genes and diseases? NNs, as well as other learning algorithms, are used in bioinformatics and other areas. They have been shown to produce extremely good results. NASA now uses them for space station routines, like predicting battery life. Some people will say that support vector machines, etc are better... but there is no evidence of that, other algorithms are just newer.

It is really too bad people still make this claim that neural networks are failed because they are much simpler than the human brain --- neural networks are no longer used to model brains --- that was 50 years ago.

share|improve this answer
1  
Thank you for well simplified explanation –  LifeH2O Apr 29 '11 at 6:44

It is a mathematical scheme for building a equation (taking multiple numerical inputs and providing a single numerical output) with adjustable coefficients weights. There are algorithms that can adjust the coefficients to make the equation approximate the expected outputs, given a training set consisting of inputs and expected outputs.

The simplest example, along with graphics, is available on Wikipedia. This example is known as the XOR.

share|improve this answer

In simple words, like you asked, Neural Network is a failed idea of mimicking biological neural nets. It never gave any interesting results and will probably never do, because:

(1) it is too simplistic compared to what you can do with any Turing-complete programming language

(2) it is too simplistic compared to biological neural nets: they turned out to be more complex than it was thought by the time the NN theory was created.

Any claim that neural nets are successful in any task used in real world applications is an exaggeration.

Come on downvote me.

share|improve this answer
3  
"Come on downvote me." Ok. Not because you asked. No, I'm downvoting because you apparently don't know anything about Neural Networks, or what they're used for in "real world applications" –  Steve Evers Apr 28 '11 at 14:58
    
Why do you think the idea "failed"? –  user1249 Apr 28 '11 at 15:12
    
I disagree. In bioinformatics ANN are strongly used to evaluate properties from descriptors. Similarly, these guys use them to predict heart conditions. –  Stefano Borini Apr 28 '11 at 15:38
    
@SnOrfus: "you apparently don't know anything about Neural Networks, or what they're used for" - I'd be glad if someone finally explained me where exactly in the commercial world have NNs been used so far. Academia doesn't count because it is conservative in general (which it should) and has slightly different goals. In a separate answer here in this thread would be fine too. –  mojuba Apr 28 '11 at 15:52
    
@Stefano Borini: that looks like a good example at first glance, but I'm not sure if the same problem coouldn't be solved with even simpler code without ANNs. Actually, I am sure it could. –  mojuba Apr 28 '11 at 15:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.