Home Knowledge Base Stochastic Depth

Stochastic Depth is the layer-wise dropout that randomly skips transformer blocks during training so very deep Vision Transformers do not overfit or suffer exploding gradients — each block is bypassed with probability p, turning a 100-layer network into a mixture of shallower networks while still evaluating every block at inference time.

What Is Stochastic Depth?

Why Stochastic Depth Matters

Drop Schedules

Linear Schedule:

Uniform Schedule:

Head-Wise:

How It Works / Technical Details

Step 1: Sample Bernoulli masks for each training sample and each block. Multiply the block output by mask / (1 - p), and add it to the identity path.

Step 2: At inference, masks are disabled so all blocks execute, giving the full depth while benefiting from the regularized representations learned during training.

Comparison / Alternatives

AspectStochastic DepthDropBlockLayerDrop
GranularityBlockSpatial patches
ComplexityLowModerate
ImpactEnsemble-likeLocal occlusion
ViT FitExcellentGood

Tools & Platforms

Stochastic depth is the depth regularizer that keeps Vision Transformers stable and generalizable even when they grow to 100+ layers — it trains as a committee of subnetworks yet retains the full model at inference.

stochastic depth in vitcomputer vision

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.