Hacker News new | ask | show | jobs
by eli_gottlieb 3604 days ago
Because it's been just about 10 years since they figured out how to:

1) Use convolutional layers, ReLUs, and a few other tricks to ameliorate the vanishing gradient problem,

2) Perform continuous, high-dimensional stochastic gradient descent on graphics cards, and

3) Apply these things via stochastic grad-student descent to sufficiently massive datasets that even the most brute-force models and training methods (backpropagation of errors on a loss functional) can actually work.

In the meantime, the hardware for doing it has become commoditized and the software has consolidated and become standardized. So now it's A Thing in industry.

There are lots of "smarter" algorithms that almost definitely come closer to human cognition, for instance probabilistic program induction. But those aren't fast, and don't always neatly separate training from prediction: you're just not gonna be able to train those models ahead-of-time on a 10,000 image corpus inside a single week with today's hardware and software.

We need to find ways to make machine learning fast even when it's not just a bunch of matrix multiplies. Otherwise, every time we make our algorithms more interesting, we cripple ourselves computationally.

7 comments

I'm concerned about something similar, where a lot of AI techniques seem to be rushing toward a local maximum:

* AI researchers do things that get good results faster out of Nvidia cards

* Nvidia makes their cards faster at the things AI researchers are doing

It's getting good results. We sure are going up this gradient quickly. But I don't think it's going to get us to a global maximum.

Human consciousness itself is probably a local maximum. Not necessarily a bad thing to see how far a certain process can get you as long as you keep getting results.

At least until there's some other insight along the way.

If not countered, we have a genetic algorithm that may attempt to move our far descendants out of the local maximum. Plus we can change the environment, both locally and just move into space.
I agree w/ you about moving up a gradient quickly w/ the "GPU manufacturing <-> deep learning research" feedback loop. I think it could last a while though. One really important area of research is figuring out how to take better advantage of greater capacity. Also, how to do more with fewer training samples (0 shot, 1 shot, etc learning). Then there's reducing the precision of the units you're using to increase capacity through software. Applying these algos to video, audio, media generation, and others will eat up all the resources you can throw at it; the algos today could take advantage of larger capacity when applied to time-series. There's so much going on that I don't see it slowing down for at least 3-5 years.

Also, I'd like to point out that we've seen some big breakthroughs in the past 10 years. But for the past 10 years, the whole field of deep learning has been looked at with skepticism and has been very niche. Over the past couple of years, a lot of money and resources have been put in place to pursue this area of research. More money doesn't necessarily mean more results, but there are many many more people working on these problems than ever before. A lot of them are legitimately brilliant researchers in the prime of their careers. I think there's still more to see.

I am concerned about an Nvidia monopoly around deep learning hardware. They give away tons of free cards to deep learning research groups, but at some point they'll want people to start buying. I assume they expect that will be the enterprise set, but if suddenly they manage to move all their capable deep learning cards to Teslas only (which have a huge markup), it will put the hobbyist deep learning developer at a big disadvantage. The only check and balance on that is the fact that Nvidia makes cards for gamers too, and gaming card competition is still somewhat robust, so any technology that gives enterprise a big boost will probably make its way to their flagship gaming cards quickly. Nvidia's only real competition, AMD, is so far behind that they might as well not be in the business. As someone who usually roots for the underdog, it pains me to see AMD fumble so badly in this whole area.

Quantum computing could be a new hill, but I think that's a ways out and I don't know enough about the topic to speak with any real confidence.

As someone who does (non-NN) ML on AMD, I might ask why you think that AMD is so far behind. In my experience, their GPU hardware is excellent, maybe even better than Nvidia, especially if you factor the price in. Where they ARE lagging heavily is:

1. GPU as a service: While all major providers (AWS, Azure) offer Teslas on their servers, there is no AMD on the cloud (that I know of)

2. Key libraries: Nvidia comes with matrix libraries and cuDNN out of the box, while for AMD, there are only open source offerings that are a bit difficult to manage.

But, If you write your own software or rely on open source, AMD is quite performant and affordable. The problem is that it is really obscure. So, yes, they are really bad at marketing and if you are looking at them as a user instead of as a developer, they are invisible.

I think I agree with everything you just said.

AMD hardware is more or less the same as Nvidia; Nvidia doesn't really have any special sauces or patents that make their cards better than AMD. And you're right: in a lot of benchmarks, AMD is either faster or (at least) better-bang-for-buck than Nvidia.

Yet AMD doesn't have community support in software or cloud adoption or key libraries. The deep learning community has gone for what's easiest to work with and most readily available. Even though you might conceivably get some performance gain from AMD, it's outweighed by the amount of software that's been written in CUDA already, and how quickly that allows you to move.

Nvidia has taken an early lead and jumped on it, while AMD has only fallen further behind. I think one company just fundamentally understands the trend more than the other. But, for what is essentially hardware that answers the question, "how fast can you do matrix multiplication?", library support becomes a key differentiator. And that's where AMD is behind.

The key libraries part has kept me wondering. How much would it cost for AMD to assign a handful heavy duty engineers to this task (writing AMD optimised kernels for convolution etc)?

Their management has been fast asleep for at least 2 years

