5.6.8 · D5 · HinglishMachine Learning (Aerospace Applications)

Question bankBackpropagation — chain rule, gradient computation

1,467 words7 min read↑ Read in English

5.6.8 · D5 · Coding › Machine Learning (Aerospace Applications) › Backpropagation — chain rule, gradient computation


True or false — justify

True or false: Backprop aur gradient descent ek hi algorithm hain.
False — backprop sirf gradients compute karta hai; Gradient Descent ek alag step hai jo un gradients ko weights update karne ke liye use karta hai. Ek supply karta hai, doosra consume.
True or false: Backprop ke liye loss ka scalar hona zaroori hai.
True — gradient tabhi meaningful hai jab ek single number ho; ek vector output ko pehle scalar loss mein reduce karna padta hai tab koi backward sweep shuru ho sakti hai.
True or false: Forward pass optional hai — sirf weights se backprop kar sakte ho.
False — backprop ko forward pass se cached activations aur pre-activations chahiye hote hain, kyunki local derivatives jaise aur input factor unhi par depend karte hain.
True or false: Layers ki sankhya double karne se ek backward sweep ki cost roughly double ho jaati hai.
True — cost computation graph mein operations ki sankhya ke saath scale hoti hai, isliye depth ke saath linearly badhti hai, individual weights ki sankhya ke saath nahi.
True or false: Agar kisi unit ka activation slope hai, to us path par us unit se pehle kisi bhi weight tak koi gradient nahi pahunchta.
True — error nonlinearity cross karte waqt se multiply hota hai, isliye wo path upstream weight gradients mein zero contribute karta hai (yahi Vanishing Gradients ki ek jad hai).
True or false: Backprop gradient ko exactly compute karta hai, approximation nahi.
True — ye graph par symbolically apply kiya gaya chain rule hai, isliye (floating-point tak) ye exact hai, unlike finite-difference estimates jo truncation error carry karte hain.
True or false: Bias gradient us layer par error signal ke barabar hota hai.
True — kyunki se milta hai, isliye bias raw inherit karta hai bina kisi input factor ke.
True or false: Backprop sirf tiny nets ke liye haath se kiya ja sakta hai.
False — automatic differentiation in hi rules ko arbitrarily large graphs par mechanically apply karta hai; haath se derivation bas yahi dikhata hai jo machine karta hai.

Spot the error

Galti dhundho: " ka gradient sirf hai, kyunki ."
Ye downstream error drop kar deta hai: , na ki sirf . Akela sirf local derivative hai; baaki network ka blame isse multiply hota hai.
Galti dhundho: " ke through error backward bhejna ho to se multiply karo."
Backprop transpose use karta hai, inverse nahi. Linear map ka ke respect mein derivative hai; differentiation transpose karta hai, kabhi invert nahi karta (aur ka square hona bhi zaroori nahi).
Galti dhundho: "Layer-2 output rule har jagah use karo: ."
Ye factor bhool jaata hai. Hidden layers ek nonlinearity se guzarte hain, isliye unka incoming error har unit ke activation slope se scale hona chahiye; sirf linear output layer ise skip karta hai.
Galti dhundho: "Ek node jiska output do layers ko feed karta hai, backprop sirf shorter path se karo."
Tumhe saare outgoing paths ke contributions sum karne chahiye (multivariable Chain Rule). Har path ek independent tarika hai jisse node loss ko influence karta hai, aur total sensitivity unka sum hai.
Galti dhundho: "Hum backward pass ko se seed karte hain."
MSE ke liye seed hai, yaani error, na ki . Target miss karne se poora downstream gradient galat ho jaata hai.
Galti dhundho: "Kyunki backprop forward values reuse karta hai, unhe store karna zaroori nahi — bas recompute karo."
Har local derivative ko scratch se recompute karna efficiency destroy kar dega; -forward-pass ka poora advantage activations cache karne se aata hai taaki har backward step sasta ho.
Galti dhundho: "."
Orientation galat hai — ye outer product hai, jo jaisi shaped matrix deta hai (outputs × inputs). Transpose swap karne se shape galat ho jaati hai.

Why questions

Backprop ki cost roughly ek forward pass ke barabar kyun hoti hai, na ki har weight ke liye ek pass?
Kyunki chain rule derivative ko local slopes ke product mein factor karta hai, aur ek single backward sweep har cached intermediate reuse karke saare weight gradients ek saath fill kar deta hai.
Derivatives accumulate karte waqt hum forward ki bajay backward kyun jaate hain?
Loss door ke end par ek scalar hai; us ek scalar se backward sweep karna har shared sub-derivative reuse karta hai, jabki forward accumulation har input weight ke liye same downstream factors recompute karta.
Nonlinearity cross karte waqt error se nahi balki se kyun multiply hota hai?
Hum differentiate kar rahe hain, isliye activation ka slope () chahiye, jo batata hai ki mein thoda change ko kitna change karta hai — ki value to forward pass ne use ki thi, sensitivity nahi.
Har layer mein ek jaisa "error × input" pattern kyun dikhta hai?
Kyunki har layer ka pre-activation identical linear form rakhta hai, isliye hamesha input pick out karta hai — recursion bas har depth par is local structure ko repeat karta hai.
Saturated activation functions learning ko stall kyun kar dete hain jab backprop bilkul sahi ho?
Unke flat regions mein hota hai, isliye sahi math bhi error ko near-zero se multiply karta hai, kai layers mein gradients shrink hote hain — yahi Vanishing Gradients ka mechanism hai.
Backprop aerospace deep-learning surrogates ko practical kyun banata hai?
Ek CFD surrogate fit karne ka matlab hai huge datasets par millions of weights tune karna; sirf backprop ka one-sweep gradient hi har training step ko itna affordable banata hai ki convergence ho sake.

Edge cases

Edge case: par baitha ek ReLU unit ka gradient kya hoga?
Wahan slope undefined hai (ek kink), isliye implementations ek subgradient choose karte hain — usually (kabhi kabhi ); ye ek measure-zero case hai jo training ko rarely affect karta hai.
Edge case: Agar do alag weights bilkul same value rakhte hain, to kya unke gradients match karne chahiye?
Nahi — gradient har weight ki apni location par aane wali error aur input par depend karta hai, jo generally alag hote hain, isliye equal weights ke gradients bahut alag ho sakte hain.
Edge case: Ek "dead" ReLU jo har training example ke liye 0 output karta hai, uske ka kya hoga?
Uska saare inputs par hai, isliye ye backward zero error pass karta hai aur hamesha ke liye zero weight gradient receive karta hai — ye stuck hai aur apne aap recover nahi kar sakta.
Edge case: Kya ek bias jiska input "hamesha 1" hai, use bhi gradient milta hai?
Haan — uska gradient exactly hai, us unit par raw error; constant input ka bas matlab hai ki ise multiply karne ke liye koi extra input factor nahi hai.
Edge case: Agar current weights par loss bilkul flat hai (), to backprop kya return karta hai?
Ye all-zero gradients return karta hai — ek sahi answer matlab descent move nahi karega, jo minima, maxima, saddle points, ya dead-flat plateaus sab par hota hai.
Edge case: Ek weight ek aisi unit ko feed karta hai jiska downstream error exactly zero hai. Us weight ka gradient kya hai?
Zero, weight ki apni value ya input ki parwah kiye bina, kyunki aur product ko nullify kar deta hai.