Coder Social home page Coder Social logo

Comments (17)

poulson avatar poulson commented on May 8, 2024 1

Hi Field,

Think of an $LDL^H$ factorization as a square-root free Cholesky factorization, where the pivots are stored in the diagonal matrix $D$. Each rank-one update of a right-looking / greedy / variant 3 algorithm are Hermitian and of the form $a_{2,1} \delta_{1,1} a_{2,1}^H$. In the blocked algorithm, they become $A_{2,1} D_{1, 1} A_{2,1}^H$, where $D_{1,1}$ is the diagonal matrix of pivots from the active diagonal block, $A_{1,1} = L_{1,1} D_{1,1} L_{1,1}^H$.

from blis.

chriscoey avatar chriscoey commented on May 8, 2024

Seconding this, but I would suggest further generalizing from diagonal D to symmetric/hermitian.

from blis.

fgvanzee avatar fgvanzee commented on May 8, 2024

@poulson @chriscoey Can you elaborate more on what you have in mind, since I'm unfamiliar with this operation?

Specifically, I'm interested in knowing the structure of A in C += alpha A (D A)^T. (Also, what is an LDL factorization? It's not clear to me how this relates to your request, or if it is strictly unnecessary background / context.)

from blis.

rvdg avatar rvdg commented on May 8, 2024

from blis.

fgvanzee avatar fgvanzee commented on May 8, 2024

@rvdg Thanks, Robert. So is a real domain LDL factorization specified as A = L D L^T?

from blis.

devinamatthews avatar devinamatthews commented on May 8, 2024

@fgvanzee yes. The updates in question are the A -= L D L^T updates for A11, A21, and A22 (depending on variant).

@poulson I implemented C = A D B multiplications (with D diagonal) in TBLIS (interface and implementation). C = A B D is also possible. It should be possible to port this to BLIS and also extend to ?syrk.

@chriscoey we had an undergraduate working on general 3-matrix multiplication. @rvdg did that end up as a usable product?

from blis.

poulson avatar poulson commented on May 8, 2024

@fgvanzee Yes, Robert (@rvdg) already clarified. Such factorizations are especially useful for symmetric quasi-(semi)definite matrices, which are, up to permutation, of the form [A, B; B', -C], where A, and C are Hermitian positive-(semi)definite. In the definite case, one can show bounds (e.g., via Saunders' analysis) on the stability of such factorizations. In practice, Interior Point Methods are built on this type of factorization (with the semidefinite cases modified to be definite).

from blis.

fgvanzee avatar fgvanzee commented on May 8, 2024

I still haven't seen anyone relate C += alpha A (D A)^T and A -= L D L^T. Even after you nix the alpha, harmonize the +/-, and assume A (in the first expression) is unit lower triangular, those don't look like the same operation to me.

from blis.

fgvanzee avatar fgvanzee commented on May 8, 2024

Nevermind, I see now that they are equivalent.

EDIT: No, I take that back. I'm still in doubt.

from blis.

fgvanzee avatar fgvanzee commented on May 8, 2024

Let A = L. I don't see how (D A)^T = D L^T. The lhs applies the diagonal elements to the columns of A^T (because (D A)^T = A^T D) while the rhs applies the diagonal elements to the rows of L^T.

This may seem like minutae, but I like to understand the operation before I think about implementing it.

Note: While I appreciate that there are sometimes rich stories to tell about the applications that employ these operations, I actually don't need to know how the operation is used (it just clutters my brain and doesn't stick anyway). I happily leave such knowledge-keeping to people like @poulson and @devinamatthews. :)

from blis.

fgvanzee avatar fgvanzee commented on May 8, 2024

@poulson I've never heard of a pivoted Cholesky factorization, but I get the idea!

from blis.

poulson avatar poulson commented on May 8, 2024

@fgvanzee The diagonal entries you divide by are sometimes called pivots even if you didn't permute. Per the other question: diagonally-pivoted Cholesky is useful for computing a rank-revealing factorization of a Hermitian positive semi-definite matrix.

from blis.

fgvanzee avatar fgvanzee commented on May 8, 2024

@poulson Ah, thanks for that clarification. I'd never encountered this alternate instance/usage of "pivot." Good to know. (The President might say I am a fake linear algebraist. Although I think he would struggle to even pronounce "algebraist" correctly.)

from blis.

pauldj avatar pauldj commented on May 8, 2024

The D of an LDL' factorization is actually NOT diagonal.
It is block-diagonal, with blocks of size 1x1 or 2x2.

An LDL factorization is like a Cholesky factorization, but for a matrix that is symmetric but not necessarily positive definite. L is unit lower triangular and D is diagonal.

from blis.

poulson avatar poulson commented on May 8, 2024

@pauldj Quasi-diagonal 'D" -- which I find useful to refer to as 'B', as in LBL -- is only needed for the general symmetric/Hermitian-indefinite case. It is provably not needed for symmetric quasi-definite matrices. Indeed, most Interior Point Methods have highly indefinite, highly ill-conditioned sparse systems that they factor with LDL with diagonal D.

from blis.

chuckyschluz avatar chuckyschluz commented on May 8, 2024

I have been looking for an open source implementation of this myself. Intel MKL has two routines to compute A * B * A^T, where A is a general matrix, and B is Hermitian (NOT necessarily positive definite). sypr takes sparse A and B, whereas syprd takes sparse A and dense B. They work very well -- but I have no clue what's going on under the hood.

https://software.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/blas-and-sparse-blas-routines/inspector-executor-sparse-blas-routines/inspector-executor-sparse-blas-execution-routines/mkl-sparse-sypr.html

https://software.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/blas-and-sparse-blas-routines/inspector-executor-sparse-blas-routines/inspector-executor-sparse-blas-execution-routines/mkl-sparse-syprd.html

from blis.

lorentzenchr avatar lorentzenchr commented on May 8, 2024

The original proposal to add an extension to ?syrk to support C += alpha A (D A)^T for general A and diagonal D was once discussed on the mailing list and even has an open PR #536.

I personally would be very interested to have this functionality available. One big use case is for Generalized Linear Models which are fit by an iterative solver. The hessian - required by 2nd order/Newton optimization methods - is given by $X'DX$ where $D$ is a diagonal matrix changing in each iteration and $X$ is a fixed data matrix (going under many names: design matrix, feature matrix, covariates, explanatory variables, …).

from blis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.