about
Genetic Algorithms for Training Deep Neural Networks for Reinforcement Learning (arxiv.org)
124 points by magoghm on Dec 21, 2017 | hide | past | pdf | 44 comments on HN

In plain words: Instead of tuning a network's weights with calculus-based error signals, it breeds a population of networks, mixing and mutating the best performers' weights. It handled over 4 million weights and trained Atari in about 4 hours on a desktop, faster than the usual gradient-based trainers.

Abstract · Deep Neuroevolution: Genetic Algorithms Are a Competitive Alternative for Training Deep Neural Networks for Reinforcement Learning

Deep artificial neural networks (DNNs) are typically trained via gradient-based learning algorithms, namely backpropagation. Evolution strategies (ES) can rival backprop-based algorithms such as Q-learning and policy gradients on challenging deep reinforcement learning (RL) problems. However, ES can be considered a gradient-based algorithm because it performs stochastic gradient descent via an operation similar to a finite-difference approximation of the gradient. That raises the question of whether non-gradient-based evolutionary algorithms can work at DNN scales. Here we demonstrate they can: we evolve the weights of a DNN with a simple, gradient-free, population-based genetic algorithm (GA) and it performs well on hard deep RL problems, including Atari and humanoid locomotion. The Deep GA successfully evolves networks with over four million free parameters, the largest neural networks ever evolved with a traditional evolutionary algorithm. These results (1) expand our sense of the scale at which GAs can operate, (2) suggest intriguingly that in some cases following the gradient is not the best choice for optimizing performance, and (3) make immediately available the multitude of neuroevolution techniques that improve performance. We demonstrate the latter by showing that combining DNNs with novelty search, which encourages exploration on tasks with deceptive or sparse reward functions, can solve a high-dimensional problem on which reward-maximizing algorithms (e.g.\ DQN, A3C, ES, and the GA) fail. Additionally, the Deep GA is faster than ES, A3C, and DQN (it can train Atari in ${\raise.17ex\hbox{$\scriptstyle\sim$}}$4 hours on one desktop or ${\raise.17ex\hbox{$\scriptstyle\sim$}}$1 hour distributed on 720 cores), and enables a state-of-the-art, up to 10,000-fold compact encoding technique.

Felipe Petroski Such, Vashisht Madhavan, Edoardo Conti, Joel Lehman, Kenneth O. Stanley, Jeff Clune
arXiv:1712.06567 · cs.NE, cs.LG · submitted Dec 18, 2017 · updated Apr 20, 2018
abstract · pdf · html

add comment on HN

Hello all. I am one of the paper's coauthors. Thank you for your interest in this work! We hope you enjoy it. Just an FYI, this paper is part of a cluster of five papers released on Tuesday morning, detailed in this blog post: https://eng.uber.com/deep-neuroevolution
Without reading this specific paper, I think this is the future. If not genetic search, then some other metaheuristic. I think this is only really credible road to AGI in the near term, as it seems to be largely a hardware limitation that will be alleviated in the next few years.

Through the history of deep learning, the frontier has been networks that can be trained to some feedback of whether they're working or not in ~6-8 days. Within a few years there will almost certainly be ASICs that allow us to train hundreds of thousands or millions of networks in several weeks, relative to several weeks for one of the same network in 2017. This will let us start exploring things like evolving networks seriously.

Fundamentally, we know neural networks can instantiate general intelligence, and we know genetic search is capable of finding the right neural networks. There are big differences between the CS and biological versions of each, but it's striking that the big breakthrough in "AI" was deep neural networks and not anything else.

When I think about the difference between AlphaZero and human intelligence, I don't think it's "more intelligence." AlphaZero seems perfectly intelligent to me: I think the difference is more about the selective pressures that produced us. AlphaZero is a reflection of its environment and the process by which it developed in that environment. I would be shocked the future of deep learning continues to be hand-design from human intuition.

