3.2.10 · HinglishTraining Deep Networks

Dropout regularization

1,615 words7 min readRead in English

3.2.10 · AI-ML › Training Deep Networks


WHAT is Dropout?

  • = probability ki ek neuron drop hoga (typical: hidden ke liye , input ke liye ).
  • = probability ki ek neuron kept rahega.
  • Dropout activations pe apply hota hai, weights pe nahi.

WHY does it work?


HOW: the math, derived from scratch

Training-time forward pass

Ek layer output ke liye, ek mask vector define karo jahan har component yeh hai:

Dropped activation yeh hai:

Sirf surviving neurons () aage pass hote hain; baaki sab zero ho jaate hain.

The scaling problem — derived

Scaling ki zaroorat kyun hai? Ek single dropped activation ki expectation dekho:

Yeh step kyun? Bernoulli() hai, toh . Dropping expected signal ko factor se shrink kar deta hai.

Test time pe hum saare neurons rakhte hain, toh raw activation hai — jo training ke dauran next layer ne jo dekha tha usase times bada hai. Next layer ke weights chhote training-scale input ke liye tune kiye gaye the, toh test activations inflated ho jaayenge → mismatch.

Fix (do equivalent conventions):

Inverted kyun preferred hai: test-time / inference code saaf rehta hai (bas ek normal forward pass), aur saara extra kaam sirf training ke dauran hota hai.


Figure — Dropout regularization

Worked Example 1 — one hidden layer

Maano ek hidden layer activations produce karta hai aur hum inverted dropout use karte hain ke saath toh .

Is step pe sampled mask: .

Step 1 — mask apply karo. Kyun? Neurons 2 aur 4 drop ho gaye → force hokar 0 ho gaye.

Step 2 — se rescale karo. Kyun? Average pe sirf aadhe neurons survive karte hain, toh surviving waalon ko boost diya jaata hai taaki expected sum jaisa hi rahe.

Expectation check karo kai masks ke upar: har prob ke saath appear karta hai, se scale hokar, mean deta hai. Expected activation = original. ✅


Worked Example 2 — why co-adaptation breaks

Do neurons milke "cat" detect karte hain sirf tabhi jab dono strongly fire karein (co-adapted).

  • Dropout ke bina: net seekhta hai jo sirf tabhi kaam karta hai jab dono present hon.
  • ke saath: aadhe time drop ho jaata hai. Net ko phir bhi "cat" gradient milta hai, toh ko akele hi useful signal carry karna padta hai.

Yeh step kyun matter karta hai: random absences mein perform karne ka pressure redundant, robust features force karta hai — yahi regularization ka essence hai.


Common Mistakes


Recall Feynman: explain to a 12-year-old

Tum ek sports team mein ho aur coach randomly kuch players ko har practice pe bench karta hai. Kyunki tumhe pata nahi hota ki kaun missing hoga, sab ko acchi tarah khelna aur ek doosre ko cover karna seekhna padta hai. Game day (test time) pe sab khelते hain — aur team bahut zyada strong hoti hai kyunki koi bhi ek weak link nahi hota jis pe doosre secretly depend karte the. Dropout practice ke dauran random neurons ko bench karta hai taaki network kisi ek pe depend karna band kar de.


Active Recall

Training ke dauran dropout kya randomly zero set karta hai?
Neuron activations (outputs), har ek ko drop probability ke saath, har forward pass pe independently.
Inverted dropout mein, train time pe surviving activations ko kaunse factor se scale kiya jaata hai?
se, taaki expected activation un-dropped value ke barabar rahe.
Scaling ki zaroorat kyun hai?
Kyunki dropping expected activation ko kar deta hai; correction ke bina, test-time (full) activations times badi hongi jo next layer ke liye train nahi ki gayi thi.
Kya test time pe dropout apply hota hai?
Nahi — test time pe saare neurons deterministically use hote hain; sirf scaling correction apply hoti hai (inverted dropout ke liye baked in hoti hai).
Network mein kaunsi problem ko dropout mainly attack karta hai?
Co-adaptation / overfitting — neurons ka specific doosre neurons pe over-rely karna taaki training noise fit ho sake.
dropable units ke upar dropout implicitly kitne sub-networks ensemble karta hai?
Lagbhag possible thinned sub-networks.
Hidden layers aur input layers ke liye typical drop probability?
Hidden layers ke liye ~0.5, input layers ke liye ~0.1–0.2 (chhota).
jahan ?
, kyunki .

Connections

  • Overfitting and Generalization — dropout generalization gap ko reduce karne ka ek tool hai.
  • L2 Regularization (Weight Decay) — alternative/complementary regularizer; dropout ek adaptive penalty ki tarah act karta hai.
  • Ensemble Methods (Bagging) — dropout ≈ sub-networks ke upar implicit bagging.
  • Batch Normalization — dropout ke saath interact karta hai; aksar BN iske need ko reduce kar deta hai.
  • Bernoulli Distribution — mask ka underlying probability model.
  • Bias-Variance Tradeoff — dropout thoda bias trade karta hai ek badi variance reduction ke liye.

Concept Map

uses

produces

causes

trains

injects

yields

gives

creates

fixed by

fixed by

preferred over

Dropout regularization

Bernoulli mask r ~ q

Zero neuron with prob p

Prevents co-adaptation

Approximate ensembling 2^n subnets

Adds multiplicative noise

Smoother loss surface

Expected activation = q times a

Scaling problem train vs test

Inverted dropout scale by 1/q

Original dropout scale by q at test