News for hackers. Stuff that matters.
Re:A visual proof that neural nets can approximate any function by aportnoy on Saturday April 20, 2019 @05:18PM (#19708951)
*any continuous function
Re:A visual proof that neural nets can approximate any function by YesProcrast on Saturday April 20, 2019 @05:49PM (#19709070)
Came here to suggest the function that is 1 on the rationals and 0 on the irrationals.
Re:A visual proof that neural nets can approximate any function by adrianhel on Saturday April 20, 2019 @07:38PM (#19709609)
Not continuous.
Re:A visual proof that neural nets can approximate any function by throwawaymath on Saturday April 20, 2019 @08:05PM (#19709703)
I think that was the point.
Re:A visual proof that neural nets can approximate any function by analog31 on Sunday April 21, 2019 @12:12AM (#19710495)
Also can't be computed.
Re:A visual proof that neural nets can approximate any function by nightcracker on Sunday April 21, 2019 @12:54AM (#19710601)
That depends on the input format.
Re:A visual proof that neural nets can approximate any function by throwawaymath on Saturday April 20, 2019 @06:08PM (#19709202)
While we're at it, doesn't the "universality theorem" (as the article calls it) basically follow immediately from the fact that the set of all continuous functions comprises a vector space?

If the continuous function is additive, it's linear. If it's nonlinear, you can differentiate it to obtain a linear approximation. A neural network computes linear transformations, so unless I'm missing something I'm a little surprised there's a substantive theorem for this. Is it not a corollary on the fact that we can construct a vector space of all continuous functions?

Re:A visual proof that neural nets can approximate any function by thethirdone on Saturday April 20, 2019 @06:28PM (#19709286)
> While we're at it, doesn't the "universality theorem" (as the article calls it) basically follow immediately from the fact that the set of all continuous functions comprises a vector space?

Pretty much, but you have to show that neural networks can create a basis in that vector space which is essentially the proof presented in the article.

> If the continuous function is additive, it's linear. If it's nonlinear, you can differentiate it to obtain a linear approximation.

Differentiating to obtain a linear approximation does not give you an arbitrarily good approximation like the theorem does.

> A neural network computes linear transformations, so unless I'm missing something I'm a little surprised there's a substantive theorem for this. Is it not a corollary on the fact that we can construct a vector space of all continuous functions?

Neural networks using sigmoid transfer functions do not compute linear transformations anymore.

Importantly this theorem also states that you can approximate any function with only two hidden layers. A similar proof could not be made for a single hidden layer so it seems that the non-linearity of a single layer is not enough to form a basis for all continuous functions.

Re:A visual proof that neural nets can approximate any function by braised_babbage on Saturday April 20, 2019 @06:35PM (#19709332)
One of the things about continuous functions is that they aren't necessarily differentiable, cf. https://en.wikipedia.org/wiki/Weierstrass_function
Re:A visual proof that neural nets can approximate any function by throwawaymath on Saturday April 20, 2019 @08:06PM (#19709707)
True, but that was kind of an afterthought of my point. All continuous functions still comprise a vector space.
Re:A visual proof that neural nets can approximate any function by soVeryTired on Sunday April 21, 2019 @05:44AM (#19711353)
I don't see how that helps?

> A neural network computes linear transformations

They compute a nonlinear function of an affine transform. Neural networks are nonlinear functions.

Re:A visual proof that neural nets can approximate any function by contravariant on Saturday April 20, 2019 @07:06PM (#19709490)
A vector space with a countable basis to be precise.

The set of all (real) functions is also linear, but is a lot trickier to work with.

Re:A visual proof that neural nets can approximate any function by tnecniv on Saturday April 20, 2019 @06:38PM (#19709346)
Continuous != differentiable.

The standard proof uses some functional analysis techniques but nothing too complicated to show you can get arbitrarily close to any continuous function with an NN. That includes things like step functions whose derivatives are not defined everywhere.

Re:A visual proof that neural nets can approximate any function by throwawaymath on Saturday April 20, 2019 @08:07PM (#19709715)
You could also just cite the Weierstrass function, which is continuous everywhere and differentiable nowhere. But that's separate from the meat of my point, which is that C(R) is a vector space.
Re:A visual proof that neural nets can approximate any function by dual_basis on Saturday April 20, 2019 @05:59PM (#19709139)
It can represent any arbitrary function.

If you are using gradient descent, then you'll need the desired loss function to be differentiable with respect to the parameters, but that's a totally different matter.

Re:A visual proof that neural nets can approximate any function by braised_babbage on Saturday April 20, 2019 @06:34PM (#19709323)
No, neural networks cannot "represent any arbitrary function". Find a theorem that you think states otherwise, and then read what the theorem actually states.
Re:A visual proof that neural nets can approximate any function by dual_basis on Saturday April 20, 2019 @06:55PM (#19709435)
You're correct, the statement of the theorem refers to continuous functions.

In practice, however, the input to neural networks is represented by floating point values, which is a discrete set. So pick whatever arbitrary function you would like, there is some continuous approximation to that function which is actually equal to it on every floating point value, and that function can be approximated arbitrarily closely by a neural network.

Re:A visual proof that neural nets can approximate any function by AnaniasAnanas on Saturday April 20, 2019 @07:27PM (#19709574)
Aren't all total functions continuous?
Re:A visual proof that neural nets can approximate any function by zeroonetwothree on Saturday April 20, 2019 @08:04PM (#19709698)
Weierstrauss function ;)?