Home Knowledge Base Learned Layer Selection

Learned Layer Selection is a conditional computation method where a trainable routing policy determines which layers or computational blocks to execute for each specific input, using differentiable gating mechanisms that output binary execute/skip decisions or continuous weighting factors for each layer — enabling the network to learn data-dependent processing paths that allocate depth where it is needed, creating input-specific sub-networks within a single shared architecture.

What Is Learned Layer Selection?

Why Learned Layer Selection Matters

Gating Mechanism

For input hidden state $h$ at layer $l$, the gate computes:

$g_l = sigma(W_l cdot h + b_l)$

If $g_l > au$ (threshold), execute layer $l$: $h_{l+1} = ext{Layer}_l(h_l) + h_l$

If $g_l leq au$, skip layer $l$: $h_{l+1} = h_l$

During training, $g_l$ is sampled from Gumbel-Softmax for differentiable binary decisions. At inference, hard thresholding is used for maximum speed.

Learned Layer Selection is dynamic pathing — letting each input token discover its own route through the neural network, executing only the layers that contribute meaningful computation to its representation while bypassing redundant processing.

learned layer selectionneural architecture

Explore 500+ Semiconductor & AI Topics

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