Autograd node for the cofactor matrix cof(A)=∇det(A) in its singular-safe SVD form — what [[DetBackward]] records when the batch holds a singular matrix, so det differentiates twice there too.
The cofactor map is the gradient of det, so its vector-Jacobian
product is the Hessian of det applied to G, and that Hessian is
symmetric: the backward is the directional derivative of cof
along G. With A=Udiag(s)V⊤, α=detUdetV and G′=U⊤GV,
dcof(A)[G]=αU(diag(Qdiag(G′))−Q⊙G′⊤)V⊤,Qij=[i=j]m=i,j∏sm,
which takes no division, so it holds at any rank. A third derivative
through it is not implemented.