Live data from Hacker News

Why train when you can optimize?

justinmeiners.github.io

1–10 of 70 posts

Re: Why train when you can optimize?

#2
I've always been interested in reinforcement learning, believing it will magically solve anything I throw at it. Unfortunately, I haven't got it to work everywhere yet. I hoped to learn a couple good RL algorithms and then never have to actually learn the concrete details of optimization, because RL can do almost as good. I don't truly believe this, but I think it is an underlying psychological reason for my love of RL. It's scary to think I might have to learn a lot of new algorithms to solve a new problem, and maybe I won't be able to solve it at all.

Any suggestions on the best resources for branching out from RL to more classical control and optimization?

Re: Why train when you can optimize?

#4
Neural networks can approximate any function, but that doesn’t mean they do so efficiently. Depending on the function, they can require incredible amounts of neurons and training. At their worst, they devolve into a lookup table. It’s not hard to find these examples either. Just try training a neural network to compute sin(x)!

This is possible! One of the cool things about neural networks is that you can try to encode prior understanding into either the structure of the network or choice of activation function. See the paper Neural Networks Fail to Learn Periodic Functions and How to Fix It by Ziwin, Hartweg, and Uweda. Where they propose the activation function f(x) = x + sin(x)^2 that can encode an understanding that the underlying function should be periodic.

[1] https://proceedings.neurips.cc/paper/2020/file/1160453108d3e...

Re: Why train when you can optimize?

#6
post #4

Neural networks can approximate any function, but that doesn’t mean they do so efficiently. Depending on the function, they can require incredible amounts of neurons and training. At their worst, they devolve into a lookup table. It’s not hard to find these examples either. Just try training a neural network to compute sin(x)! This is possible! One of the cool things about neural networks is that you can try to encod…

If we're allowed to do that, why can't my activation function be sin(x)?

Re: Why train when you can optimize?

#7

I've always been interested in reinforcement learning, believing it will magically solve anything I throw at it. Unfortunately, I haven't got it to work everywhere yet. I hoped to learn a couple good RL algorithms and then never have to actually learn the concrete details of optimization, because RL can do almost as good. I don't truly believe this, but I think it is an underlying psychological reason for my love of…

The Deepmind lead behind AlphaStar, there StarCraft 2 bot that beat several world champs, once said, "the best way to solve a reinforcement learning problem is with supervised learning". That's because supervised learning is relatively extremely efficient, and just RL with more constraints.

Just start learning the basics of supervised learning for classification and regression on common benchmark tasks like CIFAR and UCI. Apply a mix of linear models, neural networks, and trees like random forests and GBDTs. Next try convolutional networks for vision and transformers for NLP. You'll be all set to solve most real world problems.

Re: Why train when you can optimize?

#8
post #4

Neural networks can approximate any function, but that doesn’t mean they do so efficiently. Depending on the function, they can require incredible amounts of neurons and training. At their worst, they devolve into a lookup table. It’s not hard to find these examples either. Just try training a neural network to compute sin(x)! This is possible! One of the cool things about neural networks is that you can try to encod…

If we're allowed to do that , why can't my activation function be sin(x)?

[deleted]

Re: Why train when you can optimize?

#9
post #4

Neural networks can approximate any function, but that doesn’t mean they do so efficiently. Depending on the function, they can require incredible amounts of neurons and training. At their worst, they devolve into a lookup table. It’s not hard to find these examples either. Just try training a neural network to compute sin(x)! This is possible! One of the cool things about neural networks is that you can try to encod…

If we're allowed to do that , why can't my activation function be sin(x)?

You can use sin as activation function, but that would require careful initialization to avoid gradient explosion as you would ended up with a lot of points where gradient is simply zero. You can refer to Implicit Neural Representations with Periodic Activation Functions for more details.

Re: Why train when you can optimize?

#10
post #4

Neural networks can approximate any function, but that doesn’t mean they do so efficiently. Depending on the function, they can require incredible amounts of neurons and training. At their worst, they devolve into a lookup table. It’s not hard to find these examples either. Just try training a neural network to compute sin(x)! This is possible! One of the cool things about neural networks is that you can try to encod…

And then your NN can't represent anything else than periodic functions.. If we had to build separate programs for each product requirements variations.. programming would not be viable. More generally neural networks can't even imitate a dumb calculator without throwing absurd errors despite the rules of calculus being trivial and well defined. And matching a calculator is a task order of magnitudes easier than the semantic Causal reasoning abilities of human NLU that is involved in argumentation, inferences and understanding. But people are pathetically fooled by the fallacy of it being a uNiVeRsAl aPpRoXiMaTor.
Post reply on HN