The last two features that may significantly affect the speed of the algorithm are the initial stepsize and the treatment of uphill directions, or, equivalently, negative steplengths. Popular choices for the initial stepsize are \(\beta _{0}^{\rm {}} = 1\)  (cf., e.g., [1]}, [2]}) or \(\beta _{0}^{\rm {}} = \Vert \mathbf {g}_0\Vert ^{-1}\)  (cf., e.g., [3]}), where the norm is the Euclidean norm or the \(\infty \) -norm. Since the Hessian may be indefinite, we have to deal with possible uphill directions. We do this in line 7, where a negative steplength is replaced by a certain \(\widehat{\beta }> 0\) . A possible choice is \(\widehat{\beta }= \beta _{\max }\)  (see, e.g., [2]}), but this stepsize is huge and could cause overflow problems. Raydan [1]} proposes to set \(\widehat{\beta }= \min (\max (\Vert \mathbf {g}_k\Vert _2^{-1}, \, 10^{-5}), \ 1)\) , which is an attempt to move away from the uphill direction, while keeping \(\Vert \widehat{\beta }\, \mathbf {g}_k\Vert \)  moderate.
Others (e.g., [6]}, [7]}) simply use \(\widehat{\beta }= \Vert \mathbf {g}_k\Vert ^{-1}\) , as it is done for the first stepsize. We adopt the interesting alternative of [8]} and reuse the previous steplength \(\widehat{\beta }= \beta _{k}^{\rm {}}\) ; this strategy resembles the cyclic gradient method, where the same BB stepsize is reused for several iterations [6]}.
