Live data from Hacker News

Matrix Multiplication Inches Closer To Mythic Goal

quantamagazine.org

21–30 of 53 posts

Re: Matrix Multiplication Inches Closer To Mythic Goal

#21
post #17

This thought has been churning around in my mind for some years now — we focus too much on processing speed and reductions in time complexity and not enough on increasing the size and efficiency of our cache and stack . MM (especially MM on large type numbers like e.g. hashing algorithms) are very reliant on the cache because you can’t always fit that big of a number into a register. Side note, I was reading some Abs…

> We nevertheless stress that such improvements are only of theoretical interest, since the huge constants involved in the complexity of fast matrix multiplication usually make these algorithms impractical. It's only for mathematical interest

[deleted]

Re: Matrix Multiplication Inches Closer To Mythic Goal

#22
post #20
post #17

This thought has been churning around in my mind for some years now — we focus too much on processing speed and reductions in time complexity and not enough on increasing the size and efficiency of our cache and stack . MM (especially MM on large type numbers like e.g. hashing algorithms) are very reliant on the cache because you can’t always fit that big of a number into a register. Side note, I was reading some Abs…

200ns, not 200ms

[deleted]

Re: Matrix Multiplication Inches Closer To Mythic Goal

#23

Earlier quoted context omitted.

Strassen method is faster than native multiplication, but it is not stable: you will get much larger rounding errors when implementing it using floating point numbers, compared to native multipllication. And fine precision is required for a lot of algorithm implemented using matrix multiplication, such as matrix inversion or gradient descent, so this is often a problem.

do we know if the rounding errors are a big deal for numerical methods that can tolerate inaccuracy (like gradient descent for machine learning)?

You want to converge on a local minimum, don't you? We can't guarantee that with unstable algorithms.

Re: Matrix Multiplication Inches Closer To Mythic Goal

#24

Earlier quoted context omitted.

Strassen method is faster than native multiplication, but it is not stable: you will get much larger rounding errors when implementing it using floating point numbers, compared to native multipllication. And fine precision is required for a lot of algorithm implemented using matrix multiplication, such as matrix inversion or gradient descent, so this is often a problem.

do we know if the rounding errors are a big deal for numerical methods that can tolerate inaccuracy (like gradient descent for machine learning)?

Rounding errors, underflows and instability in floats are very well known problems, a big deal if you do anything but graphics.

Re: Matrix Multiplication Inches Closer To Mythic Goal

#26

Earlier quoted context omitted.

Strassen method is faster than native multiplication, but it is not stable: you will get much larger rounding errors when implementing it using floating point numbers, compared to native multipllication. And fine precision is required for a lot of algorithm implemented using matrix multiplication, such as matrix inversion or gradient descent, so this is often a problem.

do we know if the rounding errors are a big deal for numerical methods that can tolerate inaccuracy (like gradient descent for machine learning)?

It depends. I have seen some algorithms (the example that comes to mind was a clustering) become worse solely due to numerical error.

When that happens, if you are not equiped to measure the numerical error or at least trained to suspect it, you might think that it is just the algorithm that is not working.

Re: Matrix Multiplication Inches Closer To Mythic Goal

#29
The part I don't follow is that I thought multiplication used the same number of CPU cycles as addition, so I didn't get the the part where one multiplication replaced with many additions was obviously better. Could someone explain that part? I feel I must be fundamentally misunderstanding something.

Re: Matrix Multiplication Inches Closer To Mythic Goal

#30

The part I don't follow is that I thought multiplication used the same number of CPU cycles as addition, so I didn't get the the part where one multiplication replaced with many additions was obviously better. Could someone explain that part? I feel I must be fundamentally misunderstanding something.

While that's true for fixed-precision integer arithmetic, this doesn't hold true for floating point multiplication.
Post reply on HN