Edit: looking at the link, I want to caveat the above by saying this paper may or may not be "it," but directionally I think the idea is underrated and erroneously out of favor now as neural networks were in 2009. Ken Stanley (coauthor on the linked paper) in particular has been hung up on one particular approach, NEAT, since like 2002 that is kind of interesting but definitely not the end-all.

> Fundamentally, we know neural networks can instantiate general intelligence

This isn't at all the case! We know neuronal networks, of the human brain variety specifically, can host this vague thing we're calling general intelligence.

It's not at all clear that artificial neural networks of the deep learning variety can do everything a neuronal network can do.

Note that using genetic algorithms to come up with initial weights for neural networks was the state of the art in the late 90s/early 2000s. So this paper is not as novel as it seems, but it's good to have it for reference.

My feeling is that since shallow networks can be made to have equivalent accuracy to deep networks, that the real challenge isn't topology but training. Hobbyists have access to so much processing power with GPUs now that they can explore techniques that weren't practical for experts 20 years ago. So we may see training speed increase by a few orders of magnitude using techniques besides gradient descent (maybe quantum computing someday, who knows).

The big question though is how to combine networks into hierarchies so that the number of behaviors that can be learned is no longer limited (since pattern recognition is largely a solved problem). I think the way GAs fit in is that they make it much easier to understand and build simple NNs, and possibly train hierarchies or discover topologies that aren't immediately obvious.

Deep learning wasn't novel in 2012 either - it was the removal of a hardware limitation that made it compelling again. I think the same is true for evolving DNNs, but I don't know if the available compute power is there yet.

> My feeling is that since shallow networks can be made to have equivalent accuracy to deep networks, that the real challenge isn't topology but training.

This is not really true though... even very shallow neural networks can be universal function approximators in a trivial sense because they can be lookup tables, but they are really not expressive enough to generalize well and lack a lot of the expressivity of deep networks.

> shallow neural networks can be universal function approximators in a trivial sense because they can be lookup tables, but they are really not expressive enough to generalize well

You've got it flipped. If anything, shallow neural networks (of an equivalent number of parameters) are more "expressive" than deep networks, BUT that expressivity just makes them overfit. This is the bias vs. variance tradeoff. If anything, deep networks encode our prior belief that there is a hierarchy of features / a compressed representation, which limits the model that is learned, to a model conforming to those priors.

Shallow networks would probably differ in the number of categories they can differentiate with accuracy.
The 'curse of dimensionality' should be required reading https://en.wikipedia.org/wiki/Curse_of_dimensionality for anyone getting into genetic algorithms or deep learning.

Also previously on HN http://www.visiondummy.com/2014/04/curse-dimensionality-affe...

The visiondummy article is great, but how many dimensions are too many for a DNN? Let's say I have 100 TB of image data with 50 classes. Satellite data, I can have huge images, or tile them into small images. He's arguing for smaller down to a point? What point? When the convergence gets to a minimum?
My feeling is that since shallow networks can be made to have equivalent accuracy to deep networks, that the real challenge isn't topology but training.

In a sense, topology is training. One reason that DNNs outperform shallow networks for so many problems is that presumably their topology captures structure inherent in the world that would otherwise have to be discovered by a simpler network.

I'm new to the field. What makes you say that shallow and deep networks have equivalent accuracy? Is there a recent publication/experiment I missed? Thanks!
https://arxiv.org/abs/1703.02660

Disclosure: I contributed to the linked work.

To do simple tasks, you don’t even need neural networks, in short. If you want to do complex tasks, training the neural net isn’t the problem, but a NN can indeed represent more than say a linear policy. The issue is getting the NN to do the complex thing correctly: it’s more of an exploration problem than function approximation problem.

> To do simple tasks, you don’t even need neural networks, in short.

Ssh! We've got a gold rush to maintain.

