Jc. Gilbert et J. Nocedal, AUTOMATIC DIFFERENTIATION AND THE STEP COMPUTATION IN THE LIMITED MEMORY BFGS METHOD, Applied mathematics letters, 6(3), 1993, pp. 47-50
It is shown that the two-loop recursion for computing the search direc
tion of a limited memory method for optimization can be derived by mea
ns of the reverse mode of automatic differentiation applied to an auxi
liary function.