[Insight-users] LBFGSB optmization

Ruben Schilling r.b.schilling at googlemail.com
Tue Apr 17 09:17:29 EDT 2007


Hi all,

I am currently optimizing a multi-modal affinely preregistered image  
with BSplines. I use the example DeformableRegistratrion8.cxx, where  
I have modified some parameters. For example I have changed the  
MaximumNumberOfEvaluations and Iterations to 1000. I have also  
reduced the number of pixels sampled for mutual information to 5%  
instead of 10%, because I have about 50,000,000 pixels and the  
program crashes with a bad_alloc if I use 10% of the pixels (no one  
answered on that bug).

I ran into something strange though, which I hope someone can explain  
to me:

I thought the convergence criteria for the LBFGSB optimizer were

(1) projected gradient is lower than the value set via the  
SetProjectedGradientTolerance() Method

(2) cost function is higher than machine precision * factor, where  
factor is set with SetCostFunctionConvergenceFactor ()

I got this information from a thread from 2004 from the insight list.

I don't exaclty know what "machine precision" means in this context,  
but I guess it is something like the highest/lowest floating point  
number supported by hardware in IEEE floating point precision. This  
would mean, that "machine precision" would relate to one number in  
the order of 2^128 for positive values and one in the order of 1-2^24  
for negative values.

Now consider two experiments, in one I got the following:

I set   	optimizer->SetCostFunctionConvergenceFactor( 1e+4 );
and 	optimizer->SetProjectedGradientTolerance( 1e-9 );

in one experiment I used a diffusion filtered image to help mutual  
information with the noise and my registration stopped after the  
first iteration.

The first column is the iteration number, the second the 'optimizer- 
 >GetValue ()' and the third the 'optimizer- 
 >GetInfinityNormOfProjectedGradient ()' call

Start Registration
0	-0.0206794	4.72925e-05


in the other experiment I used the same images without filtering,  
expecting this would be harder and got a whole lot of iterations part  
of the output was:

Start Registratrion
0	-0.14528	4.5552 e-06
1	-0.173187	5.61854 e-06
2	-0.204225	8.75644 e-06
3	-0.249614	8.81237 e-06
4	-0.282877	5.53998 e-06
5	-0.304294	8.15414	e-06
6	-0.325165	6.08865	e-06
7	-0.344385	7.07919	e-06
........
.........
........

Actually I ran even a couple more experiments, where I changed the  
density of the nodes of the BSplines from a 5x5 grid to a 36x36 grid  
and a 120x120 grid. The events are exactly the same, the diffusion  
filtered image won't start to be registered (probably for some hidden  
convergence stuff?) and the second example (no filtering) runs.

My question is: Why does the program stop in the first case and not  
in the second? I thought the convergence criteria were only the two  
mentioned above? Can someone tell me what the convergence criteria  
for DeformableRegistration8.cxx are really?

I would be grateful for comments as always.
Ruben


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070417/466d1ae8/attachment-0001.htm


More information about the Insight-users mailing list