Dropout regularization
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.

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?
Inverted dropout mein, train time pe surviving activations ko kaunse factor se scale kiya jaata hai?
Scaling ki zaroorat kyun hai?
Kya test time pe dropout apply hota hai?
Network mein kaunsi problem ko dropout mainly attack karta hai?
dropable units ke upar dropout implicitly kitne sub-networks ensemble karta hai?
Hidden layers aur input layers ke liye typical drop probability?
jahan ?
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.