3
$\begingroup$

I am optimizing some loss function using Gradient Descent method. I am trying it with different learning rates, but the objective function's value is converging to same exact point.

Does this means that I am getting stuck in a local minima?, because the loss function is non-convex so it is less likely that I would converge to a global minima.

$\endgroup$
0

2 Answers 2

5
$\begingroup$

This is the expected behavior. Different learning rates should converge to the same minimum if you are starting at the same location.

If you're optimizing a neural network and you want to explore the loss surface, randomize the starting parameters. If you always start your optimization algorithm from the same initial value, you will reach the same local extremum unless you really increase the step size and overshoot.

$\endgroup$
4
  • $\begingroup$ Thanks for your reply. I am randomizing starting parameters, still I am facing this issue. $\endgroup$ Commented Jul 12, 2016 at 20:32
  • $\begingroup$ How? Are you setting your random seed? $\endgroup$
    – Emre
    Commented Jul 12, 2016 at 20:54
  • $\begingroup$ No, I am not setting random seed. Each time parameters are initialized randomly. That's why the result seems strange. $\endgroup$ Commented Jul 13, 2016 at 9:50
  • $\begingroup$ Please post a minimal working example. $\endgroup$
    – Emre
    Commented Jul 13, 2016 at 19:43
1
$\begingroup$

As you said, you are being stuck at a local minima mostly. Change the parameters as suggested above and try. A learning rate that is too large can hinder convergence and cause the loss function to fluctuate around the minimum or even to diverge actually.

To help with starting point and to be specific to quadratic and cross-entropy cost, according to Micheal A.Nielson, "neural Networks and Deep Learning,Determination Press,2015,

enter image description here

This might not work as suggested. Randomizing is a good try. This is a good read.

$\endgroup$
4
  • $\begingroup$ Method is converging, it is not diverging. Learning rate is not the issue. Different learning rates converging to same local minima (with different random initializations) is the problem. $\endgroup$ Commented Jul 13, 2016 at 9:53
  • $\begingroup$ As the cost function is non-convex, I thought it is expected for the method to converge to different local minimas. But it is converging to same local minima. So I am concerned if there is some problem with my code or something. $\endgroup$ Commented Jul 13, 2016 at 9:54
  • $\begingroup$ So if the initial points are same and if you are in the same local valley, it might happen. Can you increase the learning rate by a good amount and check just to check if you will end up at the same point or not? Increasing the learning rate should push the point outside the local valley. $\endgroup$ Commented Jul 13, 2016 at 10:02
  • $\begingroup$ Initial points are not the same. I have randomized the initialization. $\endgroup$ Commented Jul 13, 2016 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.