Ask HN: In 2022, what is the proper way to get into machine/deep learning?
539 pointsBy getting into machine or deep learning I mean building upto a stage to do ML/DL research. Applied research or core theory of ML/DL research. Ofcourse, the path to both will quite different.
Standing in 2022, what are the best resources for a CS student/decent programmer to get into the field of ML and DL on their own. Resources can be both books or public courses.
The target ability:
1. To understand the theory behind the algorithms
2. To implement an algorithm on a dataset of choice. (Data cleaning and management should also be learned)
3. Read research publications and try to implement them.
Comments (203) 62 threads
Earlier commentsI like Hands-On ML... by Geron as a decent intro to ML book. FastAI seems a bit overrated to me - I didn't like that it uses its own helper library or the teaching style but it obviously works for other people.
Then there's more exhaustive books on theory - Elements of Statistical Learning, Pattern Recognition and Machine Learning, Bayesian Reasoning and Machine Learning, Murphy's books on probabilistic ML etc. But obviously the theory books have a lot of overlap with each other so there will be lots of material to skip after you've read one or two of them.
After completing that, I think Kaggle competitions are a great way to master your skills.
[1] https://course.fast.ai
In my opinion, jump straight into this! Learn prerequisites as you need them.
I found Goodfellow's book [1] to be helpful to learn some basics.
But don't think you need to read the whole book before you start reading and implementing research papers.
If you try and build up all the fundamentals thorougly, you run the risk of going down a very deep rabbit hole e.g. learning real analysis so you can learn measure theory so you can learn measure theoretic probability theory so you can learn stats properly etc.
You can be a productive researcher and patch up the fundamentals over time.
[1] https://www.deeplearningbook.org/
Afterwards, do a statistics class. Most algorithms these days are based on softmax, meaning the cross-entropy between two discrete/continuous probability distributions. There's a lot of choice in which distribution to use to model what and it will have strong effects on your gradients and, hence, training trajectory.
Concepts like shannon information and entropy are also very helpful for you to monitor training progress. Typical loss values will do exponential annealing and it'll be difficult to see further progress. But if you still reduce the bits of entropy in your classifier, learning is still going well. So you need to understand what to visualize and how to calculate that.
As for implementing research publications, maybe start with easy mode and go to paperswithcode.com . There, you will find papers AND their source code, so that you can look at how others implemented their paper.
As for FastAI and Kaggle, my personal impression is that it's mostly for toy problems. No real AI researcher would be willing to disclose their full source code to an international megacorp like H&M for a measly $15k in price money, yet similar terms appear to be the default on Kaggle:
https://www.kaggle.com/competitions/h-and-m-personalized-fas...
https://www.kaggle.com/competitions/dfl-bundesliga-data-shoo...
https://www.kaggle.com/competitions/feedback-prize-effective...
EDIT: Also, I strongly disagree with course.fast.ai on these points: "Myth (don’t need): Lots of math, Lots of data, Lots of expensive computers" To train a state of the art ASR AI, you need roughly 100x A100 for a month, 100,000+ hours of audio recordings, and math knowledge to find a maximum likelihood path through a logit matrix. Unless, of course, you're only working on toy problems.
Do you think there is a distinction between the kinds of problems that take some kind of "raw" signal data (audio, images etc) as input, where deep learning approaches appear to be fruitfully applied, and other kinds of problems that appear in many places in business and the public sector where the input space is not some kind of raw signal data but instead tabular data.
I have heard some people argue that the latter kinds of tabular-data style problems can be effectively tackled with a variety of statistical methods, and that deep learning style approaches do not offer an advantage.
Maybe fast.ai is commenting on the latter class of problem.
So my impression is that fast.ai teaches you how to use AI methods, but with example problems that didn't need AI to be solved well.
They're also very open that areas like ASR and RL take a ton of compute to replicate SOTA. This shouldn't be used to substantiate any sort of criticism of fast.ai the library since it is just wrappers on pytorch. Maybe on the course.fast.ai page they could make some sort of disclaimer that some areas like ASR and yet to achieve the quantum leap of performance that we've seen in other domains.
I disagree completely that fast.ai is for toy problems. It's a development tool that in my experience provides for more rapid iteration than starting in vanilla pytorch. Use it for toys, for challenges, for research, or in industry. You can always rewrite your solution in pytorch once stable if there is benefit in doing so.
I agree with others that fast.ai is a great place to start.
- Text Generation/Transformation: Easy
- Speech Recognition: Medium
- Optical Flow / Depth Recognition: Hard
- Actually controlling robots with AI: Nightmare
All comments shown.
Couldn't load more comments. Check your connection and try again.