News for hackers. Stuff that matters.
Re:Backpropagation algorithm visual explanation by londons_explore on Wednesday June 27, 2018 @09:25AM (#17407910)
I find explanations like these are great for people who understand mathematical notation, sigmoid functions, derivitives, etc. These people however typically understand whats going on from a simple text description of the process.

For those without a math background, the notation is very opaque. A far better explanation is to explain it numerically with simple examples.

For example, have two bits of training data:

input -> output

1 -> 0

0 -> 1

And a simple network with zero hidden nodes and train it. By hand...

Then add another bit of training data:

0.5 -> 1.5

Notice that it is now impossible to fit the training data exactly, however many training iterations we do. Now add a hidden layer with one or two nodes. Now we can perfectly fit the data, but show that depending on initialization weights we might never get there through gradient descent. Nows the time to mention different types of optimizers, momentum, etc.

Re:Backpropagation algorithm visual explanation by mjfisher on Wednesday June 27, 2018 @04:30PM (#17411585)
Just to add a slightly different perspective: I'm comfortable with the notation and calculus involved, but had not known how backpropagation worked until now.

I'm not sure if it's the same for others, but I don't find bare text descriptions with formulas particularly useful. Mathematical notation on a page is great for rote application of rules and computation, but by itself does not easily communicate an intuitive understanding of the system the math represents. I have to work very hard to build up mental pictures of systems described by just notation, and those mental pictures often have to move in complicated ways as well.

The relationship between maths on the page and the systems they describe is the same as seeing musical notation on a page and hearing a full orchestra. One is a dry accounting of the facts involved. The other is moving and powerful in its richness and immediacy, a living thing that defies easy communication beyond the experience itself.

Demonstrations like this show you the maths _and_ build up a picture for you at the same time. The result of that is that you can communicate a very powerful idea (e.g. backpropagation) very precisely, intuitively and quickly.

Very much worth a five minute scroll for me; YMMV!

Re:Backpropagation algorithm visual explanation by inputcoffee on Wednesday June 27, 2018 @10:39AM (#17408471)
I half agree with you. The notation alone, although "understandable" doesn't provide a "deep" understanding.

I think the intuition is only half-transmitted with just the notation.

I do think working through an example sort of completes the intuition.

Re:Backpropagation algorithm visual explanation by newen on Wednesday June 27, 2018 @10:01AM (#17408152)
Kind of tired of people in the programming community proudly complaining about not knowing simple math notation. Educate yourself. Everyone else in the engineering world knows these basic math notations.
Re:Backpropagation algorithm visual explanation by telchar on Wednesday June 27, 2018 @01:52PM (#17410266)
Math notation is simple because it's heavily overloaded. For example, it does me no good to know about exponentials when a superscript is used in a different context. Reading any nontrivial math requires knowing what the notation means in the particular context of the work. IME mathematicians typically assume the reader is familiar already and usually don't explain.

Anyone targeting their work at non-experts should explain even what seems like trivial notation to them since they can't know what other meanings the reader may think the notation holds.

Re:Backpropagation algorithm visual explanation by newen on Wednesday June 27, 2018 @05:03PM (#17411853)
But the fact is that math notation is the most widely known notation for writing down equations (let's make things specific to the OP case and say summation equations and partial derivative equations).

Specifically for the superscript case, the vast vast vast majority of the cases, it will be obvious whether the superscript notation means exponentiation or indexing. When there are ambiguities, what the person explaining the equation should do is clarify the ambiguity.

It doesn't do the world any good to make the entire engineering world learn (relatively) obscure programming languages in order to be slightly more clear (and let's not forget, much more verbose) when writing down simple equations, when all one has to do is clarify a couple of ambiguities when writing down equations.

Let me make it very clear and say this: equations are meant to explain things. They are not standalone pieces of code that you can copy and paste into a REPL. They are tools to explain how something works. You should always have accompanying text that explains what all the variables in the equation mean and clarify unclear notations.

Re:Backpropagation algorithm visual explanation by telchar on Wednesday June 27, 2018 @09:54PM (#17413485)
I fully agree with your last sentence. Sadly I don't often see that actually happen in practice. And when the notation isn't explained I personally tend to waste a lot of brain cycles trying to decide what the notation means because I'm reading material that I don't already know (of course - if I already knew the material I probably wouldn't be reading it).
Re:Backpropagation algorithm visual explanation by newen on Wednesday June 27, 2018 @11:37PM (#17413880)
Right but the thing is, people should be complaining about equations lacking explanations. Not about math notation in general.
Re:Backpropagation algorithm visual explanation by dmartinez on Wednesday June 27, 2018 @03:18PM (#17410956)
I agree. The superscript example is a good one. In most contexts it refers to the exponent, but in the context of a cost function that minimizes a linear regression (for example), it indicates the index of the set.

Computer languages benefit from the fact that poorly designed syntax can be deprecated (not in all cases, e.g. C++) by introducing new features to the language.

Notation in math never advances in the same way for some reason.

Re:Backpropagation algorithm visual explanation by londons_explore on Wednesday June 27, 2018 @10:52AM (#17408593)
Thats the point I'm making... If you've mastered this "simple" notation, then you've probably already mastered simple neural networks like this, so you are not the target for this tutorial.
Re:Backpropagation algorithm visual explanation by alanbernstein on Wednesday June 27, 2018 @04:01PM (#17411325)
Summation and derivatives are used quite broadly outside of neural networks.
Re:Backpropagation algorithm visual explanation by windsignaling on Wednesday June 27, 2018 @01:45PM (#17410210)
I've derived backpropagation by hand many times and diagrams like these often just confuse me more.

For me it depends on whether I'm in a passive or active state of learning.

If I'm sitting down on a Sunday afternoon reading the news, backpropagation is going to make zero sense to me.

But, if I'm actively working on a problem, it's much more useful to realize that this is no different than using gradient descent for linear regression or even minimizing a quadratic.

At that point, it becomes just a mechanical calculation (the fact that the resulting gradient looks more intimidating is irrelevant).

And for me, realizing that it's no different than taking the derivative of a quadratic actually makes it more digestible than these fancy animated tutorials.

Re:Backpropagation algorithm visual explanation by blt on Wednesday June 27, 2018 @09:44PM (#17413439)
It is different though. The derivative of the L2 loss function w.r.t. the linear regression parameters is a "flat" function that is easy to derive by hand. With neutral networks you have deeply nested vector-valued functions. If you write down the chain rule, it suggests that you should compute the Jacobians of all the nested vector valued functions and then multiply them together. This would be computationally expensive.

The key idea of backpropagation is that at each layer, you only ever need the derivatives of the loss function w.r.t. the parameters of the layer, and the Jacobian-vector product with the derivatives of the loss function w.r.t. the layer outputs. You never need to compute the jacobians explicitly and you never need to do those high dimensional matrix-matrix multiplications.

These are not complicated ideas but they involve a combination of software design, calculus, and linear algebra that would probably not be obvious to the average CS undergrad.

Re:Backpropagation algorithm visual explanation by p1esk on Wednesday June 27, 2018 @10:01PM (#17413513)
Here's a very good explanation of the whole thing, that should be accessible to any average high school student who bothered to take a calculus course: http://neuralnetworksanddeeplearning.com/
Re:Backpropagation algorithm visual explanation by p1esk on Wednesday June 27, 2018 @05:45PM (#17412090)
no different than using gradient descent for linear regression

If you understand that already, then you are really not the target audience of blog posts like that.

Re:Backpropagation algorithm visual explanation by nabla9 on Wednesday June 27, 2018 @10:14AM (#17408267)
You don't need 'math backround' to understand the notation. This is high school math. Maybe check some basics you have forgotten from Wikipedia.

I'm relatively sure that they teach basics derivatives, functions etc. in high school in every country.

Re:Backpropagation algorithm visual explanation by pas on Wednesday June 27, 2018 @10:56AM (#17408620)
Usually only if the students opts for the advanced maths course/class. (Usually known as AP [advanced placement] in the US.)
Re:Backpropagation algorithm visual explanation by swebs on Wednesday June 27, 2018 @10:54AM (#17408609)
In the US it varies by state and even city, but they did not teach calculus in high school in Philadelphia at least. Students could chose whether to take statistics or pre-calculus. Pre-calc was just basically trigonometry.
Re:Backpropagation algorithm visual explanation by nabla9 on Wednesday June 27, 2018 @01:47PM (#17410225)
You learn something new every day.

Here in Finland the students are divided into "long" and "short" math. Both will learn basics of calculus and derivatives at least.

Re:Backpropagation algorithm visual explanation by q3k on Wednesday June 27, 2018 @12:42PM (#17409620)
> I'm relatively sure that they teach basics derivatives, functions etc. in high school in every country.

You're wrong, they don't teach derivatives in the HS curriculum in Poland, even when you take advanced math in HS.

Re:Backpropagation algorithm visual explanation by leeeeech on Wednesday June 27, 2018 @03:56PM (#17411283)
A picture of a function, its derivative and the notion, that one function shows the other's tangent's slopes, is all that's needed, that should fit in a high-school curriculum especially in physics.

But you are going to hear it anyway if you are going to study.

Re:Backpropagation algorithm visual explanation by mattlondon on Wednesday June 27, 2018 @04:27PM (#17411556)
I didn't get taught derivatives, functions or summation in the UK at GCSE-level (16 year old).

I believe it was covered at A-level (18 year old) but you could only pick three or four subjects for A-Levels at the time, so you had to be selective about the subjects you picked depending on what you "want to be when you grow up", and what you thought you were good at so that you got good enough grades to go to a uni you liked.

Re:Backpropagation algorithm visual explanation by openIce on Wednesday June 27, 2018 @10:15AM (#17408285)
May I ask from where you are if you can't understand what derivatives are? Hell it's high school math
Re:Backpropagation algorithm visual explanation by nsxwolf on Wednesday June 27, 2018 @12:33PM (#17409523)
I understand what derivatives are. I had absolutely no clue what they were being used for in this animation.