I had to do this for a homework assignment about 10 years ago!
In 2005 I took a sub-symbolic AI course where one of the homework assignments was to evolve a neural network using genetic algorithms. So that in itself is nothing new. The novelty of the paper seems to be the scale of the solution. Personally, I hope we'll see a little bit of revival of genetic algorithms/programming -- I think it's promosing in design (cars, aeroplanes, architecture, etc.), since it's good at finding novel solutions to optimization problems.
Overall the idea is about 20 years old. The earliest reference I can think of is Karl Simms work. It's pretty impressive considering how old it is: http://www.karlsims.com/evolved-virtual-creatures.html
This was the paper that excited me about neural networks in the nineties, from 92... http://liacs.leidenuniv.nl/assets/PDF/boers-kuiper.92.pdf
The paper looks really solid, but the title had me gasp “Bingo!” for a second.

More seriously, thinking about metaheuristic, which approaches at which scale, i.e. machine learning architecture, that's the future.

I'm not well-versed in machine learning, so I just want to make sure I understand the general point here: these researchers trained a competitive deep neural network without using gradient descent? Does this mean neural networks might become more useful for discrete optimization problems without gradient information, like program synthesis?
The Blondie24 book was published in 2002.

https://www.amazon.com/product-reviews/1558607838

People need to recognize that this is not a new idea. It may have been groundbreaking in the early 2000s, but Genetic Algorithms + Neural Nets are a relatively old strategy at this point.

Definitely read the book if you want a bit of a throwback. When cutting-edge AI research was about beating players on Yahoo-games Checkers with new techniques.

Neuroevolution is nothing new. I don't know why people think this is something big/innovative.
Because as far as I know, genetic algorithms perform poorly compared to basically every other optimization technique. I'm under the impression that they're not actually used for anything interesting these days, now that the initial hype about implementing natural selection on a computer has died down.

Stochastic hill climbing as a baseline method for evaluating genetic algorithms: http://papers.nips.cc/paper/1172-stochastic-hillclimbing-as-...

When will a genetic algorithm outperform hill climbing? http://web.cecs.pdx.edu/~mm/nips93.pdf

A GA being competitive with modern gradient based methods is very surprising to me.

Try optimizing for the shape of an antenna using hill climbing.

Thing about evolutionary networks is that they can evolve topology, which usually is just a thing decided by people implementing NNs (and not guaranteed to be anywhere near most optimal). I don't see why given enough time GAs (or EAs) could not outperform simple backpropagation based on differentiating simple cost functions.

Why wouldn't you be able to do that with hill climbing?
Because you can't establish any gradient information from the design variables (antenna topology) to the objective function (i.e. antenna gain). So most of the time you might end up climbing towards some wrong direction (i.e. local optima).
Hill climbing doesn't use a gradient, that's gradient descent. Hill climbing is pretty much the same as GA with a population of 1. There's no reason you can't design an antenna with it, and before this paper I'd be convinced hill climbing would actually do it better.

The person I was replying to was also advocating the use of GAs to solve the antenna problem, which don't use gradient information either.

> I don't see why given enough time GAs (or EAs) could not outperform simple backpropagation based on differentiating simple cost functions.

It's already happened. You are it.

This was the line of reasoning that led to the initial hype about GAs, but I don't think it's sound. We still don't understand exactly how natural selection works, so there's no reason to believe the GAs we can implement now have the "special sauce" that makes real world natural selection effective. We don't know how to implement genotypes well, we don't know how to implement recombination or mutation well, etc.
I disagree. The biological brain is a known upper bound for GAs thus we are fully aware of a gap in understanding. This makes it a perfect target for research.

Looking at current methods of optimizing neural networks we cannot know if we are far from the upper bound or if we've already reached it... R&D effort in this area could be a dead end.

