13 ms·
Looking at the paper was pretty disappointing. "Comparison of training time per epoch (in seconds), of plausible alternatives of linear system solver on TPU" li
by ChrisRackauckas 5y ago
Looking at the paper was pretty disappointing. "Comparison of training time per epoch (in seconds), of plausible alternatives of linear system solver on TPU" lists CG, Cholesky, LU, and QR. It sounds like this method is a viable alternative to LU or QR factorizations from a cursory read?
No, and what started tipping me off is that those methods are not comparable because CG and Cholesky are only for positive semi-definite matrices, so while it's not mentioned anywhere else, the fact that this method works with these factorization techniques means the matrices that they are looking at fall into a very small subset of special matrices. Even then, the subset is even smaller because CG works sufficiently well here without preconditioning, so the method is for not too ill-conditioned positive semi-definite matrices? And for such papers in matrix factorization, there's always some kind of discussion about numerical stability: what pivoting strategies are used, how the pivoting decreases the numerical error growth rate, with empirical studies based on the conditioning of the matrix. Because none of this is done, and in fact the exact opposite is done by emphasizing the BFloat16 precision, gives me no indication that you can have eigenvalues 1e-15 apart and have this work.
Using low precision arithmetic doesn't necessarily mean you cannot get sufficiently good results, there's a whole body of work in mixed precision algorithms. I'd point to Nick Higham's fantastic work on mixed precision matrix logarithms as a very nice example and read: https://www.maths.manchester.ac.uk/~higham/talks/essam18.pdf https://www.maths.manchester.ac.uk/~higham/talks/essam18.pdf https://epubs.siam.org/doi/10.1137/17M1129866 https://epubs.siam.org/doi/10.1137/17M1129866. But this paper discusses nothing about precision or error, shrugs it off, and doesn't even empirically measure the error in the 365mil case?
"Large-Scale Factorization of Well-Conditioned Positive Semi-Definite Matrices with TPUs" would be a much clearer title then. All of this doesn't mean it's not useful, it just means it's useful for a very specific class of problems and presenting it as a viable alternative to LU or QR factorization is pretty... out there.
- dchftcs 5y agoIf solving systems of linear equations is a stronger priority they'd produce hardware with more precision. Unfortunately this is just an offshoot from a machine-learning driven project. But at least the timings could tell you how much value people can gain by implementing their own hardware solution.
- dekhn 5y agogoogle's entire quest in machine learning has simply recapitulated the previous development of high performance computing. that is, ML is just the same kind of problems the physicists were doing on supercomputers, and google is slowly getting to the point of recognizing their ML problems are just supercomputer problems. Expect larger floats in TPU hardware eventually.
- gwern 5y agoTPUs are for DL, not matrix factorization, even if you might want to try that out since you have TPUs sitting around. The trend in DL has for a decade now been to ever lower precision (and many expect binary at some point and a shift away completely to spiking); why are you convinced that it will not just stop but completely reverse and go all the way to like FP64 or FP128 or something?
- dekhn 5y agoBecause I used to work at Google on TPUs with all the teams (from ads to Physics), and have about 30 years experience in high performance computing. Neural nets and DL are just one of the reasons to use TPUs; in the future, they might not even be the preeminent approach. DL is just one part of the much larger world of HPC, it's been very effective, but I expect that as things evolve people will rediscover the value of deep precision. https://arxiv.org/abs/2009.06489 https://arxiv.org/abs/2009.06489
- gwern 5y agoIf anyone is curious, https://www.gwern.net/docs/ai/2021-jouppi.pdf#page=5 https://www.gwern.net/docs/ai/2021-jouppi.pdf#page=5 provides a breakdown of TPU workload by type. I disagree with Hooker's hardware lottery thesis for the simple reason that if it was true, she would be able to point to examples of DL-competitive methods which use the same amount of FLOPS to get much superior results (because everyone is so badly neglecting them due to the 'lottery'), or at least show better scaling curves so that they will at some point surpass DL, but at much worse wallclock due to whatever hardware specializations favor DL and penalize those alternatives. This is how DL operated: they ran on CPUs, very slowly compared to GPUs, but they did run, enabling eventual exploitation of GPUs. And that is how they could start a virtuous circle: the success of DL, because it's the right thing, starting from hardware not even remotely designed for DL (like 2010-era GPUs were not) and designed to favor other tasks (classic GPGU stuff) has pulled hardware in its wake. So, what are the DL-like things running on CPU or contemporary GPUs? The only actual example Hooker gives is capsule networks - which I thought were doomed when they were unveiled, a poor attempt at stuff soft attention did better already, and have not impressed anyone in the 5 years since, particularly as larger NNs (whether CNN, Transformer, or MLP) continue to deliver what capsnets promised. Nor have any more compelling examples arisen in the years since. With no examples or comparisons, it boils down to nothing much.
- mjburgess 5y agoThis special case is a common recommendation situation, for a matrix X of (unit) user-vectors (whose entries are, eg., preferences for products/1)... then X^TX compares all users with all other users.
- 6gvONxR4sf7o 5y ago> presenting it as a viable alternative to LU or QR factorization is pretty... out there. They aren’t presenting it as that. I think you’re just reading it with the wrong lens. “Matrix factorization” in machine learning isn’t the same problem as “matrix factorization” in numerical linear algebra. In the linear algebra world, you’re trying to essentially keep the matrix, but get it in a different form. In the ML world, you’re trying to learn to predict something. In general, your loss function isn’t even over all the cells of the matrix (only minimize prediction error over entries where user i actually watched movie j). So the closest numerical linear algebra problem would be factoring a matrix where 99% of the entries are NaN.