4.10.20 · D4 · HinglishAdvanced Topics (Elite Level)

ExercisesGradient descent and variants — convergence analysis

2,446 words11 min read↑ Read in English

4.10.20 · D4 · Maths › Advanced Topics (Elite Level) › Gradient descent and variants — convergence analysis

Shuru karne se pehle, un chaar objects ka ek reminder jo hum zyada use karte hain, saral shabdon mein:


Level 1 — Recognition

Exercise 1.1

Ek function -smooth hai jahan hai. Aap wo ek step size chahte hain jo mein sabse bada guaranteed per-step decrease de. kya hai, aur guaranteed decrease kya hai us point par jahan hai?

Recall Solution

HUM KYA USE KARTE HAIN: parent note ne dikhaya tha ki ko descent lemma mein plug karne par ek drop milta hai ka. Yeh mein ek downward parabola hai, jo par maximise hoti hai. KYU aur bada kyun nahi: ke baad factor negative ho jaata hai — "guarantee" khatam ho jaati hai. Parabola ka peak bilkul par baithta hai. Toh . Substitution explicitly dikhate hain: ko drop coefficient mein plug karo: Isliye guaranteed decrease hai

Exercise 1.2

Ek strongly convex quadratic ke curvature eigenvalues (Hessian eigenvalues) aur hain. , , , optimal step size , aur optimal contraction factor batao.

Recall Solution

Eigenvalues ka matlab: ek quadratic ke liye, Hessian ke eigenvalues har principal axis ke saath curvatures hi hote hain. Sabse chhota hai, sabse bada hai. Optimal step size (parent note): Optimal rate:


Level 2 — Application

Exercise 2.1

ke liye se ke saath GD ka ek step chalao. do aur confirm karo ki har coordinate se contract karti hai.

Recall Solution

Function kya hai: ek bowl jo mein zyada steeply stretch hai. Iska gradient hai, toh Hessian diagonal hai jahan hai. KYU coordinates decouple hoti hain: kyunki Hessian diagonal hai, har axis independently evolve karti hai ke roop mein. Toh hai. Dhyan do: coordinate 1 shrank (factor ), lekin coordinate 2 zero se aage nikal gaya (factor ) — yeh sign hai ki steep axis ke saath zyada bada hai. Neeche figure dekho.

Figure s01 — ek GD step, . Lavender ellipses ke level sets hain (bahut elongated kyunki axis ki curvature hai vs ke liye ). Slate dot hai; coral arrow ek single GD step dikhata hai jo coral dot par land karta hai, jo steep axis ke saath mint star (origin par minimum) ke aage nikal gaya hai — yeh par overshoot ka visual signature hai.

Figure — Gradient descent and variants — convergence analysis

Exercise 2.2

2.1 waale same ke liye, sabse bada step size kya hai jiske liye har coordinate contract karti hai (koi divergence nahi)? Optimal aur kya hain?

Recall Solution

KYA ko bound karta hai: hum chahte hain sab ke liye, yaani . Sabse tightest largest eigenvalue se hai. Isliye 2.1 mein ke saath blow up kar gaya: . Optimal step: Optimal rate: , toh


Level 3 — Analysis

Exercise 3.1

GD ko optimal step size par ek strongly convex quadratic par ke saath apply kiya gaya hai. Kitni iterations chahiye taaki ho?

Recall Solution

HUM KYA USE KARTE HAIN: jahan hai. KYU logarithm aata hai: hum chahte hain . lete hain (jo exponents ko multipliers mein baadal deta hai) aur negative number se divide karte hain (inequality flip ho jaati hai): Upar round karo (hum chahte hain inequality hold kare): iterations.

Exercise 3.2

Momentum ko rate mein bana deta hai. Same ke liye, momentum rate hai. Same accuracy ke liye momentum ko kitni iterations chahiye, aur GD ke upar speedup factor kya hai?

Recall Solution

, toh . Speedup: . Yeh " gift" numeric roop mein hai: par lagbhag kam iterations.


Level 4 — Synthesis

Exercise 4.1

Descent lemma se dikhao ki ke saath loss monotonically non-increasing hai, aur exact per-step decrease derive karo. Phir precisely explain karo ki kis par guaranteed decrease pehli baar zero hoti hai.

Recall Solution

