I've never really understood the point of Einstein notation, as a piece of mathematical notation. Is writing something like A[i, j] * B[j, k] really that much faster than writing something like Sum[j](A[i, j] * B[j, k])? Especially when you have to check the left hand side of the equality sign just to know which indices to sum over, it seems like making things less clear for a minuscule saving on ink.
Yes, it's incredibly faster. You do a lot of tensor algebra in a relativity class.
Einsum Is All You Need – Einstein Summation in Deep Learning (2018)
11–20 of 50 posts
Re: Einsum Is All You Need – Einstein Summation in Deep Learning (2018)
#12I've never really understood the point of Einstein notation, as a piece of mathematical notation. Is writing something like A[i, j] * B[j, k] really that much faster than writing something like Sum[j](A[i, j] * B[j, k])? Especially when you have to check the left hand side of the equality sign just to know which indices to sum over, it seems like making things less clear for a minuscule saving on ink.
Re: Einsum Is All You Need – Einstein Summation in Deep Learning (2018)
#13I've never really understood the point of Einstein notation, as a piece of mathematical notation. Is writing something like A[i, j] * B[j, k] really that much faster than writing something like Sum[j](A[i, j] * B[j, k])? Especially when you have to check the left hand side of the equality sign just to know which indices to sum over, it seems like making things less clear for a minuscule saving on ink.
Doing tensor magic without einstein notation will make you shoot yourself, and even you don't someone else will if publish it.
The only real problem I have with it personally is the abstraction of upper and lower indices, which I constantly forget the conventions as to which is which.
Re: Einsum Is All You Need – Einstein Summation in Deep Learning (2018)
#14I've never really understood the point of Einstein notation, as a piece of mathematical notation. Is writing something like A[i, j] * B[j, k] really that much faster than writing something like Sum[j](A[i, j] * B[j, k])? Especially when you have to check the left hand side of the equality sign just to know which indices to sum over, it seems like making things less clear for a minuscule saving on ink.
Re: Einsum Is All You Need – Einstein Summation in Deep Learning (2018)
#15Earlier quoted context omitted.
Yes, it's incredibly faster. You do a lot of tensor algebra in a relativity class.
To the point where writing one large sigma and listing indices under it at the start of each line would significantly slow you down? I found I had to do this mentally during my own relativity class, just to figure out what each expression meant.
Yes (in my relativity & QFT classes). But the timesaving aspect was not that important for me. The notation enabled the intuition of “zipping” together these somewhat unwieldy mathematical objects, and that was the clincher.
Re: Einsum Is All You Need – Einstein Summation in Deep Learning (2018)
#16I remember when I was learning matrix calculus and realized at some point that it was much simpler to convert everything to index notation, perform all operations, then convert everything back to standard notation at the end. It became almost comically simple, because you're "just" working with labeled scalars at that point. To be fair, it's convenient to memorize some of the more commonly used expressions (like ∂tr(…
Re: Einsum Is All You Need – Einstein Summation in Deep Learning (2018)
#17Re: Einsum Is All You Need – Einstein Summation in Deep Learning (2018)
#18How do you einsum convolution? Arguably the single most important linear operation in deep learning?
Re: Einsum Is All You Need – Einstein Summation in Deep Learning (2018)
#19I've never really understood the point of Einstein notation, as a piece of mathematical notation. Is writing something like A[i, j] * B[j, k] really that much faster than writing something like Sum[j](A[i, j] * B[j, k])? Especially when you have to check the left hand side of the equality sign just to know which indices to sum over, it seems like making things less clear for a minuscule saving on ink.
Absolutely yes. Doing tensor magic without einstein notation will make you shoot yourself, and even you don't someone else will if publish it. The only real problem I have with it personally is the abstraction of upper and lower indices, which I constantly forget the conventions as to which is which.
Re: Einsum Is All You Need – Einstein Summation in Deep Learning (2018)
#20How do you einsum convolution? Arguably the single most important linear operation in deep learning?
TL;DR: It can be represented easily using Einstein notation. Einstein notation just does not capture the sparsity properties we like; it represents the transformation properties quite nicely.