by imiric · 3y ago · 0 comments
Hopefully something that doesn't require the user to be a math wizard.
I'm not into data science by any means, and I first learned about tensors with Tensorflow. While I would like to experiment with neural nets, the current frameworks require me to learn the foundations of how they work. I'm sure I'll get arguments that this is a good thing, but I just want to do some cool stuff with computers, not take math courses to learn how the cake is made.
High-level programming languages are abstractions to machine code that, for the most part, don't require the user to know how they work internally. I think we're missing similar abstractions for ML, or it's possible they already exist and I haven't looked hard enough.
What is needed are higher-level abstractions over ML principles that make ML more accessible for people who are interested in programming, but lack the math background to be productive. This doesn't necessarily mean that the lower-level details should be entirely hidden, but that the tools are friendly enough for beginners to easily pick up, and flexible enough for advanced users to tweak to their needs.
So abstract away, by all means, ensuring the user doesn’t need to know the Biot-Savart law to use a doorbell is the engineer’s job after all, and as semiconductor electronics show, users can include other engineers. (Hell, even the humble resistor is a fairly advanced piece of technology dependent a good chunk of 20th-century physics.) But sooner or later we’re going to have to pay back this “ed debt”. (“Soc debt”?)
[1] See my recent comment at https://news.ycombinator.com/item?id=34389684 for a starting point for a literature dive.
Going by dates of introduction to determine if a math topic should be part of general knowledge doesn't make sense. Math was highly advanced by the 20th century, and a lot of it was used to advance the field of physics, which led us to the technological advancements we all enjoy today. None of it needs to be fundamentally understood by the layperson.
You sound well versed in math, but most people just don't need this knowledge in everyday life. Precisely because engineers build tools to make everyday life easier for everyone, regardless of education opportunities. Our society couldn't function any other way, and asking for everyone to have advanced math or engineering knowledge is unrealistic.
Derivatives and matrices are high-school math.
We struggled along for 200,000 years without it, so I'd hardly call it an incredible failure that more people don't learn it[1].
[1] The usual disclaimers apply - im not anti-math, and I think more people should learn math, science, etc...
My knowledge embarrassingly stops at Algebra II (USA system).
There are programmers, though, who are not fluent in the math that makes ML possible, but would be empowered by friendlier tools.
I guess it depends a lot on perspective, to me the whole field looks like alchemy more than science. The results cannot be denied, but we understand so little.
Now you have the likes of HuggingFace which is another abstraction on top of Pytorch. Heck you don't even need to code a transformer from scratch. They have done it for you.
from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased") model = AutoModelForMaskedLM.from_pretrained("bert-base-uncased")
I was like wow, this level of abstraction is totally breaking barriers to entry and we will see many many flavours of huggingface in the years to come.
If you want to do research in any branch of ML, you are almost certainly going to need some strong mathematical foundations. At the same time, if you're more interested in applying existing architectures/models, the ecosystem has a lot of really amazing tools that will take you a very long way without requiring you to study statistical learning theory.
They have a course that goes exactly like that (Practical Machine Learning or similar). You start high level with libraries and just a few lines of code, and gives you the high level tools to use ML in your projects, and sometimes goes a bit lower level when needed.
[0] https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/d...
It’s not so much how the cake is made but rather what you are actually doing.
You can already make something cool today by using end products and stringing their api together which might be what you are looking for.
If you want to make something new however and wish to use ML tools, well, at some point, you will have to learn what these tools actually are.
You don’t have to know how the operations involved doing what they’re doing, in the sense that you don’t need to know how matrix multiplication is implemented any more than you need to understand Timsort to call sort() in Python, but you do need to know matrix arithmetic. That isn’t being a math wizard, it’s the price of entry.
Tensorflow doesn't actually have any tensors. At least not in the sense that tensor used to be used before Tensorflow. Tensorflow just has arrays.
See https://en.wikipedia.org/wiki/Tensor for the old, original meaning.
The best tool I've used for vector/matrix processing is MATLAB (or GNU Octave, which is free but without as many libraries). To say I'm disappointed that these never gained the same traction as Python would be an understatement.
Unfortunately, these tools all suffer from a lack of insight from programmers. We abstract whenever possible, but for whatever reason, academics have a certain expectation that the user learn the entire system before starting. I believe that's why functional programming never quite caught on. That egocentric view infects everything from Mathematica/WolframAlpha to UNIX.
I prefer other models. For example, I don't feel that anyone has explored genetic algorithms under the Actor model yet. Which severely limits how fast the user can explore a problem space. Part of that is due to hardware. A GPU may present itself as having X number of teraflops or whatever, but only have something like 64 cores and no API to access them directly like a CPU. Which limits it to a paltry number of environments and/or automatons to evolve.
A better architecture would be something like 1024+ symmetric cores with a unified copy-on-write, content-addressable memory accessible through ordinary C desktop programming and orchestrated with something like Docker. Then we could explore auto-parallelization with languages like Julia and Clojure, possibly even Rust. I've written about that extensively throughout the years, but there's still been no change to the status quo, so I've all but given up on that. I do see a small hope with RISC-V on FPGA though.
The somewhat ironic thing is that AI is evolving so quickly that it's passed the Turing test now for the masses. We only have maybe 5-20 years before it solves all problems better than us. So it's an odd feeling for me to have waited 20 years with no progress on the hardware that I needed to do what I wanted to do, only to make the thing I wanted to do irrelevant anyway. That's the challenge we all face now as play is automated by AI while we still have to go to work and pay rent within a 20th century Matrix reality. I hope we find a way to reverse that trend before we're too old to care anyway.
Ideally, this should all be integrated at the compiler level. Programming languages and their associated standard libraries should expose differentiation as a first-class abstraction, along with everything else.
The problem is that the whole space is really immature, and huge strides are being made... but by many disparate groups, all working in different spaces and languages.
Just in the last few months I read about several Python ML frameworks, a Julia differential compute capability, and that Haskell has a library where even the type system can express differentiation of general algebraic data types!
The whole ecosystem needs to... congeal a little bit.
This whole space reminds me of Object Oriented programming before C++ and Java.
It's not really the same sort of differentiation. Derivatives of algebraic data types (as implementable in Haskell) only generalize formal derivatives of polynomials. You need a lot more machinery before you can talk about smoothness.
Using Tensorflow doesn't require you to know all the details, you build a model of the network, and it actually executes that model. The low level stuff is handled.
You still have to know how to tell when it is working, or not. Properly rationing your training/testing/validation ports of data is surprisingly important for not ending up with a model that seems to work great until you use it in the real world.
Will handcrafted, math used me better.
Very likely.but a VW is good enough for 99 percent of use cases :)
And guess what? It is good life strategy.