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.


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.

  • $\begingroup$ Thanks for your reply. I am randomizing starting parameters, still I am facing this issue. $\endgroup$ – SHASHANK GUPTA Jul 12 '16 at 20:32
  • $\begingroup$ How? Are you setting your random seed? $\endgroup$ – Emre Jul 12 '16 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$ – SHASHANK GUPTA Jul 13 '16 at 9:50
  • $\begingroup$ Please post a minimal working example. $\endgroup$ – Emre Jul 13 '16 at 19:43

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.

  • $\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$ – SHASHANK GUPTA Jul 13 '16 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$ – SHASHANK GUPTA Jul 13 '16 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$ – Hima Varsha Jul 13 '16 at 10:02
  • $\begingroup$ Initial points are not the same. I have randomized the initialization. $\endgroup$ – SHASHANK GUPTA Jul 13 '16 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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