← Back to context

Comment by mathisfun123

17 hours ago

This is like saying being a cashier prepares you for a job in high-finance because both involve arithmetic on dollars and cents.

I've been in ML for ~5 years in multiple FAANGs and I have never seen a rotation matrix.

A rotation matrix is but one of dozens and dozens of different types of basic transforms. It gets really fun with jacobian 12x12 matrix operations, and free form deformations. Which maps to ML far better than most imagine.

... and I have been both situations for longer and have seen tons and tons of them (*)... So?

Not so hypotheticals -- Heck the inputs that you want labelled could be rotation matrices. The desired output could be a rotation matrix. Generating more convenient features could be via a rotation matrix. Dimensionality reduction could be through a reduction matrix. Sparsity could be encouraged by proper use of rotation matrices. Shows up if you want to build in group theoretic invariance in your predictive model.

(*) If you consider Householders then even more

I mainly learned linear algebra via hands-on 3D graphics, and have a hard time thinking about a matrix as anything other than 4x4 and representing a linear transform...

How much do you even think about explicit matrix math when doing high-level ML?

  • 3D graphics is so much more than the basic transforms. Add in all the deformation systems blending together, and those often being physics driven off the animation. You all have seen modern VFX, right? That is not basic 4x4 transforms.

  • I’ve not done high level ML, but I’ve done introductory ML and the truth is while the input space and the output space can have N and M dimensions, there’s not a lot of constraints involved. The matrix there are more randoms.

    The whole ML field is basically about starting from random points and trying to find useful shapes and constraints. Basically like trying to get object likeness in clouds

TBF, I bet any graphics programmer would be a boon for a ML shop for their GPU/performance optimization knowledge alone.

Is the linear algebra of machine learning more complicated than that of graphics?

  • Both are large fields with many varied applications of linear algebra (and non-linear math too), and many people trying a lot of interesting & complicated ideas. The question is way too vague to answer meaningfully, it depends on what you mean by ‘graphics’ and by ‘machine learning’ and by ‘linear algebra’ and by ‘more complicated’. ;)

    The linear algebra used in the basic raster pipeline to manage drawing a 3d unshaded mesh is pretty simple, and you can get by knowing just a little bit of linear algebra, like dot products and how to multiply matrices, and maybe what homogeneous coordinates are. But that is by no means the extent of linear algebra in all of graphics.

    The linear algebra used in a basic neural network is also pretty simple, and you can get by knowing dot products and matrix multiply if you’re writing your own inference, and maybe just a tiny bit of derivative calculus if you’re writing your own backprop, but otherwise you don’t need anything else.

    Students in both fields have to learn some basic linear algebra, but most people working in ML & graphics generally don’t use any linear algebra day to day, because most people aren’t writing inference/backprop and most people aren’t writing the graphics pipeline.

    BTW, matrices and linear algebra are pure convenience for neural networks, and maybe for the graphics raster pipeline too. You can do both of these things without using matrices per se (though you might re-invent something equivalent and/or less efficient by avoiding matrices).

  • I'm a data scientist and not a graphics programmer, but my guess is that it's just abstracted away more. If you're using ML/DL libraries, you're mostly just calling APIs that handle the linear algebra and calculus for you. Unless you're actively contributing to those libraries, you likely don't ever need to "touch" any of the underlying operations. Up to a point, it's useful to understand how things work under the hood, but where that point is kinda depends on your job. For instance, I could write code to do 'naive' matrix multiplication, but I couldn't, like, contribute to BLAS.

5y multiple fang? Dont you know it is MANGOs now and has been for a while. Are you sure it is FAANGs?