# How do neural networks learn concepts?

I've been learning neural networks and some back propagation stuff, and I heard about google's Tensorflow and how it could learn things like how to carry on conversations. It got me thinking about how someone could give a computer data so that it could learn how to do that. So I was trying to figure out how you could teach a computer something like how to round a number to the nearest ten if a neural network can only output a number between 0 and 1. My question is how does someone teach a neural network concepts such as rounding a number to the nearest ten. For example how would you give a neural network data so that it could solve...

What is 47 to the nearest 10?

The answer is obviously 50. Another example also having to do with math is teaching a computer the concept of PEMDAS (Order of operations).

The answer I am looking for would be basically the steps for training neural networks to understand for example how to round numbers to the nearest ten.

• This question seems way too broad to me. – Raphael Nov 18 '15 at 12:06
• Nobody really understands why neural networks work. – Yuval Filmus Nov 18 '15 at 17:59
• some loose/ general connection to this question how does google deep dream work. there would be no need to train the above network in this question. there are big questions about how ANNs work but they have to be phrased more scientifically etc – vzn Nov 18 '15 at 21:10

Computers don't learn - they compute. They are given a set of instructions and generally follow those instructions to the letter, with the occasional blue screen of death.

The computer uses an algorithm that is developed to solve a particular problem. The algorithm will iterate on a problem using the criteria and input data it is given. As the algorithm progresses it's internal state is modified in some way, which you could say it is "learning", based on however it is processing of the data.

So in the case of learning how to do basic math - the network would have to be given the input of the numbers and operations, it would need to be "trained" on how to use them, and then given data to operate on.

The problem with that is... computers are really, really good at doing basic math - it's pretty much what they are designed for doing, but they are not good a "learning" things, because deep down they are just build to move the ones and zeros around really fast.

What could be more useful is to train the network to try and understand if a question is a math question or not, e.g "what is one plus one" vs "is that a banana over there", and/or do natural language processing on it to determine the logic of the problem, resolved as a trivial problem for a computer "1+1=?".

i.e. the actual math itself is the easy bit for the computer - processing understanding how you are phrasing a question is what the network would need to do.

And the answer of course is 42.