What do you do if you don't have any computable "gradient"? Many real world optimization problems don't come with any gradient information.
Yes, I'm aware many problems don't have a gradient. Before this paper I'd have said you don't do anything, you just throw compute at it but still don't really solve it well.
Yes and maybe.
Maybe backprop is actually a form of evolution, a straight forward one where you iterate towards a better form
Better isn't always straightforward, sometimes unintuitive steps need to be taken to reach a better fitness value. The advantage of evolutionary methods over backprop is that evolutionary methods can take steps "backwards" and avoid local minima.
But local minima aren't a problem for modern neural networks that are optimizing in very high dimensional space.
It definitely is a problem. For instance there was a recent post about trying to teach a robot to put a board with a hole in it into a peg. It would just learn to shove the board next to the peg.
Sorry, saw this late.

It's a shown/kind of proven result that deep neural networks don't fall into local minima in the very high dimensional parameter space.

GANs and reinforcement learning are different. Research on getting those to converge to good local minima is still much more in its infancy. I don't particularly consider those just a "neural network", but sorry, I should have been more clear.

This thread is about reinforcement learning which definitely suffers from local minimas.

But even vanilla supervised nets suffer from local minima. Anyone who's played with them has encountered it. Here you can mess around with a neural net live in the browser and it very easily gets stuck if you try more than 3 layers (especially try the spiral dataset): http://playground.tensorflow.org/

That's why I said high dimensional neural networks. There's been a lot of literature explaining why local minima aren't a problem in very high dimension loss surfaces.

Check any of the literature on this subject: https://arxiv.org/abs/1611.06310v2

https://arxiv.org/abs/1406.2572

Local minima are something that people thought was gonna be a problem, especially back in the 2000s. They played around with small neural nets on toy examples such as yours, and thought it was intractable. It's the entire reason why neural nets fell out of the fashion in the early 2000s, and people moved towards techniques like SVM.

These toy examples don't generalize to high dimensions, and if you take a look at the literature, you'll see that the consensus agrees with my statement.

Ehh these theoretical results have questionable application to real life. Sure it might be very easy to learn simple correlations like "this patch of pixels correlates highly with the output '8'". But it's trivial to construct examples where neural nets get stuck in local minimas. For instance, try training a net to multiply two binary numbers.

Maybe with a billion neurons, just by random chance some of them would correspond to the correct algorithm and get reinforced by backprop. But very few NNs have layers larger than a thousand neurons. Because the cost of layers that big grows quadratically. And the chance of random weights finding the solution decreases exponentially.

One of the biggest reasons things like stochastic gradient descent, and dropout are used is because they break local minimas.

The statement "deep neural networks are not affected by poor local minima" is not really a personal opinion/theory at this point; it's the dominating consensus in the research community.

These are not just theoretical results. They're theory papers trying to explain the empirical result of why neural nets don't get stuck at local minima.

> Given that deep networks are highly nonlinear systems optimized by local gradient methods, why do they not seem to be affected by bad local minima?

And other such results.

As I said above, neural nets are obviously able to get stuck in local minima in toy examples. If you read my above comment, you'll see that that has no bearing on my initial statement.

Dropout's main motivation is not to break local minima. It's to achieve better generalization. If it were the case that it was meant to break bad minima, we'd have better training loss upon adding dropout, which is obviously not true.

As for SGD, we used to think that it was mainly for computational purposes. That is, we're unable to batch our entire training set at once, so we have to split into mini batches.

Modern theory states more that SGD is good for avoiding sharp minima, as well as some other desirable properties.

I'm not sure you're really reading my comments thoroughly nor checking out the links, so if you're actually interested in understanding what's really going on, please do some proper research on the topic.

i wonder if something like this is the abstraction where we as humans stop understanding it.

I do know that we define the cost function / the goal of it, but from using evolutionary Technic to build the network, there is only x layers left to add to create any net.

I'm surprised Uber is funding general AI research given their reported financial situation.
Well,this is surprising. Paper doesn't mention image recognotion and voice recognition at all. Is this because they are not interesting for new research or because in theese applications results were worse than that of gradient methods?