Step 1: Current point θt ke paas L ko 1st-order Taylor se approximate karo:
L(θt+Δθ)≈L(θt)+∇θL(θt)TΔθ
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: Ldecrease karne ke liye, Δθ ko gradient ke opposite direction mein choose karo:
Δθ=−η∇θL(θt)
Opposite kyun? Gradient uphill point karta hai (steepest increase ki direction). Negative gradient downhill point karta hai.
η kyun? Gradient ∇L 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:
θt+1=θt−η∇θL(θt)
Theory: Strongly convex L ke liye smoothness L ke saath, optimal η ≈ 1/L. Yeh curvature (second derivative) ko gradient magnitude ke saath balance karta hai.
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:
0.001 se shuru karo (safe default)
1-2 epochs train karo, loss curve check karo:
Loss explode ho → η 10× decrease karo
Loss barely move kare → η 3-10× increase karo
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).
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.
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.
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?
η<L2 jahan L gradient ka Lipschitz constant hai. Practical choice: safety ke liye η≈L1.
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 L(w)=w2 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.