Ask HN: What are the foundational texts for learning about AI/ML/NN?
I've picked up the following, just wondering what everyone's thoughts are on the best books for a strong foundation:
Pattern Recognition and Machine Learning - Bishop
Deep Learning - Goodfellow, Bengio, Courville
Neural Smithing - Reed, Marks
Neural Networks - Haykin
Artificial Intelligence - Haugeland
113 comments
[ 0.83 ms ] story [ 224 ms ] thread(there's also "Elements of Statistical Learning" which is a more advanced version)
AI: A Modern Approach - https://aima.cs.berkeley.edu/
https://www.youtube.com/playlist?list=PLoROMvodv4rOzrYsAxzQy...
The explanation, examples, projects, math- all are crisp.
As the name suggests, it is only an introduction (unlike CLRS). And it does serve as a great beginners' book giving you proper foundation for the things that you learn and apply in the future.
One thing people complain about is it being written in R, but no serious hacker should fear R, as it can be picked up in 30 minutes, and you can implement the ideas in Python.
As someone with industry experience in Deep Learning, I will recommend this book.
The ML course by Andrew Ng has no parallel, though. One must try and do that course. Not sure about the current iteration, but the classic one (w/ Octabe/MATLAB) was really great.
While having strong mathematical foundation is useful, I think developing intuition is even more important. For this, I recommend Andrew Ng's coursera courses first before you dive too deep.
The main concepts are matrix multiplication and derivatives and their significance. Then you can dig into the specifics and review or expand your knowledge as needed.
http://codingthematrix.com/
https://www.youtube.com/playlist?list=PLEhMEyM9jSinRHXJgRCOL...
Also proba/statistics! Without those you can end up doing stuff pretty wrong
The first chapter walks through a neural network that recognizes handwritten digits implemented in a little over 70 lines of Python and leaves you with a very satisfying basic understanding of how neural networks operate and how they are trained.
But there's are both kinda old now, so there must be something newer that'll give you an equally good intro to transformers, etc.
You are approaching this like an established natural sciences field where old classics = good. This is not true for ML. ML is developing and evolving quickly.
I suggest taking a look at Kevin Murphy's series for the foundational knowledge. Sutton and Barto for reinforcement learning. Mackay's learning algorithms and information theory book is also excellent.
Kochenderfer's ML series is also excellent if you like control theory and cybernetics
https://algorithmsbook.com/ https://mitpress.mit.edu/9780262039420/algorithms-for-optimi... https://mitpress.mit.edu/9780262029254/decision-making-under...
For applied deep learning texts beyond the basics, I recommend picking up some books/review papers on LLMs, Transformers, GANs. For classic NLP, Jurafsky is the go-to.
Seminal deep learning papers: https://github.com/anubhavshrimal/Machine-Learning-Research-...
Data engineering/science: https://github.com/eugeneyan/applied-ml
For speculation: https://en.m.wikipedia.org/wiki/Possible_Minds
https://books.google.com/books/about/Neural_Smithing.html?id...
Take a look at the Google Books preview (click view sample). The basics are all there, intro to biological history of neural networks, backpropagation, gradient descent, and partial derivatives etc. It even hints at teacher-student methods!
The only issue is that it missed out on two decades of hardware development (and a bag of other optimization tricks). Modern deep learning implementations requires machine sympathy at scale. It also doesn't have any literature on autoregressive networks like RNNs or image processing tricks like CNNs.
While it does cover minimax trees, alphabeta etc, it only really provides a very brief overview. The book is more of an overview of the AI/ML fields as a whole. Game playing AI is dense with various game-specific heuristics that the book scarcely mentions.
Not sure about books, but the best resource I've found on at least chess AI is chessprogramming.org, then just ingesting the papers from the field.
Artificial Intelligence, a modern approach – Stuart Russell, Peter Norvig
Now I think you've got key parts. There's how to use recent production ready models/systems, how to train them and how to make them. Is it in a research or business context?
The field is also broad enough that any one section (text, images, probably symbols) and subsection (time series, bulk, fast online work) all have significant bodies of work behind them. My splits here will not be the best currently so I'm happy for any corrections on a useful hierarchy by the way.
Perhaps you're interested in the history and what's led up to today's work? That's more of a "brief history of time" style coverage, but illuminating.
I'm aware I've not helpfully answered, but I think the same question could have very different valid goals and wanted to bring that to the fore.
I adore PRML, but the scope and depth is overwhelming. LfD encapsulates a number of really core principles in a simple text. The companion course is outstanding and available on EdX.
The tradeoff is that LfD doesn't cover a lot of breath in terms of looking at specific algorithms, but your other texts will do a better job there.
My second recommendation is to read the documentation for Scikit.Learn. It's amazingly instructive and a practical guide to doing ML in practice.
You'd need the following background:
- Linear Algebra
- Multivariate Calculus
- Probability theory && Statistics
Then you need a decent ML book to get the foundations of ML, you can't go wrong with either of these:
- Bishop's Pattern Recognition
- Murphy's Probabilistic ML
- Elements of statistical learning
- Learning from data
You can supplement Murphy's with the advanced book. Elements is a pretty tough book, consider going through "Introduction to statistical learning"[1]. Bishop and Murphy include foundational topics in mathematics.
LfD is a great introductory book and covers one of the most important aspects of ML, that is, model complexity and families of models. It can be supplemented with any of the other books.
I'd also recommend doing some abstract algebra, but it's not a prerequisite.
If you would like a top-down approach, I recommend getting the book "Mathematics of Machine Learning" and learning as needed.
For NN methods, some recommendations:
- https://paperswithcode.com/methods/category/regularization
- https://paperswithcode.com/methods/category/stochastic-optim...
- https://paperswithcode.com/methods/category/attention-mechan...
- https://paperswithcode.com/paper/auto-encoding-variational-b...
For something a little bit different but worth reading given that you have the prerequisite mathematical maturity
- Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges | https://arxiv.org/abs/2104.13478
[1] https://www.statlearning.com/
Many thanks to the user "mindcrime" for catching my error with Introduction to statistical learning.
If you just want to apply well known things to well known things, sure you’re right. But as soon as things go wrong, I couldn’t imagine how much more inefficient my iteration cycles would be trying to do novel work without understanding linear algebra (for some kinds of novel work) or calc (for other kinds of novel work). I think you kinda get at this when you say it’s not necessary but it helps. It’s not necessary, but it helps a lot with anything off the beaten track.
And certainly, if you're one of those people who can pull it off, studying ML from first principles is probably an advantage. I just wince every time since I wouldn't have gotten into ML in the first place if I had to start with a big Calculus tome. There are probably a lot of people like me out there.
Here are a couple of errors that stem from a single foundational problem:
- a linear regressor can not be more than the number of datapoints
- dimensionality reduction when you have NxM with M > N is bogus and you need a bigger dataset to do anything meaningful other than clustering
- input dimension of output layer is larger than the number of samples
The underlying issue in all of these is the rank nullity theorem which is pretty foundational for ML, and yet many practitioners don't know about it or haven't made the connection.
I am not expressing that you should have gone through Spivak or build bottom up. There are books like mathematics of ML that condense everything you need, giving you a decent enough foundation for what you will need.
A linear regressor can not have more parameters than the number of data points.
This is such a dangerously absurd claim.. but then, it speaks volumes about the abysmal state the non-research heavy AI/ML field has fallen into.
Was that supposed to be An Introduction to Statistical Learning[1] or maybe Introduction to Statistical Relational Learning[2]? I don't think there is a book titled Introduction to Elements of Statistical Learning?
[1]: https://www.statlearning.com/
[2]: https://www.cs.umd.edu/srl-book/
But is also available online as a preprint here: https://mlstory.org/
Understanding Machine Learning: From Theory To Algorithms – Shai Shalev-Shwartz
In the opening chapter Jaynes describes a hypothetical system he calls “The Robot”. He then lays out the mathematics of the “The Robot’s” thinking in detail: essentially Bayesian probability theory. This is the best summary of an ideal ML/AI system I’ve come across. It’s also very philosophically enlightening.
It's a good book, but I don't know how it's related to ML. My own answer would be "Just do it." Find an ML project you like and start tinkering around. But everyone learns differently, so maybe there's a book that can replace experience.
I've been doing it since early 2019 and there are still subtleties that catch me off guard. Get back to me when you're not surprised that you can get rid of biases from many layers without harming training.
I broadly agree with you, but the timeline was just a little too aggressive. By about 10x. :)
That's true of every non-trivial discipline. I often learn subtleties about programming languages and hobbies I've been dealing with for decades.
You can figure out the bias thing after about a month (or so) of hands on practice. Do one Kaggle seriously and it'll become pretty clear, pretty quickly.
given that:
- you already know Python/any programming language properly
- you already know college level math (many people say you don't need it, but haven't met a single soul in ML research/modelling without college level math)
- you know Stats 101 matching a good uni curriculum and ability to learn beyond
- you know git, docker, cli, etc.
Every influencer and their mother promising to teach you Data Science in 30 days are plain lying.
Edit: I see that I left out Deep RL. Let's keep it that way for now.
Edit2: Added tree based methods. These are very important. XGBoost outperforms NNs every time on tabular data. I also once used an RF head appended to a DNN, for final prediction. Added optimizers.
Are these still relevant in the age of Deep Neural Networks?
Different problems require different solutions.
Sometimes, an NN would be overkill.
And stakeholders in many situations would like insights why the prediction is what it is. NNs are miles behind LogReg in terms of interpretablity.
k-means is still great when you have prior/domain knowledge about the number of groups.
But yes these algs are the basis of a lot of more modern algorithms.
A deep NN won't do unsupervised clustering for ex, and NNs perform more poorly than simpler models on small datasets
The book assumes limited knowledge (similar to what is required for Pattern Recognition I would say) and gives a good intuition on foundational principles of machine learning (bias/variance tradeoff) before delving to more recent research problems. Part I is great if you simply want to know what are the core tenets of learning theory!
Much of old theory is barely applicable and people are, understandably, bewildered and in denial.
If someone were to be inclined to theory, I'd just recommend reading papers that don't try oversimplify the domain:
https://arxiv.org/abs/2006.15191
https://arxiv.org/abs/2210.10749
https://arxiv.org/abs/2205.10343
https://arxiv.org/abs/2105.04026
Anyways, I still believe that learning foundational stuff such as the bias-variance tradeoff is useful before diving to more advanced stuff. I even think that tackling recent research question with old tool is insightful too. But that's only my opinion, and perhaps I'm in denial :)
https://math.mit.edu/~gs/learningfromdata/
https://psycnet.apa.org/record/1988-97441-000
Any more recommendations?
PS: You might find Vehicles: Experiments in Synthetic Psychology by Valentino Braitenberg interesting if you don't already know of it.
I have not applied this technique to AI/ML/NN specifically, but it has been useful for me when trying to learn other topics.