Project DelphiTensors Workshop

The alternating structure survives

With every factor but one held fixed, m is linear in the remaining factor, and each of these losses is convex in m. A convex function of a linear function is convex, so each subproblem is still convex — the guarantee deep dive 14 leant on.

What is lost is the closed form. There is no pseudoinverse for a Poisson loss, so each subproblem is solved numerically.

You need not even alternate: the gradient for a whole factor matrix is the unfolded ∂f/∂M times the Khatri–Rao product of the other factors — the same unfolding and product ALS used — so the notebook hands every factor at once to scipy’s L-BFGS-B. It is slower: several hundred iterations instead of forty ALS sweeps.