That is a part of the problem: they assigned people for the task, and produced open-source libraries for matrices, FFT, maybe even something for DNNs. But, those are not polished much, and you have to hunt them down and install them yourself. And, they do a really bad job at marketing.

On the other hand, finding and installing those libraries is nothing compared to actually developing GPU computing software, so, as I said, if you want to program GPUs, even such scattered state of AMD platform is not that worse than Nvidia. Because, in Nvidia, you install CUDA and you get everything set up. And then - what do you do? You still have to learn a not-so-easy black art of optimizing kernels for the actual hardware.

I haven't seen CuDNN equivalents (in terms of perf) for common machine learning frameworks from AMD. I don't think they exist, if they did, people would shift to using AMD.

For NVidia I have seen some faster kernels than the ones supplied by NVidia - https://github.com/NervanaSystems/neon - though CuDNN introduced Winograd kernels too in their last update

AMD doesn't care about Deep Learning, or ML at all. To quote:

And in the case of the dollars spent on R&D, they seem to be very happy doing stuff in the car industry, and long may that continue—good luck to them. We're spending our dollars the areas we're focused on[1]

To be clear, stuff in the car industry is "just" stuff like self driving cars[2][3].

[1] http://arstechnica.co.uk/gadgets/2016/04/amd-focusing-on-vr-...

[2] https://blogs.nvidia.com/blog/2016/05/06/self-driving-cars-3...

[3] http://www.nvidia.com/object/drive-px.html

> We sure are going up this gradient quickly. But I don't think it's going to get us to a global maximum.

Yes, however, this process has the nice side effect of spurring a huge interest in fundamental AI research, which will lead to alternative algorithms that ultimately perform better.

Wait, how? It seems to me that it gives people an easy way to focus on one area of AI, saying "Guess we didn't need fundamental AI research after all".
Convolutional layers have been around longer than that and don't have much to do with the vanishing gradient problem, which was never that big a problem to begin with. ReLUs are helpful, but they do not lead to THAT big of a speedup. Convolutional layers have definitely had a big impact for accuracy in image problems and sound problems. I think #2 is very important; they speed up both training and evaluation by a factor of 100 compared to a modern CPU.

None of these developments really explain why AI has become so popular though. Neural nets don't actually perform very well for most problems (image and speech problems being the major exceptions) compared to tree-based methods. I think it has more to do with the development of easy-to-use machine learning libraries as well as distributed processing libraries and hardware.

Consciousness of Things is an inevitable conclusion for humanity. The singularity is upon us with the advent of man merging into machine. We are driving that growth to go to the next level.

Also, containerization.

Most of what we call 'AI' today is just fancy regression methods. No need to be so grandiose.
I'm pretty sure that comment was completely facetious. Note that The Singularity got lumped together with Docker containers.
Don't forget CoT vis-à-vis IoT.
I lol'ed. Thank you for this.
>Convolutional layers have been around longer than that and don't have much to do with the vanishing gradient problem, which was never that big a problem to begin with. ReLUs are helpful, but they do not lead to THAT big of a speedup. Convolutional layers have definitely had a big impact for accuracy in image problems and sound problems.

They're essentially an informed prior on image and sound problems, which vastly reduces the size of the parameter space and thus makes both vanishing gradient and overfitting less of a problem.

> they speed up both training and evaluation by a factor of 100

The factor is more like 5-10x for truly optimized CPU versus GPU in fp32 (e.g., nnpack on CPU versus cuDNN).

I'm basing that number on https://github.com/jcjohnson/cnn-benchmarks. I'm sure the exact number depends on the cpu/gpu/algorithm.
im2col + sgemm on CPU as in Caffe for instance is really slow; you are heavily penalized for extra memory traffic and the sgemm tile sizes are probably not well tuned for the problem size at hand.

At the roofline of performance, the difference in both mem b/w and arithmetic throughput between CPU and GPU is only 5-10x (for fp32, Pascal fp16 is a different story of course), and proper implementations on the CPU will get you there.

https://github.com/Maratyszcza/NNPACK

nnpack is excellent - but also very new. Noticed it just got NEON optimisations for Arm- do you know if it's possible to use it together with OpenCL on mobile for combined CPU/GPU inference?
I'm definitely going to use that stochastic grad student descent line.
It's a standard-issue joke at this point ;-).
> There are lots of "smarter" algorithms that almost definitely come closer to human cognition

Source?

4) Frameworks and libraries have improved a lot and are available as open source. Having a lower barrier of entry helps.
I've been thinking a lot about this lately, especially as I've been learning more about the difference between "nice" optimization problems with differentiable cost functions, and "messy" optimizations with less ideal cost functions.

Is there any reading material you can recommend on the recent history of ML/AI for someone like me, with a dilettante's understanding of these problems and an interest in optimization?

https://arxiv.org/abs/1404.7828

(Disclaimer: I don't know that much about ML/Deep Learning, the above was recommended by deeplearning.net and is what I'm slogging through ATM. I do have some background in "classical" statistics & optimization theory, and the above article is not that math-heavy)

Thank you!
Quantum computing can technically create a complete paradigm shift as it increases to computing power drastically. well, in theory at least