Ticket #19 (closed defect: fixed)
LBFGS two-loop recursion bug
|Reported by:||dmdunla||Owned by:||dmdunla|
This was reported by Jennifer Erway:
It looks to me like the matlab code lbfgs.m in the Poblano toolbox v1.0 isn't quite correct. In it, there's the following to update the stored vectors:
S = [sk S(:,1:end-1)];
Y = [yk Y(:,1:end-1)];
rho = [rhok rho(1:end-1)];
Your newest sk, yk, and rho are stored in the first entry of each array; the oldest vectors are at the end.
In the first part of the two-loop recursion, I think you want to process the newest vectors first, which in this case appear at the beginning of the vector and not at the end of the vector; however, it looks to me like you are actually processing the oldest vectors first. Similarly, the second half of the two-loop recursion should process the oldest vectors first and the newest last; however, it looks like the code is doing the opposite. (I believe the Sandia Report (pdf) is correct, but it looks to me that the code isn't doing this.) I think the fix is to change the two-loop counters to count in the opposite directions than they current do or change the way that S, Y and rho are updated.