It’s the log partition function of a CRF, computed with a differentiable dynamic programming algorithm with torch-struct, which I want to differentiate (3x) w.r.t. input log edge/node potentials  I can give you more details but I don’t know if they’ll be relevant?