1.2.13 · HinglishCalculus & Optimization Basics

Learning rate effects on convergence

2,632 words12 min readRead in English

1.2.13 · AI-ML › Calculus & Optimization Basics


Definition & Core Concept


Derivation: η Gradient Descent Mein Kyun Aata Hai

Taylor Expansion Se (First Principles)

Goal: Loss function minimize karna.

Step 1: Current point ke paas ko 1st-order Taylor se approximate karo:

Yeh step kyun? Taylor series hume predict karne deti hai ki chhote moves ke liye loss kaise change hoga. Hum sirf linear term (gradient) rakhte hain kyunki hum assume karte hain ki steps chhote hain.

Step 2: decrease karne ke liye, ko gradient ke opposite direction mein choose karo:

Opposite kyun? Gradient uphill point karta hai (steepest increase ki direction). Negative gradient downhill point karta hai.

η kyun? Gradient ki units [loss/parameter] hoti hain. Parameter update [parameter units] paane ke liye, hum ise scalar η se multiply karte hain. η ki magnitude step size control karti hai.

Step 3: Update rule ban jaata hai:


Teen Convergence Regimes

Figure — Learning rate effects on convergence

1. Learning Rate Bahut Chhota (η ≪ optimal)

Mathematics: Strongly convex ke liye condition number ke saath, chhota η → convergence rate jahan strong convexity constant hai. Chhota η banata hai, isliye exponential decay slow hoti hai.


2. Learning Rate Bahut Bada (η ≫ optimal)

Critical threshold: ke liye, Hessian ki eigenvalue hai. Stability ke liye chahiye. Hamaara η=1.5 yeh exceed karta hai, isliye exponential divergence hoti hai.


3. Optimal Learning Rate (η "sweet spot" mein)

Theory: Strongly convex ke liye smoothness ke saath, optimal η ≈ 1/L. Yeh curvature (second derivative) ko gradient magnitude ke saath balance karta hai.


Quantitative Stability Analysis

Neural networks mein, compute karna mushkil hota hai (Hessian eigenvalues par depend karta hai), isliye hum:

  1. Chhote η se shuru karo (jaise 0.001)
  2. Grid search karo: {0.1, 0.01, 0.001, 0.0001} try karo
  3. Divergence/stagnation ke liye training loss curve monitor karo

Common Mistakes


Adaptive Learning Rates (Modern Solution)


Practical Guidelines

Scenario Recommended η Reasoning
Convex (linear/logistic regression) 0.01 - 0.1 Bada use kar sakte ho; loss surface smooth hai
Chhota neural network (MNIST) 0.001 - 0.01 Moderate non-linearity
Deep network (ResNet) 0.0001 - 0.001 Bahut saari layers gradient issues amplify karti hain
Adam optimizer 0.001 (default) Adaptive normalization sensitivity reduce karta hai
Pretrained model fine-tuning 0.00001 - 0.0001 Pehle se achhe solution ke paas hai

Tuning protocol:

  1. 0.001 se shuru karo (safe default)
  2. 1-2 epochs train karo, loss curve check karo:
    • Loss explode ho → η 10× decrease karo
    • Loss barely move kare → η 3-10× increase karo
  3. Stable hone ke baad, 2× increments mein tune karo

Recall 12-Saal ke Bacche ko Explain Karo

Socho tum ek hilly park mein aankhon par patti baandhkar sabse neeche point dhundh rahe ho. Tumhara dost direction chillata hai: "5 kadam north chalo!" Yeh gradient hai (direction).

Lekin tumhare steps kitne bade hone chahiye? Yahi learning rate hai.

  • Bahut chhote steps (baby steps ki tarah): Safe! Tum kisi khadde mein nahi giroге. Lekin isмein FOREVER lagta hai. Shayad tum poora din bahar raho.
  • Bahut bade steps (10 feet ki chhalaang ki tarah): Super fast! Lekin tum sabse neeche wali jagah ko jump OVER kar sakte ho, hill ke doosri taraf land karo, phir usi ke upar wapas jump karo, aage-peechhe, kabhi actually bottom par rukoge nahi.
  • Medium steps: Bilkul sahi. Tum steadily neeche walk karte ho aur reasonable time mein bottom reach karte ho.

Learning rate step size choose karne jaisi hai. Bahut chhoti = slow. Bahut badi = tum overshoot karte ho aur bounce karte rehte ho. Goldilocks = fast aur steady.



Connections

  • Gradient Descent - η basic GD mein step size parameter hai
  • Momentum - Velocity term add karta hai; η choice ke liye sensitivity reduce karta hai
  • Adam Optimizer - Per-parameter adaptive η; step sizes auto-tune karta hai
  • Learning Rate Schedules - Better convergence ke liye time-varying η(t)
  • Lipschitz Continuity - Smoothness constant L safe η bound karta hai
  • Condition Number - High κ → stability ke liye chhota η chahiye
  • Hessian Matrix - Second derivatives optimal η determine karte hain
  • Backpropagation - Gradients compute karta hai jo η scale karta hai

#flashcards/ai-ml

Gradient descent mein learning rate η kya control karta hai? :: Parameter updates ki magnitude (step size). Yeh gradient vector ko scale karta hai ye determine karne ke liye ki har iteration mein parameter space mein kitna door move karna hai.

Learning rate ke saath gradient descent update rule likhо ::

Agar learning rate bahut chhoti ho toh kya hota hai?
Convergence bahut slow hoti hai. Loss monotonically decrease hota hai lekin minimum tak pahunchne mein bahut iterations lagte hain (glacier jaisi progress).
Agar learning rate bahut badi ho toh kya hota hai?
Overshooting aur divergence. Parameters minimum ke around increasing magnitude ke saath oscillate karte hain, ya loss infinity tak explode ho jaata hai.
L-smooth functions ke liye, η ki stability condition kya hai?
jahan L gradient ka Lipschitz constant hai. Practical choice: safety ke liye .
Adaptive learning rate (jaise Adam) kyun help karta hai?
Yeh gradient history ke basis par per-parameter step sizes use karta hai. Typically large gradients wale parameters ko chhota effective η milta hai, alag scales wale dimensions mein updates normalize karte hain.
Agar iteration 1 se training loss increase ho, toh kya galat hai?
Learning rate bahut badi hai. Pehle update ne hi overshoot kar diya, yeh indicate karta hai ki η is loss landscape ke liye stability threshold exceed karta hai.
w=1 se shuru karke minimize karne ke liye ek step mein optimal η kya hai?
η = 0.5. Kyunki gradient 2w hai aur Hessian eigenvalue 2 hai, optimal rate 1/λ = 1/2 hai.
Learning rate aur converge hone mein iterations ki sankhya ke beech kya relationship hai?
Non-monotonic. Bahut chhota η → bahut zyaada iterations. Optimal η → sabse kam iterations. Bahut bada η → infinite iterations (converge nahi karta). Ek sweet spot hota hai.
Hum hamesha bahut bada η use karke faster converge kyun nahi kar sakte?
Bada η overshooting cause karta hai. Updates minimum se aage jump karke opposite side par land karte hain, aksar increasing magnitude ke saath, jisse convergence ki jagah oscillation ya divergence hoti hai.

Concept Map

derives

gives

scales

controls

move opposite

sets step size

iterates toward

too low

too high

balanced

slow

oscillates

fast stable

Learning rate eta

Gradient descent update

Taylor expansion

Gradient vector

Step direction

Step magnitude

Too small eta

Too large eta

Optimal eta

Convergence