HUM KAHAN SE SHURU KARTE HAIN: descent lemma . HUM KYA SUBSTITUTE KARTE HAIN: , toh aur : KYU clean decrease deta hai: substitute karo: toh . Kyunki subtracted term hai, loss kabhi nahi badhti. Guarantee kab vanish hoti hai? Coefficient jab (trivial) ya ho. ke liye coefficient negative hai — lemma ab kisi decrease ka promise nahi karta (aur GD worst eigendirection par diverge karta hai).

Exercise 4.2

Anisotropic quadratic ke liye conceptually plot karo ki GD zig-zag kyun karta hai. Phir compute karo ki GD ki kitni iterations vs momentum ki kitni iterations tak pahunchain, optimal rates use karke.

Recall Solution

KYU zig-zag karta hai: . mein narrow valley ki huge curvature hai; optimal step bhi har iteration ke saath overshoot karta hai, ek back-and-forth path produce karta hai (neeche figure dekho). GD: . Momentum: . Speedup .

Figure s02 — GD zig-zag par. Lavender ellipses ke (bahut elongated) level sets hain. Coral path with dots labelled "start" point se start hokar mint star tak origin par jaata hua GD trajectory hai optimal step par — even best possible scalar step par yeh narrow valley ke across side-to-side bounce karta hai — yeh ek large condition number ki geometry hai jise koi single theek nahi kar sakta.

Figure — Gradient descent and variants — convergence analysis

Level 5 — Mastery

Exercise 5.1

Descent lemma bound ke parabola-minimisation ko independently derive karo: one-step bound diya gaya hai jahan hai, drop ko calculus se maximise karne wala dhundho, aur confirm karo ki yeh ke barabar hai.

Recall Solution

HUM KYA OPTIMISE KARTE HAIN: drop . KYU differentiate karte hain: mein ek downward parabola hai; iska maximum wahan hai jahan derivative zero hai (Fermat's condition). Second derivative ek maximum confirm karta hai. Toh best guaranteed single-step drop exactly use karta hai, jo deta hai, jo parent note se match karta hai.

Exercise 5.2

SGD residual. Maano ke paas (ek 1D quadratic , ) SGD ek constant step aur gradient noise variance use karta hai. Stationary mean-square error satisfy karta hai (is model ke liye standard result) Ise compute karo, aur phir explain karo ki kyun yeh kisi bhi constant ke liye nonzero rehta hai, aur kaunsa schedule ise remove karta hai.

Recall Solution

Plug in karo: , , : Toh RMS residual hai — SGD us radius ki ek ball mein bounce karta rehta hai, kabhi settle nahi hota. KYU nonzero hai: numerator ke proportional hai; yeh sirf tab vanish hota hai jab ho. Kisi bhi fixed ke saath noise har step energy inject karta rehta hai, contraction se balance hoke — ek nonzero equilibrium. Fix (Robbins–Monro): ek decaying schedule use karo jisme (kahin bhi travel karne mein capable) aur (total injected noise finite) ho, jaise . Dekho Stochastic Approximation (Robbins–Monro).

Exercise 5.3

Full-batch vs Newton, ek line each. ke liye jahan ke eigenvalues hain: (a) optimally-tuned GD ko error halve karne mein kitne steps chahiye, aur (b) Newton's method ko exact optimum tak pahunchne mein kitne steps chahiye? Ek sentence mein gap explain karo.

Recall Solution

Pehle, minimum kahan hai? ke liye gradient hai, jo sirf par zero hai (kyunki positive definite hai, toh invertible hai, toh ). Toh poori jagah hai. (a) GD: , . Chahiye : (b) Newton: update hai — yeh minimum tak exactly ek step mein pahunch jaata hai, se regardless. Gap kyun hai (ek sentence): Newton gradient ko se multiply karta hai, jo har eigendirection ko uski apni curvature se rescale karta hai taaki sab axes ek saath zero hit karein, jabki GD ek single scalar use karta hai aur apni worst-conditioned axis se throttle hota hai. Dekho Newton's Method (second-order methods) aur Eigenvalues and the Condition Number.


Recall Poore ladder ka ek-line recap

Recognition = , , mein plug karo. Application = har eigendirection ke liye check karo. Analysis = iteration counts se (upar round karo!). Synthesis = descent lemma → monotone drop. Mastery = optima derive karo, aur jaano ki SGD ko ek decaying schedule chahiye jabki Newton ko seedha khatam kar deta hai.