News for hackers. Stuff that matters.
Re:Bolt: Faster matrix and vector operations that run on com... by epistasis on Saturday June 18, 2022 @06:06PM (#31794233)
The matrix itself is the operation, too, it's a function from R^n to R^m, and that function is what is approximated by matrix compression.

If you are familiar with PCA or SVD, you are already close to understanding a basic form of compression. SVD breaks down an m x n matrix into an nxn rotation matrix, an nxn diagonal scaling matrix, and a n mxn loadings matrix. The ordering of the new matrices is usually with the highest amount of variability described first. So if you take the first, say, 5 of the n dimensions, and only use them, you can reconstruct an approximation of the original matrix that uses approximately 5/n of the original storage.

PCA is often used in machine learning too, and there is such a deep connection between compression that is hard to make explicit or formalize.

The implementation linked here uses Vector Quantization instead:

https://en.wikipedia.org/wiki/Vector_quantization

Re:Bolt: Faster matrix and vector operations that run on com... by jansan on Saturday June 18, 2022 @06:26PM (#31794364)
The furthest I have come was applying an SVD on a 2D Matrix to find the new axes of a skewed ellipsis, but I think I could follow for most of the part. Thanks.
Re:Bolt: Faster matrix and vector operations that run on com... by epistasis on Saturday June 18, 2022 @07:59PM (#31794894)
Yeah, that's enough to visualize the idea. If you have a mx2 matrix, and you take each row as a point in 2D space, the compression means projecting all the points along the long dimension of the ellipse. If all the points are along a line, then the matrix is perfectly compressible.